﻿function validdata1() {
    if (emptyField(document.getElementById("txtEmail1"))) {
        alert('Please Enter Email Id.');
        document.getElementById("txtEmail1").focus();
        document.getElementById("txtEmail1").select();
        return false;
    }

    if (!validEmailId(document.getElementById("txtEmail1").value)) {
        alert('Please Enter valid Email Id.');
        document.getElementById("txtEmail1").focus();
        document.getElementById("txtEmail1").select();
        return false;
    }

    if (emptyField(document.getElementById("txtEPwd1"))) {
        alert('Please Enter Password.');
        document.getElementById("txtEPwd1").focus();
        document.getElementById("txtEPwd1").select();
        return false;
    }
    setCookie('username', "", 365);
    return true;
}

function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}

function setCookie(c_name, value, expiredays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
}

function View_Image(ImgName) {
    var win = window.open('Admin/View_CustomerImages.aspx?ImgName=' + ImgName, null, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=400,height=200,top=10,left=10', 'true');
    win.focus();
    return false;
}
function realter() {
    self.location = "RegisterForBroker.aspx";
    return false;
}
function showtable() {
    document.getElementById("tbl_Look").style.display = "Block";
    document.getElementById("tbl_Have").style.display = "None";
}
function Hidetable() {
    document.getElementById("tbl_Look").style.display = "None";
    document.getElementById("tbl_Have").style.display = "Block";
}
function show_Look() {
    document.getElementById("tbl_Look").style.display = "Block";
    document.getElementById("tbl_Have").style.display = "None";
}
function show_Have() {
    document.getElementById("tbl_Look").style.display = "None";
    document.getElementById("tbl_Have").style.display = "Block";
}
