﻿function geterrtext(str, obj) {
    var errdiv = document.getElementById('Error')
    errdiv.style.display = 'block';
    document.getElementById('txtErrore').innerHTML = str;
    obj.focus;
    return false;
}
function CheckValidationLogin() {
   var email = document.getElementById('txtUserName').value;
    var pwd = document.getElementById('txtPassword').value;
    if (email == 'Email' || email == '') {
        geterrtext('Enter Email', email)
        return false;

    }
    var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
    if (!filter.test(email)) {
        geterrtext('Invaid Email', email)
        return false;

    }
    if (pwd == 'Password' || pwd == '') {
        geterrtext('Invaid Password', pwd)
        return false;


    }

}
function blockdiverr(id) {
    document.getElementById(id).style.display = 'none';
}
function displaydiverr(id) {
    document.getElementById(id).style.display = 'block';
}
function geterrtext_Search(str, obj) {
    var errdiv = document.getElementById('LogErr')
    errdiv.style.display = 'block';
    document.getElementById('LogErr').innerHTML = str;
    obj.focus;
    return false;
}
function CheckValidationLogin_Search() {
    var email = document.getElementById('txtUname').value;
    var pwd = document.getElementById('txtPass').value;
    if (email == 'Email' || email == '') {
        geterrtext_Search('Enter Email', email)
        return false;

    }
    var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
    if (!filter.test(email)) {
        geterrtext_Search('Invaid Email', email)
        return false;

    }
    if (pwd == 'Password' || pwd == '') {
        geterrtext_Search('Invaid Password', pwd)
        return false;


    }

}
function blockdiverr_Search(id) {
    document.getElementById(id).style.display = 'none';
}
function displaydiverr_Search(id) {
    document.getElementById(id).style.display = 'block';
}
function show_PopupL_Search() {
    $find('Search_Login').hide();
    $find('MPassPopLoginL').show();
    return false;
}

