
Function.createDelegate=function($a,$b){return function(){return $b.apply($a,arguments);}};Function.createCallback=function($b,$c){return function(){var l=arguments.length;if(l>0){var $d=[];for(var i=0;i<l;i++)$d[i]=arguments[i];$d[l]=$c;return $b.apply(this,$d);};return $b.call(this,$c);}};Function.prototype.initializeBase=function($a,$e){this.resolveInheritance();if(typeof this.__baseType!="function"){for(var i=0;i<this.__baseType.length;i++)this.$1y(this.__baseType[i],$a,$e);}else this.$1y(this.__baseType,$a,$e);};Function.prototype.$1y=function($f,$a,$e){if($f){if(!$e)$f.apply($a);else $f.apply($a,$e);};return $a;};Function.prototype.resolveInheritance=function(){var $f=this.__baseType;if(this.__typeResolved===undefined&&$f){if(typeof $f=="function"){$f.resolveInheritance();this.resolveInherit($f);}else{for(var i=0;i<$f.length;i++){$f[i].resolveInheritance();this.resolveInherit($f[i]);}};this.__typeResolved=true;}};Function.prototype.resolveInherit=function($f){for(var $g in $f.prototype){var $h=$f.prototype[$g];if(!this.prototype[$g])this.prototype[$g]=$h;}};Function.prototype.callBase=function($a,name,$e){var $f=this.__baseType,$i;if($f){if(typeof $f!="function"){for(var i=0;i<$f.length;i++){$i=this.$1z($f[i],name);if($i)break;}}else $i=this.$1z($f,name);};if($i){if(!$e)return $i.apply($a);else return $i.apply($a,$e);}};Function.prototype.$1z=function($f,name){var $b=$f.prototype[name];return($b instanceof Function)?$b:null;};String.prototype.endsWith=function($j){$j=String($j);return(this.substr(this.length-$j.length)===$j);};String.prototype.startsWith=function($k){$k=String($k);return(this.substr(0,$k.length)===$k);};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');};String.prototype.trimEnd=function(){return this.replace(/\s+$/,'');};String.prototype.trimStart=function(){return this.replace(/^\s+/,'');};String.compare=function(s1,s2,$l){if($l){if(s1)s1=s1.toLowerCase();if(s2)s2=s2.toLowerCase();};return(s1==s2);};String.prototype.times=function(n){return n?this +this.times(n-1):"";};Boolean.parse=function($m,$n){if($m==null)return $n;if(typeof($m)!="string")$m=String($m);var v=$m.trim().toLowerCase();if(v==='false'||v==='0'||v==='')return false;if(v==='true'||v==='1')return true;};Array.clear=function($o){$o.length=0;};Array.clone=function($o){if($o.length===1)return[$o[0]];return Array.apply(null,$o);};Array.contains=function($o,$p){return Array.indexOf($o,$p)>=0;};Array.isEmpty=function($o){for(var i=0;i<$o.length;i++)if($o[i]!=null&&$o[i]!="")return false;return true;};Array.indexOf=function($o,$p,$q){if(typeof($p)==="undefined")return -1;var length=$o.length;if(length!==0){$q=$q-0;if(isNaN($q)){$q=0;}else{if(isFinite($q))$q=$q-($q%1);if($q<0)$q=Math.max(0,length+$q);};for(var i=$q;i<length;i++){if(typeof($o[i])!=="undefined"&&$o[i]===$p)return i;}};return -1;};Array.addRange=function($o,$r){for(var $s=0;$s<$r.length;$s++)$o.push($r[$s]);};Array.addUniqueRange=function($o,$r){for(var $s=0;$s<$r.length;$s++)if(!Array.contains($o,$r[$s]))$o.push($r[$s]);};Array.insert=function($o,$s,$p){$o.splice($s,0,$p);};Array.remove=function($o,$p){var $s=Array.indexOf($o,$p);if($s>=0)$o.splice($s,1);return $s>=0;};Array.removeAt=function($o,$s){$o.splice($s,1);};function PX(){this.AgentName=navigator.userAgent.toLowerCase();this.Version=parseInt(navigator.appVersion);this.IsDom=typeof(document.getElementById)=="function";this.IsWin=this.AgentName.indexOf("win")>=0;this.IsWin98=(this.AgentName.indexOf("win98")>=0)||(this.AgentName.indexOf("windows 98")>=0);this.IsNetscape=this.IsDom&&(navigator.appName=="Netscape");this.IsFirefox=this.AgentName.indexOf("firefox")>=0;this.IsOpera=this.AgentName.indexOf("opera")>=0;this.IsIE=(document.all!=null)&&!this.IsOpera;this.IsSafari=this.AgentName.indexOf("safari")>=0;this.pendingCallbacks=new Array();};PX.prototype.isDigit=function($t){if(typeof($t)=="string")$t=$t.charCodeAt(0);return $t>47&&$t<58;};PX.prototype.isLetter=function(ch){if(typeof(ch)=="number")ch=String.fromCharCode(ch);return ch.charCodeAt(0)>255||ch.toUpperCase()!=ch.toLowerCase();};PX.prototype.joinStr=function($u){var ar=new Array();for(var i=1;i<arguments.length;i++)if(arguments[i])ar.push(arguments[i].toString());return ar.join($u)};PX.prototype.equals=function(v1,v2){if((v1==null&&v2!=null)||(v2==null&&v1!=null))return false;if((v1 instanceof Date)&&(v2 instanceof Date))return v1.getTime()==v2.getTime();return v1==v2;};PX.prototype.getInvariantText=function($v){var $w="";if($v!=null){if($v instanceof Date){var $x=[$v.getMonth()+1,$v.getDate(),$v.getFullYear()];$w=$x.join("/");var $y=[$v.getHours(),$v.getMinutes(),$v.getSeconds()];if($y[0]||$y[1]||$y[2])$w+=" "+$y.join(":");}else if(typeof($v)=="boolean"){$w=$v?"True":"False";}else $w=$v.toString();};return $w;};PX.prototype.addEventHandler=function($z,$A,$B,$C){if($z.addEventListener)$z.addEventListener($A,$B,$C);else if($z.attachEvent)$z.attachEvent("on"+$A,$B);else eval("obj.on"+$A+"="+$B);};PX.prototype.removeEventHandler=function($z,$A,$B,$C){if($z.removeEventListener)$z.removeEventListener($A,$B,$C);else if($z.detachEvent)$z.detachEvent("on"+$A,$B);else eval("obj.on"+$A+"= null;");};PX.prototype.cancelEvent=function(e,$D){if(e==null)if((e=window.event)==null)return;if($D==null)$D=true;if($D&&e.stopPropagation!=null)e.stopPropagation();if(e.preventDefault!=null)e.preventDefault();if($D)e.cancelBubble=true;e.returnValue=false;if(e.keyCode&&px.IsIE)try{e.keyCode=0;}catch(ex){}};PX.prototype.lockMouseEvents=function(){this.mouseLocked=true;setTimeout("PX.unlockMouse()",300);};PX.unlockMouse=function(){px.mouseLocked=false;};PX.prototype.elemByID=function(id){if(document.getElementById)return document.getElementById(id);else return document.all[id];};PX.prototype.elemsByName=function(name,$E){var $F;if(document.getElementsByName)$F=document.getElementsByName(name);else{$F=document.all[name];if($F&&$F.length==0)$F=[$F];};if($E&&$F){var ar=new Array();for(var i=0;i<$F.length;i++)ar.push($F[i]);return ar;};return $F;};PX.prototype.createElement=function(element,$G,$H){if($H==null)$H=document;var $I=$H.createElement(element);for(var name in $G)$I.setAttribute(name,$G[name]);return $I;};PX.prototype.contains=function($J,$I){if($J.contains)return $J.contains($I);var $K=false,p=$I;while(p&&p!=$J)p=p.parentNode;return p==$J;};PX.prototype.containsObject=function($J,ev){var $I=this.eventElem(ev),$z,id;if($I)while($I){if(($z=$I.object)!=null){if($z.ID)id=$z.ID;if($z.element)id=$z.element.id;if(id)break;};$I=$I.parentNode;};return id?id.startsWith($J.ID):false;};PX.prototype.getEnabled=function($I){if(Array.contains(PX.formTags,$I.tagName))return !$I.disabled;return $I.getAttribute==null||!$I.getAttribute("enabled");};PX.prototype.setEnabled=function($I,v,$L){v=Boolean(v);if(Array.contains(PX.formTags,$I.tagName))$I.disabled=!v;else{if(v)$I.removeAttribute("enabled");else $I.setAttribute("enabled","false");};if($L){if(v){if($I.storedBack!=null){$I.style.color=$I.storedColor;$I.style.backgroundColor=$I.storedBack;}else if($I.storedBorder!=null){$I.style.borderColor=$I.storedBorder;}}else px.paintDisabled($I);}};PX.formTags=['BUTTON','INPUT','SELECT','TEXTAREA'];PX.prototype.paintDisabled=function(){for(var i=0;i<arguments.length;i++){var $I=arguments[i];if($I&&$I.style!=null){if(px.IsIE){if($I.storedBorder==null)$I.storedBorder=$I.style.borderColor;$I.style.borderColor="gray";}else{if($I.storedBack==null){$I.storedColor=$I.style.color;$I.storedBack=$I.style.backgroundColor;};$I.style.color="black";$I.style.backgroundColor="gainsboro";}}}};PX.prototype.getTitle=function($I){var title=$I.title;if(!title&&px_tm)title=$I.getAttribute(px_tm.attrName);return title;};PX.prototype.setTitle=function($I,v){$I.title=(v!=null)?v:"";if(px_tm&&px_tm.loadHandled)px_tm.registerElem($I);};PX.prototype.getElemTopPos=function($I,parent,$M){return px.getElemPos($I,parent,"Top",$M);};PX.prototype.getElemLeftPos=function($I,parent,$M){return px.getElemPos($I,parent,"Left",$M);};PX.prototype.getMouseOffsetX=function(ev,$I){return ev.clientX-px.getElemLeftPos($I)+document.documentElement.scrollLeft;};PX.prototype.getMouseOffsetY=function(ev,$I){return ev.clientY-px.getElemTopPos($I)+document.documentElement.scrollTop;};PX.prototype.getElemPos=function(e,parent,$N,$M){if($M==null)$M=true;var $O="offset"+$N,$P="client"+$N;var $Q="border"+$N+"Width",scroll="scroll"+$N;var $R="padding"+$N;var $S=0,$T=e;if(e!=null)do{$S+=e[$O];if($M&&$T!=e){if(e[$P]){$S+=e[$P];}else if(e.style[$Q]){var bw=parseInt(e.style[$Q]);if(!isNaN(bw))$S+=bw;}};if(e[scroll]!=null&&$T!=e){var op=e.offsetParent,t=e;while(t&&t!=op&&t.tagName!="BODY"){if(t[scroll])$S-=t[scroll];t=t.parentNode;}};if(e.tagName=="BODY"||e.tagName=="HTML")break;e=e.offsetParent;}while(e!=null&&e!=parent);return $S;};PX.prototype.getDropDownPos=function($U,$V,$W){var e=$U,de=$V,$S=new Object();var $X=document.documentElement;var $Y=Boolean(de.style.display),$Z,$00,$01;var $02,$03,$04,$05;try{if($Y){de.style.left=de.style.top="-1000px";de.style.display="";};$Z=de.offsetWidth;$00=de.offsetHeight;$01=de.offsetParent;$02=$X.clientWidth;$03=$X.clientHeight;$05=$X.scrollLeft;$04=$X.scrollTop;}finally{if($Y)de.style.display="none";};$S.left=px.getElemLeftPos(e,$01,true);$S.top=px.getElemTopPos(e,$01,true)+e.offsetHeight;var $06=$S.top+e.offsetHeight/2-$04;var $07=$03-$06;if($W==null)$W=0;var $08=false;if(($S.top+$00)>($03+$04)&&$06>$07){$S.top-=e.offsetHeight+$00;if($W>0&&$S.top<$04){$S.top=$04;$08=true;}}else{if($W>0&&($S.top+$00)>($03+$04)){$S.top=$04+($03-$00);if($S.top<$04)$S.top=$04;$08=true;}};if($08){var $09=$S.left+e.offsetWidth;var $0a=$S.left-$05;var $0b=$02-($09-$05);if(($09+$Z)>($02+$05)&&$0a>$0b)$S.left-=$Z;else $S.left=$09;};if($W>1){if(($S.left+$Z)>($02+$05))$S.left=$02-$Z+$05;if(($S.top+$00)>($03+$04))$S.top=$03-$00+$04;if($S.left<$05)$S.left=$05;if($S.top<$04)$S.top=$04;};return $S;};PX.prototype.setDropDownPos=function($U,$V,$W){var $S=px.getDropDownPos($U,$V,$W);$V.style.left=$S.left+"px";$V.style.top=$S.top+"px";};PX.prototype.setStyleWidth=function($I,$Z){if($I&&$I.style){var $0c=this.getStyleWidth($I,$Z);if($0c<0)$0c=0;$I.style.width=$0c+"px";if(px.IsIE)try{$I.width=$0c+"px";}catch(ex){}}};PX.prototype.getStyleWidth=function($I,$Z){var s=$I.currentStyle;if(!s)s=window.getComputedStyle($I,null);if(s){var w=$Z?$Z:$I.offsetWidth;var $0d=function(v){var $v=v?parseInt(v):0;return isNaN($v)?0:$v;};var $R=$0d(s.paddingLeft)+$0d(s.paddingRight);var $Q=$0d(s.borderLeftWidth)+$0d(s.borderRightWidth);return w-$R-$Q;}};PX.prototype.setStyleLeft=function($I,$0e){if($I&&$I.style)$I.style.left=this.getStyleLeft($I,$0e)+"px";};PX.prototype.getStyleLeft=function($I,$0e){var s=$I.currentStyle;if(!s)s=window.getComputedStyle($I,null);if(s){var w=$0e?$0e:$I.offsetLeft;var $0d=function(v){var $v=v?parseInt(v):0;return isNaN($v)?0:$v;};var $R=$0d(s.paddingLeft);var $Q=$0d(s.borderLeftWidth);return w-$R-$Q;}};PX.prototype.setStyleHeight=function($I,$00){if($I&&$I.style){var $0f=this.getStyleHeight($I,$00);if($0f<0)$0f=0;$I.style.height=$0f+"px";if(px.IsIE)try{$I.height=$0f+"px";}catch(ex){}}};PX.prototype.getStyleHeight=function($I,$00){var s=$I.currentStyle;if(!s)s=window.getComputedStyle($I,null);if(s){var h=$00?$00:$I.offsetHeight;var $0d=function(v){var $v=v?parseInt(v):0;return isNaN($v)?0:$v;};var $0g=$0d(s.paddingTop)+$0d(s.paddingBottom);var $0h=$0d(s.borderTopWidth)+$0d(s.borderBottomWidth);return h-$0g-$0h;}};PX.prototype.setStyleTop=function($I,top){if($I&&$I.style)$I.style.top=this.getStyleTop($I,top)+"px";};PX.prototype.getStyleTop=function($I,top){var s=$I.currentStyle;if(!s)s=window.getComputedStyle($I,null);if(s){var h=top?top:$I.offsetTop;var $0d=function(v){var $v=v?parseInt(v):0;return isNaN($v)?0:$v;};var $0g=$0d(s.paddingTop);var $0h=$0d(s.borderTopWidth);return h-$0g-$0h;}};PX.prototype.scrollToView=function($0i,$I,$W){if($0i.scrollWidth<=$0i.offsetWidth&&$0i.scrollHeight<=$0i.offsetHeight)return;var $01=$0i.offsetParent;var $0j=px.getElemLeftPos($I,$01);var $0k=px.getElemLeftPos($0i,$01);var $0l=px.getElemTopPos($I,$01);var $0m=px.getElemTopPos($0i,$01);var $0n=$0j+$I.offsetWidth;var $0o=$0k+$0i.offsetWidth;var $0p=$0l+$I.offsetHeight;var $0q=$0m+$0i.offsetHeight;var $0r=$0i.offsetWidth-$0i.clientWidth;var $0s=$0i.offsetHeight-$0i.clientHeight;if($W==null)$W=0;if($W==0||$W==1){if($0p>($0q-$0s)&&$0l-($0p-$0q)>$0m)$0i.scrollTop=$0i.scrollTop+($0p-$0q)+$0s;if($0l<$0m)$0i.scrollTop=$0i.scrollTop-($0m-$0l);};if($W==0||$W==2){if($0n>($0o-$0r)&&$0j-($0n-$0o)>$0k)$0i.scrollLeft=$0i.scrollLeft+($0n-$0o)+$0r;if($0j<$0k)$0i.scrollLeft=$0i.scrollLeft-($0k-$0j);}};PX.prototype.getCSSRule=function($0t){var $0u=document.styleSheets;$0t="."+$0t;for(var i=0;i<$0u.length;i++){var sh=$0u[i];if(sh.cssRules){for(var j=0;j<sh.cssRules.length;j++)if(sh.cssRules[j].selectorText==$0t)return sh.cssRules[j];};if(sh.rules){for(var j=0;j<sh.rules.length;j++)if(sh.rules[j].selectorText==$0t)return sh.rules[j];};if(sh.imports){for(var j=0;j<sh.imports.length;j++)for(var m=0;m<sh.imports[j].rules.length;m++){if(sh.imports[j].rules[m].selectorText==$0t)return sh.imports[j].rules[m];}}};return null;};PX.prototype.copyCssToStyle=function($I,$0v){var $0w=$0v?px.getCSSRule($0v):null;if($0w){for(var n in $0w.style){var $v=$0w.style[n];if(n!="cssText"&&$v&&typeof($v)=="string"){try{$I.style[n]=$0w.style[n];}catch(ex){}}}}};PX.prototype.registerCssRules=function($0x){var $0y='<style type="text/css">';var $0z="</style>";var end=$0x.indexOf($0z);var $q=$0x.indexOf($0y);while($q>=0&&end>0){$q+=$0y.length;var $0A=$0x.substring($q,end);var ar=$0A.split("\x7d");if(px.IsIE){if(px.sheet==null)px.sheet=document.createStyleSheet();for(var i=0;i<ar.length;i++){$q=ar[i].indexOf("{");if($q>0){var $0t=ar[i].substring(0,$q).replace(/\s+/g,"");var $0B=ar[i].substring($q+1);if($0t&&$0B)px.sheet.addRule($0t,$0B);}}}else{var $0C=document.styleSheets[0];for(var i=0;i<ar.length;i++){if(ar[i].indexOf("{")>0)$0C.insertRule(ar[i]+"\x7d",$0C.cssRules.length-1);}};$q=$0x.indexOf($0y,end +$0z.length);end=$0x.indexOf($0z,$q);}};PX.prototype.eventElem=function(ev,o){if(ev.target)return ev.target;else if(ev.srcElement)return ev.srcElement;return o;};PX.prototype.eventButton=function(ev){if(document.all){switch(ev.button){case 1:return 0;case 4:return 1;case 2:return 2;};return -1;};return ev.button;};PX.prototype.eventObject=function(ev,$0D){var $I=this.eventElem(ev),o;if(!$I)return;while($I){if((o=$I.object)!=null){if($0D==null||o instanceof $0D)break;var $f=o.constructor.__baseType,$C;if($f){if(typeof $f=="function")$C=($f==$0D);else $C=Array.contains($f,$0D);if($C)break;}};$I=$I.parentNode;};return $I?$I.object:null;};PX.prototype.findTextElem=function($I){var n=$I.childNodes;if(!n)return null;var $0E=null;for(var i=0;i<n.length;i++){if(n[i].nodeName=="#text"){$0E=n[i];break;}else if(n[i].childNodes){$0E=arguments.callee(n[i]);if($0E!=null)break;}};return $0E;};PX.prototype.setElemText=function($I,$w,$0F){if($0F==null)$0F=true;var n=px.findTextElem($I);if(!n&&$0F){var t=document.createTextNode($w);$I.appendChild(t);}else n.nodeValue=$w;};PX.prototype.getElemText=function($I){var $0E="";if($I.nodeName=="#text")$0E=$I.nodeValue;else{var n=px.findTextElem($I);if(n)$0E=n.nodeValue;};return $0E;};PX.prototype.getTableCellIndex=function(td){if(td&&td.tagName=="TD"){var r=td.parentNode;for(var $0G=0;$0G<r.cells.length;$0G++)if(r.cells[$0G]==td)break;return $0G;};return -1;};PX.prototype.startWC=function(){var wd=document.$1A,$X=document.documentElement;if(!wd){var $J=window.theForm?window.theForm:document.body;wd=document.createElement("div");wd.style.left=wd.style.top="0px";wd.style.backgroundColor="transparent";$J.appendChild(wd);document.$1A=wd;px.addEventHandler($X,"keydown",PX.$1B,true);px.addEventHandler($X,"keypress",PX.$1B,true);};wd.style.display="";wd.style.zIndex=20000;wd.style.position="absolute";wd.style.width=$X.clientWidth+"px";wd.style.height=$X.clientHeight+"px";wd.style.cursor="wait";if(wd.setCapture)wd.setCapture();};PX.prototype.stopWC=function(){var wd=document.$1A;if(wd&&wd.style.display==""){wd.style.cursor="";wd.style.display="none";if(wd.releaseCapture){wd.releaseCapture();if(px.$1C!=null)for(var id in px.$1C){var ar=px.$1C[id];ar[1].call(ar[0],ar[2]);};px.$1C=null;}}};PX.prototype.isActiveWC=function(){var wd=document.$1A;return wd!=null&&wd.style.display=="";};PX.$1B=function(e){var wd=document.$1A;if(wd&&wd.style.display==""){if(px.IsIE)try{e.keyCode=0;}catch(ex){};px.cancelEvent(e);}};PX.prototype.registerWaitTask=function($0H,$0I,$c){if(px.IsIE){if(px.$1C==null)px.$1C=new Object();px.$1C[$0H.ID]=[$0H,$0I,$c];}};PX.prototype.unregisterWaitTask=function($0H){if(px.IsIE&&px.$1C!=null)delete px.$1C[$0H.ID];};PX.prototype.createFocusElem=function($U){var $I=document.createElement("INPUT"),s=$I.style;$I.type="text";s.zIndex=-1;s.position="absolute";s.width=s.height="0px";s.padding="0px";s.left=s.top="-99px";s.cursor="default";if($U&&$U.offsetParent){$U.offsetParent.appendChild($I);$I.setAttribute("controlID",$U.id);}else document.body.appendChild($I);return $I;};PX.selectElement=function(id,$0J){var $I=px.elemByID(id);if($I){if($I.object&&$I.object.elemFocus)$I=$I.object.elemFocus;try{var $0K=(px.IsIE||$0J||!$I.select);if($0K&&$I.focus)$I.focus();if($I.select)$I.select();}catch(ex){}}};PX.prototype.setActive=function(id){var $I=(typeof id=="string")?px.elemByID(id):id;if($I){$I.setActive?$I.setActive():$I.focus();}};PX.prototype.doPost=function(id,$0L,$0M){try{var $0N=document.activeElement;if($0N&&$0N.fireEvent)$0N.fireEvent("onblur");}catch(ex){};this.resetDisabledState();try{if($0M)window.theForm.action=$0M;__doPostBack(id,$0L);}catch(ex){}};PX.prototype.resetDisabledState=function(){var $0O=theForm.elements.length;this.$1D=new Array();for(var i=0;i<$0O;i++){var $I=theForm.elements[i];if(!$I.disabled)continue;$I.disabled=false;this.$1D.push($I);if(!this.IsIE)continue;var $01=$I.parentNode;while($01!=null){if(!this.getEnabled($01)){this.setEnabled($01,true);this.$1D.push($01);break;};$01=$01.parentNode;}}};PX.prototype.restoreDisabledState=function(){var ar=this.$1D;if(!ar||ar.length==0)return;for(var i=0;i<ar.length;i++)this.setEnabled(ar[i],false);delete this.$1D;};PX.prototype.doCallback=function(id,$0P,$0Q,$c,$0R,$0S,$0T){if($0T==null)$0T=true;if($0S==null)$0S=true;if($0R==null)$0R=function($0U){alert($0U);};try{for(var i=0;i<__pendingCallbacks.length;i++){var $z=__pendingCallbacks[i];if($z!=null){var $0V=new Object();$0V.args=[id,$0P,$0Q,$c,$0R,$0S];$0V.postData=__theFormPostData;$0V.postCollection=__theFormPostCollection;this.pendingCallbacks.push($0V);return;}};if($0S){__theFormPostData='';__theFormPostCollection.length=0;window.WebForm_InitCallback();};var $0W=new Object();$0W.eventCallback=$0Q;$0W.errorCallback=$0R;$0W.context=$c;this.callbackMode=true;window.WebForm_DoCallback(id,$0P,PX.$1E,$0W,PX.$1F,$0T);if($c&&$c.clearFunc)$c.clearFunc($c);}catch(ex){alert(ex.type+": "+ex.message);}};PX.$1E=function($0X,$c){px.callbackMode=false;$c.eventCallback($0X,$c.context);if(px.pendingCallbacks.length>0){var $0V=px.pendingCallbacks.shift();var $d=$0V.args,$0W=$d[3],$0L=$d[1],$0S=$d[5];if($0W.getDataFunc)$0L=$0W.getDataFunc($0W);if(!$0S){if($0W.initFunc)$0W.initFunc($0W);else{__theFormPostData=$0V.postData;__theFormPostCollection=$0V.postCollection;}};px.doCallback($d[0],$0L,$d[2],$0W,$d[4],$0S);}};PX.$1F=function($0X,$c){Array.clear(px.pendingCallbacks);px.callbackMode=false;$c.errorCallback($0X,$c.context);};PX.prototype.searchFrame=function($0Y,$0Z){if($0Y.frames[$0Z]!=null)return $0Y.frames[$0Z];for(var i=0;i<$0Y.frames.length;i++){var $10=arguments.callee($0Y.frames[i],$0Z);if($10!=null)return $10;};return null;};PX.prototype.clipboardCopy=function($w){if(px.IsIE){clipboardData.setData("Text",$w);}else{}};PX.prototype.getCookie=function(name){var $11=new RegExp(name+"=([^;]+)");if($11.test(document.cookie+";")){$11.exec(document.cookie+";");return unescape(RegExp.$1);};return null;};PX.prototype.setCookie=function(name,$v,$12,$13){if(name&&$v!=null){var $w=name+"="+$v;if($12)$w+="; path="+$12;if($13)$w+="; expires="+$13.toGMTString();document.cookie=$w;}};PX.prototype.openUrl=function($14,$0Z,$15){if($14==null||$14.length==0)return;if($15){px.openFrameset($14,$0Z);return;};var $16=$14.toLowerCase();if($16.indexOf("javascript")!=-1){eval($14);}else if($0Z){if(this.elemByID($0Z)!=null){this.elemByID($0Z).src=$14;}else{var $17=this.searchFrame(window.top,$0Z);if($17!=null){$17.location=$14;}else if($0Z=="_self"||$0Z=="_parent"||$0Z=="_blank"||$0Z=="_media"||$0Z=="_top"||$0Z=="_search"){window.open($14,$0Z);}else window.open($14);}}else{try{location.href=$14;}catch(x){}}};PX.prototype.getPageName=function(name){var $18=window.location.href;var $q=$18.lastIndexOf('/')+1,end=$18.indexOf('.',$q);if(end==-1)end=$18.length;return $18.substring($q,end);};PX.prototype.openFrameset=function($14,$0Z){if($14==null||$14.length==0)return;if($0Z&&$0Z.startsWith("_"))$0Z=null;var $18=window.top.location.href,$C=false;if($18.indexOf("/(S(")==-1){var $19=px.getCookie("lastwin");if($19)$19=(parseInt($19)+1).toString();else{var $1a=$18.indexOf("/(W(");if($1a!=-1){$19=parseInt($18.substring($1a+4));if(isNaN($19))$19="1";}else $19="1";};$18=px.getSessionUrl(window.top.location,$19);$C=true;};var $1b=window.open($18);if($1b){$18=$C?px.getSessionUrl(window.location,$19):window.location.href;$1b.urlFrame=$0Z?$0Z:window.name;if($14.startsWith("/")){var $1c=new Object();$1c.pathname="/";$1c.href=$14;$1b.urlPage=px.getSessionUrl($1c,$19);}else $1b.urlPage=$18.substring(0,$18.lastIndexOf("/")+1)+$14;}};PX.prototype.getSessionUrl=function(location,$19){var $18=location.href;var $S=$18.indexOf("/(W(");if($S!=-1){return $18.substring(0,$S)+"/(W("+$19+"))"+$18.substring($18.indexOf("/",$S+4));};var $1d=window.top.location.pathname;$1d=$1d.substring(0,$1d.lastIndexOf("/")+1).toLowerCase();$S=$18.indexOf("//");if($S!=-1)$S=$18.toLowerCase().indexOf($1d.toLowerCase(),$S+2);else $S=$18.toLowerCase().indexOf($1d.toLowerCase());if($S!=-1){$S=$S+$1d.length-1;return $18.substring(0,$S)+"/(W("+$19+"))"+$18.substring($S);};return "/(W("+$19+"))"+$18;};PX.prototype.loadFrameset=function(){var $18=window.location.href,$12=window.location.pathname;if($18.indexOf("/(S(")>0)return;px.addEventHandler(window,"load",PX.$1G);if(!window.name){var $19=px.getCookie("lastwin");if($19){$19=(parseInt($19)+1).toString();window.name=$19;px.setCookie("lastwin",$19,"/");var $1e=px.getSessionUrl(window.location,$19);if($1e!=$18)window.location.replace($1e);}else{var $1a=$18.indexOf("/(W(");if($1a!=-1){$19=parseInt($18.substring($1a+4));if(isNaN($19))$19=0;}else $19=0;window.name=$19;px.setCookie("lastwin",$19,"/");}}else if($18.indexOf("/(W("+window.name+"))/")==-1){if(parseInt(window.name)>0){$18=px.getSessionUrl(window.location,window.name);window.location.replace($18);}}};PX.$1G=function(e){if(window.urlFrame&&window.urlPage){window.frames[window.urlFrame].location.href=window.urlPage;window.urlFrame=window.urlPage=null;}else if(window.lastUrl){var fn=window.urlFrame?window.urlFrame:'main';window.frames[fn].location.href=window.lastUrl;}};var px=new PX();function PXXmlDoc($1f,$1g){var $1h=document.implementation;if($1h&&$1h.createDocument)this.xmlDoc=$1h.createDocument(null,$1f,null);else if(window.ActiveXObject){this.xmlDoc=new ActiveXObject("Msxml2.DOMDocument");this.xmlDoc.async=false;if($1f&&!$1g)this.xmlDoc.documentElement=this.xmlDoc.createElement($1f);};if($1g)this.loadXML($1g);else this.rootNode=this.xmlDoc.documentElement;};PXXmlDoc.prototype.loadXML=function($1g){if(px.IsIE)this.xmlDoc.loadXML($1g);else{var $1i=new DOMParser();var $1j=$1i.parseFromString($1g,"text/xml");while(this.xmlDoc.firstChild)this.xmlDoc.removeChild(this.xmlDoc.firstChild);var $1k=this.xmlDoc.importNode($1j.documentElement,true);this.xmlDoc.appendChild($1k);};this.rootNode=this.xmlDoc.documentElement;return this.xmlDoc;};PXXmlDoc.prototype.toString=function($1l){if($1l==null)$1l=this.xmlDoc;if(px.IsIE)return $1l.xml;else{var $1m=new XMLSerializer();return $1m.serializeToString($1l);}};PXXmlDoc.prototype.replaceNode=function($1n,parent){if(parent==null)parent=this.xmlDoc;var $1l=parent.getElementsByTagName($1n.nodeName)[0];if($1n&&this.xmlDoc.importNode)$1n=this.xmlDoc.importNode($1n,true);if($1l&&$1n)$1l.parentNode.replaceChild($1n,$1l);return $1n;};PXXmlDoc.prototype.addNode=function($1o,parent){if(parent==null)parent=this.rootNode;var $1n=this.xmlDoc.createElement($1o);parent.appendChild($1n);return $1n;};PXXmlDoc.prototype.removeNode=function($1o,parent){if(parent==null)parent=this.rootNode;var n=this.findNode($1o,parent);if(n!=null)return parent.removeChild(n);return null;};PXXmlDoc.prototype.findNode=function($1l,parent){if(parent==null)parent=this.rootNode;var $1p=parent.firstChild;while($1p!=null){if($1p.nodeName==$1l||(typeof($1l)=="object"&&$1p==$1l))return $1p;var $p=this.findNode($1l,$1p);if($p!=null)return $p;$1p=$1p.nextSibling;};return null;};PXXmlDoc.prototype.setProperty=function($1l,name,$m){if($1l!=null)$1l.setAttribute(name,($m==null)?"":$m);};PXXmlDoc.prototype.getProperty=function($1l,name){if($1l==null)return "";return $1l.getAttribute(name);};PXXmlDoc.prototype.removeProperty=function($1l,name){if($1l!=null)$1l.removeAttribute(name);};function PXTextRange($I){this.element=$I;this.trange=null;this.selStart=this.selEnd=0;if(px.IsIE&&$I.createTextRange)this.trange=$I.createTextRange();};PXTextRange.prototype.select=function($1q,$1r){var e=this.element;var i=e.value.length;if($1r==null){$1r=$1q;if($1q==null||$1q<0){$1q=0;$1r=i;}};if($1r>=i)$1r=i;else if($1r<$1q)$1r=$1q;if($1q>$1r)$1q=$1r;this.selStart=$1q;this.selEnd=$1r;if(this.trange){$1r-=$1q;this.trange.move("textedit",-1);this.trange.move("character",$1q);if($1r>0)this.trange.moveEnd("character",$1r);this.trange.select();}else if(e.selectionStart!=null){e.selectionStart=$1q;e.selectionEnd=$1r;}else e.select();};PXTextRange.prototype.getSelectedText=function(){var r="",e=this.element;this.selStart=this.selEnd=0;if(this.trange){try{var $1s=document.selection.createRange();r=$1s.duplicate();r.move("textedit",-1);while(r.compareEndPoints("StartToStart",$1s)<0){if(this.selStart++>1000)break;r.moveStart("character",1);}}catch(ex){};if($1s)r=$1s.text;this.selEnd=this.selStart+r.length;}else if(e.selectionStart!=null){if((this.selStart=e.selectionStart)<(this.selEnd=e.selectionEnd))r=e.value.substring(this.selStart,this.selEnd);};return r;};function Cookie(name,$12,$1t,$1u,$13){this.$name=name;this.$path=$12;this.$domain=$1t;this.$secure=$1u;this.$expires=$13;};Cookie.prototype.store=function(){var $v="";for(var $1v in this){if($1v.charAt(0)=='$'||(typeof this[$1v]=="function"))continue;if($v!="")$v+='&';$v+=$1v+':'+escape(this[$1v]);};if($v){var $1w=this.$name+'='+$v;if(this.$path)$1w+="; path="+this.$path;if(this.$domain)$1w+="; domain="+this.$domain;if(this.$secure)$1w+="; secure";if(this.$expires)$1w+="; expires="+this.$expires.toGMTString();document.cookie=$1w;}};Cookie.prototype.load=function(){var $1x=document.cookie;if($1x=="")return false;var $q=$1x.indexOf(this.$name+'=');if($q==-1)return false;else $q+=this.$name.length+1;var end=$1x.indexOf(';',$q);if(end==-1)end=$1x.length;var $v=$1x.substring($q,end);var ar=$v.split('&');for(var i=0;i<ar.length;i++)ar[i]=ar[i].split(':');for(var i=0;i<ar.length;i++)this[ar[i][0]]=unescape(ar[i][1]);return true;};Cookie.prototype.remove=function(){var $1w=this.$name+'=';$1w+='; '+(new Date(1970,1,1)).toGMTString();document.cookie=$1w;};



var JSType={Empty:0,Bool:1,Int:2,Float:3,String:4,Date:5,Array:6,Object:7};JSType.equals=function($a,v1,v2){if((v1==null&&v2!=null)||(v2==null&&v1!=null))return false;if($a==NetType.DateTime)return v1.getTime()==v2.getTime();return v1==v2;};JSType.convert=function(v,$a){var $b=v;if($a==JSType.Bool){if(typeof(v)!="boolean"){if(typeof(v)=="string")$b=Boolean.parse(v);else $b=Boolean(v);}}else if($a==JSType.Int){if(typeof(v)!="number")$b=parseInt(v);}else if($a==JSType.Float){if(typeof(v)!="number")$b=parseFloat(v);}else if($a==JSType.Date){if(!(v instanceof Date))$b=new Date(Date.parse(v));}else if($a==JSType.String){$b=String(v);};return $b;};function PXControl(){px.addEventHandler(window,"beforeunload",PXControl.$15);if(px.IsSafari)px.addEventHandler(window,"unload",PXControl.$15);px.addEventHandler(window,"unload",PXControl.$16);px.addEventHandler(window,"load",PXControl.$17);if(document.forms.length>0)document.forms[0].onsubmit=PXControl.$18;};PXControl.$15=function(e){if(!px.IsSafari&&!window.suppressChanges&&PXControl.$19()){px.cancelEvent(e);e.returnValue=window["_confirmMsg"];px.restoreDisabledState();}else{for(var $c in px_all){try{var $d=px_all[$c];if($d.onUnload)$d.onUnload(e);}catch(ex){}};if(px_cm.cookie)px_cm.cookie.store();if(px_cm.cookieP)px_cm.cookieP.store();}};PXControl.$16=function(e){px.removeEventHandler(window,"resize",PXControl.$1a);if(px.IsIE)px.removeEventHandler(window.top,"resize",PXControl.$1a);};PXControl.$19=function(){for(var name in px_all){var $c=px_all[name];if($c&&$c.getChanged){var $e=($c.checkChanges!=null)?$c.checkChanges:true;if($e&&$c.getChanged())return true;}};return false;};PXControl.handleLoad=function(){if(px_cm.$1b)for(var n in px_cm.$1b){var $f=px_cm.$1b[n];if($f&&$f.onLoad&&$f.loadHandled==null){$f.onLoad();$f.loadHandled=true;}}};PXControl.prototype.createPersistentCookie=function(){var cn=px.getPageName()+"P";if(px_cm.cookieP==null){var $g=new Date();$g.setFullYear($g.getFullYear()+1);var $h=PXControl.formatPathName(window.location.pathname);px_cm.cookieP=new Cookie(cn,$h);px_cm.cookieP.$expires=$g;px_cm.cookieP.load();}};PXControl.$17=function(e){var cn=px.getPageName();if(cn){var $h=PXControl.formatPathName(window.location.pathname);px_cm.cookie=new Cookie(cn,$h);px_cm.cookie.load();};PXControl.handleLoad();window.pageLoaded=true;setTimeout(function(){px_cm.notifyOnResize();},0);var tm=px_cm.$1c,$i=document;if(tm)setTimeout(function(){tm.register($i);},1);};PXControl.formatPathName=function($j){var $k=$j.indexOf("/(W(");if($k==-1)return $j;var $l=$k+4;while($j[$l]!=")"&&$l<$j.length)$l++;$l++;return $j.substring(0,$k)+$j.substring($l+1);};PXControl.$18=function(e){for(var $c in px_all){try{var $d=px_all[$c];if($d.onSubmit){if($d.onSubmit(e)==true){px.cancelEvent(e);return true;}}}catch(ex){}}};PXControl.$1a=function(e){if(px_cm.blockResize)return;setTimeout(function(){px_cm.notifyOnResize();},1);};PXControl.prototype.callback=function($m,$n,$o,$p,$q){if($q||$q==null)px.startWC();var name=$m.sourceName;if(!name)name=$m.element.getAttribute("name");var $r=new Object();$r.func=$o;$r.context=$p;$r.controlID=$m.ID;$m.callback=true;px.doCallback(name,$n,PXControl.$1d,$r,PXControl.$1e);};PXControl.$1d=function($s,$p){try{var $f=px_all[$p.controlID];if($p.func){var $r=$p.context;if(!$r)$r=$p.controlID;$p.func($s,$r);}}catch(ex){alert(ex.type+": "+ex.message);}finally{px.stopWC();if($f)$f.callback=false;}};PXControl.$1e=function($s,$p){px.stopWC();var $f=px_all[$p.controlID];$f.callback=false;alert($s);};PXControl.prototype.registerRequiresOnResize=function($m,id){if(id==null)id=$m.ID;if(!this.$1f){this.$1f=new Array();px.addEventHandler(window,"resize",PXControl.$1a);if(px.IsIE)px.addEventHandler(window.top,"resize",PXControl.$1a);};function NestedLevel($m){var $s=0;for(;$m;$m=$m.parentNode)$s++;return $s;};$m.nestedLevel=NestedLevel($m.element);var ar=this.$1f;for(var i=0;i<ar.length;i++){if(ar[i].ID==id)ar.splice(i,1);};ar.push($m);ar.sort(function(a,b){return a.nestedLevel-b.nestedLevel;});};PXControl.prototype.registerAutoSize=function($m,$t){if($t.autoSize!=null){var $d=$m.autoSize=new Object();px_cm.readProperties($d,$t.autoSize,PXControl.autoSizeDesc);};if($m.autoSize&&$m.autoSize.enabled)px_cm.registerRequiresOnResize($m);};PXControl.prototype.registerTooltipManager=function($u){this.$1c=$u;};PXControl.prototype.registerStatusBar=function($v){this.$1g=$v;};PXControl.prototype.repaintStatusBar=function($m){if(this.$1g)this.$1g.repaint($m);};PXControl.autoSizeDesc=[["enabled",JSType.Bool,false],["container",JSType.Int,0],["minHeight",JSType.Int,0],["minWidth",JSType.Int,0],["bottom",JSType.Int,-1],["right",JSType.Int,-1],["align",JSType.Int,-1],["valign",JSType.Int,-1],["dockMethod",JSType.Int,0]];PXControl.prototype.notifyOnResize=function($w,$x){if(!px_cm.$1f)return;px_cm.blockResize=true;var $f,$y,$z=null,$A,$B;for(var n=0;n<px_cm.$1f.length;n++){$f=px_cm.$1f[n];$y=$f.element;$A=$f.autoSize;$B=($y.parentNode!=null&&$y.offsetParent!=null&&$y.offsetWidth>0);if($B&&$x)$B=px.contains($x,$y);if($A!=null&&$A.enabled&&$B&&$A.dockMethod!=2){switch($A.container){case 0:if(!$w)this.$1h($f,10-$y.offsetHeight);break;case 1:$z=$f;break;}}};if($z&&!$w)this.performAutoSize($z);for(var n=0;n<px_cm.$1f.length;n++){var $f=px_cm.$1f[n];if($f!=$z)this.performAutoSize($f);};px_cm.blockResize=false;};PXControl.prototype.performAutoSize=function($f){var $C=false,$A=$f.autoSize,$y=$f.element;if($f.onResize&&typeof($f.onResize)=="function")$C=$f.onResize();$B=($y.offsetParent!=null&&$y.offsetWidth>0);if(!$C&&$A!=null&&$A.enabled&&$B){switch($A.container){case 0:this.dockToParent($f);break;case 1:this.dockToWindow($f);break;};if($f.onAfterResize&&typeof($f.onAfterResize)=="function")$f.onAfterResize();}};PXControl.prototype.notifyVisibleChanged=function($B){for(var id in px_all){var $f=px_all[id];if($f.onVisibleChanged)$f.onVisibleChanged($B);}};PXControl.prototype.dockToWindow=function($m){var $D=window.theForm;if($D&&$m){var $E=document.documentElement.clientHeight-$D.offsetHeight;this.$1h($m,$E);}};PXControl.prototype.dockToParent=function($m){if($m.autoSize&&$m.autoSize.dockMethod==2){this.dockToParent2($m);return;};var $y=$m?$m.element:null;if($y){var parent=$y.parentNode,ps=parent.currentStyle;if(!ps)ps=window.getComputedStyle(parent,null);var $E=parent.offsetHeight-$y.offsetHeight;if($y.previousSibling){var $F=px.getElemTopPos($y)-px.getElemTopPos(parent);$E-=$F;};if(parent.scrollWidth>parent.offsetWidth&&parent.style.overflow=="auto")$E-=17;var $G=$y.nextSibling;while($G){if($G.tagName!="SCRIPT"&&$G.offsetHeight!=null)$E-=$G.offsetHeight;$G=$G.nextSibling;};var $H=function(v){var $b=v?parseInt(v):0;return isNaN($b)?0:$b;};$E-=$H(ps.borderTopWidth)+$H(ps.paddingTop);$E-=$H(ps.borderBottomWidth)+$H(ps.paddingBottom);$E-=$H($y.style.marginBottom.substr(0,$y.style.marginBottom.length-2));this.$1h($m,$E);}};PXControl.prototype.$1h=function($m,$E){if($E!=0){var $y=$m.element,$I=$y.offsetHeight+$E;if($m.autoSize!=null){var $J=$m.autoSize.minHeight;$I=($I<$J)?$J:$I;};if($I!=$y.offsetHeight){if($m.setHeight)$m.setHeight($I);else{var h=px.getStyleHeight($y,$I);if(h<0)h=0;$y.style.height=h+"px";}}}};PXControl.$1i=function($m,$K,$L){var $s=0;for(var parent=$m.offsetParent;parent!==$K.offsetParent;parent=parent.offsetParent){if(!parent)return 0;$s+=parent[$L];};return $s;};PXControl.prototype.dockToParent2=function($m){if(!$m)return;var e=$m.element;if(!e)return;var parent=e.parentNode;if($m.autoSize.bottom>=0){var $M=parent.offsetTop+parent.offsetHeight;var $N=e.offsetTop+e.offsetHeight;var $O=$M-$m.autoSize.bottom-PXControl.$1i(e,parent,"offsetTop");var dh=$O-$N;if(dh&&$m.autoSize.valign==0){var $I=e.offsetHeight+dh;if(e.object&&e.object.setHeight)e.object.setHeight($I);else e.style.height=px.getStyleHeight(e,$I)+"px";};if(dh&&$m.autoSize.valign==1){var top=e.offsetTop+dh;e.style.top=px.getStyleTop(e,top)+"px";};if(dh&&$m.autoSize.valign==2){var top=e.offsetTop+dh+e.offsetHeight;e.style.top=px.getStyleTop(e,top)+"px";}};if($m.autoSize.right>=0){var $P=parent.offsetLeft+parent.offsetWidth;var $Q=e.offsetLeft+e.offsetWidth;var $R=$P-$m.autoSize.right;var dw=$R-$Q;if(dw&&$m.autoSize.align==0){var $S=e.offsetWidth+dw;e.style.width=px.getStyleWidth(e,$S)+"px";};if(dw&&$m.autoSize.align==1){var $T=e.offsetLeft+dw;e.style.left=px.getStyleLeft(e,$T)+"px";};if(dw&&$m.autoSize.align==2){var $T=e.offsetLeft+dw+e.offsetWidth;e.style.left=px.getStyleLeft(e,$T)+"px";}}};PXControl.prototype.processPostData=function($f,$U){var ev=$f.events.eventArgs;if($f.autoPostBack){if(!ev.cancelPostBack){var name=$f.element.getAttribute("name");if($f.postBackUrl)theForm.action=$f.postBackUrl;px.doPost(name,$U?$U:"");return true;}}else if($f.autoCallBack){if($f.autoCallBack.enabled&&!ev.cancelCallBack)return PXCallback.exec($f,$f.autoCallBack);};return false;};PXControl.prototype.notifyOwnerChanged=function($f){var $V=$f.bindingContainer;if($V){var bc=px_all[$V];if(bc&&bc.onFieldChanged)bc.onFieldChanged($f);}};PXControl.prototype.notifyOwnerActivate=function($f){var $V=$f.bindingContainer;if($V){var bc=px_all[$V];if(bc){bc.activeControl=$f;if(bc.onControlActivated)bc.onControlActivated($f);}}};PXControl.prototype.notifyOwnerCreated=function($f){var $V=$f.bindingContainer;if($V){var bc=px_all[$V];if(bc&&bc.onControlCreated)bc.onControlCreated($f);}};PXControl.prototype.getHidden=function($f){if($f.getVisible)return $f.getVisible();return $f.element.style.display=="none";};PXControl.prototype.setHidden=function($f,v){if($f.setVisible)$f.setVisible(!v);else $f.element.style.display=v?"none":"";};PXControl.prototype.setFocus=function($m,$W){if($m.getVisible&&!$m.getVisible())return;if($m.getEnabled&&!$m.getEnabled())return;var $y=$m.focusElem;if($y==null){$y=px.createFocusElem();var h=Function.createDelegate($m,$W);px.addEventHandler($y,"keydown",h);px.addEventHandler($y,"keyup",h);px.addEventHandler($y,"keypress",h);px.addEventHandler($y,"focus",h);px.addEventHandler($y,"blur",h);$m.focusElem=$y;};$y.focus();$m.hasFocus=true;};PXControl.prototype.setPostState=function($m,$X){var e=$m.elemText?$m.elemText:$m.element;if(e!=null){if($X)e.removeAttribute("ignore");else e.setAttribute("ignore",true);};if($m.viewState)$m.viewState.setPostState($X);};PXControl.prototype.registerCommandControl=function($x,$m,$Y){if($x&&$m){if($x.commandControls==null)$x.commandControls=new Object();var $Z=$x.commandControls[$Y];if($Z==null)$x.commandControls[$Y]=$Z=new Array();$Z.push($m);if($x.getCommandState){var $00=$x.getCommandState($Y);$m.commandStateCallback($00,$Y);}}};PXControl.prototype.notifyCommandState=function($x,$01){if(!$x.commandControls)return;for(var n in $01){var name=$01[n],$Z=$x.commandControls[name];if($Z&&$Z.length){var $00=$x.getCommandState(name);for(var i=0;i<$Z.length;i++)try{if($Z[i])$Z[i].commandStateCallback($00,name);}catch(ex){}}}};PXControl.prototype.addPopupHandler=function($W){if($W&&(typeof $W=="function")){var $02=PXControl.$1j;if($02==null)$02=PXControl.$1j=new Array();$02.push($W);}};PXControl.prototype.notifyPopupCommand=function($m,$03){var $02=PXControl.$1j;if($02){for(var i=0;i<$02.length;i++)$02[i]($m,$03);}};PXControl.prototype.registerControls=function($04){for(var i=0;i<$04.length;i++){try{var cd=$04[i].split(":"),id=cd[0];var co=this.createControl(cd[1],id);if(co){px_all[id]=co;if(co.getDataChanges&&co.processRefresh)px_data[id]=co;}}catch(ex){alert(ex.type+": "+ex.message);}}};PXControl.prototype.registerRequiresOnLoad=function($m,id){if(id==null)id=$m.ID;if(this.$1b==null)this.$1b=new Object();this.$1b[id]=$m;};PXControl.prototype.registerDragControl=function($m,$05,$06,$07){var $08=null;if($05){if(typeof($05)=="string")$08=px.elemByID($05);else $08=$05;};$m.dragManager=new PXDragManager($m,$08,$06,$07);return $m.dragManager;};PXControl.prototype.registerResizableControl=function($m,$09){$m.resizeManager=new PXResizeManager($m,$09);return $m.resizeManager;};PXControl.prototype.unregisterControl=function($m){if($m){delete px_data[$m.ID];delete px_all[$m.ID];$m.element.parentNode.removeChild($m.element);}};PXControl.prototype.processHtmlData=function($0a,$0b,parent){var $0c,$0d=parent?parent:theForm,$0e=null;if($0b==null||typeof($0b)=="string"){$0c=document.createElement("div");$0c.id=$0b;$0c.style.display="none";}else{$0c=$0b;if($0c.parentNode){$0d=$0c.parentNode;$0e=$0c.nextSibling;}};if(px.IsIE){if(!$0c.parentNode)$0d.appendChild($0c);$0c.innerHTML="";px.registerCssRules($0a);$0c.innerHTML=$0a;}else{if($0c.parentNode)$0d.removeChild($0c);$0c.innerHTML=$0a;$0d.insertBefore($0c,$0e);if(px.IsSafari){px.registerCssRules($0a);for(var i=0;i<$0c.childNodes.length;i++){var $0f=$0c.childNodes[i];if($0f.tagName=="SCRIPT")eval($0f.text);}}};if(this.$1c)this.$1c.register($0c);setTimeout(function(){PXControl.handleLoad();},0);return $0c;};PXControl.prototype.createControl=function($0g,id,$0h){var $elem=px.elemByID(id),co=null,$0i=eval($0g);if($elem||$0i.behavior!=null){var $props=null,$srcID=$0h;if($srcID==null){if($elem)$srcID=$elem.getAttribute("sourceID");if($srcID==null)$srcID=id;};try{$props=window["_"+$srcID];}catch(ex){};if($props){window[$0g].__className=$0g;var $0j=($elem?"$elem":"id")+", $props, $srcID";co=eval("new "+$0g+"("+$0j+")");co.element=$elem;co.ID=id;if($elem&&!$elem.object)$elem.object=co;co.__className=$0g;if(co.bindingContainer)px_cm.notifyOwnerCreated(co);if(co.events&&(co.events instanceof PXEventList))co.events.fireEvent(0,null,null);}};if(co)px_all[id]=co;return co;};PXControl.prototype.readProperties=function($0k,$0l,$0m,$0n){if($0m==null)$0m=$0k.constructor.properties;if($0m==null)return;if($0n==null){var $0o=$0k.constructor;if($0o&&$0o.__className!=null)$0n=window["__"+$0o.__className];};for(var i=0;i<$0m.length;i++){var pd=$0m[i],name=pd[0],$0p=pd[1];var $0q=($0l!=null)?$0l[name]:undefined;if($0q===undefined&&$0n)$0q=$0n[name];if($0p==JSType.Object){if($0q==null)$0q=new Object();var $0r=$0n?$0n[name]:null;if(pd[2]!=null){var $d=new Object();$0q=px_cm.readProperties($d,$0q,pd[2],$0r);}else if($0r){for(var n in $0r){if($0q[n]==null)$0q[n]=$0r[n];}}}else if($0p==JSType.Array){var $0s=pd[2],$0r=$0n?$0n[name]:null;if($0q!=null&&$0s!=null){var $Z=new Array();for(var j=0;j<$0q.length;j++){var $d=new Object(),$0t=($0r&&$0r.length)?$0r[j]:null;$Z.push(px_cm.readProperties($d,$0q[j],$0s,$0t));};$0q=$Z;}}else{var $0u=pd[2],$0v=pd[3],$0w=pd[4];if($0w!=null)name=$0w;if($0q===undefined)$0q=$0u;if($0v!=null){if(typeof($0v)=="function")$0q=$0v($0k,$0q);else if(typeof($0v)=="string"){var $o=$0k[$0v];if($o!=null)$0q=$o.call($0k,$0q);}}else if($0p!=JSType.Empty&&$0q!=null){switch($0p){case JSType.Date:$0q=JSType.convert($0q,$0p);break;case JSType.Bool:$0q=$0q?true:false;break;}}};if($0q!==undefined)$0k[name]=$0q;};return $0k;};PXControl.prototype.registerActiveDropDown=function($m,on){var h=PXControl.$1k;if(on){$m.dropDown.setAttribute("controlID",$m.ID);document.dropDownElem=$m.dropDown;px.addEventHandler(document,"mousedown",h,true);}else{px.removeEventHandler(document,"mousedown",h,true);document.dropDownElem=null;}};PXControl.prototype.setDropDownVisible=function($m,$B,$0x){var $0y=$m.dropDown;if($0y==null)return;if($B){if($0y.id&&!px.elemByID($0y.id))theForm.appendChild($0y);var ds=$0y.style;var $0z=this.getNextZIndex($0x?$0x:11000);ds.position="absolute";ds.left=ds.top="-999px";ds.display="";ds.zIndex=$0z;$m.dropDownOpen=true;}else{if($0y.id)theForm.removeChild($0y);$0y.style.display="none";$m.dropDownOpen=false;};px_cm.registerActiveDropDown($m,$B);if(!$B)this.restoreActiveDropDown($m);};PXControl.prototype.getActiveDropDown=function(){var $0A=document.dropDownElem;return $0A?px_all[$0A.getAttribute("controlID")]:null;};PXControl.prototype.getNextZIndex=function($0x){var $0B=[document.dropDownElem],$0C=this.$1l;if($0C&&$0C.length>0)$0B.push($0C[$0C.length-1].dropDown);if(document.activePanel)$0B.push(document.activePanel.element);for(var i=0;i<$0B.length;i++){if($0B[i]==null)continue;var $0D=parseInt($0B[i].style.zIndex)+2;if($0x==null||$0D>$0x)$0x=$0D;};return $0x;};PXControl.prototype.closeActiveDropDown=function($x){var $f=this.getActiveDropDown();if($f){if($x&&px.contains($f.dropDown,$x.element)){this.storeActiveDropDown($x);}else if($f.hideDropDown)$f.hideDropDown();}};PXControl.prototype.storeActiveDropDown=function($x){var $f=this.getActiveDropDown();if($f){if(this.$1l==null)this.$1l=new Array();this.$1l.push($f);this.registerActiveDropDown($f,false);$x.dropDownStored=true;}};PXControl.prototype.restoreActiveDropDown=function($x){var ar=this.$1l;if(ar!=null&&ar.length>0&&$x.dropDownStored){var $f=ar.pop();this.registerActiveDropDown($f,true);delete $x.dropDownStored;}};PXControl.$1k=function(e){var se=px.eventElem(e),$0c=document.dropDownElem;if($0c&&!px.contains($0c,se)){var $f=px_all[$0c.getAttribute("controlID")];if($f!=null&&!px.contains($f.element,se)){var $o=$f.onDocumentHideDropDown;if($o==null||$o.call($f,e))$f.hideDropDown();}}};if(typeof px_all!="object")var px_all=new Object();if(typeof px_data!="object")var px_data=new Object();var px_cm=new PXControl();function PXEvent(){this.event=null;this.cancel=false;this.cancelPostBack=false;this.needPostBack=false;};PXEvent.prototype.reset=function(){this.event=null;this.cancel=false;this.cancelPostBack=false;this.needPostBack=false;};PXEvent.baseEvents={$keydown:1,$keypress:2,$keyup:3,$mousedown:4,$mouseup:5,$mousemove:6,$mouseover:7,$mouseout:8,$click:9,$focus:10,$blur:11};PXEvent.baseEventID=function(name){var id=PXEvent.baseEvents["$"+name.toLowerCase()];return id?id:-1;};PXEvent.addBaseHandlers=function($y,h){for(var $0E in PXEvent.baseEvents)px.addEventHandler($y,$0E.slice(1),h);};PXEvent.removeBaseHandlers=function($y,h){for(var $0E in PXEvent.baseEvents)px.removeEventHandler($y,$0E.slice(1),h);};function PXEventList($x,$0F,$02){this.owner=$x;this.count=0;this.events=new Object();this.handlers=new Array();this.appendEvents($0F,$02);};PXEventList.prototype.appendEvents=function($0F,$02){for(var name in $0F){this.events[name.slice(1)]=$0F[name];this.count++;};if($02)for(var hn in $02){if(this.events.hasOwnProperty(hn))this.addEventHandler(hn,eval($02[hn]));}};PXEventList.prototype.addEventHandler=function(id,$o){var n=(typeof id=="number")?id:this.events[id];if(n==null||n<0||n>=this.count)return;var e=this.handlers[n];if(e==null)e=this.handlers[n]=new Array();for(n=0;n<=e.length;n++)if(e[n]==null){e[n]=new Object();e[n].func=$o;break;}};PXEventList.prototype.removeEventHandler=function(id,$o){var n=(typeof id=="number")?id:this.events[id];if(n==null||n<0||n>=this.count)return;var e=this.handlers[n];if(e==null)return;for(n=0;n<e.length;n++)if(e[n]!=null&&e[n].func==$o){delete e[n];e[n]=null;return;}};PXEventList.prototype.fireEvent=function(id,ev,$0j){var n=(typeof id=="number")?id:this.events[id];var $0G=this.$1m(n,ev,$0j);var h=this.handlers[n];var i=(h==null)?0:h.length;if(i==0)return false;var $0H=false;try{while(i-->0){if(h[i]==null)continue;h[i].func(this.owner,$0G);if($0G.cancel)$0H=true;}}catch(ex){};if($0G.needPostBack){var $n=$0G.postArg;var name=this.owner.element.getAttribute("name");px.doPost(name,($n!=null)?$n:0);};return $0H;};PXEventList.prototype.$1m=function(id,ev,$0j){this.eventArgs=new PXEvent();this.eventArgs.event=ev;this.eventArgs.id=id;this.eventArgs.srcElement=this.owner.element;if($0j!=null)for(var pn in $0j)this.eventArgs[pn]=$0j[pn];return this.eventArgs;};function PXStateBag(id,$0I){this.$1n=px.elemByID(id+"_state");this.stateBag=new PXXmlDoc($0I);this.$1o=this.stateBag.rootNode;};PXStateBag.prototype.select=function($0J,$0q,$0K){if(this.$1n==null)return;var n=$0K?this.$1p($0K):this.$1o;return this.$1q(n,$0J);};PXStateBag.prototype.update=function($0J,$0q,$0K){if(this.$1n==null)return;var n=$0K?this.$1p($0K):this.$1o;this.$1r(n,$0J,$0q);};PXStateBag.prototype.remove=function($0J,$0K){if(this.$1n==null)return;var n=$0K?this.$1p($0K):this.$1o;this.stateBag.removeProperty(n,$0J);this.$1n.value=encodeURIComponent(this.stateBag.toString());};PXStateBag.prototype.updateListItem=function($0L,i,$0J,$0q){if(this.$1n==null)return;var $0M=((typeof(i)=="number")?".i":".")+i;this.$1r(this.$1p($0L+$0M),$0J,$0q);};PXStateBag.prototype.appendListItem=function($0L,$0K,$t){if(this.$1n==null)return;var $0N=this.$1p($0L);var $0f=this.stateBag.addNode($0K,$0N);for(var $0J in $t)this.$1r($0f,$0J,$t[$0J],false);this.$1n.value=encodeURIComponent(this.stateBag.toString());};PXStateBag.prototype.removeNode=function($0K){var $0O=$0K.split("."),parent=null,n=null;for(var i=0;i<$0O.length;i++){parent=n;n=this.stateBag.findNode($0O[i],parent);if(n==null)return;};this.stateBag.removeNode($0O[$0O.length-1],parent);if(this.$1n!=null)this.$1n.value=encodeURIComponent(this.stateBag.toString());};PXStateBag.prototype.setPostState=function($X){if(this.$1n!=null){if($X)this.$1n.removeAttribute("ignore");else this.$1n.setAttribute("ignore",true);}};PXStateBag.prototype.$1p=function($0K,parent){var $0O=$0K.split("."),n=null,pn=parent;for(var i=0;i<$0O.length;i++){n=this.stateBag.findNode($0O[i],pn);if(n==null)n=this.stateBag.addNode($0O[i],pn);pn=n;};return n;};PXStateBag.prototype.$1r=function(n,$0J,$0q,$0P){if($0P==null)$0P=true;if(typeof($0q)=="boolean")$0q=$0q?"true":"false";var $0O=$0J.split("."),$0f=n;if($0O.length>1){$0J=$0O[$0O.length-1];$0O.length=$0O.length-1;$0f=this.$1p($0O.join("."),n);};this.stateBag.setProperty($0f,$0J,$0q);if($0P&&this.$1n!=null)this.$1n.value=encodeURIComponent(this.stateBag.toString());};PXStateBag.prototype.$1q=function(n,$0J){var $0O=$0J.split("."),$0f=n;if($0O.length>1){$0J=$0O[$0O.length-1];$0O.length=$0O.length-1;$0f=this.$1p($0O.join("."),n);};return this.stateBag.getProperty($0f,$0J);};function PXCommandState($B,$0Q){this.$1s=$B;this.$1t=$0Q;};PXCommandState.empty=new PXCommandState(false,false);PXCommandState.prototype.getEnabled=function(){return this.$1t;};PXCommandState.prototype.setEnabled=function($b){this.$1t=$b;};PXCommandState.prototype.getVisible=function(){return this.$1s;};PXCommandState.prototype.setVisible=function($b){this.$1s=$b;};function PXExpandEffects($t){px_cm.readProperties(this,$t);};PXExpandEffects.properties=[["type",JSType.String,""],["duration",JSType.Int,300],["delay",JSType.Int,200],["opacity",JSType.Int,100],["shadowColor",JSType.String,"Gray"],["shadowWidth",JSType.Int,0],["shadowDirection",JSType.Int,135]];PXExpandEffects.prototype.setFilter=function($y,$0R){if($y!=null)this.element=$y;if(this.element==null)return;var es=this.element.style;if(es.filter!=null){var $0S=" progid:DXImageTransform.Microsoft.";es.filter="";if(this.type!="NotSet")es.filter+=$0S+this.type+"(duration="+this.duration/1000+");";if(this.opacity<100)es.filter+=$0S+"Alpha(Opacity="+this.opacity+");";if(this.shadowWidth>0){es.filter+=$0S+"Shadow(Direction="+this.shadowDirection+",Strength="+this.shadowWidth+",color="+this.shadowColor+");";};if($0R)this.play();}};PXExpandEffects.prototype.play=function(){if(this.element==null)return;var $0T=this.element.filters[0];if($0T!=null){$0T.apply();this.element.style.display="";$0T.play();}else this.element.style.display="";};function PXDragManager($0U,$08,$06,$07){this.dragSource=$0U;this.dragHandle=$08?$08:$0U.element;this.showContent=($06!=null)?$06:true;this.contentElem=$07;var h=Function.createDelegate(this,this.$1u);px.addEventHandler(this.dragHandle,"mousedown",h);this.$1v=Function.createDelegate(this,this.$1w);this.$1x=Function.createDelegate(this,this.$1y);this.$1z=Function.createDelegate(this,this.$1A);};PXDragManager.disabledTags=['A','AREA','BUTTON','INPUT','SELECT','TEXTAREA','IMG'];PXDragManager.prototype.resetPlaceholder=function(){this.moveElement=null;};PXDragManager.prototype.startDrag=function(e){var $y=this.dragSource.element;$y.style.position="absolute";var $0V={x:e.clientX,y:e.clientY};var $0W={x:$y.offsetLeft,y:$y.offsetTop};this.$1B=this.$1C($0V,$0W);if(!this.showContent){var $K=$y.offsetParent,$0X=this.contentElem;var $0c=this.moveElement,ds=$0c?$0c.style:null;var $S=$y.offsetWidth,$I=$y.offsetHeight;$y.style.display="none";if(px.IsIE)$y.parentNode.removeChild($y);if($0c==null){if($0X)$0X.style.visibility="hidden";this.moveElement=$0c=$y.cloneNode(true);if($0X)$0X.style.visibility="";var frames=$0c.getElementsByTagName("iframe");if(frames&&frames.length)frames[0].src="";ds=$0c.style;ds.position="absolute";ds.left=ds.top="-999px";ds.opacity=0.7;ds.filter="alpha(opacity="+70+")";};if($K.tagName=="HTML")$K=document.body;$K.appendChild($0c);ds.zIndex=20000;ds.left=$0W.x+"px";ds.width=$S-1+"px";ds.top=$0W.y+"px";ds.height=$I-1+"px";ds.display="";if($0c.setCapture)$0c.setCapture();};this.$1D();if(this.dragSource.onDragStart)this.dragSource.onDragStart();};PXDragManager.prototype.stopDrag=function($0H){if(!this.showContent){var $0c=this.moveElement,$y=this.dragSource.element;$y.style.left=$0c.style.left;$y.style.top=$0c.style.top;$0c.style.display="none";if($0c.releaseCapture)$0c.releaseCapture();if(px.IsIE)$0c.parentNode.appendChild($y);$y.style.display="";$0c.parentNode.removeChild($0c);};this.$1E();if(this.dragSource.onDragEnd)this.dragSource.onDragEnd($0H);};PXDragManager.prototype.$1F=function(e){var $0V={x:e.clientX,y:e.clientY};var $0Y=this.$1C($0V,this.$1B);var style=this.dragSource.element.style;if(!this.showContent)style=this.moveElement.style;style.left=$0Y.x+"px";style.top=$0Y.y+"px";if(this.dragSource.onDrag)this.dragSource.onDrag();};PXDragManager.prototype.$1D=function(){px.addEventHandler(document,"mousemove",this.$1v);px.addEventHandler(document,"mouseup",this.$1x);px.addEventHandler(document,"selectstart",this.$1z);px.addEventHandler(document,"mousedown",this.$1z);};PXDragManager.prototype.$1E=function(){px.removeEventHandler(document,"mousemove",this.$1v);px.removeEventHandler(document,"mouseup",this.$1x);px.removeEventHandler(document,"selectstart",this.$1z);px.removeEventHandler(document,"mousedown",this.$1z);};PXDragManager.prototype.$1G=function(p1,p2){return{x:p1.x+p2.x,y:p1.y+p2.y};};PXDragManager.prototype.$1C=function(p1,p2){return{x:p1.x-p2.x,y:p1.y-p2.y};};PXDragManager.prototype.$1H=function(){this.dragSource.element.style.display="none";};PXDragManager.prototype.$1u=function(e){var $0Z=this.dragSource.element;if(px.eventButton(e)>0||$0Z.getAttribute("oldCursor")!=null)return;if($0Z.offsetHeight<$0Z.scrollHeight||$0Z.offsetWidth<$0Z.scrollWidth)return;var se=px.eventElem(e),$10=PXDragManager.disabledTags;if(se&&se.tagName&&!Array.contains($10,se.tagName)){var $y=se;while($y!=$0Z){if($y.object!=null)return;$y=$y.parentNode;};this.startDrag(e);}};PXDragManager.prototype.$1w=function(e){this.$1F(e);};PXDragManager.prototype.$1y=function(e){this.stopDrag(false);};PXDragManager.prototype.$1A=function(e){px.cancelEvent(e,false);};function PXResizeManager($m,$09){this.control=$m;this.margin=$09?$09:4;this.element=$m.element;this.minHeight=this.minWidth=100;var h=Function.createDelegate(this,this.$1u);px.addEventHandler(this.element,"mousedown",h);h=Function.createDelegate(this,this.$1w);px.addEventHandler(this.element,"mousemove",h);this.$1x=Function.createDelegate(this,this.$1I);this.$1v=Function.createDelegate(this,this.$1J);};PXResizeManager.prototype.$1K=function(e){var $0c=this.$1L(),$11=$0c.firstChild;var ds=$0c.style,se=this.element,h;ds.display="";ds.width=document.documentElement.clientWidth+"px";ds.height=document.documentElement.clientHeight+"px";ds.cursor=se.style.cursor;this.$1M=px.getElemLeftPos(se);this.$1N=px.getElemTopPos(se);ds=$11.style;ds.left=this.$1M+"px";ds.top=this.$1N+"px";ds.width=px.getStyleWidth($11,se.offsetWidth)+"px";ds.height=px.getStyleHeight($11,se.offsetHeight)+"px";px.addEventHandler($0c,"mouseup",this.$1x,true);px.addEventHandler($0c,"mousemove",this.$1v,true);if($0c.setCapture)$0c.setCapture();};PXResizeManager.prototype.$1L=function(){if(!theForm.resizeDiv){var $0c=document.createElement("DIV");var ds=$0c.style;ds.zIndex=20000;ds.position="absolute";ds.backgroundColor="transparent";ds.top=ds.left="0px";ds.display="none";theForm.appendChild($0c);theForm.resizeDiv=$0c;var $11=document.createElement("DIV");$0c.appendChild($11);ds=$11.style;ds.position="absolute";ds.borderWidth="1px";ds.borderColor="black";ds.borderStyle="solid";};return theForm.resizeDiv;};PXResizeManager.prototype.$1O=function($12,$13){var $0c=this.$1L().firstChild;if(this.xResize){var $S=($12-this.$1M-1);$0c.style.width=($S<this.minWidth?this.minWidth:$S)+"px";};if(this.yResize){var $I=($13-this.$1N-1);$0c.style.height=($I<this.minHeight?this.minHeight:$I)+"px";}};PXResizeManager.prototype.$1u=function(e){if(px.eventButton(e)==0&&(this.xResize||this.yResize)){this.$1K(e);px.cancelEvent(e);}};PXResizeManager.prototype.$1w=function(e){var se=this.element,$14;this.xResize=(px.getMouseOffsetX(e,se)>(se.offsetWidth-this.margin));this.yResize=(px.getMouseOffsetY(e,se)>(se.offsetHeight-this.margin));if(this.xResize||this.yResize){if(se.getAttribute("oldCursor")==null)se.setAttribute("oldCursor",se.style.cursor);$14=(this.xResize&&this.yResize)?"nw-resize":(this.yResize?"n-resize":"w-resize");se.style.cursor=$14;}else{$14=se.getAttribute("oldCursor");if($14!=null){se.style.cursor=$14;se.removeAttribute("oldCursor");}}};PXResizeManager.prototype.$1J=function(e){var $12=e.clientX+document.documentElement.scrollLeft;var $13=e.clientY+document.documentElement.scrollTop;this.$1O($12,$13);px.cancelEvent(e);};PXResizeManager.prototype.$1I=function(e){var $0c=this.$1L(),$11=$0c.firstChild;try{var $S=$11.offsetWidth,$I=$11.offsetHeight;px.cancelEvent(e);$0c.style.display="none";var $f=this.control,$y=this.element;if(this.xResize){if($f.setWidth)$f.setWidth($S);else $y.style.width=px.getStyleWidth($y,$S)+"px";};if(this.yResize){if($f.setHeight)$f.setHeight($I);else $y.style.height=px.getStyleHeight($y,$I)+"px";};if(this.control.onAfterResize)this.control.onAfterResize(true);if(this.control.dragManager)this.control.dragManager.resetPlaceholder();}finally{px.removeEventHandler($0c,"mouseup",this.$1x,true);px.removeEventHandler($0c,"mousemove",this.$1v,true);if($0c.releaseCapture)$0c.releaseCapture();}};



if(typeof PXCallback!="object")var PXCallback=new Object();PXCallback.commandDesc=[["name",JSType.String,""],["blockPage",JSType.Bool,false],["repaintControls",JSType.Int,0],["repaintControlsIDs",JSType.String,""],["commitChanges",JSType.Bool,false],["commitChangesIDs",JSType.String,""],["postData",JSType.Int,1],["postDataControls",JSType.Bool,true],["container",JSType.String,""]];PXCallback.settingsDesc=[["enabled",JSType.Bool,false],["activeBehavior",JSType.Bool,false],["handler",JSType.String,""],["target",JSType.String,""],["command",JSType.String,""],["argument",JSType.String,""],["behavior",JSType.Object,PXCallback.commandDesc]];PXCallback.createCommand=function(name,$a,$b,$c,$d){var $e=new Object();$e.name=name;$e.repaintControls=($b!=null)?$b:0;$e.blockPage=($a!=null)?$a:false;$e.commitChanges=($c!=null)?$c:false;$e.postData=($d!=null)?$d:0;$e.postDataControls=true;return $e;};PXCallback.copyCommand=function(name,$f){var $e=new Object();$e.name=name;$e.blockPage=$f.blockPage;$e.commitChanges=$f.commitChanges;$e.repaintControls=$f.repaintControls;$e.postData=$f.postData;$e.postDataControls=$f.postDataControls;$e.container=$f.container;return $e;};PXCallback.addHandler=function($g){if($g&&(typeof $g=="function")){var $h=PXCallback.handlers;if($h==null)$h=PXCallback.handlers=new Array();$h.push($g);}};PXCallback.$0r=function($i,$j){var $h=PXCallback.handlers;if($h){for(var i=0;i<$h.length;i++)$h[i]($i,$j);}};PXCallback.execI=function($k,$l,$m,$g,$i,$n){if($l.blockPage)px.startWC();var $o=new Object();$o.initFunc=PXCallback.$0s;$o.getDataFunc=PXCallback.$0t;$o.clearFunc=PXCallback.$0u;$o.popupCommand=$n?$n:PXCallback.popupCommand;$o.info=$l;$o.data=$m;$o.handler=$g;$o.context=$i;$o.controlID=$k.ID;$o.control=$k;$o.blockPage=$l.blockPage;var e=null;if($k.sourceEvent){e=$k.sourceEvent;$k.sourceEvent=null;}else if($k.events){e=$k.events.eventArgs.event;};if(e)$o.openFrameset=(e.shiftKey||e.ctrlKey||e.openFrameset);if(PXCallback.settings){var s=PXCallback.settings;if(s.command==$l.name&&$k.ID==s.target){$o.info=$l=s.behavior;$l.sendSettings=true;$l.name=s.command;};PXCallback.settings=null;};PXCallback.popupCommand=null;var $p=PXCallback.$0t($o);var name=$k.sourceName;if(!name)name=$k.element.getAttribute("name");$k.callback=true;PXCallback.$0s($o);px.doCallback(name,$p,PXCallback.$0v,$o,PXCallback.$0w,false);};PXCallback.exec=function($q,$r,$n){if(!$r.enabled)return false;PXCallback.settings=null;if($r.target){var $s=px_all[$r.target];if($s){if($s.executeCallback){if($q.events)$s.sourceEvent=$q.events.eventArgs.event;if($r.activeBehavior)PXCallback.settings=$r;PXCallback.popupCommand=$n;$s.executeCallback($r.command,$r.argument);return true;}}}else{var $g=$r.handler?eval($r.handler):null;$r.behavior.name=$r.command;$r.behavior.sendSettings=true;PXCallback.execI($q,$r.behavior,$r.argument,$g,$n);return true;};return false;};PXCallback.$0s=function($i){__theFormPostData='';__theFormPostCollection.length=0;var $l=$i.info,$k=px_all[$i.controlID];var $t=theForm.elements.length,element;var $u=PXCallback.$0x;if($k.sourceID)$k=px_all[$k.sourceID];for(var i=0;i<$t;i++){element=theForm.elements[i];if(!element.name||!element.id)continue;if(!$u($k,$l,element))continue;var $v=element.tagName.toLowerCase(),$w=false;if($v=="input"){var $x=element.type,$y;var $z=($x=="checkbox");if($x=="text"||$x=="password"||$x=="file"||$x=="hidden"||($x=="radio"&&element.checked)||$z){$y=element.value;if($z&&!element.checked)$y="";WebForm_InitCallbackAddField(element.name,$y);}}else if($v=="select"){var $A=element.options.length;for(var j=0;j<$A;j++){var $B=element.options[j];if($B.selected==true){WebForm_InitCallbackAddField(element.name,element.value);}}}else if($v=="textarea"){WebForm_InitCallbackAddField(element.name,element.value);}}};PXCallback.$0t=function($i){var $l=$i.info,$k=$i.control;PXCallback.$0y($l);var $C=new PXXmlDoc($k.ID),$D=$C.rootNode;if(!PXCallback.$0z)PXCallback.$0z=window.parentPanel;if(PXCallback.$0z!=null)$D.setAttribute("PopupLoaded",1);if(PXCallback.$0A!=null)$D.setAttribute("MessageLoaded",1);if($l.dialogResult){$D.setAttribute("DialogResult",$l.dialogResult);$D.setAttribute("DialogKey",$l.dialogKey);$D.setAttribute("Answers",$l.previousAnswers);$D.setAttribute("DataSource",$l.dataSource);$D.setAttribute("ViewName",$l.viewName);};if($l.sendSettings){$D.setAttribute("Repaint",$l.repaintControls);$D.setAttribute("RepaintIDs",$l.repaintControlsIDs);$D.setAttribute("Commit",px.getInvariantText($l.commitChanges));};var $m=($i.data==null)?"":$i.data;if($l.commitChanges){PXCallback.$0B($C,$k,$l.commitChangesIDs);var $E=$C.xmlDoc.createElement($k.ID);$E.appendChild($C.xmlDoc.createCDATASection($m));$C.rootNode.appendChild($E);}else{$C.rootNode.appendChild($C.xmlDoc.createCDATASection($m));};return $l.name+"|"+$C.toString();};PXCallback.$0u=function($i){var $l=$i.info;if($l&&$l.dialogResult){delete $l.dialogResult;delete $l.dialogKey;delete $l.previousAnswers;delete $l.dataSource;delete $l.viewName;}};PXCallback.$0x=function($k,$l,element){var $v=element.tagName.toLowerCase(),$w=false;var $F=($v=="input"&&element.type=="hidden");var id=element.id,$G=$k.ID,$H=$G;var $I=$k.ownerID,$J=$k.sourceID;if($l.postData==2){var $K=[$l.container,$k.bindingContainer];for(var i=0;i<$K.length;i++)if($K[i]){$H=$K[i];break;}};if($F){if(id&&id.startsWith("__"))$w=true;else{var $L=[$G,$J,$I];for(var i=0;i<$L.length;i++)if($L[i]&&id==($L[i]+"_state")){$w=true;break;}}}else{if(id==$G||id==$I)$w=true;};if(!$w){if(element.getAttribute("ignore")!=null||($F&&!element.value))return false;switch($l.postData){case 1:$w=id.startsWith($G);break;case 2:$w=id.startsWith($H);break;case 3:$w=true;break;}};if(!$w&&$l.postDataControls)$w=PXCallback.$0C(element);return $w;};PXCallback.$0C=function(element){for(var name in px_data){var $q=px_data[name];if($q){var id=$q.ID,$M=$q.ID+"_state";if(element.id==id||element.id==$M)return true;if($q.checkPostElement)if($q.checkPostElement(element.id))return true;}};return false;};PXCallback.$0v=function($N,$i){if(!$N||!$i){if($i&&$i.blockPage)px.stopWC();return;};try{var $q=px_all[$i.controlID],$O="";var $C=new PXXmlDoc("",$N),$D=$C.rootNode;if($D.childNodes.length)$O=PXCallback.$0D($D,$q);if($D.getAttribute("MessageBox"))PXCallback.$0E($D,$i);else if($D.getAttribute("Popup"))PXCallback.$0F($D,$i);else if($D.getAttribute("Dialog"))PXCallback.$0G($D,$i);if($i.handler){var $o=$i.context;$i.handler($O,$o?$o:$i.controlID);};PXCallback.$0r($i,false);}catch(ex){alert(ex.type+": "+ex.message);}finally{if($i.blockPage)px.stopWC();if($q)$q.callback=false;px_cm.repaintStatusBar();var $P=($i.info&&$i.info.commitChangesIDs)?$i.info.commitChangesIDs.split(","):null;if($P)for(var name in px_data){var $q=px_data[name];for(var i=0;i<$P.length;i++)if($q.ID.endsWith($P[i])){$q.dataChanged=false;break;}}}};PXCallback.$0w=function($N,$i){var $q=px_all[$i.controlID],$Q=null;$q.callback=false;if($i.blockPage)px.stopWC();if($N){var $R=$N.indexOf("0|");if($R>=0)$N=$N.substring(0,$R);PXCallback.$0r($i,true);if($N.indexOf("ClosePopup")==0){px_cm.notifyPopupCommand($q,"ClosePopup");}else if($N.startsWith("Redirect")){PXCallback.processRedirect($N,$i);}else $Q=$N;}else{$Q="Unspecified Error.";};if($Q)alert($Q);};PXCallback.processRedirect=function($N,$i){if($N.indexOf("Redirect:")==0){px.openUrl($N.substring(9),"",$i.openFrameset);return;};if($N.indexOf("Redirect_Export:")==0){if(px.exportFrame==null){px.exportFrame=document.createElement("iframe");px.exportFrame.style.display="none";px.exportFrame.id="px_exportFrame";document.body.appendChild(px.exportFrame);};px.exportFrame.src=$N.substring(16);return;};var $S=($N.indexOf("Redirect0:")==0);var $T=($N.indexOf("Redirect1:")==0);var $U=($N.indexOf("Redirect3:")==0);var $V=($N.indexOf("Redirect4:")==0);if($S||$T||$U||$V){if($i!=null&&$i.controlID&&($U||$V)){var $q=px_all[$i.controlID];if($q&&$q.notifyRedirect)$q.notifyRedirect();};var $W=$N.substring(10);var $X=$W.indexOf("|");if($X!=-1){px.openUrl($W.substring($X+1),"",true);$W=$W.substring(0,$X);$U=false;}else if(!$V&&!$U&&$i){if($i.openFrameset)$U=true;else if($i.context)$U=$i.context.openFrameset;};if($S)window.suppressChanges=true;$W=$W.replace(/&amp;/g,"&");px.openUrl($W,$V?"_blank":"",$U);}else{px.stopWC();alert($N);}};PXCallback.$0D=function($D,$Y){var $O="";for(var i=0;i<$D.childNodes.length;i++){var n=$D.childNodes[i];if(n.nodeType!=1)continue;var c=px_all[n.tagName];if(c){var $props=n.getAttribute("Props");if($props!=null&&c.setProperties){eval("$props = "+unescape($props));c.setProperties($props);};if(n.childNodes.length){var $Z=n.childNodes[0].nodeValue;if(c.ID==$Y.ID||c.ID==$Y.sourceID)$O=$Z;else if(c.processRefresh)c.processRefresh($Z);else if(c.repaint)c.repaint($Z);}}};return $O;};PXCallback.$0y=function($l){for(var $00 in px_all){try{var $01=px_all[$00];if($01.onCallback)$01.onCallback($l);}catch(ex){alert(ex.message);}}};PXCallback.$0E=function($D,$i){var $02=PXCallback.$0A,$03=$D.childNodes;if($03.length>0&&$03[0].nodeType==4){var $N=$03[0].nodeValue;px_cm.processHtmlData($N);}else if($02){$02.setText($D.getAttribute("Message"));$02.setCaption($D.getAttribute("Caption"));$02.setIcon(parseInt($D.getAttribute("Icon")));$02.setButtons(parseInt($D.getAttribute("Buttons")));};$i.info.dataSource=$D.getAttribute("DataSource");$i.info.viewName=$D.getAttribute("ViewName");$i.info.previousAnswers=$D.getAttribute("Answers");$i.info.dialogKey=$D.getAttribute("DialogKey");if($02){$02.callbackContext=$i;$02.show();}else{setTimeout(function(){PXCallback.$0H($i);},0);}};PXCallback.$0H=function($i){var $02=px_all["messageBox"];if($02){PXCallback.$0A=$02;$02.callbackContext=$i;$02.show();}};PXCallback.$0F=function($D,$i){var $04=PXCallback.$0z,$03=$D.childNodes;if($03.length>0&&$03[0].nodeType==4){var $N=$03[0].nodeValue;px_cm.processHtmlData($N);}else if($04){$04.setCaption($D.getAttribute("Caption"));$04.setPageUrl($D.getAttribute("Url"));if(!$04.loaded)$04.setHeight(400);$04.closeCallback=$i.popupCommand;if($D.getAttribute("Reload")&&$04.loaded){var $05=$04.getInnerWindow(),$06=false;for(var name in $05.px_all){var $q=$05.px_all[name];if(!$q||$q.__className!="PXDataSource")continue;if($q.callbacks){$06=true;$q.executeCallback("ReloadPage");};break;}};if(!$06)$04.loaded=false;};if($04){if($04.getVisible())$04.hide();$04.show();}else setTimeout(function(){PXCallback.$0I($i);},0);};PXCallback.$0I=function($i){var $04=px_all["popupPanel"];if($04){PXCallback.$0z=$04;$04.events.addEventHandler("afterLoad",PXCallback.$0J);$04.events.addEventHandler("afterShow",PXCallback.$0K);$04.showAfterLoad=true;$04.closeCallback=$i.popupCommand;$04.show();}};PXCallback.$0J=function($04){var $05=$04.getInnerWindow(),$07=$05?$05.theForm:null;if($07){var h=$07.getAttribute("popupheight");var w=$07.getAttribute("popupwidth");if(h)$04.setHeight(h);if(w){$05.document.body.style.minWidth="";$04.setWidth(w);};$04.suppressPageChanges();}};PXCallback.$0K=function($04){var $05=$04.getInnerWindow();if($05&&$05.px_cm)$05.px_cm.notifyVisibleChanged(true);};PXCallback.$0G=function($D,$i){if(PXCallback.$0L==null)PXCallback.$0L=new Object();var $08=$D.getAttribute("ViewName");var $09=PXCallback.$0L[$08];if($09==null){for(var n in px_all){var $k=px_all[n];if($k.__className=="PXSmartPanel"&&$k.key==$08){$09=PXCallback.$0L[$08]=$k;break;}}};if($09!=null){$i.info.dataSource=$D.getAttribute("DataSource");$i.info.dialogKey=$D.getAttribute("DialogKey");$i.info.viewName=$08;$i.info.previousAnswers=$D.getAttribute("Answers");$09.callbackContext=$i;$09.show();}};PXCallback.$0B=function($C,$0a,$0b){var $P=$0b?$0b.split(","):null;for(var name in px_data){var $q=px_data[name];if($q&&$q!=$0a){if($P){var $0c=false;for(var i=0;i<$P.length;i++){if($q.ID.endsWith($P[i])){$0c=true;break;}};if(!$0c)continue;};var $0d=null;if($q.hasError||$q.getChanged==null||$q.getChanged())$0d=$q.getDataChanges();if($0d!=null){var $E=$C.xmlDoc.createElement($q.ID);$E.appendChild($C.xmlDoc.createCDATASection($0d));$C.rootNode.appendChild($E);}}}};function WebForm_DoCallback($0e,$0f,$0g,$i,$0h,$0i){var $d=__theFormPostData+"__CALLBACKID="+WebForm_EncodeCallback($0e)+"&__CALLBACKPARAM="+WebForm_EncodeCallback($0f);if(theForm.__EVENTVALIDATION){$d+="&__EVENTVALIDATION="+WebForm_EncodeCallback(theForm.__EVENTVALIDATION.value);};var $0j,e;try{$0j=new XMLHttpRequest();}catch(e){try{$0j=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}};var $0k=true;try{$0k=($0j&&$0j.setRequestHeader);}catch(e){};var $0l=new Object();$0l.eventCallback=$0g;$0l.context=$i;$0l.errorCallback=$0h;$0l.async=$0i;var $0m=WebForm_FillFirstAvailableSlot(__pendingCallbacks,$0l);if(!$0i){if(__synchronousCallBackIndex!=-1){__pendingCallbacks[__synchronousCallBackIndex]=null;};__synchronousCallBackIndex=$0m;};if($0k){$0j.onreadystatechange=Function.createCallback(WebForm_CallbackComplete,$0m);$0l.xmlRequest=$0j;$0j.open("POST",theForm.action,true);$0j.setRequestHeader("Content-Type","application/x-www-form-urlencoded");$0j.send($d);}};function WebForm_CallbackComplete(){var $0n=arguments[arguments.length-1];if(typeof $0n!="number")return;var $01=__pendingCallbacks[$0n];if($01&&$01.xmlRequest&&($01.xmlRequest.readyState==4)){var $0o=$01.xmlRequest.responseText,$0p=false;if($0o&&$0o.charAt(0)!="s"&&$0o.charAt(0)!="e"&&$0o.indexOf("|")==-1){if($01.context.context.blockPage)px.stopWC();$0p=true;var ti=$0o.indexOf("<title>"),$0q=$0o.indexOf("</title>");if(ti>0&&$0q>0)alert($0o.substring(ti+"<title>".length,$0q));else alert($0o);};if(!$01.async)__synchronousCallBackIndex=-1;__pendingCallbacks[$0n]=null;if(!$0p)WebForm_ExecuteCallback($01);}};



var NetType={Empty:0,Object:1,DBNull:2,Boolean:3,Char:4,SByte:5,Byte:6,Int16:7,UInt16:8,Int32:9,UInt32:10,Int64:11,UInt64:12,Single:13,Double:14,Decimal:15,DateTime:16,String:18};NetType.isNumeric=function($a){return($a>=NetType.SByte&&$a<=NetType.Decimal);};NetType.equals=function($a,v1,v2){if((v1==null&&v2!=null)||(v2==null&&v1!=null))return false;if(v1==null&&v2==null)return true;if($a==NetType.DateTime)return v1.getTime()==v2.getTime();return v1==v2;};NetType.defaultValue=function($a){var $b=null;if($a==NetType.Boolean)$b=false;else if(NetType.isNumeric($a))$b=0;else if($a==NetType.DateTime)$b=new Date();else if($a==NetType.Char||$a==NetType.String)$b="";return $b;};NetType.convert=function(v,$a){if(v==null)return null;var $b=v;if($a==NetType.Boolean){if(typeof(v)!="boolean"){if(v&&typeof(v)=="string"){if(v=="0"||v.toLowerCase()=="false")v=false;};$b=Boolean(v);}}else if($a>=NetType.SByte&&$a<=NetType.UInt64){if(typeof(v)!="number"){$b=parseInt(v);if(isNaN($b))$b=0;}}else if($a>=NetType.Single&&$a<=NetType.Decimal){if(typeof(v)!="number"){$b=parseFloat(v);if(isNaN($b))$b=0.0;}}else if($a==NetType.DateTime)$b=new Date(Date.parse(v));else if($a==NetType.Char||$a==NetType.String)$b=String(v);return $b;};Date.prototype.format=function($c,$d){if($c.length==1)switch($c){case "d":$c=$d.shortDate;break;case "D":$c=$d.longDate;break;case "t":$c=$d.shortTime;break;case "T":$c=$d.longTime;break;case "g":$c=$d.shortDate+" "+$d.shortTime;break;case "G":$c=$d.shortDate+" "+$d.longTime;break;case "f":$c=$d.longDate+" "+$d.shortTime;break;case "F":$c=$d.longDate+" "+$d.longTime;break;};var $e="",$f=false;var $g=$d.monthNames.split(",");var $h=$d.dayNames.split(",");var $i=this;for(var i=0;i<$c.length;i++){if($f){$e+=$c.substr(i,1);$f=false;continue;};if($c.charAt(i)=="\\"){$f=true;continue;};var s=$c.substr(i,4),ok=false,v="";switch(s){case "MMMM":v=$g[$i.getMonth()];break;case "dddd":v=$g[$i.getMonth()];break;case "yyyy":v=$i.getFullYear();break;};if(v){$e+=v;i+=3;continue;};s=$c.substr(i,3);switch(s){case "MMM":v=$g[$i.getMonth()].substr(0,3);break;case "ddd":v=$h[$i.getDay()].substr(0,3);break;};if(v){$e+=v;i+=2;continue;};s=$c.substr(i,2);switch(s){case "MM":v=($i.getMonth()+1).toString();if(v.length==1)v="0"+v;break;case "dd":v=$i.getDate().toString();if(v.length==1)v="0"+v;break;case "yy":v=($i.getYear()%100).toString();if(v.length==1)v="0"+v;break;case "HH":v=$i.getHours().toString();if(v.length==1)v="0"+v;break;case "hh":v=$i.getHours();if(v==0)v=12;else if(v>12)v-=12;v=v.toString();if(v.length==1)v="0"+v;break;case "mm":v=$i.getMinutes().toString();if(v.length==1)v="0"+v;break;case "ss":v=$i.getSeconds().toString();if(v.length==1)v="0"+v;break;case "tt":v=$i.getHours();var pm=false;if(v>=12)pm=true;if(pm)v=$d.pm;else v=$d.am;break;};if(v){$e+=v;i+=1;continue;};s=$c.substr(i,1);switch(s){case "M":v=($i.getMonth()+1).toString();break;case "d":v=$i.getDate().toString();break;case "y":v=($i.getYear()%100).toString();break;case "H":v=$i.getHours().toString();break;case "h":v=$i.getHours();if(v==0)v=12;else if(v>12)v-=12;v=v.toString();break;case "m":v=$i.getMinutes().toString();break;case "s":v=$i.getSeconds().toString();break;};if(v){$e+=v;continue;};$e+=$c.substr(i,1);};return $e;};Number.prototype.$S=function($c,$j){var $k=(this<0),$l=Math.abs(this);$l=Math.abs($l);var $m=$l.toString().split('.');var $n=parseInt($m[0]);var $o=($m.length>1)?$m[1]:"";var $p=$c.length-1,$q=$c.indexOf(".");if($q!=-1)$p=$q-1;var $r="",$s=false;for(var i=$p;i>=0;i--){var ch=$c.charAt(i);if(ch=="#"||ch=="0"){var $t=0,$u=true;if($n>0){$t=$n%10;$n=Math.floor($n/10);$u=false;};if(!$u){if($s)$r=$j.number.groupSeparator+$r;$r=$t.toString()+$r;$s=false;continue;}else if(ch=="0"){if($s)$r=$j.number.groupSeparator+$r;$r="0"+$r;$s=false;}}else if(ch==",")$s=true;else $r=ch+$r;};if($k&&$c.substr(0,1)=="+")$r=$j.negativeSign+$r.substr(1);else if($k)$r=$j.negativeSign+$r;if($q!=-1){$r+=$j.number.decimalSeparator;for(var i=$q,j=0;i<$c.length;i++){var ch=$c.charAt(i);if(ch=="#"||ch=="0"){var $t=0;if(j<$o.length){$t=parseInt($o.charAt(j));j++;};if($t!=0){$r+=$t.toString();continue;}else if(ch=="0")$r+="0";}else if(ch==","||ch==".")continue;else $r+=ch;};if($r.indexOf(".")==($r.length-1))$r=$r.substr(0,$r.length-1);};if($r=="")$r="0";return $r;};Number.prototype.$T=function($c,$j){var $v=["n %","n%","%n"];var $w=["-n %","-n%","-%n"];var $x=["(n)","-n","- n","n-","n -"];var $y=["$n","n$","$ n","n $"];var $z=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];var $l=Math.abs(this),nf=$j;var $A=($c.length>1)?parseInt($c.slice(1)):-1;var $B;switch($c.charAt(0)){case "d":case "D":$B='n';if($A!==-1){var $C=""+$l;var $D=$A-$C.length;if($D>0){for(var i=0;i<$D;i++)$C='0'+$C;};$l=$C;};if(this<0)$l=-$l;break;case "c":case "C":if(this<0)$B=$z[nf.currency.negativePattern];else $B=$y[nf.currency.positivePattern];if($A===-1)$A=nf.currency.decimalDigits;$l=Number.$U(Math.abs(this),$A,nf.currency.groupSizes,nf.currency.groupSeparator,nf.currency.decimalSeparator);break;case "n":case "N":if(this<0)$B=$x[nf.number.negativePattern];else $B='n';if($A===-1)$A=nf.number.decimalDigits;$l=Number.$U(Math.abs(this),$A,nf.number.groupSizes,nf.number.groupSeparator,nf.number.decimalSeparator);break;case "f":case "F":if(this<0)$B=$x[nf.number.negativePattern];else $B='n';if($A===-1)$A=nf.number.decimalDigits;$l=Number.$U(Math.abs(this),$A,null,'',nf.number.decimalSeparator);break;case "p":case "P":if(this<0)$B=$w[nf.percent.negativePattern];else $B=$v[nf.percent.positivePattern];if($A===-1)$A=nf.percent.decimalDigits;$l=Number.$U(Math.abs(this),$A,nf.percent.groupSizes,nf.percent.groupSeparator,nf.percent.decimalSeparator);break;default:$B='n';$l=""+$l;};var $r="",$E=/n|\$|-|%/g;for(;;){var $F=$E.lastIndex;var ar=$E.exec($B);$r+=$B.slice($F,ar?ar.index:$B.length);if(!ar)break;switch(ar[0]){case "n":$r+=$l;break;case "$":$r+=nf.currencySymbol;break;case "-":$r+=nf.negativeSign;break;case "%":$r+=nf.percentSymbol;break;}};return $r;};Number.$U=function($l,$A,$G,$H,$I){var $J=$G?$G[0]:0,$K=1;var $L=$l.toString();var $M="",$N="";var $O=$L.split('.');if($O.length>1){$L=$O[0];$M=$O[1];var $P=$M.split(/e/i);if($P.length>1){$M=$P[0];$N="e"+$P[1];}};if($A>0){var $Q=$M.length-$A;if($Q>0){$M=$M.slice(0,$A);}else if($Q<0){for(var i=0;i<Math.abs($Q);i++)$M+='0';};$M=$I+$M;}else{$M="";};$M+=$N;var $R=$L.length-1;var $r="";while($R>=0){if($J===0||$J>$R){if($r.length>0)return $L.slice(0,$R+1)+$H+$r+$M;else return $L.slice(0,$R+1)+$M;};if($r.length>0)$r=$L.slice($R-$J+1,$R+1)+$H+$r;else $r=$L.slice($R-$J+1,$R+1);$R-=$J;if($G&&$K<$G.length){$J=$G[$K];$K++;}};return $L.slice(0,$R+1)+$H+$r+$M;};Number.prototype.format=function($c,$j){if(!$c||$c==='i')return this.toLocaleString();switch($c.charAt(0).toLowerCase()){case "d":case "c":case "n":case "f":case "p":return this.$T($c,$j);};return this.$S($c,$j);};



function PXButton($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);this.elemImage=px.elemByID($a.id+"_im");this.dropCell=px.elemByID($a.id+"_drop");this.hasMenu=(this.dropCell!=null);PXEvent.addBaseHandlers($a,PXButton.$x);var hs=PXButton.$y;px.addEventHandler($a,"mouseover",hs);px.addEventHandler($a,"mouseout",hs);px.addEventHandler($a,"mousedown",hs);px.addEventHandler($a,"mouseup",hs);$a.object=this;this.viewState=new PXStateBag($a.id,"PXButton");this.events=new PXEventList(this,PXButton.events,$b.clientEvents);if(this.commandSourceID&&!this.autoPostBack)px_cm.registerRequiresOnLoad(this,$a.id);$a.object=this;};PXButton.properties=[["autoPostBack",JSType.Bool,false],["navigateUrl",JSType.String,""],["target",JSType.String,""],["openFrameset",JSType.Bool,false],["queryString",JSType.String,""],["commandName",JSType.String,""],["commandArgument",JSType.String,""],["commandSourceID",JSType.String,""],["popupPanel",JSType.String,""],["dialogResult",JSType.Int,0],["toggleMode",JSType.Bool,false],["pushed",JSType.Bool,false],["autoCallBack",JSType.Object,PXCallback.settingsDesc],["popupCommand",JSType.Object,PXCallback.settingsDesc],["images",JSType.Object,null],["pushedImages",JSType.Object,null],["styles",JSType.Object,null]];PXButton.callbackProps=[["hidden",JSType.Bool,false,px_cm.setHidden],["enabled",JSType.Bool,true,"setEnabled"],["queryString",JSType.String,""]];PXButton.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXButton.callbackProps);};PXButton.events={$initialize:0,$keyDown:1,$keyPress:2,$keyUp:3,$mouseDown:4,$mouseUp:5,$mouseMove:6,$mouseOver:7,$mouseOut:8,$click:9,$focus:10,$blur:11};PXButton.prototype.getVisible=function(){return this.element.style.display!="none";};PXButton.prototype.setVisible=function($c){if($c!=this.getVisible()){this.element.style.display=($c?"":"none");this.viewState.update("Visible",Boolean($c));}};PXButton.prototype.getEnabled=function(){return px.getEnabled(this.element);};PXButton.prototype.setEnabled=function($d){if($d!=this.getEnabled()){px.setEnabled(this.element,$d);this.$z=this.$A=false;this.$B();this.viewState.update("Enabled",Boolean($d));}};PXButton.prototype.getPushed=function(){if(this.toggleMode)return this.pushed;return false;};PXButton.prototype.setPushed=function($e){if(this.toggleMode&&$e!=this.getPushed()){this.pushed=$e;this.$B();this.viewState.update("Pushed",$e);}};PXButton.prototype.getText=function(){return px.getElemText(this.element);};PXButton.prototype.setText=function(v){if(this.text!=v){px.setElemText(this.element,v);this.text=v;}};PXButton.prototype.$C=function(){if(this.$D==null){var $f=this.ID+"_menu";this.$D=PXMenu.createMenuControl($f);if(this.$D){var $g=this.$D.events;$g.addEventHandler("deactivate",PXButton.$E);this.$D.linkedButton=this;}};return this.$D;};PXButton.prototype.$F=function($h,$e){var im=$e?this.pushedImages:this.images,$i;switch($h){case 0:$i=im.normal;break;case 1:$i=im.disabled;break;case 2:$i=im.hover;break;};if(!$i){if($h>0)$i=this.$F(0,$e);else if($e)$i=this.$F(0,false);};return $i;};PXButton.prototype.$B=function(){var $j,$k,im=this.elemImage,$e=this.getPushed();var $l=this.styles,$m=new Array();if(!this.getEnabled()){$k=$l.disabled;if(im)$j=this.$F(1,$e);}else if(this.$A){$k=this.$G?$l.dropDown:$l.pushed;if(im)$j=this.$F(2,$e);}else if(this.$z){$k=$l.hover;if(im)$j=this.$F(2,$e);}else if($e){$k=$l.pushed;};if($l.normal)$m.push($l.normal);if($k)$m.push($k);this.element.className=$m.join(" ");if(this.hasMenu){$k=(this.$z&&!this.$A)?$l.dropH:$l.dropN;this.dropCell.className=$k;};if(im){if(!$j)$j=this.$F(0,$e);if(im.src!=$j)im.src=$j;}};PXButton.prototype.fireEvent=function(id,ev){var $n=new Object();return this.events.fireEvent(id,ev,$n);};PXButton.prototype.onLoad=function(){var $o=px_all[this.commandSourceID];if(this.commandName&&$o&&$o.registerCommandControl)$o.registerCommandControl(this,this.commandName);};PXButton.prototype.commandStateCallback=function($p,$q){this.setEnabled($p.getEnabled());};PXButton.prototype.callbackButton=function(){if(this.autoCallBack&&this.autoCallBack.enabled){return !this.navigateUrl&&!this.autoPostBack;};return false;};PXButton.prototype.exec=function(e){var ev=this.events.eventArgs;if(this.navigateUrl){if(!ev.cancelPostBack){var qs=this.queryString;var $j=qs?(this.navigateUrl+"?"+qs):this.navigateUrl;if(this.popupPanel){var $r=px_all[this.popupPanel];if($r.getVisible()&&$j==$r.getPageUrl())$r.hide();else{$r.setPageUrl($j);$r.show(this);}}else{var $s=(e.shiftKey||e.ctrlKey);px.openUrl($j,this.target,$s||this.openFrameset);}}}else if(this.autoPostBack){if(!ev.cancelPostBack)px.doPost(this.element.getAttribute("name"),"click");}else if(this.autoCallBack&&this.autoCallBack.enabled){e.openFrameset=this.openFrameset;if(!ev.cancelCallBack)PXCallback.exec(this,this.autoCallBack,this.popupCommand);}else if(this.commandSourceID&&this.commandName){var $o=px_all[this.commandSourceID];if($o&&$o.executeCommand){$o.sourceEvent=e;$o.executeCommand(this.commandName,this.commandArgument);}};if(this.popupPanel&&!this.autoPostBack&&!this.navigateUrl){var $r=px_all[this.popupPanel];if($r){if(!$r.getVisible()){$r.closeCallback=this.popupCommand;$r.show(this);}else $r.hide();}}};PXButton.$x=function(e){var $t=px.eventObject(e,PXButton);var $h=PXEvent.baseEventID(e.type);if($t){if($t.fireEvent($h,e)){px.cancelEvent(e);return;};if($h==9&&!$t.$G)$t.$H(e);}};PXButton.prototype.$H=function(e){this.exec(e);};PXButton.$y=function(e){if(e==null)if((e=window.event)==null)return;var $t=px.eventObject(e,PXButton);var $a=$t?$t.element:null;if($a&&$t.getEnabled()){switch(e.type){case "mouseover":$t.$z=true;$t.$B();break;case "mouseout":$t.$z=false;if(!$t.$G)$t.$A=false;$t.$B();break;case "mousedown":$t.$A=true;if(PXButton.$I(e)){var $u=$t.$C();if($u){if($t.$G)$u.setActive(false,true);else{$u.show($a,true);$t.$G=true;}}}else{if($t.toggleMode)$t.setPushed(!$t.getPushed());};$t.$B();break;case "mouseup":if(!$t.$G)$t.$A=false;$t.$B();break;}}};PXButton.$I=function(e){var $a=px.eventElem(e,PXButton),$v=false;while($a&&$a.object==null){if($a.tagName=="TD"){$v=Boolean($a.id);break;};$a=$a.parentNode;};return $v;};PXButton.$E=function($w,e){var $t=$w.linkedButton;if(e.id==2&&$t){$t.$A=false;$t.$B();setTimeout(function(){PXButton.$J($t.ID);},300);}};PXButton.$J=function(id){var $t=px_all[id];$t.$G=false;};



var PXMenuStyle={Menu:0,MenuItem:1,ItemHover:2,ItemDisabled:3,Spacer:4};var PXMenuImage={Checked:0,Unchecked:1,ScrollDown:2,ScrollUp:3};function PXMenu($a,$b){this.props=$b;this.ID=$a.id;px_cm.readProperties(this,$b);if(this.commandSourceID&&$b.commands){px_cm.registerRequiresOnLoad(this,$a.id);this.linkedCommands=$b.commands.split(",");};this.expandEffects=new PXExpandEffects($b.expandEffects);this.items=new PXMenuItems($a,this,null);this.activeItems=this.items;this.events=new PXEventList(this,PXMenu.events,$b.clientEvents);this.viewState=new PXStateBag($a.id,"PXMenu");var $c=[PXMenuImage.ScrollDown,PXMenuImage.ScrollUp];for(var i=0;i<$c.length;i++){var im=new Image();im.src=this.$0u(-1,$c[i]);}};PXMenu.stylesDesc=[["menu",JSType.String,""],["item",JSType.String,""],["hover",JSType.String,""],["disabled",JSType.String,""],["topSel",JSType.String,""],["spacer",JSType.String,""]];PXMenu.imagesDesc=[["checked",JSType.String,""],["unchecked",JSType.String,""],["scrollDown",JSType.String,""],["scrollUp",JSType.String,""]];PXMenu.levelDesc=[["autoPostBack",JSType.Bool,null],["target",JSType.String,""],["styles",JSType.Object,PXMenu.stylesDesc],["images",JSType.Object,PXMenu.imagesDesc]];PXMenu.properties=[["menuStyle",JSType.Int,1],["autoPostBack",JSType.Bool,null],["autoOpen",JSType.Bool,false],["target",JSType.String,""],["commandSourceID",JSType.String,""],["allowFocus",JSType.Bool,true],["styles",JSType.Object,PXMenu.stylesDesc],["images",JSType.Object,PXMenu.imagesDesc],["levels",JSType.Array,PXMenu.levelDesc]];PXMenu.events={$initialize:0,$activate:1,$deactivate:2,$subMenuShow:3,$itemClick:4,$itemCheck:5};PXMenu.prototype.setProperties=function($b){this.$0v(this.items,$b?$b.items:null);};PXMenu.prototype.$0v=function($d,$b){for(var i=0;i<$d.length;i++){var $e=$d.getItem(i);if($e){var ip=$b?$b["i"+$e.hashCode()]:null;px_cm.readProperties($e,ip,PXMenuItem.callbackProps);if($e.hasChild)this.$0v($e.childItems,$b);}}};PXMenu.prototype.getVisible=function(){return this.element.style.display!="none";};PXMenu.prototype.setVisible=function($f){this.element.style.display=($f?"":"none");};PXMenu.prototype.getEnabled=function(){return px.getEnabled(this.element);};PXMenu.prototype.setEnabled=function($g){px.setEnabled(this.element,$g);this.viewState.update("Enabled",$g);};PXMenu.prototype.getItemByID=function(id){id=id.substr(this.ID.length+1);var ar=id.split("_"),$d=this.items,$e;for(var i=1;i<ar.length;i++){$e=$d.getItem(parseInt(ar[i]));if($e&&$e.hasChild&&i<(ar.length-1))$d=$e.childItems;else if(i<(ar.length-1)){$e=null;break;}};return $e;};PXMenu.prototype.focus=function(){if(this.allowFocus)px_cm.setFocus(this,this.$0w);};PXMenu.prototype.setActive=function(v,$h){if(this.getActive()==v)return;if($h==null)$h=true;var eh=PXMenu.$0x,$i=PXMenu.$0y;if(v){if(document.activeMenuID){var $j=px_all[document.activeMenuID];if($j)$j.setActive(false,$h);};document.activeMenuID=this.ID;px.addEventHandler(document,"mousedown",eh);px.addEventHandler(document,"mouseover",$i);if($h)this.fireEvent("activate");}else{var ai=this.items.activeItem;if(ai!=null){ai.hideSubMenu(true);ai.setActive(false);};if(this.items.horizontal&&!this.autoOpen)this.items.autoOpenItems=false;if(this.menuStyle==2)this.items.setVisible(false);px.removeEventHandler(document,"mousedown",eh);px.removeEventHandler(document,"mouseover",$i);document.activeMenuID=null;if($h)this.fireEvent("deactivate");}};PXMenu.prototype.getActive=function(v){var $k=document.activeMenuID;return $k!=null&&$k==this.ID;};PXMenu.prototype.show=function($a,$l){this.items.calcPosition($a,$l);px.lockMouseEvents();this.items.setVisible(true);this.setActive(true);this.focus();};PXMenu.prototype.showAt=function(X,Y){this.mouseX=X;this.mouseY=Y;this.items.setPosition(X,Y,true);px.lockMouseEvents();this.items.setVisible(true);this.setActive(true);this.focus();};PXMenu.createMenuControl=function($k){var $a=px.elemByID($k),$m=null;if($a){if($a.parentNode!=theForm){$a.style.left=$a.style.top="-999px";theForm.appendChild($a);};$m=px_cm.createControl("PXMenu",$k);if($m){px_all[$k]=$m;$m.onLoad();}};return $m;};PXMenu.prototype.$0z=function($n,$o){var $p=this.$0A($n);var $q="";switch($o){case PXMenuStyle.Menu:$q=$p.styles.menu;break;case PXMenuStyle.MenuItem:$q=$p.styles.item;break;case PXMenuStyle.ItemHover:$q=$p.styles.hover;break;case PXMenuStyle.ItemDisabled:$q=$p.styles.disabled;break;case PXMenuStyle.Spacer:$q=$p.styles.spacer;break;};return $q;};PXMenu.prototype.$0u=function($n,$r){var $p=this.$0A($n),im="";switch($r){case PXMenuImage.Checked:im=$p.images.checked;break;case PXMenuImage.Unchecked:im=$p.images.unchecked;break;case PXMenuImage.ScrollDown:im=$p.images.scrollDown;break;case PXMenuImage.ScrollUp:im=$p.images.scrollUp;break;};if(!im&&$p!=this)im=this.$0u(-1,$r);return im;};PXMenu.prototype.$0B=function($n){var $p=this.$0A($n);return $p.target?$p.target:this.target;};PXMenu.prototype.$0C=function($n){var $p=this.$0A($n);return $p.autoPostBack;};PXMenu.prototype.$0A=function($n){var $p=this;if(this.levels!=null&&($n>=0&&$n<this.levels.length))$p=this.levels[$n];return $p;};PXMenu.prototype.fireEvent=function(id,ev,$s){return this.events.fireEvent(id,ev,$s);};PXMenu.prototype.onLoad=function(){var $t=px_all[this.commandSourceID];if($t&&$t.registerCommandControl&&this.linkedCommands){for(var i=0;i<this.linkedCommands.length;i++){var $u=this.linkedCommands[i];if($u)$t.registerCommandControl(this,$u);}}};PXMenu.prototype.commandStateCallback=function($v,$w){var $x=$v.getEnabled();var $y=$v.getVisible();if(this.cmdState==null)this.cmdState=new Object();this.cmdState[$w]=$x;for(var i=0;i<this.items.length;i++){var $e=this.items.getItem(i);if($e&&$e.commandName){if($e.commandName==$w){$e.setEnabled($x);$e.setVisible($y);break;}}}};function PXMenuItems($a,$m,$z){this.element=$a;this.menu=$m;this.parentItem=$z;this.tableElem=$a.getElementsByTagName("TABLE")[0];this.listElem=$a.getElementsByTagName("UL")[0];this.level=($z!=null)?($z.level+1):0;this.horizontal=($m.menuStyle==0&&this.level==0);this.activeItem=null;this.autoOpenItems=!this.horizontal||$m.autoOpen;this.items=new Array();this.length=parseInt($a.getAttribute("itemsCount"));$a.object=this;if(this.tableElem){var h=PXMenu.$0D;px.addEventHandler(this.tableElem,"mouseover",h);px.addEventHandler(this.tableElem,"mouseout",h);px.addEventHandler(this.tableElem,"mousedown",h);px.addEventHandler(this.tableElem,"mouseup",h);px.addEventHandler(this.tableElem,"selectstart",h);px.addEventHandler(this.tableElem,"contextmenu",h);}else if(this.listElem){var h=PXMenu.$0E;px.addEventHandler(this.listElem,"mouseover",h);px.addEventHandler(this.listElem,"mouseout",h);px.addEventHandler(this.listElem,"mousedown",h);px.addEventHandler(this.listElem,"mouseup",h);px.addEventHandler(this.listElem,"selectstart",h);px.addEventHandler(this.listElem,"contextmenu",h);}};PXMenuItems.prototype.getVisible=function(){return this.element.style.display!="none";};PXMenuItems.prototype.setVisible=function($f){if(this.getVisible()==$f)return;var e=this.element,es=this.element.style;if($f){es.zIndex=12000;if(es.filter!=null)this.menu.expandEffects.setFilter(this.element,true);else es.display="";es.width=this.tableElem.offsetWidth+"px";}else{if(this.activeItem)this.activeItem.setActive(false);es.display="none";}};PXMenuItems.prototype.setPosition=function(X,Y,$A){var e=this.element,de=document.documentElement;if(this.menu.menuStyle==2&&e.parentNode!=theForm){e.style.left=e.style.top="-999px";theForm.appendChild(e);};if($A){var $B=de.clientWidth,$C=de.clientHeight;var $D=de.scrollTop,$E=de.scrollLeft;e.style.display="";var $F=e.offsetWidth,$G=e.offsetHeight;e.style.display="none";if((X+$F)>($B+$E))X=$B-$F+$E;if(X<$E)X=$E;if((Y+$G)>($C+$D))Y=$C-$G+$D;if(Y<$D)Y=$D;};this.element.style.left=X+"px";this.element.style.top=Y+"px";};PXMenuItems.prototype.getItemID=function($H){var id=[this.menu.ID,"item"];if(this.parentItem!=null)id.push(this.parentItem.hashCode());id.push($H.toString());return id.join("_");};PXMenuItems.prototype.hasOpenSubMenu=function(){var i=this.activeItem;return i!=null&&i.hasChild&&i.childItems.getVisible();};PXMenuItems.prototype.nextItem=function(){var i=this.activeItem?(this.activeItem.index+1):0,$e;if(i>=this.length)i=0;do{$e=this.getItem(i);}while(++i<this.length&&!this.$0F($e));return $e;};PXMenuItems.prototype.prevItem=function(){var i=this.activeItem?(this.activeItem.index-1):this.length,$e;if(i<0)i=this.length-1;do{$e=this.getItem(i);}while(--i>=0&&!this.$0F($e));return $e;};PXMenuItems.prototype.firstItem=function(){var i=0,$e;do{$e=this.getItem(i);}while(++i<this.length&&!this.$0F($e));return $e;};PXMenuItems.prototype.lastItem=function(){var i=this.length-1,$e;do{$e=this.getItem(i);}while(--i>=0&&!this.$0F($e));return $e;};PXMenuItems.prototype.$0F=function($e){return $e&&$e.getVisible()&&$e.getEnabled();};PXMenuItems.prototype.getItem=function($H){if($H<0||$H>=this.length)return null;if($H>=this.items.length)this.items[this.length-1]=null;if(!this.items[$H]){var $a=px.elemByID(this.getItemID($H));if($a)this.items[$H]=new PXMenuItem($a,this,$H);};return this.items[$H];};PXMenuItems.prototype.getItemByCommand=function($I){if(this.$0G==null)this.$0G=new Object();if(this.$0G[$I]==null){for(var i=0;i<this.length;i++){var $e=this.getItem(i);if($e&&$e.commandName==$I){this.$0G[$I]=$e;break;}}};return this.$0G[$I];};PXMenuItems.prototype.calcPosition=function($a,$l){var e=this.element,de=document.documentElement,$J=e.offsetParent;var $B=de.clientWidth,$C=de.clientHeight;var $E=de.scrollLeft,$D=de.scrollTop;e.style.left=e.style.top="-999px";e.style.display="";if(this.tableElem.offsetHeight>($C-4)){var $K=this.scroller,$L=e.offsetHeight-e.clientHeight;if($K==null)this.scroller=$K=new PXMenuScroller(this);$K.show();$K.setScrollHeight($C-$K.getScrollDivsHeight()-$L);}else{if(this.scroller)this.scroller.hide();};var $F=e.offsetWidth,$G=e.offsetHeight;e.style.width=this.tableElem.offsetWidth+"px";e.style.display="none";var $M=0,$N=0;if(!$l){var $O=px.getElemLeftPos($a,$J);$M=$O+$a.offsetWidth;$N=px.getElemTopPos($a,$J);if(($M+$F)>($B+$E))$M=$O-$F;}else{var $P=px.getDropDownPos($a,e,2);$M=$P.left;$N=$P.top;};this.setPosition($M,$N,true);};PXMenuItems.prototype.removeItem=function($Q){var $e=null;if(typeof($Q)=="number")$e=this.getItem($Q);else $e=this.getItemByCommand($Q);if($e){var $R=$e.element.parentNode,$H=$e.index;this.tableElem.deleteRow($R.rowIndex);if($e.childItems){var $S=$e.childItems.element;$S.parentNode.removeChild($S);};for(var i=$H+1;i<this.length;i++){var mi=this.getItem(i);if(mi){mi.index=i-1;mi.element.id=this.getItemID(i-1);}};this.items.splice($H,1);this.length--;if($e.commandName&&this.$0G)delete this.$0G[$e.commandName];}};PXMenuItems.prototype.clear=function(){if(this.length>0){while(this.tableElem.rows.length)this.tableElem.deleteRow(0);this.items.length=this.length=0;}};PXMenuItems.prototype.insertItem=function($H,$T,$U,$V,$x,$W,$X,$Y){if($H<0||$H>this.length)$H=this.length;if($x==null)$x=true;for(var i=this.length-1;i>=$H;i--){var mi=this.getItem(i);if(mi){mi.index=i+1;mi.element.id=this.getItemID(i+1);}};var $Z=$x?PXMenuStyle.MenuItem:PXMenuStyle.ItemDisabled;var $q=this.menu.$0z(this.level,$Z);var $R=this.tableElem.insertRow($H);var $00=PXMenuItems.$0H($R,this.getItemID($H),$q);if($U||$W){var $01="";if($U&&!$W)$01=$x?$U:$V;else{var $02=$X?PXMenuImage.Checked:PXMenuImage.Unchecked;$01=this.menu.$0u(this.level,$02);};$00.appendChild(PXMenuItems.$0I($01));};var $03=document.createElement("div");$03.className=this.menu.$0z(this.level,PXMenuStyle.Spacer);$00.appendChild($03);if($Y){$03.appendChild(document.createTextNode($T));}else{var $04=document.createElement("nobr");$03.appendChild($04);$04.appendChild(document.createTextNode($T));};var $b=new Object();$b.showCheckBox=$W;$b.checked=$X;$b.images=new Object();$b.images.normal=$U;$b.images.disabled=$V;var $e=new PXMenuItem($00,this,$H,$b);this.items.splice($H,0,$e);this.length++;$e.setEnabled($x);return $e;};PXMenuItems.$0I=function($01){$05=document.createElement("img");$05.src=$01;$05.style.borderWidth="0px";$05.align="left";$05.className="MenuImage";return $05;};PXMenuItems.$0H=function($R,id,$q){var $00=$R.insertCell(0);$00.id=id;$00.className=$q;$00.setAttribute("nowrap","nowrap");return $00;};function PXMenuItem($a,$d,$H,$b){this.element=$a;this.collection=$d;this.level=$d.level;this.index=$H;var $m=$d.menu,$06=this.hashCode();if($b==null&&$m.props.items)$b=$m.props.items["i"+$06];px_cm.readProperties(this,$b);var $07=$a.childNodes[0],im=this.images;if($07.tagName=="IMG"&&!$07.getAttribute("subMenu")){if(!im.hover)im.hover=im.normal;if(!im.disabled)im.disabled=im.normal;this.elemImage=$07;};this.childID=$m.ID+"_itemsDiv_"+$06;var $S=px.elemByID(this.childID);if($S!=null){this.hasChild=true;this.childItems=new PXMenuItems($S,$m,this);}else this.hasChild=false;$a.object=this;};PXMenuItem.properties=[["autoPostBack",JSType.Bool,null],["navigateUrl",JSType.String,""],["accessKey",JSType.Int,0],["openFrameset",JSType.Bool,false],["target",JSType.String,""],["value",JSType.String,""],["commandName",JSType.String,""],["commandArgument",JSType.String,""],["popupPanel",JSType.String,""],["itemCss",JSType.String,""],["showCheckBox",JSType.Bool,null],["checked",JSType.Bool,false],["checkGroup",JSType.String,""],["images",JSType.Object,null],["autoCallBack",JSType.Object,PXCallback.settingsDesc],["popupCommand",JSType.Object,PXCallback.settingsDesc]];PXMenuItem.callbackProps=[["visible",JSType.Bool,true,"setVisible"],["enabled",JSType.Bool,true,"setEnabled"]];PXMenuItem.prototype.hashCode=function(){var ar=new Array();ar[0]=this.index;var pr=this.collection.parentItem;while(pr){ar[ar.length]=pr.index;pr=pr.collection.parentItem;};ar=ar.reverse();return ar.join("_");};PXMenuItem.prototype.getVisible=function(){return this.element.style.display!="none";};PXMenuItem.prototype.setVisible=function($f){var s=($f?"":"none");this.element.style.display=s;var $J=this.element.parentNode;if($J!=null&&$J.tagName=="TR")$J.style.display=s;};PXMenuItem.prototype.getEnabled=function(){return px.getEnabled(this.element);};PXMenuItem.prototype.setEnabled=function($g){if(this.getEnabled()!=$g){px.setEnabled(this.element,$g);this.$0J(false);}};PXMenuItem.prototype.getText=function(){return px.getElemText(this.element);};PXMenuItem.prototype.setText=function(v){px.setElemText(this.element,v,false);};PXMenuItem.prototype.getTooltip=function(){return px.getTitle(this.element);};PXMenuItem.prototype.setTooltip=function(v){px.setTitle(this.element,v);};PXMenuItem.prototype.getChecked=function(){return this.checked;};PXMenuItem.prototype.setChecked=function($X){if(this.showCheckBox&&this.getChecked()!=$X){var $m=this.collection.menu;if($X){this.checked=true;this.elemImage.src=$m.$0u(this.level,PXMenuImage.Checked);if(this.checkGroup){var $d=this.collection;for(var i=0;i<$d.length;i++){var mi=$d.getItem(i);if(mi&&mi!=this&&mi.checkGroup==this.checkGroup)mi.setChecked(false);}}}else{this.checked=false;this.elemImage.src=$m.$0u(this.level,PXMenuImage.Unchecked);}}};PXMenuItem.prototype.exec=function(e){var $m=this.collection.menu;if(this.showCheckBox){var $08=new Object();$08.item=this;$08.checked=this.getChecked();if($m.fireEvent("itemCheck",e,$08)){px.cancelEvent(e);return;};this.setChecked(!this.getChecked());};var $08=new Object();$08.item=this;if($m.fireEvent("itemClick",e,$08)){px.cancelEvent(e);return;};var $09=(this.level>0||$m.menuStyle==2);if($09)$m.setActive(false);var ev=$m.events.eventArgs,$0a=this.autoPostBack;if($0a==null)$0a=$m.$0C(this.level);if(this.navigateUrl){if(!ev.cancelPostBack){if(this.popupPanel){var $0b=px_all[this.popupPanel];if($0b.getVisible()&&this.navigateUrl==$0b.getPageUrl())$0b.hide();else{$0b.setPageUrl(this.navigateUrl);$0b.show($m);}}else{var $0c=(e.shiftKey||e.ctrlKey);px.openUrl(this.navigateUrl,this.target,$0c||this.openFrameset);}}}else if($0a){if(!ev.cancelPostBack){var name=$m.element.getAttribute("name");px.doPost(name,"click:"+this.element.id);}}else if(this.autoCallBack&&this.autoCallBack.enabled){e.openFrameset=this.openFrameset;ev.event=e;if(!ev.cancelCallBack)PXCallback.exec($m,this.autoCallBack,this.popupCommand);}else if($m.commandSourceID&&this.commandName){var $t=px_all[$m.commandSourceID];if($t&&$t.executeCommand){$t.sourceEvent=e;$t.executeCommand(this.commandName,this.commandArgument);}};if(this.popupPanel&&!$0a&&!this.navigateUrl){var $0b=px_all[this.popupPanel];if($0b){if(!$0b.getVisible()){$0b.closeCallback=this.popupCommand;$0b.show(this);}else $0b.hide();}}};PXMenuItem.prototype.getActive=function(){return this==this.collection.activeItem;};PXMenuItem.prototype.setActive=function($0d){if(this.getActive()==$0d||!this.getEnabled())return;if($0d){var $m=this.collection.menu;if($m.$0K){clearTimeout($m.$0K);delete $m.$0K;};var $0e=this.collection.activeItem;if($0e!=null)$0e.setActive(false);this.$0J(true);this.collection.activeItem=this;}else{this.hideSubMenu(this.collection.horizontal);this.$0J(false);this.collection.activeItem=null;if(PXMenu.$0L==this)this.$0M();}};PXMenuItem.prototype.showSubMenu=function($0f){if(!this.hasChild||this.childItems.getVisible())return false;var $m=this.collection.menu;var $0g=new Object();$0g.item=this;if($m.fireEvent("subMenuShow",null,$0g))return false;var ai=$m.activeItems,$0h=PXMenu.$0N;if(ai!=null&&ai!=this.collection&&($0h==null||$0h.collection!=this.collection)){var $d=ai;while($d.level>0&&$d!=this.collection){$d.setVisible(false);$d=$d.parentItem.collection;$m.activeItems=$d;}};if(!this.collection.getVisible()){var ar=new Array(),$d=this.collection;while(!$d.getVisible()){if($d.parentItem)ar.push($d.parentItem);$d=$d.parentItem.collection;};ar.reverse();for(var i=0;i<ar.length;i++){ar[i].setActive(true);ar[i].$0O();$m.activeItems=ar[i].childItems;}};this.setActive(true);var $0i=$m.expandEffects;if($0i.delay>0&&!$0f){if(PXMenu.$0P!=null)this.$0M();if(PXMenu.$0N==this)this.$0Q();PXMenu.$0L=this;PXMenu.$0P=setTimeout(function(){PXMenu.$0O();},$0i.delay);}else{this.$0O();$m.activeItems=this.childItems;};return true;};PXMenuItem.prototype.hideSubMenu=function($0f){if(!this.hasOpenSubMenu())return;if(this.childItems.activeItem!=null)this.childItems.activeItem.hideSubMenu(true);var $m=this.collection.menu,$0i=$m.expandEffects;if($0i.delay>0&&!$0f){PXMenu.$0N=this;PXMenu.$0K=setTimeout(function(){PXMenu.$0R();},$0i.delay);}else{this.childItems.setVisible(false);$m.activeItems=this.collection;}};PXMenuItem.prototype.hasOpenSubMenu=function(){return this.hasChild&&this.childItems.getVisible();};PXMenuItem.prototype.$0M=function(){if(PXMenu.$0P!=null){clearTimeout(PXMenu.$0P);PXMenu.$0P=null;PXMenu.$0L=null;}};PXMenuItem.prototype.$0Q=function(){if(PXMenu.$0K!=null){clearTimeout(PXMenu.$0K);PXMenu.$0K=null;PXMenu.$0N=null;}};PXMenuItem.prototype.$0O=function(){var ch=this.childItems;if(this.hasChild&&!ch.getVisible()){var $m=this.collection.menu;if($m.linkedCommands&&$m.cmdState){for(var i=0;i<this.childItems.length;i++){var $e=this.childItems.getItem(i);if($e&&$e.commandName){var $v=$m.cmdState[$e.commandName];if($v!=null)$e.setEnabled($v);}}};ch.calcPosition(this.element,this.collection.horizontal);ch.setVisible(true);}};PXMenuItem.prototype.$0J=function($0j){var ic=this.collection,$m=ic.menu,$q="";if(this.getEnabled()){if($0j&&ic.horizontal&&ic.autoOpenItems&&$m.styles.topSel)$q=$m.styles.topSel;else{$Z=$0j?PXMenuStyle.ItemHover:PXMenuStyle.MenuItem;$q=$m.$0z(this.level,$Z);}}else $q=$m.$0z(this.level,PXMenuStyle.ItemDisabled);if(this.itemCss!=null)$q+=" "+this.itemCss;if(this.element.className!=$q){this.element.className=$q;if(this.elemImage&&!this.showCheckBox){var $01=this.getEnabled()?($0j?this.images.hover:this.images.normal):this.images.disabled;if(this.elemImage.src!=$01)this.elemImage.src=$01;}}};function PXMenuScroller($d){this.items=$d;this.element=$d.element;this.tableElem=$d.tableElem;this.menu=$d.menu;this.active=false;var $0k=window.document;this.scrollDiv=$0k.createElement("DIV");this.topDiv=$0k.createElement("DIV");this.bottomDiv=$0k.createElement("DIV");var $q=this.menu.$0z($d.level,PXMenuStyle.MenuItem);this.topDiv.isTop=true;this.topDiv.className=this.bottomDiv.className=$q;this.topDiv.align=this.bottomDiv.align="center";var $05=$0k.createElement("IMG");$05.src=this.menu.$0u(this.level,PXMenuImage.ScrollUp);this.topDiv.appendChild($05);$05=$0k.createElement("IMG");$05.src=this.menu.$0u(this.level,PXMenuImage.ScrollDown);this.bottomDiv.appendChild($05);this.scrollDiv.appendChild(this.tableElem);this.element.appendChild(this.scrollDiv);this.element.insertBefore(this.topDiv,this.element.firstChild);this.element.appendChild(this.bottomDiv);var h1=Function.createDelegate(this,this.$0S);var h2=Function.createDelegate(this,this.$0T);px.addEventHandler(this.topDiv,"mouseover",h1,true);px.addEventHandler(this.bottomDiv,"mouseover",h1,true);px.addEventHandler(this.topDiv,"mouseout",h2,true);px.addEventHandler(this.bottomDiv,"mouseout",h2,true);};PXMenuScroller.prototype.show=function(){this.scrollDiv.scrollTop=0;this.scrollDiv.style.overflow="hidden";this.topDiv.style.display="";this.bottomDiv.style.display="";this.active=true;};PXMenuScroller.prototype.hide=function(){this.topDiv.style.display="none";this.bottomDiv.style.display="none";this.scrollDiv.style.overflow="";this.scrollDiv.style.height="";this.active=false;};PXMenuScroller.prototype.setScrollHeight=function($0l){if($0l>=0)this.scrollDiv.style.height=$0l+"px";};PXMenuScroller.prototype.getScrollHeight=function(){return this.scrollDiv.style.height;};PXMenuScroller.prototype.getScrollDivsHeight=function(){return this.topDiv.offsetHeight+this.bottomDiv.offsetHeight;};PXMenuScroller.prototype.eventInScroll=function(e){var se=px.eventElem(e);if(se&&se.tagName=="IMG")se=se.parentNode;return(se==this.topDiv)||(se==this.bottomDiv);};PXMenuScroller.prototype.$0S=function(e){var se=px.eventElem(e);if(se&&se.tagName=="IMG")se=se.parentNode;if(se){var $q=this.menu.$0z(this.items.level,PXMenuStyle.ItemHover);if($q!=se.className)se.className=$q;this.scrollInc=se.isTop?-4:4;clearInterval(this.scrollProcessId);var h=Function.createDelegate(this,this.$0U);this.scrollProcessId=setInterval(h,10);}};PXMenuScroller.prototype.$0T=function(e){var se=px.eventElem(e);if(se&&se.tagName=="IMG")se=se.parentNode;if(se){var $q=this.menu.$0z(this.items.level,PXMenuStyle.MenuItem);if($q!=se.className)se.className=$q;delete this.scrollInc;clearInterval(this.scrollProcessId);}};PXMenuScroller.prototype.$0U=function(){if(this.scrollInc==null)return;var $03=this.scrollDiv,$0m=$03.scrollTop;$03.scrollTop+=this.scrollInc;var $0n=false;if($03.scrollTop==0)$0n=true;if($0m==$03.scrollTop&&$0m>0)$0n=true;if($0n){clearInterval(this.scrollProcessId);delete this.scrollProcessId;}};PXMenu.$0V=function(e){var $a=px.eventElem(e);while($a!=null&&$a.tagName!="TD")$a=$a.parentNode;return $a;};var $0o,$0p;PXMenu.$0O=function(){var $e=PXMenu.$0L;if($e==null||!($e instanceof PXMenuItem))return;var $m=$e.collection.menu;$e.$0O();$m.activeItems=$e.childItems;PXMenu.$0L=null;PXMenu.$0P=null;};PXMenu.$0R=function(){var $e=PXMenu.$0N;if($e==null||!($e instanceof PXMenuItem))return;var $m=$e.collection.menu;$e.childItems.setVisible(false);$m.activeItems=$e.collection;PXMenu.$0N=null;PXMenu.$0K=null;};PXMenu.$0W=function(){var $m=px_all[document.activeMenuID];if($m!=null)$m.setActive(false);};PXMenu.$0D=function(e){var $00=PXMenu.$0V(e);PXMenu.$0X(e,$00);};PXMenu.$0E=function(e){var li=px.eventElem(e);while(li!=null&&li.tagName!="LI")li=li.parentNode;PXMenu.$0X(e,li);};PXMenu.$0X=function(e,$0q){if(e==null)if((e=window.event)==null)return;switch(e.type){case "selectstart":case "contextmenu":return px.cancelEvent(e,false);};var $d=px.eventObject(e,PXMenuItems);if($0q==null||$d==null){px.cancelEvent(e);return;};var $m=$d.menu;switch(e.type){case "mouseover":if(!$m.hasFocus)$m.focus();return $m.$0Y($d,$0q,e);case "mouseout":return $m.$0T($d,$0q,e);case "mousedown":if(!px.mouseLocked){if(!$m.hasFocus)$m.focus();return $m.$0Z($d,$0q,e);};break;case "mouseup":if(!px.mouseLocked)return $m.$10($d,$0q,e);break;}};PXMenu.prototype.$0Y=function($d,$00,e){px.cancelEvent(e);if($00.id){var $e=this.getItemByID($00.id);if($e==null)return;this.setActive(true);if($e.getEnabled()){if(!$e.getActive())$e.setActive(true);if($d.autoOpenItems&&$e.hasChild&&!$e.hasOpenSubMenu()){$e.showSubMenu($d.horizontal);}}else{if($d.activeItem)$d.activeItem.setActive(false);}}};PXMenu.prototype.$0T=function($d,$00){var ai=$d.activeItem;if(ai!=null&&!ai.hasOpenSubMenu())ai.setActive(false);};PXMenu.prototype.$0Z=function($d,$00,e){px.cancelEvent(e);if($00.id){var $e=this.getItemByID($00.id);if($e==null)return;if($d.horizontal&&$e.getEnabled()){if($e.hasChild){if(!$e.hasOpenSubMenu()){$d.autoOpenItems=true;$e.$0J(true);this.setActive(true);$e.showSubMenu(true);}else{$e.hideSubMenu(true);if(!this.autoOpen)$d.autoOpenItems=false;$e.$0J(true);}}}}};PXMenu.prototype.$10=function($d,$00,e){if($00.id){var $e=this.getItemByID($00.id);if($e&&$e.getActive()){var $0a=$e.autoPostBack;if($0a==null)$0a=this.$0C($e.level);var $0r=($e.autoCallBack&&$e.autoCallBack.enabled)||$e.commandName||$0a||$e.navigateUrl||$e.popupPanel;if($0r||!$e.hasChild)$e.exec(e);}}};PXMenu.$0x=function(e){if(!px.mouseLocked){var $m=px_all[document.activeMenuID];if($m!=null){var $d=$m.activeItems;if($d.scroller&&$d.scroller.eventInScroll(e))return;$m.setActive(false);}}};PXMenu.$0y=function(e){if(!px.mouseLocked){var $m=px_all[document.activeMenuID];if($m!=null&&$m.autoOpen){$m.$0K=setTimeout(function(){PXMenu.$0W();},300);}}};PXMenu.prototype.$0w=function(e){switch(e.type){case "focus":if(this.getVisible()&&this.getEnabled())this.hasFocus=true;break;case "blur":this.hasFocus=false;break;case "keydown":this.$11(e);break;}};PXMenu.prototype.$11=function(e){var $Q=e.keyCode,$0s,$d=this.activeItems;var $e=$d?$d.activeItem:null,$0t;switch($Q){case 13:if($e){$e.exec(e);px.cancelEvent(e);};break;case 35:$0s=$d?$d.lastItem():null;break;case 36:$0s=$d?$d.firstItem():null;break;case 38:$0s=$d?$d.prevItem():null;break;case 40:$0s=$d?$d.nextItem():null;break;case 37:if($e&&$e.hasOpenSubMenu()){$e.hideSubMenu(true);}else if($d){if($d.parentItem){$e=$d.parentItem;$e.hideSubMenu(true);$d=$e.collection;};if($d.horizontal){$e=$d.prevItem();$0t=true;}};break;case 39:if($e&&$e.hasChild&&!$e.hasOpenSubMenu()){$0t=true;}else if($d){while($d.parentItem)$d=$d.parentItem.collection;if($d.horizontal){$e=$d.nextItem();$0t=true;}};break;default:if($d)for(var i=0;i<$d.length;i++){$e=$d.getItem(i);if($e&&$e.accessKey==$Q){if($e.hasChild)$0t=true;else $e.exec(e);px.cancelEvent(e);break;}};break;};if($0t){if($e&&$e.hasChild){$e.showSubMenu(true);$0s=$e.childItems.firstItem()}else $0s=$e;};if($0s){$0s.setActive(true);px.cancelEvent(e);}};



var PXDialogResult={None:0,OK:1,Cancel:2,Abort:3,Retry:4,Ignore:5,Yes:6,No:7};function PXSmartPanel($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b,PXSmartPanel.properties);this.loaded=!this.innerPageUrl&&!this.loadOnDemand;this.$0a=new Array();if($a.tagName=="TABLE"){if($a.rows.length==1)this.contentCell=$a.rows[0].cells[0];else{this.elemCaption=$a.rows[0].cells[0];this.contentCell=$a.rows[1].cells[0];};this.elemContent=this.contentCell.firstChild;if(this.elemCaption){var $c=Function.createDelegate(this,this.$0b);var $d=this.elemCaption.childNodes;for(var i=0;i<$d.length;i++){if($d[i].tagName=="IMG")px.addEventHandler($d[i],"click",$c);}}}else this.elemContent=this.element;if(this.elemContent&&this.position>0){var h=Function.createDelegate(this,this.$0c);px.addEventHandler(this.elemContent,"click",h);h=Function.createDelegate(this,this.$0d);px.addEventHandler(this.elemContent,"keydown",h);};this.loadCall=PXCallback.copyCommand("Load",this.callBackMode);this.$0e=Function.createDelegate(this,this.$0f);this.$0g=Function.createDelegate(this,this.$0f);if(this.allowMove){var $e=this.dragHandleID?this.dragHandleID:this.elemCaption;px_cm.registerDragControl(this,$e,this.contentCell==null,this.contentCell);};if(this.allowResize)px_cm.registerResizableControl(this);this.viewState=new PXStateBag($a.id,"PXSmartPanel");this.events=new PXEventList(this,PXSmartPanel.events,$b.clientEvents);px_cm.registerAutoSize(this,$b);};PXSmartPanel.$0h=['A','AREA','BUTTON','INPUT','OBJECT','SELECT','TEXTAREA','IFRAME','DIV'];PXSmartPanel.properties=[["loadOnDemand",JSType.Bool,false],["allowMove",JSType.Bool,true],["allowResize",JSType.Bool,true],["autoAdjustSize",JSType.Bool,true],["blockPage",JSType.Bool,true],["innerPageUrl",JSType.String,""],["shadowColor",JSType.String,"Gray"],["shadowOpacity",JSType.Int,20],["position",JSType.Int,1],["left",JSType.Int,0],["top",JSType.Int,0],["dragHandleID",JSType.String,""],["placeHolderID",JSType.String,""],["onButtonClick",JSType.String,""],["key",JSType.String,""],["commandSourceID",JSType.String,""],["commandName",JSType.String,""],["acceptButtonID",JSType.String,""],["cancelButtonID",JSType.String,""],["activeControlID",JSType.String,""],["showAfterLoad",JSType.Bool,false],["hideAfterAction",JSType.Bool,true],["autoSaveChanges",JSType.Bool,true],["autoReload",JSType.Bool,false],["autoCallBack",JSType.Object,PXCallback.settingsDesc],["callBackMode",JSType.Object,PXCallback.commandDesc]];PXSmartPanel.events={$initialize:0,$beforeShow:1,$afterShow:2,$beforeHide:3,$afterHide:4,$beforeLoad:5,$afterLoad:6};PXSmartPanel.prototype.fireEvent=function(id,ev,$f){switch(id){case "afterShow":this.$0i=true;this.$0j(true);break;case "afterHide":this.$0i=false;this.$0j(false);break;};var $g=this.events.fireEvent(id,ev,$f);switch(id){case "afterHide":this.setVisibleInfo(false);break;};return $g;};PXSmartPanel.prototype.onAfterResize=function($h){if($h)px_cm.notifyOnResize(true,this.element);};PXSmartPanel.prototype.show=function($i){if(this.getVisible()||this.fireEvent("beforeShow"))return;var $j=this.autoCallBack&&this.autoCallBack.enabled;var $k=this.showAfterLoad&&(!this.loaded||$j);if(this.position==2&&this.placeHolderID){var ph=this.$0k,e=this.element;if(ph==null)this.$0k=ph=px.elemByID(this.placeHolderID);if(ph!=null){var es=e.style,ps=ph.currentStyle,$l=ph.offsetHeight;if(!ps)ps=window.getComputedStyle(ph,null);es.position=ps.position;es.top=ps.top;es.left=ps.left;es.width=this.$0l(ph,"width");if(ph.parentNode!=e.parentNode)ph.parentNode.appendChild(e);ph.style.display="none";this.element.style.display="";this.setHeight($l);}}else if(this.position!=0){this.$0m();this.$0n();var $m=window.theForm?theForm:document.body;if(this.element.parentNode!=$m){$m.appendChild(this.element);};var es=this.element.style;es.position="absolute";es.left=es.top="0px";es.zIndex=px_cm.getNextZIndex(this.zIndex?this.zIndex:5000);px_cm.storeActiveDropDown(this);if(this.blockPage){var $n=this.$0o();$n.style.display="";$n.style.zIndex=parseInt(es.zIndex)-1;};if(this.position==3&&$i)px.setDropDownPos($i.element,this.element,2);if(!$k){this.element.style.display="";this.$0p();}}else{if(!$k)this.element.style.display="";};this.viewState.update("DialogVisible",true);this.setVisibleInfo(true);if($i!=null&&$i.ID)this.viewState.update("OwnerID",$i.ID);if(ph==null){this.activePanel=document.activePanel;document.activePanel=this;};this.load();if(!this.loaded||$k)this.$0q=true;else{this.setActiveControl();this.fireEvent("afterShow");}};PXSmartPanel.prototype.load=function(){if(this.innerPageUrl){this.$0r();if(!this.loaded&&!this.fireEvent("beforeLoad")){if(this.pageLoadH==null){this.pageLoadH=Function.createDelegate(this,this.$0s);px.addEventHandler(this.elemContent,"load",this.pageLoadH);};var $o=this.elemContent;if($o.src)$o.contentWindow.location.replace(this.innerPageUrl);else $o.src=this.innerPageUrl;}}else{if(this.loadOnDemand&&!this.loaded){if(!this.fireEvent("beforeLoad")){var $c=Function.createDelegate(this,this.processLoad);PXCallback.execI(this,this.loadCall,"",$c);}}else this.$0r();}};PXSmartPanel.prototype.setActiveControl=function(){var id=this.activeControlID;if(id&&px_all[id]){var $p=px_all[id];if($p.focus)$p.focus();else $p.element.focus();}else{if(this.elemContent.tagName=="IFRAME"){this.elemContent.focus();return;};var $q=["input","button"];for(var j=0;j<$q.length;j++){var ar=this.element.getElementsByTagName($q[j]);if(!ar)continue;for(var i=0;i<ar.length;i++)if(ar[i].offsetParent&&ar[i].offsetHeight&&!ar[i].disabled){ar[i].focus();break;};if(i!=ar.length)break;}}};PXSmartPanel.prototype.hide=function(){if(!this.getVisible()||this.fireEvent("beforeHide"))return;this.element.style.display="none";if(this.$0k){this.$0k.style.display="";px_cm.notifyOnResize();}else if(this.position!=0){if(this.blockPage){var $r=this.$0o();$r.style.display="none";$r.style.height=$r.style.width="1px";};px_cm.restoreActiveDropDown(this);this.$0t();this.$0u();};if(this.autoReload)this.setLoaded(false);document.activePanel=this.activePanel;this.viewState.remove("DialogVisible");this.fireEvent("afterHide");};PXSmartPanel.prototype.getVisible=function(){return this.element.style.display!="none";};PXSmartPanel.prototype.setLoaded=function($s){this.loaded=$s;this.controlsV=null;};PXSmartPanel.prototype.setHeight=function($l){var h=parseInt($l);$l=px.getStyleHeight(this.element,h);if(this.elemCaption)$l-=this.elemCaption.offsetHeight;if(this.contentCell){$l-=(this.contentCell.offsetHeight-this.elemContent.offsetHeight);this.contentCell.style.height=$l+"px";};this.element.style.height=$l+"px";};PXSmartPanel.prototype.setWidth=function($t){var w=parseInt($t);$t=w;this.element.style.width=$t+"px";};PXSmartPanel.prototype.setSize=function($t,$l){this.setWidth($t);this.setHeight($l);};PXSmartPanel.prototype.adjustPageSize=function(){var $u=this.elemContent,$v=this.contentCell;var $w=$u.contentWindow.document.documentElement;var w=$w.scrollWidth+2,h=$w.scrollHeight;var $x=document.documentElement,es=this.element.style;var cw=$x.clientWidth,ch=$x.clientHeight;if((this.element.offsetLeft+w)>cw){var $y=cw-w;es.left=($y>0?$y:0)+"px";};if((this.element.offsetTop+h)>ch){var $z=ch-h;es.top=($z>0?$z:0)+"px";};if($v){$v.style.width=w+"px";$v.style.height=h+"px";};es.width=w+"px";es.height=h+"px";};PXSmartPanel.prototype.getCaption=function(){return this.elemCaption?px.getElemText(this.elemCaption):null;};PXSmartPanel.prototype.setCaption=function(v){if(this.elemCaption){px.setElemText(this.elemCaption,v);if(this.dragManager)this.dragManager.resetPlaceholder();}};PXSmartPanel.prototype.getPageUrl=function(){return this.innerPageUrl;};PXSmartPanel.prototype.setPageUrl=function($A){if(this.innerPageUrl!=$A){this.innerPageUrl=$A;this.loaded=false;if(this.dragManager)this.dragManager.resetPlaceholder();}};PXSmartPanel.prototype.getInnerWindow=function(){return this.elemContent.contentWindow;};PXSmartPanel.prototype.suppressPageChanges=function(){if(this.innerPageUrl){var $B=this.getInnerWindow();if($B)$B.suppressChanges=true;}};PXSmartPanel.prototype.maximize=function(){var $w=document.documentElement;var es=this.element.style;if(this.$0v==null){this.$0v=this.element.offsetWidth;this.$0w=this.element.offsetHeight;};es.left=$w.scrollLeft+"px";es.top=$w.scrollTop+"px";this.setSize($w.clientWidth,$w.clientHeight);this.$0x=true;px_cm.notifyOnResize(true,this.element);};PXSmartPanel.prototype.restore=function(){if(this.$0x){this.setSize(this.$0v,this.$0w);this.$0x=false;delete this.$0v;delete this.$0w;this.$0p(true);px_cm.notifyOnResize(true,this.element);}};PXSmartPanel.prototype.postponeHide=function(){if(this.hideAfterAction){this.$0y();this.$0z=true;return true;};return false;};PXSmartPanel.prototype.$0p=function($C){if(this.position==0)return;var $w=document.documentElement,$D=document.body;var es=this.element.style;var $E=Math.max($w.scrollWidth,$D.scrollWidth);var $F=Math.max($w.scrollHeight,$D.scrollHeight);var $G=$w.clientWidth,$H=$w.clientHeight;if(this.blockPage){var $r=this.$0o();$r.style.width=Math.max($E,$G)+"px";$r.style.height=Math.max($F,$H)+"px";};if(this.$0x){this.maximize();return;};if(this.$0i&&!$C)return;var $I=$w.scrollLeft?$w.scrollLeft:$D.scrollLeft;var $J=$w.scrollTop?$w.scrollTop:$D.scrollTop;switch(this.position){case 1:var $y=$I+($G-this.element.offsetWidth)/2;var $z=$J+($H-this.element.offsetHeight)/2;es.left=($y>0?$y:0)+"px";es.top=($z>0?$z:0)+"px";break;case 2:if(px.IsIE){es.position="absolute";es.left=this.left+$I+"px";es.top=this.top+$J+"px";}else{es.position="fixed";es.left=this.left+"px";es.top=this.top+"px";};break;}};PXSmartPanel.prototype.$0f=function(){this.$0p();};PXSmartPanel.prototype.$0n=function(){var i=0,$K,$L=new Array();for(var j=0;j<PXSmartPanel.$0h.length;j++){$K=this.element.getElementsByTagName(PXSmartPanel.$0h[j]);for(var k=0;k<$K.length;k++){$L[i]=$K[k];i++;}};Array.clear(this.$0a);for(var j=0,i=0;j<PXSmartPanel.$0h.length;j++){$K=document.getElementsByTagName(PXSmartPanel.$0h[j]);for(var k=0;k<$K.length;k++){var $M=$K[k];if(!Array.contains($L,$M)&&$M.tabIndex!=-1&&$M.style.display!="none"){var $N=new Object();$N.tag=$M;$N.index=$M.tabIndex;this.$0a[i]=$N;$M.tabIndex="-1";i++;}}}};PXSmartPanel.prototype.$0t=function(){for(var i=0;i<this.$0a.length;i++)this.$0a[i].tag.tabIndex=this.$0a[i].index;};PXSmartPanel.prototype.$0m=function(){px.addEventHandler(window,'resize',this.$0g);px.addEventHandler(window,'scroll',this.$0e);this.$0A=true;};PXSmartPanel.prototype.$0u=function(){if(this.$0A){px.removeEventHandler(window,'resize',this.$0g);px.removeEventHandler(window,'scroll',this.$0e);}};PXSmartPanel.prototype.$0o=function(){if(!this.$0B){var id=this.ID+"_shdw";var $r=px.elemByID(id);if(!$r){var $r=document.createElement("DIV"),ds=$r.style;$r.id=id;ds.zIndex=9000;ds.position="absolute";ds.top=ds.left="0px";ds.display="none";ds.backgroundColor=this.shadowColor;ds.opacity=this.shadowOpacity/100;ds.filter="alpha(opacity="+this.shadowOpacity+")";var $m=window.theForm?theForm:document.body;$m.appendChild($r);};this.$0B=$r;};return this.$0B;};PXSmartPanel.prototype.$0l=function(e,$O){var style=e.currentStyle;if(style)return style[$O];style=e.style;if(style[$O])return style[$O];if(e.className){var $P=e.className.split(' '),$Q="";for(var i=0;i<$P.length;i++){var $R=px.getCSSRule($P[i]);if($R&&$R.style[$O])$Q=$R.style[$O];};return $Q;}};PXSmartPanel.prototype.$0y=function(){if(!this.$0C){this.$0C=Function.createDelegate(this,this.$0D);PXCallback.addHandler(this.$0C);}};PXSmartPanel.prototype.$0E=function(){if(this.controlsV!=null)return;this.controlsV=new Object();this.controlsD=new Object();for(var name in px_all){var $p=px_all[name];if($p.onVisibleChanged||$p.hasErrorInfo||$p.commitChanges){if(!px.contains(this.element,$p.element))continue;if($p.onVisibleChanged)this.controlsV[name]=$p;if($p.hasErrorInfo||$p.commitChanges)this.controlsD[name]=$p;}}};PXSmartPanel.prototype.$0F=function(){if(this.commandSourceID&&this.commandName){var $S=px_all[this.commandSourceID];if($S&&$S.executeCommand)$S.executeCommand(this.commandName,this.dialogResult);};var $T=this.closeCallback;if($T){this.closeCallback=null;if(PXCallback.exec(this,$T)&&this.hideAfterAction)this.postponeHide();};var $U=this.callbackContext;if($U){$U.info.dialogResult=this.dialogResult;PXCallback.execI(px_all[$U.controlID],$U.info,$U.data,$U.handler,$U.context);delete this.callbackContext;};if(!px.callbackMode&&this.autoSaveChanges){var $V=this.controlsD;for(var id in $V){var $p=$V[id];if($p.commitChanges)$p.commitChanges();}};if(px.callbackMode&&this.hideAfterAction)this.postponeHide();};PXSmartPanel.prototype.$0r=function(){if(this.autoCallBack&&this.autoCallBack.enabled){if(this.showAfterLoad){this.$0G=true;this.$0y();};PXCallback.exec(this,this.autoCallBack);}};PXSmartPanel.prototype.$0j=function($W){if(this.innerPageUrl)return;this.$0E();var $V=this.controlsV;for(var id in $V){var $p=$V[id];if($p.onVisibleChanged)$p.onVisibleChanged($W);}};PXSmartPanel.prototype.setVisibleInfo=function($W){if(!px.SmartPanelVisibleInfo)px.SmartPanelVisibleInfo=new Object();var $X=px.SmartPanelVisibleInfo;$X[this.ID]=$W;var $Y=px.elemByID("__SmartPanelVisible");if($Y){var $Z="";for(name in $X){if($Z.length>0)$Z+="|";$Z+=name+"|"+Boolean($X[name]);};$Y.value=$Z;}};PXSmartPanel.prototype.$0b=function(e){var se=px.eventElem(e);var $00=se?se.getAttribute("mode"):null;if($00){switch($00){case 'c':this.dialogResult=PXDialogResult.None;this.hide();break;case 'm':this.maximize();se.setAttribute("mode",'r');break;case 'r':this.restore();se.setAttribute("mode",'m');break;};px.cancelEvent(e);}};PXSmartPanel.prototype.$0c=function(e,$01){var $02=$01?$01:px.eventObject(e,PXButton);if($02&&$02.getEnabled()&&$02.dialogResult!=PXDialogResult.None){px.cancelEvent(e);this.viewState.update("DialogResult",this.dialogResult=$02.dialogResult);if(!this.hideAfterAction)this.hide();if(this.dialogResult!=PXDialogResult.Cancel){if(this.onButtonClick){var $03=eval(this.onButtonClick);if($03)$03(this,e);};this.$0F();};var $g=this.$0z;if(!$g||(this.flag&&!px.callbackMode)){this.$0z=false;this.hide();}}};PXSmartPanel.prototype.$0s=function(e){this.loadPostProcess(true);if(this.$0k==null){if(this.autoAdjustSize)this.adjustPageSize();this.$0p(true);var $B=this.elemContent.contentWindow;if($B&&$B.px_cm){$B.parentPanel=this;var h=Function.createDelegate(this,this.$0H);$B.px_cm.addPopupHandler(h);$B.px_cm.notifyOnResize();}}};PXSmartPanel.prototype.processLoad=function($04,$05){if(this.autoReload){var ar=$04.split('|');this.setSize(ar[0],ar[1]);$04=ar[2];};if($04)px_cm.processHtmlData($04,this.elemContent);else this.elemContent.innerHTML=$04;var me=this;setTimeout(function(){me.loadPostProcess();},0);};PXSmartPanel.prototype.loadPostProcess=function($06){if(!this.loaded){this.loaded=true;this.fireEvent("afterLoad");};var es=this.element.style;if(es.display=="none"&&this.showAfterLoad){if($06&&this.position>0)es.left=es.top="0px";es.display="";this.$0p();};if(this.$0q&&es.display==""){this.setActiveControl();this.fireEvent("afterShow");};this.$0q=false;if(!$06)px_cm.notifyOnResize(true,this.element);};PXSmartPanel.prototype.$0d=function(e){var $07=null;switch(e.keyCode){case 27:$07=this.cancelButtonID;break;case 13:$07=this.acceptButtonID;break;};if($07&&px_all[$07]){var $02=px_all[$07];this.$0c(e,$02);$02.exec(e);}};PXSmartPanel.prototype.$0D=function($05,$08){if(this.$0z&&!$08){this.$0E();var $V=this.controlsD,$g=true;for(var id in $V){var $p=$V[id];if($p.hasErrorInfo&&$p.hasErrorInfo()){$g=false;break;}};if($g)this.hide();};this.$0z=false;if(this.$0G)this.loadPostProcess(false);this.$0G=false;};PXSmartPanel.prototype.$0H=function($p,$09){if($09=="ClosePopup"){this.hide();this.$0F();}};



function PXTextEdit($a,$b,$c){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b,PXTextEdit.properties);px_cm.registerAutoSize(this,$b);this.elemText=this.getTextElem();if(!this.getEnabled())px.paintDisabled(this.elemText);this.hasFocus=false;this.maxLength=this.elemText.maxLength;this.trange=new PXTextRange(this.elemText);this.attachEventHandlers();this.elemText.object=this;this.events=new PXEventList(this,PXTextEdit.events,$b.clientEvents);this.viewState=new PXStateBag($c?$c:$a.id,"PXText");};PXTextEdit.properties=[["autoPostBack",JSType.Bool,false],["allowNull",JSType.Bool,true],["nullText",JSType.String,""],["required",JSType.Bool,false],["selectOnFocus",JSType.Bool,true],["hideEnterKey",JSType.Bool,false],["bindingContainer",JSType.String,""],["labelID",JSType.String,""],["validateExp",JSType.String,""],["asciiCharSet",JSType.Bool,false],["autoCallBack",JSType.Object,PXCallback.settingsDesc]];PXTextEdit.callbackProps=[["hidden",JSType.Bool,false,px_cm.setHidden],["enabled",JSType.Bool,true,"setEnabled"],["value",JSType.Empty,null,"setValue"]];PXTextEdit.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXTextEdit.callbackProps);};PXTextEdit.events={$initialize:0,$keyDown:1,$keyPress:2,$keyUp:3,$mouseDown:4,$mouseUp:5,$mouseMove:6,$mouseOver:7,$mouseOut:8,$click:9,$focus:10,$blur:11,$valueChanging:12,$valueChanged:13};PXTextEdit.prototype.attachEventHandlers=function(){PXEvent.addBaseHandlers(this.elemText,PXTextEdit.handleEvents);px.addEventHandler(this.elemText,"beforepaste",PXTextEdit.handleEvents,false);px.addEventHandler(this.elemText,"paste",PXTextEdit.handleEvents,false);};PXTextEdit.prototype.detachEventHandlers=function(){PXEvent.removeBaseHandlers(this.elemText,PXTextEdit.handleEvents);px.removeEventHandler(this.elemText,"beforepaste",PXTextEdit.handleEvents,false);px.removeEventHandler(this.elemText,"paste",PXTextEdit.handleEvents,false);};PXTextEdit.prototype.getEnabled=function(){return !this.elemText.disabled;};PXTextEdit.prototype.setEnabled=function($d){if($d!=this.getEnabled()){px.setEnabled(this.elemText,$d,true);this.viewState.update("Enabled",Boolean($d));}};PXTextEdit.prototype.getReadOnly=function(){return this.elemText.readOnly;};PXTextEdit.prototype.setReadOnly=function($e){this.elemText.readOnly=$e;this.viewState.update("ReadOnly",Boolean($e));};PXTextEdit.prototype.getVisible=function(){return this.element.style.display!="none";};PXTextEdit.prototype.setVisible=function($f){if($f!=this.getVisible()){var $g=$f?"":"none";this.element.style.display=$g;if(this.boundImage)this.boundImage.style.display=$g;if(this.labelID){var $h=px.elemByID(this.labelID);if($h)$h.style.display=$g;};this.viewState.update("Visible",Boolean($f));}};PXTextEdit.prototype.focus=function(){try{this.elemText.focus();}catch(e){}};PXTextEdit.prototype.getTextElem=function(){return this.element;};PXTextEdit.prototype.getValue=function($i){if(this.$y===undefined||$i)this.$y=this.validateValue(this.elemText.value);return this.$y;};PXTextEdit.prototype.setValue=function(v){var $j=this.validateValue(v);if(!px.equals($j,this.getValue())){this.$y=this.oldValue=$j;this.repaintText($j);}};PXTextEdit.prototype.repaintText=function(v){if(this.hasFocus)this.elemText.value=this.getEditText(v);else this.elemText.value=this.getDisplayText(v);};PXTextEdit.prototype.getDisplayText=function(v){if(this.allowNull&&v==null)return this.nullText;else return(v!=null)?v.toString():"";};PXTextEdit.prototype.getEditText=function(v){return(v!=null)?v.toString():"";};PXTextEdit.prototype.isNullValue=function(v){var $k=String(v);if(v==null||$k=="")return true;if(this.allowNull&&$k==this.nullText)return true;return false;};PXTextEdit.prototype.select=function($l,$m){if(this.hasFocus&&this.getVisible()){this.trange.select($l,$m);this.selStart=this.trange.selStart;this.selEnd=this.trange.selEnd;}};PXTextEdit.prototype.getSelectedText=function(){var $n=this.trange.getSelectedText();this.selStart=this.trange.selStart;this.selEnd=this.trange.selEnd;return $n;};PXTextEdit.prototype.updateValue=function($j){var $o=($j===undefined)?this.getValue(true):$j;if(!px.equals($o,this.oldValue)){($j!==undefined)?this.setValue($o):this.repaintText($o);var $p=this.fireEvent(12,null);if($p){this.setValue(this.oldValue);return false;};this.oldValue=$o;this.fireEvent(13,null);px_cm.notifyOwnerChanged(this);px_cm.processPostData(this);return true;}};PXTextEdit.prototype.fireEvent=function(id,ev){var $q=new Object();switch(id){case 1:case 2:case 3:if(ev.keyCode)$q["keyCode"]=ev.keyCode;break;case 12:$q["oldValue"]=this.oldValue;$q["value"]=this.getValue();break;case 13:$q["value"]=this.getValue();break;};return this.events.fireEvent(id,ev,$q);};PXTextEdit.prototype.validateValue=function($n){if(this.isNullValue($n)){$n=this.allowNull?null:"";}else if(this.validateExp){var $r=new RegExp(this.validateExp),$s;if(($s=$r.exec($n))!=null)$n=$s[0];else $n=this.allowNull?null:"";};return $n;};PXTextEdit.handleEvents=function(e){if(e==null)if((e=window.event)==null)return;var $a=px.eventElem(e);if($a!=null){var o=$a.object;if(o!=null&&o.handleEvents!=null)o.handleEvents(e)}};PXTextEdit.prototype.onFocus=function(e){};PXTextEdit.prototype.onBlur=function(e){};PXTextEdit.prototype.onKeyDown=function(e){return true;};PXTextEdit.prototype.onKeyPress=function(e){return true;};PXTextEdit.prototype.handleEvents=function(e){var $t=PXEvent.baseEventID(e.type);if(this.fireEvent($t,e)&&$t<10){px.cancelEvent(e);return;};switch(e.type){case "keydown":case "keypress":case "keyup":if(this.elemText.tagName=="INPUT")this.getSelectedText();this.processKey(e,$t);break;case "focus":this.processFocus(e);break;case "blur":this.processBlur(e);break;case "paste":if(window.clipboardData!=null){var $u=clipboardData.getData("Text");var $v=this.processPaste($u);e.returnValue=!$v;};break;case "beforepaste":e.returnValue=false;break;case "selectstart":if(!this.selectOnFocus){px.cancelEvent(e);};break;}};PXTextEdit.prototype.processFocus=function(e){this.hasFocus=true;this.onFocus(e);this.oldValue=this.getValue();var $w=this.getEditText(this.getValue());if(this.oldValue!=$w)this.elemText.value=$w;if(this.selectOnFocus){this.elemText.select();}else if(this.elemText.tagName=="INPUT"){if(px.IsIE)this.select(0);else{var me=this;setTimeout(function(){me.select(0);},0);}};this.getSelectedText();px_cm.notifyOwnerActivate(this);};PXTextEdit.prototype.processBlur=function(e){this.hasFocus=false;this.onBlur(e);this.updateValue();this.elemText.value=this.getDisplayText(this.getValue());};PXTextEdit.prototype.processPaste=function($x){return false;};PXTextEdit.prototype.processKey=function(e,$t){var k=e.key=e.keyCode;switch($t){case 1:this.processKeyDefault(e,$t);if(!this.onKeyDown(e))px.cancelEvent(e);switch(k){case 8:case 46:if(px.IsIE||px.IsSafari){e.key=(k==46)?7:k;if(!this.onKeyPress(e))px.cancelEvent(e);}};break;case 2:if(!e.ctrlKey&&!e.altKey){if(e.which!=null){k=e.key=e.which;if(e.keyCode==46)k=e.key=7;};if(k){if(this.asciiCharSet&&k>127)px.cancelEvent(e);else if(!this.onKeyPress(e))px.cancelEvent(e);}};break;}};PXTextEdit.prototype.processKeyDefault=function(e){var k=e.keyCode?e.keyCode:e.which;switch(k){case 27:px.cancelEvent(e,false);break;case 13:if(this.hideEnterKey)px.cancelEvent(e);else this.updateValue();break;}};



function PXMaskEdit($a,$b){PXMaskEdit.initializeBase(this,[$a,$b]);px_cm.readProperties(this,$b,PXMaskEdit.properties);this.setInputMask($b.inputMask);};PXMaskEdit.__baseType=PXTextEdit;PXMaskEdit.properties=[["promptChar",JSType.String,'_'],["emptyChar",JSType.String,' '],["valueMode",JSType.Int,0]];PXMaskEdit.callbackProps=[["inputMask",JSType.String,"","setInputMask"]];PXMaskEdit.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXMaskEdit.callbackProps);PXMaskEdit.callBase(this,"setProperties",[$b]);};PXMaskEdit.prototype.getValue=function($c){if(this.$J===undefined||$c){var $d=this.$K(this.elemText.value,this.valueMode,1);if($d!==undefined)this.$J=$d;};return this.$J;};PXMaskEdit.prototype.setValue=function(v){var $d=this.$K(v,this.valueMode,this.valueMode);if($d!==undefined){this.$J=this.oldValue=$d;if(this.hasFocus)this.elemText.value=this.getEditText($d);else this.elemText.value=this.getDisplayText($d);}};PXMaskEdit.prototype.initInlineEditor=function($e){this.mask=$e.mask;this.rawMask=$e.rawMask;};PXMaskEdit.prototype.getInputMask=function(){return this.rawMask;};PXMaskEdit.prototype.setInputMask=function($f){if($f==null)$f="";if(this.rawMask==$f)return;var $g=this.mask?this.$K(this.elemText.value,0,1):null;this.mask=PXMaskEdit.encode($f);if($g!=null){this.elemText.value=this.getDisplayValue($g,0);this.$J=undefined;};this.rawMask=$f;this.viewState.update("InputMask",this.rawMask);};PXMaskEdit.prototype.getDisplayValue=function($h,$i,$j){if(this.mask){if($j==null)$j=this.promptChar;return PXMaskEdit.format(this.mask,$h,$j,$i);};return $h;};PXMaskEdit.prototype.getDisplayText=function(v){if(this.allowNull&&v==null)return this.nullText;return this.getDisplayValue(v,this.valueMode,this.emptyChar);};PXMaskEdit.prototype.getEditText=function(v){return this.getDisplayValue(v,this.valueMode);};PXMaskEdit.prototype.$K=function($k,$l,$m){if(this.isNullValue($k))return this.allowNull?null:"";if(!this.mask)return $k;var $n=new RegExp(this.promptChar,"g");$k=$k.toString().replace($n,String.fromCharCode(0));var j=0,c,$o,$p=true,$h="";for(var i=0;i<this.mask.length;i++){if(($o=this.mask.charCodeAt(i))<21){c=null;if(j<$k.length){c=PXMaskEdit.$L($o,$k,j);j++;};$h+=c?c:this.emptyChar;if(c)$p=false;}else{if($m>0&&j<$k.length){if(this.mask.charAt(i)!=$k.charAt(j))return undefined;j++;};if($l>0)$h+=this.mask.charAt(i);}};return $p?(this.allowNull?null:""):$h.trimEnd();};PXMaskEdit.prototype.onKeyPress=function(e){if(!this.mask)return true;var k=e.key;if(k<7||(k>8&&k<32))return;var t=this.elemText.value,i=t.length;var $q=this.selStart,$r=this.selEnd;var $s=this.emptyChar.charCodeAt(0);if($q!=$r){while(--$r>=$q){var ch=this.promptChar;if(this.mask.charCodeAt($r)>=21)ch=this.mask.charAt($r);t=t.substring(0,$r)+ch+t.substring($r+1);};$r++;}else if(k==7||(k==$s)){while($r<i&&this.mask.charCodeAt($r)>=21)$r++;if($r>=i)return;t=t.substring(0,$r)+this.promptChar+t.substring($r+1);$r++;}else if(k==8){while($r>0&&this.mask.charCodeAt($r-1)>=21)$r--;if($r--<1)return;t=t.substring(0,$r)+this.promptChar+t.substring($r+1);};if(k>8&&(k!=$s)&&$r<i){var c=String.fromCharCode(k);var $t=[t];$q=this.insertCharAt($t,c,$r);t=$t[0];if($q<0)return;$r=this.locatePromptPos($q);};this.elemText.value=t;this.select($r);};PXMaskEdit.prototype.processPaste=function($u){if(!this.mask)return true;var $q=this.selStart,$r=this.selEnd;var $v=this.elemText.value;$v=this.clearMaskedContent($v,$q,$r);var $t=[$v];var $w=$q;for(var i=0;i<$u.length;i++){$w=this.insertCharAt($t,($u.charAt(i)),$w);if($w<0||$w>=this.mask.length)break;};this.elemText.value=$t[0];this.select($r>0?$r:$q);return true;};PXMaskEdit.prototype.clearMaskedContent=function($x,$q,$r){if($q==null||$q<0)$q=0;if($r==null||$r>this.mask.length)$r=this.mask.length;if($q>$r){var $y=$r;$r=$q;$q=$y;};if($q!=$r){while(--$r>=$q){var ch=this.promptChar;if(this.mask.charCodeAt($r)>=21)ch=this.mask.charAt($r);$x=$x.substring(0,$r)+ch+$x.substring($r+1);};$r++;};return $x;};PXMaskEdit.prototype.locatePromptPos=function($z,$A){var $B=this.mask.length;while($z>=0&&$z<$B&&this.mask.charCodeAt($z)>=21){if($A)$z--;else $z++;};return $z;};PXMaskEdit.prototype.insertCharAt=function($C,$D,$z){var i=this.mask.length;var $q=$z;var $E=$C[0];if($z<i){if(this.__checkField){var $F=new Object();$F.txt=$E;$q=this.__checkField($D.charCodeAt(0),$D,$E,$z,$F);if($q>=0){$E=$F.txt;$C[0]=$E;return $q;}else return -1;}else{if(this.mask.charCodeAt($q)>=21&&this.mask.charAt($q)==$D)return ++$q;while(this.mask.charCodeAt($q)>=21)if(++$q>=i)return;if(($D=PXMaskEdit.$L(this.mask.charCodeAt($q),$D,0))==null)return -1;$E=$E.substring(0,$q)+$D+$E.substring($q+1);$C[0]=$E;$q++;return $q;}}};PXMaskEdit.format=function($G,$h,$H,$I){if($I==null)$I=0;if($h==null)$h="";var $k="",c,$o,j=0;for(var i=0;i<$G.length;i++){if(($o=$G.charCodeAt(i))<21){c=null;if(j<$h.length){c=PXMaskEdit.$L($o,$h,j);j++;};$k+=c?c:$H;}else{$k+=$G.charAt(i);if($I>0)j++;}};return $k;};PXMaskEdit.encode=function($f){var x,c,up=0,n="",$o=PXMaskEdit.$M;for(var i=0;i<$f.length;i++){c=$f.charAt(i);if((x=$o(c,up))!=0){if(x<0){up=(up==-x)?0:-x;continue;};n+=String.fromCharCode(x);}else if(c=="\\"&&(i+1)<$f.length){c=$f.charAt(i+1);if($o(c,0)!=0){n+=c;i++;}}else n+=c;};return n;};PXMaskEdit.$M=function(c,up){switch(c){case '>':return -1;case '<':return -2;case '&':c=1;break;case 'C':c=2;break;case 'A':c=7;break;case 'a':c=8;break;case 'L':c=13;break;case '?':c=14;break;case '#':case '0':return 19;case '9':return 20;default:return 0;};return c+up*2;};PXMaskEdit.$L=function($o,s,i,sf){if(i>=s.length)return sf;var x=s.charCodeAt(i),c=s.charAt(i);if(x<21)return sf;var f=Math.floor(($o-1)/6);switch(f){case 0:break;case 1:if(x>47&&x<58)return c;case 2:if(x>255||c.toUpperCase()!=c.toLowerCase())break;return sf;case 3:return(x>47&&x<58)?c:sf;};if(($o=Math.floor(($o-1)/2)%3)==0)return c;return($o==2)?c.toLowerCase():c.toUpperCase();};



function PXButtonEdit($a,$b,$c){PXButtonEdit.initializeBase(this,[$a,$b,$c]);px_cm.readProperties(this,$b,PXButtonEdit.properties);this.isSimple=($a.tagName=="INPUT");this.elemFocus=this.getTextElem();this.elemButton=px.elemByID($a.id+"_btn");if(!this.isSimple)this.buttonCell=$a.rows[0].cells[1];if(!this.getEnabled())px.paintDisabled($a,this.elemText);this.attachEventHandlers(true);this.events.appendEvents(PXButtonEdit.events,$b.clientEvents);};PXButtonEdit.properties=[["images",JSType.Object,null],["styles",JSType.Object,null],["commandSourceID",JSType.String,""],["commandName",JSType.String,""],["popupPanel",JSType.String,""],["popupCommand",JSType.Object,PXCallback.settingsDesc],["activeButton",JSType.Bool,false]];PXButtonEdit.__baseType=PXTextEdit;PXButtonEdit.events={$buttonClick:14};PXButtonEdit.prototype.attachEventHandlers=function($d){if(!$d){PXEvent.addBaseHandlers(this.elemText,PXTextEdit.handleEvents);px.addEventHandler(this.elemText,"beforepaste",PXTextEdit.handleEvents,false);px.addEventHandler(this.elemText,"paste",PXTextEdit.handleEvents,false);};if(this.buttonCell){var bh=PXButtonEdit.handleButtonEvents;px.addEventHandler(this.buttonCell,"mousedown",bh);px.addEventHandler(this.buttonCell,"mouseup",bh);px.addEventHandler(this.buttonCell,"mouseover",bh);px.addEventHandler(this.buttonCell,"mouseout",bh);}};PXButtonEdit.prototype.detachEventHandlers=function(){PXEvent.removeBaseHandlers(this.elemText,PXTextEdit.handleEvents);px.removeEventHandler(this.elemText,"beforepaste",PXTextEdit.handleEvents,false);px.removeEventHandler(this.elemText,"paste",PXTextEdit.handleEvents,false);if(this.buttonCell){var bh=PXButtonEdit.handleButtonEvents;px.removeEventHandler(this.buttonCell,"mousedown",bh);px.removeEventHandler(this.buttonCell,"mouseup",bh);px.removeEventHandler(this.buttonCell,"mouseover",bh);px.removeEventHandler(this.buttonCell,"mouseout",bh);}};PXButtonEdit.prototype.setSize=function($e,$f){var w=parseInt($e),h=parseInt($f);if(!this.isSimple){var et=this.elemText,eb=this.elemButton,c2=this.buttonCell;var $g=$e-c2.offsetWidth;et.style.width=px.getStyleWidth(et,$g)+"px";et.style.height=px.getStyleHeight(et,h)+"px";if(eb)eb.style.height=px.getStyleHeight(eb,h)+"px";this.element.style.width=w+"px";this.element.style.height=h+"px";}else{this.elemText.style.width=w+"px";this.elemText.style.height=h+"px";}};PXButtonEdit.prototype.adjustTextSize=function(){if(!this.isSimple){var c1=this.elemText.parentNode,c2=this.buttonCell;var $g=this.element.clientWidth;$g-=c2.offsetWidth+(c1.offsetWidth-px.getStyleWidth(c1));this.elemText.style.width=px.getStyleWidth(this.elemText,$g)+"px";}};PXButtonEdit.prototype.getEnabled=function(){return !this.elemText.disabled;};PXButtonEdit.prototype.setEnabled=function($h){if($h!=this.getEnabled()){px.setEnabled(this.element,$h,true);px.setEnabled(this.elemText,$h,true);this.$p=this.$q=false;this.setButtonStyle();if(this.hasFocus){this.elemText.blur();this.elemText.value=this.getDisplayText(this.getValue());this.hasFocus=false;};this.viewState.update("Enabled",Boolean($h));}};PXButtonEdit.prototype.getTextElem=function(){var $i=px.elemByID(this.element.id+"_text");return $i?$i:this.element;};PXButtonEdit.prototype.setButtonStyle=function(){var st=this.styles,im=this.images;var $j,$k,$l=new Array();if(!this.getEnabled()){if(st)$k=st.disabled;if(im)$j=im.disabled;}else if(this.$q){if(st)$k=st.pushed;if(im)$j=im.pushed;}else if(this.$p){if(st)$k=st.hover;if(im)$j=im.hover;};if(st){if(st.normal)$l.push(st.normal);if($k)$l.push($k);this.buttonCell.className=$l.join(" ");};if(this.elemButton&&im){if(!$j)$j=im.normal;if(this.elemButton.src!=$j)this.elemButton.src=$j;}};PXButtonEdit.handleButtonEvents=function(e){var $m=px.eventObject(e);if($m){if($m.getEnabled()||$m.activeButton)switch(e.type){case "mouseover":$m.$p=true;$m.setButtonStyle();break;case "mouseout":$m.$p=false;$m.setButtonStyle();break;case "mousedown":$m.$q=true;$m.setButtonStyle();if(!$m.fireEvent(14,e))$m.onButtonClick(e);px.cancelEvent(e,false);break;case "mouseup":$m.$q=false;$m.setButtonStyle();break;}}};PXButtonEdit.prototype.onKeyDown=function(e){switch(e.keyCode){case 114:if(!this.fireEvent(14,e))this.onButtonClick(e);return false;};return PXButtonEdit.callBase(this,"onKeyDown",[e]);};PXButtonEdit.prototype.onButtonClick=function(e){if(this.commandSourceID&&this.commandName){var $n=px_all[this.commandSourceID];if($n&&$n.executeCommand){$n.sourceEvent=e;$n.executeCommand(this.commandName,this.commandArgument);}};if(this.popupPanel){var $o=px_all[this.popupPanel];if($o){if(!$o.getVisible()){$o.closeCallback=this.popupCommand;$o.show(this);}else $o.hide();}}};PXButtonEdit.prototype.onFocus=function(e){if(!this.$r){this.adjustTextSize();this.$r=true;}};



function PXDateTimeEdit($a,$b){PXDateTimeEdit.initializeBase(this,[$a,$b]);px_cm.readProperties(this,$b,PXDateTimeEdit.properties);this.mask0=this.$Q(this.editMask,false);this.mask1=this.$Q(this.displayMask,true);this.emptyText=this.mask0.replace(/#/g,this.promptChar);this.century=29;if(this.durationMode)this.timeMode=true;this.elemFocus=this.getTextElem();if($a.tagName=="TABLE"){this.elemButton=px.elemByID($a.id+"_btn");this.buttonCell=$a.rows[0].cells[1];};this.AM=_dateFormatInfo.am?_dateFormatInfo.am:"AM";this.PM=_dateFormatInfo.pm?_dateFormatInfo.pm:"PM";this.yearFix=_dateFormatInfo.yearFix?_dateFormatInfo.yearFix:0;if(this.fullMonth)this.monthNames=_dateFormatInfo.monthNames.split(",");else this.monthNames=_dateFormatInfo.abbrMonthNames.split(",");if(this.fullDOW)this.dowNames=_dateFormatInfo.dayNames.split(",");else this.dowNames=_dateFormatInfo.abbrDayNames.split(",");this.setInputMask(this.mask0);this.attachEventHandlers(true);this.dropCall=PXCallback.createCommand("DropDown",true);if(!this.getEnabled())px.paintDisabled($a,this.elemText);};PXDateTimeEdit.__baseType=PXMaskEdit;PXDateTimeEdit.$R=new Date(1900,0,1);PXDateTimeEdit.$S=new Date(9999,11,31);PXDateTimeEdit.properties=[["editMask",JSType.String,""],["displayMask",JSType.String,""],["minValue",JSType.Date,PXDateTimeEdit.$R],["maxValue",JSType.Date,PXDateTimeEdit.$S],["timeMode",JSType.Bool,false],["durationMode",JSType.Bool,false],["fullDOW",JSType.Bool,false],["fullMonth",JSType.Bool,false],["selectOnFocus",JSType.Bool,false],["images",JSType.Object,null],["dropDownStyles",JSType.Object,null],["maxVisibleItems",JSType.Int,20]];PXDateTimeEdit.callbackProps=[["minValue",JSType.Date,PXDateTimeEdit.$R],["maxValue",JSType.Date,PXDateTimeEdit.$S]];PXDateTimeEdit.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXDateTimeEdit.callbackProps);px_cm.readProperties(this,$b,PXTextEdit.callbackProps);};PXDateTimeEdit.prototype.getTextElem=PXButtonEdit.prototype.getTextElem;PXDateTimeEdit.prototype.adjustTextSize=PXButtonEdit.prototype.adjustTextSize;PXDateTimeEdit.prototype.setSize=PXButtonEdit.prototype.setSize;PXDateTimeEdit.prototype.getEnabled=PXButtonEdit.prototype.getEnabled;PXDateTimeEdit.prototype.setEnabled=PXButtonEdit.prototype.setEnabled;PXDateTimeEdit.prototype.setButtonStyle=PXButtonEdit.prototype.setButtonStyle;PXDateTimeEdit.prototype.attachEventHandlers=PXButtonEdit.prototype.attachEventHandlers;PXDateTimeEdit.prototype.detachEventHandlers=PXButtonEdit.prototype.detachEventHandlers;PXDateTimeEdit.prototype.getValue=function($c){if(this.$T===undefined||$c){var $d=this.$U(this.elemText.value,true);if(!isNaN($d))this.$T=$d;};return this.$T;};PXDateTimeEdit.prototype.setValue=function(v){var $d=this.$V(v);if(!isNaN($d)&&px.equals(this.$W($d),$d)){this.$T=this.oldValue=$d;if(this.hasFocus)this.elemText.value=this.getEditText(this.$T);else this.elemText.value=this.getDisplayText(this.$T);}};PXDateTimeEdit.prototype.getMaxValue=function(){return this.maxValue;};PXDateTimeEdit.prototype.setMaxValue=function(v){var $d=this.$V(v);if(!isNaN($d)&&$d!=this.maxValue){this.maxValue=$d;this.viewState.update("MaxValue",px.getInvariantText($d));this.setValue(this.$W(this.getValue()));}};PXDateTimeEdit.prototype.getMinValue=function(){return this.minValue;};PXDateTimeEdit.prototype.setMinValue=function(v){var $d=this.$V(v);if(!isNaN($d)&&$d!=this.minValue){this.minValue=$d;this.viewState.update("MinValue",px.getInvariantText($d));this.setValue(this.$W(this.getValue()));}};PXDateTimeEdit.prototype.$Q=function(v,$e){if($e){if(this.field1ID==null)this.field1ID=new Array();this.field1ID.length=0;}else{if(this.field0ID==null)this.field0ID=new Array();this.field0ID.length=0;};if(v==null)v="";var x,i,i0=0,$f=-1,t="";for(i=0;i<v.length;i++){x=v.charCodeAt(i);if(x<48||x>57){$f=v.charAt(i);if($e==true&&$f=="\\"&&(i+1)<v.length){if((x=v.charAt(++i))=="\\")continue;if(x=="0"||x=="9")t+=$f;t+=x;}else t+=$f;continue;};$f=(x-48)*10+v.charCodeAt(++i)-48;if($e==true){this.field1ID[i0++]=$f;t+="\x01";}else{this.field0ID[i0++]=$f;if($f==14)t+="L";else if($f==15)t+="LL";else if($f==22)t+="#";else{t+="##";if($f==3)t+="##";while($f-->23)t+="#";}}};return t;};PXDateTimeEdit.prototype.getDisplayText=function(v){if(this.allowNull&&v==null)return this.nullText;return this.$X(v,false);};PXDateTimeEdit.prototype.getEditText=function(v){return this.$X(v,true);};PXDateTimeEdit.prototype.$X=function(d,$g){if(d==null||d=="")return this.getDisplayValue("",1);var t="",$h=$g?this.mask:this.mask1;var $i=$g?this.field0ID:this.field1ID;var c,k,i=-1,f0=0;while(++i<$h.length){c=$h.charAt(i);if((k=$h.charCodeAt(i))<21){t+=this.$Y($i[f0++],d,$g,c);if($g){while((i+1)<$h.length)if($h.charCodeAt(i+1)==k)i++;else break;}}else t+=c;};return $g?this.getDisplayValue(t,1):t;};PXDateTimeEdit.prototype.$U=function(t,$j){var d;if(this.isNullValue(t)||t==this.emptyText){if(this.allowNull)return null;d=new Date();}else{if(t instanceof Date)d=t;else{d=this.$Z(t,this.hasFocus,$j);if(isNaN(d))d=this.$Z(t,!this.hasFocus,$j);}};if(this.timeMode){d.setFullYear(1900);d.setMonth(0);if(!this.durationMode)d.setDate(1);};return $j?this.$W(d):d;};PXDateTimeEdit.prototype.$V=function(t){var d;if(this.isNullValue(t)){if(this.allowNull)return null;d=new Date();}else{if(t instanceof Date)d=t;else{var $k=Date.parse(t);if(!isNaN($k))d=new Date($k);}};if(this.timeMode){d.setFullYear(1900);d.setMonth(0);if(!this.durationMode)d.setDate(1);};return d;};PXDateTimeEdit.prototype.$W=function(d,r){if(!this.timeMode&&d!=null&&!isNaN(d)){var v=d.getTime(),$l=this.minValue,$m=this.maxValue;if($l!=null)$l=$l.getTime();if($m!=null)$m=$m.getTime();if($l!=null&&v<$l){d=new Date($l);};if($m!=null&&v>$m){d=new Date($m);}};return d;};PXDateTimeEdit.prototype.$Z=function(t,$g,$j){var $n=this.$00(t,$g);var v,i0,$o=0,i=-1,$p=$n.length,c;var y=-1,mo=-1,$q=-1,h=-1,m=-1,s=-1,ms=-1,pm=-1;while(++i<$p){v=$n[i];i0=$g?this.field0ID[i]:this.field1ID[i];if(i0<4){if(v>100&&v>this.yearFix)v-=this.yearFix;if(v<0)$o++;else{y=v;c=this.century;if(v<100){if(i0<3&&c<0)c=29;if(c>=0)y+=(v>c)?1900:2000;}}}else if(i0<8){if(v<1||v>12)$o++;else mo=v;}else if(i0<10){if(v<1||v>31)$o++;else $q=v;}else if(i0<14){if(v==24)v=0;if(i0>11)pm=-4;else{if(v==12)v=0;if(v>12)$o++;};if(v>23)$o++;else h=v;}else if(i0<16){if(v>0)pm++;continue;}else if(i0<18){if(v>59)$o++;else m=v;}else if(i0<20){if(v>59)$o++;else s=v;}else if(i0<22){continue;}else{while(i0++<24)v*=10;while(i0-->25)v=Math.floor(v/10);ms=v;}};if(pm==0&&h>=0&&h<12)h+=12;var d=NaN;if($o==0){if(y>0&&mo>0){d=new Date(y,mo-1);if(y<100)d.setFullYear(y);}else d=new Date();if(d!=null){if($q>0)d.setDate($q);d.setHours(h>=0?h:0);d.setMinutes(m>=0?m:0);d.setSeconds(s>=0?s:0);d.setMilliseconds(ms>=0?ms:0);};if($j)d=this.$W(d);};return d;};PXDateTimeEdit.prototype.$01=function(t){if(t==null)t="";var $n=new Array();var x,k,i=-1,v=-1,$r=-1,n=22;while(++i<this.mask.length){if((x=this.mask.charCodeAt(i))>21&&n>21)continue;if(x>21){if($r>=0)$n[$r]=v;}else{if(n>21){v=-1;$r++;};if(i>=t.length)continue;if(x>18){k=t.charCodeAt(i)-48;if(k>=0&&k<=9){if(v<0)v=k;else v=v*10+k;}}else if(n!=x){if(this.PM.charAt(0).toUpperCase()==t.charAt(i).toUpperCase())v=1;}};n=x;};$n[$r]=v;return $n;};PXDateTimeEdit.prototype.$00=function(t,$g){var $i=$g?this.field0ID:this.field1ID;var $p=$i.length;var i=-1,v=-1,$r=0,$n=new Array($p);while(++i<$p)$n[i]=-1;if(t==null)return $n;t=t.toUpperCase();i=-1;while(++i<t.length&&$r<$p){var k=t.charCodeAt(i)-48,j=$i[$r];if(j==20||j==21)j=$i[++$r];if(j==14||j==15){if(k>=0&&k<=9){v=-1;$r++;i--;continue;};if(this.PM.charAt(0).toUpperCase()==t.charAt(i)){$n[$r++]=1;v=-1;}}else if(j==6||j==7){v=-1;while(v-->-3){for(k=0;k<12;k++){var m=this.monthNames[k].toUpperCase();if((j=m.length)<1)continue;if(v==-3){if(j<4)continue;m=m.substring(0,3);};if((j=t.indexOf(m)-1)>-2)if(j<0||t.charAt(j).toLowerCase()==t.charAt(j))break;};if(k<12){$n[$r]=k+1;break;}};$r++;}else{if(k>=0&&k<=9){if(v<0)v=k;else v=v*10+k;}else if(v>=0){$n[$r++]=v;v=-1;}}};if($r<$p)$n[$r]=v;return $n;};PXDateTimeEdit.prototype.$02=function($s,$t){var x,n=22,$r=$t.n0=$t.n1=-1;for(var i=0;i<this.mask.length;i++){if(((x=this.mask.charCodeAt(i))>21)==(n>21))continue;if(x>21){if(i>=$s)break;}else{$t.n0=i;$r++;};n=x;};if($t.n0>=0)$t.n1=i;if(($r=this.field0ID[$r])==null)return -1;if($r<8)return($r<4)?0:1;if($r<20)return Math.floor(($r-4)/2);return($r>21)?8:-1;};PXDateTimeEdit.prototype.$Y=function($r,d,$g,ch){var v,i=($r&1)*2;if($r<4){v=d.getFullYear()+this.yearFix;if($r==3)i=4;else{v%=100;i=($r==2)?2:0;}}else if($r<8){v=d.getMonth()+1;if($r>5){$r=this.monthNames[v-1];if($r.length>0)return $r;}}else if($r<10)v=d.getDate();else if($r<16){v=d.getHours();if($r>13){v=(v<12)?this.AM:this.PM;if(($r-=13)==(i=v.length))return v;if(i<$r)v+=" ";return v.substring(0,$r);};if($r<12){v%=12;if(v==0)v=12;}}else if($r<18)v=d.getMinutes();else if($r<20)v=d.getSeconds();else if($r<22)return this.dowNames[d.getDay()];else{v=d.getMilliseconds();var j=i=$r-21;while(j-->3)v*=10;while(j++<2)v=Math.floor(v/10);};v=v.toString();if($r<20){$r=v.length;if($g){if(i==0)i=2;else $g=false;};if(i>0){if(i<$r)v=v.substring(0,i);else while($r++<i)v=($g?ch:"0")+v;}};return v;};PXDateTimeEdit.prototype.__checkField=function(k,c,t,$s,$u){var i=t.length,$t=new Object();var n=0,v=-1,$r=this.$02($s,$t);if(c==this.mask.charAt($s))return ++$s;if($s>=$t.n1){$s--;if(t.charAt($s)!=this.promptChar)return this.__checkField(k,c,t,$s+2,$u);};if($r<0)return -1;if($r==5){if($s<$t.n1){v=this.PM;if(v.charAt(0).toUpperCase()!=c.toUpperCase())v=this.AM;if($t.n1==($t.n0+1))v=v.charAt(0);else{if((i=v.length)<2)v+=" ";else if(i>2)v=v.substring(0,2);};$u.txt=t.substring(0,$t.n0)+v+t.substring($t.n1);};return $t.n1;};if(k<48||k>57)return -1;k-=48;if($t.n0==$s){v=(t.charAt($s+1)==this.promptChar)?0:(t.charCodeAt($s+1)-48);switch($r){case 4:k--;v-=2;case 3:case 1:if(k>1)n=1;else if(k==1&&v>2)n=2;break;case 2:if(k>3)n=1;else if(k==3&&v>1)n=2;break;case 6:case 7:if(k>6)n=1;else if(k==6&&v>0)n=2;break;}};if(($t.n0+1)==$s){v=(t.charAt($s-1)==this.promptChar)?0:(t.charCodeAt($s-1)-48);switch($r){case 4:v--;k-=2;case 3:case 1:if(v>1||(v==1&&k>2))n=3;break;case 2:if(v>3||(v==3&&k>1))n=3;break;case 6:case 7:if(v>6||(v==6&&k>0))n=3;break;}};if(n==1){t=t.substring(0,$s)+this.promptChar+t.substring($s+1);$s++;};if(n==2)t=t.substring(0,$s+1)+this.promptChar+t.substring($s+2);if(n==3){while(++$s<i)if(this.mask.charCodeAt($s)<21)break;if($s>=i)return -1;return this.__checkField(k+48,c,t,$s,$u);};$u.txt=t.substring(0,$s)+c+t.substring($s+1);return ++$s;};PXDateTimeEdit.prototype.showDropDown=function(){if(this.dropDownOpen||!this.getEnabled())return;px_cm.closeActiveDropDown(this);if(this.sourceID){var $v=px_all[this.sourceID];if($v.dropDown)this.dropDown=$v.dropDown;};if(this.timeMode){if(!this.dropDown)this.$03();px_cm.setDropDownVisible(this,true);px.setDropDownPos(this.element,this.dropDown,2);if(!this.hasFocus)this.focus();PXDropDown.hilightRow(this,this.dropDownStyles,this.$04());return;};if(this.dropDown==null){var $w=PXDateTimeEdit.$05;PXCallback.execI(this,this.dropCall,"",$w);}else{if(!this.calendar)this.$06();this.calendar.$07=this;this.calendar.setSelectedDate(this.getValue(true));px_cm.setDropDownVisible(this,true);if(this.calendar){px.setDropDownPos(this.element,this.dropDown,2);this.calendar.element.style.zIndex=parseInt(this.dropDown.style.zIndex);this.calendar.focus();}}};PXDateTimeEdit.$05=function($x,$y){var $z=px_all[$y];if($x&&$z){var $A=$z.$08()+"_div";var $B=px_cm.processHtmlData($x,$A);if($z.sourceID){var $v=px_all[$z.sourceID];$v.dropDown=$B;};$z.dropDown=$B;setTimeout("PXDateTimeEdit.showDropDown('"+$z.ID+"')",0);}};PXDateTimeEdit.showDropDown=function(id){var $z=px_all[id];if($z)$z.showDropDown();};PXDateTimeEdit.prototype.hideDropDown=function($C){if(!this.dropDown||!this.dropDownOpen)return;try{if($C){var $D=null;if(this.timeMode){var i=(this.currentRow!=null)?this.currentRow.rowIndex:-1;if(i>=0){$D=this.timeItems[i].value;if(this.durationMode){var $E=this.getValue();if($E!=null)$D.setDate($E.getDate());}}}else{$D=this.calendar.getSelectedDate();};if($D)this.updateValue($D);}}finally{px_cm.setDropDownVisible(this,false);}};PXDateTimeEdit.prototype.$06=function(){var $F=this.$08()+"_drop";var $G=this.sourceID?(this.sourceID+"_drop"):null;if(!px_all[$F]){this.calendar=px_cm.createControl("PXCalendar",$F,$G);px_all[$F]=this.calendar;}else this.calendar=px_all[$F];if(!this.calendar.$09){var ev=this.calendar.events;ev.addEventHandler("dayClick",PXDateTimeEdit.$0a);ev.addEventHandler("keyDown",PXDateTimeEdit.$0b);this.calendar.$09=true;}};PXDateTimeEdit.prototype.$08=function(){return this.sourceID?this.sourceID:this.ID;};PXDateTimeEdit.prototype.$03=function(){this.timeItems=new Array();for(var h=0;h<24;h++){var $H=(h==0&&this.durationMode)?15:30;for(var m=0;m<60;m+=$H){var $I=new Object();var $J=new Date(1900,0,1,h,m,0);$I.value=$J;$I.text=this.getDisplayText($J);$I.enabled=true;this.timeItems.push($I);}};PXDropDown.createDropDown(this,this.timeItems,this.dropDownStyles);};PXDateTimeEdit.prototype.$04=function($E){if($E==null)$E=this.getValue();for(var i=0;i<this.timeItems.length;i++){if(px.equals($E,this.timeItems[i].value))return i;};return -1;};PXDateTimeEdit.prototype.processDDEvents=function(e,$K){switch(e.type){case "mouseover":if($K&&($K!=this.currentRow))PXDropDown.hilightRow(this,this.dropDownStyles,$K);break;case "mousedown":this.focus();return px.cancelEvent(e,true);case "mouseup":if($K){this.hideDropDown(true);this.focus();};break;}};PXDateTimeEdit.prototype.executeCallback=function($L,$M){switch($L){case "DropDown":this.showDropDown();break;}};PXDateTimeEdit.prototype.onFocus=function(e){if(!this.$0c){this.adjustTextSize();this.$0c=true;}};PXDateTimeEdit.prototype.onKeyDown=function(e){if(PXDateTimeEdit.callBase(this,"onKeyDown",[e])){switch(e.key){case PX.key_down:case PX.key_F3:if(!this.timeMode&&(e.key==PX.key_F3||e.altKey)){this.onButtonClick();if(px.IsIE)e.keyCode=0;return false;};break;}};return true;};PXDateTimeEdit.prototype.onButtonClick=function(e){if(this.dropDownOpen){this.hideDropDown();this.focus();}else this.showDropDown();};PXDateTimeEdit.$0d=function(){var $B=document.dropDownElem;if($B){var $z=px_all[$B.getAttribute("controlID")];if($z!=null)$z.hideDropDown(true);}};PXDateTimeEdit.$0a=function($N,ev){var $O=$N.$07;if($O){var $P=300;setTimeout(function(){PXDateTimeEdit.$0d();},$P);setTimeout("PX.selectElement('"+$O.elemText.id+"', 1)",$P+1);}};PXDateTimeEdit.$0b=function($N,ev){var $O=null;switch(ev.key){case 13:$O=$N.$07;if($O)$O.hideDropDown(true);break;case 27:$O=$N.$07;if($O)$O.hideDropDown();break;};if($O){setTimeout("PX.selectElement('"+$O.elemText.id+"', 1)",10);ev.cancel=true;}};PX.key_down=40;PX.key_F3=114;


function PXNumberEdit($a,$b){PXNumberEdit.initializeBase(this,[$a,$b]);px_cm.readProperties(this,$b,PXNumberEdit.properties);this.minusSymbol=_numbFormatInfo.negativeSign;this.dotSymbol=".";this.decimalSeparator=_numbFormatInfo.number.decimalSeparator;this.groupSeparator=_numbFormatInfo.number.groupSeparator;};PXNumberEdit.__baseType=PXTextEdit;PXNumberEdit.$x=-999999999999;PXNumberEdit.$y=999999999999;PXNumberEdit.properties=[["decimals",JSType.Int,0],["minValue",JSType.Float,PXNumberEdit.$x],["maxValue",JSType.Float,PXNumberEdit.$y],["valueType",JSType.Int,9]];PXNumberEdit.callbackProps=[["decimals",JSType.Int,0],["minValue",JSType.Float,PXNumberEdit.$x],["maxValue",JSType.Float,PXNumberEdit.$y]];PXNumberEdit.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXNumberEdit.callbackProps);PXNumberEdit.callBase(this,"setProperties",[$b]);};PXNumberEdit.prototype.getValue=function($c){if(this.$z===undefined||$c){var $d=this.$A(this.elemText.value,true);if(!isNaN($d))this.$z=$d;};return this.$z;};PXNumberEdit.prototype.setValue=function(v){var $d=this.$A(v,true);if(!isNaN($d)){this.$z=this.oldValue=$d;if(this.hasFocus)this.elemText.value=this.getEditText(this.$z);else this.elemText.value=this.getDisplayText(this.$z);}};PXNumberEdit.prototype.initInlineEditor=function($e){this.decimals=$e.decimals;this.maxValue=$e.maxValue;this.minValue=$e.minValue;};PXNumberEdit.prototype.getMaxValue=function(){return this.maxValue;};PXNumberEdit.prototype.setMaxValue=function(v){var $d=this.$A(v,false);if(!isNaN($d)&&$d!=this.maxValue){this.maxValue=$d;var $f=this.$B(this.getValue());if(this.getValue()!=$f)this.setValue($f);}};PXNumberEdit.prototype.getMinValue=function(){return this.minValue;};PXNumberEdit.prototype.setMinValue=function(v){var $d=this.$A(v,false);if(!isNaN($d)&&$d!=this.minValue){this.minValue=$d;var $f=this.$B(this.getValue());if(this.getValue()!=$f)this.setValue($f);}};PXNumberEdit.prototype.$A=function(t,$g){var $h;if(this.isNullValue(t)){if(this.allowNull)return null;$h=0;}else{switch(typeof t){case "number":$h=t;break;case "boolean":$h=Number(t);break;default:$h=this.$C(t);break;}};return $g?this.$B($h):$h;};PXNumberEdit.prototype.$C=function($i){var $h=0.0;$i=$i.replace(/\s/g,'');$i=$i.toString().replace(new RegExp(this.groupSeparator,"g"),"");$i=$i.replace(this.decimalSeparator,this.dotSymbol);$h=parseFloat($i);return isNaN($h)?$h:Number($h.toFixed(this.decimals));};PXNumberEdit.prototype.getEditText=function(v){if(this.allowNull&&v==null)return "";try{var t=v.toFixed(this.decimals);}catch(ex){t=(0).toFixed(this.decimals);};return t.replace(this.dotSymbol,this.decimalSeparator);};PXNumberEdit.prototype.getDisplayText=function(v){if(this.allowNull&&v==null)return this.nullText;var t=this.getEditText(v);if(this.decimals>0){var i=t.indexOf(this.decimalSeparator);if(i<0)i=t.length;var g=3,$j=(v<0)?1:0;while(--i>$j)if(--g==0){t=t.substring(0,i)+this.groupSeparator+t.substring(i);g=3;}};return t;};PXNumberEdit.prototype.$B=function(v){if(v!=null&&!isNaN(v)){var $k=this.minValue,$l=this.maxValue;if($k!=null&&v<$k)return $k;if($l!=null&&v>$l)return $l;};return v;};PXNumberEdit.prototype.$D=function(k){return k==this.minusSymbol.charCodeAt(0)||k==45;};PXNumberEdit.prototype.onKeyPress=function(e){var k=e.key;if(k<7||(k>8&&k<32))return;var t=this.elemText.value,i=t.length;var $m=this.selStart,$n=this.selEnd;if($m!=$n){t=t.substring(0,$m)+t.substring($n);$n=$m;i=t.length;}else if(k==7||k==8){return true;};if(k>8&&(this.maxLength<=0||this.maxLength>i)){var $o=(k==this.decimalSeparator.charCodeAt(0));var ok=px.isDigit(k)||($o&&this.decimals>0)||($m==0&&this.$D(k)&&this.minValue<0);if(!ok)return;if(i>0&&$m==0)if(this.$D(t.charCodeAt(0)))return;var $p=t.indexOf(this.decimalSeparator),$q=false;if($o){if($p>=0){if($p==$m||$p==($m-1))return;i--;if($p<$m)$m=--$n;t=t.substring(0,$p)+t.substring($p+1);};if((i-$m)>this.decimals)return;}else if(this.decimals>0&&$p>=0){var $r=i-$p-1;if($r==this.decimals&&$m>$p)$q=true;};var c=String.fromCharCode(k);if($n>=i){if($q)t=t.substring(0,i-1);t+=c;}else{var $s=$q?($n+1):$n;t=t.substring(0,$m)+c+t.substring($s);}};this.elemText.value=t;this.select($n+1);};PXNumberEdit.prototype.processPaste=function($t){var t=$t;var $u=this.elemText.value;var $v=new String($u);var $m=this.selStart,$n=this.selEnd;t=t.toString().replace(new RegExp(this.groupSeparator,"g"),"");t=t.toString().replace(new RegExp(" ","g"),"");t=t.toString().replace(new RegExp("\s","g"),"");t=t.toString().replace(this.decimalSeparator,this.dotSymbol);t=t.toString().replace(/\+/,"");var $s=t.search(/[^0-9.\-]/);if($s>=0)return true;if($m!=0&&t.search(/[\-\+]/)>=0)return true;if($m>=0)$u=$u.substring(0,$m)+t+$u.substring($n);else $u=t;var $w=this.$C($u);if(!isNaN($w)&&(this.$B($w)===$w)){this.elemText.value=this.getEditText($w);}else{this.elemText.value=$v;};return true;};



function PXLinkEdit($a,$b){PXLinkEdit.initializeBase(this,[$a,$b]);px_cm.readProperties(this,$b,PXLinkEdit.properties);this.validateExp="(http://|https://)?(www\\.)?[\\w-]+(\\.[\\w-]+)+(/[\\w-]+)*"+"(\\.(html|htm|cgi|php|aspx|asp))?";};PXLinkEdit.__baseType=PXButtonEdit;PXLinkEdit.properties=[["target",JSType.String,""]];PXLinkEdit.prototype.onButtonClick=function(e){this.updateValue();this.elemText.value=this.getDisplayText(this.getValue());var $c=this.getValue();if($c){if($c.indexOf("://")<0){if($c.startsWith("/"))$c=$c.substring(1);$c="http://"+$c;};px.openUrl($c,this.target?this.target:"_blank");}};



function PXMailEdit($a,$b){PXMailEdit.initializeBase(this,[$a,$b]);this.validateExp="[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+){1,3\x7d";};PXMailEdit.__baseType=PXButtonEdit;PXMailEdit.prototype.onButtonClick=function(e){this.updateValue();this.elemText.value=this.getDisplayText(this.getValue());var $c=this.getValue();if($c){if(this.frame==null){this.frame=document.createElement("iframe");this.frame.style.display="none";document.body.appendChild(this.frame);};try{this.frame.src="mailto:"+$c;}catch(ex){}}};



function PXDropDown($a,$b){PXDropDown.initializeBase(this,[$a,$b]);if(this.items==null)this.items=new Array();this.element=$a;this.elemText=this.elemFocus=px.elemByID($a.id+"_text");if(!this.getEnabled())px.paintDisabled($a,this.elemText);var $c=$a.rows[0].cells,$d=$c.length;if($d>1)this.elemButton=$c[1].firstChild;if($d>2)this.elemEdit=$c[2].firstChild;px_cm.readProperties(this,$b);this.currentRow=null;this.$0x=null;this.$0y=false;this.hasDisabledItems=false;this.dropDown=null;this.ddTable=null;this.$0z=false;this.$0A="";this.$0B=null;this.caseSensSearch=false;this.$0C=false;this.events.appendEvents(PXDropDown.events,$b.clientEvents);this.attachEventHandlers(true);this.$0D();};PXDropDown.__baseType=PXTextEdit;PXDropDown.invalidItemText="";PXDropDown.dropDownItemDesc=[["value",JSType.String,""],["text",JSType.String,""],["enabled",JSType.Bool,true],["imageUrl",JSType.String,""]];PXDropDown.properties=[["selectedIndex",JSType.Int,0],["dropDownWidth ",JSType.Int,100],["searchTimeoutMS",JSType.Int,1000],["nullText",JSType.String,""],["allowNull",JSType.Bool,true],["required",JSType.Bool,false],["allowEdit",JSType.Bool,false],["maxVisibleItems",JSType.Int,20],["allowFocus",JSType.Bool,true],["valueType",JSType.Int,9],["bindingContainer",JSType.String,""],["images",JSType.Object,null],["imagesE",JSType.Object,null],["styles",JSType.Object,null],["autoCallBack",JSType.Object,PXCallback.settingsDesc],["items",JSType.Array,PXDropDown.dropDownItemDesc]];PXDropDown.callbackProps=[["items",JSType.Empty,null,"setItems"]];PXDropDown.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXDropDown.callbackProps);PXDropDown.callBase(this,"setProperties",[$b]);};PXDropDown.events={$selectionChanging:14,$selectionChanged:15,$showDropDown:16,$editButtonClick:17};PXDropDown.prototype.initInlineEditor=function($e){this.items=$e.items;};PXDropDown.prototype.attachEventHandlers=function($f){if(!$f)PXEvent.addBaseHandlers(this.elemText,PXTextEdit.handleEvents);PXDropDown.attachDDEventHandlers(this);var bh=PXDropDown.$0E;if(this.elemButton)this.attachButtonEvents(this.elemButton,bh);if(this.elemEdit)this.attachButtonEvents(this.elemEdit,bh);};PXDropDown.prototype.detachEventHandlers=function(){PXEvent.removeBaseHandlers(this.elemText,PXTextEdit.handleEvents);PXDropDown.detachDDEventHandlers(this);var bh=PXDropDown.$0E;if(this.elemButton)this.detachButtonEvents(this.elemButton,bh);if(this.elemEdit)this.detachButtonEvents(this.elemEdit,bh);};PXDropDown.prototype.attachButtonEvents=function($a,h){px.addEventHandler($a,"mousedown",h);px.addEventHandler($a,"mouseup",h);px.addEventHandler($a,"mouseover",h);px.addEventHandler($a,"mouseout",h);};PXDropDown.prototype.detachButtonEvents=function($a,h){px.removeEventHandler($a,"mousedown",h);px.removeEventHandler($a,"mouseup",h);px.removeEventHandler($a,"mouseover",h);px.removeEventHandler($a,"mouseout",h);};PXDropDown.attachDDEventHandlers=function($g,$h){var $i=$g.ddTable,$h=PXDropDown.$0F;if($i){px.addEventHandler($i,"mousedown",$h);px.addEventHandler($i,"mouseup",$h);px.addEventHandler($i,"mouseout",$h);px.addEventHandler($i,"mouseover",$h);px.addEventHandler($i,"selectstart",$h);px.addEventHandler($i,"contextmenu",$h);}};PXDropDown.detachDDEventHandlers=function($g,$h){var $i=$g.ddTable,$h=PXDropDown.$0F;if($g.ddTable){px.removeEventHandler($i,"mousedown",$h);px.removeEventHandler($i,"mouseup",$h);px.removeEventHandler($i,"mouseout",$h);px.removeEventHandler($i,"mouseover",$h);px.removeEventHandler($i,"selectstart",$h);px.removeEventHandler($i,"contextmenu",$h);}};PXDropDown.prototype.getEnabled=function(){return !this.elemText.disabled;};PXDropDown.prototype.setEnabled=function($j){if($j!=this.getEnabled()){px.setEnabled(this.element,$j,true);px.setEnabled(this.elemText,$j,true);if(this.elemButton){var $k=$j?this.images.normal:this.images.disabled;this.elemButton.src=$k?$k:this.images.normal;};this.viewState.update("Enabled",Boolean($j));}};PXDropDown.prototype.setAllowEdit=function($l){this.allowEdit=$l;this.elemText.readOnly=!$l;};PXDropDown.prototype.getTextElem=function(){return px.elemByID(this.element.id+"_text");};PXDropDown.prototype.hasSelection=function(){return this.items!=undefined&&(this.selectedIndex>=0&&this.selectedIndex<this.items.length);};PXDropDown.prototype.focus=function(){if(this.allowFocus)PXDropDown.callBase(this,"focus");};PXDropDown.prototype.setSize=function(wd,ht){var w=parseInt(wd),h=parseInt(ht),et=this.elemText;var $m=[this.elemButton,this.elemEdit];var $n=w,$c=this.element.rows[0].cells;for(var i=1;i<$c.length;i++)$n-=$c[i].offsetWidth;et.style.width=px.getStyleWidth(et,$n)+"px";et.style.height=px.getStyleHeight(et,h)+"px";for(var i=0;i<$m.length;i++){var $o=$m[i];if($o)$o.style.height=px.getStyleHeight($o,h)+"px";};this.element.style.width=w+"px";this.element.style.height=h+"px";};PXDropDown.prototype.adjustTextSize=function(){var $n=this.element.clientWidth,et=this.elemText;var $m=[this.elemButton,this.elemEdit];for(var i=0;i<$m.length;i++){if($m[i]==null)continue;$n-=$m[i].parentNode.offsetWidth;};var $p=this.elemText.parentNode;$n-=$p.offsetWidth-px.getStyleWidth($p);if($n>0){et.style.width=px.getStyleWidth(et,$n)+"px";return true;};return false;};PXDropDown.prototype.getDisplayText=function(v){if(this.allowEdit&&!this.hasSelection())return this.elemText.value;return this.$0G(this.$0H(v));};PXDropDown.prototype.getEditText=function(v){return this.getDisplayText(v);};PXDropDown.prototype.getValue=function(){var $q=this.hasSelection();if(this.allowEdit&&!$q){return this.elemText.value;}else{if(!$q)return null;return this.items[this.selectedIndex].value;}};PXDropDown.prototype.setValue=function(v){if(v==null){this.setNull();return;};var $r=this.$0H(v);if($r!=undefined&&this.items[$r].enabled){if(this.dropDownOpen){this.$0I(this.$0J(this.selectedIndex),false);this.$0I(this.$0J($r),true);};this.selectedIndex=$r;this.$0D();this.$0K();}else if(this.allowEdit){this.elemText.value=(v!=null)?v.toString():"";this.selectedIndex=-1;};this.oldValue=this.getValue();};PXDropDown.prototype.$0H=function($s){if(this.items!=undefined){for(var $r=0;$r<this.items.length;$r++){var $t=this.items[$r];if($t.value==$s)break;};if($r<this.items.length)return $r;};return null;};PXDropDown.prototype.setNull=function($u){if(!this.allowNull)return false;var $v=this.selectedIndex;if($u){if($v!=undefined&&$v!=PXDropDown.$0L){if(this.onSelectionChanging($v,this.selectedIndex))return false;if(this.fireEvent(12,null))return false;}};this.selectedIndex=PXDropDown.$0L;this.$0D();this.$0K();var $w=this.$0J($v);this.$0I($w,false);if($u){this.onSelectionChanged($v,this.selectedIndex);this.fireEvent(13,null);};this.oldValue=this.getValue();return true;};PXDropDown.$0L=-1;PXDropDown.prototype.addItem=function($x){var $r=this.$0H($x.value);var $y=true;if($r!=null){$y=!(PXDropDown.compareItems(this.items[$r],$x));this.items[$r]=$x;}else{$r=this.items.length;this.items[$r]=$x;};if(this.dropDown&&$y)this.$0M();return $r;};PXDropDown.prototype.addItemByValues=function($z,$A,$B,$C){var $t=new Object();$t.value=$z;$t.text=$A;$t.enabled=($B==undefined)?true:$B;$t.imageUrl=($C==undefined)?"":$C;return this.addItem($t);};PXDropDown.prototype.enableItem=function($z,$D){var $r=this.$0H($z);var $y=false;if($r!=null){$y=(this.items[$r].enabled!=$D);this.items[$r].enabled=$D;if(($r==this.selectedIndex)&&(!$D)){this.selectedIndex=PXDropDown.$0L;this.$0D();}};if(this.dropDown&&$y)this.$0M();};PXDropDown.prototype.removeItem=function($z){var $r=this.$0H($z);var $y=false;if($r!=null){this.items.splice($r,1);if($r==this.selectedIndex){if(this.allowNull){this.setNull();}else{this.selectedIndex=0;this.$0D();this.$0K();}};$y=true;};if(this.dropDown&&$y)this.$0M();};PXDropDown.prototype.setItems=function($E){if($E!=undefined){var $y=false;if(typeof($E)=="string"){var $F=$E.split(";"),$G=new Array($F.length);for(var i=0;i<$F.length;i++){$G[i]=new Object();PXDropDown.parseItem($G[i],$F[i]);};if(this.items!=undefined&&(this.items.length==$G.length)){for(var j=0;j<$G.length;j++){if(!PXDropDown.compareItems(this.items[j],$G[j])){$y=true;break;}}}else $y=true;}else if($E instanceof Array){$y=true;$G=$E;};if($y){this.items=$G;this.setValue(this.getValue());if(this.dropDown){this.$0M();this.$0N();}}}};PXDropDown.parseItem=function($x,$H){var $I="|";var $F=$H.split($I);$x.value=($F.length>0)?$F[0]:"";$x.text=($F.length>1)?$F[1]:$x.value;$x.enabled=($F.length>2)?Boolean($F[2]):true;$x.imageUrl=($F.length>3)?$F[3]:"";};PXDropDown.compareItems=function($J,$K){if($J.value!==$K.value)return false;if($J.text!==$K.text)return false;if($J.imageURL!==$K.imageURL)return false;if(Boolean($J.enabled)!=Boolean($K.enabled))return false;return true;};PXDropDown.prototype.showDropDown=function(){if(this.items.length==0||this.fireEvent(16,null))return;px_cm.closeActiveDropDown(this);this.$0O();this.$0C=true;if(!this.dropDown)this.$0P();var $L=this.$0J(this.selectedIndex);px_cm.setDropDownVisible(this,true);px.setDropDownPos(this.element,this.dropDown,2);this.$0Q($L);if(!this.hasFocus)this.focus();PXDropDown.$0R=this;setTimeout(function(){PXDropDown.$0S();},50);};PXDropDown.$0R=null;PXDropDown.$0S=function(){var $M=PXDropDown.$0R;$M.$0C=false;PXDropDown.$0R=null;};PXDropDown.prototype.hideDropDown=function(){this.$0O();px_cm.setDropDownVisible(this,false);this.$0Q(null);};PXDropDown.prototype.filterInlineKey=function(e){var k=e.keyCode?e.keyCode:e.which;if(this.inlineEditor==true){switch(k){case PX.key_esc:case PX.key_enter:if(this.dropDownOpen)return true;break;case PX.key_del:case PX.key_backspace:case PX.key_up:case PX.key_down:return true;break;}};return false;};PXDropDown.prototype.selectRow=function($N,$O){var $P=this.$0T($N);if($P==undefined||$P<0||$P>=this.items.length){if($O)this.hideDropDown();return false;};var $v=this.selectedIndex;if($v!=undefined&&$v===$P){if($O)this.hideDropDown();return true;};var $Q=new Object();$Q.oldIndex=$v;$Q.newIndex=$P;var $R=this.fireEvent(14,null,$Q);if($R==true){this.hideDropDown();return;};var $S=this.fireEvent(12,null,$Q);if($S==true){this.hideDropDown();return;};var $w=this.$0J($v);this.$0I($w,false);if(this.ddTable!=undefined&&$N>=0){var $T=this.ddTable.rows[$N];this.$0Q($T);};this.selectedIndex=$P;this.$0D();this.$0K();if($O)this.hideDropDown();this.oldValue=this.getValue();this.fireEvent(15,null,$Q);this.fireEvent(13,null);px_cm.notifyOwnerChanged(this);px_cm.processPostData(this);return true;};PXDropDown.prototype.onSelectionChanged=function($v,$U){var $Q=new Object();$Q.oldIndex=$v;$Q.newIndex=$U;this.fireEvent(15,null,$Q);};PXDropDown.prototype.onSelectionChanging=function($v,$U){var $Q=new Object();$Q["oldIndex"]=$v;$Q["newIndex"]=$U;var $V=this.fireEvent(14,null,$Q);return $V;};PXDropDown.prototype.$0T=function($N){if(!this.hasDisabledItems)return $N;var $W=-1;for(var i=0;i<this.items.length;i++){if(this.items[i].enabled)$W++;if($W>=$N)break;};return($W==$N)?i:-1;};PXDropDown.prototype.$0U=function($X){if(!this.hasDisabledItems||$X==undefined)return $X;var $W=-1;if($X<0||$X>=this.items.length)return -1;if(!(this.items[$X].enabled))return -1;for(var i=0;i<=$X;i++){if(this.items[i].enabled)$W++;};return $W;};PXDropDown.prototype.$0J=function($Y){var $Z=this.$0U($Y);var $T=null;if(this.ddTable!=undefined&&$Z!=undefined&&$Z>=0)$T=this.ddTable.rows[$Z];return $T;};PXDropDown.prototype.$0V=function($00){var $01=this.$0U(this.selectedIndex);if($01==undefined||$01<0){$01=0;}else{$01=$00?($01-1):($01+1);};if($01>=0)this.selectRow($01,false);};PXDropDown.prototype.$0K=function(){var $02=this.$0G(this.selectedIndex);this.elemText.value=$02;if(this.hasFocus)this.elemText.select();};PXDropDown.prototype.$0G=function($r){if($r!=null&&$r>=0&&$r<this.items.length){return this.items[$r].text?this.items[$r].text:this.items[$r].value;}else{return this.allowNull?this.nullText:PXDropDown.invalidItemText;}};PXDropDown.createDropDown=function($g,$E,$03){var $04=PX.createElement("div",theForm);var $05=PX.createElement("table",$04);$05.id=$g.ID+"_dd";$g.ddTable=$05;$g.dropDown=$04;$05.cellSpacing=0;$05.cellPadding=0;$04.className=$03.dropDown;$04.style.position="absolute";$04.style.overflow="auto";$04.object=$g;PXDropDown.fillDropDown($g,$E,$03);PXDropDown.attachDDEventHandlers($g);PXDropDown.setDropDownSize($g);};PXDropDown.prototype.$0P=function(){PXDropDown.createDropDown(this,this.items,this.styles);};PXDropDown.setDropDownSize=function($g){var scroll=false,$04=$g.dropDown,$05=$g.ddTable;$04.style.top=$04.style.left="-999px";$04.style.display="";if($g.maxVisibleItems>0&&$05.rows.length>0){var $06=$05.rows[0].offsetHeight*$g.maxVisibleItems;if($06<$05.offsetHeight){$04.style.height=$06+"px";$04.style.width=($05.offsetWidth+17)+"px";scroll=true;}else{$04.style.width=$04.style.height="";}};var ew=$g.element.offsetWidth;if(ew>$05.offsetWidth){var $07=scroll?17:0;$05.style.width=px.getStyleWidth($04,ew)-$07+"px";$04.style.width=$05.offsetWidth+$07+"px";};$04.style.display="none";};PXDropDown.prototype.$0N=function(){PXDropDown.setDropDownSize(this);};PXDropDown.fillDropDown=function($g,$E,$03){if($E==null)return;var $05=$g.ddTable,$T=null;var $p=null,$08=false;while($05.rows.length>0)$05.deleteRow(-1);var $09=0;for(var i=0;i<$E.length;i++){var $t=$E[i];if(!$t.enabled)continue;$T=$05.insertRow($09);var $02=$t.text?$t.text:$t.value;var $0a=$T.insertCell(0);if($t.imageUrl!=undefined&&$t.imageUrl.length>0){var $0b=PX.createElement("img",$0a);$0b.src=$t.imageUrl;$0b.align="left";$0b.style.marginRight="5px";};$0a.style.textAlign="left";$0a.style.whiteSpace="nowrap";$0a.className=$03.item;if($02=="")$0a.innerHTML="&nbsp;";else px.setElemText($0a,$02,true);$09++;};$g.hasDisabledItems=($09<$E.length);};PXDropDown.prototype.$0M=function(){PXDropDown.fillDropDown(this,this.items,this.styles);};PXDropDown.hilightRow=function($g,$03,$T){if(typeof $T=="number"){var $0c=$g.ddTable.rows;if($T>=0&&$T<$0c.length)$T=$0c[$T];else $T=null;};if($T){if($g.currentRow!=null)PXDropDown.markSelected($g,$03,$g.currentRow,false);$g.currentRow=$T;PXDropDown.markSelected($g,$03,$T,true);}};PXDropDown.prototype.$0Q=function($T){PXDropDown.hilightRow(this,this.styles,$T);};PXDropDown.markSelected=function($g,$03,$T,on){if($T==null||$T.cells==null)return;var $p=($T.cells.length>0)?$T.cells[0]:null;if($p!=null){var $0d=$03.selection,$0e=$03.item;$p.className=on?($0d+" "+$0e):$0e;if(on)px.scrollToView($g.dropDown,$p);}};PXDropDown.prototype.$0I=function($T,on){PXDropDown.markSelected(this,this.styles,$T,on);};PXDropDown.$0E=function(e){var $0f=px.eventObject(e,PXDropDown),$0g=px.eventElem(e);if($0f&&$0g){var $0h=($0g==$0f.elemButton),$0i=($0g==$0f.elemEdit);var $0j=$0i?$0f.imagesE:$0f.images;if($0f.getEnabled()||$0i)switch(e.type){case "mouseover":$0g.$0W=true;if($0j.hover)$0g.src=$0j.hover;break;case "mouseout":$0g.$0W=false;if($0j.hover)$0g.src=$0j.normal;break;case "mousedown":if($0j.pushed)$0g.src=$0j.pushed;if($0h){if($0f.dropDownOpen){$0f.hideDropDown();setTimeout("PX.setFocus('"+$0f.ID+"')",1);}else{$0f.showDropDown();PXDropDown.$0X(true,$0f);setTimeout("PX.setFocus('"+$0f.ID+"')",1);}}else{$0f.fireEvent(17,e);};px.cancelEvent(e,false);break;case "mouseup":if($0j.pushed)$0g.src=$0g.$0W?$0j.hover:$0j.normal;break;}}};PX.setFocus=function(id){var $0k=px_all[id];if($0k)$0k.focus();};PXDropDown.$0F=function(e){var $0f=px.eventObject(e);if($0f){if($0f.getEnabled())switch(e.type){case "selectstart":case "contextmenu":return px.cancelEvent(e,false);case "mouseover":case "mouseout":case "mouseup":case "mousedown":var $T=PXDropDown.$0Y(px.eventElem(e));$0f.processDDEvents(e,$T);break;}}};PXDropDown.prototype.fireEvent=function($0l,ev,$0m){if($0m==undefined)$0m=new Object();switch($0l){case 1:case 2:case 3:if(ev.keyCode)$0m["keyCode"]=ev.keyCode;break;case 12:$0m["oldValue"]=this.oldValue;$0m["value"]=this.getValue();break;case 13:$0m["value"]=this.getValue();break;};return this.events.fireEvent($0l,ev,$0m);};PXDropDown.prototype.processDDEvents=function(e,$T){switch(e.type){case "mouseover":if(!this.$0C&&$T&&($T!==this.currentRow))this.$0Q($T);break;case "mousedown":this.$0O();this.focus();return px.cancelEvent(e);case "mouseup":if($T){this.selectRow($T.rowIndex,true);this.focus();};break;}};PXDropDown.prototype.onKeyDown=function(e){var k=e.keyCode?e.keyCode:e.which;var $0n=e.altKey;switch(k){case PX.key_esc:if(this.dropDownOpen){this.hideDropDown();px.cancelEvent(e,false);};return true;case PX.key_tab:case PX.key_enter:if(this.dropDownOpen){this.hideDropDown();px.cancelEvent(e);}else{if(k==PX.key_enter){if(this.hideEnterKey)px.cancelEvent(e);else this.updateValue();}};return true;case PX.key_up:case PX.key_down:if($0n){if(this.dropDownOpen)this.hideDropDown();else this.showDropDown();px.cancelEvent(e,false);return false;};var $00=(k==PX.key_up);this.$0V($00);px.cancelEvent(e,false);return false;};return true;};PXDropDown.prototype.processKeyDefault=function(e){};PXDropDown.prototype.onKeyPress=function(e){if(this.allowEdit){this.selectedIndex=-1;this.$0D();return true;};var k=e.key;if(k==PX.key_del||k==PX.key_backspace){this.setNull(true);return;};if(this.items){var c=String.fromCharCode(k);this.$0Z(c);}};PXDropDown.prototype.$0Z=function(ch){var $0o=this.$0A+ch;var $r=-1,$0p=true;var $0q=!(this.$0A.length>0);var $0r=this.hasSelection()?(this.selectedIndex+($0q?1:0)):0;for(var i=0;i<this.items.length;i++){var $0s=($0r+i)%(this.items.length),$t=this.items[$0s];if(!$t.enabled)continue;var $02=($t.text?$t.text:$t.value).trimStart();if(!this.caseSensSearch)$02=$02.toLowerCase();if($02.substr(0,$0o.length)==$0o){if($r<0){$r=$0s;}else{$0p=false;break;}}};this.$0A="";if($r>=0){var $Z=this.$0U($r);if(!$0p){this.selectRow($Z,false);this.showDropDown();this.$10();this.$0A=$0o;}else this.selectRow($Z,false);}};PXDropDown.prototype.$10=function(){if(this.$0B!=null)clearTimeout(this.$0B);PXDropDown.$11=this;this.$0B=setTimeout(function(){PXDropDown.$12();},this.$13);};PXDropDown.$11=null;PXDropDown.$12=function(){var $M=PXDropDown.$11;$M.$0A="";PXDropDown.$11=null;};PXDropDown.prototype.onFocus=function(e){if(!this.$0z){this.$0z=this.adjustTextSize();}};PXDropDown.activeObject=null;PXDropDown.$0X=function(on,$M){if(on){if(PXDropDown.activeObject==$M&&$M.$0y==on)return;PXDropDown.activeObject=$M;$M.$0y=on;var $0t=120;setTimeout(function(){PXDropDown.$0X(false);},$0t);}else{$M=PXDropDown.activeObject;if($M){$M.$0y=on;PXDropDown.activeObject=null;}}};PXDropDown.prototype.$0O=function(){if(this.$0x!=null){clearTimeout(this.$0x);this.$0x=null;}};PXDropDown.prototype.$0D=function(){if(this.allowEdit&&this.selectedIndex<0)this.viewState.remove("SelectedIndex");else this.viewState.update("SelectedIndex",this.selectedIndex);};PXDropDown.$0Y=function($a){var $p=$a;function isRowElement($0u){if(px.IsDom)return($0u instanceof HTMLTableRowElement);return($0u.tagName=="TR");}while($p!=null&&!isRowElement($p))$p=$p.parentNode;return $p;};PX.createElement=function($0v,$0w){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",$0v);}else el=document.createElement($0v);if($0w!=undefined)$0w.appendChild(el);else document.body.appendChild(el);return el;};PX.key_up=38;PX.key_down=40;PX.key_esc=27;PX.key_enter=13;PX.key_del=7;PX.key_backspace=8;PX.key_tab=9;



function PXCheckBox($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);this.isInput=($a.tagName=="INPUT");this.elemSpan=$a.parentNode;this.elemSpan.object=this;this.attachEventHandlers();this.elemLabel=$a.nextSibling;if(this.elemLabel&&this.elemLabel.tagName!="LABEL")this.elemLabel=null;this.events=new PXEventList(this,PXCheckBox.events,$b.clientEvents);this.viewState=new PXStateBag($a.id,"PXCheckBox");};PXCheckBox.convertValue=function($c,$d){return NetType.convert($d,$c.valueType);};PXCheckBox.properties=[["autoPostBack",JSType.Bool,false],["valueType",JSType.Int,3],["trueValue",JSType.Empty,"",PXCheckBox.convertValue],["falseValue",JSType.Empty,"",PXCheckBox.convertValue],["bindingContainer",JSType.String,""],["autoCallBack",JSType.Object,PXCallback.settingsDesc],["checkImages",JSType.Object,null],["uncheckImages",JSType.Object,null]];PXCheckBox.callbackProps=[["hidden",JSType.Bool,false,px_cm.setHidden],["enabled",JSType.Bool,true,"setEnabled"],["value",JSType.Empty,null,"setValue"]];PXCheckBox.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXCheckBox.callbackProps);};PXCheckBox.events={$initialize:0,$keyDown:1,$keyPress:2,$keyUp:3,$mouseDown:4,$mouseUp:5,$mouseMove:6,$mouseOver:7,$mouseOut:8,$click:9,$focus:10,$blur:11,$valueChanging:12,$valueChanged:13};PXCheckBox.prototype.attachEventHandlers=function(){var h=PXCheckBox.$p;PXEvent.addBaseHandlers(this.isInput?this.element:this.elemSpan,h);h=PXCheckBox.$q;px.addEventHandler(this.elemSpan,"mouseover",h);px.addEventHandler(this.elemSpan,"mouseout",h);px.addEventHandler(this.elemSpan,"mousedown",h);px.addEventHandler(this.elemSpan,"mouseup",h);};PXCheckBox.prototype.detachEventHandlers=function(){var h=PXCheckBox.$p;PXEvent.removeBaseHandlers(this.isInput?this.element:this.elemSpan,h);h=PXCheckBox.$q;px.removeEventHandler(this.elemSpan,"mouseover",h);px.removeEventHandler(this.elemSpan,"mouseout",h);px.removeEventHandler(this.elemSpan,"mousedown",h);px.removeEventHandler(this.elemSpan,"mouseup",h);};PXCheckBox.prototype.getValue=function(){var $e=this.getChecked();if(this.valueType==NetType.Boolean)return $e;return $e?this.trueValue:this.falseValue;};PXCheckBox.prototype.setValue=function(v){var $f=NetType.convert(v,this.valueType);if(this.valueType==NetType.Boolean)this.setChecked($f);else this.setChecked($f==this.trueValue);};PXCheckBox.prototype.getChecked=function(){if(this.isInput)return this.element.checked;return this.element.getAttribute("checked")!=null;};PXCheckBox.prototype.setChecked=function(v){if(this.isInput)this.element.checked=v;else{if(v)this.element.setAttribute("checked",v);else this.element.removeAttribute("checked");this.$r();this.viewState.update("Checked",Boolean(v));}};PXCheckBox.prototype.getVisible=function(){return this.element.style.display!="none";};PXCheckBox.prototype.setVisible=function($g){if($g!=this.getVisible()){var $h=$g?"":"none";this.element.style.display=$h;if(this.elemLabel)this.elemLabel.style.display=$h;this.viewState.update("Visible",Boolean($g));}};PXCheckBox.prototype.getEnabled=function(){return px.getEnabled(this.elemSpan);};PXCheckBox.prototype.setEnabled=function($i){if($i!=this.getEnabled()){px.setEnabled(this.elemSpan,$i);px.setEnabled(this.element,$i);this.viewState.update("Enabled",Boolean($i));}};PXCheckBox.prototype.getText=function(){return this.elemLabel?px.getElemText(this.elemLabel):"";};PXCheckBox.prototype.setText=function(v){if(this.elemLabel)px.setElemText(this.elemLabel,v);};PXCheckBox.prototype.fireEvent=function(id,ev){var $j=new Object();$j.value=this.element.checked;if(id==12)$j.oldValue=!$j.value;return this.events.fireEvent(id,ev,$j);};PXCheckBox.prototype.$s=function($k,$e){var im=$e?this.checkImages:this.uncheckImages,$l;switch($k){case 0:$l=im.normal;break;case 1:$l=im.disabled;break;case 2:$l=im.hover;break;case 3:$l=im.pushed;break;};if(!$l){if($k>0)$l=this.$s(($k==3)?2:0,$e);};return $l;};PXCheckBox.prototype.$r=function(){var $m,$e=this.getChecked();if(!this.getEnabled()){$m=this.$s(1,$e);}else if(this.$t){$m=this.$s(3,$e);}else if(this.$u){$m=this.$s(2,$e);};if(this.element.tagName=="IMG"){if(!$m)$m=this.$s(0,$e);if(this.element.src!=$m)this.element.src=$m;}};PXCheckBox.$p=function(e){var $n=px.eventObject(e,PXCheckBox);if(!$n)return;var $k=PXEvent.baseEventID(e.type);var $o=$n.fireEvent($k,e);if(!$o&&$k==9&&$n.getEnabled()){$o=$n.fireEvent(12,null);if(!$o){if(!$n.isInput)$n.setChecked(!$n.getChecked());$n.fireEvent(13,null);px_cm.notifyOwnerChanged($n);px_cm.processPostData($n);}};if($k==10)px_cm.notifyOwnerActivate(this);if($o)px.cancelEvent(e);};PXCheckBox.$q=function(e){var $n=px.eventObject(e,PXCheckBox);if($n&&$n.getEnabled()){switch(e.type){case "mouseover":$n.$u=true;break;case "mouseout":$n.$t=$n.$u=false;break;case "mousedown":$n.$t=true;break;case "mouseup":$n.$t=false;break;};$n.$r();}};



function PXComboBox($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);this.attachEventHandlers();this.events=new PXEventList(this,PXComboBox.events,$b.clientEvents);this.viewState=new PXStateBag($a.id,"PXComboBox");};PXComboBox.properties=[["autoPostBack",JSType.Bool,false],["valueType",JSType.Int,9],["bindingContainer",JSType.String,""]];PXComboBox.callbackProps=[["hidden",JSType.Bool,false,px_cm.setHidden],["enabled",JSType.Bool,true,"setEnabled"],["value",JSType.Empty,null,"setValue"]];PXComboBox.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXComboBox.callbackProps);};PXComboBox.events={$initialize:0,$keyDown:1,$keyPress:2,$keyUp:3,$mouseDown:4,$mouseUp:5,$mouseMove:6,$mouseOver:7,$mouseOut:8,$click:9,$focus:10,$blur:11,$valueChanging:12,$valueChanged:13};PXComboBox.prototype.attachEventHandlers=function(){PXEvent.addBaseHandlers(this.element,PXComboBox.$o);px.addEventHandler(this.element,"change",PXComboBox.$o);};PXComboBox.prototype.detachEventHandlers=function(){PXEvent.removeBaseHandlers(this.element,PXComboBox.$o);px.removeEventHandler(this.element,"change",PXComboBox.$o);};PXComboBox.prototype.fireEvent=function(id,ev){var $c=new Object();return this.events.fireEvent(id,ev,$c);};PXComboBox.prototype.getVisible=function(){return this.element.style.display!="none";};PXComboBox.prototype.setVisible=function($d){if($d!=this.getVisible()){this.element.style.display=($d?"":"none");this.viewState.update("Visible",Boolean($d));}};PXComboBox.prototype.getEnabled=function(){return !this.element.disabled;};PXComboBox.prototype.setEnabled=function($e){if($e!=this.getEnabled()){this.element.disabled=!$e;this.viewState.update("Enabled",Boolean($e));}};PXComboBox.prototype.getValue=function($f){if(this.value===undefined||$f)this.value=NetType.convert(this.element.value,this.valueType);return this.value;};PXComboBox.prototype.setValue=function(v){if(v==null){this.element.selectedIndex=-1;this.value=null;}else{this.value=NetType.convert(v,this.valueType);this.element.value=this.value;}};PXComboBox.prototype.addItem=function($g,$h){$h=NetType.convert($h,this.valueType);var $i=this.element.options;$i[$i.length]=new Option($g,$h,false,false);};PXComboBox.prototype.removeItem=function($h){$h=NetType.convert($h,this.valueType);var $j=this.element.options;for(var i=0;i<$j.length;i++){var $i=$j[i];var $k=NetType.convert($i.value,this.valueType);if($k==$h){this.element.remove(i);break;}}};PXComboBox.$o=function(e){var $l=px.eventElem(e).object;if($l){var $m;if(e.type=="change"){$m=$l.fireEvent(12,null);if($m)$l.element.value=$l.value;else{$l.value=NetType.convert($l.element.value,$l.valueType);$l.fireEvent(13,null);px_cm.notifyOwnerChanged($l);}}else{var $n=PXEvent.baseEventID(e.type);$m=$l.fireEvent($n,e);};if($m)px.cancelEvent(e);}};



function PXGroupBox($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);if($a.tagName=="TABLE")this.elemCap=$a.rows[0].cells[1];else{var ec=$a.firstChild;while(ec&&ec.tagName!="LEGEND")ec=ec.nextSibling;this.elemCap=ec;};var h=Function.createDelegate(this,this.$n);for(var i=0;i<this.buttons.length;i++)px.addEventHandler(px.elemByID(this.buttons[i]),"click",h);this.events=new PXEventList(this,PXGroupBox.events,$b.clientEvents);this.viewState=new PXStateBag($a.id,"PXGroupBox");};PXGroupBox.convertButtons=function($c,$d){var $e=[];if($d){$e=$d.split(",");for(var i=0;i<$e.length;i++)$e[i]=$c.ID+"_"+$e[i];};return $e;};PXGroupBox.properties=[["autoPostBack",JSType.Bool,false],["value",JSType.Empty,null],["valueType",JSType.Int,9],["allowNull",JSType.Bool,false],["bindingContainer",JSType.String,""],["buttons",JSType.Empty,null,PXGroupBox.convertButtons],["autoCallBack",JSType.Object,PXCallback.settingsDesc]];PXGroupBox.callbackProps=[["hidden",JSType.Bool,false,px_cm.setHidden],["enabled",JSType.Bool,true,"setEnabled"],["value",JSType.Empty,null,"setValue"]];PXGroupBox.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXGroupBox.callbackProps);};PXGroupBox.events={$initialize:0,$valueChanging:1,$valueChanged:2};PXGroupBox.prototype.getVisible=function(){return this.element.style.display!="none";};PXGroupBox.prototype.setVisible=function($f){if($f!=this.getVisible()){this.element.style.display=($f?"":"none");this.viewState.update("Visible",Boolean($f));}};PXGroupBox.prototype.getEnabled=function(){return px.getEnabled(this.element);};PXGroupBox.prototype.setEnabled=function($g){if($g!=this.getEnabled()){px.setEnabled(this.element,$g);for(var i=0;i<this.buttons.length;i++){var rb=px.elemByID(this.buttons[i]);rb.disabled=!$g;rb.parentNode.disabled=!$g;};this.viewState.update("Enabled",Boolean($g));}};PXGroupBox.prototype.getCaption=function(){return px.getElemText(this.elemCap);};PXGroupBox.prototype.setCaption=function(v){px.setElemText(this.elemCap,v);this.viewState.update("Caption",v);};PXGroupBox.prototype.getValue=function(){return this.value;};PXGroupBox.prototype.setValue=function(v){var $h=this.buttons.length;v=this.$o(v);for(var i=0;i<$h;i++){var rb=px.elemByID(this.buttons[i]);var $i=this.$o(rb.getAttribute("value"));if($i==v){this.$p(v);if(!rb.checked)rb.checked=true;break;}}};PXGroupBox.prototype.$p=function(v){this.value=this.$o(v);this.viewState.update("Value",this.value);};PXGroupBox.prototype.$o=function(v){return NetType.convert(v,this.valueType);};PXGroupBox.prototype.getDisplayText=function(v){if(this.allowNull&&v==null)return "";for(var i=0;i<this.buttons.length;i++){var rb=px.elemByID(this.buttons[i]);var $i=this.$o(rb.getAttribute("value"));if($i==v){var $j=rb.nextSibling;if($j&&$j.htmlFor==rb.id)return $j.innerHTML;}}};PXGroupBox.prototype.fireEvent=function(id,ev){var $k=new Object();return this.events.fireEvent(id,ev,$k);};PXGroupBox.prototype.$n=function(e){var $l=px.eventElem(e);if($l.tagName!="INPUT")$l=$l.previousSibling;if($l&&!$l.disabled&&this.getEnabled()){var $d=this.$o($l.getAttribute("value"));if($d!=this.getValue()){var $m=this.fireEvent(1,e);if($m)this.setValue(this.value);else{this.$p($d);this.fireEvent(2,e);px_cm.notifyOwnerChanged(this);px_cm.processPostData(this);}}}};



function PXFileUpload($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);this.uploadElem=px.elemByID(this.ID+"_upl");this.imageLoading=px.elemByID(this.ID+"_imgl");if(this.uploadElem!=null){px.addEventHandler(this.uploadElem,"blur",PXFileUpload.onUploadBlur);px.addEventHandler(this.uploadElem,"change",PXFileUpload.onUploadChange);};if(this.submitButtonID!=""){this.submitButton=px.elemByID(this.submitButtonID);px.addEventHandler(this.submitButton,"click",Function.createDelegate(this,this.checkForLink));};this.events=new PXEventList(this,PXFileUpload.events,$b.clientEvents);};PXFileUpload.properties=[["allowedFileTypes",JSType.String,""],["callbackTargetID",JSType.String,""],["submitButtonID",JSType.String,""],["ajaxBehavior",JSType.Bool,true]];PXFileUpload.events={$initialize:0,$fileUploaded:1};PXFileUpload.prototype.fireEvent=function(id,ev,$c){return this.events.fireEvent(id,ev,$c);};PXFileUpload.prototype.checkFileType=function($d){if(this.allowedFileTypes==null||this.allowedFileTypes=="")return false;var $e=this.allowedFileTypes.split(";");$d=$d.toLowerCase();var $f=$d.lastIndexOf(".");if($f==-1)return false;var $g=$d.substr($f);for(i=0;i<$e.length;i++)if($g==$e[i])return true;return false;};PXFileUpload.prototype.reset=function(){var $h=document.createElement('input');$h.type="file";$h.style.width=this.uploadElem.style.width;$h.size=this.uploadElem.size;$h.id=this.uploadElem.id;$h.name=this.uploadElem.name;px.removeEventHandler(this.uploadElem,"blur",PXFileUpload.onUploadBlur);px.removeEventHandler(this.uploadElem,"change",PXFileUpload.onUploadBlur);px.addEventHandler($h,"blur",PXFileUpload.onUploadBlur);px.addEventHandler($h,"change",PXFileUpload.onUploadChange);var parent=px.IsIE?this.uploadElem.parentElement:this.uploadElem.parentNode;parent.insertBefore($h,this.uploadElem);parent.removeChild(this.uploadElem);delete this.uploadElem;this.uploadElem=$h;this.imageLoading.style.display="none";};PXFileUpload.prototype.onSubmit=function(e){if(this.element.offsetParent!=null&&this.element.offsetWidth>0&&(this.uploadElem.value!=""||this.allowPostEmpty)){var $i=this.postToHiddenFrame();document.cookie="pxFileUploadId="+this.ID+";";var $j=this.callbackTargetID==""||this.callbackTargetID==null?px_all[this.ID]:px_all[this.callbackTargetID];var me=this;setTimeout(function(){PXFileUpload.sendCallback(me,$j);},300);return $i;};return false;};PXFileUpload.prototype.postToHiddenFrame=function(){if(!this.ajaxBehavior)return false;var id="fileUpload_"+this.ID;var $k="fileUpload_div_"+this.ID;var $l="<iframe style='display:none' src='about:blank' id='"+id+"' name='"+id+"' onload='PXFileUpload.hiddenFrameLoaded(\"" + id + "\", \"" + this.ID + "\")'></iframe>";if(px.IsSafari)this.safariLoad=true;var $m=document.getElementById($k);if($m)$m.innerHTML=$l;else{var $n=document.createElement('DIV');$n.id=$k;$n.innerHTML=$l;document.body.appendChild($n);};document.forms[0].setAttribute('target',id);px.elemByID(id).contentWindow.suppressChanges=true;this.imageLoading.style.display="";return true;};PXFileUpload.prototype.checkForLink=function(){var $o=px.elemByID(this.ID+"_txt");if(!px.IsIE){$o.value=this.uploadElem.value;return;};$o.value=this.uploadElem.value;if($o.value.indexOf('/')!=-1)this.reset();};PXFileUpload.sendCallback=function($p,$q){var $r=new Object();$r.name="checkFileSize";$r.blockPage=false;$r.repaintControls=0;$r.commitChanges=false;$r.postData=0;$r.postDataControls=true;$r.container="";PXCallback.execI($q,$r,$p.uploadElem.value,PXFileUpload.processCallbackResult,null);};PXFileUpload.processCallbackResult=function($s,$t){if($s=="0"){if(window.stop)window.stop();else window.document.execCommand('Stop');alert('The file you are trying to upload exceeds maximum allowed size.');}};PXFileUpload.onUploadBlur=function(e){var $u=px.eventObject(e,PXFileUpload);if($u.submitButton==null)$u.checkForLink();};PXFileUpload.onUploadChange=function(e){var $u=px.eventObject(e,PXFileUpload);if($u.checkFileType($u.uploadElem.value)==false){if($u.allowedFileTypes==null||$u.allowedFileTypes=="")alert("File upload is forbidden.");else alert("Only following file types are allowed: "+$u.allowedFileTypes);$u.reset();};if(px.IsIE)return;var $o=px.elemByID($u.ID+"_txt");$o.value=this.value;};PXFileUpload.hiddenFrameLoaded=function($v,$w){var me=px_all[$w];var $x=document.getElementById($v);if(me.safariLoad){me.safariLoad=false;return;};var $y=document.forms[0];$y.removeAttribute('target');$y.__EVENTTARGET.value=$y.__EVENTARGUMENT.value="";$x.contentWindow.suppressChanges=true;if($x.contentWindow.uploadErr!=null)alert($x.contentWindow.uploadErr);setTimeout(function(){$x.contentWindow.__doPostBack=function(){};$x.parentNode.removeChild($x);delete $x;},0);me.reset();me.fireEvent("fileUploaded");}


function PXWikiShow($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b,PXWikiShow.properties);px_cm.registerAutoSize(this,$b);px_cm.registerRequiresOnLoad(this,$a.id);this.callbacks=new Array();this.callbacks[0]=PXCallback.copyCommand("ShowEditor",this.callBackMode);this.callbacks[1]=PXCallback.copyCommand("SaveSection",this.callBackMode);this.viewState=new PXStateBag($a.id,"PXWikiShow");this.elemDivContent=px.elemByID(this.ID+"_divContent");this.addClickHandlers();this.initImagesProcessing();};PXWikiShow.properties=[["bindingContainer",JSType.String,""],["labelID",JSType.String,""],["callBackMode",JSType.Object,PXCallback.commandDesc],["spinnerUrl",JSType.String,""],["collapseUrl",JSType.String,""],["expandUrl",JSType.String,""],["closeUrl",JSType.String,""]];PXWikiShow.callbackProps=[["parsedContent",JSType.String,"","setValue"]];PXWikiShow.prototype.onLoad=function(){this.initFileList();};PXWikiShow.prototype.initFileList=function(){var $c=this.ID+"_flst";var $d=px.elemsByName("FileList",true);var $a=px.elemByID($c);if($a&&$d.length>0){$d[0].appendChild($a);$a.style.display="";};window["_"+$c]=new Object();this.flist=px_cm.createControl("PXFileList",$c,$c);};PXWikiShow.prototype.setProperties=function($b){px_cm.readProperties(this,$b,PXWikiShow.callbackProps);};PXWikiShow.prototype.setValue=function(v){this.elemDivContent.innerHTML=v;this.addClickHandlers();};PXWikiShow.prototype.setHeight=function($e){var h=parseInt($e);this.element.style.height=px.getStyleHeight(this.element,h)+"px";};PXWikiShow.prototype.setWidth=function($f){var w=parseInt($f);this.element.style.width=w+"px";};PXWikiShow.prototype.addClickHandlers=function(){var $g=px.elemsByName("expandableSection"+this.ID,true);var $h=px.elemsByName("clickableImage"+this.ID,true);var $i=px.elemsByName("clickableLink"+this.ID,true);var $j=px.elemsByName("clickableImageMagnify"+this.ID,true);var $k=px.elemsByName("sectionEditLink"+this.ID,true);var $l=px.elemsByName("hiddenText"+this.ID,true);var $m=px.elemsByName("tocHideShow"+this.ID,true);if($g!=null){for(var i=0;i<$g.length;i++)px.addEventHandler($g[i],"click",PXWikiShow.handleSectionClick);};if($h!=null){for(var i=0;i<$h.length;i++)px.addEventHandler($h[i],"click",Function.createDelegate(this,this.handlePopupImageClick));};if($i!=null){for(var i=0;i<$i.length;i++)px.addEventHandler($i[i],"click",Function.createDelegate(this,this.handlePopupLinkClick));};if($j!=null){for(var i=0;i<$j.length;i++)px.addEventHandler($j[i],"click",Function.createDelegate(this,this.handleMagnifyImageClick));};if($k!=null){for(var i=0;i<$k.length;i++)px.addEventHandler($k[i],"click",Function.createDelegate(this,PXWikiShow.handleStartEdit));};if($l!=null){for(var i=0;i<$l.length;i++){$l[i].childNodes[0].src=this.expandUrl;px.addEventHandler($l[i],"click",Function.createDelegate(this,this.handleHiddenTextClick));}};if($m!=null){for(var i=0;i<$m.length;i++)px.addEventHandler($m[i],"click",PXWikiShow.handleTocHideShow);}};PXWikiShow.handleSectionClick=function(e){var $a=px.eventElem(e).nextSibling;if($a==null)return;if($a.tagName.toLowerCase()!="div")$a=$a.nextSibling;if($a==null||$a.style==null||$a.tagName.toLowerCase()!="div")return;if(this.editorOpen==true&&$a==this.currentSectionEditing)return;if($a.style['display']=='none')$a.style['display']='';else $a.style['display']='none';};PXWikiShow.handleTocHideShow=function(e){var $n=px.eventElem(e);var tr=$n.parentNode.parentNode.parentNode.parentNode;var $o=tr.nextSibling.childNodes[0].childNodes[0];if($o.style['display']=='none')$o.style['display']='';else $o.style['display']='none';};PXWikiShow.prototype.handleHiddenTextClick=function(e){var $p=px.eventElem(e);while($p!=null&&$p.tagName.toLowerCase()!="span")$p=$p.parentNode;if($p==null)return;var $a=px.IsIE?$p.nextSibling:$p.nextSibling.nextSibling;var $q=$p.childNodes[0];if($a.style['display']=='none'){$a.style['display']='';$q.src=this.collapseUrl;}else{$a.style['display']='none';$q.src=this.expandUrl;}};PXWikiShow.prototype.handlePopupImageClick=function(e){var $a=px.eventElem(e);this.currentThumbnail=$a;this.isVideo=false;if($a.childNodes!=null&&$a.childNodes[0]!=null&&$a.childNodes[0].id=="Video"){this.currentThumbnail=$a.parentNode.parentNode.parentNode;this.frWidth=$a.getAttribute('frWidth');this.frHeight=$a.getAttribute('frHeight');this.isVideo=true;}else if($a.id=="Video"){this.currentThumbnail=$a.parentNode.parentNode.parentNode.parentNode;this.frWidth=$a.parentNode.getAttribute('frWidth');this.frHeight=$a.parentNode.getAttribute('frHeight');this.isVideo=true;};this.currentThumbnail.X=px.getElemLeftPos(this.currentThumbnail);this.currentThumbnail.Y=px.getElemTopPos(this.currentThumbnail);this.showImage(this.currentThumbnail.parentNode.href);px.cancelEvent(e);};PXWikiShow.prototype.handlePopupLinkClick=function(e){var $a=px.eventElem(e);this.currentThumbnail=$a;while(this.currentThumbnail.tagName.toLowerCase()!='a')this.currentThumbnail=this.currentThumbnail.parentNode;this.isVideo=true;this.currentThumbnail.X=px.getElemLeftPos(this.currentThumbnail);this.currentThumbnail.Y=px.getElemTopPos(this.currentThumbnail);this.frWidth=this.currentThumbnail.parentNode.getAttribute('frWidth');this.frHeight=this.currentThumbnail.parentNode.getAttribute('frHeight');this.showImage(this.currentThumbnail.href);px.cancelEvent(e);};PXWikiShow.prototype.handleMagnifyImageClick=function(e){var $a=px.eventElem(e).parentNode.parentNode.parentNode.previousSibling.childNodes[0];$a.X=px.getElemLeftPos($a);$a.Y=px.getElemTopPos($a);this.currentThumbnail=$a;this.isVideo=$a.id=="VideoTable"?true:false;this.showImage($a.parentNode.href);px.cancelEvent(e);};PXWikiShow.handleStartEdit=function(e){var $r=px.eventElem(e);var $s=PXWikiShow.getSectionDiv($r.nextSibling);this.showEditor($s.id.substr(3));};PXWikiShow.getSectionDiv=function($t){return px.IsIE?$t.nextSibling.nextSibling:$t.nextSibling.nextSibling.nextSibling;};PXWikiShow.prototype.initImagesProcessing=function(){this.shadowDiv=null;this.image=null;this.path=null;this.picDiv=null;this.frWidth=640;this.frHeight=480;this.resizeImageHandler=Function.createDelegate(this,this.onWindowResize);this.keyPressImageHandler=Function.createDelegate(this,this.onKeyPress);this.clickImageHandler=Function.createDelegate(this,this.hideImage);this.loadImageHandler=Function.createDelegate(this,this.onImageLoad);};PXWikiShow.prototype.createSpinner=function(){if(this.spinner)return;this.spinner=document.createElement('div');var $q=document.createElement('img');$q.id=$q.name="spinner";$q.src=this.spinnerUrl;this.spinner.style.position="absolute";this.spinner.style.zIndex=11000;this.spinner.style.width=this.spinner.style.height="32px";this.spinner.style.display="none";this.spinner.style.backgroundColor="#FFFFFF";this.spinner.appendChild($q);var $u=window.theForm?theForm:document.body;$u.appendChild(this.spinner);};PXWikiShow.prototype.showImage=function($v){this.createSpinner();this.path=$v;this.shadowDiv=this.getShadowDiv();this.layoutImage();px.addEventHandler(window,"resize",this.resizeImageHandler);px.addEventHandler(document.documentElement,"keydown",this.keyPressImageHandler);px.addEventHandler(this.shadowDiv,"click",this.clickImageHandler);px.addEventHandler(this.image,"load",this.loadImageHandler);px.addEventHandler(this.image,"onload",this.loadImageHandler);px.addEventHandler(this.image,"click",this.clickImageHandler);};PXWikiShow.prototype.layoutImage=function(){this.layoutShadowElement();this.layoutImageElement();};PXWikiShow.prototype.onWindowResize=function(){this.getPicture();var $w=document.documentElement.clientWidth;var $x=document.documentElement.clientHeight;var $y=px.IsSafari?window.pageXOffset:document.documentElement.scrollLeft;var $z=px.IsSafari?window.pageYOffset:document.documentElement.scrollTop;this.layoutShadowElement();this.picDiv.curW=this.picDiv.curW==null?0:this.picDiv.curW;this.picDiv.curH=this.picDiv.curH==null?0:this.picDiv.curH;this.picDiv.style.left=$w/ 2- this.picDiv.curW/ 2+$y;this.picDiv.style.top=$x/ 2- this.picDiv.curH/ 2+$z;};PXWikiShow.prototype.hideImage=function(){var $A=this.getShadowDiv();var $B=this.getPicture();var $w=document.documentElement.clientWidth;var $x=document.documentElement.clientHeight;var $y=px.IsSafari?window.pageXOffset:document.documentElement.scrollLeft;var $z=px.IsSafari?window.pageYOffset:document.documentElement.scrollTop;$A.style.display="none";this.spinner.style.display="none";$B.style.display="none";$B.style.top=$x/2-16+$z;$B.style.left=$w/2-16+$y;this.isVideo=false;px.removeEventHandler(document.documentElement,"keydown",this.keyPressImageHandler);px.removeEventHandler(window,"resize",this.resizeImageHandler);};PXWikiShow.prototype.layoutShadowElement=function(){var $A=this.getShadowDiv();var $C=document.documentElement;var $D=$C.scrollWidth-$C.clientWidth;var $E=$C.scrollHeight-$C.clientHeight;if(px.IsOpera){$D-=100;$E-=100;};$A.style.width=$A.style.height="0px";$A.style.display="";if($D>0)$A.style.width=($C.clientWidth+$D)+"px";else $A.style.width=$C.clientWidth+"px";if($E>0)$A.style.height=($C.clientHeight+$E)+"px";else $A.style.height=$C.clientHeight+"px";};PXWikiShow.prototype.layoutImageElement=function(){var $w=document.documentElement.clientWidth;var $x=document.documentElement.clientHeight;var $y=px.IsSafari?window.pageXOffset:document.documentElement.scrollLeft;var $z=px.IsSafari?window.pageYOffset:document.documentElement.scrollTop;this.spinner.style.left=$w/2-16+$y+"px";this.spinner.style.top=$x/2-16+$z+"px";this.getPicture();if(px.IsOpera){this.picDiv.style.top="0px";this.picDiv.style.left="0px";this.picDiv.style.display="";};if(px.IsIE&&this.image.complete)this.spinner.style.display="none";this.picDiv.width=this.spinner.width;this.picDiv.height=this.spinner.height;this.picDiv.style.display="none";if(this.spinner.style.display=="none"){this.picDiv.width=parseInt(this.image.width);this.picDiv.height=parseInt(this.image.height);this.animateImagePopup(this.image,$w,$x,$y,$z);}};PXWikiShow.prototype.fitSize=function(w,h,$F,$G){this.picDiv.targetWidth=w;this.picDiv.targetHeight=h;if(w+this.picDiv.innerOffset*2>$F){this.picDiv.targetWidth=$F-this.picDiv.innerOffset*2;this.picDiv.targetHeight=h*$F/(w+this.picDiv.innerOffset*2);w=this.picDiv.targetWidth;};if(this.picDiv.targetHeight+this.picDiv.innerOffset*2>$G){this.picDiv.targetHeight=$G;this.picDiv.targetWidth=w*$G/(this.picDiv.targetHeight+this.picDiv.innerOffset*2);}};PXWikiShow.prototype.animateImagePopup=function($H,$w,$x,$y,$z){var me=this;var $I=15;var $J=100/$I;var $K=0;this.picDiv.opacity=0;this.picDiv.style.opacity=this.picDiv.opacity;this.picDiv.style.filter="alpha(opacity="+(this.picDiv.opacity*100)+")";this.picDiv.style.visibility="hidden";this.picDiv.style.display="";$H.style.display="";this.fitSize(parseInt($H.width),parseInt($H.height),$w,$x);this.picDiv.targetX=$w/ 2- this.picDiv.targetWidth/ 2+$y-this.picDiv.innerOffset;this.picDiv.targetY=$x/ 2- this.picDiv.targetHeight/ 2+$z-this.picDiv.innerOffset;$H.style.display="none";this.picDiv.style.display="none";this.picDiv.style.visibility="";this.picDiv.startW=this.picDiv.curW=parseInt(this.currentThumbnail.offsetWidth);this.picDiv.startH=this.picDiv.curH=parseInt(this.currentThumbnail.offsetHeight);this.picDiv.startX=this.picDiv.curX=this.currentThumbnail.X;this.picDiv.startY=this.picDiv.curY=this.currentThumbnail.Y;$H.style.width=this.picDiv.curW+"px";$H.style.height=this.picDiv.curH+"px";this.picDiv.style.left=this.picDiv.curX+"px";this.picDiv.style.top=this.picDiv.curY+"px";this.picDiv.style.display=$H.style.display="";this.intervalID=setInterval(function(){me.expandImage($H,$J,$K);},5);};PXWikiShow.prototype.expandImage=function($H,$J,$K){var me=this;this.picDiv.curW=this.picDiv.curW<this.picDiv.targetWidth?this.cubicInOut($K,this.picDiv.startW,this.picDiv.targetWidth-this.picDiv.startW,15):this.picDiv.curW;this.picDiv.curH=this.picDiv.curH<this.picDiv.targetHeight?this.cubicInOut($K,this.picDiv.startH,this.picDiv.targetHeight-this.picDiv.startH,15):this.picDiv.curH;this.picDiv.curX=this.cubicInOut($K,this.picDiv.startX,this.picDiv.targetX-this.picDiv.startX,15);this.picDiv.curY=this.cubicInOut($K,this.picDiv.startY,this.picDiv.targetY-this.picDiv.startY,15);this.picDiv.opacity=this.picDiv.opacity+$J;$H.style.width=this.picDiv.curW+"px";$H.style.height=this.picDiv.curH+"px";this.picDiv.style.left=this.picDiv.curX+"px";this.picDiv.style.top=this.picDiv.curY+"px";this.picDiv.style.opacity=this.picDiv.opacity/100;this.picDiv.style.filter="alpha(opacity="+(this.picDiv.opacity)+")";$K++;clearInterval(this.intervalID);if((this.picDiv.curW>=this.picDiv.targetWidth||this.picDiv.curH>=this.picDiv.targetHeight)&&(this.picDiv.startX<this.picDiv.targetX&&this.picDiv.curX>=this.picDiv.targetX||this.picDiv.startX>=this.picDiv.targetX&&this.picDiv.curX<=this.picDiv.targetX||this.picDiv.startY<this.picDiv.targetY&&this.picDiv.curY>=this.picDiv.targetY||this.picDiv.startY>=this.picDiv.targetY&&this.picDiv.curY<=this.picDiv.targetY)){this.picDiv.style.opacity=1;this.picDiv.style.filter="alpha(opacity=100)";}else this.intervalID=setInterval(function(){me.expandImage($H,$J,$K);},5);};PXWikiShow.prototype.cubicInOut=function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;};PXWikiShow.prototype.getShadowDiv=function(){if(this.shadowDiv==null){var $L=70;this.shadowDiv=document.createElement("DIV"),ds=this.shadowDiv.style;ds.zIndex=9000;ds.position="absolute";ds.top=ds.left="0px";ds.width=ds.height="0px";ds.display="none";ds.backgroundColor='#000000';ds.opacity=$L/100;ds.filter="alpha(opacity="+$L+")";var $u=window.theForm?theForm:document.body;$u.appendChild(this.shadowDiv);};return this.shadowDiv;};PXWikiShow.prototype.getPicture=function(){if(this.picDiv==null){var $o=document.createElement('div');var $M=document.createElement('div');$o.name=$o.id='picDiv'+this.ID;$o.style.zIndex=10000;$o.style.position="absolute";$o.style.display="none";$o.style.textAlign="center";$o.style.verticalAlign="middle";$o.style.backgroundColor="#ffffff";$M.style.zIndex=9500;$M.style.position="absolute";$M.style.top=$M.style.left="0px";$M.style.width=$M.style.height="0px";var $u=window.theForm?theForm:document.body;$u.appendChild($M);$M.appendChild($o);this.createInnerDivContent($o);this.picDiv=$o;};if(this.image.path!=this.path)this.image=this.createImage(this.picDiv.childNodes[1],this.path);if(this.image.tagName.toLowerCase()=='iframe'){this.image.width=this.frWidth;this.image.height=this.frHeight;};return this.picDiv;};PXWikiShow.prototype.createInnerDivContent=function($N){$N.innerOffset=20;var $o=document.createElement('div');$o.style.textAlign="right";$o.style.backgroundColor="white";$o.style.height=$N.innerOffset+"px";$o.style.marginRight=$o.style.marginTop="5px";px.addEventHandler($o,"click",this.clickImageHandler);var $q=document.createElement('img');$q.src=this.closeUrl;$q.style.cursor="pointer";$o.appendChild($q);$N.appendChild($o);$o=document.createElement('div');$o.style.paddingRight=$o.style.paddingLeft=$o.style.paddingBottom=$N.innerOffset+"px";$N.appendChild($o);this.image=this.createImage($o,this.path);};PXWikiShow.prototype.createImage=function($o,$v){var $H=this.isVideo?this.createImageVideo($o,$v):this.createImagePicture($o,$v);$H.style.display="none";this.spinner.style.display="";$o.appendChild($H);return $H;};PXWikiShow.prototype.createImagePicture=function($o,$v){var $H=document.getElementById('picImage'+this.ID);if($H!=null)$H.parentNode.removeChild($H);$H=document.createElement('img');$H.name=$H.id='picImage'+this.ID;$H.src=$H.path=$v;return $H;};PXWikiShow.prototype.createImageVideo=function($o,$v){var $O=document.getElementById('frVideo'+this.ID);if($O!=null)$O.parentNode.removeChild($O);$O=document.createElement("iframe");$O.name=$O.id='frVideo'+this.ID;$O.src=$O.path=$v;$O.width=this.frWidth;$O.height=this.frHeight;$O.frameBorder="0";$O.style.borderStyle="none";$O.style.overflowX=$O.style.overflowY="hidden";return $O;};PXWikiShow.prototype.onImageLoad=function(e){this.spinner.style.display="none";px.removeEventHandler(this.image,"load",this.loadImageHandler);px.removeEventHandler(this.image,"onload",this.loadImageHandler);if(this.image.complete==null)this.image.setAttribute("complete",true);this.layoutImage();};PXWikiShow.prototype.onKeyPress=function(e){if(e.keyCode==27){this.hideImage();px.cancelEvent(e);}};PXWikiShow.prototype.showEditor=function($P){if(this.editorOpen){if(!this.confirmCancelEdit())return;this.$06(false);};var $Q=this.currentSectionEditing;if($Q==null||($P!=null&&("Sec"+$P)!=$Q.ID)){var $R=PXWikiShow.$07;this.currentSectionEditing=$Q=PXWikiShow.getSectionDiv(px.elemByID("Section"+$P+this.ID));delete this.editor;PXCallback.execI(this,this.callbacks[0],$P,$R);}else{if(!this.editor)this.$08();this.editor.container=this;this.$06(true);this.$09();}};PXWikiShow.$07=function($S,$T){var $U=px_all[$T];if($S&&$U){var $o=px_cm.processHtmlData($S,$U.$0a());setTimeout(function(){PXWikiShow.$0b($U.ID);},0);}};PXWikiShow.$0b=function(id){var $V=px_all[id];if($V)$V.showEditor();};PXWikiShow.prototype.$0a=function(){var $o=this.$0c=document.createElement("div");$o.id=this.ID+"_ed_div";$o.style.display="none";$o.style.overflow="auto";var $Q=this.currentSectionEditing;$Q.parentNode.insertBefore($o,$Q);return $o;};PXWikiShow.prototype.$08=function(){var $W=this.ID+"_ed";var $c=this.sourceID?(this.sourceID+"_ed"):null;if(!px_all[$W]){this.editor=px_cm.createControl("PXWikiEdit",$W,$c);px_all[$W]=this.editor;}else this.editor=px_all[$W];};PXWikiShow.prototype.$06=function($X){var $o=this.$0c,$Q=this.currentSectionEditing;if($X){$o.setAttribute("controlID",this.ID);$Q.hSize=$Q.scrollHeight;$Q.style.display="none";$o.style.display="";this.editorOpen=true;if(this.editor)px.setActive(this.editor.elemTextEdit);}else{try{$Q.parentNode.removeChild($o);}catch(ex){};$o.style.display="none";$Q.style.display="";this.editorOpen=false;}};PXWikiShow.prototype.$09=function(){var $Q=this.currentSectionEditing,$e=0;var $o=this.$0c,$u=$o.offsetParent;var ts=this.editor.element.style;ts.width="100%";if($Q.id=='Sec0'){$e=$u.clientHeight-$o.offsetTop-2;this.editor.setHeight(Math.abs(($e<200)?200:$e));this.editor.autoAdjustHeight=false;}else{$e=($Q.hSize<200)?200:$Q.hSize;this.editor.adjustHeight();this.editor.autoAdjustHeight=true;}};PXWikiShow.$0d=function($S,$T){var $Y=px_all[$T];if($Y)setTimeout(function(){$Y.handleSave($S);},0);};PXWikiShow.prototype.handleSave=function($Z){this.$06(false);var $00=this.tryDetermineFileList($Z);this.setValue($00);var $u=px_all[this.bindingContainer];if($u!=null)$u.checkChanges=false;if($00!=$Z)this.initFileList();};PXWikiShow.prototype.saveSection=function(){var $R=PXWikiShow.$0d;var $01=this.currentSectionEditing.id.substr(3)+"|"+this.editor.getValue();PXCallback.execI(this,this.callbacks[1],$01,$R);};PXWikiShow.prototype.cancelSection=function(){if(this.confirmCancelEdit())this.$06(false);};PXWikiShow.prototype.confirmCancelEdit=function(){return confirm("Are you sure you want to cancel editing?");};PXWikiShow.prototype.tryDetermineFileList=function($01){var $02="filelist|";if($01.substr(0,$02.length)!=$02)return $01;var $03=$01.indexOf('|',$02.length)+1;var $04=parseInt($01.substr($02.length,$03-$02.length-1));var $05=$01.substr($03,$04);if(px.elemByID(this.ID+"_flst_grd")==null)px_cm.processHtmlData($05);else{this.flist.element.style.display="none";this.element.parentNode.appendChild(this.flist.element);};return $01.substr($04+$03);}


function PXSearchBox($a,$b){this.element=$a;this.ID=$a.id;px_cm.readProperties(this,$b);this.defaultSearchNavigateUrl=this.searchNavigateUrl;this.edtSearch=px.elemByID(this.ID+"_txtSearch");this.btnSearch=px.elemByID(this.ID+"_btnSearch");this.btnAddNew=px.elemByID(this.ID+"_btnAddNew");if(this.edtSearch!=null){px.addEventHandler(this.edtSearch,"keydown",PXSearchBox.textBoxKey);px.addEventHandler(this.edtSearch,"focus",PXSearchBox.onFocusGained);px.addEventHandler(this.edtSearch,"blur",PXSearchBox.onFocusLost);};if(this.btnSearch!=null)px.addEventHandler(this.btnSearch,"click",PXSearchBox.searchClicked);if(this.btnAddNew!=null)px.addEventHandler(this.btnAddNew,"click",PXSearchBox.addNewClicked);};PXSearchBox.properties=[["text",JSType.String,""],["searchNavigateUrl",JSType.String,""],["addNewNavigateUrl",JSType.String,""],["addNewEnabled",JSType.Bool,true],["target",JSType.String,""]];PXSearchBox.searchClicked=function(e){var $c=px.eventObject(e,PXSearchBox);$d=$c.edtSearch.value;px.openUrl($c.searchNavigateUrl+$d,$c.target);return false;};PXSearchBox.addNewClicked=function(e){var $c=px.eventObject(e,PXSearchBox);if($c.addNewEnabled)px.openUrl($c.addNewNavigateUrl,$c.target);};PXSearchBox.textBoxKey=function(e){if(e.keyCode==13){px.cancelEvent(e);return PXSearchBox.searchClicked(e);}};PXSearchBox.onFocusGained=function(e){var $e=px.eventElem(e);var $c=px.eventObject(e,PXSearchBox);if($e.value==$c.text){$e.value="";$e.style.fontStyle="";$e.style.color="";$e.style.fontSize="";}};PXSearchBox.onFocusLost=function(e){var $e=px.eventElem(e);var $c=px.eventObject(e,PXSearchBox);if($e.value.trim()==""){$e.value=$c.text;$e.style.fontStyle="italic";$e.style.color="#9a999a";$e.style.fontSize="8pt";}}

