<!-- 
function objExists(e)
{
    var exists = eval(e);
    if(exists)
    {
        return true;
    }
    else
    {
        return false;
    }        
}

// CHECKS THE FIELDS
function checkFields() {
missinginfo = "";
if (document.registration.name.value == "") {
missinginfo += "\n     -  Name";
}
//if (document.registration.company.value == "") {
//missinginfo += "\n     -  Company Name";
//}
if (document.registration.address.value == "") {
missinginfo += "\n     -  Address";
}
if (document.registration.city.value == "") {
missinginfo += "\n     -  City";
}
if (document.registration.state.value == "") {
missinginfo += "\n     -  State";
}
if (document.registration.zip.value == "") {
missinginfo += "\n     -  Zip Code";
}
//if (document.registration.phone.value == "") {
//missinginfo += "\n     -  Phone";
//}
if (document.registration.email.value == "") {
missinginfo += "\n     -  Email Address";
}
if(objExists(document.registration.cpStr) == true)
{
    if (document.registration.cpStr.value == "")
    {
        missinginfo += "\n     -  Security Code";
    }
}
// WRITES THE ALERT CONTAINING THE MISSING INFORMATION
if (missinginfo != "") {
missinginfo = "_____________________________\n" +
"You have not correctly filled in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease enter and submit again!";
alert(missinginfo);
return false;
	} else {
	return true;
  }
}

//EMAIL VALIDATION
function VerifyEmailAddress()
{
  var Reason  = "Email Address entered incorrectly.  \n\nReason:"
  var checkStr = document.registration.email.value;
  var RC = true;
  var x = AtSignValid = DoublePeriod = PeriodValid = SpaceValid = RL = 0;

  for (i = 0;  i < checkStr.length;  i++)
  {
    if (checkStr.charAt(i) == '@')
      AtSignValid++;
    else if (checkStr.charAt(i) == '.')
    {
      if (x == (i-80))
        DoublePeriod++;
      else
      {
        x = i;
        PeriodValid++;
      }
    }
    else if (checkStr.charAt(i) == ' ')
      SpaceValid ++;
  }
  RL = Reason.length;
  if (AtSignValid != 1)
    Reason += "\nOnly one '@' allowed, " + AtSignValid + " found.";
  if (PeriodValid == 0)
    Reason += "\nAddress must contain at least one period.";
  if (SpaceValid > 0)
    Reason += "\nNo Spaces allowed. Address contains " + SpaceValid + " space";
  if (SpaceValid > 1)
    Reason += "s.";
  if (DoublePeriod > 0)
    Reason += "\nAddress contains multiple periods in a row.";
  if (checkStr.length > 120)
    Reason += "\nPlease limit the Email Address to 120 characters.";

  if (RL != Reason.length)
  {
    if (confirm(Reason))
    {
      document.registration.email.focus();
      RC = false;
    }
    else
      RC = true;
  }
  else
    RC = true;
  return(RC);
}

// MASTER VALIDATION ROUTINE

function isCorrect() {
	if (!checkFields()){
		return false;
		} else {
		if (!VerifyEmailAddress()){
		return false;
		}
	  }
return true;
}

// -->

