<!--
function SendShowcase(idnum) {
  var showname = "Showcaseform" + idnum
  var basketname = "Basketform" + idnum
  var showid = -1;
  var basketid = -1;
  for (i=0; i<document.forms.length; i++) {
	if (document.forms[i].name == showname)	{
	   showid = i
	}
	if (document.forms[i].name == basketname) {
	   basketid = i
	}
  }
  if (showid < 0 || basketid < 0) {
    alert("An Error occured in the script\nPlease, contact the administrator")
    return false
  }
  if (document.forms[basketid].attr_value1) {  
    v1 = document.forms[basketid].attr_value1.selectedIndex
    document.forms[showid].attr_value1.value = document.forms[basketid].attr_value1[v1].value
  }
  if (document.forms[basketid].attr_value2) {
    v2 = document.forms[basketid].attr_value2.selectedIndex
    document.forms[showid].attr_value2.value = document.forms[basketid].attr_value2[v2].value
  }
  document.forms[showid].submit()
  return false
}

function SendBasket() {
  if (document.Showcaseform.attr_value1) {  
    v1 = document.Showcaseform.attr_value1.selectedIndex
    document.Basketform.attr_value1.value = document.Showcaseform.attr_value1[v1].value  
  }
  if (document.Showcaseform.attr_value2) {
	v2 = document.Showcaseform.attr_value2.selectedIndex
    document.Basketform.attr_value2.value = document.Showcaseform.attr_value2[v2].value
  }
  document.Basketform.submit()
  return false
}

function CheckStyle(dept,sidID)
{
  if (document.LifeForm) {
  if (document.LifeForm.LifeStyle.selectedIndex > 0 ) {
    index = window.document.LifeForm.LifeStyle.selectedIndex
    stylename = window.document.LifeForm.LifeStyle[index].value
    if (sidID == "XXX999") {
		links = "dept.asp?dept_id=" + dept + "&life=" + stylename 
    } else {
		links = "dept.asp?dept_id=" + dept + "&life=" + stylename + "&sid=" + sidID
    }
    window.document.location.href = links
    return false
    }
  }
  else {
    return true
  }
}

function GiftCheck() {
  dirtyGift = false
  for (i=0; i < document.giftform.gift_id.length; i++) {
   if (document.giftform.gift_id[i].checked) {
     dirtyGift = true
   }
  }
  if (dirtyGift) {
    return true
  } 
  else {
    alert("You must select an occassion..")
    return false
  }
}

function ValidEmail(email) {
  invalidChars = " /:,;"
  if (email == "") {
    return false
  }
  for (i=0; i<invalidChars.size; i++) {
    badChar = invalidChars.charAt(i)
    if (email.indexOf(badChar,0) != -1) {
      return false
    }
  }
  atPos = email.indexOf("@",1)
  if (atPos == -1) {
    return false
  }
  if (email.indexOf("@",atPos+1) != -1) {
    return false
  }
  periodPos = email.indexOf(".",atPos)
  if (periodPos == -1) {
    return false
  }
  if (periodPos+2 >= email.length) {
    return false
  }
  return true
}

function SubmitIt(form,email) {
  if (!ValidEmail(email)) {
    alert("Invalid Email Address")
    return false
  }
  else {
  return true
  }
}

function CheckEmail(form) {
email = form.emailFrom.value
if (!ValidEmail(email)) {
	alert("Invalid Email Address")
	return false
} else {
	return true
}
}

function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin"; 
}
    
                 
//-->

