function CookieLib(){}CookieLib.COOKIE_DELIM=";";CookieLib.COOKIE_KEYVAL="=";CookieLib.ATTRIB_DELIM=";";CookieLib.ATTRIB_KEYVAL="=";function CookieLib_getRawCookie(A){var B=A+CookieLib.COOKIE_KEYVAL;if(document.cookie){if(document.cookie.length>0){offset=document.cookie.indexOf(B);if(offset!=-1){offset+=B.length;end=document.cookie.indexOf(CookieLib.COOKIE_DELIM,offset);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(offset,end));}}}return null;}CookieLib.getRawCookie=CookieLib_getRawCookie;function CookieLib_setCookieAttrib(D,B,A){var C=CookieLib.getCookie(D);C[B]=A;CookieLib.setCookie(D,C);}CookieLib.setCookieAttrib=CookieLib_setCookieAttrib;function CookieLib_getCookieAttrib(C,A){var B=CookieLib.getCookie(C);return B[A];}CookieLib.getCookieAttrib=CookieLib_getCookieAttrib;function CookieLib_getCookie(H){var G=new Array();var D=CookieLib.getRawCookie(H);if(typeof (D)!="undefined"&&D!=null){var E=D.split(CookieLib.ATTRIB_DELIM);for(var C=0;C<E.length;C++){var B=E[C].indexOf(CookieLib.ATTRIB_KEYVAL);var A=E[C].substring(0,B);var F=E[C].substring(B+1);G[A]=F;}}return G;}CookieLib.getCookie=CookieLib_getCookie;function CookieLib_setCookie(E,D){var C="";for(var A in D){var B=D[A];if(typeof (B)!="undefined"&&B!=null&&B!=""&&typeof (B)!="function"){if(A.indexOf(CookieLib.ATTRIB_KEYVAL)<0&&B.indexOf(CookieLib.ATTRIB_KEYVAL)<0&&A.indexOf(CookieLib.ATTRIB_DELIM)<0&&B.indexOf(CookieLib.ATTRIB_DELIM)<0){C+=((C=="")?"":CookieLib.ATTRIB_DELIM);C+=(A+CookieLib.ATTRIB_KEYVAL+B);}else{alert("Cookie attribute name and/or value contains a delimeter ("+CookieLib.ATTRIB_KEYVAL+" or "+CookieLib.ATTRIB_DELIM+").");}}}document.cookie=E+CookieLib.COOKIE_KEYVAL+escape(C);}CookieLib.setCookie=CookieLib_setCookie;