//checks if values for required fields are not submitted 	
function validateForm(myForm) {
	var name = myForm.txtName.value;
	var email = myForm.txtEmail.value;
	if (name =="") {
		alert("Please fill in your name");
		myForm.txtName.focus();
		return false;
		} 	
	if (email =="") {
		alert("Please fill in your email address");
		myForm.txtEmail.focus();
		return false;
		}
	
//checks if value is syntactically NOT a valid email address 
function notValidEmail( str ){
    mailRE = new RegExp( );
    mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
} 


//checks if Email is valid
    if( notValidEmail( myForm.txtEmail ) ){
        alert( 'Please enter a valid email address' );
		myForm.txtEmail.focus();
        return false;
    	}
		
		
// if all of the above criteria is satisfied, return True

return true;
}