<!--
  function contact_us(theForm){
  var reason = "";

 if(!validateName(theForm.name)){
    theForm.name.style.background = 'Yellow';
    alert("Your name contains illegal characters\n");
    return false;
   }
 
 
  if(!validateEmail(theForm.email)){
    theForm.email.style.background = 'Yellow';
    alert("Your email contains illegal characters\n");
    return false;
      
    }  


 if(theForm.subject.value == ""){
    theForm.subject.style.background = 'Yellow';
    alert("You need to fill out your subject\n");
    return false;      
    }  

 if(theForm.question.value == ""){
    theForm.question.style.background = 'Yellow';
    alert("You need to enter your question or comments\n");
    return false;
      
    }  
 if(theForm.code.value == "" || theForm.code.value.length != 4){
    theForm.code.style.background = 'Yellow';
    alert("You need to enter the shown security code\n");
    return false;
      
    }  

  return true;

  }

function validateName(fld) {
    var illegalChars= /[0-9\(\)\<\>\,\;\:\\\"\[\]]/ ;
    if (fld.value == "" || fld.value.match(illegalChars)) {
       return false;
    }
    return true;
}



function trim(s){  return s.replace(/^\s+|\s+$/, '');    } 

function validateEmail(fld) {
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;


    if (fld.value == "" ) {
       return false;       
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
       return false;
    } else if (fld.value.match(illegalChars)) {
        return false;
    } 
   return true;
}

//-->

