var testresults
function checkemail(str){
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (filter.test(str))
        testresults=false
    else{
        alert("Please input a valid email address!")
        testresults=true
    }
    return (testresults)
}
function CheckForm() {
    var pForm=window.document.frm; //Variable to hold form object
    if (checkemail(pForm.txtemail.value)){
        pForm.txtemail.focus();
        return false ;
    }
    if (pForm.txtcomment.value==""){
        alert('Enter Comment') ;
        pForm.txtcomment.focus();
        return false ;
    }
    pForm.submit();
}
