var Prototype={Version:"1.5.1.1",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,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(B,A){for(var C in A){B[C]=A[C]}return B};Object.extend(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}},toJSON:function(B){var A=typeof B;switch(A){case"undefined":case"function":case"unknown":return ;case"boolean":return B.toString()}if(B===null){return"null"}if(B.toJSON){return B.toJSON()}if(B.ownerDocument===document){return }var E=[];for(var D in B){var C=Object.toJSON(B[D]);if(C!==undefined){E.push(D.toJSON()+": "+C)}}return"{"+E.join(", ")+"}"},keys:function(B){var A=[];for(var C in B){A.push(C)}return A},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)}});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(A){var C=this,B=$A(arguments),A=B.shift();return function(D){return C.apply(A,[D||window.event].concat(B))}};Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this},toPaddedString:function(B,A){var C=this.toString(A||10);return"0".times(B-C.length)+C},toJSON:function(){return isFinite(this)?this.toString():"null"}});Date.prototype.toJSON=function(){return'"'+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+'"'};var Try={these:function(){var B;for(var C=0,D=arguments.length;C<D;C++){var A=arguments[C];try{B=A();break}catch(E){}}return B}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(B,A){var E="",D=this,C;A=arguments.callee.prepareReplacement(A);while(D.length>0){if(C=D.match(B)){E+=D.slice(0,C.index);E+=String.interpret(A(C));D=D.slice(C.index+C[0].length)}else{E+=D,D=""}}return E},sub:function(A,C,B){C=this.gsub.prepareReplacement(C);B=B===undefined?1:B;return this.gsub(A,function(D){if(--B<0){return D[0]}return C(D)})},scan:function(B,A){this.gsub(B,A);return this},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var A=new RegExp(Prototype.ScriptFragment,"img");var B=new RegExp(Prototype.ScriptFragment,"im");return(this.match(A)||[]).map(function(C){return(C.match(B)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(a){return eval(a)})},escapeHTML:function(){var A=arguments.callee;A.text.data=this;return A.div.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(C,B){return C+B.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(D,C){if((C=C.split("="))[0]){var F=decodeURIComponent(C.shift());var E=C.length>1?C.join("="):C[0];if(E!=undefined){E=decodeURIComponent(E)}if(F in D){if(D[F].constructor!=Array){D[F]=[D[F]]}D[F].push(E)}else{D[F]=E}}return D})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(B){var A="";for(var C=0;C<B;C++){A+=this}return A},camelize:function(){var C=this.split("-"),B=C.length;if(B==1){return C[0]}var A=this.charAt(0)=="-"?C[0].charAt(0).toUpperCase()+C[0].substring(1):C[0];for(var D=1;D<B;D++){A+=C[D].charAt(0).toUpperCase()+C[D].substring(1)}return A},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(D){var C=String.specialChar[D[0]];return C?C:"\\u00"+D[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},isJSON:function(){var A=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},evalJSON:function(a){var b=this.unfilterJSON();try{if(!a||b.isJSON()){return eval("("+b+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(A){if(typeof A=="function"){return A}var B=new Template(A);return function(C){return B.evaluate(C)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(B,A){this.template=B.toString();this.pattern=A||Template.Pattern},evaluate:function(A){return this.template.gsub(this.pattern,function(C){var B=C[1];if(B=="\\"){return C[2]}return B+String.interpret(A[C[3]])})}};var $break={};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Enumerable={each:function(A){var C=0;try{this._each(function(D){A(D,C++)})}catch(B){if(B!=$break){throw B}}return this},eachSlice:function(B,A){var E=-B,C=[],D=this.toArray();while((E+=B)<D.length){C.push(D.slice(E,E+B))}return C.map(A)},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=false;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||Prototype.K)(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(E,D){var F=E.toString();if(F.match(C)){A.push((B||Prototype.K)(E,D))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inGroupsOf:function(A,B){B=B===undefined?null:B;return this.eachSlice(A,function(C){while(C.length<A){C.push(B)}return C})},inject:function(B,A){this.each(function(D,C){B=A(B,D,C)});return B},invoke:function(A){var B=$A(arguments).slice(1);return this.map(function(C){return C[A].apply(C,B)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D>=A){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D<A){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.map(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.map()},zip:function(){var C=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){C=A.pop()}var B=[this].concat(A).map($A);return this.map(function(E,D){return C(B.pluck(D))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(B){if(!B){return[]}if(B.toArray){return B.toArray()}else{var A=[];for(var C=0,D=B.length;C<D;C++){A.push(B[C])}return A}};if(Prototype.Browser.WebKit){$A=Array.from=function(B){if(!B){return[]}if(!(typeof B=="function"&&B=="[object NodeList]")&&B.toArray){return B.toArray()}else{var A=[];for(var C=0,D=B.length;C<D;C++){A.push(B[C])}return A}}}Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(A){for(var B=0,C=this.length;B<C;B++){A(this[B])}},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!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A&&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,C=this.length;B<C;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(A){return this.inject([],function(C,B,D){if(0==D||(A?C.last()!=B:!C.include(B))){C.push(B)}return C})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var A=[];this.each(function(C){var B=Object.toJSON(C);if(B!==undefined){A.push(B)}});return"["+A.join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(A){A=A.strip();return A?A.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var A=[];for(var C=0,D=this.length;C<D;C++){A.push(this[C])}for(var C=0,D=arguments.length;C<D;C++){if(arguments[C].constructor==Array){for(var B=0,E=arguments[C].length;B<E;B++){A.push(arguments[C][B])}}else{A.push(arguments[C])}}return A}}var Hash=function(A){if(A instanceof Hash){this.merge(A)}else{Object.extend(this,A||{})}};Object.extend(Hash,{toQueryString:function(B){var A=[];A.add=arguments.callee.addPair;this.prototype._each.call(B,function(C){if(!C.key){return }var D=C.value;if(D&&typeof D=="object"){if(D.constructor==Array){D.each(function(E){A.add(C.key,E)})}return }A.add(C.key,D)});return A.join("&")},toJSON:function(B){var A=[];this.prototype._each.call(B,function(D){var C=Object.toJSON(D.value);if(C!==undefined){A.push(D.key.toJSON()+": "+C)}});return"{"+A.join(", ")+"}"}});Hash.toQueryString.addPair=function(B,A,C){B=encodeURIComponent(B);if(A===undefined){this.push(B)}else{this.push(B+"="+(A==null?"":encodeURIComponent(A)))}};Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(B){for(var A in this){var D=this[A];if(D&&D==Hash.prototype[A]){continue}var C=[A,D];C.key=A;C.value=D;B(C)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject(this,function(C,B){C[B.key]=B.value;return C})},remove:function(){var B;for(var C=0,D=arguments.length;C<D;C++){var A=this[arguments[C]];if(A!==undefined){if(B===undefined){B=A}else{if(B.constructor!=Array){B=[B]}B.push(A)}}delete this[arguments[C]]}return B},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Hash.toJSON(this)}});function $H(A){if(A instanceof Hash){return A}return new Hash(A)}if(function(){var B=0,C=function(D){this.key=D};C.prototype.key="foo";for(var A in new C("bar")){B++}return B>1}()){Hash.prototype._each=function(B){var A=[];for(var E in this){var D=this[E];if((D&&D==Hash.prototype[E])||A.include(E)){continue}A.push(E);var C=[E,D];C.key=E;C.value=D;B(C)}}}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(B,A,C){this.start=B;this.end=A;this.exclusive=C},_each:function(B){var A=this.start;while(this.include(A)){B(A);A=A.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(B,A,C){return new ObjectRange(B,A,C)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(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(A,D,C,B){this.each(function(E){if(typeof E[A]=="function"){try{E[A].apply(E,[D,C,B])}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,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(B){this.url=B;this.method=this.options.method;var A=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){A._method=this.method;this.method="post"}this.parameters=A;if(A=Hash.toQueryString(A)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+A}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){A+="&_="}}}try{if(this.options.onCreate){this.options.onCreate(this.transport)}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||A):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(C){this.dispatchException(C)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var A={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){A["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){A.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var E=this.options.requestHeaders;if(typeof E.push=="function"){for(var B=0,C=E.length;B<C;B+=2){A[E[B]]=E[B+1]}}else{$H(E).each(function(F){A[F.key]=F.value})}}for(var D in A){this.transport.setRequestHeader(D,A[D])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(B){var A=Ajax.Request.Events[B];var F=this.transport,C=this.evalJSON();if(A=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(F,C)}catch(D){this.dispatchException(D)}var E=this.getHeader("Content-type");if(E&&E.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+A]||Prototype.emptyFunction)(F,C);Ajax.Responders.dispatch("on"+A,this,F,C)}catch(D){this.dispatchException(D)}if(A=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},evalJSON:function(){try{var A=this.getHeader("X-JSON");return A?A.evalJSON():null}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},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(D,C,B){this.container={success:(D.success||D),failure:(D.failure||(D.success?null:D))};this.transport=Ajax.getTransport();this.setOptions(B);var A=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();A(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.container[this.success()?"success":"failure"];var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B=$(B)){if(this.options.insertion){new this.options.insertion(B,A)}else{B.update(A)}}if(this.success()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(B,A,C){this.setOptions(C);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=B;this.url=A;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(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)}});function $(A){if(arguments.length>1){for(var B=0,D=[],C=arguments.length;B<C;B++){D.push($(arguments[B]))}return D}if(typeof A=="string"){A=document.getElementById(A)}return Element.extend(A)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(B,A){var F=[];var E=document.evaluate(B,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var C=0,D=E.snapshotLength;C<D;C++){F.push(E.snapshotItem(C))}return F};document.getElementsByClassName=function(B,A){var C=".//*[contains(concat(' ', @class, ' '), ' "+B+" ')]";return document._getElementsByXPath(C,A)}}else{document.getElementsByClassName=function(I,H){var G=($(H)||document.body).getElementsByTagName("*");var E=[],A,F=new RegExp("(^|\\s)"+I+"(\\s|$)");for(var C=0,B=G.length;C<B;C++){A=G[C];var D=A.className;if(D.length==0){continue}if(D==I||D.match(F)){E.push(Element.extend(A))}}return E}}if(!window.Element){var Element={}}Element.extend=function(B){var G=Prototype.BrowserFeatures;if(!B||!B.tagName||B.nodeType==3||B._extended||G.SpecificElementExtensions||B==window){return B}var A={},E=B.tagName,C=Element.extend.cache,D=Element.Methods.ByTag;if(!G.ElementExtensions){Object.extend(A,Element.Methods),Object.extend(A,Element.Methods.Simulated)}if(D[E]){Object.extend(A,D[E])}for(var I in A){var H=A[I];if(typeof H=="function"&&!(I in B)){B[I]=C.findOrStore(H)}}B._extended=Prototype.emptyFunction;return B};Element.extend.cache={findOrStore:function(A){return this[A]=this[A]||function(){return A.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){$(A).style.display="none";return A},show:function(A){$(A).style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:function(B,A){A=typeof A=="undefined"?"":A.toString();$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10);return B},replace:function(B,A){B=$(B);A=typeof A=="undefined"?"":A.toString();if(B.outerHTML){B.outerHTML=A.stripScripts()}else{var C=B.ownerDocument.createRange();C.selectNodeContents(B);B.parentNode.replaceChild(C.createContextualFragment(A.stripScripts()),B)}setTimeout(function(){A.evalScripts()},10);return B},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(D){var C=D.first(),E=D.last();var F=(B[C]||"").toString();if(F){A+=" "+E+"="+F.inspect(true)}});return A+">"},recursivelyCollect:function(B,A){B=$(B);var C=[];while(B=B[A]){if(B.nodeType==1){C.push(Element.extend(B))}}return C},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(typeof A=="string"){A=new Selector(A)}return A.match($(B))},up:function(B,A,D){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=B.ancestors();return A?Selector.findElement(C,A,D):C[D||0]},down:function(B,A,D){B=$(B);if(arguments.length==1){return B.firstDescendant()}var C=B.descendants();return A?Selector.findElement(C,A,D):C[D||0]},previous:function(B,A,D){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=B.previousSiblings();return A?Selector.findElement(C,A,D):C[D||0]},next:function(B,A,D){B=$(B);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(B))}var C=B.nextSiblings();return A?Selector.findElement(C,A,D):C[D||0]},getElementsBySelector:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},getElementsByClassName:function(B,A){return document.getElementsByClassName(A,B)},readAttribute:function(B,A){B=$(B);if(Prototype.Browser.IE){if(!B.attributes){return null}var C=Element._attributeTranslations;if(C.values[A]){return C.values[A](B,A)}if(C.names[A]){A=C.names[A]}var D=B.attributes[A];return D?D.nodeValue:null}return B.getAttribute(A)},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(B,A){if(!(B=$(B))){return }var C=B.className;if(C.length==0){return false}if(C==A||C.match(new RegExp("(^|\\s)"+A+"(\\s|$)"))){return true}return false},addClassName:function(B,A){if(!(B=$(B))){return }Element.classNames(B).add(A);return B},removeClassName:function(B,A){if(!(B=$(B))){return }Element.classNames(B).remove(A);return B},toggleClassName:function(B,A){if(!(B=$(B))){return }Element.classNames(B)[B.hasClassName(A)?"remove":"add"](A);return B},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(B){B=$(B);var A=B.firstChild;while(A){var C=A.nextSibling;if(A.nodeType==3&&!/\S/.test(A.nodeValue)){B.removeChild(A)}A=C}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(B,A){B=$(B),A=$(A);while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(B){B=$(B);var A=Position.cumulativeOffset(B);window.scrollTo(A[0],A[1]);return B},getStyle:function(B,A){B=$(B);A=A=="float"?"cssFloat":A.camelize();var D=B.style[A];if(!D){var C=document.defaultView.getComputedStyle(B,null);D=C?C[A]:null}if(A=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(B,A,E){B=$(B);var D=B.style;for(var C in A){if(C=="opacity"){B.setOpacity(A[C])}else{D[(C=="float"||C=="cssFloat")?(D.styleFloat===undefined?"cssFloat":"styleFloat"):(E?C:C.camelize())]=A[C]}}return B},setOpacity:function(B,A){B=$(B);B.style.opacity=(A==1||A==="")?"":(A<0.00001)?0:A;return B},getDimensions:function(B){B=$(B);var A=$(B).getStyle("display");if(A!="none"&&A!=null){return{width:B.offsetWidth,height:B.offsetHeight}}var H=B.style;var G=H.visibility;var F=H.position;var E=H.display;H.visibility="hidden";H.position="absolute";H.display="block";var D=B.clientWidth;var C=B.clientHeight;H.display=E;H.position=F;H.visibility=G;return{width:D,height:C}},makePositioned:function(B){B=$(B);var A=Element.getStyle(B,"position");if(A=="static"||!A){B._madePositioned=true;B.style.position="relative";if(window.opera){B.style.top=0;B.style.left=0}}return B},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=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=A.style.overflow||"auto";if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(B,A){switch(A){case"left":case"top":case"right":case"bottom":if(Element._getStyle(B,"position")=="static"){return null}default:return Element._getStyle(B,A)}}}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(B,A){B=$(B);A=(A=="float"||A=="cssFloat")?"styleFloat":A.camelize();var C=B.style[A];if(!C&&B.currentStyle){C=B.currentStyle[A]}if(A=="opacity"){if(C=(B.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((A=="width"||A=="height")&&(B.getStyle("display")!="none")){return B["offset"+A.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(B,A){B=$(B);var D=B.getStyle("filter"),C=B.style;if(A==1||A===""){C.filter=D.replace(/alpha\([^\)]*\)/gi,"");return B}else{if(A<0.00001){A=0}}C.filter=D.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(A*100)+")";return B};Element.Methods.update=function(A,D){A=$(A);D=typeof D=="undefined"?"":D.toString();var C=A.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(C)){var B=document.createElement("div");switch(C){case"THEAD":case"TBODY":B.innerHTML="<table><tbody>"+D.stripScripts()+"</tbody></table>";depth=2;break;case"TR":B.innerHTML="<table><tbody><tr>"+D.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":B.innerHTML="<table><tbody><tr><td>"+D.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(A.childNodes).each(function(E){A.removeChild(E)});depth.times(function(){B=B.firstChild});$A(B.childNodes).each(function(E){A.appendChild(E)})}else{A.innerHTML=D.stripScripts()}setTimeout(function(){D.evalScripts()},10);return A}}else{if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(B,A){B=$(B);B.style.opacity=(A==1)?0.999999:(A==="")?"":(A<0.00001)?0:A;return B}}}}Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(B,A){return B.getAttribute(A,2)},_flag:function(B,A){return $(B).hasAttribute(A)?A:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(B){var A=B.getAttributeNode("title");return A.specified?A.nodeValue:null}}};(function(){Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag})}).call(Element._attributeTranslations.values);Element.Methods.Simulated={hasAttribute:function(B,A){var C=Element._attributeTranslations,D;A=C.names[A]||A;D=$(B).getAttributeNode(A);return D&&D.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.hasAttribute=function(B,A){if(B.hasAttribute){return B.hasAttribute(A)}return Element.Methods.Simulated.hasAttribute(B,A)};Element.addMethods=function(H){var J=Prototype.BrowserFeatures,B=Element.Methods.ByTag;if(!H){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var E=H;H=arguments[1]}if(!E){Object.extend(Element.Methods,H||{})}else{if(E.constructor==Array){E.each(I)}else{I(E)}}function I(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],H)}function A(K,F,O){O=O||false;var N=Element.extend.cache;for(var M in K){var L=K[M];if(!O||!(M in F)){F[M]=N.findOrStore(L)}}}function G(K){var F;var L={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(L[K]){F="HTML"+L[K]+"Element"}if(window[F]){return window[F]}F="HTML"+K+"Element";if(window[F]){return window[F]}F="HTML"+K.capitalize()+"Element";if(window[F]){return window[F]}window[F]={};window[F].prototype=document.createElement(K).__proto__;return window[F]}if(J.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(J.SpecificElementExtensions){for(var D in Element.Methods.ByTag){var C=G(D);if(typeof C=="undefined"){continue}A(B[D],C.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag};var Toggle={display:Element.toggle};Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(B,A){this.element=$(B);this.content=A.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(C){var D=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(D)){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(){A.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($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(A){this.expression=A.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,F=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in F){if(A=E.match(F[C])){this.matcher.push(typeof B[C]=="function"?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;if(this.xpath){return document._getElementsByXPath(this.xpath,A)}return this.matcher(A)},match:function(A){return this.findElements(document).include(A)},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}};Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(A){A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(typeof B==="function"){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(B){var H=B[6],G=Selector.patterns,A=Selector.xpath,F,B,D;var C=[];while(H&&F!=H&&(/\S/).test(H)){F=H;for(var E in G){if(B=H.match(G[E])){D=typeof A[E]=="function"?A[E](B):new Template(A[E]).evaluate(B);C.push("("+D.substring(1,D.length-1)+")");H=H.replace(B[0],"");break}}}return"[not("+C.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(G,C){var E,F=C[6],B;if(F=="even"){F="2n+0"}if(F=="odd"){F="2n+1"}if(E=F.match(/^(\d+)$/)){return"["+G+"= "+E[1]+"]"}if(E=F.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var D=E[1]?Number(E[1]):1;var A=E[2]?Number(E[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:G,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:new RegExp("^\\s*~\\s*"),child:new RegExp("^\\s*>\\s*"),adjacent:new RegExp("^\\s*\\+\\s*"),descendant:/^\s/,tagName:new RegExp("^\\s*(\\*|[\\w\\-]+)(\\b|$)?"),id:new RegExp("^#([\\w\\-\\*]+)(\\b|$)"),className:new RegExp("^\\.([\\w\\-\\*]+)(\\b|$)"),pseudo:new RegExp("^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|\\s|(?=:))"),attrPresence:new RegExp("^\\[([\\w]+)\\]"),attr:new RegExp("\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*((['\"])([^\\]]*?)\\4|([^'\"][^\\]]*?)))?\\]")},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){for(var B=0,C;C=A[B];B++){C._counted=true}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._counted=undefined}return A},index:function(B,A,F){B._counted=true;if(A){for(var E=B.childNodes,D=E.length-1,C=1;D>=0;D--){node=E[D];if(node.nodeType==1&&(!F||node._counted)){node.nodeIndex=C++}}}else{for(var D=0,C=1,E=B.childNodes;node=E[D];D++){if(node.nodeType==1&&(!F||node._counted)){node.nodeIndex=C++}}}},unique:function(C){if(C.length==0){return C}var A=[],E;for(var D=0,B=C.length;D<B;D++){if(!(E=C[D])._counted){E._counted=true;A.push(Element.extend(E))}}return Selector.handlers.unmark(A)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var F=Selector.handlers;for(var E=0,D=[],G;G=A[E];E++){for(var B=0,C=[],H;H=G.childNodes[B];B++){if(H.nodeType==1&&H.tagName!="!"){D.push(H)}}}return D},adjacent:function(B){for(var D=0,C=[],E;E=B[D];D++){var A=this.nextElementSibling(E);if(A){C.push(A)}}return C},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(B,A,H,G){H=H.toUpperCase();var F=[],D=Selector.handlers;if(B){if(G){if(G=="descendant"){for(var C=0,E;E=B[C];C++){D.concat(F,E.getElementsByTagName(H))}return F}else{B=this[G](B)}if(H=="*"){return B}}for(var C=0,E;E=B[C];C++){if(E.tagName.toUpperCase()==H){F.push(E)}}return F}else{return A.getElementsByTagName(H)}},id:function(B,A,H,G){var F=$(H),D=Selector.handlers;if(!B&&A==document){return F?[F]:[]}if(B){if(G){if(G=="child"){for(var C=0,E;E=B[C];C++){if(F.parentNode==E){return[F]}}}else{if(G=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(F,E)){return[F]}}}else{if(G=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(F)==E){return[F]}}}else{B=D[G](B)}}}}for(var C=0,E;E=B[C];C++){if(E==F){return[F]}}return[]}return(F&&Element.descendantOf(F,A))?[F]:[]},className:function(B,A,D,C){if(B&&C){B=this[C](B)}return Selector.handlers.byClassName(B,A,D)},byClassName:function(C,A,H){if(!C){C=Selector.handlers.descendant([A])}var G=" "+H+" ";for(var E=0,D=[],F,B;F=C[E];E++){B=F.className;if(B.length==0){continue}if(B==H||(" "+B+" ").include(G)){D.push(F)}}return D},attrPresence:function(B,A,F){var E=[];for(var C=0,D;D=B[C];C++){if(Element.hasAttribute(D,F)){E.push(D)}}return E},attr:function(J,I,H,G,F){if(!J){J=I.getElementsByTagName("*")}var E=Selector.operators[F],B=[];for(var C=0,A;A=J[C];C++){var D=Element.readAttribute(A,H);if(D===null){continue}if(E(D,G)){B.push(A)}}return B},pseudo:function(B,A,E,D,C){if(B&&C){B=this[C](B)}if(!B){B=D.getElementsByTagName("*")}return Selector.pseudos[A](B,E,D)}},pseudos:{"first-child":function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,A,G){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,A,C){return Selector.pseudos.nth(B,A,C)},"nth-last-child":function(B,A,C){return Selector.pseudos.nth(B,A,C,true)},"nth-of-type":function(B,A,C){return Selector.pseudos.nth(B,A,C,false,true)},"nth-last-of-type":function(B,A,C){return Selector.pseudos.nth(B,A,C,true,true)},"first-of-type":function(B,A,C){return Selector.pseudos.nth(B,"1",C,false,true)},"last-of-type":function(B,A,C){return Selector.pseudos.nth(B,"1",C,true,true)},"only-of-type":function(B,A,D){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,A,D),A,D)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(E,D){if(0==(D-A)%B&&(D-A)/B>=0){E.push(D)}return E})},nth:function(N,M,L,K,J){if(N.length==0){return[]}if(M=="even"){M="2n+0"}if(M=="odd"){M="2n+1"}var I=Selector.handlers,H=[],A=[],C;I.mark(N);for(var G=0,B;B=N[G];G++){if(!B.parentNode._counted){I.index(B.parentNode,K,J);A.push(B.parentNode)}}if(M.match(/^\d+$/)){M=Number(M);for(var G=0,B;B=N[G];G++){if(B.nodeIndex==M){H.push(B)}}}else{if(C=M.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(C[1]=="-"){C[1]=-1}var P=C[1]?Number(C[1]):1;var O=C[2]?Number(C[2]):0;var E=Selector.pseudos.getIndices(P,O,N.length);for(var G=0,B,D=E.length;B=N[G];G++){for(var F=0;F<D;F++){if(B.nodeIndex==E[F]){H.push(B)}}}}}I.unmark(N);I.unmark(A);return H},empty:function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||(E.firstChild&&!E.innerHTML.match(/^\s*$/))){continue}C.push(E)}return C},not:function(I,H,G){var E=Selector.handlers,J,B;var F=new Selector(H).findElements(G);E.mark(F);for(var D=0,C=[],A;A=I[D];D++){if(!A._counted){C.push(A)}}E.unmark(F);return C},enabled:function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled){C.push(E)}}return C},disabled:function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},checked:function(B,A,F){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(A,B){return A==B},"!=":function(A,B){return A!=B},"^=":function(A,B){return A.startsWith(B)},"$=":function(A,B){return A.endsWith(B)},"*=":function(A,B){return A.include(B)},"~=":function(A,B){return(" "+A+" ").include(" "+B+" ")},"|=":function(A,B){return("-"+A.toUpperCase()+"-").include("-"+B.toUpperCase()+"-")}},matchElements:function(B,A){var G=new Selector(A).findElements(),F=Selector.handlers;F.mark(G);for(var E=0,D=[],C;C=B[E];E++){if(C._counted){D.push(C)}}F.unmark(G);return D},findElement:function(B,A,C){if(typeof A=="number"){C=A;A=false}return Selector.matchElements(B,A||"*")[C||0]},findChildElements:function(D,B){var H=B.join(","),B=[];H.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(I){B.push(I[1].strip())});var G=[],F=Selector.handlers;for(var E=0,C=B.length,A;E<C;E++){A=new Selector(B[E].strip());F.concat(G,A.findElements(D))}return(C>1)?F.unique(G):G}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){$(A).reset();return A},serializeElements:function(C,B){var A=C.inject({},function(E,D){if(!D.disabled&&D.name){var G=D.name,F=$(D).getValue();if(F!=null){if(G in E){if(E[G].constructor!=Array){E[G]=[E[G]]}E[G].push(F)}else{E[G]=F}}}return E});return B?A:Hash.toQueryString(A)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(A){return $A($(A).getElementsByTagName("*")).inject([],function(C,B){if(Form.Element.Serializers[B.tagName.toLowerCase()]){C.push(Element.extend(B))}return C})},getInputs:function(B,A,H){B=$(B);var F=B.getElementsByTagName("input");if(!A&&!H){return $A(F).map(Element.extend)}for(var C=0,G=[],D=F.length;C<D;C++){var E=F[C];if((A&&E.type!=A)||(H&&E.name!=H)){continue}G.push(Element.extend(E))}return G},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(A){return $(A).getElements().find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var C=A.parameters;A.parameters=B.serialize(true);if(C){if(typeof C=="string"){C=C.toQueryParams()}Object.extend(A.parameters,C)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(B.readAttribute("action"),A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(B){B=$(B);if(!B.disabled&&B.name){var A=B.getValue();if(A!=undefined){var C={};C[B.name]=A;return Hash.toQueryString(C)}}return""},getValue:function(B){B=$(B);var A=B.tagName.toLowerCase();return Form.Element.Serializers[A](B)},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(A.type))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.blur();A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A);default:return Form.Element.Serializers.textarea(A)}},inputSelector:function(A){return A.checked?A.value:null},textarea:function(A){return A.value},select:function(A){return this[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(B){var A,D=B.length;if(!D){return null}for(var C=0,A=[];C<D;C++){var E=B.options[C];if(E.selected){A.push(this.optionValue(E))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(B,A,C){this.frequency=A;this.element=$(B);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var B=this.getValue();var A=("string"==typeof this.lastValue&&"string"==typeof B?this.lastValue!=B:String(this.lastValue)!=String(B));if(A){this.callback(this.element,B);this.lastValue=B}}};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(B,A){this.element=$(B);this.callback=A;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(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default: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,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,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(B,A){var C=Event.element(B);while(C.parentNode&&(!C.tagName||(C.tagName.toUpperCase()!=A.toUpperCase()))){C=C.parentNode}return C},observers:false,_observeAndCache:function(B,A,D,C){if(!this.observers){this.observers=[]}if(B.addEventListener){this.observers.push([B,A,D,C]);B.addEventListener(A,D,C)}else{if(B.attachEvent){this.observers.push([B,A,D,C]);B.attachEvent("on"+A,D)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0,B=Event.observers.length;A<B;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(B,A,D,C){B=$(B);C=C||false;if(A=="keypress"&&(Prototype.Browser.WebKit||B.attachEvent)){A="keydown"}Event._observeAndCache(B,A,D,C)},stopObserving:function(B,A,E,D){B=$(B);D=D||false;if(A=="keypress"&&(Prototype.Browser.WebKit||B.attachEvent)){A="keydown"}if(B.removeEventListener){B.removeEventListener(A,E,D)}else{if(B.detachEvent){try{B.detachEvent("on"+A,E)}catch(C){}}}}});if(Prototype.Browser.IE){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,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName=="BODY"){break}var C=Element.getStyle(B,"position");if(C=="relative"||C=="absolute"){break}}}while(B);return[D,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(C,B,D){var A=this.realOffset(C);this.xcomp=B+A[0]-this.deltaX;this.ycomp=D+A[1]-this.deltaY;this.offset=this.cumulativeOffset(C);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+C.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+C.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}},page:function(B){var A=0,C=0;var D=B;do{A+=D.offsetTop||0;C+=D.offsetLeft||0;if(D.offsetParent==document.body){if(Element.getStyle(D,"position")=="absolute"){break}}}while(D=D.offsetParent);D=B;do{if(!window.opera||D.tagName=="BODY"){A-=D.scrollTop||0;C-=D.scrollLeft||0}}while(D=D.parentNode);return[C,A]},clone:function(B,A){var F=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});B=$(B);var D=Position.page(B);A=$(A);var E=[0,0];var C=null;if(Element.getStyle(A,"position")=="absolute"){C=Position.offsetParent(A);E=Position.page(C)}if(C==document.body){E[0]-=document.body.offsetLeft;E[1]-=document.body.offsetTop}if(F.setLeft){A.style.left=(D[0]-E[0]+F.offsetLeft)+"px"}if(F.setTop){A.style.top=(D[1]-E[1]+F.offsetTop)+"px"}if(F.setWidth){A.style.width=B.offsetWidth+"px"}if(F.setHeight){A.style.height=B.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var A=Position.positionedOffset(B);var F=A[1];var E=A[0];var D=B.clientWidth;var C=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=D+"px";B.style.height=C+"px"},relativize:function(B){B=$(B);if(B.style.position=="relative"){return }Position.prepare();B.style.position="relative";var A=parseFloat(B.style.top||0)-(B._originalTop||0);var C=parseFloat(B.style.left||0)-(B._originalLeft||0);B.style.top=A+"px";B.style.left=C+"px";B.style.height=B._originalHeight;B.style.width=B._originalWidth}};if(Prototype.Browser.WebKit){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]}}Element.addMethods();String.prototype.parseColor=function(){var A="#";if(this.slice(0,4)=="rgb("){var C=this.slice(4,this.length-1).split(",");var B=0;do{A+=parseInt(C[B]).toColorPart()}while(++B<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var B=1;B<4;B++){A+=(this.charAt(B)+this.charAt(B)).toLowerCase()}}if(this.length==7){A=this.toLowerCase()}}}return(A.length==7?A:(arguments[0]||this))};Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(A,B){return $A($(A).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,B))?Element.collectTextNodesIgnoreClass(C,B):""))}).flatten().join("")};Element.setContentZoom=function(A,B){A=$(A);A.setStyle({fontSize:(B/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return A};Element.getInlineOpacity=function(A){return $(A).style.opacity||""};Element.forceRerendering=function(A){try{A=$(A);var C=document.createTextNode(" ");A.appendChild(C);A.removeChild(C)}catch(B){}};Array.prototype.call=function(){var A=arguments;this.each(function(B){B.apply(this,A)})};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(A){if(typeof Builder=="undefined"){throw ("Effect.tagifyText requires including script.aculo.us' builder.js library")}var B="position:relative";if(Prototype.Browser.IE){B+=";zoom:1"}A=$(A);$A(A.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){A.insertBefore(Builder.node("span",{style:B},D==" "?String.fromCharCode(160):D),C)});Element.remove(C)}})},multiple:function(B,C){var E;if(((typeof B=="object")||(typeof B=="function"))&&(B.length)){E=B}else{E=$(B).childNodes}var A=Object.extend({speed:0.1,delay:0},arguments[2]||{});var D=A.delay;$A(E).each(function(G,F){new C(G,Object.extend(A,{delay:F*A.speed+D}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(B,C){B=$(B);C=(C||"appear").toLowerCase();var A=Object.extend({queue:{position:"end",scope:(B.id||"global"),limit:1}},arguments[2]||{});Effect[B.visible()?Effect.PAIRS[C][1]:Effect.PAIRS[C][0]](B,A)}};var Effect2=Effect;Effect.Transitions={linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){var A=((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4;return(A>1?1:A)},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(B,A){A=A||5;return(Math.round((B%(1/A))*A)==0?((B*A*2)-Math.floor(B*A*2)):1-((B*A*2)-Math.floor(B*A*2)))},none:function(A){return 0},full:function(A){return 1}};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(A){this.effects._each(A)},add:function(B){var C=new Date().getTime();var A=(typeof B.options.queue=="string")?B.options.queue:B.options.queue.position;switch(A){case"front":this.effects.findAll(function(D){return D.state=="idle"}).each(function(D){D.startOn+=B.finishOn;D.finishOn+=B.finishOn});break;case"with-last":C=this.effects.pluck("startOn").max()||C;break;case"end":C=this.effects.pluck("finishOn").max()||C;break}B.startOn+=C;B.finishOn+=C;if(!B.options.queue.limit||(this.effects.length<B.options.queue.limit)){this.effects.push(B)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var C=new Date().getTime();for(var B=0,A=this.effects.length;B<A;B++){this.effects[B]&&this.effects[B].loop(C)}}});Effect.Queues={instances:$H(),get:function(A){if(typeof A!="string"){return A}if(!this.instances[A]){this.instances[A]=new Effect.ScopedQueue()}return this.instances[A]}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if(this.state=="idle"){this.state="running";'+codeForEvent(options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(options,"afterSetup")+'};if(this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this)}},loop:function(C){if(C>=this.startOn){if(C>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var B=(C-this.startOn)/this.totalTime,A=Math.round(B*this.totalFrames);if(A>this.currentFrame){this.render(B);this.currentFrame=A}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},inspect:function(){var A=$H();for(property in this){if(typeof this[property]!="function"){A[property]=this[property]}}return"#<Effect:"+A.inspect()+",options:"+$H(this.options).inspect()+">"}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(A){this.effects=A||[];this.start(arguments[1])},update:function(A){this.effects.invoke("render",A)},finish:function(A){this.effects.each(function(B){B.render(1);B.cancel();B.event("beforeFinish");if(B.finish){B.finish(A)}B.event("afterFinish")})}});Effect.Event=Class.create();Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){var A=Object.extend({duration:0},arguments[0]||{});this.start(A)},update:Prototype.emptyFunction});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var A=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(A)},update:function(A){this.element.setOpacity(A)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(A)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(A){this.element.setStyle({left:Math.round(this.options.x*A+this.originalLeft)+"px",top:Math.round(this.options.y*A+this.originalTop)+"px"})}});Effect.MoveBy=function(B,A,C){return new Effect.Move(B,Object.extend({x:C,y:A},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(B,C){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});this.start(A)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var A=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);this.fontSizeType=B}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*B+this.fontSizeType})}this.setDimensions(this.dims[0]*B,this.dims[1]*B)},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(A,D){var E={};if(this.options.scaleX){E.width=Math.round(D)+"px"}if(this.options.scaleY){E.height=Math.round(A)+"px"}if(this.options.scaleFromCenter){var C=(A-this.dims[0])/2;var B=(D-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){E.top=this.originalTop-C+"px"}if(this.options.scaleX){E.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){E.top=-C+"px"}if(this.options.scaleX){E.left=-B+"px"}}}this.element.setStyle(E)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(A)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]}.bind(this))},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(B,C,D){return B+(Math.round(this._base[D]+(this._delta[D]*A)).toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(A){this.element=$(A);this.start(arguments[1]||{})},setup:function(){Position.prepare();var B=Position.cumulativeOffset(this.element);if(this.options.offset){B[1]+=this.options.offset}var A=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(B[1]>A?A:B[1])-this.scrollStart},update:function(A){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(A*this.delta))}});Effect.Fade=function(C){C=$(C);var A=C.getInlineOpacity();var B=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return }D.element.hide().setStyle({opacity:A})}},arguments[1]||{});return new Effect.Opacity(C,B)};Effect.Appear=function(B){B=$(B);var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()}},arguments[1]||{});return new Effect.Opacity(B,A)};Effect.Puff=function(B){B=$(B);var A={opacity:B.getInlineOpacity(),position:B.getStyle("position"),top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};return new Effect.Parallel([new Effect.Scale(B,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(C){Position.absolutize(C.effects[0].element)},afterFinishInternal:function(C){C.effects[0].element.hide().setStyle(A)}},arguments[1]||{}))};Effect.BlindUp=function(A){A=$(A);A.makeClipping();return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(B){B=$(B);var A=B.getDimensions();return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(C){C.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(B){B=$(B);var A=B.getInlineOpacity();return new Effect.Appear(B,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:A})}})}},arguments[1]||{}))};Effect.DropOut=function(B){B=$(B);var A={top:B.getStyle("top"),left:B.getStyle("left"),opacity:B.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(B,{x:0,y:100,sync:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(C){C.effects[0].element.makePositioned()},afterFinishInternal:function(C){C.effects[0].element.hide().undoPositioned().setStyle(A)}},arguments[1]||{}))};Effect.Shake=function(B){B=$(B);var A={top:B.getStyle("top"),left:B.getStyle("left")};return new Effect.Move(B,{x:20,y:0,duration:0.05,afterFinishInternal:function(C){new Effect.Move(C.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(D){new Effect.Move(D.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(E){new Effect.Move(E.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(F){new Effect.Move(F.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(G){new Effect.Move(G.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(H){H.element.undoPositioned().setStyle(A)}})}})}})}})}})}})};Effect.SlideDown=function(C){C=$(C).cleanWhitespace();var A=C.down().getStyle("bottom");var B=C.getDimensions();return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:B.height,originalWidth:B.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:A})}},arguments[1]||{}))};Effect.SlideUp=function(B){B=$(B).cleanWhitespace();var A=B.down().getStyle("bottom");return new Effect.Scale(B,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(C){C.element.makePositioned();C.element.down().makePositioned();if(window.opera){C.element.setStyle({top:""})}C.element.makeClipping().show()},afterUpdateInternal:function(C){C.element.down().setStyle({bottom:(C.dims[0]-C.element.clientHeight)+"px"})},afterFinishInternal:function(C){C.element.hide().undoClipping().undoPositioned().setStyle({bottom:A});C.element.down().undoPositioned()}},arguments[1]||{}))};Effect.Squish=function(A){return new Effect.Scale(A,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(B){B.element.makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping()}})};Effect.Grow=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var G=C.getDimensions();var H,F;var E,D;switch(B.direction){case"top-left":H=F=E=D=0;break;case"top-right":H=G.width;F=D=0;E=-G.width;break;case"bottom-left":H=E=0;F=G.height;D=-G.height;break;case"bottom-right":H=G.width;F=G.height;E=-G.width;D=-G.height;break;case"center":H=G.width/2;F=G.height/2;E=-G.width/2;D=-G.height/2;break}return new Effect.Move(C,{x:H,y:F,duration:0.01,beforeSetup:function(I){I.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(I){new Effect.Parallel([new Effect.Opacity(I.element,{sync:true,to:1,from:0,transition:B.opacityTransition}),new Effect.Move(I.element,{x:E,y:D,sync:true,transition:B.moveTransition}),new Effect.Scale(I.element,100,{scaleMode:{originalHeight:G.height,originalWidth:G.width},sync:true,scaleFrom:window.opera?1:0,transition:B.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(J){J.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(J){J.effects[0].element.undoClipping().undoPositioned().setStyle(A)}},B))}})};Effect.Shrink=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var A={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var F=C.getDimensions();var E,D;switch(B.direction){case"top-left":E=D=0;break;case"top-right":E=F.width;D=0;break;case"bottom-left":E=0;D=F.height;break;case"bottom-right":E=F.width;D=F.height;break;case"center":E=F.width/2;D=F.height/2;break}return new Effect.Parallel([new Effect.Opacity(C,{sync:true,to:0,from:1,transition:B.opacityTransition}),new Effect.Scale(C,window.opera?1:0,{sync:true,transition:B.scaleTransition,restoreAfterFinish:true}),new Effect.Move(C,{x:E,y:D,sync:true,transition:B.moveTransition})],Object.extend({beforeStartInternal:function(G){G.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(G){G.effects[0].element.hide().undoClipping().undoPositioned().setStyle(A)}},B))};Effect.Pulsate=function(C){C=$(C);var B=arguments[1]||{};var A=C.getInlineOpacity();var E=B.transition||Effect.Transitions.sinoidal;var D=function(F){return E(1-Effect.Transitions.pulse(F,B.pulses))};D.bind(E);return new Effect.Opacity(C,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(F){F.element.setStyle({opacity:A})}},B),{transition:D}))};Effect.Fold=function(B){B=$(B);var A={top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};B.makeClipping();return new Effect.Scale(B,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(B,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(A)}})}},arguments[1]||{}))};Effect.Morph=Class.create();Object.extend(Object.extend(Effect.Morph.prototype,Effect.Base.prototype),{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}var B=Object.extend({style:{}},arguments[1]||{});if(typeof B.style=="string"){if(B.style.indexOf(":")==-1){var D="",A="."+B.style;$A(document.styleSheets).reverse().each(function(E){if(E.cssRules){cssRules=E.cssRules}else{if(E.rules){cssRules=E.rules}}$A(cssRules).reverse().each(function(F){if(A==F.selectorText){D=F.style.cssText;throw $break}});if(D){throw $break}});this.style=D.parseStyle();B.afterFinishInternal=function(E){E.element.addClassName(E.options.style);E.transforms.each(function(F){if(F.style!="opacity"){E.element.style[F.style]=""}})}}else{this.style=B.style.parseStyle()}}else{this.style=$H(B.style)}this.start(B)},setup:function(){function A(B){if(!B||["rgba(0, 0, 0, 0)","transparent"].include(B)){B="#ffffff"}B=B.parseColor();return $R(0,2).map(function(C){return parseInt(B.slice(C*2+1,C*2+3),16)})}this.transforms=this.style.map(function(G){var F=G[0],E=G[1],D=null;if(E.parseColor("#zzzzzz")!="#zzzzzz"){E=E.parseColor();D="color"}else{if(F=="opacity"){E=parseFloat(E);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(E)){var C=E.match(/^([\+\-]?[0-9\.]+)(.*)$/);E=parseFloat(C[1]);D=(C.length==3)?C[2]:null}}}var B=this.element.getStyle(F);return{style:F.camelize(),originalValue:D=="color"?A(B):parseFloat(B||0),targetValue:D=="color"?A(E):E,unit:D}}.bind(this)).reject(function(B){return((B.originalValue==B.targetValue)||(B.unit!="color"&&(isNaN(B.originalValue)||isNaN(B.targetValue))))})},update:function(A){var D={},B,C=this.transforms.length;while(C--){D[(B=this.transforms[C]).style]=B.unit=="color"?"#"+(Math.round(B.originalValue[0]+(B.targetValue[0]-B.originalValue[0])*A)).toColorPart()+(Math.round(B.originalValue[1]+(B.targetValue[1]-B.originalValue[1])*A)).toColorPart()+(Math.round(B.originalValue[2]+(B.targetValue[2]-B.originalValue[2])*A)).toColorPart():B.originalValue+Math.round(((B.targetValue-B.originalValue)*A)*1000)/1000+B.unit}this.element.setStyle(D,true)}});Effect.Transform=Class.create();Object.extend(Effect.Transform.prototype,{initialize:function(A){this.tracks=[];this.options=arguments[1]||{};this.addTracks(A)},addTracks:function(A){A.each(function(B){var C=$H(B).values().first();this.tracks.push($H({ids:$H(B).keys().first(),effect:Effect.Morph,options:{style:C}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(A){var B=[$(A.ids)||$$(A.ids)].flatten();return B.map(function(C){return new A.effect(C,Object.extend({sync:true},A.options))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.prototype.parseStyle=function(){var B=document.createElement("div");B.innerHTML='<div style="'+this+'"></div>';var C=B.childNodes[0].style,A=$H();Element.CSS_PROPERTIES.each(function(D){if(C[D]){A[D]=C[D]}});if(Prototype.Browser.IE&&this.indexOf("opacity")>-1){A.opacity=this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]}return A};Element.morph=function(A,B){new Effect.Morph(A,Object.extend({style:B},arguments[2]||{}));return A};["getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","morph"].each(function(A){Element.Methods[A]=Element[A]});Element.Methods.visualEffect=function(B,C,A){s=C.dasherize().camelize();effect_class=s.charAt(0).toUpperCase()+s.substring(1);new Effect[effect_class](B,A);return $(B)};Element.addMethods();if(typeof Effect=="undefined"){throw ("dragdrop.js requires including script.aculo.us' effects.js library")}var Droppables={drops:[],remove:function(A){this.drops=this.drops.reject(function(B){return B.element==$(A)})},add:function(B){B=$(B);var A=Object.extend({triggerIn:Prototype.emptyFunction,triggerOut:Prototype.emptyFunction,greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(A.containment){A._containers=[];var C=A.containment;if((typeof C=="object")&&(C.constructor==Array)){C.each(function(D){A._containers.push($(D))})}else{A._containers.push($(C))}}if(A.accept){A.accept=[A.accept].flatten()}A.element=B;this.drops.push(A)},findDeepestChild:function(A){deepest=A[0];for(i=1;i<A.length;++i){if(Element.isParent(A[i].element,deepest.element)){deepest=A[i]}}return deepest},isContained:function(B,A){var C;if(A.tree){C=B.treeNode}else{C=B.parentNode}return A._containers.detect(function(D){return C==D})},isAffected:function(A,C,B){return((B.element!=C)&&((!B._containers)||this.isContained(C,B))&&((!B.accept)||(Element.classNames(C).detect(function(D){return B.accept.include(D)})))&&Position.within(B.element,A[0],A[1]))},deactivate:function(A){if(this.last_active==A&&A.triggerOut){A.triggerOut(A);if(A.hoverclass){Element.removeClassName(A.element,A.hoverclass)}else{if(Boards&&Boards.notifyRankFor(A)){Boards.findIssue(A.element.id).deactivate()}}}this.last_active=null},activate:function(A,B){if(this.last_active!=A&&A.triggerIn){this.last_active=A;A.triggerIn(A);if(A.hoverclass){Element.addClassName(A.element,A.hoverclass)}else{if(Boards&&B&&Boards.notifyRankFor(A)){Boards.findIssue(A.element.id).activate(Boards.findIssue(B.id))}}}this.last_active=A},show:function(A,B){if(!this.drops.length){return }var C=[];if(this.last_active){this.deactivate(this.last_active)}this.drops.each(function(D){if(Droppables.isAffected(A,B,D)){C.push(D)}});if(C.length>0){drop=Droppables.findDeepestChild(C);Position.within(drop.element,A[0],A[1]);if(drop.onHover){drop.onHover(B,drop.element,Position.overlap(drop.overlap,drop.element))}Droppables.activate(drop,B)}},fire:function(B,A){if(!this.last_active){return }Position.prepare();if(this.isAffected([Event.pointerX(B),Event.pointerY(B)],A,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(A,this.last_active.element,B);return true}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(A){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress)}this.drags.push(A)},unregister:function(A){this.drags=this.drags.reject(function(B){return B==A});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress)}},activate:function(A){if(A.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;window.focus();Draggables.activeDraggable=A}.bind(this),A.options.delay)}else{window.focus();this.activeDraggable=A}},deactivate:function(){this.activeDraggable=null},updateDrag:function(A){if(!this.activeDraggable){return }var B=[Event.pointerX(A),Event.pointerY(A)];if(this._lastPointer&&(this._lastPointer.inspect()==B.inspect())){return }this._lastPointer=B;this.activeDraggable.updateDrag(A,B)},endDrag:function(A){if(this._timeout){clearTimeout(this._timeout);this._timeout=null}if(!this.activeDraggable){return }this._lastPointer=null;this.activeDraggable.endDrag(A);this.activeDraggable=null},keyPress:function(A){if(this.activeDraggable){this.activeDraggable.keyPress(A)}},addObserver:function(A){this.observers.push(A);this._cacheObserverCallbacks()},removeObserver:function(A){this.observers=this.observers.reject(function(B){return B.element==A});this._cacheObserverCallbacks()},notify:function(B,A,C){if(this[B+"Count"]>0){this.observers.each(function(D){if(D[B]){D[B](B,A,C)}})}if(A.options[B]){A.options[B](A,C)}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(A){Draggables[A+"Count"]=Draggables.observers.select(function(B){return B[A]}).length})}};var Draggable=Class.create();Draggable._dragging={};Draggable.prototype={initialize:function(B){var C={handle:false,reverteffect:function(F,E,D){var G=Math.sqrt(Math.abs(E^2)+Math.abs(D^2))*0.02;new Effect.Move(F,{x:-D,y:-E,duration:G,queue:{scope:"_draggable",position:"end"}})},endeffect:function(E){var D=typeof E._opacity=="number"?E._opacity:1;new Effect.Opacity(E,{duration:0.2,from:0.7,to:D,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[E]=false}})},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};if(!arguments[1]||typeof arguments[1].endeffect=="undefined"){Object.extend(C,{starteffect:function(D){D._opacity=Element.getOpacity(D);Draggable._dragging[D]=true;new Effect.Opacity(D,{duration:0.2,from:D._opacity,to:0.7})}})}var A=Object.extend(C,arguments[1]||{});this.element=$(B);if(A.handle&&(typeof A.handle=="string")){this.handle=this.element.down("."+A.handle,0)}if(!this.handle){this.handle=$(A.handle)}if(!this.handle){this.handle=this.element}if(A.scroll&&!A.scroll.scrollTo&&!A.scroll.outerHTML){A.scroll=$(A.scroll);this._isScrollChild=Element.childOf(this.element,A.scroll)}Element.makePositioned(this.element);this.delta=this.currentDelta();this.options=A;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])},initDrag:function(A){if(typeof Draggable._dragging[this.element]!="undefined"&&Draggable._dragging[this.element]){return }if(Event.isLeftClick(A)){var C=Event.element(A);if((tag_name=C.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return }var B=[Event.pointerX(A),Event.pointerY(A)];var D=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(E){return(B[E]-D[E])});Draggables.activate(this);Event.stop(A)}},startDrag:function(B){this.dragging=true;if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);Position.absolutize(this.element);this.element.parentNode.insertBefore(this._clone,this.element)}if(this.options.scroll){if(this.options.scroll==window){var A=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=A.left;this.originalScrollTop=A.top}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop}}Draggables.notify("onStart",this,B);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)}if(!this.options.quiet){Position.prepare();Droppables.show(pointer,this.element)}Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change){this.options.change(this)}if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft+Position.deltaX;p[1]+=this.options.scroll.scrollTop+Position.deltaY;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight)}var speed=[0,0];if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)}this.startScrolling(speed)}if(Prototype.Browser.WebKit){window.scrollBy(0,0)}if(Prototype.Browser.IE){document.selection.clear()}Event.stop(event)},finishDrag:function(B,E){this.dragging=false;if(this.options.quiet){Position.prepare();var D=[Event.pointerX(B),Event.pointerY(B)];Droppables.show(D,this.element)}if(this.options.ghosting){Position.relativize(this.element);Element.remove(this._clone);this._clone=null}var F=false;if(E){F=Droppables.fire(B,this.element);if(!F){F=false}}if(F&&this.options.onDropped){this.options.onDropped(this.element)}Draggables.notify("onEnd",this,B);var A=this.options.revert;if(A&&typeof A=="function"){A=A(this.element)}var C=this.currentDelta();if(A&&this.options.reverteffect){if(F==0||A!="failure"){this.options.reverteffect(this.element,C[1]-this.delta[1],C[0]-this.delta[0])}}else{this.delta=C}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(A){if(A.keyCode!=Event.KEY_ESC){return }this.finishDrag(A,false);Event.stop(A)},endDrag:function(A){if(!this.dragging){return }this.stopScrolling();this.finishDrag(A,true);Event.stop(A)},draw:function(A){var F=Position.cumulativeOffset(this.element);if(this.options.ghosting){var C=Position.realOffset(this.element);F[0]+=C[0]-Position.deltaX;F[1]+=C[1]-Position.deltaY}var E=this.currentDelta();F[0]-=E[0];F[1]-=E[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){F[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;F[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var D=[0,1].map(function(G){return(A[G]-F[G]-this.offset[G])}.bind(this));if(this.options.snap){if(typeof this.options.snap=="function"){D=this.options.snap(D[0],D[1],this)}else{if(this.options.snap instanceof Array){D=D.map(function(G,H){return Math.round(G/this.options.snap[H])*this.options.snap[H]}.bind(this))}else{D=D.map(function(G){return Math.round(G/this.options.snap)*this.options.snap}.bind(this))}}}var B=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){B.left=D[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){B.top=D[1]+"px"}if(B.visibility=="hidden"){B.visibility=""}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null}},startScrolling:function(A){if(!(A[0]||A[1])){return }this.scrollSpeed=[A[0]*this.options.scrollSpeed,A[1]*this.options.scrollSpeed];this.lastScrolled=new Date();this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var current=new Date();var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0}this.draw(Draggables._lastScrollPointer)}if(this.options.change){this.options.change(this)}},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft}else{if(w.document.body){T=body.scrollTop;L=body.scrollLeft}}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight}else{if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight}else{W=body.offsetWidth;H=body.offsetHeight}}}return{top:T,left:L,width:W,height:H}}};var SortableObserver=Class.create();SortableObserver.prototype={initialize:function(B,A){this.element=$(B);this.observer=A;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}};var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(A){while(A.tagName.toUpperCase()!="BODY"){if(A.id&&Sortable.sortables[A.id]){return A}A=A.parentNode}},options:function(A){A=Sortable._findRootElement($(A));if(!A){return }return Sortable.sortables[A.id]},destroy:function(A){var B=Sortable.options(A);if(B){Draggables.removeObserver(B.element);B.droppables.each(function(C){Droppables.remove(C)});B.draggables.invoke("destroy");delete Sortable.sortables[B.element.id]}},create:function(C){C=$(C);var B=Object.extend({element:C,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:C,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(C);var A={revert:true,quiet:B.quiet,scroll:B.scroll,scrollSpeed:B.scrollSpeed,scrollSensitivity:B.scrollSensitivity,delay:B.delay,ghosting:B.ghosting,constraint:B.constraint,handle:B.handle};if(B.starteffect){A.starteffect=B.starteffect}if(B.reverteffect){A.reverteffect=B.reverteffect}else{if(B.ghosting){A.reverteffect=function(F){F.style.top=0;F.style.left=0}}}if(B.endeffect){A.endeffect=B.endeffect}if(B.zindex){A.zindex=B.zindex}var D={overlap:B.overlap,containment:B.containment,tree:B.tree,hoverclass:B.hoverclass,onHover:Sortable.onHover};var E={onHover:Sortable.onEmptyHover,overlap:B.overlap,containment:B.containment,hoverclass:B.hoverclass};Element.cleanWhitespace(C);B.draggables=[];B.droppables=[];if(B.dropOnEmpty||B.tree){Droppables.add(C,E);B.droppables.push(C)}(B.elements||this.findElements(C,B)||[]).each(function(H,F){var G=B.handles?$(B.handles[F]):(B.handle?$(H).getElementsByClassName(B.handle)[0]:H);B.draggables.push(new Draggable(H,Object.extend(A,{handle:G})));Droppables.add(H,D);if(B.tree){H.treeNode=C}B.droppables.push(H)});if(B.tree){(Sortable.findTreeElements(C,B)||[]).each(function(F){Droppables.add(F,E);F.treeNode=C;B.droppables.push(F)})}this.sortables[C.id]=B;Draggables.addObserver(new SortableObserver(C,B.onUpdate))},findElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.tag)},findTreeElements:function(B,A){return Element.findChildren(B,A.only,A.tree?true:false,A.treeTag)},onHover:function(E,D,A){if(Element.isParent(D,E)){return }if(A>0.33&&A<0.66&&Sortable.options(D).tree){return }else{if(A>0.5){Sortable.mark(D,"before");if(D.previousSibling!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,D);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}else{Sortable.mark(D,"after");var C=D.nextSibling||null;if(C!=E){var B=E.parentNode;E.style.visibility="hidden";D.parentNode.insertBefore(E,C);if(D.parentNode!=B){Sortable.options(B).onChange(E)}Sortable.options(D.parentNode).onChange(E)}}}},onEmptyHover:function(E,G,H){var I=E.parentNode;var A=Sortable.options(G);if(!Element.isParent(G,E)){var F;var C=Sortable.findElements(G,{tag:A.tag,only:A.only});var B=null;if(C){var D=Element.offsetSize(G,A.overlap)*(1-H);for(F=0;F<C.length;F+=1){if(D-Element.offsetSize(C[F],A.overlap)>=0){D-=Element.offsetSize(C[F],A.overlap)}else{if(D-(Element.offsetSize(C[F],A.overlap)/2)>=0){B=F+1<C.length?C[F+1]:null;break}else{B=C[F];break}}}}G.insertBefore(E,B);Sortable.options(I).onChange(E);A.onChange(E)}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()}},mark:function(B,A){var D=Sortable.options(B.parentNode);if(D&&!D.ghosting){return }if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});document.getElementsByTagName("body").item(0).appendChild(Sortable._marker)}var C=Position.cumulativeOffset(B);Sortable._marker.setStyle({left:C[0]+"px",top:C[1]+"px"});if(A=="after"){if(D.overlap=="horizontal"){Sortable._marker.setStyle({left:(C[0]+B.clientWidth)+"px"})}else{Sortable._marker.setStyle({top:(C[1]+B.clientHeight)+"px"})}}Sortable._marker.show()},_tree:function(E,B,F){var D=Sortable.findElements(E,B)||[];for(var C=0;C<D.length;++C){var A=D[C].id.match(B.format);if(!A){continue}var G={id:encodeURIComponent(A?A[1]:null),element:E,parent:F,children:[],position:F.children.length,container:$(D[C]).down(B.treeTag)};if(G.container){this._tree(G.container,B,G)}F.children.push(G)}return F},tree:function(D){D=$(D);var C=this.options(D);var B=Object.extend({tag:C.tag,treeTag:C.treeTag,only:C.only,name:D.id,format:C.format},arguments[1]||{});var A={id:null,parent:null,children:[],container:D,position:0};return Sortable._tree(D,B,A)},_constructIndex:function(B){var A="";do{if(B.id){A="["+B.position+"]"+A}}while((B=B.parent)!=null);return A},sequence:function(B){B=$(B);var A=Object.extend(this.options(B),arguments[1]||{});return $(this.findElements(B,A)||[]).map(function(C){return C.id.match(A.format)?C.id.match(A.format)[1]:""})},setSequence:function(B,C){B=$(B);var A=Object.extend(this.options(B),arguments[2]||{});var D={};this.findElements(B,A).each(function(E){if(E.id.match(A.format)){D[E.id.match(A.format)[1]]=[E,E.parentNode]}E.parentNode.removeChild(E)});C.each(function(E){var F=D[E];if(F){F[1].appendChild(F[0]);delete D[E]}})},serialize:function(C){C=$(C);var B=Object.extend(Sortable.options(C),arguments[1]||{});var A=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:C.id);if(B.tree){return Sortable.tree(C,arguments[1]).children.map(function(D){return[A+Sortable._constructIndex(D)+"[id]="+encodeURIComponent(D.id)].concat(D.children.map(arguments.callee))}).flatten().join("&")}else{return Sortable.sequence(C,arguments[1]).map(function(D){return A+"[]="+encodeURIComponent(D)}).join("&")}}};Element.isParent=function(B,A){if(!B.parentNode||B==A){return false}if(B.parentNode==A){return true}return Element.isParent(B.parentNode,A)};Element.findChildren=function(D,B,A,C){if(!D.hasChildNodes()){return null}C=C.toUpperCase();if(B){B=[B].flatten()}var E=[];$A(D.childNodes).each(function(G){if(G.tagName&&G.tagName.toUpperCase()==C&&(!B||(Element.classNames(G).detect(function(H){return B.include(H)})))){E.push(G)}if(A){var F=Element.findChildren(G,B,A,C);if(F){E.push(F)}}});return(E.length>0?E.flatten():[])};Element.offsetSize=function(A,B){return A["offset"+((B=="vertical"||B=="height")?"Height":"Width")]};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_ie6=(Calendar.is_ie&&/msie 6\.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 D=A.relatedTarget;if(!D){var B=A.type;if(B=="mouseover"){D=A.fromElement}else{if(B=="mouseout"){D=A.toElement}}}while(D){if(D==C){return true}D=D.parentNode}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(A,M){var L=null;if(!M){L=document.getElementsByTagName("body")[0];this.isPopup=true}else{L=M;this.isPopup=false}this.date=this.dateStr?new Date(this.dateStr):new Date();var P=Calendar.createElement("table");this.table=P;P.cellSpacing=0;P.cellPadding=0;P.calendar=this;Calendar.addEvent(P,"mousedown",Calendar.tableMouseDown);var C=Calendar.createElement("div");this.element=C;C.className="calendar";if(this.isPopup){C.style.position=A;C.style.display="none"}C.appendChild(P);var J=Calendar.createElement("thead",P);var N=null;var Q=null;var B=this;var F=function(T,S,R){N=Calendar.createElement("td",Q);N.colSpan=S;N.className="button";if(R!=0&&Math.abs(R)<=2){N.className+=" nav"}Calendar._add_evs(N);N.calendar=B;N.navtype=R;N.innerHTML="<div unselectable='on'>"+T+"</div>";return N};Q=Calendar.createElement("tr",J);var D=6;(this.isPopup)&&--D;(this.weekNumbers)&&++D;F("?",1,400).ttip=Calendar._TT.INFO;this.title=F("",D,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT.DRAG_TO_MOVE;this.title.style.cursor="move";F("&#x00d7;",1,200).ttip=Calendar._TT.CLOSE}Q=Calendar.createElement("tr",J);Q.className="headrow";this._nav_py=F("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT.PREV_YEAR;this._nav_pm=F("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT.PREV_MONTH;this._nav_now=F(Calendar._TT.TODAY,this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT.GO_TODAY;this._nav_nm=F("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT.NEXT_MONTH;this._nav_ny=F("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT.NEXT_YEAR;Q=Calendar.createElement("tr",J);Q.className="daynames";if(this.weekNumbers){N=Calendar.createElement("td",Q);N.className="name wn";N.innerHTML=Calendar._TT.WK}for(var I=7;I>0;--I){N=Calendar.createElement("td",Q);if(!I){N.navtype=100;N.calendar=this;Calendar._add_evs(N)}}this.firstdayname=(this.weekNumbers)?Q.firstChild.nextSibling:Q.firstChild;this._displayWeekdays();var H=Calendar.createElement("tbody",P);this.tbody=H;for(I=6;I>0;--I){Q=Calendar.createElement("tr",H);if(this.weekNumbers){N=Calendar.createElement("td",Q)}for(var G=7;G>0;--G){N=Calendar.createElement("td",Q);N.calendar=this;Calendar._add_evs(N)}}if(this.showsTime){Q=Calendar.createElement("tr",H);Q.className="time";N=Calendar.createElement("td",Q);N.className="time";N.colSpan=2;N.innerHTML=Calendar._TT.TIME||"&nbsp;";N=Calendar.createElement("td",Q);N.className="time";N.colSpan=this.weekNumbers?4:3;(function(){function U(d,f,e,g){var b=Calendar.createElement("span",N);b.className=d;b.innerHTML=f;b.calendar=B;b.ttip=Calendar._TT.TIME_PART;b.navtype=50;b._range=[];if(typeof e!="number"){b._range=e}else{for(var c=e;c<=g;++c){var a;if(c<10&&g>=10){a="0"+c}else{a=""+c}b._range[b._range.length]=a}}Calendar._add_evs(b);return b}var Y=B.date.getHours();var R=B.date.getMinutes();var Z=!B.time24;var S=(Y>12);if(Z&&S){Y-=12}var W=U("hour",Y,Z?1:0,Z?12:23);var V=Calendar.createElement("span",N);V.innerHTML=":";V.className="colon";var T=U("minute",R,0,59);var X=null;N=Calendar.createElement("td",Q);N.className="time";N.colSpan=2;if(Z){X=U("ampm",S?Calendar._TT.PM:Calendar._TT.AM,[Calendar._TT.am,Calendar._TT.pm])}else{N.innerHTML="&nbsp;"}B.onSetTime=function(){var b,a=this.date.getHours(),c=this.date.getMinutes();if(Z){b=(a>=12);if(b){a-=12}if(a==0){a=12}X.innerHTML=b?Calendar._TT.pm:Calendar._TT.am}W.innerHTML=(a<10)?("0"+a):a;T.innerHTML=(c<10)?("0"+c):c};B.onUpdateTime=function(){var b=this.date;var c=parseInt(W.innerHTML,10);if(Z){if(/pm/i.test(X.innerHTML)&&c<12){c+=12}else{if(/am/i.test(X.innerHTML)&&c==12){c=0}}}var e=b.getDate();var a=b.getMonth();var f=b.getFullYear();b.setHours(c);b.setMinutes(parseInt(T.innerHTML,10));b.setFullYear(f);b.setMonth(a);b.setDate(e);this.dateClicked=false;this.callHandler()}})()}else{this.onSetTime=this.onUpdateTime=function(){}}var K=Calendar.createElement("tfoot",P);Q=Calendar.createElement("tr",K);Q.className="footrow";N=F(Calendar._TT.SEL_DATE,this.weekNumbers?8:7,300);N.className="ttip";if(this.isPopup){N.ttip=Calendar._TT.DRAG_TO_MOVE;N.style.cursor="move"}this.tooltips=N;C=Calendar.createElement("div",this.element);this.monthsCombo=C;C.className="combo";for(I=0;I<Calendar._MN.length;++I){var E=Calendar.createElement("div");E.className=Calendar.is_ie?"label-IEfix":"label";E.month=I;E.innerHTML=Calendar._SMN[I];C.appendChild(E)}C=Calendar.createElement("div",this.element);this.yearsCombo=C;C.className="combo";for(I=12;I>0;--I){var O=Calendar.createElement("div");O.className=Calendar.is_ie?"label-IEfix":"label";C.appendChild(O)}this._init(this.firstDayOfWeek,this.date);L.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(M,W){var V=new Date(),Q=V.getFullYear(),Y=V.getMonth(),B=V.getDate();this.table.style.visibility="hidden";var I=W.getFullYear();if(I<this.minYear){I=this.minYear;W.setFullYear(I)}else{if(I>this.maxYear){I=this.maxYear;W.setFullYear(I)}}this.firstDayOfWeek=M;this.date=new Date(W);var X=W.getMonth();var a=W.getDate();var Z=W.getMonthDays();W.setDate(1);var R=(W.getDay()-this.firstDayOfWeek)%7;if(R<0){R+=7}W.setDate(-R);W.setDate(W.getDate()+1);var F=this.tbody.firstChild;var K=Calendar._SMN[X];var O=this.ar_days=new Array();var N=Calendar._TT.WEEKEND;var D=this.multiple?(this.datesCells={}):null;for(var T=0;T<6;++T,F=F.nextSibling){var A=F.firstChild;if(this.weekNumbers){A.className="day wn";var E=W;if(X==0&&T==0&&Date.useISO8601WeekNumbers==false){E=new Date(I,X,1)}A.innerHTML=E.getWeekNumber();A=A.nextSibling}F.className="daysrow";var U=false,G,C=O[T]=[];for(var S=0;S<7;++S,A=A.nextSibling,W.setDate(G+1)){G=W.getDate();var H=W.getDay();A.className="day";A.pos=T<<4|S;C[S]=A;var L=(W.getMonth()==X);if(!L){if(this.showsOtherMonths){A.className+=" othermonth";A.otherMonth=true}else{A.className="emptycell";A.innerHTML="&nbsp;";A.disabled=true;continue}}else{A.otherMonth=false;U=true}A.disabled=false;A.innerHTML=this.getDateText?this.getDateText(W,G):G;if(D){D[W.print("%Y%m%d")]=A}if(this.getDateStatus){var P=this.getDateStatus(W,I,X,G);if(this.getDateToolTip){var J=this.getDateToolTip(W,I,X,G);if(J){A.title=J}}if(P===true){A.className+=" disabled";A.disabled=true}else{if(/disabled/i.test(P)){A.disabled=true}A.className+=" "+P}}if(!A.disabled){A.caldate=new Date(W);A.ttip="_";if(!this.multiple&&L&&G==a&&this.hiliteToday){A.className+=" selected";this.currentDateEl=A}if(W.getFullYear()==Q&&W.getMonth()==Y&&G==B){A.className+=" today";A.ttip+=Calendar._TT.PART_TODAY}if(N.indexOf(H.toString())!=-1){A.className+=A.otherMonth?" oweekend":" weekend"}}}if(!(U||this.showsOtherMonths)){F.className="emptyrow"}}this.title.innerHTML=Calendar._MN[X]+", "+I;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.zIndex=2003;B.left=A+"px";B.top=C+"px";this.show()};Calendar.prototype.showAtElement=function(C,E,D){var A=this;var F=Calendar.getAbsolutePos(C);if(!E||typeof E!="string"){this.showAt(F.x,F.y+C.offsetHeight);return true}function B(J){if(J.x<0){J.x=0}if(J.y<0){J.y=0}var K=document.createElement("div");var I=K.style;I.position=D;I.right=I.bottom=I.width=I.height="0px";document.body.appendChild(K);var H=Calendar.getAbsolutePos(K);document.body.removeChild(K);if(Calendar.is_ie6){H.y+=document.body.scrollTop;H.x+=document.body.scrollLeft}else{H.y+=window.scrollY;H.x+=window.scrollX}var G=J.x+J.width-H.x;if(G>0){J.x-=G}G=J.y+J.height-H.y;if(G>0){J.y-=G}}this.element.style.display="block";Calendar.continuation_for_the_khtml_browser=function(){var G=A.element.offsetWidth;var I=A.element.offsetHeight;A.element.style.display="none";var H=E.substr(0,1);var J="l";if(E.length>1){J=E.substr(1,1)}switch(H){case"T":F.y-=I;break;case"B":F.y+=C.offsetHeight;break;case"C":F.y+=(C.offsetHeight-I)/2;break;case"t":F.y+=C.offsetHeight-I;break;case"b":break}switch(J){case"L":F.x-=G;break;case"R":F.x+=C.offsetWidth;break;case"C":F.x+=(C.offsetWidth-G)/2;break;case"l":F.x+=C.offsetWidth-G;break;case"r":break}F.width=G;F.height=I+40;A.monthsCombo.style.display="none";B(F);A.showAt(F.x,F.y)};if(Calendar.is_khtml){setTimeout("Calendar.continuation_for_the_khtml_browser()",10)}else{Calendar.continuation_for_the_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._multisplit=function(E,F){if(E==null){return null}if(F==null){F=""}var B=[];var A=E.length;var D="";var C=false;for(i=0;i<A;i++){var G=E.charAt(i);if(F.indexOf(G)==-1){C=true;D+=G}else{if(C){B[B.length]=D;D="";C=false}}}if(D.length>0){B[B.length]=D}if(B.length==0){B[B.length]=""}return B};Date._parseNonDateFormatChars=function(D){var F="aAbBCdeHIJklmMnpPSstUWVuwyY%";var E="";var A=D.length;var C=false;for(i=0;i<A;i++){var G=D.charAt(i);if(G=="%"){var B="";if(i+1<A){B=D.charAt(i+1)}i=i+1;if(B.length>0&&F.indexOf(B)!=-1){continue}else{if(E.indexOf(G)==-1){E+=G}if(B.length>0&&E.indexOf(B)==-1){E+=B}}}else{if(E.indexOf(G)==-1){E+=G}}}return E};Date.parseDate=function(G,A){var H=new Date();var J=0;var B=-1;var F=0;var P=Date._parseNonDateFormatChars(A);var K=Date._multisplit(G,P);var I=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(I[E]){case"%d":case"%e":F=parseInt(K[E],10);break;case"%m":B=parseInt(K[E],10)-1;break;case"%Y":case"%y":J=parseInt(K[E],10);(J<100)&&(J+=(J>29)?1900:2000);break;case"%b":case"%B":var M=K[E].toLowerCase();var O=false;if(I[E]=="%b"){for(D=0;D<12;++D){if(Calendar._SMN[D].substr(0,M.length).toLowerCase()==M){B=D;O=true;break}}}if(!O){for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,M.length).toLowerCase()==M){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(J)){J=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(J!=0&&B!=-1&&F!=0){return new Date(J,B,F,L,C,0)}J=0;B=-1;F=0;for(E=0;E<K.length;++E){if(K[E].search(/[a-zA-Z]+/)!=-1){var N=-1;for(D=0;D<12;++D){if(Calendar._MN[D].substr(0,K[E].length).toLowerCase()==K[E].toLowerCase()){N=D;break}}if(N!=-1){if(B!=-1){F=B+1}B=N}}else{if(parseInt(K[E],10)<=12&&B==-1){B=K[E]-1}else{if(parseInt(K[E],10)>31&&J==0){J=parseInt(K[E],10);(J<100)&&(J+=(J>29)?1900:2000)}else{if(F==0){F=K[E]}}}}}if(J==0){J=H.getFullYear()}if(B!=-1&&F!=0){return new Date(J,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(){if(Date.useISO8601WeekNumbers){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}else{return this._getWeekNumberStandard()}};Date.prototype._getWeekNumberStandard=function(){var B=1000*60*60*24;var F=this;var H=F.getFullYear();var G=-1;var E=new Date(H,0,1);var D=E.getDay();var C=Math.ceil((F.getTime()-E.getTime())/B);if(C<0&&C>=(-1*D)){G=1}else{G=1;var A=new Date(E.getTime());A.setHours(0,0,0,0);while(A.getTime()<F.getTime()&&A.getFullYear()==H){G+=1;A.setDate(A.getDate()+7)}}return G};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?Calendar._TT.PM:Calendar._TT.AM;Q["%P"]=B?Calendar._TT.PM:Calendar._TT.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.positionStyle,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(G.positionStyle)}L.refresh();if(!G.position){L.showAtElement(G.button||G.displayArea||G.inputField,G.align,G.positionStyle)}else{L.showAt(G.position[0],G.position[1])}return false};return E};var GH={VERSION:"4.0"};GH.Util={doSubmit:function(evt,func){var charCode=(evt.which)?evt.which:evt.keyCode;if(charCode==13){eval(func)}},show:function(A){if($(A)){Element.show($(A))}},hide:function(A){if($(A)){Element.hide($(A))}},showAll:function(A){A.each(function(B){GH.Util.show(B)})},hideAll:function(A){A.each(function(B){GH.Util.hide(B)})},switchView:function(A,B){GH.Util.hide(B);GH.Util.show(A)},isVisible:function(A){return $(A)&&Element.visible($(A))},stopObserving:function(C,A,B){if($(C)){Event.stopObserving(C,A,B)}},innerValue:function(A){return($(A)?$(A).innerHTML:"")},write:function(B,A){if($(B)){$(B).innerHTML=A}},highLight:function(B,A){if($(B)){new Effect.Highlight($(B),{duration:A,queue:"parallel"})}},setClassName:function(B,A){if($(B)){$(B).className=A}},addClassName:function(B,A){if($(B)){$(B).addClassName(A)}},removeClassName:function(B,A){if($(B)){$(B).removeClassName(A)}},setBackground:function(B,A){if($(B)){$(B).style.backgroundColor=A}},setValue:function(B,A){if($(B)){$(B).value=A}},resetValues:function(A){A.each(function(B){GH.Util.setValue(B,"")})},setValueWithHTML:function(B,A){if($(B)){$(B).value=GH.Util.trim(GH.Util.innerValue(A))}},destroy:function(A){if($(A)){$(A).remove()}},trim:function(A){if(!A){return""}A=A.replace(/^\s+/g,"");A=A.replace(/&lt;/g,"<");A=A.replace(/&gt;/g,">");return A},findPos:function(A){return[AJS.$("#"+A).position().left,AJS.$("#"+A).position().top]},scrollTop:function(){return AJS.$(window).scrollTop()},getPopup:function(A,C,B,D){$(A).style.top=B+"px";$(A).style.left=C+"px";$(A).style.position="absolute";$(A).style.visibility="visible";if(D){$(A).style.zIndex=D}return $(A)},toDate:function(C){var D="";for(var B=0;B<C.length;B++){if((C.charAt(B)>="0")&&(C.charAt(B)<="9")){var A=B;while((C.charAt(A)>="0")&&(C.charAt(A)<="9")&&A<C.length){D=D+C.charAt(A++)}D=D+C.charAt(A+1)+" ";B=A+2}}return D},toggle:function(A){if($(A)){if($F(A)){$(A).checked=""}else{$(A).checked="checked"}}},setValue:function(B,A){if($(B)){$(B).value=A}},selectionText:function(A){return A.options[A.selectedIndex].text},forceWidth:function(B,A){if(!!(window.attachEvent&&!window.opera)){$(B).style.width=A}},isFireFox:function(){return navigator.userAgent&&navigator.userAgent.indexOf("Firefox")!=-1},windownDim:function(){return[AJS.$(window).width(),AJS.$(window).height()]},openWindow:function(A,B){return window.open(A,B,"location=0,left="+((this.windownDim[0]-800)/2)+",top="+((this.windownDim[1]-600)/2)+",width=820px,height=600px,menubar=1,resizable=1,toolbar=0,scrollbars=1")},charCounter:function(B,D,A,C){if($F(D).length>A){$(D).value=$F(D).substring(0,A)}GH.Util.write(C,""+(A-$F(D).length))},verifyKeyCode:function(B){var A=(B.which)?B.which:B.keyCode;if(A==8||A==9){return true}if(A>31&&A<41){return true}if(A>43&&A<60){return true}if(A>64&&A<91){return true}if(A>94&&A<123){return true}return false},isSelectionModifier:function(A){var B=(navigator.appVersion.indexOf("Mac")!==-1)?true:false;return A.ctrlKey||((B&&A.metaKey)||(!B&&A.altKey))},stopPropagationFor:function(B,A){A.each(function(C){Event.observe($(C),B,GH.Util.stopPropagation)})},stopPropagation:function(A){if(!A){var A=window.event}A.cancelBubble=true;A.returnValue=false;if(A.stopPropagation){A.stopPropagation();A.preventDefault()}},switchParent:function(A){$$("div[id^=parent_]").each(function(B){GH.Util.hide(B)});GH.Util.show("parent_"+A)},verifyNumInput:function(B){var A=(B.which)?B.which:B.keyCode;if(A==8||A==46){return true}else{if(A>34&&A<41){return true}else{return GH.Util.isNumKey(B)}}},isNumKey:function(B){var A=(B.which)?B.which:B.keyCode;if(A>47&&A<58){return true}return false},toPath:function(A){return A.replace(/\\/g,"/")}};Encoder={EncodeType:"entity",isEmpty:function(A){if(A){return((A===null)||A.length==0||/^\s+$/.test(A))}else{return true}},HTML2Numerical:function(C){var B=new Array("&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&agrave;","&aacute;","&acirc;","&atilde;","&Auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&Ouml;","&times;","&oslash;","&ugrave;","&uacute;","&ucirc;","&Uuml;","&yacute;","&thorn;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&oelig;","&oelig;","&scaron;","&scaron;","&yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;");var A=new Array("&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;");return this.swapArrayVals(C,B,A)},NumericalToHTML:function(C){var B=new Array("&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;");var A=new Array("&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&agrave;","&aacute;","&acirc;","&atilde;","&Auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&Ouml;","&times;","&oslash;","&ugrave;","&uacute;","&ucirc;","&Uuml;","&yacute;","&thorn;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&oelig;","&oelig;","&scaron;","&scaron;","&yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;");return this.swapArrayVals(C,B,A)},numEncode:function(B){if(this.isEmpty(B)){return""}var C="";for(var A=0;A<B.length;A++){var D=B.charAt(A);if(D<" "||D>"~"){D="&#"+D.charCodeAt()+";"}C+=D}return C},htmlDecode:function(C){var E,B,D=C;if(this.isEmpty(D)){return""}D=this.HTML2Numerical(D);arr=D.match(/&#[0-9]{1,5};/g);if(arr!=null){for(var A=0;A<arr.length;A++){B=arr[A];E=B.substring(2,B.length-1);if(E>=-32768&&E<=65535){D=D.replace(B,String.fromCharCode(E))}else{D=D.replace(B,"")}}}return D},htmlEncode:function(A,B){if(this.isEmpty(A)){return""}B=B|false;if(B){if(this.EncodeType=="numerical"){A=A.replace(/&/g,"&#38;")}else{A=A.replace(/&/g,"&amp;")}}A=this.XSSEncode(A,false);if(this.EncodeType=="numerical"||!B){A=this.HTML2Numerical(A)}A=this.numEncode(A);if(!B){A=A.replace(/&#/g,"##AMPHASH##");if(this.EncodeType=="numerical"){A=A.replace(/&/g,"&#38;")}else{A=A.replace(/&/g,"&amp;")}A=A.replace(/##AMPHASH##/g,"&#")}A=A.replace(/&#\d*([^\d;]|$)/g,"$1");if(!B){A=this.correctEncoding(A)}if(this.EncodeType=="entity"){A=this.NumericalToHTML(A)}return A},XSSEncode:function(B,A){if(!this.isEmpty(B)){A=A||true;if(A){B=B.replace(/\'/g,"&#39;");B=B.replace(/\"/g,"&quot;");B=B.replace(/</g,"&lt;");B=B.replace(/>/g,"&gt;")}else{B=B.replace(/\'/g,"&#39;");B=B.replace(/\"/g,"&#34;");B=B.replace(/</g,"&#60;");B=B.replace(/>/g,"&#62;")}return B}else{return""}},stripUnicode:function(A){return A.replace(/[^\x20-\x7E]/g,"")},correctEncoding:function(A){return A.replace(/(&amp;)(amp;)+/,"$1")},swapArrayVals:function(F,C,B){if(this.isEmpty(F)){return""}var E;if(C&&B){if(C.length==B.length){for(var A=0,D=C.length;A<D;A++){E=new RegExp(C[A],"g");F=F.replace(E,B[A])}}}return F},inArray:function(D,B){for(var C=0,A=B.length;C<A;C++){if(B[C]===D){return C}}return -1}};var CookieUtil=new function(){this.hide=function(A){this.setShowHideCookie(A,"hide")};this.clear=function(A){this.setShowHideCookie(A,"")};this.getCookieValue=function(E){var A=E+"=";var B=document.cookie.split(";");for(var C=0;C<B.length;C++){var D=B[C];while(D.charAt(0)==" "){D=D.substring(1,D.length)}if(D.indexOf(A)==0){return D.substring(A.length,D.length)}}return null};this.saveCookie=function(F,B,E){var A;var D=this.getCookieValue("JSESSIONID");if(E){var C=new Date();C.setTime(C.getTime()+(E*24*60*60*1000));A="; expires="+C.toGMTString()}else{A=""}document.cookie=F+"="+B+A;document.cookie="JSESSIONID="+D+"; path=/"};this.readCookie=function(C,A){var B=this.getCookieValue(C);if(B!=null){return B}if(A){return A}return null};this.setShowHideCookie=function(B,A){if(A=="hide"){this.saveCookie(B,A,365)}else{this.saveCookie(B,"",-1)}};this.toggleVisibility=function(C,B,A){if(GH.Util.isVisible(C)){GH.Util.hide(C);GH.Util.switchView(B,A);this.setShowHideCookie(C,"hide")}else{GH.Util.switchView(A,B);GH.Util.show(C);this.setShowHideCookie(C,"show")}};this.initBoardsToggle=function(C,B,A){if(this.readCookie(C,"show")=="hide"){GH.Util.hide(C);GH.Util.switchView(B,A)}else{GH.Util.show(C);GH.Util.switchView(A,B)}};this.initColumnToggle=function(){if(this.readCookie("column","show")=="hide"){GH.Util.hide("column");GH.Util.setClassName("gh-pb-layout-table","gh-column-hidden")}};this.toggleColumn=function(){if(GH.Util.isVisible("column")){GH.Util.setClassName("gh-pb-layout-table","gh-column-hidden")}else{if(!GH.Util.isVisible("column")){GH.Util.removeClassName("gh-pb-layout-table","gh-column-hidden")}}this.toggleVisibility("column","","")};this.expandAllBoards=function(D,B){var C=$$(B+'[class^="'+D+'"]');for(var A=0;A<C.length;A++){this.expandBoard(C[A].id)}};this.colapseAllBoards=function(D,B){var C=$$(B+'[class^="'+D+'"]');for(var A=0;A<C.length;A++){this.colapseBoard(C[A].id)}};this.expandBoard=function(A){this.setShowHideCookie(A,"show");GH.Util.switchView("colapse_"+this.getDbId(A),"expand_"+this.getDbId(A));GH.Util.show(A)};this.colapseBoard=function(A){this.setShowHideCookie(A,"hide");GH.Util.switchView("expand_"+this.getDbId(A),"colapse_"+this.getDbId(A));GH.Util.hide(A)};this.getDbId=function(B){var A=B.split("_");return A[A.length-1]}};if(Prototype.Browser.IE){window.onresize=null}var Boards=new function(){this.boards=[];this.ctx;this.waiting="";this.searchStart=0;this.clickCount=0;this.inSearchMode=false;this.needsRefresh=false;this.listView;this.compactView;this.numbSum=2;this.selectedBoardId;this.selectedProjectId;this.linkId;this.pluginKey="com.pyxis.greenhopper.jira:greenhopper-webactions";this.init=function(C,G,F,B,D,A,E){this.selectedProjectId=C;this.selectedBoardId=G;this.linkId=F;this.delay=D;this.ctx=A;this.numbSum=E;this.autoRefresh=B;this.doRefresh(0,Boards.delay);this.addBoard(G)};this.openActionMenu=function(A){Boards.closePopups();GH.Util.setClassName($(A+"-dd").parentNode,"gh-dd-parent dd-allocated active");Boards.openWithShadow(A,[null,$(A).getHeight()])};this.closeMenuAction=function(){$$("ul[class^=gh-dropdown]").each(function(A){GH.Util.setClassName(A.parentNode,"gh-dd-parent dd-allocated");GH.Util.hideAll([A,A.id+"-s"])})};this.centerArrow=function(){var B=GH.Util.findPos("gh-pb-layout-table")[1],A=GH.Util.windownDim()[1];if(AJS.$.browser.msie&&AJS.$.browser.version==="7.0"){$$("td#toggle-column span")[0].setStyle({top:A/2+GH.Util.scrollTop()+"px"})}else{$$("td#toggle-column span")[0].setStyle({top:(A+B)/2+GH.Util.scrollTop()+"px"})}};this.openOption=function(A,C){Boards.closePopups();var B=C?A+"_"+C:A;GH.Util.write(B,"");Boards.updater(B,"Get"+A,$H({dropBoardId:(C?C:-1)}),true);GH.Util.show(B)};this.ffocus=function(A){if($(A)){$(A).focus()}};this.showPopup=function(B,A){if($(B+"-dd")){$(B+"-dd").setStyle({left:A[0]+"px",top:A[1]+"px"});Boards.openWithShadow(B,[A[0]-8,A[1]])}GH.Util.hideAll(["opt_wait",B+"_wait"])};this.modalPopup=function(A,C){GH.Util.switchView(A,"waiting_display");var B=$(C+"-dd").parentNode.style.paddingTop;Boards.openWithShadow(C,[-8,B.substring(0,B.length-2)]);if($("popup-scroll")){$("popup-scroll").scrollTop=0}GH.Util.hideAll(["opt_wait",C+"_wait"])};this.popup=function(A,B,F){if($(A+"-dd")){var E=0;var C=0;var I=F&&$(F)?$(F):$(A);var G=I;while(G.offsetParent){E+=G.offsetLeft;C+=G.offsetTop;G=G.offsetParent}var D=E-B/2;if(E<B/2){D=3}else{if(GH.Util.windownDim()[0]-E<B/2){D=GH.Util.windownDim()[0]-B-(GH.Util.isFireFox()?24:9)}}var H=C+Element.getHeight(I)+(Prototype.Browser.IE?3:2);I=G=null;Boards.showPopup(A,[D,H])}GH.Util.hideAll(["opt_wait",A+"_wait"])};this.openWithShadow=function(D,B){if(!$(D+"-dd")||$(D+"-dd").innerHTML==""){return }GH.Util.setClassName(D+"-dd-s","gh-shadow");var C=$(D+"-dd").getWidth();var A=$(D+"-dd").getHeight();if(B[0]!=null){$(D+"-dd-s").setStyle({top:B[1]+"px",left:B[0]+"px",width:(C+16)+"px",height:(A+14)+"px"})}else{$(D+"-dd-s").setStyle({top:B[1]+"px",width:(C+16)+"px",height:(A+14)+"px"})}$(D+"-dd-s").innerHTML='<div class="tl"></div><div class="tr"></div><div class="l" style="height:'+(A-8)+'px;"></div><div class="r" style="height:'+(A-8)+'px;"></div><div class="bl"></div><div class="br"></div><div class="b" style="width:'+(C-12)+'px;"></div>';GH.Util.showAll([D+"-dd",D+"-dd-s"])};this.openStepMenu=function(A){GH.Util.setClassName("menu_"+A,"gh-dd-parent dd-allocated active");Boards.updater("menu_"+A,"GetColumnMenu",$H({stepId:A}),true)};this.popupError=function(){GH.Util.show("popuperrors");GH.Util.highLight("popuperrors",2);if($("popup-scroll")){$("popup-scroll").scrollTop=0}};this.toggleColumn=function(A,B){Boards.submit(A,$H({stepId:B}))};this.addBoard=function(A){Boards.boards[Boards.boards.size()]=new Board(A)};this.getBoard=function(C){for(var B=0,A=Boards.boards.size();B<A;B++){if(Boards.boards[B].id==C){return Boards.boards[B]}}};this.showBoards=function(A){Boards.boards.each(function(B){var C="drop_"+B.id;if(A.join().include(B.id)==true){GH.Util.show(C)}else{GH.Util.hide(C)}})};this.setAsFavorite=function(){GH.Util.switchView("favPrj2","favPrj1");Boards.request("SetFavoriteProject",$H({}))};this.initTB=function(A){CookieUtil.initBoardsToggle("gh_tb_"+A,"expand_"+A,"colapse_"+A)};this.toggleTB=function(A){CookieUtil.toggleVisibility("gh_tb_"+A,"expand_"+A,"colapse_"+A)};this.edit=function(A){Boards.updater(A,"Get"+A,$H({}),true)};this.editCapacity=function(A){$(A+"_max").value=$F(A+"_maxValue");$(A+"_min").value=$F(A+"_minValue");GH.Util.switchView(A+"Edit",A+"Txt");GH.Util.switchView(A+"Edit_links",A+"Txt_links");Boards.ffocus(A+"_min")};this.cancelCapacity=function(A){GH.Util.switchView(A+"Txt",A+"Edit");GH.Util.switchView(A+"Txt_links",A+"Edit_links")};this.setCapacity=function(A){GH.Util.show("Stats_wait");Boards.updater("statistics-table","SetDefaultCapacity",$H({fieldId:A,maxCapacity:$F(A+"_max"),minCapacity:$F(A+"_min")}),true)};this.getColCapacity=function(A){Boards.updater("confirmation","GetTBCapacity",$H({stepId:A}))};this.setColCapacity=function(A,B){GH.Util.show("Stats_wait");Boards.updater("statistics-table","SetTBCapacity",$H({stepId:B,fieldId:A,maxCapacity:$F(A+"_max"),minCapacity:$F(A+"_min")}),true)};this.addStats=function(){GH.Util.show("Stats_wait");Boards.updater("statistics-table","AddStats",$H({fieldId:$F("statsSelect"),maxCapacity:$F("capacity_max"),minCapacity:$F("capacity_min")}),true)};this.removeStats=function(A){GH.Util.show("Stats_wait");Boards.updater("statistics-table","RemoveStats",$H({fieldId:A}),true)};this.closeStats=function(){if($F("statRefresh")=="true"){Boards.showBoard(Boards.type(true))}else{Boards.doneWorking()}};this.is=function(A){return $(A)?true:false};this.isPlanningBoard=function(){return Boards.is("VersionBoard")||Boards.is("ComponentBoard")||Boards.is("AssigneeBoard")};this.isListView=function(){if(this.listView==null){this.listView=($("isListView")?true:false)}return this.listView};this.isCompactView=function(){if(this.compactView==null){this.compactView=($("isCompactView")?true:false)}return this.compactView};this.changeProject=function(){Boards.relocate($F("projectSelect"))};this.changeBoard=function(){Boards.submit($F("planningView"),$H({}))};this.changeView=function(){if(Boards.isPlanningBoard()){Boards.getBoard($F("switchView")).selectBoard()}else{Boards.relocate(Boards.selectedProjectId,$F("switchView"))}};this.changeTaskBoard=function(A){Boards.submit("SetPlainTaskBoard",$H({plain:A}))};this.changeReleased=function(){Boards.submit($F("releasedType"),$H({}))};this.relocate=function(A,B){Boards.clean();window.location=this.ctx+"/secure/"+Boards.type(true)+".jspa?selectedProjectId="+A+(B?"&selectedBoardId="+B:"")+(Boards.is("ConfigurationBoard")?"&configTab="+GH.Util.innerValue("configTab"):"")};this.closeIFrame=function(B,A){Boards.updater("confirmation","CloseIFrame",$H({id:B,displayedTime:A}),true)};this.viewIssue=function(A){Boards.updater("confirmation","GetIssue",$H({key:A}))};this.updatePBar=function(){Boards.updater("pBar","UpdatePBar",$H({}),true)};this.editIssue=function(A){Boards.updater("confirmation","GHEditIssue",$H({id:A}))};this.newSubTask=function(D,F,C,E){Boards.needsRefresh=Boards.inSearchMode;var A=C?Boards.getFieldValues("new"):[[],[]];var B=Boards.getFieldValues("forced");E=E?E:($("subType")?$F("subType"):"");Boards.updater("confirmation","GHAddIssue",$H({key:D,issueType:E,fieldsKeys:A[0].slice(0,-1),fieldsValues:A[1].slice(0,-3),forcedFieldsKeys:B[0].slice(0,-1),forcedFieldsValues:B[1].slice(0,-3),createNext:F}))};this.newIssue=function(F,C,E){Boards.needsRefresh=Boards.inSearchMode;var A=C?Boards.getFieldValues("new"):[[],[]];var B=Boards.getFieldValues("forced");E=E?E:($("issueType")?$F("issueType"):"");var D=C&&Ranking.relativeIssue?Ranking.relativeIssue:Boards.firstSelection();Boards.updater("confirmation","GHAddIssue",$H({issueType:E,relativeIssueKey:D,fieldsKeys:A[0].slice(0,-1),fieldsValues:A[1].slice(0,-3),forcedFieldsKeys:B[0].slice(0,-1),forcedFieldsValues:B[1].slice(0,-3),createNext:F}))};this.pushValues=function(A,B,C){$$("*[id^=newField_]").each(function(G){var H=G.readAttribute("fieldId");if(A.indexOf(H)>=0){if($(G).constructor==HTMLSelectElement&&$(G).getAttribute("multiple")!=null){var D=$(G).options;var F=Encoder.htmlDecode(B[A.indexOf(H)]).split(",");for(var E=0;E<D.length;E++){if(F.indexOf(D[E].value)>=0){D[E].selected="selected"}}}else{$(G).value=Encoder.htmlDecode(B[A.indexOf(H)])}if(C){$(G).disabled=C;GH.Util.hide("edit_"+H)}}})};this.createIssue=function(C,D){var A=Boards.getFieldValues("new");var B=Boards.getFieldValues("forced");Boards.updater("popuperrors","GHCreateNewIssue",$H({key:C,issueType:($("issueType")?$F("issueType"):$F("subType")),fieldsKeys:A[0].slice(0,-1),fieldsValues:A[1].slice(0,-3),forcedFieldsKeys:B[0].slice(0,-1),forcedFieldsValues:B[1].slice(0,-3),createNext:D}))};this.getFieldValues=function(C){var A="";var B="";$$("*[id^="+C+"Field_]").each(function(E){var F=E.readAttribute("fieldId");if(F!=null&&typeof $F(E)!="undefined"){A+=F+",";var D=$F(E).constructor===Array?Boards.getMSValue(E):$F(E);B+=(D==""?" ":D)+"@%@"}});return[A,B]};this.doAction=function(A){Boards.updater("confirmation",A,$H({}))};this.cardUpdated=function(C,B){GH.Util.hide(B.parentNode);var A=Boards.findIssue(B.id);Boards.updater("confirmation","Updating",$H({issueKeys:Boards.selectedIssues(A),dropBoardId:C,selectedBoardId:A.board.id}))};this.notifyRankFor=function(A){return Boards.isListView()&&!Boards.is("TaskBoard")&&A.element.id!="EoL"};this.cardDropped=function(F,B,E){var D="Rank";var A=Boards.findIssue(B.id);if(A.isSubtask()){if(A.parentKey==F.key){return }else{if(F.isSubtask()){if(A.parentKey!=F.parentKey){D="Moving";F=F.getParent()}else{if(!E&&Boards.isListView()&&A.index-F.index<-1){F=A.board.getIssueAt(F.index-1)}}}else{var C=!E&&Boards.isListView()&&A.index-F.index<-1;if(C){F=A.board.getIssueAt(F.index-1)}if(!F.isSubtask()||A.parentKey!=F.parentKey){D="Moving";if(C){var G=A.board.getIssueAt(F.index+1);F=G.isSubtask()?F:G}}}}}else{if(!E&&Boards.isListView()&&A.index-F.index<-1){F=A.board.getIssueAt(F.index-1)}F=F.isSubtask()?F.getParent():F}if(!F||F.selected){return }if(D=="Rank"){$$('[class^="mkr"]').each(function(H){if(E||A.key==$(H.id).readAttribute("position")){$(H.id).setAttribute("position","")}})}Boards.updater("confirmation",D,$H({id:F.id,issueKeys:Boards.selectedIssues(A),start:Boards.start()}))};this.start=function(A){A=!A?Boards.mainBoard().id:A;return Boards.mainBoard()&&$("start_"+A)?$F("start_"+A):""};this.lastDrop=function(A){this.cardDropped(Boards.mainBoard().getIssueAt(Boards.mainBoard().issues.size()),A,true)};this.pageDropped=function(C,B){var A=Boards.findIssue(B.id);Boards.updater("confirmation","PageRank",$H({issueKeys:Boards.selectedIssues(A),pageRankStart:C,start:Boards.start()}))};this.selectedIssues=function(A){if(!A){return""}if(!A.selected){return A.key}var B="";Boards.boards.each(function(C){C.issues.each(function(D){if(D.selected){GH.Util.hide("issue_"+D.key);B=B+D.key+", "}})});return B.substring(0,B.length-2)};this.firstSelection=function(){var A="";Boards.boards.each(function(B){B.issues.each(function(C){if(C.selected){A=C.key;throw $break}})});return A};this.addSelectedSubs=function(B){B=!B?"":B+",";var C=$$('input[class^="subBox"]');for(var A=0;A<C.size();A++){if(C[A].checked==true){B=B+C[A].value+(A<C.size()-1?", ":"")}}C=null;return B};this.allSubs=function(B){var C=$$('input[class^="subBox"]');for(var A=0;A<C.length;A++){if(Element.getHeight(C[A])>0){C[A].checked=B}}};this.cardMoved=function(C,B){if(!GH.Util.isSelectionModifier(C)){var D=Boards.findIssue(B.id);if(D.selected){var A=[];Boards.mainBoard().issues.each(function(E){if(E.selected){A[A.size()]=E}});Boards.multiMove(D,A)}else{Boards.unfocus();D.select()}if($(D.cKey)){GH.Util.addClassName(D.cKey,"move-main")}if($(D.sKey)){GH.Util.addClassName(D.sKey,"move-main")}}};this.cardStopped=function(B,A){GH.Util.hide("Page");var C=Boards.findIssue(A.id);if($(C.cKey)){GH.Util.removeClassName(C.cKey,"move-main")}if($(C.sKey)){GH.Util.removeClassName(C.sKey,"move-main")}$$('span[class^="move-count"]').each(function(D){D.remove()});Boards.mainBoard().issues.each(function(D){if(D.selected){if($(D.cKey)){GH.Util.removeClassName(D.cKey,"move-other")}if($(D.sKey)){GH.Util.removeClassName(D.sKey,"move-other")}}})};this.multiMove=function(B,A){if($(B.cKey)){if(A.length>1){new Insertion.Top($(B.cKey),'<span class="move-count">+'+((A.length)-1)+"</span>")}}if($(B.sKey)){if(A.length>1){new Insertion.Top($(B.sKey),'<span class="move-count">+'+((A.length)-1)+"</span>")}}A.each(function(C){if(C.key!=B.key){if($(C.cKey)){GH.Util.addClassName(C.cKey,"move-other")}if($(C.sKey)){GH.Util.addClassName(C.sKey,"move-other")}}})};this.updatingPStatus=function(A){Boards.updater("confirmation","UpdatingStatus",$H({key:A,forParent:true}))};this.updatingStatus=function(C,B){var A=Boards.findIssue(B.id);if(A.board.id!=C){GH.Util.hide(B.parentNode);A.updatingStatus(C)}};this.mainBoard=function(){var A;Boards.boards.each(function(B){if(B.isMain()){A=B;throw $break}});return A};this.returnToSearch=function(){GH.Util.hideAll(["waiting","confirmation","Search_wait"]);GH.Util.write("confirmation","");GH.Util.show("search")};this.mimicSearch=function(B,A){if($(B).value==A){$(B).value=""}};this.refreshSearchStats=function(B,A){Boards.updater("search-column","RefreshSearchStats",$H({type:Boards.type(),inSearchMode:true,searchKey:B,searchType:A}),true)};this.retrieve=function(B,A,C){Boards.searchStart=0;Boards.inSearchMode=true;GH.Util.write("confirmation","");$("searchType").value=A;Boards.updater("search","SearchBoard",$H({type:Boards.type(),searchKey:B,start:0,searchType:A,redirectType:C}))};this.search=function(B,A){if(GH.Util.trim($F(B))==""){return }$(B).blur();Boards.retrieve($F(B),"query",A)};this.searchFor=function(D,B,A,C){Boards.searchStart=D;Boards.updater("search-results","SearchAgain",$H({type:Boards.type(),searchKey:B,start:D,searchType:A,redirectType:C}),true)};this.closeSearch=function(){Boards.cleanSearch();if(Boards.needsRefresh){Boards.showBoard(Boards.type(true))}else{Boards.doneWorking()}};this.cleanSearch=function(){Boards.inSearchMode=false;Boards.searchStart=0;$("searchIn").value="";Boards.removeBoard("SEARCH");GH.Util.write("search","");GH.Util.show("searchLabel")};this.getBoardForIssue=function(A,B,D){if(Boards.inSearchMode){Boards.cleanSearch()}Boards.working();var C=$H({type:B,key:A,commitedIn:(D?D:false),colPage:0,issueKeys:Boards.selectedIssues(Boards.findIssue("card_"+A))});if(D){C=C.merge({selectedBoardId:"-1"})}Boards.submit("GetBoardForIssue",C,(Boards.is("TaskBoard")))};this.focusOnIssue=function(A){if(!Boards.findIssue("card_"+A)){return }Boards.focusOn([A]);Boards.doneWorking()};this.refreshOverview=function(){Boards.submit("RefreshOverview",$H({selectedProjectId:$F("projectSelect"),selectedBoardId:$F("switchView")}))};this.manage=function(){Boards.submit("Manage",$H({}))};this.addingVersion=function(A){Boards.updater("confirmation","ManageVersion",$H({createNext:A?true:false}))};this.addVersion=function(A){Boards.updater("popuperrors","GHCreateVersion",$H({name:$F("versionName"),masterId:$F("master"),releaseDate:$F("releaseDateIn"),date:$F("stratDateIn"),description:$F("versionDesc"),createNext:A?true:false}))};this.showBoard=function(A){Boards.submit(A,$H({start:Boards.start()}))};this.setSort=function(){Boards.updater("confirmation","SetSort",$H({sortField:$F("sort")}))};this.setSortOrder=function(A){Boards.updater("confirmation","SetSortOrder",$H({sortOrder:A}))};this.enableStatus=function(D,B){var C=$(D+"status"+B);C.disabled=$(D+"unresolved"+B).checked||$(D+"done"+B).checked;if(C.disabled){C.options[0].selected=true;for(var A=1;A<C.options.length;A++){C.options[A].selected=false}}};this.saveOptions=function(A){Boards.updater("confirmation","GHSave"+A,$H({filterOn:true,personalFilterOn:($F("PersonalIn")?true:false),jiraFilter:Boards.getMSValue("jiraSel"+A),unresolvedFilterOn:($F("unresolved"+A)?true:false),doneFilterOn:($F("done"+A)?true:false),typeIds:Boards.getMSValue("type"+A),priorityIds:Boards.getMSValue("priority"+A),statusIds:Boards.getMSValue("status"+A),componentIds:Boards.getMSValue("component"+A),assignee:Boards.getMSValue("assignee"+A)}))};this.setCtxName=function(){if($("newContextName")&&GH.Util.trim($F("newContextName"))==""){return }Boards.updater("confirmation","SetCtxName",$H({contextName:$F("newContextName")}))};this.setCtx=function(){Boards.updater("confirmation","SetCtx",$H({contextName:$F("ctx")}))};this.toggleShareCtx=function(){Boards.updater("confirmation","ToggleCtxShare",$H({contextName:$F("ctx")}))};this.editCtx=function(A){Boards.updater("confirmation","EditCtx",$H({contextName:$F("ctx"),newCtx:A}))};this.deleteCtx=function(A){Boards.updater("confirmation","DeleteCtx",$H({contextName:A}))};this.saveCtx=function(){if($("contextName")&&GH.Util.trim($F("contextName"))==""){Boards.ffocus("contextName");$("contextName").setStyle({backgroundColor:"#FFFFDD"})}else{Boards.updater("popuperrors","SaveCtx",$H({contextName:($("contextName")?$F("contextName"):""),personalFilterOn:($F("ctx_personalIn")?true:false),sortField:$F("ctx_sort"),sortOrder:($F("ctx_order_true")?"ASC":"DESC"),filterOn:true,jiraFilter:Boards.getMSValue("ctx_jiraSelFilter"),statusIds:Boards.getMSValue("ctx_statusFilter"),componentIds:Boards.getMSValue("ctx_componentFilter"),unresolvedFilterOn:($F("ctx_unresolvedFilter")?true:false),doneFilterOn:($F("ctx_doneFilter")?true:false),typeIds:Boards.getMSValue("ctx_typeFilter"),priorityIds:Boards.getMSValue("ctx_priorityFilter"),assignee:Boards.getMSValue("ctx_assigneeFilter"),hiliteOn:true,jiraHilite:Boards.getMSValue("ctx_jiraSelHighLight"),hiliteStatusIds:Boards.getMSValue("ctx_statusHighLight"),hiliteComponentIds:Boards.getMSValue("ctx_componentHighLight"),hiliteUnresolvedFilterOn:($F("ctx_unresolvedHighLight")?true:false),hiliteDoneFilterOn:($F("ctx_doneHighLight")?true:false),hiliteTypeIds:Boards.getMSValue("ctx_typeHighLight"),hilitePriorityIds:Boards.getMSValue("ctx_priorityHighLight"),hiliteAssignee:Boards.getMSValue("ctx_assigneeHighLight")}))}};this.findIssue=function(C){var B;var A=C.split("_")[1];this.boards.each(function(D){D.issues.each(function(E){if(E.key==A){B=E;throw $break}})});return B};this.setAssignedToMe=function(){Boards.updater("confirmation","SetAssignedToMe",$H({assignedToMe:($F("assignedToMe")?true:false)}))};this.setHideSubs=function(A){if($("start_"+Boards.mainBoard().id)){$("start_"+Boards.mainBoard().id).value=0}Boards.updater("confirmation","SetHideSubs",$H({hideSubs:A}))};this.setChart=function(){Boards.submit("SetChartSelection",$H({chartType:$F("chartType"),fieldId:($("chartField")?$F("chartField"):""),forMaster:($("forMaster")?$F("forMaster"):false)}))};this.setArchiveChart=function(){Boards.submit("ArchiveChartBoard",$H({selectedProjectId:$F("projectSelect"),selectedBoardId:$F("switchView"),chartType:$F("chartType"),fieldId:($("chartField")?$F("chartField"):""),forMaster:($("forMaster")?$F("forMaster"):false)}))};this.setDate=function(A){Boards.updater("confirmation","Set"+Boards.type()+A,$H({date:$F(A)}))};this.resetDates=function(A,B){$("StartDate").value=A;GH.Util.write("StartDateDisplay",A);$("EndDate").value=B;GH.Util.write("EndDateDisplay",B)};this.setCurveVisibility=function(A){Boards.updater("chart-display","SetCurveVisible",$H({curveVisible:($F("visible_"+A)?true:false),curveId:A}),false)};this.setCurveColor=function(B,A){Boards.updater("chart-display","SetCurveColor",$H({color:A,curveId:B}),false)};this.addNWDay=function(A){if(!$F("nwDate")){return }Boards.updater("CCBNWDays","CCBAddNWDay",$H({nonWorkingDay:$F("nwDate"),refresh:A}),true)};this.removeNWDay=function(A,B){Boards.updater("CCBNWDays","CCBRemoveNWDay",$H({nonWorkingDay:A,refresh:B}),true)};this.inavigator=function(B,A){if(Boards.inSearchMode){Boards.submit("SBIssueNavigator",$H({searchKey:$F("searchKey"),searchType:$F("searchType"),navInfo:(A?A:"")}))}else{Boards.submit((Boards.is("TaskBoard")?"TB":"PB")+"IssueNavigator",$H({dropBoardId:B,stepId:B,navInfo:(A?A:"")}))}};this.addCharCounter=function(E,A,B){var C=B?E:Boards.realId(E);var D=B?"charCnt_"+E:Boards.realId("charCnt_"+E);Event.observe(C,"keydown",GH.Util.charCounter.bindAsEventListener(this,C,A,D));Event.observe(C,"keyup",GH.Util.charCounter.bindAsEventListener(this,C,A,D));GH.Util.write(D,(A-$F(C).length))};this.focusOn=function(A){Boards.mainBoard().focusOn(A)};this.unfocus=function(){Boards.mainBoard().unfocus()};this.selectAll=function(){Boards.mainBoard().selectAll()};this.unselectAll=function(){Boards.mainBoard().unfocus()};this.setIssueDisplay=function(A){Boards.mainBoard().setIssueDisplay(A)};this.toggleSettings=function(A){if($(A+"_chk").className=="icon_l no-icon"){GH.Util.setClassName(A+"_chk","icon_l chkbtn");Boards.updater(A,"Get"+A,$H({}),true)}else{GH.Util.hide(A);GH.Util.setClassName(A+"_chk","icon_l no-icon");Boards.request("Close"+A,$H({}))}};this.toggleScreen=function(){if($("Screen_chk").className=="icon_l no-icon"){GH.Util.setClassName("Screen_chk","icon_l chkbtn");GH.Util.hide("header");Boards.request("FullScreen",$H({}))}else{GH.Util.setClassName("Screen_chk","icon_l no-icon");GH.Util.show("header");Boards.request("NormalScreen",$H({}))}};this.getPref=function(){Boards.updater("confirmation","GetUserPreferences",$H({}))};this.savePref=function(){var A=$H({refreshRate:$F("rRate"),opacityRatio:$F("oRatio"),useJIRAIFrame:($F("JIRAIFrame")?true:false)});A=A.merge({maxVBIssues:$F("maxVBIssues"),issuesPerRow:$F("issuesPerRow")});A=A.merge({maxTBIssues:$F("maxTBIssues"),issuesPerCol:$F("issuesPerCol"),autoAssignOn:($("autoAssign")&&$F("autoAssign")?true:false),maxParents:($("maxParents")?$F("maxParents"):0)});A=A.merge({withDates:($F("withDates")?true:false),withForecast:($F("withForecast")?true:false),withLabels:($F("withLabels")?true:false),precision:$F("precision")});Boards.submit("SaveUserPreferences",A)};this.enableOption=function(A){Boards.updater("confirmation","GHEnable"+A,$H({filterOn:($F(A+"In")?true:false)}))};this.enableOption=function(A){Boards.updater("confirmation","GHEnable"+A,$H({filterOn:($F(A+"In")?true:false)}))};this.closePopups=function(){$$('[class^="closable"]').each(function(A){Element.hide(A)});Boards.closeMenuAction()};this.edtLabel=function(D,B){var A=Boards.ctx+"/secure/popups/IssuePicker.jspa?";A+="formName="+D+"&";A+="linkFieldName="+B+"&";A+="currentIssue=false&";A+="singleSelectOnly=true&";A+="showSubTasks=false&";A+="showSubTasksParent=true&";A+="selectedProjectId="+Boards.selectedProjectId;var C=GH.Util.openWindow(A,"UssueSelectorPopup","status=no,resizable=yes,top=100,left=200,width=520,height=600,scrollbars=yes,resizable");C.opener=self;C.focus()};this.editCFU=function(D,A,C){GH.Util.switchView("cfEdit_"+D,"cfTxt_"+D);var B=GH.Util.openWindow(Boards.ctx+"/secure/popups/"+A+"Browser.jspa?formName=form_"+D+(C?"&multiSelect=true":"")+"&element=newField_CFSimpleIn_"+D,A);B.opener=self;B.focus()};this.getMSValue=function(D){var C="";var A=$F(D);for(var B=0;B<A.length;B++){C=C+A[B]+","}return A.length>0?C.substring(0,C.length-1):C};this.toggleAutoRefresh=function(){Boards.autoRefresh=$("Refresh_chk").className=="icon_l chkbtn";if(!Boards.autoRefresh){GH.Util.setClassName("Refresh_chk","icon_l chkbtn");Boards.request("StartRefresh",$H({}))}else{GH.Util.setClassName("Refresh_chk","icon_l no-icon");Boards.request("StopRefresh",$H({}))}Boards.autoRefresh=!Boards.autoRefresh;Boards.doRefresh(0,Boards.delay)};this.doRefresh=function(B,A){if(!Boards.autoRefresh){return }if(B<A||GH.Util.innerValue("confirmation")!=""||Boards.inSearchMode){setTimeout("Boards.doRefresh("+(B+1)+","+A+")",1000)}else{Boards.showBoard(Boards.type(true))}};this.realId=function(A){return Boards.inSearchMode?"search_"+A:A};this.doClick=function(A){Boards.clickCount++;setTimeout(function(){if(Boards.clickCount%2==1){Boards.clickCount=0;A()}},750);return true};this.working=function(){Boards.createDialog();GH.Util.hideAll(["confirmation","search"]);GH.Util.showAll(["overlay","dialog","waiting_display"])};this.doneWorking=function(){if(Boards.inSearchMode){GH.Util.switchView("search","waiting_display");GH.Util.hide("Search_wait")}else{GH.Util.write("confirmation","");setTimeout("GH.Util.hideAll(['overlay', 'dialog'])",200)}GH.Util.hide("opt_wait")};this.request=function(A,B){B=B.merge({decorator:"none",selectedProjectId:Boards.selectedProjectId,type:Boards.type()});new Ajax.Request(Boards.ctx+"/secure/"+A+".jspa",{method:"post",parameters:B.toQueryString()})};this.updater=function(D,B,C,A){C=C.merge({decorator:"none",selectedProjectId:Boards.selectedProjectId});if(C.type==null){C=C.merge({type:Boards.type()})}if(C.issueDisplay==null){C=C.merge({issueDisplay:GH.Util.innerValue("issueDisplay")})}if(C.selectedBoardId==null){C=C.merge({selectedBoardId:Boards.selectedBoardId})}if(Boards.inSearchMode&&C.searchKey==null){C=C.merge({inSearchMode:true,searchKey:$F("searchKey"),searchType:$F("searchType")})}if(!A){Boards.closePopups();Boards.working()}else{GH.Util.showAll(["opt_wait","Search_wait"])}new Ajax.Updater(D,Boards.ctx+"/secure/"+B+".jspa",{method:"post",parameters:C.toQueryString(),evalScripts:true})};this.submit=function(B,C,A){GH.Util.show("opt_wait");if(C.type==null){C=C.merge({type:Boards.type()})}if(C.selectedProjectId==null){C=C.merge({selectedProjectId:Boards.selectedProjectId})}if(C.selectedBoardId==null){C=C.merge({selectedBoardId:Boards.selectedBoardId})}if(C.issueDisplay==null){C=C.merge({issueDisplay:GH.Util.innerValue("issueDisplay")})}if(Boards.is("TaskBoard")&&C.parentStart==null&&$("parentStart")){C=C.merge({parentStart:$F("parentStart")})}if(Boards.isPlanningBoard()&&C.colPage==null&&$("colPage")){C=C.merge({colPage:$F("colPage")})}document.forms.GHForm.action=Boards.ctx+"/secure/"+B+".jspa?"+C.toQueryString()+(A?"#"+A:"");document.forms.GHForm.submit()};this.createDialog=function(){if(!$("overlay")){var B=document.createElement("div");B.id="dialog";B.style.display="none";B.innerHTML="<div id=waiting_display>&nbsp;</div><div id=confirmation align=center style='display:none;'></div><div id=search align=center style='display:none;'></div>";$("jira").insertBefore(B,$("header"));var A=document.createElement("div");A.id="overlay";A.className="overlay";A.style.display="none";$("jira").insertBefore(A,$("dialog"))}};this.clean=function(){Droppables.remove("EoL");$$('span[class^="pageBox"]').each(function(A){Droppables.remove(A)});Boards.boards.each(function(A){A.clean()});Boards.boards.clear();Event.unloadCache();Boards.boards=null};this.type=function(A){if(Boards.inSearchMode){return(A?"SearchBoard":"SB")}else{if(Boards.is("VersionBoard")){return(A?"VersionBoard":"VB")}else{if(Boards.is("ProjectBoard")){return(A?"ProjectBoard":"PB")}else{if(Boards.is("ComponentBoard")){return(A?"ComponentBoard":"CB")}else{if(Boards.is("AssigneeBoard")){return(A?"AssigneeBoard":"AB")}else{if(Boards.is("TaskBoard")){return(A?"TaskBoard":"TB")}else{if(Boards.is("ChartBoard")){return(A?"ChartBoard":"CCB")}else{if(Boards.is("ArchiveChartBoard")){return(A?"ArchiveChartBoard":"ACB")}else{if(Boards.is("ReleaseNotesBoard")){return(A?"ReleaseNotesBoard":"RB")}else{return(A?"Configuration":"")}}}}}}}}}};this.registerPsgeEvents=function(){Event.observe(document,"mouseup",Boards.closeMenuAction);if(Boards.isPlanningBoard()||Boards.is("ProjectBoard")){Event.observe(window,"resize",Boards.centerArrow);Event.observe(window,"scroll",Boards.centerArrow)}};this.removeBoard=function(B){var A=0;while(A<this.boards.length){if(this.boards[A].id==B){this.boards[A].clean();this.boards.splice(A,1)}A++}}};var Board=Class.create();Board.prototype={initialize:function(A){this.pageDisp=-1;this.issues=[];this.id=A},batchUpdate:function(B,D){var C="";for(var A=0;A<D.size();A++){C+=D[A]+","}Boards.updater("confirmation","Update",$H({issueKeys:Boards.addSelectedSubs(C),dropBoardId:(B?B:$F(fieldId+"In_"+this.id)),selectedBoardId:this.id}))},batchMove:function(A,B){Boards.updater("confirmation","Move",$H({key:A,issueKeys:Boards.addSelectedSubs(),start:Boards.start()}))},addIssue:function(D,H,E,F,G,C,B){var A=new Issue(D,H,E,this,F,G,C,B);this.issues[this.issues.size()]=A;return A},getIssue:function(C){for(var B=0,A=this.issues.size();B<A;B++){if(this.issues[B].key==C){return this.issues[B]}}},getIssueAt:function(B){for(var C=0,A=this.issues.size();C<A;C++){if(this.issues[C].index==B){return this.issues[C]}}},isMain:function(){return this.id==Boards.selectedBoardId},toggle:function(){CookieUtil.toggleVisibility(Boards.selectedProjectId+"_"+this.id,"expand_"+this.id,"colapse_"+this.id)},expand:function(){CookieUtil.expandBoard(Boards.selectedProjectId+"_"+this.id)},colapse:function(){CookieUtil.colapseBoard(Boards.selectedProjectId+"_"+this.id)},editMaster:function(){Boards.updater("masterEdit_"+this.id,"EditMaster",$H({dropBoardId:this.id}),true)},cancelMaster:function(){GH.Util.switchView("masterTxt_"+this.id,"masterEdit_"+this.id)},updateMaster:function(){Boards.updater("confirmation","SetMaster",$H({dropBoardId:this.id,masterId:$F("masterIn_"+this.id)}))},releasing:function(){Boards.updater("confirmation","Releasing",$H({dropBoardId:this.id}))},release:function(){Boards.updater("confirmation","Release",$H({dropBoardId:this.id,swapId:($("swap")&&$F("swap")?$F("swapVersion"):"")}))},toggleStrict:function(){Boards.request("ToggleStrictView",$H({}),true);this.refreshDropBoard()},gotoMarker:function(A){Boards.updater("confirmation","Goto"+Boards.type()+"Marker",$H({dropBoardId:this.id,fieldId:A,start:Boards.start(this.id)}))},setMarker:function(A,B){Boards.updater("confirmation","SetMarker",$H({fieldId:A,start:Boards.start(this.id),markerValue:(B?B:$F("marker-"+A+"In"))}))},moveMarker:function(E,B,C,A,D){if(B!="EoL"&&!Boards.findIssue("x_"+B)){if(this.isMain()){this.refreshMainBoard(B)}else{this.selectBoard(B)}}else{if($("marker-"+E).readAttribute("position")!=B){if(B=="EoL"){$("mainBoard").appendChild($("marker-"+E))}else{$("mainBoard").insertBefore($("marker-"+E),$("issueDisp_"+B))}$("marker-"+E).setAttribute("position",B)}$("marker-"+E+"In").value=C;GH.Util.write("marker-"+E+"Txt",A);if(D){GH.Util.addClassName("marker-"+E+"Lbl","marker-capacity-set")}else{GH.Util.removeClassName("marker-"+E+"Lbl","marker-capacity-set")}Boards.doneWorking()}},selectBoard:function(B){if(this.isMain()){return }var A=Boards.mainBoard();Droppables.remove($("drop_"+this.id));Boards.selectedBoardId=this.id;if(Boards.mainBoard()){A.refreshDropBoard()}this.refreshDropBoard(B)},setIssueDisplay:function(A){Boards.submit("SetIssueDisplay",$H({issueDisplay:A,start:Boards.start(this.id)}))},refreshMainBoard:function(B,A){B=(B!=null?B:Boards.start(this.id));this.clean();Droppables.remove("EoL");if($("switchView")){$("switchView").value=this.id}$$('span[class^="pageBox"]').each(function(C){Droppables.remove(C)});Boards.updater("board-pagine","RefreshPagination",$H({selectedBoardId:(Boards.is("TaskBoard")?Boards.selectedBoardId:this.id),start:B,issueKeys:A?A:""}),true);Boards.updater("board-results","RefreshBoard",$H({selectedBoardId:(Boards.is("TaskBoard")?Boards.selectedBoardId:this.id),start:B,issueKeys:A?A:""}),true)},refreshDropBoard:function(B){var A;if(this.isMain()){A=this.id;this.refreshMainBoard(B?B:0)}else{this.clean();A=Boards.mainBoard().id}Boards.updater("box_"+this.id,"RefreshDrop",$H({dropBoardId:this.id,selectedBoardId:A}),true);A=null},refreshStepBoard:function(A){this.clearIssues();Boards.updater("stepContent_"+this.id,"RefreshStep",$H({stepId:this.id,start:(A?A:Boards.start(this.id))}),true)},refreshParentStep:function(A){Boards.submit("TaskBoard",$H({selectedBoardId:this.id,parentStart:A}))},showPage:function(D,C,B,A){if(D!=this.pageDisp){this.pageDisp=D;GH.Util.write("Page_"+this.id,"");Boards.updater("Page_"+this.id,"Get"+(Boards.is("TaskBoard")?"TB":"PB")+"Page",$H({start:D,stepId:this.id,forParent:B}),true);GH.Util.show("Page_"+this.id)}else{GH.Util.show("Page_"+this.id);Boards.popup("Page_"+this.id,C,A)}},clean:function(){Droppables.remove($("drop_"+this.id));this.clearIssues();this.pageDisp=-1},clearIssues:function(){this.issues.each(function(A){A.clear()});this.issues.clear()},hierarchy:function(){Boards.submit("ConfigureReport",$H({decorator:"",reportKey:"com.pyxis.jira.links.hierarchy.reports:pyxis.hierarchy.report.version",versionId:this.id,linkTypeId:Boards.linkId,subtasks:true,hierarchyView:"tree",orphans:true,Next:"Next"}))},focusOrFind:function(A){if(this.getIssue(A)){this.focusOn(A)}else{Boards.getBoardForIssue(A,Boards.type(),true)}},editCapacity:function(A){GH.Util.write(A+"_"+this.id+"_edit","");Boards.updater(A+"_"+this.id+"_edit","EditCapacity",$H({dropBoardId:this.id,fieldId:A}),true)},setCapacity:function(A){Boards.updater("confirmation","SetCapacity",$H({dropBoardId:this.id,fieldId:A,minCapacity:$F(A+"_"+this.id+"_min"),maxCapacity:$F(A+"_"+this.id+"_max")}))},cancelCapacity:function(A){GH.Util.switchView(A+"_"+this.id,A+"_"+this.id+"_edit")},focusOn:function(A){this.issues.each(function(B){if(A.indexOf(B.key)>=0){B.doFocus()}else{B.unfocus()}})},unfocus:function(){this.issues.each(function(A){A.unfocus()})},selectAll:function(){this.issues.each(function(A){A.select()})},editDate:function(A){GH.Util.setValueWithHTML(A+"In_"+this.id,A+"Date_"+this.id);GH.Util.switchView(A+"Edit_"+this.id,A+"Txt_"+this.id);Event.observe(A+"Edit_"+this.id,"dblclick",GH.Util.stopPropagation)},cancelDate:function(A){GH.Util.switchView(A+"Txt_"+this.id,A+"Edit_"+this.id)},updateDate:function(A){Boards.updater("confirmation","Set"+Boards.type()+A+"Date",$H({dropBoardId:this.id,date:$F(A+"In_"+this.id)}))},editName:function(){GH.Util.setValueWithHTML("nameIn_"+this.id,"name_"+this.id);GH.Util.switchView("nameEdit_"+this.id,"nameTxt_"+this.id)},cancelName:function(){GH.Util.switchView("nameTxt_"+this.id,"nameEdit_"+this.id)},doneMoving:function(){var A=this.id;$$('[class^="mkr"]').each(function(B){var C=B.id.split("-");Boards.updater("confirmation","Goto"+Boards.type()+"Marker",$H({dropBoardId:A,fieldId:C[1],start:Boards.start(A)},true))});this.issues=this.issues.sortBy(function(B){return B.index})},cancel:function(B){var A=this;B.each(function(D){var C=A.getIssue(D);if(C){C.doFocus()}});Boards.doneWorking()},updateName:function(){if(GH.Util.trim($F("nameIn_"+this.id))==""){return }Boards.updater("confirmation","Name",$H({dropBoardId:this.id,name:$F("nameIn_"+this.id)}))}};var Issue=Class.create();Issue.prototype={initialize:function(C,H,D,E,F,G,B,A){this.board=E;this.id=H;this.key=D;this.cKey="card_"+D;this.sKey="summary_"+D;this.parentKey=A?A:"";this.parentIssue;this.index=C;this.dragable=F;this.rankable=G;this.selectable=B;this.selected=false;this.enableAll();this.height},disableAll:function(){Draggables.unregister($(this.sKey));Draggables.unregister($(this.cKey));if((!Boards.is("TaskBoard"))&&this.rankable){Droppables.remove($(this.sKey));Droppables.remove($(this.cKey))}if(this.draggCard){this.draggCard.destroy()}if(this.draggSumm){this.draggSumm.destroy()}},newDraggable:function(B,A){return new Draggable(B,{scroll:window,ghosting:false,reverteffect:function(C){$(C).setStyle({left:"0px",top:"0px"})},revert:true,constraint:(A)?A:"",onStart:function(C,D){Boards.cardMoved(D,C.element)},onEnd:function(C,D){Boards.cardStopped(D,C.element)}})},enableDrop:function(){if((Boards.is("TaskBoard"))||!this.rankable){return }var A=this;Droppables.add((GH.Util.isVisible(this.sKey)?this.sKey:this.cKey),{accept:["issueCard","issueSummary","issueList"],hoverclass:(Boards.isListView()?null:"boxHover"),onDrop:function(B){Boards.cardDropped(A,B)}})},enableAll:function(){this.disableAll();this.enableDrop();if(!this.rankable&&!this.dragable){return }var A="";if(this.rankable&&Boards.isListView()&&!this.dragable){A="vertical"}else{if(this.dragable&&Boards.is("TaskBoard")){A="horizontal"}}this.newDraggable((GH.Util.isVisible(this.sKey)?this.sKey:this.cKey),A)},isSubtask:function(){return this.parentKey!=""},getSubtasks:function(){var C=[];if(this.isSubtask()){return C}var B=0;var A=this.key;this.board.issues.each(function(D){if(D.parentKey==A){C[B++]=D}});return C.sortBy(function(D){return D.index})},getParent:function(){if(this.parentIssue==null){this.parentIssue=this.board.getIssue(this.parentKey)}return this.parentIssue},move:function(B){var A=Boards.mainBoard().getIssue(B);if(A.parentKey!=this.parentKey){return }else{if(A.index<this.index){this.moveBefore(A)}else{this.moveAfter(A)}}},moveBefore:function(B){var A=this.index;$("mainBoard").insertBefore($("issueDisp_"+this.key),$("issueDisp_"+B.key));B.board.issues.each(function(C){if(C.index<A&&C.index>B.index){C.index++}});this.index=B.index++;this.moveSubs(B);this.doFocus()},moveAfter:function(C){var A=this.index;var B=C.getSubtasks();C=B.size()>0?B.last():C;if(C.board.issues.size()==C.index){$("mainBoard").appendChild($("issueDisp_"+this.key))}else{$("mainBoard").insertBefore($("issueDisp_"+this.key),$("issueDisp_"+C.key).nextSibling)}C.board.issues.each(function(D){if(D.index>A&&D.index<C.index){D.index--}});this.index=C.index--;this.moveSubs(C);this.doFocus()},moveSubs:function(B){if(!this.isSubtask()){var A=this;this.getSubtasks().each(function(C){if(A.board.issues.size()==A.index){$("mainBoard").appendChild($("issueDisp_"+C.key))}else{$("mainBoard").insertBefore($("issueDisp_"+C.key),$("issueDisp_"+A.key).nextSibling)}B.board.issues.each(function(D){if(B.index<C.index&&D.index<C.index&&D.index>A.index){D.index++}else{if(D.index>C.index&&D.index<=A.index){D.index--}}});C.index=A.index+1;A=C;C.doFocus()})}},toggleSubs:function(){if(!$("colapse_"+this.key)){return }var A=($("colapse_"+this.key).className=="btn_s scbtn"?"none":"");$("colapse_"+this.key).className=(A=="none"?"btn_s sebtn":"btn_s scbtn");(A=="none"?CookieUtil.hide("L_"+this.key):CookieUtil.clear("L_"+this.key));this.getSubtasks().each(function(B){$("issueDisp_"+B.key).style.display=A})},setSubtaskVisibility:function(){if(!$("colapse_"+this.parentKey)||!$("issueDisp_"+this.key)){return }if(CookieUtil.getCookieValue("L_"+this.parentKey)==null){return }$("colapse_"+this.parentKey).className="btn_s sebtn";$("issueDisp_"+this.key).style.display="none"},doAction:function(A){this.issueUpdater(A,$H({}))},updatingStatus:function(A){Boards.updater("confirmation","UpdatingStatus",$H({key:this.key,stepId:A,oldStepId:this.board.id}))},updateStatus:function(E,B){var A=jQuery("input[name=tx]:checked");if(A.size()==0){return }var C=A.val();var D=$H({id:this.id,action:C,stepId:E,oldStepId:this.board.id});if($("resolution_"+C)){D=D.merge({resolution:$F("resolution_"+C)})}if($("remaining")){D=D.merge({resetRemaining:($F("remaining")?true:false)})}if(B){D=D.merge({forParent:true})}Boards.updater("confirmation","UpdateStatus",D)},updateStatusWithInputs:function(C,E,B){var D=$H({id:this.id,action:C,stepId:E,oldStepId:this.board.id});var A=Boards.getFieldValues("new");D=D.merge({fieldsKeys:A[0].slice(0,-1),fieldsValues:A[1].slice(0,-3)});if($("resolution_"+C)){D=D.merge({resolution:$F("resolution_"+C)})}if($("remaining")){D=D.merge({resetRemaining:($F("remaining")?true:false)})}if(B){D=D.merge({forParent:true})}Boards.updater("popuperrors","UpdateStatusWithInputs",D)},updateResolution:function(){var A=$H({resolution:$F("resolutionIn_"+this.key)});if($("remaining")){A=A.merge({resetRemaining:($F("remaining")?true:false)})}this.issueUpdater((Boards.is("TaskBoard")?"TB":"")+"Resolution",A)},editField:function(A){this.cancelEdit();Boards.updater(Boards.realId("edit_"+this.key+"_"+A),"EditField",$H({key:this.key,fieldId:A,stepId:this.board.id}),true)},editTAField:function(A){this.cancelEdit();Boards.updater(Boards.realId("edit_"+this.key+"_TA"),"EditField",$H({key:this.key,fieldType:A,fieldId:A,stepId:this.board.id}),true)},editCFU:function(D,A,C){this.editCFS(D);D=this.key+"_"+D;var B=GH.Util.openWindow(Boards.ctx+"/secure/popups/"+A+"Browser.jspa?formName=form_"+D+(C?"&multiSelect=true":"")+"&element=cfIn_"+D,A);B.opener=self;B.focus()},updateField:function(B,C){var A=Boards.realId("in_"+this.key+"_"+B);GH.Util.stopObserving(A,"dblclick",GH.Util.stopPropagation);if(!Boards.inSearchMode&&(B=="fixVersions"&&Boards.is("VersionBoard")||B=="components"&&Boards.is("ComponentBoard")||B=="assignee"&&Boards.is("AssigneeBoard"))){Boards.updater("confirmation","Updating",$H({issueKeys:this.key,fieldId:B,dropBoardId:(C?C:$F(A)),selectedBoardId:this.board.id}))}else{this.issueUpdater("UpdateField",$H({key:this.key,stepId:this.board.id,fieldId:B,fieldValue:(C?C:$F(A))}))}},showFieldEdit:function(B,A,C){if(A){Event.observe(Boards.realId("in_"+this.key+"_"+B),"dblclick",GH.Util.stopPropagation)}if(C){Calendar.setup({firstDay:0,inputField:Boards.realId("in_"+this.key+"_"+B),button:Boards.realId("dpicker_"+this.key+"_"+B),align:"Tl",singleClick:true,ifFormat:C,positionStyle:"absolute"})}GH.Util.switchView(Boards.realId("edit_"+this.key+"_"+B),Boards.realId("txt_"+this.key+"_"+B));GH.Util.hideAll(["opt_wait","Search_wait"]);Boards.ffocus(Boards.realId("in_"+this.key+"_"+B))},showTAEdit:function(A){Event.observe(Boards.realId("in_"+this.key+"_"+A),"dblclick",GH.Util.stopPropagation);GH.Util.switchView(Boards.realId("edit_"+this.key+"_TA"),Boards.realId("txt_"+this.key+"_TA"));GH.Util.hideAll(["opt_wait","Search_wait"]);Boards.ffocus(Boards.realId("in_"+this.key+"_"+A))},editLogWork:function(){this.cancelEdit();Boards.updater("confirmation",(!Boards.inSearchMode&&Boards.is("TaskBoard")?"TBLogging":"Logging"),$H({key:this.key,stepId:this.board.id}),false)},logWork:function(){this.issueUpdater("GHLogWork",$H({comment:$F("commentLogIn"),timeLogged:($("logIn")?$F("logIn"):""),estimate:($("estimateIn")?$F("estimateIn"):""),logDate:($("logDateIn")?$F("logDateIn"):"")}),"popuperrors")},openMenu:function(){var A=Boards.realId("menu_"+this.key);GH.Util.setClassName(A,"gh-dd-parent dd-allocated active");Boards.updater(A,"Get"+Boards.type()+"CardMenu",$H({id:this.id,stepId:this.board.id}),true)},issueUpdater:function(B,C,A){C=C.merge($H({id:this.id,stepId:this.board.id}));Boards.updater((A?A:"confirmation"),B,C,Boards.inSearchMode)},cancelEdit:function(){var B=Boards.realId(this.cKey);try{winPicker.close()}catch(A){}if(Prototype.Browser.IE){$$('[class^="fedit"]').each(function(C){GH.Util.hide(C);GH.Util.write(C,"")});$$('[class^="ftext"]').each(function(C){GH.Util.show(C)})}else{$$("#"+B+' [class^="fedit"]').each(function(C){GH.Util.hide(C);GH.Util.write(C,"")});$$("#"+B+' [class^="ftext"]').each(function(C){GH.Util.show(C)})}},activate:function(A){if(A.index-this.index==-1){return }if(this.parentKey!=A.parentKey){if(A.index<this.index){if(this.board.getIssueAt(this.index-1).parentKey!=A.parentKey){return }}else{return }}var B=$(A.sKey).getHeight()+5;if(A.index<this.index){A=this.board.getIssueAt(this.index)}if(GH.Util.isVisible(this.sKey)){$(this.sKey).style.paddingTop=B+"px"}else{$(this.cKey).style.paddingTop=B+"px"}},deactivate:function(){if(GH.Util.isVisible(this.sKey)){$(this.sKey).style.paddingTop="1px"}else{$(this.cKey).style.paddingTop="1px"}},doFocus:function(){this.cancelEdit();GH.Util.show("issue_"+this.key);this.selected=false;this.highLight(3);GH.Util.addClassName(this.cKey,"highlight");GH.Util.addClassName(this.sKey,"highlight")},unfocus:function(){this.selected=false;GH.Util.removeClassName(this.cKey,"highlight");GH.Util.removeClassName(this.sKey,"highlight");this.bold("")},select:function(){if(!this.selectable){return }var B=this.parentKey;var A=true;this.board.issues.each(function(C){if(C.selected){A=C.parentKey==B;throw $break}});if(!A){return }this.bold("#F7A02C");this.selected=true},multiSelect:function(B){if(GH.Util.isSelectionModifier(B)){if(!this.selected){this.select()}else{this.unfocus()}}else{if(B.shiftKey&&!Prototype.Browser.IE){var C;var A;this.board.issues.each(function(D){if(D.selected){C=!C?D:C;A=D}});if(!C){this.board.unfocus();this.selectIssues(this.board.issues[0],!this.selected)}else{if(C.index==this.index||A.index==this.index){this.unfocus()}else{if(!A||C.index>this.index){this.selectIssues(C,!this.selected)}else{if(A.index<this.index){this.selectIssues(A,!this.selected)}else{this.selectIssues(C.index-this.index>this.index-A.index?C:A,!this.selected)}}}}}else{this.board.unfocus();this.select()}}},selectIssues:function(C,A){var D=Math.min(C.index,this.index);var B=Math.max(C.index,this.index);this.board.issues.each(function(E){if(E.index>=D&&E.index<=B){A?E.select():E.unfocus()}else{if(E.index>B){throw $break}}})},bold:function(A){if($(this.cKey)){$(this.cKey).setStyle({backgroundColor:A})}if($(this.sKey)){$(this.sKey).setStyle({backgroundColor:A})}},highLight:function(A){GH.Util.highLight("summaryBody_"+this.key,(A?A:2))},refresh:function(B,A){Boards.unfocus();Boards.needsRefresh=Boards.inSearchMode;Boards.updater(Boards.realId("issueDisp_"+this.key),(!Boards.inSearchMode&&Boards.is("TaskBoard")?"TB":"")+"RefreshIssue",$H({id:this.id,stepId:this.board.id}),true)},zoomIn:function(B){Boards.clickCount=0;var C=Boards.realId(this.cKey);var A=Boards.realId(this.sKey);if($(C)&&$(C).innerHTML==""){Boards.updater(C,"Get"+Boards.type()+"Card",$H({id:this.id,stepId:this.board.id,logging:(B?B:false)}),true)}else{GH.Util.switchView(C,A);Boards.request("SetAsCard",$H({id:this.id}),true);this.enableAll()}},zoomOut:function(){Boards.clickCount=0;var B=Boards.realId(this.cKey);var A=Boards.realId(this.sKey);if($(A)&&$(A).innerHTML==""){Boards.updater(A,"Get"+Boards.type()+"Summary",$H({id:this.id,stepId:this.board.id}),true)}else{GH.Util.switchView(A,B);Boards.request("SetAsSummary",$H({id:this.id}),true);this.enableAll()}},clear:function(){this.disableAll();this.parentIssue=null;this.board=null}};function getBoard(A){return Boards.getBoard(A)}function getIssue(B,A){return Boards.getBoard(B).getIssue(A)}var Pagination=Class.create();Pagination.prototype={initialize:function(A,C,B){this.id=A;this.container=$(this.id);this.usClass=C;this.sClass=B;this.spans=[]},addPage:function(B){var A=document.createElement("span");this.spans[this.spans.length]=A;A._pageNumber=this.spans.length;A._content=B;GH.Util.addClassName(Element.extend(A).update(A._pageNumber),A._pageNumber==1?this.sClass:this.usClass);this.container.appendChild(A);Event.observe(A,"click",this.click.bindAsEventListener(this,A))},click:function(B,A){this.setCurrent(A._pageNumber)},setCurrent:function(pageNumber){var usClass=this.usClass;var currentNumber=this.spans.size()>=pageNumber?pageNumber:1;this.spans.each(function(span){span.className=usClass});this.spans[currentNumber-1].className=this.sClass;eval(this.spans[currentNumber-1]._content);if(Boards.isPlanningBoard()){GH.Util.setValue("colPage",currentNumber)}}};var Ranking=new function(){var A;this.getPage=function(C,D,G,B,H,E){GH.Util.show("RankPage_"+B+"Wait");var F=$H({fieldId:B,start:H});if($("ctx_"+B)){F=F.merge({contextName:$F("ctx_"+B)})}if($("newField_fixVersions")){F=F.merge({versionId:$F("newField_fixVersions")})}if(E){F=F.merge({parentKey:E})}new Boards.updater("RankPage_"+B,"GetRankPage",F,true)};this.setRank=function(F,G,E,D,C,B){GH.Util.switchView("RankPage_"+E+"Edit","RankPage_"+E+"Close");GH.Util.write("RankPage_"+E,"");GH.Util.write("RankValue_"+E,C);GH.Util.setValue(E,B);GH.Util.setValue("newField_"+E,B);Ranking.relativeIssue=D};this.closeRank=function(B){GH.Util.switchView("RankPage_"+B+"Edit","RankPage_"+B+"Close");GH.Util.write("RankPage_"+B,"")}};var Released=new function(){this.addInput=function(){GH.Util.show("opt_wait");var A=Released.selectedFields()+","+$F("fieldInput");new Boards.updater("rnDisplay","RNSetField",$H({versionId:$F("versionId"),includeSubs:($F("includeSubs")?true:false),fields:A}),true)};this.removeInput=function(A){GH.Util.show("opt_wait");new Boards.updater("rnDisplay","RNSetField",$H({versionId:$F("versionId"),includeSubs:($F("includeSubs")?true:false),fields:Released.selectedFields(A)}),true)};this.create=function(A){GH.Util.show("opt_wait");new Boards.updater("rnDisplay","RNCreate",$H({versionId:$F("versionId"),includeSubs:($F("includeSubs")?true:false),withTxtArea:A?A:false,fields:Released.selectedFields()}),true)};this.edit=function(){GH.Util.show("opt_wait");new Boards.updater("rnDisplay","RNSetField",$H({versionId:$F("versionId"),includeSubs:$F("includeSubs"),fields:Released.selectedFields()}),true)};this.selectedFields=function(B){var A="";$$('span[class^="fieldId"]').each(function(C){if(!B||GH.Util.innerValue(C)!=B){A=A+","+GH.Util.innerValue(C)}});return A};this.permlink=function(A){window.location=Boards.ctx+"/secure/RunPortlet.jspa?portletKey=com.pyxis.greenhopper.jira:greenhopper-releasenotes&projectid="+Boards.selectedProjectId+"&fields="+Released.selectedFields()+"&versionId="+$F("versionId")+(A?"&includeSubs="+($F("includeSubs")?true:false):"&includeSubs="+$F("includeSubs"))}};
