function ValidateForm(theForm)
{
 var error="";
 var FoundError = false;
 
 //alert(typeof(theForm));
 
 //if(typeof(Form)!="object")theForm = document.getElementById(Form);

 
 for (i = 0;  i < theForm.length;  i++){
 
 	if(theForm[i].value=="" && theForm[i].name.indexOf('RQ,') >= 0 ){
	   ename = theForm[i].name.replace('RQ,', '');
	   ename = ename.replace(/_/g, ' ');
 	error+="Please enter a value for the \"" + ename + "\" field.\n";
	
   
 	if(FoundError==false)
 	theForm[i].focus();
	
 	FoundError=true;
 	}
 else if(theForm[i].name.toLowerCase()=="rq,email" && ( theForm[i].value.indexOf('@') < 0 || theForm[i].value.indexOf('.') < 0 )){
	error+="Please enter a valid Email Address for the \"" +theForm[i].name.replace('RQ,', '') + "\" field.\n";
 	
	theForm[i].focus();
	FoundError=true;
	}
	
 
}


if(FoundError==false){
 for (i = 0;  i < theForm.length;  i++){
    if( theForm[i].name.indexOf('RQ,') >= 0 )
        theForm[i].name =  theForm[i].name.replace('RQ,', '');
	   }
  }
  
  
  if(FoundError == true){
      alert(error);
  
  return false;
  }
  
 
 // theForm.submit();
  return true;
}
  
  