var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,B){for(property in B){A[property]=B[property]}return A};Object.inspect=function(A){try{if(A==undefined){return"undefined"}if(A==null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}};Function.prototype.bind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(B){var A=this;return function(C){return A.call(B,C||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0;B<arguments.length;B++){var A=arguments[B];try{C=A();break}catch(D){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?A.childNodes[0].nodeValue:""},toQueryParams:function(){var A=this.match(/^\??(.*)$/)[1].split("&");return A.inject({},function(D,B){var C=B.split("=");D[C[0]]=C[1];return D})},toArray:function(){return this.split("")},camelize:function(){var D=this.split("-");if(D.length==1){return D[0]}var B=this.indexOf("-")==0?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var C=1,A=D.length;C<A;C++){var E=D[C];B+=E.charAt(0).toUpperCase()+E.substring(1)}return B},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(B){var A=0;try{this._each(function(D){try{B(D,A++)}catch(E){if(E!=$continue){throw E}}})}catch(C){if(C!=$break){throw C}}},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(B){var A=true;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push(B(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.collect(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D>=(A||D)){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(D<=(A||D)){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.collect(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){B(E=C.pluck(D));return E})},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(C){if(!C){return[]}if(C.toArray){return C.toArray()}else{var B=[];for(var A=0;A<C.length;A++){B.push(C[A])}return B}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(B){for(var A=0;A<this.length;A++){B(this[A])}},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(A){return A!=undefined||A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(A){for(var B=0;B<this.length;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},shift:function(){var A=this[0];for(var B=0;B<this.length-1;B++){this[B]=this[B+1]}this.length--;return A},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(A){for(key in this){var B=this[key];if(typeof B=="function"){continue}var C=[key,B];C.key=key;C.value=B;A(C)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject($H(this),function(B,C){B[C.key]=C.value;return B})},toQueryString:function(){return this.map(function(A){return A.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(A){var B=Object.extend({},A||{});Object.extend(B,Enumerable);Object.extend(B,Hash);return B}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;do{A(B);B=B.succ()}while(this.include(B))},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(E[D]&&typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,A||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(B){var C=this.options.parameters||"";if(C.length>0){C+="&_="}try{this.url=B;if(this.options.method=="get"&&C.length>0){this.url+=(this.url.match(/\?/)?"&":"?")+C}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var A=this.options.postBody?this.options.postBody:C;this.transport.send(this.options.method=="post"?A:null)}catch(D){this.dispatchException(D)}},setRequestHeaders:function(){var B=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){B.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType){B.push("Connection","close")}}if(this.options.requestHeaders){B.push.apply(B,this.options.requestHeaders)}for(var A=0;A<B.length;A+=2){this.transport.setRequestHeader(B[A],B[A+1])}},onStateChange:function(){var A=this.transport.readyState;if(A!=1){this.respondToReadyState(this.transport.readyState)}},header:function(A){try{return this.transport.getResponseHeader(A)}catch(B){}},evalJSON:function(){try{return eval(this.header("X-JSON"))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var E=this.transport,B=this.evalJSON();if(C=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(E,B)}catch(D){this.dispatchException(D)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(E,B);Ajax.Responders.dispatch("on"+C,this,E,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.containers={success:A.success?$(A.success):$(A),failure:A.failure?$(A.failure):(A.success?null:$(A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.responseIsSuccess()?this.containers.success:this.containers.failure;var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B){if(this.options.insertion){new this.options.insertion(B,A)}else{Element.update(B,A)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.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)}});document.getElementsByClassName=function(C,A){var B=($(A)||document.body).getElementsByTagName("*");return $A(B).inject([],function(D,E){if(E.className.match(new RegExp("(^|\\s)"+C+"(\\s|$)"))){D.push(E)}return D})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(A){return $(A).style.display!="none"},toggle:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);Element[Element.visible(A)?"hide":"show"](A)}},hide:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display="none"}},show:function(){for(var B=0;B<arguments.length;B++){var A=$(arguments[B]);A.style.display=""}},remove:function(A){A=$(A);A.parentNode.removeChild(A)},update:function(B,A){$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10)},getHeight:function(A){A=$(A);return A.offsetHeight},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).include(B)},addClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).add(B)},removeClassName:function(A,B){if(!(A=$(A))){return }return Element.classNames(A).remove(B)},cleanWhitespace:function(B){B=$(B);for(var A=0;A<B.childNodes.length;A++){var C=B.childNodes[A];if(C.nodeType==3&&!/\S/.test(C.nodeValue)){Element.remove(C)}}},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},scrollTo:function(B){B=$(B);var A=B.x?B.x:B.offsetLeft,C=B.y?B.y:B.offsetTop;window.scrollTo(A,C)},getStyle:function(B,C){B=$(B);var D=B.style[C.camelize()];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A.getPropertyValue(C):null}else{if(B.currentStyle){D=B.currentStyle[C.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(C)){if(Element.getStyle(B,"position")=="static"){D="auto"}}return D=="auto"?null:D},setStyle:function(A,B){A=$(A);for(name in B){A.style[name.camelize()]=B[name]}},getDimensions:function(B){B=$(B);if(Element.getStyle(B,"display")!="none"){return{width:B.offsetWidth,height:B.offsetHeight}}var A=B.style;var E=A.visibility;var C=A.position;A.visibility="hidden";A.position="absolute";A.display="";var F=B.clientWidth;var D=B.clientHeight;A.display="none";A.position=C;A.visibility=E;return{width:F,height:D}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}},makeClipping:function(A){A=$(A);if(A._overflow){return }A._overflow=A.style.overflow;if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}},undoClipping:function(A){A=$(A);if(A._overflow){return }A.style.overflow=A._overflow;A._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(A,B){this.element=$(A);this.content=B.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(C){if(this.element.tagName.toLowerCase()=="tbody"){this.insertContent(this.contentFromAnonymousTable())}else{throw C}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){B.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(A.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(A){A.each((function(B){this.element.parentNode.insertBefore(B,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(A){A.reverse(false).each((function(B){this.element.insertBefore(B,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(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set(this.toArray().concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set(this.select(function(B){return B!=A}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var A=0;A<arguments.length;A++){$(arguments[A]).value=""}},focus:function(A){$(A).focus()},present:function(){for(var A=0;A<arguments.length;A++){if($(arguments[A]).value==""){return false}}return true},select:function(A){$(A).select()},activate:function(A){A=$(A);A.focus();if(A.select){A.select()}}};var Form={serialize:function(D){var E=Form.getElements($(D));var C=new Array();for(var B=0;B<E.length;B++){var A=Form.Element.serialize(E[B]);if(A){C.push(A)}}return C.join("&")},getElements:function(B){B=$(B);var C=new Array();for(tagName in Form.Element.Serializers){var D=B.getElementsByTagName(tagName);for(var A=0;A<D.length;A++){C.push(D[A])}}return C},getInputs:function(F,C,D){F=$(F);var A=F.getElementsByTagName("input");if(!C&&!D){return A}var G=new Array();for(var E=0;E<A.length;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}G.push(B)}return G},disable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.blur();A.disabled="true"}},enable:function(C){var D=Form.getElements(C);for(var B=0;B<D.length;B++){var A=D[B];A.disabled=""}},findFirstElement:function(A){return Form.getElements(A).find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){Field.activate(Form.findFirstElement(A))},reset:function(A){$(A).reset()}};Form.Element={serialize:function(B){B=$(B);var D=B.tagName.toLowerCase();var C=Form.Element.Serializers[D](B);if(C){var A=encodeURIComponent(C[0]);if(A.length==0){return }if(C[1].constructor!=Array){C[1]=[C[1]]}return C[1].map(function(E){return A+"="+encodeURIComponent(E)}).join("&")}},getValue:function(A){A=$(A);var C=A.tagName.toLowerCase();var B=Form.Element.Serializers[C](A);if(B){return B[1]}}};Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(A);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A)}return false},inputSelector:function(A){if(A.checked){return[A.name,A.value]}},textarea:function(A){return[A.name,A.value]},select:function(A){return Form.Element.Serializers[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(C){var D="",B,A=C.selectedIndex;if(A>=0){B=C.options[A];D=B.value;if(!D&&!("value" in B)){D=B.text}}return[C.name,D]},selectMany:function(C){var D=new Array();for(var B=0;B<C.length;B++){var A=C.options[B];if(A.selected){var E=A.value;if(!E&&!("value" in A)){E=A.text}D.push(E)}}return[C.name,D]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}}};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(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){var B=Form.getElements(this.element);for(var A=0;A<B.length;A++){this.registerCallback(B[A])}},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(A,"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,element:function(A){return A.target||A.srcElement},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0;A<Event.observers.length;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){var D=$(D);A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.detachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,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(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent;if(B){p=Element.getStyle(B,"position");if(p=="relative"||p=="absolute"){break}}}while(B);return[C,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},clone:function(B,C){B=$(B);C=$(C);C.style.position="absolute";var A=this.cumulativeOffset(B);C.style.top=A[1]+"px";C.style.left=A[0]+"px";C.style.width=B.offsetWidth+"px";C.style.height=B.offsetHeight+"px"},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{A-=B.scrollTop||0;C-=B.scrollLeft||0}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var F=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}Array.prototype.toJSONString=function(){var C=["["],A,E,B=this.length,D;function F(G){if(A){C.push(",")}C.push(G);A=true}for(E=0;E<B;E+=1){D=this[E];switch(typeof D){case"undefined":case"function":case"unknown":break;case"object":if(D){if(typeof D.toJSONString==="function"){F(D.toJSONString())}}else{F("null")}break;default:F(D.toJSONString())}}C.push("]");return C.join("")};Boolean.prototype.toJSONString=function(){return String(this)};Date.prototype.toJSONString=function(){function A(B){return B<10?"0"+B:B}return'"'+this.getFullYear()+"-"+A(this.getMonth()+1)+"-"+A(this.getDate())+"T"+A(this.getHours())+":"+A(this.getMinutes())+":"+A(this.getSeconds())+'"'};Number.prototype.toJSONString=function(){return isFinite(this)?String(this):"null"};Object.prototype.toJSONString=function(){var B=["{"],A,D,C;function E(F){if(A){B.push(",")}B.push(D.toJSONString(),":",F);A=true}for(D in this){if(this.hasOwnProperty(D)){C=this[D];switch(typeof C){case"undefined":case"function":case"unknown":break;case"object":if(C){if(typeof C.toJSONString==="function"){E(C.toJSONString())}}else{E("null")}break;default:E(C.toJSONString())}}}B.push("}");return B.join("")};(function(s){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};s.parseJSON=function(){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)){return eval("("+this+")")}}catch(e){}throw new SyntaxError("parseJSON")};s.toJSONString=function(){if(/["\\\x00-\x1f]/.test(this)){return'"'+this.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+this+'"'}})(String.prototype);var agent=navigator.userAgent.toLowerCase();var is_ie=(agent.indexOf("msie")!=-1);var is_ie_4=(is_ie&&(agent.indexOf("msie 4")!=-1));var is_ie_5=(is_ie&&(agent.indexOf("msie 5.0")!=-1));var is_ie_5_up=(is_ie&&!is_ie_4);var is_ie_5_5=(is_ie&&(agent.indexOf("msie 5.5")!=-1));var is_ie_5_5_up=(is_ie&&!is_ie_4&&!is_ie_5);var is_ie_6=(is_ie&&(agent.indexOf("msie 6.0")!=-1));var is_ie_7=(is_ie&&(agent.indexOf("msie 7.0")!=-1));var is_mozilla=((agent.indexOf("mozilla")!=-1)&&(agent.indexOf("spoofer")==-1)&&(agent.indexOf("compatible")==-1)&&(agent.indexOf("opera")==-1)&&(agent.indexOf("webtv")==-1)&&(agent.indexOf("hotjava")==-1));var is_mozilla_1_3_up=(is_mozilla&&(navigator.productSub>20030210));var is_ns_4=(!is_ie&&(agent.indexOf("mozilla/4.")!=-1));var is_rtf=(is_ie_5_5_up||is_mozilla_1_3_up);var is_safari=(agent.indexOf("safari")!=-1);var submitCountdown=0;function check(D,A,C){for(var B=0;B<D.elements.length;B++){var E=D.elements[B];if((E.name==A)&&(E.type=="checkbox")){E.checked=C}}}function checkAll(E,C,A){if(isArray(C)){for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if(F.type=="checkbox"){for(var B=0;B<C.length;B++){if(F.name==C[B]){F.checked=A.checked}}}}}else{for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name==C)&&(F.type=="checkbox")){F.checked=A.checked}}}}function checkAllBox(E,C,A){var H=0;var G=0;if(isArray(C)){for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name!=A.name)&&(F.type=="checkbox")){for(var B=0;B<C.length;B++){if(F.name==C[B]){H++;if(F.checked){G++}}}}}}else{for(var D=0;D<E.elements.length;D++){var F=E.elements[D];if((F.name!=A.name)&&(F.name==C)&&(F.type=="checkbox")){H++;if(F.checked){G++}}}}if(H==G){A.checked=true}else{A.checked=false}}function checkMaxLength(B,A){if((B.value.length)>=A){B.value=B.value.substring(0,A-1)}}function checkTab(A){if((document.all)&&(event.keyCode==9)){A.selection=document.selection.createRange();setTimeout('processTab("'+A.id+'")',0)}}function cloneObject(B,A){for(i in B){if(typeof B[i]=="object"&&A){this[i]=new cloneObject(B[i],true)}else{this[i]=B[i]}}}var Cookie={create:function(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"},read:function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null},erase:function(A){Cookie.create(A,"",-1)}};document.createInputElement=function(A){if(is_ie){var B=document.createElement("<input name='"+A+"'></input>")}else{var B=document.createElement("input");B.name=A}return B};function disableEsc(){if((document.all)&&(event.keyCode==27)){event.returnValue=false}}if(!Element){Element=new Object()}Element.disable=function(C){C=$(C);var A=C.getElementsByTagName("*");for(var B=0;B<A.length;B++){var D=A[B];var E=D.nodeName.toLowerCase();D.onclick=function(){};D.onmouseover=function(){};D.onmouseout=function(){};if(is_ie){D.onmouseenter=function(){};D.onmouseleave=function(){}}if(E=="a"){D.href="javascript: void(0)"}else{if(E=="input"||E=="select"||E=="script"){D.disabled="true"}else{if(E=="form"){D.action="";D.onsubmit=function(){return false}}}}D.style.cursor="default"}};Element.changeOpacity=function(B,A){A=(A>=100)?99.999:A;A=(A<0)?0:A;B.style.opacity=(A/100);B.style.MozOpacity=(A/100);B.style.KhtmlOpacity=(A/100);B.style.filter="alpha(opacity="+A+")"};if(!Event){Event=new Object()}Event.addHandler=function(D,B,C){if(B.indexOf("on")!=0){B="on"+B}var A=D[B];if(typeof D[B]!="function"){D[B]=C}else{D[B]=function(){if(A){A()}C()}}};Event.enterPressed=function(B){if(!B){B=window.event}var A=B.keyCode;if(A==13){return true}else{return false}};function getSelectedIndex(A){for(var B=0;B<A.length;B++){if(A[B].checked==true){return B}}return -1}function getSelectedRadioName(A){var B=getSelectedIndex(A);if(B==-1){var C=A.name;if(C==null){C=""}return C}else{return A[B].name}}function getSelectedRadioValue(B){var C=getSelectedIndex(B);if(C==-1){var A=B.value;if(A==null){A=""}return A}else{return B[C].value}}function isArray(A){if(!window.Array){return false}else{return A.constructor==window.Array}}function LinkedList(){this.head=null;this.tail=null}LinkedList.prototype.add=function(C){C.listInfo=new Object();var A=this.tail;var B=this.head;if(this.head==null){this.head=C;this.tail=C}else{this.tail.listInfo.next=C;C.listInfo.prev=this.tail;this.tail=C}};LinkedList.prototype.remove=function(C){if(this.head){var A=C.listInfo.next;var B=C.listInfo.prev;if(A){A.listInfo.prev=B}if(B){B.listInfo.next=A}if(this.head=C){this.head=A}if(this.tail=C){this.tail=B}}};LinkedList.prototype.each=function(C){var D=this.head;var B=0;while(D){B++;var A=D.listInfo.next;if(C){C(D)}D=A}return B};LinkedList.prototype.size=function(){return this.each()};function listChecked(C){var B="";for(var A=0;A<C.elements.length;A++){var D=C.elements[A];if((D.type=="checkbox")&&(D.checked==true)&&(D.value>"")){B+=D.value+","}}return B}function listCheckedExcept(D,C){var B="";for(var A=0;A<D.elements.length;A++){var E=D.elements[A];if((E.type=="checkbox")&&(E.checked==true)&&(E.value>"")&&(E.name.indexOf(C)!=0)){B+=E.value+","}}return B}function listSelect(D,A){var C="";if(A==null){A=","}if(D==null){return""}for(var B=0;B<D.length;B++){if(D.options[B].value>""){C+=D.options[B].value+A}}if(C==".none,"){return""}else{return C}}function listUnchecked(C){var B="";for(var A=0;A<C.elements.length;A++){var D=C.elements[A];if((D.type=="checkbox")&&(D.checked==false)&&(D.value>"")){B+=D.value+","}}return B}function listUncheckedExcept(D,C){var B="";for(var A=0;A<D.elements.length;A++){var E=D.elements[A];if((E.type=="checkbox")&&(E.checked==false)&&(E.value>"")&&(E.name.indexOf(C)!=0)){B+=E.value+","}}return B}function moveItem(A,B,E){var G=null;var H=null;var F=null;if(A.selectedIndex>=0){for(var D=0;D<A.length;D++){if(A.options[D].selected){G=A.options[D].text;H=A.options[D].value;F=new Option(G,H);B[B.length]=F}}for(var D=0;D<B.length;D++){for(var C=0;C<A.length;C++){if(A[C].value==B[D].value){A[C]=null;break}}}}if(G!=null){if(E==true){sortBox(B)}}}function processTab(A){document.all[A].selection.text=String.fromCharCode(9);document.all[A].focus()}function reelHome(A,J,I,C,E,G){if(isNaN(J)||isNaN(I)){return }var D=document.getElementById(A);if(D==null){return }var H=parseInt(D.style.top);var B=parseInt(D.style.left);if(E==null){E=1}if(C==null){C==20}if(G==null){G=Math.PI/(2*C);D.style.zIndex=10}if(E<C){var F=1-Math.sin(E*G);D.style.left=(J*F)+"px";D.style.top=(I*F)+"px";setTimeout('reelHome("'+A+'",'+J+","+I+","+C+","+(++E)+","+G+")",16)}else{D.style.top="0px";D.style.left="0px";D.style.zIndex=0}}function removeItem(B,C){if(C==null){for(var A=B.length-1;A>=0;A--){if(B.options[A].selected){B[A]=null}}}else{for(var A=B.length-1;A>=0;A--){if(B.options[A].value==C){B[A]=null}}}}function reorder(D,E){var B=D.selectedIndex;if(B==-1){D.selectedIndex=0}else{sText=D.options[B].text;sValue=D.options[B].value;if((D.options[B].value>"")&&(B>0)&&(E==0)){D.options[B].text=D.options[B-1].text;D.options[B].value=D.options[B-1].value;D.options[B-1].text=sText;D.options[B-1].value=sValue;D.selectedIndex--}else{if((B<D.length-1)&&(D.options[B+1].value>"")&&(E==1)){D.options[B].text=D.options[B+1].text;D.options[B].value=D.options[B+1].value;D.options[B+1].text=sText;D.options[B+1].value=sValue;D.selectedIndex++}else{if(B==0){for(var C=0;C<(D.length-1);C++){D.options[C].text=D.options[C+1].text;D.options[C].value=D.options[C+1].value}D.options[D.length-1].text=sText;D.options[D.length-1].value=sValue;D.selectedIndex=D.length-1}else{if(B==(D.length-1)){for(var A=(D.length-1);A>0;A--){D.options[A].text=D.options[A-1].text;D.options[A].value=D.options[A-1].value}D.options[0].text=sText;D.options[0].value=sValue;D.selectedIndex=0}}}}}}function resubmitCountdown(B){if(submitCountdown>0){submitCountdown--;setTimeout("resubmitCountdown('"+B+"')",1000)}else{submitCountdown=0;if(!is_ns_4){document.body.style.cursor="auto"}var C=document.forms[B];for(var A=0;A<C.length;A++){var D=C.elements[A];if(D.type&&(D.type.toLowerCase()=="button"||D.type.toLowerCase()=="reset"||D.type.toLowerCase()=="submit")){D.disabled=false}}}}function selectAndCopy(A){A.focus();A.select();if(document.all){var B=A.createTextRange();B.execCommand("copy")}}function setBox(C,A){for(var B=C.length-1;B>-1;B--){C.options[B]=null}for(var B=0;B<A.length;B++){C.options[B]=new Option(A[B].value,B)}C.options[0].selected=true}function setCursorPosition(D,C,B){if(D.setSelectionRange){D.setSelectionRange(C,B)}else{if(D.createTextRange){var A=D.createTextRange();A.collapse(true);A.moveEnd("character",B);A.moveStart("character",C);A.select()}}}function setSelectedValue(A,C){for(var B=0;B<A.length;B++){if((A[B].value!="")&&(A[B].value==C)){A.selectedIndex=B;break}}}function setSelectVisibility(C,B){if(is_ie){if(B){B=$(B)}else{B=document.getElementsByTagName("body")[0]}selectList=B.getElementsByTagName("select");for(var A=0;A<selectList.length;A++){selectList[A].style.visibility=C}}}function slideMaximize(E,B,C){var D=document.getElementById(E);var A=D.getElementsByTagName("DIV")[0];B+=C;if(B<(A.offsetHeight)){D.style.height=B+"px";setTimeout('slideMaximize("'+E+'",'+B+","+C+")",10)}else{D.style.overflow="";D.style.height="100%";if(E=="p_p_body_how_portlet"){if(howMilesPerDaySliderElement==null){initializeSlider("horizontal",howMilesPerDaySliderElement,"howMilesPerDaySlider","howMilesPerDaySliderInput",60,600,document.initialValueMilesPerDay,5,"miles","milesPerDay")}}else{if(E=="p_p_body_what_portlet"){if(whatSearchRadiusSliderElement==null){initializeSlider("horizontal",whatSearchRadiusSliderElement,"whatSearchRadiusSlider","whatSearchRadiusSliderInput",2,150,75,5,"searchRadiusDiv","searchRadius")}}else{if(E=="p_p_body_map_portlet"){if(mapSliderElement==null){initializeMapSlider("vertical",mapSliderElement,"mapSlider","mapSliderInput",1,18,18,2)}}}}}}function slideMinimize(D,A,B){var C=document.getElementById(D);A-=B;if(A>0){C.style.height=A+"px";setTimeout('slideMinimize("'+D+'",'+A+","+B+")",10)}else{C.style.display="none"}}function sortBox(C){var A=new Array();for(var B=0;B<C.length;B++){A[B]=new Array(C[B].value,C[B].text)}A.sort(sortByAscending);for(var B=C.length-1;B>-1;B--){C.options[B]=null}for(var B=0;B<A.length;B++){C.options[C.length]=new Option(A[B][1],A[B][0])}}function sortByAscending(B,A){if(B[1].toLowerCase()>A[1].toLowerCase()){return 1}else{if(B[1].toLowerCase()<A[1].toLowerCase()){return -1}else{return 0}}}function sortByDescending(B,A){if(B[1].toLowerCase()>A[1].toLowerCase()){return -1}else{if(B[1].toLowerCase()<A[1].toLowerCase()){return 1}else{return 0}}}function submitForm(C,D,A){if(submitCountdown==0){submitCountdown=10;setTimeout("resubmitCountdown('"+C.name+"')",1000);if(A==null||A){submitCountdown++;for(var B=0;B<C.length;B++){var E=C.elements[B];if(E.type&&(E.type.toLowerCase()=="button"||E.type.toLowerCase()=="reset"||E.type.toLowerCase()=="submit")){E.disabled=true}}}if(D!=null){C.action=D}if(!is_ns_4){document.body.style.cursor="wait"}C.submit()}else{if(this.submitFormAlert!=null){submitFormAlert(submitCountdown)}}}if(is_ns_4){encodeURIComponent=new function(A){return escape(A)};decodeURIComponent=new function(A){return unescape(A)}}function startsWith(B,A){if(B.indexOf(A)==0){return true}else{return false}}function endsWith(B,A){if(B.lastIndexOf(A)==B.length-A.length){return true}else{return false}}function toHTML(A){A=A.replace(/\&/g,"&amp;");A=A.replace(/</g,"&lt;");A=A.replace(/>/g,"&gt;");A=A.replace(/\n/g,"<br>");A=A.replace(/  /g," &nbsp;");return A}function toText(A){A=A.replace(/\&nbsp;/gi," ");A=A.replace(/<br>/gi,"\n");A=A.replace(/&gt;/gi,">");A=A.replace(/\&lt;/gi,"<");A=A.replace(/\&amp;/gi,"&");return A}function toggleById(D,B,A){var C=document.getElementById(D);if(B){return toggleByObject(C,B,A)}else{toggleByObject(C,null,A)}}function toggleByIdSpan(C,D){var B=toggleById(D,true);var A=C.getElementsByTagName("span");if(B){A[0].style.display="none";A[1].style.display=""}else{A[0].style.display="";A[1].style.display="none"}}function toggleByObject(E,B,A){var C=false;var D="block";if(A!=null){D=A}if(E!=null){if(!E.style.display||!E.style.display.toLowerCase().match("none")){E.style.display="none"}else{E.style.display=D;C=true}}if(B){return C}}function trimString(B){B=B.replace(/^\s+/g,"").replace(/\s+$/g,"");var A=B.charCodeAt(0);while(A==160){B=B.substring(1,B.length);A=B.charCodeAt(0)}A=B.charCodeAt(B.length-1);while(A==160){B=B.substring(0,B.length-1);A=B.charCodeAt(B.length-1)}return B}String.prototype.trim=trimString;var Viewport={frame:function(){var A,B;if(self.innerHeight){A=self.innerWidth;B=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){A=document.documentElement.clientWidth;B=document.documentElement.clientHeight}else{if(document.body){A=document.body.clientWidth;B=document.body.clientHeight}}}return(new Coordinate(A,B))},scroll:function(){var A,B;if(self.pageYOffset){A=self.pageXOffset;B=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollLeft;B=document.documentElement.scrollTop}else{if(document.body){A=document.body.scrollLeft;B=document.body.scrollTop}}}return(new Coordinate(A,B))},page:function(){var A,D;var C=document.body.scrollHeight;var B=document.body.offsetHeight;if(C>B){A=document.body.scrollWidth;D=document.body.scrollHeight}else{A=document.body.offsetWidth;D=document.body.offsetHeight}return(new Coordinate(A,D))}};var ZINDEX={ALERT:100,CHAT_BOX:11,DRAG_ITEM:10,DRAG_ARROW:9};function changeBackground(B,C){var A;if(is_safari){A=self.innerWidth}else{A=document.body.clientWidth}if(C!=null){if(A<=1024){document.body.style.backgroundImage="url("+B+"."+C+")"}else{if(A>1024&&A<=1280){document.body.style.backgroundImage="url("+B+"-1280."+C+")"}else{if(A>1280){document.body.style.backgroundImage="url("+B+"-1600."+C+")"}}}}}var DragLink={create:function(B,A){B.dragId=$(A);B.clickLink=B.href;B.href="javascript:void(0)";B.onclick=DragLink.onLinkClick},onLinkClick:function(){if(this.dragId.wasClicked){if(is_ie){setTimeout('window.location = "'+this.clickLink+'";',0)}else{window.location=this.clickLink}}}};var DynamicSelect={create:function(A,D,E,F,C){var B=new Object();B["callback"]=F;B["target"]=E;D.onchange=function(){loadPage(A,(C?(C+"&"):"")+"sourceValue="+this.value,DynamicSelect.returnFunction,B)}},returnFunction:function(xmlHttpReq,returnObj){var select;var target=returnObj["target"];var callback=returnObj["callback"];try{select=eval("("+xmlHttpReq.responseText+")")}catch(err){}target.length=0;if(select.options.length>0){target.disabled=false;var options=select.options;for(var i=0;i<options.length;i++){target.options[i]=new Option(options[i].name,options[i].value)}}else{target.disabled=true}if(callback!=null){callback()}}};var LiferayDock={MODE:{EXPAND:0,COLLAPSE:1},ORDER:[0,1,4,5,2,8,6,9,3,12,10,7,13,11,14,15],FRAME_C:0.08,cached:null,count:0,constants:null,defaultText:"",defaultTimer:0,defaultTimeout:0,dock:null,dockIcons:null,modeTimer:0,dockCoords:new Array(),debug:function(){$("dock_debug").innerHTML=this.dockCoords.toSource()},initialize:function(H){var L=new Array();this.dockCoords[0]=new Array();this.dockCoords[1]=new Array();for(var C=0;C<4;C++){for(var B=0;B<4;B++){var D=new Object();var I=B*(-54);var G=C*(54);var E=Math.sqrt(I*I+G*G);D.h=E;D.x=I;D.y=G;D.lastFrame=E*this.FRAME_C;if(E){D.sin=G/E;D.cos=I/E}L.push(D)}}for(var C=0;C<16;C++){LiferayDock.dockCoords[0][C]=new Array();LiferayDock.dockCoords[1][C]=new Array()}var K=this;var J=$("portal-dock");var F=document.getElementsByClassName("portal-dock-box",J);var M=F.length;this.dock=J;this.dockIcons=F;this.constants=L;this.defaultText=H||"";J.onmouseover=this.expand.bindAsEventListener(this);J.onmouseout=this.collapse.bindAsEventListener(this);F.each(function(O,N){O.onmouseout=K.collapse.bindAsEventListener(K);O.constants=K.constants[K.ORDER[N]];O.style.zIndex=M-N});var A=$("portal-dock-my-places");A.getElementsByTagName("table")[0].onmouseover=function(){MyPlaces.show();this.onmouseover=function(){}};this.cached=LiferayDockCached},setMode:function(A){this.direction=A;if(!this.timer){this.timer=setTimeout("LiferayDock.animate()",1);clearTimeout(this.defaultTimer);if(A==LiferayDock.MODE.COLLAPSE){this.defaultTimer=setTimeout('LiferayDock.showText("'+this.defaultText+'", 0)',this.defaultTimeout)}}},showText:function(C,A){var B=$("portal-dock-text");this.showObject(B);B.innerHTML=C;this.defaultTimeout=(A||1)*1000},showObject:function(C,A){C=$(C);var B=new Array();B.push($("portal-dock-text"));B.push($("portal-dock-my-places"));B.push($("portal-dock-search"));B.each(function(D){if(C.id==D.id){D.style.display=""}else{D.style.display="none"}});if(C.id=="portal-dock-my-places"){C.getElementsByTagName("table")[0].onmouseover=function(){MyPlaces.show();this.onmouseover=function(){}}}this.defaultTimeout=(A||0)*1000},collapse:function(){if(this.modeTimer){clearTimeout(this.modeTimer)}this.modeTimer=setTimeout("LiferayDock.setMode(LiferayDock.MODE.COLLAPSE)",200)},expand:function(A){if(this.modeTimer){clearTimeout(this.modeTimer)}this.modeTimer=setTimeout("LiferayDock.setMode(LiferayDock.MODE.EXPAND)",100)},animate:function(D){var E=(this.direction==this.MODE.COLLAPSE);var C=this.count;var A=false;var B=this.cached;this.dockIcons.each(function(I,G){if(I.constants.h){if(C<=I.constants.lastFrame){if(!B){var H=C/I.constants.lastFrame;var J=I.constants.h*H;var F}if(E){if(B){I.style.left=B[1][G][C][0]+"px";I.style.top=B[1][G][C][1]+"px"}else{F=Math.PI/2;distRatio=1+Math.sin((H*F)-(Math.PI/2));I.style.left=(distRatio*(I.constants.x))+"px";I.style.top=(distRatio*(I.constants.y))+"px"}}else{if(B){I.style.left=B[0][G][C][0]+"px";I.style.top=B[0][G][C][1]+"px"}else{F=Math.PI/2+Math.PI/8;distRatio=Math.sin(H*F);I.style.left=(distRatio*(I.constants.x/Math.sin(F)))+"px";I.style.top=(distRatio*(I.constants.y/Math.sin(F)))+"px"}}A=true}else{I.style.left=I.constants.x+"px";I.style.top=I.constants.y+"px"}}});if(E&&C>0){this.count--;this.timer=setTimeout("LiferayDock.animate()",30)}else{if(!E&&A){this.count++;this.timer=setTimeout("LiferayDock.animate()",30)}else{this.timer=0}}}};var LayoutColumns={columns:new Array(),highlight:"transparent",layoutMaximized:"",plid:"",doAsUserId:"",arrow:null,displayArrow:function(F,E,D){var C=LayoutColumns.arrow;if(!C){C=new Object();var B=document.createElement("div");B.style.zIndex=ZINDEX.DRAG_ARROW;B.style.display="none";B.className="layout-column-arrow-up";var A=document.createElement("div");A.style.zIndex=ZINDEX.DRAG_ARROW;A.style.display="none";A.className="layout-column-arrow-down";document.body.appendChild(B);document.body.appendChild(A);C.up=B;C.down=A;LayoutColumns.arrow=C}if(F=="up"){C.up.style.top=D+"px";C.up.style.left=E+"px";C.up.style.display="";C.down.style.display="none"}else{if(F=="down"){C.down.style.top=D+"px";C.down.style.left=E+"px";C.down.style.display="";C.up.style.display="none"}else{if(F=="none"){C.down.style.display="none";C.up.style.display="none"}}}},init:function(D){for(var B=0;B<D.length;B++){var C=$("layout-column_"+D[B]);if(C){C.columnId=D[B];DropZone.add(C,{accept:["portlet-boundary"],onDrop:LayoutColumns.onDrop,onHoverOver:LayoutColumns.onHoverOver,onHoverOut:function(){LayoutColumns.displayArrow("none")},inheritParent:true});LayoutColumns.columns.push(C,{onDrop:LayoutColumns.onDrop});var A=document.getElementsByClassName("portlet-boundary",C);A.each(function(F,E){if(!F.isStatic){LayoutColumns.initPortlet(F)}})}}},initPortlet:function(B){B=$(B);var A=document.getElementsByClassName("portlet-header-bar",B)[0]||document.getElementsByClassName("portlet-title-default",B)[0];if(A){A.style.cursor="move";DragDrop.create(B,{revert:true,handle:A,ghosting:true,highlightDropzones:LayoutColumns.highlight})}},onDrop:function(J){var B=this;var A=B.dropItem;var F=A.childNodes;var D=null;J.dragOptions.clone.isStatic="yes";for(var G=0;G<F.length;G++){var H=F[G];if(H.className&&Element.hasClassName(H,"portlet-boundary")){if(!H.isStatic){var E=Coordinates.northwestOffset(H,true);var I=E.y+(H.offsetHeight/2);if(mousePos.y<I){D=H;break}}else{if(H.isStatic.match("end")){D=H;break}}}}Element.remove(J);A.insertBefore(J,D);J.dragOptions.revert=false;J.style.position="";J.style.left="";J.style.top="";J.style.height="";J.style.width="100%";var C=0;for(var G=0;G<F.length;G++){var H=F[G];if(H.className&&Element.hasClassName(H,"portlet-boundary")){if(!H.isStatic){if(H==J){break}C++}}}LayoutColumns.displayArrow("none");movePortlet(LayoutColumns.plid,J.portletId,A.columnId,C,LayoutColumns.doAsUserId)},onHoverOver:function(N){var C=this;var B=C.dropItem;var H=B.childNodes;var E=null;var A=true;var F;var K;for(var I=0;I<H.length;I++){var J=H[I];if(J.className&&Element.hasClassName(J,"portlet-boundary")){if(!J.isStatic){K=J;F=mousePos.insideObject(J,true);if(F){var M=J.offsetHeight/2;if(F.y<=M||J==N.dragOptions.clone){A=false}else{A=true}E=J;break}}else{if(J.isStatic.match("end")){E=J;break}}}}var L;var D;if(E){D=F.nwOffset.x+20;if(A){L=F.nwOffset.y+E.offsetHeight-50;LayoutColumns.displayArrow("down",D,L)}else{L=F.nwOffset.y;LayoutColumns.displayArrow("up",D,L)}}else{if(K){var G=Coordinates.northwestOffset(K,true);L=G.y+K.offsetHeight-50;D=G.x+20;LayoutColumns.displayArrow("down",D,L)}else{var G=Coordinates.northwestOffset(B,true);L=G.y;D=G.x+20;LayoutColumns.displayArrow("up",D,L)}}}};var Navigation={params:new Object(),lastMoved:null,reordered:null,addPage:function(){var B=Navigation.params;var A=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=add&groupId="+B.groupId+"&private="+B.isPrivate+"&parent="+B.parent+"&mainPath="+encodeURIComponent(themeDisplay.getPathMain())+"&doAsUserId="+themeDisplay.getDoAsUserIdEncoded();AjaxUtil.request(A,{onComplete:function(D){var C=$J(D.responseText);window.location=C.url+"&newPage=1"}})},removePage:function(){var C=$("layout-tab-selected");var A=$("layout-tab-text-edit").innerHTML;var D=Navigation.params;if(confirm("Remove "+A+'"?')){var B=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=delete&ownerId="+D.ownerId+"&layoutId="+D.layoutId;AjaxUtil.request(B,{onComplete:function(){window.location=themeDisplay.getURLHome()}})}},init:function(C){Navigation.params=C;QuickEdit.create("layout-tab-text-edit",{dragId:"layout-tab-selected",fixParent:true,onEdit:function(D,G){var E=D.parentNode;var F=document.createElement("a");F.innerHTML="X";F.href="javascript:Navigation.removePage()";F.className="layout-tab-close";E.className="layout-tab-text-editing";D.style.width=(G+20)+"px";Element.addClassName(D,"layout-tab-input");E.insertBefore(F,D)},onComplete:function(G,D){var F=G.parentNode;var I=document.getElementsByClassName("layout-tab-close",F);var K=I[I.length-1];var H=G.innerHTML;F.className="layout-tab-text";if(H==""){G.innerHTML=H="(UNTITLED)"}K.style.display="none";if(D!=H){var J=Navigation.params;var E=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=title&title="+encodeURIComponent(H)+"&ownerId="+J.ownerId+"&language="+J.language+"&layoutId="+J.layoutId;AjaxUtil.request(E)}}});DropZone.add("layout-nav-container",{accept:["layout-tab"],onHoverOver:Navigation.onDrag,onDrop:Navigation.onDrop});var A=document.getElementsByClassName("layout-tab",$("layout-nav-container"));A.each(function(G,E){var F=G.getElementsByTagName("a");if(F.length>0){F[0].style.cursor="pointer"}DragDrop.create(G,{forceDrop:true,revert:true});G.layoutId=Navigation.params.layoutIds[E];G.style.cursor="move";var D=G.getElementsByTagName("a");if(D.length>0){DragLink.create(D[0],G)}});if(Navigation.params.newPage){var B=$("layout-tab-text-edit").editOptions;$(B.dragId).wasClicked=true;QuickEdit.edit($("layout-tab-text-edit"))}},move:function(D,G,F){var B=document.getElementsByClassName("layout-tab",$("layout-nav-container"));var A=D;var E=document.getElementById("layout-nav-container");var C;Element.remove(A);if(G>F){C=B[F]}else{if(F==B.length-1){C=$("layout-tab-add")}else{C=B[F+1]}}E.insertBefore(A,C)},onDrag:function(D){var A=D.dragOptions;var F=A.clone;var C=-1;var E=-1;F.layoutId=D.layoutId;var B=document.getElementsByClassName("layout-tab","layout-nav-container");B.each(function(H,G){if(H==F){C=G}if(mousePos.insideObject(H,true)){if(H!=F){if(H!=Navigation.lastMoved){E=G;Navigation.lastMoved=H}}else{Navigation.lastMoved=null}}});if(C>=0&&E>=0){Navigation.move(F,C,E)}},onDrop:function(D){tabs=document.getElementsByClassName("layout-tab",$("layout-nav-container"));var C=new Array();for(var B=0;B<tabs.length;B++){C[B]=tabs[B].layoutId}Navigation.reordered=C;if(Navigation.reordered){var C=Navigation.reordered;var E=Navigation.params;var A=themeDisplay.getPathMain()+"/layout_management/update_page?cmd=reorder&ownerId="+E.ownerId+"&parent="+E.parent+"&layoutIds="+C.concat(Navigation.params.hiddenIds);AjaxUtil.request(A)}}};var PortletHeaderBar={fadeIn:function(C){var B=document.getElementById(C);if(B==null){return }if(B.startOut){clearTimeout(B.timerOut);B.timerOut=0}B.startOut=false;B.startIn=true;B.opac+=20;for(var A=0;A<B.iconList.length;A++){Element.changeOpacity(B.iconList[A],B.opac)}B.iconBar.style.display="block";if(B.opac<100){B.timerIn=setTimeout('PortletHeaderBar.fadeIn("'+C+'")',50)}else{B.timerIn=0;B.startIn=false}},fadeOut:function(C){var B=document.getElementById(C);if(B==null){return }if(B.startIn){clearTimeout(B.timerIn);B.timerIn=0}B.startIn=false;B.startOut=true;B.opac-=20;for(var A=0;A<B.iconList.length;A++){Element.changeOpacity(B.iconList[A],B.opac)}B.iconBar.style.display="block";if(B.opac>0){B.timerOut=setTimeout('PortletHeaderBar.fadeOut("'+C+'")',50)}else{B.iconBar.style.display="none";B.timerOut=0;B.startOut=false}},init:function(A){if(!A.iconBar){A.iconBar=document.getElementsByClassName("portlet-small-icon-bar",A)[0]}if(!A.iconList){A.iconList=A.iconBar.getElementsByTagName("img")}},hide:function(B){var A=document.getElementById(B);if(A.timerIn&&!A.startIn){clearTimeout(A.timerIn);A.timerIn=0}if(!A.startOut&&A.opac>0){if(A.timerOut){clearTimeout(A.timerOut);A.timerOut=0}this.init(A);A.timerOut=setTimeout('PortletHeaderBar.fadeOut("'+B+'")',150)}},show:function(B){var A=document.getElementById(B);if(A.timerOut&&!A.startOut){clearTimeout(A.timerOut);A.timerOut=0}if(!A.startIn&&(!A.opac||A.opac<100)){if(!A.opac){A.opac=0}if(A.timerIn){clearTimeout(A.timerIn);A.timerIn=0}this.init(A);A.timerIn=setTimeout('PortletHeaderBar.fadeIn("'+B+'")',150)}}};var PhotoSlider=Class.create();PhotoSlider.prototype={initialize:function(C,A,E,B,D){this.TOTAL_FRAMES=20;this.count=0;this.page=0;this.timer=0;this.start=0;this.photos=$(E);this.photos.style.position="relative";this.photos.style.left="0px";this.slidingWindow=$(C);this.windowWidth=A;this.totalPages=B;this.varName=D},animate:function(){if(this.count<=this.TOTAL_FRAMES){var B=this.count/this.TOTAL_FRAMES;var A=Math.sin(B*(Math.PI/2));var C=-(this.page*this.windowWidth)-this.start;this.photos.style.left=this.start+(C*A);this.count++;this.timer=setTimeout(this.varName+".animate()",30)}else{this.timer=0}},left:function(){this.start=parseInt(this.photos.style.left);if(this.page>0){this.page--;this.count=0;if(!this.timer){this.timer=setTimeout(this.varName+".animate()",30)}}},right:function(){this.start=parseInt(this.photos.style.left);if(this.page<(this.totalPages-1)){this.page++;this.count=0;if(!this.timer){this.timer=setTimeout(this.varName+".animate()",30)}}}};var Tabs={show:function(C,D,E){var B=document.getElementById(C+E+"TabsId");if(B){B.className="current"}B=document.getElementById(C+E+"TabsSection");if(B){B.style.display="block"}for(var A=0;(D.length>1)&&(A<D.length);A++){if(E!=D[A]){B=document.getElementById(C+D[A]+"TabsId");if(B){B.className="none"}B=document.getElementById(C+D[A]+"TabsSection");if(B){B.style.display="none"}}}}};var QuickEdit={inputList:new LinkedList(),create:function(C,A){var B=$(C);B.editOptions=A;B.onclick=function(){QuickEdit.edit(this)};B.style.cursor="text"},edit:function(A){var D=A.editOptions||new Object();var H=true;var G=false;if(D.dragId){H=$(D.dragId).wasClicked}if(D.inputType&&D.inputType=="textarea"){G=true}if(!A.editing&&H){var C;var B=A.parentNode;if(G){C=document.createElement("textarea")}else{C=document.createElement("input")}if(D.fixParent){B.style.width=B.offsetWidth+"px"}C.className="portlet-form-input-field";C.value=toText(A.innerHTML);C.textObj=A;C.onmouseover=function(){document.onclick=function(){}};C.onmouseout=function(){document.onclick=function(){QuickEdit.inputList.each(QuickEdit.onDone)}};C.onkeydown=function(I){if(!G&&Event.enterPressed(I)){QuickEdit.inputList.each(QuickEdit.onDone)}};var F=A.offsetWidth;var E=A.offsetHeight;A.style.display="none";B.appendChild(C);if(D.onEdit){D.onEdit(C,F,E)}C.focus();QuickEdit.inputList.add(C);if(D.dragId){$(D.dragId).disableDrag=true}A.editing=true}},onDone:function(D){if(D){document.onclick=function(){};var B=D.textObj;var C=B.parentNode;var F=toHTML(D.value);var A=B.innerHTML;var E=B.editOptions;B.innerHTML=F;if(E.onComplete){E.onComplete(B,A)}Element.remove(D);B.style.display="";B.editing=false;if(E.dragId){$(E.dragId).disableDrag=false}if(E.fixParent){C.style.width="auto"}QuickEdit.inputList.remove(D)}}};var StarRating=Class.create();StarRating.prototype={initialize:function(C,B){this.options=B||new Object();this.rating=this.options.rating||0;C=$(C);this.stars=$A(C.getElementsByTagName("img"));var A=this;if(!this.options.displayOnly){C.onmouseout=this.onHoverOut.bindAsEventListener(this);this.stars.each(function(E,D){E.index=D+1;E.onclick=A.onClick.bindAsEventListener(A);E.onmouseover=A.onHoverOver.bindAsEventListener(A)})}this.display(this.rating,"rating")},display:function(C,E){var A=this;C=C==null?this.rating:C;var D=Math.floor(C);var B=C-D;this.stars.each(function(G,F){if(F<D){if(E=="hover"){G.src=G.src.replace(/\bstar_.*\./,"star_hover.")}else{G.src=G.src.replace(/\bstar_.*\./,"star_on.")}}else{if(B<0.25){G.src=G.src.replace(/\bstar_.*\./,"star_off.")}else{if(B<0.5){G.src=G.src.replace(/\bstar_.*\./,"star_on_quarter.")}else{if(B<0.75){G.src=G.src.replace(/\bstar_.*\./,"star_on_half.")}else{if(B<1){G.src=G.src.replace(/\bstar_.*\./,"star_on_threequarters.")}}}}B=0}})},onHoverOver:function(A){var B=Event.element(A);this.display(B.index,"hover")},onHoverOut:function(A){this.display()},onClick:function(B){var C=Event.element(B);var A=C.index;this.rating=A;if(this.options.onComplete){this.options.onComplete(A)}this.display(A)}};var ToolTip={current:null,opacity:100,show:function(A,D,E){A=A||window.event;var C=D;var B=ToolTip.current;C.onmouseout=ToolTip.hide;if(!B){var B=document.createElement("div");B.className="portal-tool-tip";B.style.position="absolute";B.style.cursor="default";document.body.appendChild(B);ToolTip.current=B}B.innerHTML=E;B.style.display="";B.style.top=(Event.pointerY(A)-15)+"px";B.style.left=(Event.pointerX(A)+15)+"px"},hide:function(A){if(ToolTip.current){ToolTip.current.style.display="none"}},fadeOut:function(){if(ToolTip.current){var B=ToolTip.current;var A=ToolTip.opacity;if(A>0&&A<100){ToolTip.opacity-=20;Element.changeOpacity(B,ToolTip.opacity);ToolTip.timeout=setTimeout("ToolTip.fadeOut()",30)}else{Element.changeOpacity(B,100);if(A<=0){ToolTip.current.style.display="none"}}}}};var LiferayDockCached=[[[],[[-0,0],[-26,0],[-46,0],[-57,0],[-57,0]],[[-0,0],[-0,26],[-0,46],[-0,57],[-0,57]],[[-0,0],[-18,18],[-35,35],[-48,48],[-56,56],[-58,58],[-55,55]],[[-0,0],[-26,0],[-51,0],[-74,0],[-92,0],[-106,0],[-114,0],[-117,0],[-113,0]],[[-0,0],[-0,26],[-0,51],[-0,74],[-0,92],[-0,106],[-0,114],[-0,117],[-0,113]],[[-0,0],[-24,12],[-46,23],[-67,33],[-85,42],[-99,50],[-110,55],[-116,58],[-117,58],[-113,57]],[[-0,0],[-12,24],[-23,46],[-33,67],[-42,85],[-50,99],[-55,110],[-58,116],[-58,117],[-57,113]],[[-0,0],[-26,0],[-52,0],[-77,0],[-100,0],[-120,0],[-138,0],[-153,0],[-164,0],[-172,0],[-175,0],[-175,0],[-170,0]],[[-0,0],[-0,26],[-0,52],[-0,77],[-0,100],[-0,120],[-0,138],[-0,153],[-0,164],[-0,172],[-0,175],[-0,175],[-0,170]],[[-0,0],[-19,19],[-37,37],[-54,54],[-70,70],[-84,84],[-96,96],[-105,105],[-112,112],[-116,116],[-117,117],[-115,115],[-110,110]],[[-0,0],[-25,8],[-50,17],[-73,24],[-95,32],[-115,38],[-133,44],[-148,49],[-160,53],[-169,56],[-174,58],[-175,58],[-173,58],[-168,56]],[[-0,0],[-8,25],[-17,50],[-24,73],[-32,95],[-38,115],[-44,133],[-49,148],[-53,160],[-56,169],[-58,174],[-58,175],[-58,173],[-56,168]],[[-0,0],[-22,15],[-44,29],[-65,43],[-85,56],[-103,69],[-120,80],[-135,90],[-148,99],[-159,106],[-167,111],[-172,115],[-175,117],[-175,117],[-172,115],[-166,111]],[[-0,0],[-15,22],[-29,44],[-43,65],[-56,85],[-69,103],[-80,120],[-90,135],[-99,148],[-106,159],[-111,167],[-115,172],[-117,175],[-117,175],[-115,172],[-111,166]],[[-0,0],[-19,19],[-37,37],[-55,55],[-73,73],[-89,89],[-105,105],[-120,120],[-133,133],[-144,144],[-154,154],[-162,162],[-168,168],[-173,173],[-175,175],[-175,175],[-174,174],[-170,170],[-164,164]]],[[],[[-0,0],[-4,0],[-14,0],[-29,0],[-48,0]],[[-0,0],[-0,4],[-0,14],[-0,29],[-0,48]],[[-0,0],[-2,2],[-7,7],[-15,15],[-26,26],[-39,39],[-52,52]],[[-0,0],[-2,0],[-7,0],[-16,0],[-27,0],[-42,0],[-58,0],[-76,0],[-95,0]],[[-0,0],[-0,2],[-0,7],[-0,16],[-0,27],[-0,42],[-0,58],[-0,76],[-0,95]],[[-0,0],[-1,1],[-6,3],[-13,6],[-22,11],[-34,17],[-47,24],[-63,31],[-79,40],[-96,48]],[[-0,0],[-1,1],[-3,6],[-6,13],[-11,22],[-17,34],[-24,47],[-31,63],[-40,79],[-48,96]],[[-0,0],[-1,0],[-5,0],[-11,0],[-19,0],[-29,0],[-41,0],[-55,0],[-70,0],[-87,0],[-105,0],[-124,0],[-143,0]],[[-0,0],[-0,1],[-0,5],[-0,11],[-0,19],[-0,29],[-0,41],[-0,55],[-0,70],[-0,87],[-0,105],[-0,124],[-0,143]],[[-0,0],[-1,1],[-4,4],[-8,8],[-14,14],[-22,22],[-31,31],[-41,41],[-52,52],[-65,65],[-78,78],[-91,91],[-105,105]],[[-0,0],[-1,0],[-4,1],[-10,3],[-17,6],[-26,9],[-37,12],[-50,17],[-64,21],[-79,26],[-96,32],[-113,38],[-131,44],[-150,50]],[[-0,0],[-0,1],[-1,4],[-3,10],[-6,17],[-9,26],[-12,37],[-17,50],[-21,64],[-26,79],[-32,96],[-38,113],[-44,131],[-50,150]],[[-0,0],[-1,1],[-3,2],[-7,5],[-13,9],[-20,13],[-29,19],[-39,26],[-50,33],[-62,42],[-76,50],[-90,60],[-105,70],[-120,80],[-136,91],[-153,102]],[[-0,0],[-1,1],[-2,3],[-5,7],[-9,13],[-13,20],[-19,29],[-26,39],[-33,50],[-42,62],[-50,76],[-60,90],[-70,105],[-80,120],[-91,136],[-102,153]],[[-0,0],[-1,1],[-2,2],[-5,5],[-9,9],[-15,15],[-21,21],[-28,28],[-37,37],[-46,46],[-56,56],[-67,67],[-78,78],[-91,91],[-103,103],[-116,116],[-130,130],[-144,144],[-157,157]]]];function AjaxRequest(C,K){var E;var B=K;var G=B.returnArgs;var A=B.method;var I=B.ajaxId;if(window.XMLHttpRequest){E=new XMLHttpRequest();if(E.overrideMimeType){E.overrideMimeType("text/html")}}else{if(window.ActiveXObject){try{E=new ActiveXObject("Msxml2.XMLHTTP")}catch(H){try{E=new ActiveXObject("Microsoft.XMLHTTP")}catch(H){try{E=new XMLHttpRequest()}catch(H){}}}}}var D=B.onComplete;var J=function(){if(E.readyState==4){try{if(E.status==200){var L=E.getResponseHeader("Ajax-ID");if(D){D(E,G)}if(L&&L!=""){AjaxUtil.remove(parseInt(L))}}}catch(M){}}};var F=function(M){var L=M.split("?");var P=L[0];var N=L[1];try{if(A=="get"){E.open("GET",M,true);E.onreadystatechange=J;E.send("")}else{E.open("POST",P,true);E.setRequestHeader("Method","POST "+P+" HTTP/1.1");E.setRequestHeader("Content-Type","application/x-www-form-urlencoded");E.setRequestHeader("Ajax-ID",I);E.onreadystatechange=J;E.send(N)}}catch(O){}};F(C);this.resend=function(M,L){B=L;D=B.onComplete;F(M)};this.getId=function(){return I};this.cleanUp=function(){E.onreadystatechange=function(){};J=null;G=null;E=null}}var AjaxUtil={counter:1,requests:new Array(),request:function(C,B){var E=(B==null)?(new Object()):B;var A=(E.reverseAjax)?0:AjaxUtil.getNextId();E.ajaxId=A;var D;if(A==0&&AjaxUtil.requests[0]){D=AjaxUtil.requests[0];D.resend(C,E)}else{D=new AjaxRequest(C,E);AjaxUtil.requests[A]=D}if(!E.onComplete){AjaxUtil.remove(A)}},update:function(B,E,A){if(parent){parent.resetSession()}else{resetSession()}var C=$(E);if(C){if(document.getElementById(C.id+"_loadingAnimation")){document.getElementById(C.id+"_loadingAnimation").style.display="block"}if($("wcp_main")&&$("wcp_main").style.display=="block"){showTripSuitcase(false)}B=B+getInactivePortletQueryString(B);if(A==null){A=new Object()}var D=A.onComplete;A.onComplete=function(G,F){if(document.getElementById(C.id+"_loadingAnimation")){document.getElementById(C.id+"_loadingAnimation").style.display="none"}C.innerHTML="<div id='"+C.id+"_loadingAnimation' style='display:none;position:absolute;background-color:#FFFFFF;z-index:9999'><img src='/html/css/images/loading_animation.gif'/></div>"+G.responseText;executeLoadedScript(C);if(D){D()}};AjaxUtil.request(B,A)}},getNextId:function(){var A=AjaxUtil.counter++;if(AjaxUtil.counter>20){AjaxUtil.counter=1}return A},remove:function(B){if(B){var A=AjaxUtil.requests[B];if(A){A.cleanUp();A=null}}}};var ReverseAjax={initialize:function(){Event.observe(window,"unload",function(){ReverseAjax.release()});ReverseAjax.request()},request:function(){AjaxUtil.request(themeDisplay.getPathMain()+"/portal/reverse_ajax",{onComplete:ReverseAjax.response,reverseAjax:true})},response:function(C){var B=$J(C.responseText);var A=B.status;if(A&&A!="failure"){if(A=="success"){if(B.chatMessages){Messaging.getChatsReturn(B.chatMessages)}if(B.chatRoster){MessagingRoster.getEntriesReturn(B.chatRoster)}}ReverseAjax.request()}},release:function(){AjaxUtil.request(themeDisplay.getPathMain()+"/portal/reverse_ajax?release=1",{reverseAjax:true})}};function $J(JSONText){return eval("("+JSONText+")")}function executeLoadedScript(el){var scripts=el.getElementsByTagName("script");for(var i=0;i<scripts.length;i++){if(scripts[i].src){var head=document.getElementsByTagName("head")[0];var scriptObj=document.createElement("script");scriptObj.setAttribute("type","text/javascript");scriptObj.setAttribute("src",scripts[i].src);head.appendChild(scriptObj)}else{try{if(scripts[i]){if(is_safari){eval(scripts[i].innerHTML)}else{if(is_mozilla){eval(scripts[i].textContent)}else{eval(scripts[i].text)}}}}catch(e){}}}}function loadForm(B,C,D,H){var G=C.indexOf("?");var I=C;var A="";if(G!=-1){I=C.substring(0,G);A=C.substring(G+1,C.length)}if(!endsWith(A,"&")){A+="&"}for(var E=0;E<B.elements.length;E++){var F=B.elements[E];if((F.name!=null)&&(F.value!=null)){A+=F.name+"="+encodeURIComponent(F.value)+"&"}}if(D!=null){document.body.style.cursor="wait";G=I.indexOf("/portal/layout");I=I.substring(0,G)+"/portal/render_portlet";H=function(J){document.getElementById(D).innerHTML=J.responseText;document.body.style.cursor="default"}}loadPage(I,A,H)}function loadPage(C,D,B,A){AjaxUtil.request(C+"?"+D,{onComplete:B,returnArgs:A})}function printJSON(A){if(A&&A.id){var B=document.getElementById(A.id);if(B){B.innerHTML=A.toString()}}}var Alerts={background:null,message:null,messageArray:new Array(),fadeTimer:0,OPACITY:51,STEPS:3,bgFadeIn:function(A,B,C){var D=Alerts.background;var E=A/B;if(C==null){C=E}if(D&&C<=A){Element.changeOpacity(D,C);C+=E;setTimeout("Alerts.bgFadeIn("+A+","+B+","+C+")",0)}},bgFadeOut:function(A,B,C){var D=Alerts.background;if(D){var E=A/B;if(C==null){C=A-E}if(C>=0){Element.changeOpacity(D,C);C-=E;setTimeout("Alerts.bgFadeOut("+A+","+B+","+C+")",0)}else{D.parentNode.removeChild(D);setSelectVisibility("visible",Alerts.message);Alerts.background=null}}},createWrapper:function(H,A){var E=document.createElement("div");var I=document.createElement("div");var G=document.createElement("table");var D=document.createElement("a");E.className="pop-up-outer";E.align="center";I.className="pop-up-inner";D.innerHTML="Close";D.href="javascript:Alerts.killAlert()";G.className="pop-up-header";G.border=0;G.width="100%";G.cellSpacing=0;G.cellPadding=0;G.insertRow(0);var F=G.rows[0];F.insertCell(0);F.insertCell(1);var C=F.cells[0];var B=F.cells[1];C.className="pop-up-title";C.width="99%";if(A){C.innerHTML=A}B.className="pop-up-close";B.width="1%";B.innerHTML='<a href="javascript:void(0)" onclick="Alerts.killAlert(this)"><img border="0" src="'+themeDisplay.getPathThemeImage()+'/portlet/close.gif"/></a>';I.appendChild(G);I.appendChild(H);E.appendChild(I);H.wrapper=E;Drag.makeDraggable(E,C);return E},killAlert:function(E){if(E){var F=E;while(F.parentNode){if(F.className&&F.className.match("pop-up-outer")){break}F=F.parentNode}var A=document.getElementsByTagName("body")[0];var B=F.options;var C=null;var D=false;Alerts.remove(F);A.removeChild(F);if(Alerts.messageArray.length>0){Alerts.message=Alerts.messageArray[Alerts.messageArray.length-1];Alerts.message.style.zIndex=ZINDEX.ALERT+1;setSelectVisibility("visible",Alerts.message);C=F.background}else{Alerts.message=null;C=Alerts.background}if(C){Alerts.bgFadeOut(Alerts.OPACITY,Alerts.STEPS)}if(B&&B.onClose){B.onClose()}}},fireMessageBox:function(L){var F=document.body;if(!L){L=new Object()}var I=L.modal;var K=L.message;var E=L.height;var D=L.width;var G=L.noCenter;var H=L.title;var J=document.createElement("div");J.align="left";var B=Alerts.createWrapper(J,H);B.style.position="absolute";B.style.top=0;B.style.left=0;B.style.zIndex=ZINDEX.ALERT+1;B.options=L;if(K){J.innerHTML=K}else{J.innerHTML='<div class="portlet-loading"></div>'}if(E){if(is_ie){J.style.height=E+"px"}else{J.style.minHeight=E+"px"}}if(D){B.style.width=D+"px"}if(!Alerts.background&&I){var A=document.createElement("div");A.id="alert-message";A.style.position="absolute";A.style.top="0";A.style.left="0";A.style.zIndex=ZINDEX.ALERT;Alerts.background=A;B.background=A;A.style.backgroundColor="#000000";Element.changeOpacity(A,0);F.appendChild(A);Alerts.bgFadeIn(Alerts.OPACITY,Alerts.STEPS)}setSelectVisibility("hidden");if(Alerts.messageArray.length>0){var C=Alerts.messageArray[Alerts.messageArray.length-1];C.style.zIndex=ZINDEX.ALERT-1;setSelectVisibility("hidden",C)}setSelectVisibility("visibile",J);Alerts.message=J;Alerts.messageArray.push(B);Alerts.resize();Event.observe(window,"resize",Alerts.resize);if(G){Alerts.center()}else{Alerts.center(E,D)}Event.observe(window,"resize",Alerts.center);F.appendChild(B);window.focus();return J},popupIframe:function(B,A){var F=A.height;var E=A.width;var D=Alerts.fireMessageBox(A);var C=document.createElement("iframe");D.height="";C.src=B;C.frameBorder=0;if(E){C.style.width="100%"}D.appendChild(C);if(!A.noCenter){Alerts.center(F,E)}return D},center:function(B,C){if(Alerts.message){var D=Alerts.message.wrapper;var A=document.getElementsByTagName("body")[0];var G=D.centerMode;if(!G){if(B&&C){G=D.centerMode="xy"}else{if(B&&!C){G=D.centerMode="y"}else{if(!B&&C){G=D.centerMode="x"}else{G=D.centerMode="none"}}}}C=C||D.offsetWidth;B=B||D.offsetHeight;var F;var E;if(!is_safari){var F=(A.clientWidth-C)/2;var E=A.scrollTop+((A.clientHeight-B)/2)}else{var F=(A.offsetWidth-C)/2;var E=(A.offsetHeight-B)/2}if(G=="xy"||G=="y"){D.style.top=E+"px"}else{D.style.top=(A.scrollTop+20)+"px"}if(G=="xy"||G=="x"){D.style.left=F+"px"}else{D.style.left="20px"}}},resize:function(){if(Alerts.background){var C=Alerts.background;var A=document.getElementsByTagName("body")[0];if(!is_safari){var D=A.scrollHeight;var B=A.clientHeight;C.style.height=(D>B?D:B)+"px";C.style.width="100%"}else{C.style.height=A.offsetHeight+"px";C.style.width=A.offsetWidth+"px"}}},resizeIframe:function(A){if(Alerts.message&&A){var B=Alerts.message.getElementsByTagName("iframe")[0];var C=document.getElementsByClassName("portlet-loading",Alerts.message);if(C.length>0){C[0].parentNode.removeChild(C[0])}if(B){if(A.height){B.height=A.height}if(A.width){B.width=A.width}}}Alerts.resize()},remove:function(C){var A=Alerts.messageArray;for(var B=0;B<A.length;B++){if(A[B]==C){A.splice(B,1);break}}}};if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(L,B,M,D,H,J,F,E,C,K,I){if(!document.getElementById){return }this.DETECT_KEY=I?I:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(L){this.setAttribute("swf",L)}if(B){this.setAttribute("id",B)}if(M){this.setAttribute("width",M)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(J){this.addParam("bgcolor",J)}var A=E?E:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",F);this.setAttribute("doExpressInstall",false);var G=(C)?C:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(K){this.setAttribute("redirectUrl",K)}};deconcept.SWFObject.prototype={setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(B,A){this.params[B]=A},getParams:function(){return this.params},addVariable:function(B,A){this.variables[B]=A},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var C=new Array();var B;var A=this.getVariables();for(B in A){C.push(B+"="+A[B])}return C},getSWFHTML:function(){var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}B='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';B+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var F=this.getParams();for(var E in F){B+=[E]+'="'+F[E]+'" '}var D=this.getVariablePairs().join("&");if(D.length>0){B+='flashvars="'+D+'"'}B+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}B='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';B+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var E in C){B+='<param name="'+E+'" value="'+C[E]+'" />'}var A=this.getVariablePairs().join("&");if(A.length>0){B+='<param name="flashvars" value="'+A+'" />'}B+="</object>"}return B},write:function(B){if(this.getAttribute("useExpressInstall")){var A=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof B=="string")?document.getElementById(B):B;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var D=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){D=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(C){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");D=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(C){if(D.major==6){return D}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(C){}}if(B!=null){D=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}return D};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(A){var D=document.location.search||document.location.hash;if(D){var C=D.substring(1).split("&");for(var B=0;B<C.length;B++){if(C[B].substring(0,C[B].indexOf("="))==A){return C[B].substring((C[B].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return }var C=document.getElementsByTagName("OBJECT");for(var B=0;B<C.length;B++){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var A=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();A()}}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload()}}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload}if(Array.prototype.push==null){Array.prototype.push=function(A){this[this.length]=A;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;Calendar=function(D,C,F,A){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=F||null;this.onClose=A||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof D=="number"?D:Calendar._FD;this.showsOtherMonths=false;this.dateStr=C;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined"){Calendar._SDN_len=3}var B=new Array();for(var E=8;E>0;){B[--E]=Calendar._DN[E].substr(0,Calendar._SDN_len)}Calendar._SDN=B;if(typeof Calendar._SMN_len=="undefined"){Calendar._SMN_len=3}B=new Array();for(var E=12;E>0;){B[--E]=Calendar._MN[E].substr(0,Calendar._SMN_len)}Calendar._SMN=B}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(E){var A=0,D=0;var C=/^div$/i.test(E.tagName);if(C&&E.scrollLeft){A=E.scrollLeft}if(C&&E.scrollTop){D=E.scrollTop}var F={x:E.offsetLeft-A,y:E.offsetTop-D};if(E.offsetParent){var B=this.getAbsolutePos(E.offsetParent);F.x+=B.x;F.y+=B.y}return F};Calendar.isRelated=function(C,A){var E=A.relatedTarget;if(!E){var B=A.type;if(B=="mouseover"){E=A.fromElement}else{if(B=="mouseout"){E=A.toElement}}}while(E){if(E==C){return true}try{E=E.parentNode}catch(D){E=null}}return false};Calendar.removeClass=function(E,D){if(!(E&&E.className)){return }var A=E.className.split(" ");var B=new Array();for(var C=A.length;C>0;){if(A[--C]!=D){B[B.length]=A[C]}}E.className=B.join(" ")};Calendar.addClass=function(B,A){Calendar.removeClass(B,A);B.className+=" "+A};Calendar.getElement=function(A){var B=Calendar.is_ie?window.event.srcElement:A.currentTarget;while(B.nodeType!=1||/^div$/i.test(B.tagName)){B=B.parentNode}return B};Calendar.getTargetElement=function(A){var B=Calendar.is_ie?window.event.srcElement:A.target;while(B.nodeType!=1){B=B.parentNode}return B};Calendar.stopEvent=function(A){A||(A=window.event);if(Calendar.is_ie){A.cancelBubble=true;A.returnValue=false}else{A.preventDefault();A.stopPropagation()}return false};Calendar.addEvent=function(A,C,B){if(A.attachEvent){A.attachEvent("on"+C,B)}else{if(A.addEventListener){A.addEventListener(C,B,true)}else{A["on"+C]=B}}};Calendar.removeEvent=function(A,C,B){if(A.detachEvent){A.detachEvent("on"+C,B)}else{if(A.removeEventListener){A.removeEventListener(C,B,true)}else{A["on"+C]=null}}};Calendar.createElement=function(C,B){var A=null;if(document.createElementNS){A=document.createElementNS("http://www.w3.org/1999/xhtml",C)}else{A=document.createElement(C)}if(typeof B!="undefined"){B.appendChild(A)}return A};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true)}}};Calendar.findMonth=function(A){if(typeof A.month!="undefined"){return A}else{if(typeof A.parentNode.month!="undefined"){return A.parentNode}}return null};Calendar.findYear=function(A){if(typeof A.year!="undefined"){return A}else{if(typeof A.parentNode.year!="undefined"){return A.parentNode}}return null};Calendar.showMonthsCombo=function(){var E=Calendar._C;if(!E){return false}var E=E;var F=E.activeDiv;var D=E.monthsCombo;if(E.hilitedMonth){Calendar.removeClass(E.hilitedMonth,"hilite")}if(E.activeMonth){Calendar.removeClass(E.activeMonth,"active")}var C=E.monthsCombo.getElementsByTagName("div")[E.date.getMonth()];Calendar.addClass(C,"active");E.activeMonth=C;var B=D.style;B.display="block";if(F.navtype<0){B.left=F.offsetLeft+"px"}else{var A=D.offsetWidth;if(typeof A=="undefined"){A=50}B.left=(F.offsetLeft+F.offsetWidth-A)+"px"}B.top=(F.offsetTop+F.offsetHeight)+"px"};Calendar.showYearsCombo=function(D){var A=Calendar._C;if(!A){return false}var A=A;var C=A.activeDiv;var F=A.yearsCombo;if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}if(A.activeYear){Calendar.removeClass(A.activeYear,"active")}A.activeYear=null;var B=A.date.getFullYear()+(D?1:-1);var I=F.firstChild;var H=false;for(var E=12;E>0;--E){if(B>=A.minYear&&B<=A.maxYear){I.innerHTML=B;I.year=B;I.style.display="block";H=true}else{I.style.display="none"}I=I.nextSibling;B+=D?A.yearStep:-A.yearStep}if(H){var J=F.style;J.display="block";if(C.navtype<0){J.left=C.offsetLeft+"px"}else{var G=F.offsetWidth;if(typeof G=="undefined"){G=50}J.left=(C.offsetLeft+C.offsetWidth-G)+"px"}J.top=(C.offsetTop+C.offsetHeight)+"px"}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false}if(cal.timeout){clearTimeout(cal.timeout)}var el=cal.activeDiv;if(!el){return false}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev)}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler()}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler()}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev)}};Calendar.tableMouseOver=function(M){var A=Calendar._C;if(!A){return }var C=A.activeDiv;var I=Calendar.getTargetElement(M);if(I==C||I.parentNode==C){Calendar.addClass(C,"hilite active");Calendar.addClass(C.parentNode,"rowhilite")}else{if(typeof C.navtype=="undefined"||(C.navtype!=50&&(C.navtype==0||Math.abs(C.navtype)>2))){Calendar.removeClass(C,"active")}Calendar.removeClass(C,"hilite");Calendar.removeClass(C.parentNode,"rowhilite")}M||(M=window.event);if(C.navtype==50&&I!=C){var L=Calendar.getAbsolutePos(C);var O=C.offsetWidth;var N=M.clientX;var P;var K=true;if(N>L.x+O){P=N-L.x-O;K=false}else{P=L.x-N}if(P<0){P=0}var F=C._range;var H=C._current;var G=Math.floor(P/10)%F.length;for(var E=F.length;--E>=0;){if(F[E]==H){break}}while(G-->0){if(K){if(--E<0){E=F.length-1}}else{if(++E>=F.length){E=0}}}var B=F[E];C.innerHTML=B;A.onUpdateTime()}var D=Calendar.findMonth(I);if(D){if(D.month!=A.date.getMonth()){if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}Calendar.addClass(D,"hilite");A.hilitedMonth=D}else{if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}}}else{if(A.hilitedMonth){Calendar.removeClass(A.hilitedMonth,"hilite")}var J=Calendar.findYear(I);if(J){if(J.year!=A.date.getFullYear()){if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}Calendar.addClass(J,"hilite");A.hilitedYear=J}else{if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}}}else{if(A.hilitedYear){Calendar.removeClass(A.hilitedYear,"hilite")}}}return Calendar.stopEvent(M)};Calendar.tableMouseDown=function(A){if(Calendar.getTargetElement(A)==Calendar.getElement(A)){return Calendar.stopEvent(A)}};Calendar.calDragIt=function(B){var C=Calendar._C;if(!(C&&C.dragging)){return false}var E;var D;if(Calendar.is_ie){D=window.event.clientY+document.body.scrollTop;E=window.event.clientX+document.body.scrollLeft}else{E=B.pageX;D=B.pageY}C.hideShowCovered();var A=C.element.style;A.left=(E-C.xOffs)+"px";A.top=(D-C.yOffs)+"px";return Calendar.stopEvent(B)};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev)}cal.hideShowCovered()};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300){with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver)}else{addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver)}addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp)}}else{if(cal.isPopup){cal._dragStart(ev)}}if(el.navtype==-1||el.navtype==1){if(cal.timeout){clearTimeout(cal.timeout)}cal.timeout=setTimeout("Calendar.showMonthsCombo()",250)}else{if(el.navtype==-2||el.navtype==2){if(cal.timeout){clearTimeout(cal.timeout)}cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250)}else{cal.timeout=null}}return Calendar.stopEvent(ev)};Calendar.dayMouseDblClick=function(A){Calendar.cellClick(Calendar.getElement(A),A||window.event);if(Calendar.is_ie){document.selection.empty()}};Calendar.dayMouseOver=function(B){var A=Calendar.getElement(B);if(Calendar.isRelated(A,B)||Calendar._C||A.disabled){return false}if(A.ttip){if(A.ttip.substr(0,1)=="_"){A.ttip=A.caldate.print(A.calendar.ttDateFormat)+A.ttip.substr(1)}A.calendar.tooltips.innerHTML=A.ttip}if(A.navtype!=300){Calendar.addClass(A,"hilite");if(A.caldate){Calendar.addClass(A.parentNode,"rowhilite")}}return Calendar.stopEvent(B)};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled){return false}removeClass(el,"hilite");if(el.caldate){removeClass(el.parentNode,"rowhilite")}if(el.calendar){el.calendar.tooltips.innerHTML=_TT["SEL_DATE"]}return stopEvent(ev)}};Calendar.cellClick=function(E,N){var C=E.calendar;var H=false;var K=false;var F=null;if(typeof E.navtype=="undefined"){if(C.currentDateEl){Calendar.removeClass(C.currentDateEl,"selected");Calendar.addClass(E,"selected");H=(C.currentDateEl==E);if(!H){C.currentDateEl=E}}C.date.setDateOnly(E.caldate);F=C.date;var B=!(C.dateClicked=!E.otherMonth);if(!B&&!C.currentDateEl){C._toggleMultipleDate(new Date(F))}else{K=!E.disabled}if(B){C._init(C.firstDayOfWeek,F)}}else{if(E.navtype==200){Calendar.removeClass(E,"hilite");C.callCloseHandler();return }F=new Date(C.date);if(E.navtype==0){F.setDateOnly(new Date())}C.dateClicked=false;var M=F.getFullYear();var G=F.getMonth();function A(Q){var R=F.getDate();var P=F.getMonthDays(Q);if(R>P){F.setDate(P)}F.setMonth(Q)}switch(E.navtype){case 400:Calendar.removeClass(E,"hilite");var O=Calendar._TT["ABOUT"];if(typeof O!="undefined"){O+=C.showsTime?Calendar._TT["ABOUT_TIME"]:""}else{O='Help and about box text is not translated into this language.\nIf you know this language and you feel generous please update\nthe corresponding file in "lang" subdir to match calendar-en.js\nand send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\nThank you!\nhttp://dynarch.com/mishoo/calendar.epl\n'}alert(O);return ;case -2:if(M>C.minYear){F.setFullYear(M-1)}break;case -1:if(G>0){A(G-1)}else{if(M-->C.minYear){F.setFullYear(M);A(11)}}break;case 1:if(G<11){A(G+1)}else{if(M<C.maxYear){F.setFullYear(M+1);A(0)}}break;case 2:if(M<C.maxYear){F.setFullYear(M+1)}break;case 100:C.setFirstDayOfWeek(E.fdow);return ;case 50:var J=E._range;var L=E.innerHTML;for(var I=J.length;--I>=0;){if(J[I]==L){break}}if(N&&N.shiftKey){if(--I<0){I=J.length-1}}else{if(++I>=J.length){I=0}}var D=J[I];E.innerHTML=D;C.onUpdateTime();return ;case 0:if((typeof C.getDateStatus=="function")&&C.getDateStatus(F,F.getFullYear(),F.getMonth(),F.getDate())){return false}break}if(!F.equalsTo(C.date)){C.setDate(F);K=true}else{if(E.navtype==0){K=H=true}}}if(K){N&&C.callHandler()}if(H){Calendar.removeClass(E,"hilite");N&&C.callCloseHandler()}};Calendar.prototype.create=function(L){var K=null;if(!L){K=document.getElementsByTagName("body")[0];this.isPopup=true}else{K=L;this.isPopup=false}this.date=this.dateStr?new Date(this.dateStr):new Date();var O=Calendar.createElement("table");this.table=O;O.cellSpacing=0;O.cellPadding=0;O.calendar=this;Calendar.addEvent(O,"mousedown",Calendar.tableMouseDown);var A=Calendar.createElement("div");this.element=A;A.className="calendar";if(this.isPopup){A.style.position="absolute";A.style.display="none"}A.appendChild(O);var I=Calendar.createElement("thead",O);var M=null;var P=null;var B=this;var E=function(S,R,Q){M=Calendar.createElement("td",P);M.colSpan=R;M.className="button";if(Q!=0&&Math.abs(Q)<=2){M.className+=" nav"}Calendar._add_evs(M);M.calendar=B;M.navtype=Q;M.innerHTML="<div unselectable='on'>"+S+"</div>";return M};P=Calendar.createElement("tr",I);var C=6;(this.isPopup)&&--C;(this.weekNumbers)&&++C;E("?",1,400).ttip=Calendar._TT["INFO"];this.title=E("",C,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";E("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"]}P=Calendar.createElement("tr",I);P.className="headrow";this._nav_py=E("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=E("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=E(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=E("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=E("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];P=Calendar.createElement("tr",I);P.className="daynames";if(this.weekNumbers){M=Calendar.createElement("td",P);M.className="name wn";M.innerHTML=Calendar._TT["WK"]}for(var H=7;H>0;--H){M=Calendar.createElement("td",P);if(!H){M.navtype=100;M.calendar=this;Calendar._add_evs(M)}}this.firstdayname=(this.weekNumbers)?P.firstChild.nextSibling:P.firstChild;this._displayWeekdays();var G=Calendar.createElement("tbody",O);this.tbody=G;for(H=6;H>0;--H){P=Calendar.createElement("tr",G);if(this.weekNumbers){M=Calendar.createElement("td",P)}for(var F=7;F>0;--F){M=Calendar.createElement("td",P);M.calendar=this;Calendar._add_evs(M)}}if(this.showsTime){P=Calendar.createElement("tr",G);P.className="time";M=Calendar.createElement("td",P);M.className="time";M.colSpan=2;M.innerHTML=Calendar._TT["TIME"]||"&nbsp;";M=Calendar.createElement("td",P);M.className="time";M.colSpan=this.weekNumbers?4:3;(function(){function T(c,e,d,f){var a=Calendar.createElement("span",M);a.className=c;a.innerHTML=e;a.calendar=B;a.ttip=Calendar._TT["TIME_PART"];a.navtype=50;a._range=[];if(typeof d!="number"){a._range=d}else{for(var b=d;b<=f;++b){var Z;if(b<10&&f>=10){Z="0"+b}else{Z=""+b}a._range[a._range.length]=Z}}Calendar._add_evs(a);return a}var X=B.date.getHours();var Q=B.date.getMinutes();var Y=!B.time24;var R=(X>12);if(Y&&R){X-=12}var V=T("hour",X,Y?1:0,Y?12:23);var U=Calendar.createElement("span",M);U.innerHTML=":";U.className="colon";var S=T("minute",Q,0,59);var W=null;M=Calendar.createElement("td",P);M.className="time";M.colSpan=2;if(Y){W=T("ampm",R?"pm":"am",["am","pm"])}else{M.innerHTML="&nbsp;"}B.onSetTime=function(){var a,Z=this.date.getHours(),b=this.date.getMinutes();if(Y){a=(Z>=12);if(a){Z-=12}if(Z==0){Z=12}W.innerHTML=a?"pm":"am"}V.innerHTML=(Z<10)?("0"+Z):Z;S.innerHTML=(b<10)?("0"+b):b};B.onUpdateTime=function(){var a=this.date;var b=parseInt(V.innerHTML,10);if(Y){if(/pm/i.test(W.innerHTML)&&b<12){b+=12}else{if(/am/i.test(W.innerHTML)&&b==12){b=0}}}var c=a.getDate();var Z=a.getMonth();var e=a.getFullYear();a.setHours(b);a.setMinutes(parseInt(S.innerHTML,10));a.setFullYear(e);a.setMonth(Z);a.setDate(c);this.dateClicked=false;this.callHandler()}})()}else{this.onSetTime=this.onUpdateTime=function(){}}var J=Calendar.createElement("tfoot",O);P=Calendar.createElement("tr",J);P.className="footrow";M=E(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);M.className="ttip";if(this.isPopup){M.ttip=Calendar._TT["DRAG_TO_MOVE"];M.style.cursor="move"}this.tooltips=M;A=Calendar.createElement("div",this.element);this.monthsCombo=A;A.className="combo";for(H=0;H<Calendar._MN.length;++H){var D=Calendar.createElement("div");D.className=Calendar.is_ie?"label-IEfix":"label";D.month=H;D.innerHTML=Calendar._SMN[H];A.appendChild(D)}A=Calendar.createElement("div",this.element);this.yearsCombo=A;A.className="combo";for(H=12;H>0;--H){var N=Calendar.createElement("div");N.className=Calendar.is_ie?"label-IEfix":"label";A.appendChild(N)}this._init(this.firstDayOfWeek,this.date);K.appendChild(this.element)};Calendar._keyEvent=function(L){var A=window._dynarch_popupCalendar;if(!A||A.multiple){return false}(Calendar.is_ie)&&(L=window.event);var I=(Calendar.is_ie||L.type=="keypress"),M=L.keyCode;if(L.ctrlKey){switch(M){case 37:I&&Calendar.cellClick(A._nav_pm);break;case 38:I&&Calendar.cellClick(A._nav_py);break;case 39:I&&Calendar.cellClick(A._nav_nm);break;case 40:I&&Calendar.cellClick(A._nav_ny);break;default:return false}}else{switch(M){case 32:Calendar.cellClick(A._nav_now);break;case 27:I&&A.callCloseHandler();break;case 37:case 38:case 39:case 40:if(I){var E,N,J,G,C,D;E=M==37||M==38;D=(M==37||M==39)?1:7;function B(){C=A.currentDateEl;var K=C.pos;N=K&15;J=K>>4;G=A.ar_days[J][N]}B();function F(){var K=new Date(A.date);K.setDate(K.getDate()-D);A.setDate(K)}function H(){var K=new Date(A.date);K.setDate(K.getDate()+D);A.setDate(K)}while(1){switch(M){case 37:if(--N>=0){G=A.ar_days[J][N]}else{N=6;M=38;continue}break;case 38:if(--J>=0){G=A.ar_days[J][N]}else{F();B()}break;case 39:if(++N<7){G=A.ar_days[J][N]}else{N=0;M=40;continue}break;case 40:if(++J<A.ar_days.length){G=A.ar_days[J][N]}else{H();B()}break}break}if(G){if(!G.disabled){Calendar.cellClick(G)}else{if(E){F()}else{H()}}}}break;case 13:if(I){Calendar.cellClick(A.currentDateEl,L)}break;default:return false}}return Calendar.stopEvent(L)};Calendar.prototype._init=function(L,V){var U=new Date(),P=U.getFullYear(),X=U.getMonth(),B=U.getDate();this.table.style.visibility="hidden";var H=V.getFullYear();if(H<this.minYear){H=this.minYear;V.setFullYear(H)}else{if(H>this.maxYear){H=this.maxYear;V.setFullYear(H)}}this.firstDayOfWeek=L;this.date=new Date(V);var W=V.getMonth();var Z=V.getDate();var Y=V.getMonthDays();V.setDate(1);var Q=(V.getDay()-this.firstDayOfWeek)%7;if(Q<0){Q+=7}V.setDate(-Q);V.setDate(V.getDate()+1);var E=this.tbody.firstChild;var J=Calendar._SMN[W];var N=this.ar_days=new Array();var M=Calendar._TT["WEEKEND"];var D=this.multiple?(this.datesCells={}):null;for(var S=0;S<6;++S,E=E.nextSibling){var A=E.firstChild;if(this.weekNumbers){A.className="day wn";A.innerHTML=V.getWeekNumber();A=A.nextSibling}E.className="daysrow";var T=false,F,C=N[S]=[];for(var R=0;R<7;++R,A=A.nextSibling,V.setDate(F+1)){F=V.getDate();var G=V.getDay();A.className="day";A.pos=S<<4|R;C[R]=A;var K=(V.getMonth()==W);if(!K){if(this.showsOtherMonths){A.className+=" othermonth";A.otherMonth=true}else{A.className="emptycell";A.innerHTML="&nbsp;";A.disabled=true;continue}}else{A.otherMonth=false;T=true}A.disabled=false;A.innerHTML=this.getDateText?this.getDateText(V,F):F;if(D){D[V.print("%Y%m%d")]=A}if(this.getDateStatus){var O=this.getDateStatus(V,H,W,F);if(this.getDateToolTip){var I=this.getDateToolTip(V,H,W,F);if(I){A.title=I}}if(O===true){A.className+=" disabled";A.disabled=true}else{if(/disabled/i.test(O)){A.disabled=true}A.className+=" "+O}}if(!A.disabled){A.caldate=new Date(V);A.ttip="_";if(!this.multiple&&K&&F==Z&&this.hiliteToday){A.className+=" selected";this.currentDateEl=A}if(V.getFullYear()==P&&V.getMonth()==X&&F==B){A.className+=" today";A.ttip+=Calendar._TT["PART_TODAY"]}if(M.indexOf(G.toString())!=-1){A.className+=A.otherMonth?" oweekend":" weekend"}}}if(!(T||this.showsOtherMonths)){E.className="emptyrow"}}this.title.innerHTML=Calendar._MN[W]+", "+H;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates()};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var B in this.multiple){var A=this.datesCells[B];var C=this.multiple[B];if(!C){continue}if(A){A.className+=" selected"}}}};Calendar.prototype._toggleMultipleDate=function(B){if(this.multiple){var C=B.print("%Y%m%d");var A=this.datesCells[C];if(A){var D=this.multiple[C];if(!D){Calendar.addClass(A,"selected");this.multiple[C]=B}else{Calendar.removeClass(A,"selected");delete this.multiple[C]}}}};Calendar.prototype.setDateToolTipHandler=function(A){this.getDateToolTip=A};Calendar.prototype.setDate=function(A){if(!A.equalsTo(this.date)){this._init(this.firstDayOfWeek,A)}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date)};Calendar.prototype.setFirstDayOfWeek=function(A){this._init(A,this.date);this._displayWeekdays()};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(A){this.getDateStatus=A};Calendar.prototype.setRange=function(A,B){this.minYear=A;this.maxYear=B};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat))}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this)}this.hideShowCovered()};Calendar.prototype.destroy=function(){var A=this.element.parentNode;A.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null};Calendar.prototype.reparent=function(B){var A=this.element;A.parentNode.removeChild(A);B.appendChild(A)};Calendar._checkCalendar=function(B){var C=window._dynarch_popupCalendar;if(!C){return false}var A=Calendar.is_ie?Calendar.getElement(B):Calendar.getTargetElement(B);for(;A!=null&&A!=C.element;A=A.parentNode){}if(A==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(B)}};Calendar.prototype.show=function(){var E=this.table.getElementsByTagName("tr");for(var D=E.length;D>0;){var F=E[--D];Calendar.removeClass(F,"rowhilite");var C=F.getElementsByTagName("td");for(var B=C.length;B>0;){var A=C[--B];Calendar.removeClass(A,"hilite");Calendar.removeClass(A,"active")}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar)}this.hideShowCovered()};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar)}this.element.style.display="none";this.hidden=true;this.hideShowCovered()};Calendar.prototype.showAt=function(A,C){var B=this.element.style;B.left=A+"px";B.top=C+"px";this.show()};Calendar.prototype.showAtElement=function(C,D){var A=this;var E=Calendar.getAbsolutePos(C);if(!D||typeof D!="string"){this.showAt(E.x,E.y+C.offsetHeight);return true}function B(I){if(I.x<0){I.x=0}if(I.y<0){I.y=0}var J=document.createElement("div");var H=J.style;H.position="absolute";H.right=H.bottom=H.width=H.height="0px";document.body.appendChild(J);var G=Calendar.getAbsolutePos(J);document.body.removeChild(J);if(Calendar.is_ie){G.y+=document.body.scrollTop;G.x+=document.body.scrollLeft}else{G.y+=window.scrollY;G.x+=window.scrollX}var F=I.x+I.width-G.x;if(F>0){I.x-=F}F=I.y+I.height-G.y;if(F>0){I.y-=F}}this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var F=A.element.offsetWidth;var H=A.element.offsetHeight;A.element.style.display="none";var G=D.substr(0,1);var I="l";if(D.length>1){I=D.substr(1,1)}switch(G){case"T":E.y-=H;break;case"B":E.y+=C.offsetHeight;break;case"C":E.y+=(C.offsetHeight-H)/2;break;case"t":E.y+=C.offsetHeight-H;break;case"b":break}switch(I){case"L":E.x-=F;break;case"R":E.x+=C.offsetWidth;break;case"C":E.x+=(C.offsetWidth-F)/2;break;case"l":E.x+=C.offsetWidth-F;break;case"r":break}E.width=F;E.height=H+40;A.monthsCombo.style.display="none";B(E);A.showAt(E.x,E.y)};if(Calendar.is_khtml){setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10)}else{Calendar.continuation_for_the_fucking_khtml_browser()}};Calendar.prototype.setDateFormat=function(A){this.dateFormat=A};Calendar.prototype.setTtDateFormat=function(A){this.ttDateFormat=A};Calendar.prototype.parseDate=function(B,A){if(!A){A=this.dateFormat}this.setDate(Date.parseDate(B,A))};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera){return }function B(R){var Q=R.style.visibility;if(!Q){if(document.defaultView&&typeof (document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml){Q=document.defaultView.getComputedStyle(R,"").getPropertyValue("visibility")}else{Q=""}}else{if(R.currentStyle){Q=R.currentStyle.visibility}else{Q=""}}}return Q}var P=new Array("applet","iframe","select");var C=this.element;var A=Calendar.getAbsolutePos(C);var F=A.x;var D=C.offsetWidth+F;var O=A.y;var N=C.offsetHeight+O;for(var H=P.length;H>0;){var G=document.getElementsByTagName(P[--H]);var E=null;for(var J=G.length;J>0;){E=G[--J];A=Calendar.getAbsolutePos(E);var M=A.x;var L=E.offsetWidth+M;var K=A.y;var I=E.offsetHeight+K;if(this.hidden||(M>D)||(L<F)||(K>N)||(I<O)){if(!E.__msh_save_visibility){E.__msh_save_visibility=B(E)}E.style.visibility=E.__msh_save_visibility}else{if(!E.__msh_save_visibility){E.__msh_save_visibility=B(E)}E.style.visibility="hidden"}}}};Calendar.prototype._displayWeekdays=function(){var B=this.firstDayOfWeek;var A=this.firstdayname;var D=Calendar._TT["WEEKEND"];for(var C=0;C<7;++C){A.className="day name";var E=(C+B)%7;if(C){A.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[E]);A.navtype=100;A.calendar=this;A.fdow=E;Calendar._add_evs(A)}if(D.indexOf(E.toString())!=-1){Calendar.addClass(A,"weekend")}A.innerHTML=Calendar._SDN[(C+B)%7];A=A.nextSibling}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none"};Calendar.prototype._dragStart=function(ev){if(this.dragging){return }this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd)}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(G,A){var H=new Date();var I=0;var B=-1;var F=0;var K=G.split(/\W+/);var J=A.match(/%./g);var E=0,D=0;var L=0;var C=0;for(E=0;E<K.length;++E){if(!K[E]){continue}switch(J[E]){case"%d":case"%e":F=parseInt(K[E],10);break;case"%m":B=parseInt(K[E],10)-1;break;case"%Y":case"%y":I=parseInt(K[E],10);(I<100)&&(I+=(I>29)?1900:2000);break;case"%b":case"%B":for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,K[E].length).toLowerCase()==K[E].toLowerCase()){B=D;break}}break;case"%H":case"%I":case"%k":case"%l":L=parseInt(K[E],10);break;case"%P":case"%p":if(/pm/i.test(K[E])&&L<12){L+=12}else{if(/am/i.test(K[E])&&L>=12){L-=12}}break;case"%M":C=parseInt(K[E],10);break}}if(isNaN(I)){I=H.getFullYear()}if(isNaN(B)){B=H.getMonth()}if(isNaN(F)){F=H.getDate()}if(isNaN(L)){L=H.getHours()}if(isNaN(C)){C=H.getMinutes()}if(I!=0&&B!=-1&&F!=0){return new Date(I,B,F,L,C,0)}I=0;B=-1;F=0;for(E=0;E<K.length;++E){if(K[E].search(/[a-zA-Z]+/)!=-1){var M=-1;for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,K[E].length).toLowerCase()==K[E].toLowerCase()){M=D;break}}if(M!=-1){if(B!=-1){F=B+1}B=M}}else{if(parseInt(K[E],10)<=12&&B==-1){B=K[E]-1}else{if(parseInt(K[E],10)>31&&I==0){I=parseInt(K[E],10);(I<100)&&(I+=(I>29)?1900:2000)}else{if(F==0){F=K[E]}}}}}if(I==0){I=H.getFullYear()}if(B!=-1&&F!=0){return new Date(I,B,F,L,C,0)}return H};Date.prototype.getMonthDays=function(B){var A=this.getFullYear();if(typeof B=="undefined"){B=this.getMonth()}if(((0==(A%4))&&((0!=(A%100))||(0==(A%400))))&&B==1){return 29}else{return Date._MD[B]}};Date.prototype.getDayOfYear=function(){var A=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var C=new Date(this.getFullYear(),0,0,0,0,0);var B=A-C;return Math.floor(B/Date.DAY)};Date.prototype.getWeekNumber=function(){var C=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var B=C.getDay();C.setDate(C.getDate()-(B+6)%7+3);var A=C.valueOf();C.setMonth(0);C.setDate(4);return Math.round((A-C.valueOf())/(7*86400000))+1};Date.prototype.equalsTo=function(A){return((this.getFullYear()==A.getFullYear())&&(this.getMonth()==A.getMonth())&&(this.getDate()==A.getDate())&&(this.getHours()==A.getHours())&&(this.getMinutes()==A.getMinutes()))};Date.prototype.setDateOnly=function(A){var B=new Date(A);this.setDate(1);this.setFullYear(B.getFullYear());this.setMonth(B.getMonth());this.setDate(B.getDate())};Date.prototype.print=function(I){var A=this.getMonth();var H=this.getDate();var J=this.getFullYear();var L=this.getWeekNumber();var M=this.getDay();var Q={};var N=this.getHours();var B=(N>=12);var F=(B)?(N-12):N;var P=this.getDayOfYear();if(F==0){F=12}var C=this.getMinutes();var G=this.getSeconds();Q["%a"]=Calendar._SDN[M];Q["%A"]=Calendar._DN[M];Q["%b"]=Calendar._SMN[A];Q["%B"]=Calendar._MN[A];Q["%C"]=1+Math.floor(J/100);Q["%d"]=(H<10)?("0"+H):H;Q["%e"]=H;Q["%H"]=(N<10)?("0"+N):N;Q["%I"]=(F<10)?("0"+F):F;Q["%j"]=(P<100)?((P<10)?("00"+P):("0"+P)):P;Q["%k"]=N;Q["%l"]=F;Q["%m"]=(A<9)?("0"+(1+A)):(1+A);Q["%M"]=(C<10)?("0"+C):C;Q["%n"]="\n";Q["%p"]=B?"PM":"AM";Q["%P"]=B?"pm":"am";Q["%s"]=Math.floor(this.getTime()/1000);Q["%S"]=(G<10)?("0"+G):G;Q["%t"]="\t";Q["%U"]=Q["%W"]=Q["%V"]=(L<10)?("0"+L):L;Q["%u"]=M+1;Q["%w"]=M;Q["%y"]=(""+J).substr(2,2);Q["%Y"]=J;Q["%%"]="%";var O=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml){return I.replace(O,function(R){return Q[R]||R})}var K=I.match(O);for(var E=0;E<K.length;E++){var D=Q[K[E]];if(D){O=new RegExp(K[E],"g");I=I.replace(O,D)}}return I};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(B){var A=new Date(this);A.__msh_oldSetFullYear(B);if(A.getMonth()!=this.getMonth()){this.setDate(28)}this.__msh_oldSetFullYear(B)};window._dynarch_popupCalendar=null;Calendar.setup=function(G){function F(H,I){if(typeof G[H]=="undefined"){G[H]=I}}F("inputField",null);F("displayArea",null);F("button",null);F("eventName","click");F("ifFormat","%Y/%m/%d");F("daFormat","%Y/%m/%d");F("singleClick",true);F("disableFunc",null);F("dateStatusFunc",G["disableFunc"]);F("dateText",null);F("firstDay",null);F("align","Br");F("range",[1900,2999]);F("weekNumbers",true);F("flat",null);F("flatCallback",null);F("onSelect",null);F("onClose",null);F("onUpdate",null);F("date",null);F("showsTime",false);F("timeFormat","24");F("electric",true);F("step",2);F("position",null);F("cache",false);F("showOthers",false);F("multiple",null);var C=["inputField","displayArea","button"];for(var B in C){if(typeof G[C[B]]=="string"){G[C[B]]=document.getElementById(G[C[B]])}}if(!(G.flat||G.multiple||G.inputField||G.displayArea||G.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false}function A(I){var H=I.params;var J=(I.dateClicked||H.electric);if(J&&H.inputField){H.inputField.value=I.date.print(H.ifFormat);if(typeof H.inputField.onchange=="function"){H.inputField.onchange()}}if(J&&H.displayArea){H.displayArea.innerHTML=I.date.print(H.daFormat)}if(J&&typeof H.onUpdate=="function"){H.onUpdate(I)}if(J&&H.flat){if(typeof H.flatCallback=="function"){H.flatCallback(I)}}if(J&&H.singleClick&&I.dateClicked){I.callCloseHandler()}}if(G.flat!=null){if(typeof G.flat=="string"){G.flat=document.getElementById(G.flat)}if(!G.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false}var E=new Calendar(G.firstDay,G.date,G.onSelect||A);E.showsOtherMonths=G.showOthers;E.showsTime=G.showsTime;E.time24=(G.timeFormat=="24");E.params=G;E.weekNumbers=G.weekNumbers;E.setRange(G.range[0],G.range[1]);E.setDateStatusHandler(G.dateStatusFunc);E.getDateText=G.dateText;if(G.ifFormat){E.setDateFormat(G.ifFormat)}if(G.inputField&&typeof G.inputField.value=="string"){E.parseDate(G.inputField.value)}E.create(G.flat);E.show();return false}var D=G.button||G.displayArea||G.inputField;D["on"+G.eventName]=function(){var H=G.inputField||G.displayArea;var J=G.inputField?G.ifFormat:G.daFormat;var N=false;var L=window.calendar;if(H){G.date=Date.parseDate(H.value||H.innerHTML,J)}if(!(L&&G.cache)){window.calendar=L=new Calendar(G.firstDay,G.date,G.onSelect||A,G.onClose||function(O){O.hide()});L.showsTime=G.showsTime;L.time24=(G.timeFormat=="24");L.weekNumbers=G.weekNumbers;N=true}else{if(G.date){L.setDate(G.date)}L.hide()}if(G.multiple){L.multiple={};for(var I=G.multiple.length;--I>=0;){var M=G.multiple[I];var K=M.print("%Y%m%d");L.multiple[K]=M}}L.showsOtherMonths=G.showOthers;L.yearStep=G.step;L.setRange(G.range[0],G.range[1]);L.params=G;L.setDateStatusHandler(G.dateStatusFunc);L.getDateText=G.dateText;L.setDateFormat(J);if(N){L.create()}L.refresh();if(!G.position){L.showAtElement(G.button||G.displayArea||G.inputField,G.align)}else{L.showAt(G.position[0],G.position[1])}return false};return E};function ColorPicker(B,F){var K=document.createElement("div");var G=document.createElement("img");var I=document.getElementsByTagName("body")[0];var H=null;var L="";var N=this;K.id="color-picker-div";K.style.height="192px";K.style.width="100px";K.style.position="absolute";K.style.display="none";K.style.cursor="crosshair";K.style.zIndex=1;G.style.height="192px";G.style.width="100px";G.src=B;K.appendChild(G);I.insertBefore(K,I.childNodes[0]);this.hide=function(){K.style.display="none";if(F!=null){F()}};this.toggle=function(P){if(K.style.display=="none"){var O=Coordinates.northwestOffset(P,true);K.style.left=O.x+25+"px";K.style.top=O.y+"px";K.style.display="block";H=P.parentNode.getElementsByTagName("INPUT")[0];L=H.value}else{N.hide()}};var M=function(P,S){var R=Coordinates.northwestOffset(S,true);mousePos.update(P);var W=mousePos.x-R.x;var V=mousePos.y-R.y;var Y=0;var X=0;var Q=0;if(V<=32){Y=255;X=(V/32)*255;Q=0}else{if(V<=64){V=V-32;Y=255-(V/32)*255;X=255;Q=0}else{if(V<=96){V=V-64;Y=0;X=255;Q=(V/32)*255}else{if(V<=128){V=V-96;Y=0;X=255-(V/32)*255;Q=255}else{if(V<=160){V=V-128;Y=(V/32)*255;X=0;Q=255}else{V=V-160;Y=255;X=0;Q=255-(V/32)*255}}}}}if(W<=50){var O=Math.abs(Math.floor(Y*W/50));var T=Math.abs(Math.floor(X*W/50));var U=Math.abs(Math.floor(Q*W/50))}else{W-=50;var O=Math.abs(Math.floor(Y+(W/50)*(255-Y)));var T=Math.abs(Math.floor(X+(W/50)*(255-X)));var U=Math.abs(Math.floor(Q+(W/50)*(255-Q)))}return D(O,T,U)};var D=function(Q,P,O){color="#";color+=E(Math.floor(Q/16));color+=E(Q%16);color+=E(Math.floor(P/16));color+=E(P%16);color+=E(Math.floor(O/16));color+=E(O%16);return color};var E=function(O){return(O).toString(16)};var A=function(P){var O=M(P,G);L=O;H.value=O;N.hide()};var C=function(P){var O=M(P,G);H.value=O;H.onchange()};var J=function(){H.value=L;H.onchange()};G.onmousemove=C;G.onclick=A;G.onmouseout=J}var Coordinates={ORIGIN:new Coordinate(0,0),northwestPosition:function(B){var A=parseInt(B.style.left);var C=parseInt(B.style.top);return new Coordinate(isNaN(A)?0:A,isNaN(C)?0:C)},southeastPosition:function(A){return Coordinates.northwestPosition(A).plus(new Coordinate(A.offsetWidth,A.offsetHeight))},northwestOffset:function(A,C){var D=new Coordinate(A.offsetLeft,A.offsetTop);if(!C){return D}var B=A.offsetParent;while(B){D=D.plus(new Coordinate(B.offsetLeft,B.offsetTop));B=B.offsetParent}return D},southeastOffset:function(A,B){return Coordinates.northwestOffset(A,B).plus(new Coordinate(A.offsetWidth,A.offsetHeight))},fixEvent:function(A){if(typeof A=="undefined"){A=window.event}A.windowCoordinate=new Coordinate(A.clientX,A.clientY);return A}};function Coordinate(A,B){this.x=A;this.y=B}Coordinate.prototype.toString=function(){return"("+this.x+","+this.y+")"};Coordinate.prototype.plus=function(A){return new Coordinate(this.x+A.x,this.y+A.y)};Coordinate.prototype.minus=function(A){return new Coordinate(this.x-A.x,this.y-A.y)};Coordinate.prototype.distance=function(C){var B=this.x-C.x;var A=this.y-C.y;return Math.sqrt(Math.pow(B,2)+Math.pow(A,2))};Coordinate.prototype.max=function(B){var A=Math.max(this.x,B.x);var C=Math.max(this.y,B.y);return new Coordinate(A,C)};Coordinate.prototype.constrain=function(C,B){if(C.x>B.x||C.y>B.y){return this}var A=this.x;var D=this.y;if(C.x!=null){A=Math.max(A,C.x)}if(B.x!=null){A=Math.min(A,B.x)}if(C.y!=null){D=Math.max(D,C.y)}if(B.y!=null){D=Math.min(D,B.y)}return new Coordinate(A,D)};Coordinate.prototype.reposition=function(A){A.style["top"]=this.y+"px";A.style["left"]=this.x+"px"};Coordinate.prototype.equals=function(A){if(this==A){return true}if(!A||A==null){return false}return this.x==A.x&&this.y==A.y};Coordinate.prototype.inside=function(B,A){if((this.x>=B.x)&&(this.x<=A.x)&&(this.y>=B.y)&&(this.y<=A.y)){return true}else{return false}};Coordinate.prototype.insideObject=function(E,C){var B=Coordinates.northwestOffset(E,C);var D=B.plus(new Coordinate(E.offsetWidth,E.offsetHeight));var A=null;if(this.inside(B,D)){A=this.minus(B);A.nwOffset=B;A.seOffset=D}return A};function getMousePos(A){mousePos.update(A)}function MousePos(){}MousePos.prototype=new Coordinate(0,0);MousePos.prototype.update=function(B){B=Coordinates.fixEvent(B);var A=B.windowCoordinate;this.x=A.x;this.y=A.y;if(is_safari){}else{this.x+=document.body.scrollLeft;this.y+=document.body.scrollTop}if(this.x<0){this.x=0}if(this.y<0){this.y=0}return B};var mousePos=new MousePos(0,0);var Drag={group:null,isDragging:false,makeDraggable:function(B,A){if(A==null){B.handle=B}else{B.handle=A}B.handle.group=B;B.minX=null;B.minY=null;B.maxX=null;B.maxY=null;B.threshold=1;B.thresholdY=0;B.thresholdX=0;B.disableDrag=false;B.onDragStart=new Function();B.onDragEnd=new Function();B.onDrag=new Function();B.setAutoCorrect=function(){this.autoCorrect=true};B.setDragHandle=Drag.setDragHandle;B.setDragThreshold=Drag.setDragThreshold;B.setDragThresholdX=Drag.setDragThresholdX;B.setDragThresholdY=Drag.setDragThresholdY;B.constrain=Drag.constrain;B.constrainVertical=Drag.constrainVertical;B.constrainHorizontal=Drag.constrainHorizontal;B.handle.onmousedown=Drag.onMouseDown},constrainVertical:function(){var A=Coordinates.northwestOffset(this,true);this.minX=A.x;this.maxX=A.x},constrainHorizontal:function(){var A=Coordinates.northwestOffset(this,true);this.minY=A.y;this.maxY=A.y},constrain:function(B,A){this.minX=B.x;this.minY=B.y;this.maxX=A.x;this.maxY=A.y},setDragHandle:function(A){if(A&&A!=null){this.handle=A}else{this.handle=this}this.handle.group=this;this.onmousedown=null;this.handle.onmousedown=Drag.onMouseDown},setDragThreshold:function(A){if(isNaN(parseInt(A))){return }this.threshold=A},setDragThresholdX:function(A){if(isNaN(parseInt(A))){return }this.thresholdX=A},setDragThresholdY:function(A){if(isNaN(parseInt(A))){return }this.thresholdY=A},onMouseDown:function(B){B=mousePos.update(B);Drag.group=this.group;var J=this.group;if(J.disableDrag){return }var H=mousePos;var K=Coordinates.northwestPosition(J);var E=Coordinates.northwestOffset(J,true);var A=Coordinates.southeastPosition(J);var I=Coordinates.southeastOffset(J,true);J.originalZIndex=J.style.zIndex;J.mouseNwOffset=H.minus(E);J.mouseSeOffset=H.minus(I);J.mouseStart=new Coordinate(mousePos.x,mousePos.y);J.onDragStart(K,A,E,I);var G;var F;var D;var C;if(J.minX!=null){G=J.minX+J.mouseNwOffset.x}if(J.minY!=null){F=J.minY+J.mouseNwOffset.y}if(J.maxX!=null){D=J.maxX+J.mouseSeOffset.x}if(J.maxY!=null){C=J.maxY+J.mouseSeOffset.y}if(G&&D&&G>D){D=G}if(F&&C&&F>C){C=F}J.mouseMin=new Coordinate(G,F);J.mouseMax=new Coordinate(D,C);document.onmousemove=Drag.onMouseMove;document.onmouseup=Drag.onMouseUp;return false},showStatus:function(B,E,A,C,D){window.status="mouse: "+B.toString()+"	NW pos: "+E.toString()+"	SE pos: "+A.toString()+"	NW offset: "+C.toString()+"	SE offset: "+D.toString()},onMouseMove:function(Q){Q=mousePos.update(Q);var I=Drag.group;var M=mousePos;var L=Coordinates.northwestOffset(I,true);var P=Coordinates.northwestPosition(I);var D=Coordinates.southeastPosition(I);var B=Coordinates.southeastOffset(I,true);var J=20;var O=5;var A=Viewport.scroll().y;var K=Viewport.page().y;var H=Viewport.frame().y;if((A+H+2*J)<K&&mousePos.y>(A+H-J)){window.scroll(0,A+O);P.y+=O}if(A>0&&mousePos.y<(A+J)){window.scroll(0,A-O);P.y-=O}var G=M.constrain(I.mouseMin,I.mouseMax);P=P.plus(G.minus(L).minus(I.mouseNwOffset));if(!Drag.isDragging){if(I.threshold>0){var F=I.mouseStart.distance(M);if(F<I.threshold){return true}}else{if(I.thresholdY>0){var R=Math.abs(I.mouseStart.y-M.y);if(R<I.thresholdY){return true}}else{if(I.thresholdX>0){var S=Math.abs(I.mouseStart.x-M.x);if(S<I.thresholdX){return true}}}}Drag.isDragging=true}P.reposition(I);if(I.autoCorrect){var C=Coordinates.northwestOffset(I,true);I.onDrag(P,D,L,B);var E=Coordinates.northwestOffset(I,true);if(!C.equals(E)){var N=C.minus(E);P=Coordinates.northwestPosition(I).plus(N);P.reposition(I)}}else{P.reposition(I);I.onDrag(P,D,L,B)}return false},onMouseUp:function(D){D=mousePos.update(D);var F=Drag.group;var B=D.windowCoordinate;var C=Coordinates.northwestOffset(F,true);var G=Coordinates.northwestPosition(F);var A=Coordinates.southeastPosition(F);var E=Coordinates.southeastOffset(F,true);document.onmousemove=null;document.onmouseup=null;F.onDragEnd(G,A,C,E);Drag.group=null;Drag.isDragging=false;return false}};var DropZone={layerArray:new Array(),dropList:new Array(),initialized:false,checkInit:function(){if(!DropZone.initialized){DropZone.init();DropZone.initialized=true}},add:function(C,A){DropZone.checkInit();var B=$(C);if(B){B.dropOptions=A||new Object();B.dropOptions.dropItem=B;if(typeof (A.accept)=="string"){A.accept=A.accept.split(" ")}DropZone.dropList.push(B)}},init:function(){this.layerArray[0]=new Array();this.layerArray[1]=new Array();this.dropList=this.layerArray[0]},switchLayer:function(A){DropZone.checkInit();if(A==0||A==1){this.dropList=this.layerArray[A]}}};var DragDrop={clone:null,currentContainer:null,insertIndex:-1,instance:0,lastContainer:null,track:null,lastOnDrop:null,lastSelected:null,accepts:function(G,C){var A=C.dropOptions;var B=false;if(A.accept){var E=A.accept;for(var D=0;D<E.length;D++){var F=new RegExp("\\b"+E[D]+"\\b");if(Element.hasClassName(G,E[D])){B=true;break}}}else{B=true}return B},create:function(C,A){var B;if(typeof (C)=="string"){B=document.getElementById(C)}else{if(typeof (C)=="object"){B=C}else{return }}B.dragOptions=A?A:new Object();B.dragOptions.scrollOffset=new Coordinate(0,0);Drag.makeDraggable(B,B.dragOptions.handle);B.onDragStart=DragDrop.onDragStart;B.onDrag=DragDrop.onDrag;B.onDragEnd=DragDrop.onDragEnd;B.threshold=3},onDragStart:function(E,A,B,D){var C=this},onDrag:function(O,B,E,L){var P=this;var A=P.dragOptions;if(!P.initialized){var I=document.getElementsByTagName("body")[0];var K=P.parentNode;itemLayoutColumn=K.id;var J=DragDrop.clone;if(is_ie){setSelectVisibility("hidden")}A.origWidth=P.style.width;A.origHeight=P.style.height;A.origPosition=P.style.position;A.origRevert=A.revert;A.scrollOffset=new Coordinate(0,0);if(A.container){var D=$(A.container);A.scrollOffset.x=D.scrollLeft;A.scrollOffset.y=D.scrollTop}J=DragDrop.clone=P.cloneNode(A.showClone?true:false);if(!A.showClone){J.style.backgroundColor="transparent"}J.dragOptions=new cloneObject(A);J.style.left="";J.style.top="";J.style.zIndex=0;if(!A.showClone){J.style.height=P.offsetHeight+"px";J.style.width=P.offsetWidth+"px"}P.dragOptions.clone=J;P.style.width=P.offsetWidth+"px";P.style.height=P.offsetHeight+"px";K.insertBefore(J,P);K.removeChild(P);if(A.showClone||A.ghosting){Element.changeOpacity(P,75)}P.style.position="absolute";P.style.zIndex=ZINDEX.DRAG_ITEM;P.style.left=(E.x-A.scrollOffset.x)+"px";P.style.top=(E.y-A.scrollOffset.y)+"px";I.appendChild(P);if(userRoles.indexOf("Administrator")==-1){var C=new Array();for(var H=0;H<DropZone.dropList.length;H++){C.push(DropZone.dropList[H])}for(var H=0;H<C.length;H++){if(itemLayoutColumn!=C[H].id){C.splice(H,1);H--;continue}}}else{var C=DropZone.dropList}C.each(function(Q){if(Q.dropOptions.inheritParent){Q.style.height=Q.parentNode.offsetHeight}});DragDrop.lastOnDrop=null;P.initialized=true}else{P.style.left=(parseInt(P.style.left)-A.scrollOffset.x)+"px";P.style.top=(parseInt(P.style.top)-A.scrollOffset.y)+"px";if(userRoles.indexOf("Administrator")==-1){var C=new Array();for(var H=0;H<DropZone.dropList.length;H++){C.push(DropZone.dropList[H])}for(var H=0;H<C.length;H++){if(itemLayoutColumn!=C[H].id){C.splice(H,1);H--;continue}}}else{var C=DropZone.dropList}DragDrop.currentContainer=null;for(var H=0;H<C.length;H++){var F=C[H];if(!F.parentNode||typeof (F)=="undefined"){C.splice(H,1);H--;continue}var G=mousePos.insideObject(F,true);if(DragDrop.accepts(P,F)){if(A.highlightDropzones){F.style.backgroundColor=A.highlightDropzones}if(G){DragDrop.currentContainer=F;DragDrop.lastOnDrop=F.dropOptions.onDrop}}}var N=DragDrop.currentContainer;var M=DragDrop.lastContainer;if(N){if(typeof (N.dropOptions.onHoverOver)!="undefined"){N.dropOptions.onHoverOver(P)}}if(N!=M){if(M){Element.removeClassName(M,M.dropOptions.hoverclass);if(typeof (M.dropOptions.onHoverOut)!="undefined"){M.dropOptions.onHoverOut(P)}}if(N){if(N.dropOptions.hoverclass&&N!=P&&DragDrop.accepts(P,N)){Element.addClassName(N,N.dropOptions.hoverclass)}}}DragDrop.lastContainer=DragDrop.currentContainer}},onDragEnd:function(I,B,E,H){var J=this;var A=J.dragOptions;if(J.initialized){var F=DragDrop.currentContainer;if(F&&typeof (F.dropOptions.onDrop)!="undefined"){var D=F.dropOptions;if(DragDrop.accepts(J,F)){D.onDrop(J,I,B,E,H);F.className=D.origClassName;Element.removeClassName(F,F.dropOptions.hoverclass)}}else{if(A.forceDrop&&DragDrop.lastOnDrop){DragDrop.lastOnDrop()}}var G=DragDrop.clone;var C=G.parentNode;if(A.keepClone){DragDrop.create(G,G.dragOptions);J.style.zIndex=""}else{if(A.revert){J.parentNode.removeChild(J);J.style.width=A.origWidth;J.style.height=A.origHeight;J.style.position=A.origPosition;J.style.left="";J.style.top="";G.style.display="none";C.insertBefore(J,G)}C.removeChild(G)}Element.changeOpacity(J,100);J.style.zIndex="";A.scrollOffset=new Coordinate(0,0);if(is_ie){setSelectVisibility("visible")}DropZone.dropList.each(function(K){K.style.backgroundColor="transparent";if(K.dropOptions.inheritParent){K.style.height=""}});A.revert=A.origRevert;J.initialized=false;J.wasClicked=false}else{J.wasClicked=true}}};function ResizeRule(A,B,C){this.element=A;this.direction=B;this.next=null;this.origWidth=null;this.origHeight=null;this.mode=C}var Resize={BIG_Z_INDEX:100,group:null,isResizeing:false,HORIZONTAL:0,VERTICAL:1,ADD:0,SUBTRACT:1,addRule:function(B){var A=this;if(A.listHead==null){A.listHead=B;A.listTail=A.listHead}else{A.listTail.next=B;A.listTail=B}},createHandle:function(C,A,B){C.onmousedown=Resize.onMouseDown;C.addRule=Resize.addRule;C.listHead=null;C.listTail=null;C.disableStop=A==null?false:true;C.onResizeStart=new Function();C.onResize=new Function();C.onResizeEnd=new Function();C.func=B;return C},getHeight:function(B){var A=document.getElementById("debug_div");if(B.style&&B.style.height&&B.style.height!=""){return parseInt(B.style.height)}else{return B.offsetHeight}},getWidth:function(A){if(A.style&&A.style.width&&A.style.width!=""){return parseInt(A.style.width)}else{return A.offsetWidth}},onMouseDown:function(B){B=mousePos.update(B);Resize.group=this;var C=Resize.group;var A=mousePos;C.mouseStart=new Coordinate(mousePos.x,mousePos.y);var D=C.listHead;while(D){D.origWidth=Resize.getWidth(D.element);D.origHeight=Resize.getHeight(D.element);D=D.next}document.onmousemove=Resize.onMouseMove;document.onmouseup=Resize.onMouseUp;document.getElementsByTagName("body")[0].style.cursor=C.style.cursor;C.onResizeStart();return false},onMouseMove:function(E){E=mousePos.update(E);var G=Resize.group;var B=mousePos;var A=mousePos.minus(G.mouseStart);var H=G.listHead;var F;var C=0;var D=false;while(H){if(H.direction==Resize.HORIZONTAL){H.prevLength=Resize.getWidth(H.element);if(H.mode==Resize.ADD){F=H.origWidth+A.x}else{F=H.origWidth-A.x}}else{if(H.direction==Resize.VERTICAL){H.prevLength=Resize.getHeight(H.element);if(H.mode==Resize.ADD){F=H.origHeight+A.y}else{F=H.origHeight-A.y}}}H.newLength=F;if(F<1){C=Math.max(-F+1,C);F=1}if(F==H.prevLength){D=true}H=H.next}H=G.listHead;while(H){if(!G.disableStop&&D){F=H.prevLength}else{if(H.newLength<1){F=H.newLength+C}else{F=H.newLength-C}}if(H.direction==Resize.HORIZONTAL){H.element.style.width=F+"px"}else{if(H.direction==Resize.VERTICAL){H.element.style.height=F+"px"}}H=H.next}G.onResize();return false},onMouseUp:function(B){B=mousePos.update(B);var C=Resize.group;var A=B.windowCoordinate;C.mouseEnd=new Coordinate(mousePos.x,mousePos.y);C.onResizeEnd();document.onmousemove=null;document.onmouseup=null;document.getElementsByTagName("body")[0].style.cursor="auto";Resize.group=null;if(C.func!=null){C.func()}return false}};var LayoutConfiguration={categories:new Array(),initialized:false,loadingImage:null,menu:null,menuDiv:null,menuIframe:null,portlets:new Array(),showTimer:0,init:function(){var C=new Image();var A=new Image();C.src=themeDisplay.getPathThemeImage()+"/arrows/01_down.gif";A.src=themeDisplay.getPathThemeImage()+"/arrows/01_right.gif";var F=document.getElementById("portal_add_content");LayoutConfiguration.menu=F;if(F!=null){var E=F.childNodes;for(var D=0;D<E.length;D++){if(E[D].className!=null&&E[D].className.match("portal-add-content")){LayoutConfiguration.menuDiv=E[D]}if(E[D].nodeName!=null&&E[D].nodeName.toLowerCase().match("iframe")){LayoutConfiguration.menuIframe=E[D]}}var B=F.getElementsByTagName("div");for(var D=0;D<B.length;D++){if(B[D].className=="layout_configuration_portlet"){LayoutConfiguration.portlets.push(B[D])}else{if(B[D].className=="layout_configuration_category"){LayoutConfiguration.categories.push(B[D])}}}LayoutConfiguration.initialized=true;if(is_ie){document.getElementById("layout_configuration_content").focus()}}},toggle:function(C,E,A){if(!LayoutConfiguration.menu){var D=themeDisplay.getPathMain()+"/portal/render_portlet?p_l_id="+C+"&p_p_id="+E+"&doAsUserId="+A;var B=Alerts.fireMessageBox({width:250,noCenter:true,title:"Add Content",onClose:function(){LayoutConfiguration.menu=null}});AjaxUtil.update(D,B,{onComplete:LayoutConfiguration.init})}},startShowTimer:function(A){if(this.showTimer){clearTimeout(this.showTimer);this.showTimer=0}this.showTimer=setTimeout('LayoutConfiguration.showMatching("'+A+'")',250)},showMatching:function(D){var B=this.portlets;var A=this.categories;if(D=="*"){for(var C=0;C<B.length;C++){B[C].style.display="block"}for(var C=0;C<A.length;C++){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"block")}}else{if(D==""){for(var C=0;C<A.length;C++){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"none")}for(var C=0;C<B.length;C++){B[C].style.display="block"}}else{D=D.toLowerCase();for(var C=0;C<A.length;C++){A[C].style.display="none"}for(var C=0;C<B.length;C++){if(B[C].id.toLowerCase().match(D)){B[C].style.display="block";this.showCategories(A,B[C].id)}else{B[C].style.display="none"}}}}},showCategories:function(A,B){var D=B.lastIndexOf(":");while(D!=-1){B=B.substr(0,D);for(var C=0;C<A.length;C++){if(B.match(A[C].id)){A[C].style.display="block";this.toggleCategory(A[C].getElementsByTagName("table")[0],"block")}}D=B.lastIndexOf(":")}},toggleCategory:function(F,E){var B=F;while(B.nodeName.toLowerCase()!="table"){B=B.parentNode}var C=B.rows[1].cells[0];var G=document.getElementsByClassName("layout_configuration_category_pane",C)[0];var D=F.getElementsByTagName("img")[0];var A=themeDisplay.getPathThemeImage();if(E){G.style.display=E;if(E.toLowerCase().match("block")){D.src=A+"/arrows/01_down.gif"}else{D.src=A+"/arrows/01_right.gif"}}else{if(toggleByObject(G,true)){D.src=A+"/arrows/01_down.gif"}else{D.src=A+"/arrows/01_right.gif"}}}};var Messaging={checkRoster:false,currentChatBox:null,initialized:false,inputCount:1,mainDiv:null,msgQueue:new Array(),userId:null,windowCount:0,zIndex:1,chat:function(B){if(!B&&Messaging.msgQueue.length==0){return }var D=B||Messaging.msgQueue.shift();var C=$("msg-chat-box"+D.toId);if(!C){var A=themeDisplay.getPathMain()+"/messaging/action?cmd=chatbox&toId="+D.toId+"&toName="+encodeURIComponent(D.toName)+"&top="+(D.top||15*this.windowCount)+"&left="+(D.left||15*this.windowCount++)+"&zIndex="+(ZINDEX.CHAT_BOX+this.zIndex++);if(D.status&&D.status=="unavailable"){A+="&addUser=1"}if(D.messages){A+="&messages="+encodeURIComponent(D.messages)}AjaxUtil.request(A,{returnArgs:D,onComplete:function(F,E){var G=Messaging.createChatBox(F.responseText);Messaging.populateChatBox(G,E)}})}else{this.populateChatBox(C,D)}},populateChatBox:function(E,G){var D=document.getElementsByClassName("msg-type-area",E)[0];var A=document.getElementsByClassName("msg-chat-area",E)[0];if(G.body!=null){var B=G.toName.split(/[ ,.-]/);var F="";for(var C=0;C<B.length;C++){F+=B[C].charAt(0)}A.innerHTML+="<span style='color: #FF0000'>"+F+": </span>"+G.body+"<br/>"}this.saveCookie();A.scrollTop=A.scrollHeight;D.focus();if(is_ie){D.focus()}Messaging.chat()},getChats:function(){var url=themeDisplay.getPathMain()+"/messaging/action?cmd=getChats";AjaxUtil.request(url,{onComplete:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");Messaging.getChatsReturn(msg)}})},getChatsReturn:function(D){var A=D.status;if(A=="success"){var F=D.chat;if(F&&F.length>0){for(var C=0;C<F.length;C++){var B=F[C].fromName;var E=F[C].fromId;F[C].fromName=F[C].toName;F[C].fromId=F[C].toId;F[C].toName=B;F[C].toId=E;Messaging.msgQueue.push(F[C])}Messaging.chat();window.focus()}}},createChatBox:function(D){var A=document.createElement("div");A.innerHTML=D;var C=document.getElementsByClassName("msg-chat-box",A)[0];var B=document.getElementsByClassName("msg-chat-title",C)[0];Drag.makeDraggable(C,B);C.onDragEnd=function(){Messaging.saveCookie()};A.removeChild(C);this.mainDiv.appendChild(C);return C},error:function(){alert("User does not exist")},init:function(D){var A=document.getElementsByTagName("body")[0];var B=$("messaging-main-div");this.userId=D;if(B==null){B=document.createElement("div");B.id="messaging-main-div";Element.setStyle(B,{left:0,position:"absolute",textAlign:"left",top:0,width:"100%",zIndex:ZINDEX.CHAT_BOX});A.insertBefore(B,A.childNodes[0])}this.mainDiv=B;var E=Cookie.read(this.userId+"_chats");if(E){var C=$J(decodeURIComponent(E));C.each(function(F){Messaging.msgQueue.push(F)});Messaging.chat()}this.initialized=true;Messaging.getChats()},maximizeChat:function(D){var C=$(D);var B=document.getElementsByClassName("msg-chat-box-width")[0];var A=document.getElementsByClassName("msg-chat-area")[0];C.style.left=Viewport.scroll().x+"px";C.style.top=Viewport.scroll().y+"px";B.style.width=(Viewport.frame().x-30)+"px";A.style.height=(Viewport.frame().y-100)+"px"},minimizeChat:function(D){var C=$(D);var B=document.getElementsByClassName("msg-chat-box-width")[0];var A=document.getElementsByClassName("msg-chat-area")[0];B.style.width=250+"px";A.style.height=100+"px"},removeChat:function(B){var A=$(B);Element.remove(A);this.saveCookie()},saveCookie:function(){var B=document.getElementsByClassName("msg-chat-box",this.mainDiv);var A=new Array();B.each(function(D){var C=new Object();C.toName=document.getElementsByClassName("msg-to-name",D)[0].innerHTML;C.toId=document.getElementsByClassName("msg-to-input-id",D)[0].value;C.top=parseInt(D.style.top);C.left=parseInt(D.style.left);C.messages=document.getElementsByClassName("msg-chat-area",D)[0].innerHTML;A.push(C)});Cookie.create(this.userId+"_chats",encodeURIComponent(A.toJSONString()),99)},sendChat:function(D,G){var H;var E=D.parentNode;var F;var L;var K;var J;var I="cmd=sendChat";if(window.event){H=window.event.keyCode}else{if(G){H=G.which}else{return }}if(H==13){var B=E.getElementsByTagName("input");for(var C=0;C<B.length;C++){if(B[C].className){if(B[C].className.match("msg-to-input-id")){F=B[C]}if(B[C].className.match("msg-to-input-addr")){L=B[C]}if(B[C].className.match("msg-type-area")){K=B[C]}}}if(K.value==""){return }var A=E.getElementsByTagName("div");for(var C=0;C<A.length;C++){if(A[C].className&&A[C].className.match("msg-chat-area")){J=A[C]}}I+="&text="+encodeURIComponent(K.value);if(L!=null){I+="&tempId="+F.value+"&toAddr="+L.value}else{I+="&toId="+F.value}loadPage(themeDisplay.getPathMain()+"/messaging/action",I,Messaging.sendChatReturn);J.innerHTML+="<span style='color: #0000FF'>Me: </span>"+K.value+"<br/>";J.scrollTop=J.scrollHeight;K.value="";Messaging.saveCookie()}},sendChatReturn:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");if(msg.status=="success"){Messaging.populateChatBox(msg)}else{Messaging.error()}}};var MessagingRoster={highlightColor:"",lastSelected:null,addEntry:function(C){var B;if(C){B=themeDisplay.getPathMain()+"/chat/roster?cmd=addEntry&userId="+C}else{var A=$("portlet-chat-roster-email").value;B=themeDisplay.getPathMain()+"/chat/roster?cmd=addEntry&email="+A}AjaxUtil.request(B,{onComplete:MessagingRoster.addEntryReturn})},addEntryReturn:function(xmlHttpReq){try{var msg=eval("("+xmlHttpReq.responseText+")");if(msg.status=="failure"){alert("No such user exists")}else{var rosterDiv=$("portlet-chat-roster-list");if(rosterDiv){var entries=document.getElementsByClassName("portlet-chat-roster-entry");var userId=msg.user;var userExists=entries.any(function(item){return(item.userId==userId)});if(!userExists||entries.length==0){var entryRow=MessagingRoster.createEntryRow(msg.user,msg.name);rosterDiv.appendChild(entryRow)}MessagingRoster.toggleEmail()}}}catch(err){}},createEntryRow:function(C,F,A){var B=document.createElement("div");var D=document.createElement("img");var E=document.createElement("a");D.align="absmiddle";D.style.marginRight="5px";if(A){D.src=themeDisplay.getPathThemeImage()+"/chat/user_online.gif"}else{D.src=themeDisplay.getPathThemeImage()+"/chat/user_offline.gif"}E.innerHTML=F;E.href="javascript: void(0)";E.onclick=MessagingRoster.onEntryLinkClick;B.appendChild(D);B.appendChild(E);B.onclick=MessagingRoster.onEntryClick;B.userId=C;B.userName=F;B.style.cursor="pointer";B.className="portlet-chat-roster-entry";return B},deleteEntries:function(){if(MessagingRoster.lastSelected){var A=MessagingRoster.lastSelected.userId;var B=MessagingRoster.lastSelected;B.parentNode.removeChild(B);MessagingRoster.lastSelected=null;loadPage(themeDisplay.getPathMain()+"/chat/roster","cmd=deleteEntries&entries="+A,MessagingRoster.deleteEntriesReturn)}},deleteEntriesReturn:function(xmlHttpReq){try{var msg=eval("("+xmlHttpReq.responseText+")")}catch(err){}},getEntries:function(){var url=themeDisplay.getPathMain()+"/chat/roster?cmd=getEntries";AjaxUtil.request(url,{onComplete:function(xmlHttpReq){var msg=eval("("+xmlHttpReq.responseText+")");MessagingRoster.getEntriesReturn(msg)}})},getEntriesReturn:function(A){MessagingRoster.updateEntries(A.roster)},updateEntries:function(D){var E=$("portlet-chat-roster-list");if(E!=null){E.innerHTML=""}else{Messaging.checkRoster=false;return }for(var B=0;B<D.length;B++){var C=D[B];var A=MessagingRoster.createEntryRow(C.user,C.name,C.status=="available");E.appendChild(A)}},onEmailKeypress:function(C,A){var B;if(window.event){B=window.event.keyCode}else{if(A){B=A.which}else{return }}if(B==13){MessagingRoster.addEntry()}},onEntryClick:function(){if(MessagingRoster.lastSelected!=null){MessagingRoster.lastSelected.style.backgroundColor="transparent"}this.style.backgroundColor=MessagingRoster.highlightColor;MessagingRoster.lastSelected=this},onEntryLinkClick:function(){var A=this.parentNode;Messaging.chat({toId:A.userId,toName:A.userName})},toggleEmail:function(){emailDiv=$("portlet-chat-roster-email-div");if(emailDiv.style.display=="none"){emailDiv.style.display="block";emailInput=$("portlet-chat-roster-email");emailInput.value="";emailInput.focus()}else{emailDiv.style.display="none"}}};function getInactivePortletQueryString(A){if(A.indexOf("ia_p=1")>=0){showWheelsCoalesced(false);showTripSuitcase(true);return""}if(A.indexOf("ia_p=2")>=0){showTripSuitcase(false);showWheelsCoalesced(true);return""}if(A.indexOf("?")<0){return""}if($("wcp_main")&&$("wcp_main").style.display=="none"){return"&ia_p=1"}else{return"&ia_p=2"}}