var app_custom_errors=0;var Prototype={Version:"1.5.0",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:)((\n|\r|.)*?)(?:)",emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};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}},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},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(C){var A=this,B=$A(arguments),C=B.shift();return function(D){return A.apply(C,[(D||window.event)].concat(B).concat($A(arguments)))}};Object.extend(Number.prototype,{toColorPart:function(){var A=this.toString(16);if(this<16){return"0"+A}return A},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this}});var Try={these:function(){var C;for(var B=0,D=arguments.length;B0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=B===undefined?1:B;return this.gsub(C,function(D){if(--B<0){return D[0]}return A(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 B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var B=document.createElement("div");var A=document.createTextNode(this);B.appendChild(A);return B.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,F){if((F=F.split("="))[0]){var C=decodeURIComponent(F[0]);var D=F[1]?decodeURIComponent(F[1]):undefined;if(E[C]!==undefined){if(E[C].constructor!=Array){E[C]=[E[C]]}if(D){E[C].push(D)}}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B=A){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||DB?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},size:function(){return this.toArray().length},inspect:function(){return"#"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(D){if(!D){return[]}if(D.toArray){return D.toArray()}else{var B=[];for(var A=0,C=D.length;A1?this:this[0]},uniq:function(){return this.inject([],function(B,A){return B.include(A)?B:B.concat([A])})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(A){A=A.strip();return A?A.split(/\s+/):[]}if(window.opera){Array.prototype.concat=function(){var E=[];for(var B=0,C=this.length;B"}});function $H(A){if(A&&A.constructor==Hash){return A}return new Hash(A)}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A-1?"&":"?")+D}try{Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var A=this.method=="post"?(this.options.postBody||D):null;this.transport.send(A);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 E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["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){E["Connection"]="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(typeof C.push=="function"){for(var B=0,D=C.length;B=200&&this.transport.status<300)},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var E=this.transport,B=this.evalJSON();if(C=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(E,B)}catch(D){this.dispatchException(D)}if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(E,B);Ajax.Responders.dispatch("on"+C,this,E,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},evalJSON:function(){try{var json=this.getHeader("X-JSON");return json?eval("("+json+")"):null}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.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(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.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 $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*"))},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,C,A){return Selector.findElement($(B).ancestors(),C,A)},down:function(B,C,A){return Selector.findElement($(B).descendants(),C,A)},previous:function(B,C,A){return Selector.findElement($(B).previousSiblings(),C,A)},next:function(B,C,A){return Selector.findElement($(B).nextSiblings(),C,A)},getElementsBySelector:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},getElementsByClassName:function(A,B){return document.getElementsByClassName(B,A)},readAttribute:function(C,A){C=$(C);if(document.all&&!window.opera){var B=Element._attributeTranslations;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}var D=C.attributes[A];if(D){return D.nodeValue}}return C.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(A,B){if(!(A=$(A))){return}var C=A.className;if(C.length==0){return false}if(C==B||C.match(new RegExp("(^|\\s)"+B+"(\\s|$)"))){return true}return false},addClassName:function(A,B){if(!(A=$(A))){return}Element.classNames(A).add(B);return A},removeClassName:function(A,B){if(!(A=$(A))){return}Element.classNames(A).remove(B);return A},toggleClassName:function(A,B){if(!(A=$(A))){return}Element.classNames(A)[A.hasClassName(B)?"remove":"add"](B);return A},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 C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.match(/^\s*$/)},descendantOf:function(B,A){B=$(B),A=$(A);while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(A){A=$(A);var B=Position.cumulativeOffset(A);window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);if(["float","cssFloat"].include(C)){C=(typeof B.style.styleFloat!="undefined"?"styleFloat":"cssFloat")}C=C.camelize();var D=B.style[C];if(!D){if(document.defaultView&&document.defaultView.getComputedStyle){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}else{if(B.currentStyle){D=B.currentStyle[C]}}}if((D=="auto")&&["width","height"].include(C)&&(B.getStyle("display")!="none")){D=B["offset"+C.capitalize()]+"px"}if(window.opera&&["left","top","right","bottom"].include(C)){if(Element.getStyle(B,"position")=="static"){D="auto"}}if(C=="opacity"){if(D){return parseFloat(D)}if(D=(B.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(D[1]){return parseFloat(D[1])/100}}return 1}return D=="auto"?null:D},setStyle:function(B,C){B=$(B);for(var A in C){var D=C[A];if(A=="opacity"){if(D==1){D=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:1;if(/MSIE/.test(navigator.userAgent)&&!window.opera){B.style.filter=B.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}}else{if(D===""){if(/MSIE/.test(navigator.userAgent)&&!window.opera){B.style.filter=B.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}}else{if(D<0.00001){D=0}if(/MSIE/.test(navigator.userAgent)&&!window.opera){B.style.filter=B.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+D*100+")"}}}}else{if(["float","cssFloat"].include(A)){A=(typeof B.style.styleFloat!="undefined")?"styleFloat":"cssFloat"}}B.style[A.camelize()]=D}return B},getDimensions:function(C){C=$(C);var G=$(C).getStyle("display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}return A},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});Element._attributeTranslations={};Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};Element._attributeTranslations.values={_getAttr:function(A,B){return A.getAttribute(B,2)},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){var B=A.getAttributeNode("title");return B.specified?B.nodeValue:null}};Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});Element.Methods.Simulated={hasAttribute:function(B,C){var A=Element._attributeTranslations;C=A.names[C]||C;return $(B).getAttributeNode(C).specified}};if(document.all&&!window.opera){Element.Methods.update=function(C,B){C=$(C);B=typeof B=="undefined"?"":B.toString();var A=C.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(A)){var D=document.createElement("div");switch(A){case"THEAD":case"TBODY":D.innerHTML=""+B.stripScripts()+"
";depth=2;break;case"TR":D.innerHTML=""+B.stripScripts()+"
";depth=3;break;case"TD":D.innerHTML="
"+B.stripScripts()+"
";depth=4}$A(C.childNodes).each(function(E){C.removeChild(E)});depth.times(function(){D=D.firstChild});$A(D.childNodes).each(function(E){C.appendChild(E)})}else{C.innerHTML=B.stripScripts()}setTimeout(function(){B.evalScripts()},10);return C}}Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){["","Form","Input","TextArea","Select"].each(function(B){var C="HTML"+B+"Element";if(window[C]){return}var A=window[C]={};A.prototype=document.createElement(B?B.toLowerCase():"div").__proto__})}Element.addMethods=function(A){Object.extend(Element.Methods,A||{});function B(F,D,C){C=C||false;var E=Element.extend.cache;for(var H in F){var G=F[H];if(!C||!(H in D)){D[H]=E.findOrStore(G)}}}if(typeof HTMLElement!="undefined"){B(Element.Methods,HTMLElement.prototype);B(Element.Methods.Simulated,HTMLElement.prototype,true);B(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(C){B(Form.Element.Methods,C.prototype)});_nativeExtensions=true}};var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(B,C){this.element=$(B);this.content=C.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(D){var A=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(A)){this.insertContent(this.contentFromAnonymousTable())}else{throw D}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){C.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML=""+this.content+"
";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.params={classNames:[]};this.expression=A.toString().strip();this.parseExpression();this.compileMatcher()},parseExpression:function(){function G(H){throw"Parse error in selector: "+H}if(this.expression==""){G("empty expression")}var F=this.params,E=this.expression,B,A,D,C;while(B=E.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){F.attributes=F.attributes||[];F.attributes.push({name:B[2],operator:B[3],value:B[4]||B[5]||""});E=B[1]}if(E=="*"){return this.params.wildcard=true}while(B=E.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){A=B[1],D=B[2],C=B[3];switch(A){case"#":F.id=D;break;case".":F.classNames.push(D);break;case"":case undefined:F.tagName=D.toUpperCase();break;default:G(E.inspect())}E=C}if(E.length>0){G(E.inspect())}},buildMatchExpression:function(){var E=this.params,D=[],C;if(E.wildcard){D.push("true")}if(C=E.id){D.push("element.readAttribute(\"id\") == "+C.inspect())}if(C=E.tagName){D.push("element.tagName.toUpperCase() == "+C.inspect())}if((C=E.classNames).length>0){for(var A=0,B=C.length;A=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C=this.offset[1]&&C=this.offset[0]&&A=this.offset[1]&&this.ycomp=this.offset[0]&&this.xcomp=this.allowedValues.max()){return(this.allowedValues.max())}if(A<=this.allowedValues.min()){return(this.allowedValues.min())}var C=Math.abs(this.allowedValues[0]-A);var B=this.allowedValues[0];this.allowedValues.each(function(D){var E=Math.abs(D-A);if(E<=C){B=D;C=E}});return B}if(A>this.range.end){return this.range.end}if(A0)&&(Bthis.values[A+1])){B=this.values[A+1]}}B=this.getNearestValue(B);this.values[A]=B;this.value=this.values[0];this.handles[A].style[this.isVertical()?"top":"left"]=this.translateToPx(B);this.drawSpans();if(!this.dragging||!this.event){this.updateFinished()}},setValueBy:function(B,A){this.setValue(this.values[A||this.activeHandleIdx||0]+B,A||this.activeHandleIdx||0)},translateToPx:function(A){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(A-this.range.start))+"px"},translateToValue:function(A){return((A/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)},getRange:function(B){var A=this.values.sortBy(Prototype.K);B=B||0;return $R(A[B],A[B+1])},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignY)},isVertical:function(){return(this.axis=="vertical")},drawSpans:function(){var A=this;if(this.spans){$R(0,this.spans.length-1).each(function(B){A.setSpan(A.spans[B],A.getRange(B))})}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))}},setSpan:function(B,A){if(this.isVertical()){B.style.top=this.translateToPx(A.start);B.style.height=this.translateToPx(A.end-A.start+this.range.start)}else{B.style.left=this.translateToPx(A.start);B.style.width=this.translateToPx(A.end-A.start+this.range.start)}},updateStyles:function(){this.handles.each(function(A){Element.removeClassName(A,"selected")});Element.addClassName(this.activeHandle,"selected")},startDrag:function(C){if(Event.isLeftClick(C)){if(!this.disabled){this.active=true;var D=Event.element(C);var E=[Event.pointerX(C),Event.pointerY(C)];var A=D;if(A==this.track){var B=Position.cumulativeOffset(this.track);this.event=C;this.setValue(this.translateToValue((this.isVertical()?E[1]-B[1]:E[0]-B[0])-(this.handleLength/2)));var B=Position.cumulativeOffset(this.activeHandle);this.offsetX=(E[0]-B[0]);this.offsetY=(E[1]-B[1])}else{while((this.handles.indexOf(D)==-1)&&D.parentNode){D=D.parentNode}if(this.handles.indexOf(D)!=-1){this.activeHandle=D;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateStyles();var B=Position.cumulativeOffset(this.activeHandle);this.offsetX=(E[0]-B[0]);this.offsetY=(E[1]-B[1])}}}Event.stop(C)}},update:function(A){if(this.active){if(!this.dragging){this.dragging=true}this.draw(A);if(navigator.appVersion.indexOf("AppleWebKit")>0){window.scrollBy(0,0)}Event.stop(A)}},draw:function(B){var C=[Event.pointerX(B),Event.pointerY(B)];var A=Position.cumulativeOffset(this.track);C[0]-=this.offsetX+A[0];C[1]-=this.offsetY+A[1];this.event=B;this.setValue(this.translateToValue(this.isVertical()?C[1]:C[0]));if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)}},endDrag:function(A){if(this.active&&this.dragging){this.finishDrag(A,true);Event.stop(A)}this.active=false;this.dragging=false},finishDrag:function(A,B){this.active=false;this.dragging=false;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)}this.event=null}} var Scriptaculous={Version:'1.7.0',require:function(libraryName){},load:function(){if((typeof Prototype=='undefined')||(typeof Element=='undefined')||(typeof Element.Methods=='undefined')||parseFloat(Prototype.Version.split(".")[0]+"."+ Prototype.Version.split(".")[1])<1.5) throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");}} Scriptaculous.load();var mtks_slider_width=70.0;var control_messageName=null;var base_control_messageName=null;var message_zone_not_selected='Zone is not selected';function addZone_FieldZonesList(regtype) {switchViewCreateMode(regtype);} function findZone_FieldZonesList(regtype,zonelistid) {var obj=document.getElementById(zonelistid);if(obj.selectedIndex>=0) {var fieldid=obj[obj.selectedIndex].value;findRegionByID(regtype,fieldid);}else{alert(message_zone_not_selected);}} function editZone_FieldZonesList(regtype,zonelistid) {var obj=document.getElementById(zonelistid);if(obj.selectedIndex>=0) {var fieldid=obj[obj.selectedIndex].value;showFieldConfigByInternalID(fieldid,regtype);}else{alert(message_zone_not_selected);}} function deleteZone_FieldZonesList(regtype,zonelistid) {var obj=document.getElementById(zonelistid);if(obj.selectedIndex>=0) {var fieldid=obj[obj.selectedIndex].value;if(deleteRegionByID(regtype,fieldid)==true) {obj[obj.selectedIndex]=null;}}else{alert(message_zone_not_selected);}} function doUpload(iframeID,doPostBackStr) {try{if(!document.getElementById(iframeID)||!document.getElementById(iframeID).contentWindow||!document.getElementById(iframeID).contentWindow.submitForm) {setTimeout('doUpload('+iframeID+')',50);return;} document.getElementById(iframeID).contentWindow.submitForm(doPostBackStr);}catch(e){alert('Occurred error during init FileUpload DialogBox!');}} function disableControl(controlID) {document.getElementById(controlID).disabled=true;} function enableControl(controlID) {alert('An error occured during file upload!');document.getElementById(controlID).disabled=false;} function hideControl(controlID) {document.getElementById(controlID).style.display='none';} function showControl(controlID) {document.getElementById(controlID).style.display='block';} function calcLayer2Width(handle,txt,ev,min,max,precision) {if(Math.round((max-min)*ev.offsetX/mtks_slider_width)<=max-min&&Math.round((max-min)*ev.offsetX/mtks_slider_width)>=min-min) {document.getElementById(handle).style.width=ev.offsetX+10+'px';var result=new Number(((max-min)*ev.offsetX/mtks_slider_width)+min);document.getElementById(txt).value=result.toFixed(precision);}} function sliderOnClick(handle,txt,ev,min,max,precision) {if(document.getElementById(txt).disabled==false) {calcLayer2Width(handle,txt,ev,min,max,precision);}} function sliderOnMouseMove(handle,txt,ev,min,max,precision) {if(document.getElementById(txt).disabled==false&&ev.button==1) {calcLayer2Width(handle,txt,ev,min,max,precision);}} function sliderTextBoxChanged(handle,txt,min,max) {try{var value=new Number(document.getElementById(txt).value);if(isNaN(value)) {document.getElementById(txt).value=min;value=new Number(min);} if(value>max||value=value+step_value) value=value+step_value;} this.document.getElementById(txt).value=value.toFixed(precision);sliderTextBoxChanged(handle,txt,min,max);} function DecObjValue(handle,txt,min,max,step,precision) {var value=new Number(this.document.getElementById(txt).value);var step_value=new Number(step);if(isNaN(value)) {value=new Number(min);}else {if(new Number(min)<=value-step_value) value=value-step_value;} this.document.getElementById(txt).value=value.toFixed(precision);sliderTextBoxChanged(handle,txt,min,max);} function setHalfSizeControl(controlName,baseControlName) {control_messageName=controlName;base_control_messageName=baseControlName;setTipNoImagePosition();} function setTipNoImagePosition() {try{if(document.getElementById(control_messageName)&&document.getElementById(base_control_messageName)&&document.getElementById(base_control_messageName).style.height) {document.getElementById(control_messageName).style.height=((document.getElementById(base_control_messageName).style.height.replace('px','')/2)-75)+'px';document.getElementById(base_control_messageName).style.paddingLeft=((document.getElementById(base_control_messageName).clientWidth/2)-150)+'px';}}catch(e){}} var waitjob_counter=0;var master_lock=0;var checksCount=0;var showUnloadMessage=false;var height_arr=new Array();var app_windowWidth=0;var app_windowHeight=0;var app_windowDispWidth=0;var app_windowDispHeight=0;var mainHeaderHeight;var mainLeftBorderWidth;var mainRightBorderWidth;var mainFooterHeight;var showHoverFired=false;window.onresize=OnResizeWindow;window.onscroll=SetOnScrollWindow;document.onmousedown=OnMouseDown;document.onmouseup=OnMouseUp;function OnMouseDown() {} function OnMouseUp() {} function OnLoad() {mainHeaderHeight=document.getElementById('divMainMenu').clientHeight+document.getElementById('tableMainTitle').clientHeight;mainLeftBorderWidth=document.getElementById('mainBorderLeft').clientWidth;mainRightBorderWidth=document.getElementById('mainBorderRight').clientWidth;mainFooterHeight=2;setWindowSize();setTimeout('endCallback()',500);} function doEscape() {var inputs=document.getElementsByTagName("input");for(i=0;i!=inputs.length;i++){try{if(inputs[i].getAttribute("doescape")&&inputs[i].style.visibility!='hidden'){inputs[i].value=escape(inputs[i].value);inputs[i].style.visibility='hidden';inputs[i].style.width='1px';}}catch(e){}}} function CenterItemOnScreen(itemId,width,height) {try{if(document.getElementById(itemId)){document.getElementById(itemId).style.display='block';var w=parseInt(document.getElementById(itemId).clientWidth)/2;var h=parseInt(document.getElementById(itemId).clientHeight)/2;if(isNaN(h)) {h=width*0.35;}else {h=(height/2)-h;} if(isNaN(w)) {w=width*0.35;}else {w=(width/2)-w;} document.getElementById(itemId).style.left=w+'px';document.getElementById(itemId).style.top=h+'px';}}catch(e){};} function CenterSpecialItemsOnScreen(width,height){var selects=document.getElementsByTagName("div");setTipNoImagePosition();for(i=0;i!=selects.length;i++){try{if(selects[i].getAttribute("centered_item")){CenterItemOnScreen(selects[i].id,width,height);} if(selects[i].getAttribute("centered_item_top")){selects[i].style.left=(width*0.35)+'px';selects[i].style.top=(height*0.05)+'px';} if(selects[i].getAttribute("centered_item_top_left")){selects[i].style.left=(width*0.05)+'px';selects[i].style.top=(height*0.05)+'px';}}catch(e){}}} function SetHeight(control_name) {if(app_windowHeight==0||app_windowWidth==0) {setWindowSize();} var height=app_windowDispHeight;height=height-30;var control;try{control=document.getElementById(control_name);if(control&&control.getAttribute("height_top")) {control.style.height=(height-parseInt(control.getAttribute("height_top")))+'px'}}catch(e){}} function SetHeight2(control_name,control_height) {if(app_windowHeight==0||app_windowWidth==0) {setWindowSize();} var height=app_windowDispHeight;height=height-30;var control;try{control=document.getElementById(control_name);if(control&&control.getAttribute("height_top")) {control.setAttribute("height_top",control_height);control.style.height=(height-parseInt(control_height))+'px'}}catch(e){}} function initHeightResize(height) {for(var i=0;i=document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;} var windowWidth=0,windowHeight=0;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;} if(yScroll0){waitjob_counter-=1;} document.getElementById("waitCallback").style.display="none";} function showSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){try{if(selects[i].getAttribute("show_always")!=1){selects[i].style.visibility="visible";}}catch(e){}}} function showAllSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){try{selects[i].style.visibility="visible";}catch(e){}}} function hideSelectBoxes(){try {if(typeof document.body.style.maxHeight=='undefined'){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){try{if(selects[i].getAttribute("show_always")!=1){selects[i].style.visibility="hidden";}}catch(e){}}}}catch(e){}} function hideAllSelectBoxes(){try {if(typeof document.body.style.maxHeight=='undefined'){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){try{selects[i].style.visibility="hidden";}catch(e){}}}}catch(e){}} function LockSite(){master_lock=1;LockSiteAndHideCombo();OnResizeWindow();} function LockSiteAndHideCombo() {hideSelectBoxes();document.getElementById("overlay").style.visibility="visible";} function UnlockSite(){UnlockSiteAndShowCombo();master_lock=0;} function UnlockSiteAndShowCombo() {showSelectBoxes();document.getElementById("overlay").style.visibility="hidden";document.getElementById("overlay").style.width=0;document.getElementById("overlay").style.height=0;} function LockSite2(){master_lock=1;hideSelectBoxes();document.getElementById("overlay2").style.visibility="visible";OnResizeWindow();} function UnlockSite2(){showSelectBoxes();document.getElementById("overlay2").style.visibility="hidden";document.getElementById("overlay2").style.width=0;document.getElementById("overlay2").style.height=0;master_lock=0;} function PromptBatchClose() {var msg="Do you want to Close the Batch?";var i=confirm(msg);return i;} function PromptAllBatchesClose() {var msg="Do you want to Close all Batches?";var i=confirm(msg);return i;} function showConfirm() {if(checksCount>=0) {var i=confirm('There are '+checksCount+' checks being processed. If you reset the system, they will be lost. Do you want to proceed?');if(i==false) {return false;}} return true;} function stdBeforeUnloadProc(a0) {if(showUnloadMessage==true){this.document.getElementById("waitCallback").style.display="none";a0.returnValue="-----------------------------------------------------------\n"+"You've made changes to this page.\n"+"\nTO SAVE THESE CHANGES:\n click Cancel below, then click the Save button\n"+" on the current page.\n"+"-----------------------------------------------------------";} else{a0.returnValue==null;} return a0.returnValue;} function showConfirmation(param) {showUnloadMessage=param;} function SetEnabledStateObj(checkbox,control) {if(checkbox.checked) {if(control.getAttribute("force_disabled")) {control.disabled=true;} else {try{control.removeAttribute('disabled');}catch(e){control.disabled=false;}} try{if(control.getAttribute("force_autocheck")) {if(control.type=="checkbox"){control.checked=true;} for(var ii=0;ii