function getCookie(name) { var strArg = new String(name + "="); var nArgLen, nCookieLen, nEnd; var i = 0, j; nArgLen = strArg.length; nCookieLen = document.cookie.length; if (nCookieLen > 0) { while (i < nCookieLen) { j = i + nArgLen; if (document.cookie.substring(i, j) == strArg) { nEnd = document.cookie.indexOf (";", j); if (nEnd == -1) nEnd = document.cookie.length; return unescape(document.cookie.substring(j, nEnd)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } } return(""); } function closePopupLayer(popupName) { if (document.getElementById(popupName)) { document.getElementById(popupName).style.display = 'none'; } }