﻿// JScript File


//RECOVER PASSWORD
// Only script specific to a form goes here.
function validateRecoverPassOnSubmit(messageOne) {
    var elem;
    var errs = 0;
    
    if (document.getElementById('ctl00_contentPlaceHolderPages_txtUsername').value == "") {
        errs += 1;
        document.getElementById('ctl00_contentPlaceHolderPages_txtUsername').focus();
    }      
    
    //we have only one error
    if (errs == 1) {
        alert(messageOne);
    }
    //return 0 if ok, x if errors to check the postback on the button SAVE
    return (errs);
};


function validateCommentOnSubmit(messageOne) {
    var elem;
    var errs = 0;

    if (document.getElementById('ctl00_contentPlaceHolderPages_txtComment').value == "") {
        errs += 1;
        document.getElementById('ctl00_contentPlaceHolderPages_txtComment').focus();
    }

    //we have only one error
    if (errs == 1) {
        alert(messageOne);
    }
    //return 0 if ok, x if errors to check the postback on the button SAVE
    return (errs);
};
