YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(H,J,I,G){var L=YAHOO.lang;
var K=encodeURIComponent(H)+"="+(I?encodeURIComponent(J):J);if(L.isObject(G)){if(G.expires instanceof Date){K+="; expires="+G.expires.toGMTString();
}if(L.isString(G.path)&&G.path!=""){K+="; path="+G.path;}if(L.isString(G.domain)&&G.domain!=""){K+="; domain="+G.domain;
}if(G.secure===true){K+="; secure";}}return K;},_createCookieHashString:function(F){var H=YAHOO.lang;
if(!H.isObject(F)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");
}var G=new Array();for(var E in F){if(H.hasOwnProperty(F,E)&&!H.isFunction(F[E])&&!H.isUndefined(F[E])){G.push(encodeURIComponent(E)+"="+encodeURIComponent(String(F[E])));
}}return G.join("&");},_parseCookieHash:function(K){var J=K.split("&");var L=null;
var I=new Object();for(var H=0,G=J.length;H<G;H++){L=J[H].split("=");I[decodeURIComponent(L[0])]=decodeURIComponent(L[1]);
}return I;},_parseCookieString:function(R,T){var S=new Object();if(YAHOO.lang.isString(R)&&R.length>0){var K=(T===false?function(A){return A;
}:decodeURIComponent);if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(R)){var P=R.split(/;\s/g);
var Q=null;var L=null;var N=null;for(var M=0,O=P.length;M<O;M++){N=P[M].match(/([^=]+)=/i);
if(N instanceof Array){Q=decodeURIComponent(N[1]);L=K(P[M].substring(Q.length+1));
}else{Q=decodeURIComponent(P[M]);L=Q;}S[Q]=L;}}}return S;},get:function(E,F){var H=YAHOO.lang;
var G=this._parseCookieString(document.cookie);if(H.isUndefined(G[E])){return null;
}if(!H.isFunction(F)){return G[E];}else{return F(G[E]);}},getSub:function(F,H,G){var J=YAHOO.lang;
var I=this.getSubs(F);if(I!==null){if(!J.isString(H)||H===""){throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");
}if(J.isUndefined(I[H])){return null;}if(!J.isFunction(G)){return I[H];}else{return G(I[H]);
}}else{return null;}},getSubs:function(C){if(!YAHOO.lang.isString(C)||C===""){throw new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");
}var D=this._parseCookieString(document.cookie,false);if(YAHOO.lang.isString(D[C])){return this._parseCookieHash(D[C]);
}return null;},remove:function(D,C){if(!YAHOO.lang.isString(D)||D===""){throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.");
}C=C||{};C.expires=new Date(0);return this.set(D,"",C);},set:function(G,H,F){var J=YAHOO.lang;
if(!J.isString(G)){throw new TypeError("Cookie.set(): Cookie name must be a string.");
}if(J.isUndefined(H)){throw new TypeError("Cookie.set(): Value cannot be undefined.");
}var I=this._createCookieString(G,H,true,F);document.cookie=I;return I;},setSub:function(H,J,I,G){var L=YAHOO.lang;
if(!L.isString(H)||H===""){throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.");
}if(!L.isString(J)||J===""){throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");
}if(L.isUndefined(I)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");
}var K=this.getSubs(H);if(!L.isObject(K)){K=new Object();}K[J]=I;return this.setSubs(H,K,G);
},setSubs:function(G,H,F){var J=YAHOO.lang;if(!J.isString(G)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");
}if(!J.isObject(H)){throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");
}var I=this._createCookieString(G,this._createCookieHashString(H),false,F);document.cookie=I;
return I;}};YAHOO.register("cookie",YAHOO.util.Cookie,{version:"2.5.2",build:"1076"});