function setCookie(isName,isVal) {
    document.cookie = isName + "=" + isVal + ";expires="  + "path=/";
}

function getCookie(isName) {
    cookieStr = document.cookie;
    startSlice = cookieStr.indexOf(isName+"=");
    if (startSlice == -1) {
        return false
    }
    endSlice = cookieStr.indexOf(";",startSlice+1);
    if (endSlice == -1){
        endSlice = cookieStr.length
    }
    isData = cookieStr.substring(startSlice,endSlice)
    isValue = isData.substring(isData.indexOf("=")+1,isData.length);
    return isValue;
}

function dispCookie(isName) {
    nValue = getCookie(isName);
    if (nValue) {
        alert ("Cookie Name="+isName+" Cookie Value="+nValue);
    }
    else {
        alert ("The Cookie was not found");
    }
}
