﻿String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, "");
}


//Begin Function Calls to Call Page Method to Validate the Email Address
function EmailValidate(sender, args)
{
    PageMethods.Validate_Email_Address_WebService(args.Value, ValidEmailFunc, InvalidEmailFunc); 
}

function ValidEmailFunc(result, userctx, ctl) {
    if (result=="0") {
        document.getElementById(Email_TxtBox_CustValID).isvalid = true;
    }
    else {
        document.getElementById(Email_TxtBox_CustValID).isvalid = false;
    }
}

function InvalidEmailFunc(result, userctx, ctl) {
    document.getElementById(Email_TxtBox_CustValID).isvalid = false;
}

