var Prototype={Version:"1.5.0",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(B){return B}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(D,E){for(var F in E){D[F]=E[F]}return D};Object.extend(Object,{inspect:function(C){try{if(C===undefined){return"undefined"}if(C===null){return"null"}return C.inspect?C.inspect():C.toString()}catch(D){if(D instanceof RangeError){return"..."}throw D}},keys:function(D){var F=[];for(var E in D){F.push(E)}return F},values:function(F){var D=[];for(var E in F){D.push(F[E])}return D},clone:function(B){return Object.extend({},B)}});Function.prototype.bind=function(){var D=this,E=$A(arguments),F=E.shift();return function(){return D.apply(F,E.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(E){var D=this,F=$A(arguments),E=F.shift();return function(A){return D.apply(E,[(A||window.event)].concat(F).concat($A(arguments)))}};Object.extend(Number.prototype,{toColorPart:function(){var B=this.toString(16);if(this<16){return"0"+B}return B},succ:function(){return this+1},times:function(B){$R(0,this,true).each(B);return this}});var Try={these:function(){var I;for(var J=0,H=arguments.length;J<H;J++){var F=arguments[J];try{I=F();break}catch(G){}}return I}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(D,C){this.callback=D;this.frequency=C;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};String.interpret=function(B){return B==null?"":String(B)};Object.extend(String.prototype,{gsub:function(G,I){var F="",H=this,J;I=arguments.callee.prepareReplacement(I);while(H.length>0){if(J=H.match(G)){F+=H.slice(0,J.index);F+=String.interpret(I(J));H=H.slice(J.index+J[0].length)}else{F+=H,H=""}}return F},sub:function(E,D,F){D=this.gsub.prepareReplacement(D);F=F===undefined?1:F;return this.gsub(E,function(A){if(--F<0){return A[0]}return D(A)})},scan:function(D,C){this.gsub(D,C);return this},truncate:function(D,C){D=D||30;C=C===undefined?"...":C;return this.length>D?this.slice(0,D-C.length)+C:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var D=new RegExp(Prototype.ScriptFragment,"img");var C=new RegExp(Prototype.ScriptFragment,"im");return(this.match(D)||[]).map(function(A){return(A.match(C)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var D=document.createElement("div");var C=document.createTextNode(this);D.appendChild(C);return D.innerHTML},unescapeHTML:function(){var B=document.createElement("div");B.innerHTML=this.stripTags();return B.childNodes[0]?(B.childNodes.length>1?$A(B.childNodes).inject("",function(D,A){return D+A.nodeValue}):B.childNodes[0].nodeValue):""},toQueryParams:function(D){var C=this.strip().match(/([^?#]*)(#.*)?$/);if(!C){return{}}return C[1].split(D||"&").inject({},function(B,A){if((A=A.split("="))[0]){var H=decodeURIComponent(A[0]);var G=A[1]?decodeURIComponent(A[1]):undefined;if(B[H]!==undefined){if(B[H].constructor!=Array){B[H]=[B[H]]}if(G){B[H].push(G)}}else{B[H]=G}}return B})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},camelize:function(){var F=this.split("-"),E=F.length;if(E==1){return F[0]}var G=this.charAt(0)=="-"?F[0].charAt(0).toUpperCase()+F[0].substring(1):F[0];for(var H=1;H<E;H++){G+=F[H].charAt(0).toUpperCase()+F[H].substring(1)}return G},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(D){var C=this.replace(/\\/g,"\\\\");if(D){return'"'+C.replace(/"/g,'\\"')+'"'}else{return"'"+C.replace(/'/g,"\\'")+"'"}}});String.prototype.gsub.prepareReplacement=function(D){if(typeof D=="function"){return D}var C=new Template(D);return function(A){return C.evaluate(A)}};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(C,D){this.template=C.toString();this.pattern=D||Template.Pattern},evaluate:function(B){return this.template.gsub(this.pattern,function(D){var A=D[1];if(A=="\\"){return D[2]}return A+String.interpret(B[D[3]])})}};var $break=new Object();var $continue=new Object();var Enumerable={each:function(F){var D=0;try{this._each(function(B){try{F(B,D++)}catch(A){if(A!=$continue){throw A}}})}catch(E){if(E!=$break){throw E}}return this},eachSlice:function(I,J){var F=-I,H=[],G=this.toArray();while((F+=I)<G.length){H.push(G.slice(F,F+I))}return H.map(J)},all:function(D){var C=true;this.each(function(A,B){C=C&&!!(D||Prototype.K)(A,B);if(!C){throw $break}});return C},any:function(D){var C=false;this.each(function(A,B){if(C=!!(D||Prototype.K)(A,B)){throw $break}});return C},collect:function(D){var C=[];this.each(function(A,B){C.push((D||Prototype.K)(A,B))});return C},detect:function(D){var C;this.each(function(A,B){if(D(A,B)){C=A;throw $break}});return C},findAll:function(D){var C=[];this.each(function(A,B){if(D(A,B)){C.push(A)}});return C},grep:function(E,F){var D=[];this.each(function(A,B){var C=A.toString();if(C.match(E)){D.push((F||Prototype.K)(A,B))}});return D},include:function(C){var D=false;this.each(function(A){if(A==C){D=true;throw $break}});return D},inGroupsOf:function(D,C){C=C===undefined?null:C;return this.eachSlice(D,function(A){while(A.length<D){A.push(C)}return A})},inject:function(C,D){this.each(function(A,B){C=D(C,A,B)});return C},invoke:function(D){var C=$A(arguments).slice(1);return this.map(function(A){return A[D].apply(A,C)})},max:function(D){var C;this.each(function(A,B){A=(D||Prototype.K)(A,B);if(C==undefined||A>=C){C=A}});return C},min:function(D){var C;this.each(function(A,B){A=(D||Prototype.K)(A,B);if(C==undefined||A<C){C=A}});return C},partition:function(E){var F=[],D=[];this.each(function(A,B){((E||Prototype.K)(A,B)?F:D).push(A)});return[F,D]},pluck:function(D){var C=[];this.each(function(A,B){C.push(A[D])});return C},reject:function(D){var C=[];this.each(function(A,B){if(!D(A,B)){C.push(A)}});return C},sortBy:function(B){return this.map(function(A,D){return{value:A,criteria:B(A,D)}}).sort(function(A,F){var G=A.criteria,H=F.criteria;return G<H?-1:G>H?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var F=Prototype.K,D=$A(arguments);if(typeof D.last()=="function"){F=D.pop()}var E=[this].concat(D).map($A);return this.map(function(A,B){return F(E.pluck(B))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(F){if(!F){return[]}if(F.toArray){return F.toArray()}else{var H=[];for(var E=0,G=F.length;E<G;E++){H.push(F[E])}return H}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(F){for(var D=0,E=this.length;D<E;D++){F(this[D])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(B){return B!=null})},flatten:function(){return this.inject([],function(D,C){return D.concat(C&&C.constructor==Array?C.flatten():[C])})},without:function(){var B=$A(arguments);return this.select(function(A){return !B.include(A)})},indexOf:function(D){for(var F=0,E=this.length;F<E;F++){if(this[F]==D){return F}}return -1},reverse:function(B){return(B!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(){return this.inject([],function(D,C){return D.include(C)?D:D.concat([C])})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(B){B=B.strip();return B?B.split(/\s+/):[]}if(window.opera){Array.prototype.concat=function(){var G=[];for(var J=0,I=this.length;J<I;J++){G.push(this[J])}for(var J=0,I=arguments.length;J<I;J++){if(arguments[J].constructor==Array){for(var F=0,H=arguments[J].length;F<H;F++){G.push(arguments[J][F])}}else{G.push(arguments[J])}}return G}}var Hash=function(B){Object.extend(this,B||{})};Object.extend(Hash,{toQueryString:function(D){var C=[];this.prototype._each.call(D,function(A){if(!A.key){return }if(A.value&&A.value.constructor==Array){var B=A.value.compact();if(B.length<2){A.value=B.reduce()}else{key=encodeURIComponent(A.key);B.each(function(F){F=F!=undefined?encodeURIComponent(F):"";C.push(key+"="+encodeURIComponent(F))});return }}if(A.value==undefined){A[1]=""}C.push(A.map(encodeURIComponent).join("="))});return C.join("&")}});Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(H){for(var E in this){var G=this[E];if(G&&G==Hash.prototype[E]){continue}var F=[E,G];F.key=E;F.value=G;H(F)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(B){return $H(B).inject(this,function(D,A){D[A.key]=A.value;return D})},remove:function(){var E;for(var H=0,G=arguments.length;H<G;H++){var F=this[arguments[H]];if(F!==undefined){if(E===undefined){E=F}else{if(E.constructor!=Array){E=[E]}E.push(F)}}delete this[arguments[H]]}return E},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(B){return B.map(Object.inspect).join(": ")}).join(", ")+"}>"}});function $H(B){if(B&&B.constructor==Hash){return B}return new Hash(B)}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(E,D,F){this.start=E;this.end=D;this.exclusive=F},_each:function(C){var D=this.start;while(this.include(D)){C(D);D=D.succ()}},include:function(B){if(B<this.start){return false}if(this.exclusive){return B<this.end}return B<=this.end}});var $R=function(E,D,F){return new ObjectRange(E,D,F)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(B){this.responders._each(B)},register:function(B){if(!this.include(B)){this.responders.push(B)}},unregister:function(B){this.responders=this.responders.without(B)},dispatch:function(F,H,G,E){this.each(function(B){if(typeof B[F]=="function"){try{B[F].apply(B,[H,G,E])}catch(A){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(B){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,B||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(D,C){this.transport=Ajax.getTransport();this.setOptions(C);this.request(D)},request:function(H){this.url=H;this.method=this.options.method;var F=this.options.parameters;if(!["get","post"].include(this.method)){F["_method"]=this.method;this.method="post"}F=Hash.toQueryString(F);if(F&&/Konqueror|Safari|KHTML/.test(navigator.userAgent)){F+="&_="}if(this.method=="get"&&F){this.url+=(this.url.indexOf("?")>-1?"&":"?")+F}try{Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var E=this.method=="post"?(this.options.postBody||F):null;this.transport.send(E);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(G){this.dispatchException(G)}},onStateChange:function(){var B=this.transport.readyState;if(B>1&&!((B==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var G={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){G["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){G["Connection"]="close"}}if(typeof this.options.requestHeaders=="object"){var I=this.options.requestHeaders;if(typeof I.push=="function"){for(var J=0,H=I.length;J<H;J+=2){G[I[J]]=I[J+1]}}else{$H(I).each(function(A){G[A.key]=A.value})}}for(var F in G){this.transport.setRequestHeader(F,G[F])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(F){var I=Ajax.Request.Events[F];var G=this.transport,J=this.evalJSON();if(I=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(G,J)}catch(H){this.dispatchException(H)}if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+I]||Prototype.emptyFunction)(G,J);Ajax.Responders.dispatch("on"+I,this,G,J)}catch(H){this.dispatchException(H)}if(I=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(C){try{return this.transport.getResponseHeader(C)}catch(D){return null}},evalJSON:function(){try{var json=this.getHeader("X-JSON");return json?eval("("+json+")"):null}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},dispatchException:function(B){(this.options.onException||Prototype.emptyFunction)(this,B);Ajax.Responders.dispatch("onException",this,B)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(E,G,H){this.container={success:(E.success||E),failure:(E.failure||(E.success?null:E))};this.transport=Ajax.getTransport();this.setOptions(H);var F=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(A,B){this.updateContent();F(A,B)}).bind(this);this.request(G)},updateContent:function(){var D=this.container[this.success()?"success":"failure"];var C=this.transport.responseText;if(!this.options.evalScripts){C=C.stripScripts()}if(D=$(D)){if(this.options.insertion){new this.options.insertion(D,C)}else{D.update(C)}}if(this.success()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(D,E,F){this.setOptions(F);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=D;this.url=E;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(B){if(this.options.decay){this.decay=(B.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=B.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(H){if(arguments.length>1){for(var E=0,F=[],G=arguments.length;E<G;E++){F.push($(arguments[E]))}return F}if(typeof H=="string"){H=document.getElementById(H)}return Element.extend(H)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(H,G){var K=[];var I=document.evaluate(H,$(G)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var L=0,J=I.snapshotLength;L<J;L++){K.push(I.snapshotItem(L))}return K}}document.getElementsByClassName=function(N,I){if(Prototype.BrowserFeatures.XPath){var K=".//*[contains(concat(' ', @class, ' '), ' "+N+" ')]";return document._getElementsByXPath(K,I)}else{var O=($(I)||document.body).getElementsByTagName("*");var L=[],J;for(var P=0,M=O.length;P<M;P++){J=O[P];if(Element.hasClassName(J,N)){L.push(Element.extend(J))}}return L}};if(!window.Element){var Element=new Object()}Element.extend=function(I){if(!I||_nativeExtensions||I.nodeType==3){return I}if(!I._extended&&I.tagName&&I!=window){var J=Object.clone(Element.Methods),F=Element.extend.cache;if(I.tagName=="FORM"){Object.extend(J,Form.Methods)}if(["INPUT","TEXTAREA","SELECT"].include(I.tagName)){Object.extend(J,Form.Element.Methods)}Object.extend(J,Element.Methods.Simulated);for(var G in J){var H=J[G];if(typeof H=="function"&&!(G in I)){I[G]=F.findOrStore(H)}}}I._extended=true;return I};Element.extend.cache={findOrStore:function(B){return this[B]=this[B]||function(){return B.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(B){return $(B).style.display!="none"},toggle:function(B){B=$(B);Element[Element.visible(B)?"hide":"show"](B);return B},hide:function(B){$(B).style.display="none";return B},show:function(B){$(B).style.display="";return B},remove:function(B){B=$(B);B.parentNode.removeChild(B);return B},update:function(D,C){C=typeof C=="undefined"?"":C.toString();$(D).innerHTML=C.stripScripts();setTimeout(function(){C.evalScripts()},10);return D},replace:function(E,F){E=$(E);F=typeof F=="undefined"?"":F.toString();if(E.outerHTML){E.outerHTML=F.stripScripts()}else{var D=E.ownerDocument.createRange();D.selectNodeContents(E);E.parentNode.replaceChild(D.createContextualFragment(F.stripScripts()),E)}setTimeout(function(){F.evalScripts()},10);return E},inspect:function(D){D=$(D);var C="<"+D.tagName.toLowerCase();$H({"id":"id","className":"class"}).each(function(A){var B=A.first(),H=A.last();var G=(D[B]||"").toString();if(G){C+=" "+H+"="+G.inspect(true)}});return C+">"},recursivelyCollect:function(D,E){D=$(D);var F=[];while(D=D[E]){if(D.nodeType==1){F.push(Element.extend(D))}}return F},ancestors:function(B){return $(B).recursivelyCollect("parentNode")},descendants:function(B){return $A($(B).getElementsByTagName("*"))},immediateDescendants:function(B){if(!(B=$(B).firstChild)){return[]}while(B&&B.nodeType!=1){B=B.nextSibling}if(B){return[B].concat($(B).nextSiblings())}return[]},previousSiblings:function(B){return $(B).recursivelyCollect("previousSibling")},nextSiblings:function(B){return $(B).recursivelyCollect("nextSibling")},siblings:function(B){B=$(B);return B.previousSiblings().reverse().concat(B.nextSiblings())},match:function(D,C){if(typeof C=="string"){C=new Selector(C)}return C.match($(D))},up:function(F,E,D){return Selector.findElement($(F).ancestors(),E,D)},down:function(F,E,D){return Selector.findElement($(F).descendants(),E,D)},previous:function(F,E,D){return Selector.findElement($(F).previousSiblings(),E,D)},next:function(F,E,D){return Selector.findElement($(F).nextSiblings(),E,D)},getElementsBySelector:function(){var C=$A(arguments),D=$(C.shift());return Selector.findChildElements(D,C)},getElementsByClassName:function(C,D){return document.getElementsByClassName(D,C)},readAttribute:function(G,E){G=$(G);if(document.all&&!window.opera){var H=Element._attributeTranslations;if(H.values[E]){return H.values[E](G,E)}if(H.names[E]){E=H.names[E]}var F=G.attributes[E];if(F){return F.nodeValue}}return G.getAttribute(E)},getHeight:function(B){return $(B).getDimensions().height},getWidth:function(B){return $(B).getDimensions().width},classNames:function(B){return new Element.ClassNames(B)},hasClassName:function(D,F){if(!(D=$(D))){return }var E=D.className;if(E.length==0){return false}if(E==F||E.match(new RegExp("(^|\\s)"+F+"(\\s|$)"))){return true}return false},addClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C).add(D);return C},removeClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C).remove(D);return C},toggleClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C)[C.hasClassName(D)?"remove":"add"](D);return C},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(F){F=$(F);var E=F.firstChild;while(E){var D=E.nextSibling;if(E.nodeType==3&&!/\S/.test(E.nodeValue)){F.removeChild(E)}E=D}return F},empty:function(B){return $(B).innerHTML.match(/^\s*$/)},descendantOf:function(D,C){D=$(D),C=$(C);while(D=D.parentNode){if(D==C){return true}}return false},scrollTo:function(C){C=$(C);var D=Position.cumulativeOffset(C);window.scrollTo(D[0],D[1]);return C},getStyle:function(H,G){H=$(H);if(["float","cssFloat"].include(G)){G=(typeof H.style.styleFloat!="undefined"?"styleFloat":"cssFloat")}G=G.camelize();var F=H.style[G];if(!F){if(document.defaultView&&document.defaultView.getComputedStyle){var E=document.defaultView.getComputedStyle(H,null);F=E?E[G]:null}else{if(H.currentStyle){F=H.currentStyle[G]}}}if((F=="auto")&&["width","height"].include(G)&&(H.getStyle("display")!="none")){F=H["offset"+G.capitalize()]+"px"}if(window.opera&&["left","top","right","bottom"].include(G)){if(Element.getStyle(H,"position")=="static"){F="auto"}}if(G=="opacity"){if(F){return parseFloat(F)}if(F=(H.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(F[1]){return parseFloat(F[1])/100}}return 1}return F=="auto"?null:F},setStyle:function(H,G){H=$(H);for(var E in G){var F=G[E];if(E=="opacity"){if(F==1){F=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;if(/MSIE/.test(navigator.userAgent)&&!window.opera){H.style.filter=H.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}}else{if(F==""){if(/MSIE/.test(navigator.userAgent)&&!window.opera){H.style.filter=H.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}}else{if(F<0.00001){F=0}if(/MSIE/.test(navigator.userAgent)&&!window.opera){H.style.filter=H.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+F*100+")"}}}}else{if(["float","cssFloat"].include(E)){E=(typeof H.style.styleFloat!="undefined")?"styleFloat":"cssFloat"}}H.style[E.camelize()]=F}return H},getDimensions:function(O){O=$(O);var K=$(O).getStyle("display");if(K!="none"&&K!=null){return{width:O.offsetWidth,height:O.offsetHeight}}var P=O.style;var L=P.visibility;var N=P.position;var I=P.display;P.visibility="hidden";P.position="absolute";P.display="block";var J=O.clientWidth;var M=O.clientHeight;P.display=I;P.position=N;P.visibility=L;return{width:J,height:M}},makePositioned:function(C){C=$(C);var D=Element.getStyle(C,"position");if(D=="static"||!D){C._madePositioned=true;C.style.position="relative";if(window.opera){C.style.top=0;C.style.left=0}}return C},undoPositioned:function(B){B=$(B);if(B._madePositioned){B._madePositioned=undefined;B.style.position=B.style.top=B.style.left=B.style.bottom=B.style.right=""}return B},makeClipping:function(B){B=$(B);if(B._overflow){return B}B._overflow=B.style.overflow||"auto";if((Element.getStyle(B,"overflow")||"visible")!="hidden"){B.style.overflow="hidden"}return B},undoClipping:function(B){B=$(B);if(!B._overflow){return B}B.style.overflow=B._overflow=="auto"?"":B._overflow;B._overflow=null;return B}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});Element._attributeTranslations={};Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};Element._attributeTranslations.values={_getAttr:function(C,D){return C.getAttribute(D,2)},_flag:function(C,D){return $(C).hasAttribute(D)?D:null},style:function(B){return B.style.cssText.toLowerCase()},title:function(C){var D=C.getAttributeNode("title");return D.specified?D.nodeValue:null}};Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});Element.Methods.Simulated={hasAttribute:function(F,E){var D=Element._attributeTranslations;E=D.names[E]||E;return $(F).getAttributeNode(E).specified}};if(document.all&&!window.opera){Element.Methods.update=function(G,H){G=$(G);H=typeof H=="undefined"?"":H.toString();var E=G.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(E)){var F=document.createElement("div");switch(E){case"THEAD":case"TBODY":F.innerHTML="<table><tbody>"+H.stripScripts()+"</tbody></table>";depth=2;break;case"TR":F.innerHTML="<table><tbody><tr>"+H.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":F.innerHTML="<table><tbody><tr><td>"+H.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(G.childNodes).each(function(A){G.removeChild(A)});depth.times(function(){F=F.firstChild});$A(F.childNodes).each(function(A){G.appendChild(A)})}else{G.innerHTML=H.stripScripts()}setTimeout(function(){H.evalScripts()},10);return G}}Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){["","Form","Input","TextArea","Select"].each(function(F){var E="HTML"+F+"Element";if(window[E]){return }var D=window[E]={};D.prototype=document.createElement(F?F.toLowerCase():"div").__proto__})}Element.addMethods=function(C){Object.extend(Element.Methods,C||{});function D(I,K,L){L=L||false;var J=Element.extend.cache;for(var A in I){var B=I[A];if(!L||!(A in K)){K[A]=J.findOrStore(B)}}}if(typeof HTMLElement!="undefined"){D(Element.Methods,HTMLElement.prototype);D(Element.Methods.Simulated,HTMLElement.prototype,true);D(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(A){D(Form.Element.Methods,A.prototype)});_nativeExtensions=true}};var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(B){this.adjacency=B};Abstract.Insertion.prototype={initialize:function(H,G){this.element=$(H);this.content=G.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(F){var E=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(E)){this.insertContent(this.contentFromAnonymousTable())}else{throw F}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){G.evalScripts()},10)},contentFromAnonymousTable:function(){var B=document.createElement("div");B.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(B.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(B){B.each((function(A){this.element.parentNode.insertBefore(A,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(B){B.reverse(false).each((function(A){this.element.insertBefore(A,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(B){B.each((function(A){this.element.appendChild(A)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(B){B.each((function(A){this.element.parentNode.insertBefore(A,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(B){this.element=$(B)},_each:function(B){this.element.className.split(/\s+/).select(function(A){return A.length>0})._each(B)},set:function(B){this.element.className=B},add:function(B){if(this.include(B)){return }this.set($A(this).concat(B).join(" "))},remove:function(B){if(!this.include(B)){return }this.set($A(this).without(B).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(B){this.params={classNames:[]};this.expression=B.toString().strip();this.parseExpression();this.compileMatcher()},parseExpression:function(){function I(A){throw"Parse error in selector: "+A}if(this.expression==""){I("empty expression")}var J=this.params,K=this.expression,N,H,L,M;while(N=K.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){J.attributes=J.attributes||[];J.attributes.push({name:N[2],operator:N[3],value:N[4]||N[5]||""});K=N[1]}if(K=="*"){return this.params.wildcard=true}while(N=K.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){H=N[1],L=N[2],M=N[3];switch(H){case"#":J.id=L;break;case".":J.classNames.push(L);break;case"":case undefined:J.tagName=L.toUpperCase();break;default:I(K.inspect())}K=M}if(K.length>0){I(K.inspect())}},buildMatchExpression:function(){var G=this.params,H=[],I;if(G.wildcard){H.push("true")}if(I=G.id){H.push('element.readAttribute("id") == '+I.inspect())}if(I=G.tagName){H.push("element.tagName.toUpperCase() == "+I.inspect())}if((I=G.classNames).length>0){for(var F=0,J=I.length;F<J;F++){H.push("element.hasClassName("+I[F].inspect()+")")}}if(I=G.attributes){I.each(function(B){var A="element.readAttribute("+B.name.inspect()+")";var C=function(D){return A+" && "+A+".split("+D.inspect()+")"};switch(B.operator){case"=":H.push(A+" == "+B.value.inspect());break;case"~=":H.push(C(" ")+".include("+B.value.inspect()+")");break;case"|=":H.push(C("-")+".first().toUpperCase() == "+B.value.toUpperCase().inspect());break;case"!=":H.push(A+" != "+B.value.inspect());break;case"":case undefined:H.push("element.hasAttribute("+B.name.inspect()+")");break;default:throw"Unknown operator "+B.operator+" in selector"}})}return H.join(" && ")},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression())},findElements:function(H){var I;if(I=$(this.params.id)){if(this.match(I)){if(!H||Element.childOf(I,H)){return[I]}}}H=(H||document).getElementsByTagName(this.params.tagName||"*");var J=[];for(var F=0,G=H.length;F<G;F++){if(this.match(I=H[F])){J.push(Element.extend(I))}}return J},toString:function(){return this.expression}};Object.extend(Selector,{matchElements:function(F,E){var D=new Selector(E);return F.select(D.match.bind(D)).map(Element.extend)},findElement:function(F,E,D){if(typeof E=="number"){D=E,E=false}return Selector.matchElements(F,E||"*")[D||0]},findChildElements:function(C,D){return D.map(function(A){return A.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(G,B){var H=new Selector(B);return G.inject([],function(E,F){return E.concat(H.findElements(F||C))})})}).flatten()}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(B){$(B).reset();return B},serializeElements:function(E,D){var F=E.inject({},function(H,B){if(!B.disabled&&B.name){var C=B.name,A=$(B).getValue();if(A!=undefined){if(H[C]){if(H[C].constructor!=Array){H[C]=[H[C]]}H[C].push(A)}else{H[C]=A}}}return H});return D?F:Hash.toQueryString(F)}};Form.Methods={serialize:function(D,C){return Form.serializeElements(Form.getElements(D),C)},getElements:function(B){return $A($(B).getElementsByTagName("*")).inject([],function(D,A){if(Form.Element.Serializers[A.tagName.toLowerCase()]){D.push(Element.extend(A))}return D})},getInputs:function(K,O,N){K=$(K);var I=K.getElementsByTagName("input");if(!O&&!N){return $A(I).map(Element.extend)}for(var M=0,J=[],L=I.length;M<L;M++){var P=I[M];if((O&&P.type!=O)||(N&&P.name!=N)){continue}J.push(Element.extend(P))}return J},disable:function(B){B=$(B);B.getElements().each(function(A){A.blur();A.disabled="true"});return B},enable:function(B){B=$(B);B.getElements().each(function(A){A.disabled=""});return B},findFirstElement:function(B){return $(B).getElements().find(function(A){return A.type!="hidden"&&!A.disabled&&["input","select","textarea"].include(A.tagName.toLowerCase())})},focusFirstElement:function(B){B=$(B);B.findFirstElement().activate();return B}};Object.extend(Form,Form.Methods);Form.Element={focus:function(B){$(B).focus();return B},select:function(B){$(B).select();return B}};Form.Element.Methods={serialize:function(D){D=$(D);if(!D.disabled&&D.name){var F=D.getValue();if(F!=undefined){var E={};E[D.name]=F;return Hash.toQueryString(E)}}return""},getValue:function(C){C=$(C);var D=C.tagName.toLowerCase();return Form.Element.Serializers[D](C)},clear:function(B){$(B).value="";return B},present:function(B){return $(B).value!=""},activate:function(B){B=$(B);B.focus();if(B.select&&(B.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(B.type))){B.select()}return B},disable:function(B){B=$(B);B.disabled=true;return B},enable:function(B){B=$(B);B.blur();B.disabled=false;return B}};Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element;var $F=Form.Element.getValue;Form.Element.Serializers={input:function(B){switch(B.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(B);default:return Form.Element.Serializers.textarea(B)}},inputSelector:function(B){return B.checked?B.value:null},textarea:function(B){return B.value},select:function(B){return this[B.type=="select-one"?"selectOne":"selectMany"](B)},selectOne:function(D){var C=D.selectedIndex;return C>=0?this.optionValue(D.options[C]):null},selectMany:function(H){var F,G=H.length;if(!G){return null}for(var I=0,F=[];I<G;I++){var J=H.options[I];if(J.selected){F.push(this.optionValue(J))}}return F},optionValue:function(B){return Element.extend(B).hasAttribute("value")?B.value:B.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(D,F,E){this.frequency=F;this.element=$(D);this.callback=E;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var C=this.getValue();var D=("string"==typeof this.lastValue&&"string"==typeof C?this.lastValue!=C:String(this.lastValue)!=String(C));if(D){this.callback(this.element,C);this.lastValue=C}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(C,D){this.element=$(C);this.callback=D;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var B=this.getValue();if(this.lastValue!=B){this.callback(this.element,B);this.lastValue=B}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(B){if(B.type){switch(B.type.toLowerCase()){case"checkbox":case"radio":Event.observe(B,"click",this.onElementEvent.bind(this));break;default:Event.observe(B,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(B){return B.target||B.srcElement},isLeftClick:function(B){return(((B.which)&&(B.which==1))||((B.button)&&(B.button==1)))},pointerX:function(B){return B.pageX||(B.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(B){return B.pageY||(B.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(B){if(B.preventDefault){B.preventDefault();B.stopPropagation()}else{B.returnValue=false;B.cancelBubble=true}},findElement:function(E,F){var D=Event.element(E);while(D.parentNode&&(!D.tagName||(D.tagName.toUpperCase()!=F.toUpperCase()))){D=D.parentNode}return D},observers:false,_observeAndCache:function(F,G,H,E){if(!this.observers){this.observers=[]}if(F.addEventListener){this.observers.push([F,G,H,E]);F.addEventListener(G,H,E)}else{if(F.attachEvent){this.observers.push([F,G,H,E]);F.attachEvent("on"+G,H)}}},unloadCache:function(){if(!Event.observers){return }for(var C=0,D=Event.observers.length;C<D;C++){Event.stopObserving.apply(this,Event.observers[C]);Event.observers[C][0]=null}Event.observers=false},observe:function(F,G,H,E){F=$(F);E=E||false;if(G=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||F.attachEvent)){G="keydown"}Event._observeAndCache(F,G,H,E)},stopObserving:function(H,I,J,F){H=$(H);F=F||false;if(I=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||H.detachEvent)){I="keydown"}if(H.removeEventListener){H.removeEventListener(I,J,F)}else{if(H.detachEvent){try{H.detachEvent("on"+I,J)}catch(G){}}}}});if(navigator.appVersion.match(/\bMSIE\b/)){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(F){var D=0,E=0;do{D+=F.scrollTop||0;E+=F.scrollLeft||0;F=F.parentNode}while(F);return[E,D]},cumulativeOffset:function(F){var D=0,E=0;do{D+=F.offsetTop||0;E+=F.offsetLeft||0;F=F.offsetParent}while(F);return[E,D]},positionedOffset:function(H){var E=0,F=0;do{E+=H.offsetTop||0;F+=H.offsetLeft||0;H=H.offsetParent;if(H){if(H.tagName=="BODY"){break}var G=Element.getStyle(H,"position");if(G=="relative"||G=="absolute"){break}}}while(H);return[F,E]},offsetParent:function(B){if(B.offsetParent){return B.offsetParent}if(B==document.body){return B}while((B=B.parentNode)&&B!=document.body){if(Element.getStyle(B,"position")!="static"){return B}}return document.body},within:function(F,D,E){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(F,D,E)}this.xcomp=D;this.ycomp=E;this.offset=this.cumulativeOffset(F);return(E>=this.offset[1]&&E<this.offset[1]+F.offsetHeight&&D>=this.offset[0]&&D<this.offset[0]+F.offsetWidth)},withinIncludingScrolloffsets:function(H,E,F){var G=this.realOffset(H);this.xcomp=E+G[0]-this.deltaX;this.ycomp=F+G[1]-this.deltaY;this.offset=this.cumulativeOffset(H);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+H.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+H.offsetWidth)},overlap:function(D,C){if(!D){return 0}if(D=="vertical"){return((this.offset[1]+C.offsetHeight)-this.ycomp)/C.offsetHeight}if(D=="horizontal"){return((this.offset[0]+C.offsetWidth)-this.xcomp)/C.offsetWidth}},page:function(F){var E=0,G=0;var H=F;do{E+=H.offsetTop||0;G+=H.offsetLeft||0;if(H.offsetParent==document.body){if(Element.getStyle(H,"position")=="absolute"){break}}}while(H=H.offsetParent);H=F;do{if(!window.opera||H.tagName=="BODY"){E-=H.scrollTop||0;G-=H.scrollLeft||0}}while(H=H.parentNode);return[G,E]},clone:function(K,I){var G=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});K=$(K);var J=Position.page(K);I=$(I);var H=[0,0];var L=null;if(Element.getStyle(I,"position")=="absolute"){L=Position.offsetParent(I);H=Position.page(L)}if(L==document.body){H[0]-=document.body.offsetLeft;H[1]-=document.body.offsetTop}if(G.setLeft){I.style.left=(J[0]-H[0]+G.offsetLeft)+"px"}if(G.setTop){I.style.top=(J[1]-H[1]+G.offsetTop)+"px"}if(G.setWidth){I.style.width=K.offsetWidth+"px"}if(G.setHeight){I.style.height=K.offsetHeight+"px"}},absolutize:function(L){L=$(L);if(L.style.position=="absolute"){return }Position.prepare();var J=Position.positionedOffset(L);var H=J[1];var I=J[0];var K=L.clientWidth;var G=L.clientHeight;L._originalLeft=I-parseFloat(L.style.left||0);L._originalTop=H-parseFloat(L.style.top||0);L._originalWidth=L.style.width;L._originalHeight=L.style.height;L.style.position="absolute";L.style.top=H+"px";L.style.left=I+"px";L.style.width=K+"px";L.style.height=G+"px"},relativize:function(D){D=$(D);if(D.style.position=="relative"){return }Position.prepare();D.style.position="relative";var E=parseFloat(D.style.top||0)-(D._originalTop||0);var F=parseFloat(D.style.left||0)-(D._originalLeft||0);D.style.top=E+"px";D.style.left=F+"px";D.style.height=D._originalHeight;D.style.width=D._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(F){var D=0,E=0;do{D+=F.offsetTop||0;E+=F.offsetLeft||0;if(F.offsetParent==document.body){if(Element.getStyle(F,"position")=="absolute"){break}}F=F.offsetParent}while(F);return[E,D]}}Element.addMethods();

var _BROWSER_IS_OPERA =
(navigator.userAgent.toLowerCase().indexOf("opera") != -1);
CookieManager = Class.create();
CookieManager.prototype =
{
userDataForIE: false,

initialize: function(userDataForIE)
{
this.cookieShelfLife = 365;
this.userDataForIE = userDataForIE;
},
getCookie: function(aCookieName)
{
var result = null;
for (var i = 0; i < document.cookie.split('; ').length; i++)
{
var crumb = document.cookie.split('; ')[i].split('=');
if (crumb[0] == aCookieName && crumb[1] != null)
{
result = crumb[1];
break;
}
}

if (_BROWSER_IS_OPERA && result != null)
{
result = result.replace(/%22/g, '"');
}
return unescape(result);
},
setCookie: function(aCookieName, aCookieValue)
{
if (_BROWSER_IS_OPERA)
{
aCookieValue = aCookieValue.replace(/"/g, "%22");
}
var date = new Date();
date.setTime(date.getTime() + (this.cookieShelfLife * 24*60*60*1000));
var expires = '; expires=' + date.toGMTString();
document.cookie = aCookieName + '=' + aCookieValue + expires + '; path=/';
},
clearCookie: function(aCookieName)
{
document.cookie =
aCookieName + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/';
}
}
