<!--
function validateCardOrder(theForm)
{
  
  if (theForm.Name.value == "")
  {
    alert("Please provide your Name.");
    theForm.Name.focus();
    return (false);
  }
   if (theForm.Address.value == "")
  {
    alert("Please provide your Address.");
    theForm.Address.focus();
    return (false);
  }
  if (theForm.City.value == "")
  {
    alert("Please provide your City.");
    theForm.City.focus();
    return (false);
  }
  if (theForm.Province.value == "")
  {
    alert("Please provide your Province.");
    theForm.Province.focus();
    return (false);
  }
   if (theForm.PostalCode.value == "")
  {
    alert("Please provide your Postal Code.");
    theForm.PostalCode.focus();
    return (false);
  }
  else if (isPostCode(theForm.PostalCode.value)==false)
  {
    alert("Please enter a valid 6 character Postal Code with no spaces, eg. T2R1J5.");
	theForm.PostalCode.focus();
    return false;
  }
   if (theForm.Submit.value == "Order Replacement Card")
  {
    if (theForm.Username.value == "")
	  {
	    alert("Please provide your registered Holiday Card Username.");
	    theForm.Username.focus();
	    return (false);
	  }
	if (theForm.Email.value == "")
	  {
	    alert("Please provide your E-Mail.");
	    theForm.Email.focus();
	    return (false);
	  }
  }
  //return (true);
}

/**
 * Cdn Postal Code validation script. (http://home.cogeco.ca/~ve3ll/jstutor5.htm)
 * for format see: http://www.infinitegravity.ca/postalcodeformat.htm
 */
function isPostCode(entry){ // CANADIAN CODES ONLY
	strlen = entry.length; if (strlen != 6) {return false;}
	entry=entry.toUpperCase();        // in case of lowercase characters
	// Check for legal characters in string - note index starts at zero
	if ('ABCEGHJKLMNPRSTVXY'.indexOf(entry.charAt(0)) < 0) {return false;}
	if ('0123456789'.indexOf(entry.charAt(1)) < 0) {return false;}
	if ('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(entry.charAt(2)) < 0) {return false;}
	if ('0123456789'.indexOf(entry.charAt(3)) < 0) {return false;}
	if ('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(entry.charAt(4)) < 0) {return false;}
	if ('0123456789'.indexOf(entry.charAt(5)) < 0) {return false;}
	return true; 
}
//-->