<!--
function checkForm(theForm)
{
  if (theForm.bfn.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.bfn.focus();
    return (false);
  }

  if (theForm.bln.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.bln.focus();
    return (false);
  }


  if (theForm.bmail.value == "")
  {
    alert("Please enter a value for the \"Email Address\" field.");
    theForm.bmail.focus();
    return (false);
  }
  
  invalidChars = " /:,;"
  for (i=0; i<invalidChars.length; i++)
  	badChar = invalidChars.charAt(i)
  	if (theForm.bmail.value.indexOf(badChar,0) > -1) {
  		alert ('email address contains invalid chars.');
  		return (false);
  		}
  		
  atPos = theForm.bmail.value.indexOf("@",1)
  if (atPos == -1) {
  	alert ('email address doesn\'t contain \"@\" ');
  	return (false);
  	}
  	
 if (theForm.bmail.value.indexOf("@",atPos+1) >	 -1) {
 	alert ('email address contains 2 \"@s\" ');
  	return (false);
  	}
  	
  	periodPos = theForm.bmail.value.indexOf(".",atPos)
  	if (periodPos == -1) {
  		alert ('email address doesn\'t contain \".\" ');
		return (false);
  	}
  
   if (periodPos +3 > theForm.bmail.value.length) {
		alert ('email address incorrect. ');
		return (false);
	}
	
	
  if (theForm.baddr.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.baddr.focus();
    return (false);
  }
  
  if (theForm.bcity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.bcity.focus();
    return (false);
  }
  
 if (theForm.bstate.options[theForm.bstate.selectedIndex].value == "0")

  {
    alert("Please enter a value for the \"State\" field.");
    theForm.bstate.focus();
    return (false);
  }
  
  
  if (theForm.bzip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.bzip.focus();
    return (false);
  }

  if (theForm.bphone.value == "")
  {
    alert("Please enter a value for the \"Phone Number\" field.");
    theForm.bphone.focus();
    return (false);
  }

  if (theForm.bphone.value.length < 7)
  {
    alert("Please enter at least 7 characters in the \"Phone Number\" field.");
    theForm.bphone.focus();
    return (false);
  }

  if (theForm.bphone.value.length > 14)
  {
    alert("Please enter at most 14 characters in the \"Phone Number\" field.");
    theForm.bphone.focus();
    return (false);
  }

  var checkOK = "0123456789-()- \t\r\n\f";
  var checkStr = theForm.bphone.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"()-\" characters in the \"Phone Number\" field.");
    theForm.bphone.focus();
    return (false);
  }


if (theForm.bill_check.checked != true) {

	if (theForm.sfn.value == "")
  	{
    	alert("Please enter a value for the \"Shipping First Name\" field.");
    	theForm.sfn.focus();
    	return (false);
  	}

  	if (theForm.sln.value == "")
  	{
   	 alert("Please enter a value for the \"Shipping Last Name\" field.");
    	theForm.sln.focus();
    	return (false);
  	}


	if (theForm.sadd.value == "")
		{
		alert("Please enter a value for the \"Shipping Address\" field.");
		theForm.sadd.focus();
		return (false);
		}
	
  
	if (theForm.scity.value == "")
		{
		alert("Please enter a value for the \"Shipping City\" field.");
		theForm.scity.focus();
		return (false);
		}

	if (theForm.sstate.options[theForm.sstate.selectedIndex].value == "0")

  	{
    	alert("Please enter a value for the \"Shipping State\" field.");
    	theForm.sstate.focus();
    	return (false);
  	}
  
  
	if (theForm.szip.value == "")
		{
		alert("Please enter a value for the \"Shipping Zip\" field.");
		theForm.szip.focus();
		return (false);
	}

	if (theForm.sphone.value.length > 14)
  	{
    	alert("Please enter at most 14 characters in the \"Shipping Phone Number\" field.");
    	theForm.sphone.focus();
    	return (false);
  	}

  	var checkOK = "0123456789-()- \t\r\n\f";
  	var checkStr = theForm.sphone.value;
  	var allValid = true;
  	var validGroups = true;
  	for (i = 0;  i < checkStr.length;  i++)
  	{
    	ch = checkStr.charAt(i);
    	for (j = 0;  j < checkOK.length;  j++)
      	if (ch == checkOK.charAt(j))
        	break;
    	if (j == checkOK.length)
    	{
      	allValid = false;
      	break;
    	}
  	}
  	if (!allValid)
  	{
    	alert("Please enter only digit, whitespace and \"()-\" characters in the \"Phone Number\" field.");
    	theForm.sphone.focus();
    	return (false);
  	}

}

else
	{
	theForm.sfn.value = theForm.bfn.value;
	theForm.sln.value = theForm.bln.value;
	theForm.sadd.value = theForm.baddr.value;
	theForm.scity.value = theForm.bcity.value;
	theForm.sstate.options[theForm.sstate.selectedIndex].text = theForm.bstate.options[theForm.bstate.selectedIndex].text;
	theForm.sstate.options[theForm.sstate.selectedIndex].value = theForm.bstate.options[theForm.bstate.selectedIndex].value;
	theForm.szip.value = theForm.bzip.value;
	theForm.sphone.value = theForm.bphone.value;
	theForm.scomp.value = theForm.bcomp.value;
}

 
check_email = confirm(" Is your email address, \"" +  theForm.bmail.value + "\" correct?")
  if (check_email != "0")
  {
    theForm.Submit.value="Processing...";
    theForm.Submit.disabled = true;
    return (true);
  }
  else
  {
    theForm.bmail.focus();
    return (false);
  }
}

//-->