/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function contactSubmitValidate(){
    var errorText = '';
    var errorBool = false;
    var name = document.pageContactUs.contactName.value;
    var email = document.pageContactUs.contactEmail.value;
    var helpText = document.pageContactUs.contactHelp.value;
    if(name == ''){
        errorText += "Please enter your name \n";
        errorBool = true;
    }
    if(email == ''){
        errorText += "Please enter your Email Id \n";
        errorBool = true;
    }else{
        if(email.indexOf('@', 0) < 0){
            errorText += "Please enter a valid Email Id \n";
            errorBool = true;
        }else if(email.indexOf('.', 0) < 0){
            errorText += "Please enter a valid Email Id \n";
            errorBool = true;
        }
        
    }
    if(helpText == ''){
        errorText += "Please write you want to know from us \n";
        errorBool = true;
    }
    
    if(errorBool){
        alert(errorText);
        return false;
    }else{
        return true;
    }
}



