

function validate_email() {

    

if(document.jsform.email.value == "") { 

    document.jsform.email.focus(); 

     alert("Please enter your email address."); 

     return false; 

      }







if(-1 == document.jsform.email.value.indexOf("@")) { 

       document.jsform.email.focus(); 

       alert("Your email must have a '@'."); 

       return false; 

       }



if(-1 == document.jsform.email.value.indexOf(".")) { 

       document.jsform.email.focus(); 

       alert("Your email must have a '.'"); 

       return false; 

       }



 if(-1 != document.jsform.email.value.indexOf(",")) { 

       document.jsform.email.focus(); 

       alert("Your email must not have a ',' in it"); 

       return false; 

       }



if(-1 != document.jsform.email.value.indexOf("#")) { 

       document.jsform.email.focus(); 

       alert("Your email must not have an '#' in it." ); 

       return false; 

       }



if(-1 != document.jsform.email.value.indexOf("!")) { 

       document.jsform.email.focus(); 

       alert("Your email must not have a '!' in it." ); 

       return false; 

       }



if(-1 != document.jsform.email.value.indexOf(" ")) { 

       document.jsform.email.focus(); 

       alert("Your email must not have a space in it." ); 

       return false; 

       }







    return true;

  }




