<!--
function Validator(theForm)
{
 if (theForm.firstname.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.firstname.focus();
    return (false);
  }
  
  if (theForm.lastname.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lastname.focus();
    return (false);
  }

   if (theForm.company.value == "")
  {
    alert("Please enter a value for the \"Company\" field.");
    theForm.company.focus();
    return (false);
  }  
  
   if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"Street 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.selectedIndex < 0)
  {
    alert("Please select one of the \"State\" options.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.state.selectedIndex == 0)
  {
    alert("The first \"State\" option is not a valid selection.  Please choose one of the other options.");
    theForm.state.focus();
    return (false);
  }
  
   if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"Zip/Postal Code\" field.");
    theForm.zip.focus();
    return (false);
  }

  //Phone 
  if (theForm.phone.value == "")
  {
    alert("Please enter a valid \"Phone\" Number.");
    theForm.phone.focus();
    return (false);
  }
    
  //Email address
  newEmail = theForm.email.value;
  while (newEmail.indexOf("-") != -1)
  {
  	newEmail = newEmail.replace('-','');
  }
  var emailaddress_re = /^\w+([\.|\-]\w+){0,2}@\w+(\.\w+)+$/;
  if (emailaddress_re.test(newEmail) == false){
	alert("Please enter email address in \"xxx@xxx.xxx\" format.");
	theForm.email.select();
	theForm.email.focus();
	return false;
  }
  
  if (theForm.employees.selectedIndex <= 0)
  {
    alert("Please select one of the \"Number of Employees\" options.");
    theForm.employees.focus();
    return (false);
  }
  
  if (theForm.revenue.selectedIndex <= 0)
  {
    alert("Please select one of the \"Annual Revenue\" options.");
    theForm.revenue.focus();
    return (false);
  }

  if (theForm.hear_about.selectedIndex <= 0)
  {
    alert("Please select one of the \"How did you hear\" options.");
    theForm.hear_about.focus();
    return (false);
  }
  
  //If Other, Please specify
  if (theForm.hear_about.selectedIndex == 6 && theForm.hear_about2.value == '')
  {
    alert("Please specify how did you hear about the event.");
    theForm.hear_about2.focus();
    return (false);
  }

  if (theForm.relationship.selectedIndex <= 0)
  {
    alert("Please select one of the \"Business Relationship\" options.");
    theForm.relationship.focus();
    return (false);
  }
  
  return (true);
}

function formatPhoneFax( theForm, theElement ) {
  if (theElement.value.length == 10)
  { 
  	theElement.value = theElement.value.substring(0,3)+"-"+theElement.value.substring(3,6)+"-"+theElement.value.substring(6,10);
	return (theElement.value);
  }
}
//-->

