function validateAndPost(){
    var str = "";
    if(!isEmail(document.frmSubmit.txtEmail.value)){
       str += "Please supply a correct Email. \n";
    }
	if(str.length > 0){
	   
		alert(str);
    } 
    else{
	   document.frmSubmit.submit();
    }
}

function isEmail(strEmail){
	if(strEmail.length < 3 || strEmail.length > 255){
		return false;
	}
	if(strEmail.indexOf("@") < 0){
		return false;
	}
	if(strEmail.indexOf(".") < 0){
		return false;
	}
	return true;
}