﻿// JScript File
function checkEmail(chkValue) {
        if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(chkValue)){
            return true;
        }else{
            return false;
        }
    }
    function checkNumeric(chkValue) {
        if (/^\d+$/.test(chkValue)){
            return true;
        }else{
            return false;
        }
    }
    function frmValidate(frmName){
var alerta='';
if(document.getElementById('email').value==''){
    alerta += '- Email is required\n';
}else{
    if(checkEmail(document.getElementById('email').value)==false){
        alerta += '- Email is Invalid\n';
    }
}
if(alerta!='') {
alerta = 'the following errors were found while processing your form:\n\n' + alerta;
alert(alerta);
}
else {
document.getElementById(frmName).submit();
}
}
