<!--
function CheckEmail(email)
{
  var  re1, re2;
  var  i;
  var  pos;
  var  tstring;
  var  ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
  

  for (i=0; i<email.length; i++)  // this routine checks for valid characters, matching each against ok[]
     if (ok.indexOf(email.charAt(i))<0)
        return false;

                               // find @ sign
  pos = email.indexOf("@");
  if (pos < 1)  return false;  // no @ sign or input starts with it
  else
     {
     if (pos == email.length - 1)  return false;      // input ends with @ sign
     
     tstring = email.substring(pos + 1, email.length);
     if (tstring.indexOf("@") >= 0)  return false;   // there is a second @ sign

     pos = tstring.indexOf(".");
     if (pos < 0) return false;    // no '.' char

     while (pos > 0)   // now parse remaining input until after the last_name '.'
        {
        tstring = tstring.substring(pos + 1, tstring.length);
        pos = tstring.indexOf(".");
        }
     if (pos == 0) return false;  // '.' directly followed '@' or another '.' char
     if ((tstring.length < 2) ||(tstring.length > 4))  return false;  // last_name string needs to be 2-4 chars long to be valid
     }

  return true;
}

function EvaluateInfo(formRef)
{
  if (formRef.first_name.value.length < 1)
     {
     alert ("Please enter your first name.");
     formRef.first_name.focus();           // put the prompt in the First Name field 
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.first_name.style.background = "yellow";  // change the color of text field

     return false;
     }

  else if (formRef.last_name.value.length < 1)
     {
     alert ("Please enter your last name.");
     formRef.last_name.focus();           // put the prompt in the Last Name field 
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.last_name.style.background = "yellow";  // change the color of text field

     return false;
     }
  else if ((formRef.first_name.value.length == 1) && (formRef.last_name.value.length == 1))
     {
     alert ("Please enter your REAL name. Thank you.");
     formRef.first_name.focus();           // put the prompt in the First Name field 
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.first_name.style.background = "yellow";  // change the color of text field

     return false;
     }
   else if (formRef.email.value.length < 1) // check email address
      { 
      alert("Please enter your email address.");
      formRef.email.focus(); 

      if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.email.style.background = "yellow";  // change the color of text field

      return false;
      }
   else if (!CheckEmail (formRef.email.value))
      { 
      alert("Please check your 'Email' input - it does not seem to be a valid email address.");
      formRef.email.focus(); 

      if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.email.style.background = "yellow";  // change the color of text field

      return false;
      }
  else
    return true;
}


function EvaluateWkReqInfo(formRef)
{
  if (formRef.first_name.value.length < 1)
     {
     alert ("Please enter your first name.");
     formRef.first_name.focus();           // put the prompt in the First Name field 
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.first_name.style.background = "yellow";  // change the color of text field

     return false;
     }

  else if (formRef.last_name.value.length < 1)
     {
     alert ("Please enter your last name.");
     formRef.last_name.focus();           // put the prompt in the Last Name field 
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.last_name.style.background = "yellow";  // change the color of text field

     return false;
     }

  else if (formRef.company.value.length < 1)
     {
     alert ("Please enter the name of your company.");
     formRef.company.focus();
     
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.company.style.background = "yellow";  // change the color of text field

     return false;
     }

   else if (formRef.email.value.length < 1) // check email address
      { 
      alert("Please enter your email address.");
      formRef.email.focus(); 

      if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.email.style.background = "yellow";  // change the color of text field

      return false;
      }
   else if (!CheckEmail (formRef.email.value))
      { 
      alert("Please check your 'Email' input - it does not seem to be a valid email address.");
      formRef.email.focus(); 

      if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.email.style.background = "yellow";  // change the color of text field

      return false;
      }
   else if (formRef.phone.value.length < 1)
     {
     alert ("Please enter your phone number.");
     formRef.phone.focus();
   
     if (document.all || document.getElementByID)  // if the browser is Netscape 6 or IE
        formRef.phone.style.background = "yellow";  // change the color of text field

     return false;
     }
  else
    return true;
}
//-->
