<!--
function checkForm(theForm)
{
  if (theForm.fname.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.fname.focus();
    return (false);
  }

  if (theForm.lname.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lname.focus();
    return (false);
  }


  if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.address.focus();
    return (false);
  }
  
  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }

 if (theForm.state.options[theForm.state.selectedIndex].value == "0")

  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"Phone Number\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length < 7)
  {
    alert("Please enter at least 7 characters in the \"Phone Number\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.phone.value.length > 14)
  {
    alert("Please enter at most 14 characters in the \"Phone Number\" field.");
    theForm.phone.focus();
    return (false);
  }

  var checkOK = "0123456789-()- \t\r\n\f";
  var checkStr = theForm.phone.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.phone.focus();
    return (false);
  }



 if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email Address\" field.");
    theForm.email.focus();
    return (false);
  }
  
   if (theForm.email1.value == "")
  {
    alert("You haven\"t retyped your email address.");
    theForm.email1.focus();
    return (false);
  }
  
   if (theForm.email.value != theForm.email1.value)
  {
    alert("You have typed 2 different email addresses.");
	theForm.email.value = "";
	theForm.email1.value = "";
    theForm.email.focus();
    return (false);
  }
  
  invalidChars = " /:,;"
  for (i=0; i<invalidChars.length; i++)
  	badChar = invalidChars.charAt(i)
  	if (theForm.email.value.indexOf(badChar,0) > -1) {
  		alert ('email address contains invalid chars.');
  		return (false);
  		}
  		
  atPos = theForm.email.value.indexOf("@",1)
  if (atPos == -1) {
  	alert ('email address doesn\'t contain \"@\" ');
  	return (false);
  	}
  	
 if (theForm.email.value.indexOf("@",atPos+1) >	 -1) {
 	alert ('email address contains 2 \"@s\" ');
  	return (false);
  	}
  	
  	periodPos = theForm.email.value.indexOf(".",atPos)
  	if (periodPos == -1) {
  		alert ('email address doesn\'t contain \".\" ');
		return (false);
  	}
  
   if (periodPos +3 > theForm.email.value.length) {
		alert ('email address incorrect. ');
		return (false);
	}
	
	
  if (theForm.score.value < 35)
  {
    alert("The password you have chosen is to weak.");
    theForm.passwd.focus();
    return (false);
  }
	
	
    theForm.submit.value="Processing...";
    theForm.submit.disabled = true;
  
 return (true);
}


function checkSubmit(theForm) 
{
	theForm.submit.value="Processing...";
    theForm.submit.disabled = true;
    return (true);
}



//-->
