function writeSessionCookie(a,e){if(testSessionCookie()){document.cookie=escape(a)+"="+escape(e)+"; path=/";return true}else return false}function getCookieValue(a){a=RegExp(escape(a)+"=([^;]+)");if(a.test(document.cookie+";")){a.exec(document.cookie+";");return unescape(RegExp.$1)}else return false}function testSessionCookie(){document.cookie="testSessionCookie=Enabled";return getCookieValue("testSessionCookie")=="Enabled"?true:false} function testPersistentCookie(){writePersistentCookie("testPersistentCookie","Enabled","minutes",1);return getCookieValue("testPersistentCookie")=="Enabled"?true:false} function writePersistentCookie(a,e,d,c){var b=new Date;c/=1;switch(d.toLowerCase()){case "years":d=b.getYear();if(d<1E3)d+=1900;b.setYear(d+c);break;case "months":b.setMonth(b.getMonth()+c);break;case "days":b.setDate(b.getDate()+c);break;case "hours":b.setHours(b.getHours()+c);break;case "minutes":b.setMinutes(b.getMinutes()+c);break;default:alert("Invalid periodType parameter for writePersistentCookie()")}document.cookie=escape(a)+"="+escape(e)+"; expires="+b.toGMTString()+"; path=/"} function deleteCookie(a){getCookieValue(a)&&writePersistentCookie(a,"Pending delete","years",-1);return true};
