﻿function setCookie(name, value, expires) {
    document.cookie = name + "=" + value + "; expires=Fri, 3 Jan " + expires + " 23:59:59 GMT;"
}

function ReadCookie(cookieName) {
    var theCookie = "" + document.cookie;
    var ind = theCookie.indexOf(cookieName);
    if (ind == -1 || cookieName == "") return "";
    var ind1 = theCookie.indexOf(';', ind);
    if (ind1 == -1) ind1 = theCookie.length;
    return unescape(theCookie.substring(ind + cookieName.length + 1, ind1));
}

function SaveCookies() {

    if (txtRemember.value == "1") {
        setCookie("USERLOGIN", txtUID.value, "2060");
        setCookie("RememberMe", "TRUE", "2060");
    } else {
        setCookie("USERLOGIN", "", "2000");
        setCookie("RememberMe", "FALSE", "2000");
    }
}  