var CookieJar=Class.create();CookieJar.prototype={appendString:"__CJ_",initialize:function(_1){this.options={expires:3600,path:"",domain:"",secure:""};Object.extend(this.options,_1||{});if(this.options.expires!=""){var _2=new Date();_2=new Date(_2.getTime()+(this.options.expires*1000));this.options.expires="; expires="+_2.toGMTString();}if(this.options.path!=""){this.options.path="; path="+escape(this.options.path);}if(this.options.domain!=""){this.options.domain="; domain="+escape(this.options.domain);}if(this.options.secure=="secure"){this.options.secure="; secure";}else{this.options.secure="";}},put:function(_3,_4){_3=this.appendString+_3;cookie=this.options;var _5=typeof _4;switch(_5){case "undefined":case "function":case "unknown":return false;case "boolean":case "string":case "number":_4=String(_4.toString());}var _6=_3+"="+escape(Object.toJSON(_4));try{document.cookie=_6+cookie.expires+cookie.path+cookie.domain+cookie.secure;}catch(e){return false;}return true;},remove:function(_7){_7=this.appendString+_7;cookie=this.options;try{var _8=new Date();_8.setTime(_8.getTime()-(3600*1000));var _9="; expires="+_8.toGMTString();document.cookie=_7+"="+_9+cookie.path+cookie.domain+cookie.secure;}catch(e){return false;}return true;},get:function(_a){_a=this.appendString+_a;var _b=document.cookie.match(_a+"=(.*?)(;|$)");if(_b){return (unescape(_b[1])).evalJSON();}else{return null;}},empty:function(){keys=this.getKeys();size=keys.size();for(i=0;i<size;i++){this.remove(keys[i]);}},getPack:function(){pack={};keys=this.getKeys();size=keys.size();for(i=0;i<size;i++){pack[keys[i]]=this.get(keys[i]);}return pack;},getKeys:function(){keys=$A();keyRe=/[^=; ]+(?=\=)/g;str=document.cookie;CJRe=new RegExp("^"+this.appendString);while((match=keyRe.exec(str))!=undefined){if(CJRe.test(match[0].strip())){keys.push(match[0].strip().gsub("^"+this.appendString,""));}}return keys;}};adjustAnchors=function(){if(String(window.location).indexOf("#")>0){window.scrollBy(0,-1*(parseInt($("dropshadow").getHeight())+20));}};adjustPadding=function(e){if($("banner")&&!Prototype.Browser.IE6){$("main").style.marginTop=$("banner").getHeight()+"px";}};Event.observe(window,"load",adjustPadding);Event.observe(window,"unload",shutdown);function shutdown(e){Prototype.emptyFunction();}var jar=new CookieJar({path:"/",expires:"1209600"});var myDate=new Date();jar.put("timezoneOffset",myDate.getTimezoneOffset());bannerError=function(_e){if(!$("bannererror")){clearBanner();$("banner").insert({bottom:"<div id=\"bannererror\" class=\"error\" style=\"position: relative; display: none; cursor: pointer; margin-top: 1em; padding-top: 1em; padding-bottom: 1em; margin-right: -8.5em\"><p><a href=\"javascript:clearBanner();\" style=\"text-decoration: none; color: #ee4444\">x</a> "+_e+"</p></div>"});new Effect.Appear($("bannererror"),{duration:0.5,queue:"end"});Event.observe("bannererror","click",clearBanner);}};bannerMessage=function(_f){if(!$("bannermessage")){clearBanner();$("banner").insert({bottom:"<div id=\"bannermessage\" class=\"message\" style=\"position: relative; display: none; cursor: pointer; margin-top: 1em; padding-top: 1em; padding-bottom: 1em; margin-right: -8.5em\"><p><a href=\"javascript:clearBanner();\" style=\"text-decoration: none; color: #44ee44\">x</a> "+_f+"</p></div>"});new Effect.Appear($("bannermessage"),{duration:0.5,queue:"end"});Event.observe("bannermessage","click",clearBanner);}};function clearBanner(){if($("bannererror")){$("bannererror").remove();}if($("bannermessage")){$("bannermessage").remove();}}
