﻿function createCookie(cookieName, cookieValue, expires, path) {
    document.cookie = cookieName + "="+cookieValue+"; expires="+expires+";path="+path+";";
}

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 deleteCookie(cookieName) {
    document.cookie = cookieName + "=; expires=Thu, 01-Jan-70 00:00:01 GMT;path=/;";
}
