
function validate_form(){
var error="There is information missing that is required to process your request.\n\nMissing required field(s):\n\n";
var msg ="";


var emailFilter=/^.+@.+\..{2,3}$/;
var string_phone_number = document.mainform.phone.value;

var string_email = document.mainform.email.value;
var string_email_confirm = document.mainform.confirmemail.value;



	if(document.mainform.fullname.value==''){
		msg =  msg + "Please enter your Full Name \n";
		document.mainform.fullname.focus();
	}
	
	
	if (!(emailFilter.test(string_email))) { 
     	 msg = msg + "Please enter a valid email address.\n";
 		document.mainform.email.value='';
		document.mainform.email.focus()
	}
	
	
	if (!(emailFilter.test(string_email_confirm))) { 
     	 msg = msg + "Please confirm that you have entered a valid email address.\n";
 		document.mainform.confirmemail.value='';
		document.mainform.confirmemail.focus()
	}

	if(string_email != string_email_confirm){
			msg = msg + "Emails did not match\n";
	}
	

	if(document.mainform.textarea.value==''){
		msg =  msg + "Please enter your problem to be solved. \n";
	}

	if(document.mainform.pass.value==''){
		msg =  msg + "Please enter the security code. \n";
	}

	if (msg != "") {
       alert(error + msg);
       return false;
    }
return true;
}
