function AppLayer(){this.ready=false;this.tips={};this.parts={};this.elements={};this.waitStack=[];this.requestStack=[];this.requestModal=false;this.requestASync=true;this.requestShowError=true;this.setEvent("error",function(){});this.setEvent("update",function(){});this.setEvent("request",function(){});this.setEvent("response",function(){});this.setEvent("setelement",function(){});this.setEvent("load",function(){this.loadTips()});this.setEvent("ready",function(){document.app.ready=true;document.app.flushWaitStack()},"first");DomReady.ready(function(){document.app.onready()});onEventManager.addEvent(window,"load",function(){document.app.onload()},"last",false);onEventManager.addEvent(window,"unload",unloadApp,"first",false);return}AppLayer.prototype.clear=function(){if(this["requestInterval"]){clearInterval(this["requestInterval"]);this["requestInterval"]=null}for(var d=0;d<this.requestStack.length;d++){this.requestStack[d]=null}for(var f in this.elements){var c=this.elements[f];var a=c.getNodes();for(var e in a){e.e=null}c.core=null}for(var f in this.parts){var b=this.parts[f];b.core=null}return};AppLayer.prototype.setEvent=function(c,b,a){onEventManager.addEvent(this,c,b,a)};AppLayer.prototype.scrollTop=function(){return(isMSIE())?document.body.scrollTop:window.pageYOffset};AppLayer.prototype.scrollLeft=function(){return(isMSIE())?document.body.scrollLeft:window.pageXOffset};AppLayer.prototype.setElement=function(props){if(typeof(props)=="object"){var id=props.ID;if(this.elements[id]){this.elements[id].props=props;this.elements[id].setup()}else{var element;if(props.T){eval("element = new T"+props.T+"(this,props);")}else{eval("element = new T"+props.Type+"(this,props);")}this.elements[id]=element;this.elements[element.getNodeID()]=element}if(!this[id]){this[id]=this.elements[id]}this.onsetelement(this.elements[id])}};AppLayer.prototype.getElement=function(a){return this.elements[a]};AppLayer.prototype.setPart=function(a){if(typeof(a)=="object"){var b=a.ID;if(this.parts[b]){this.parts[b].props=a}else{this.parts[b]=new TPart(this,a)}if(!this[b]){this[b]=this.parts[b]}}};AppLayer.prototype.getPart=function(a){return this.parts[a]};AppLayer.prototype.setParam=function(a,b){locationUrl.setParam(a,b)};AppLayer.prototype.getParam=function(a){return locationUrl.params[a]};AppLayer.prototype.clearParam=function(b){if(typeof(b)=="object"){for(var a in b){this.setParam(a,null)}}else{if(b!=""){this.setParam(b,null)}}};AppLayer.prototype.popup=function(c){var j,k,d,b,n,i,o,l;if(typeof(c)=="object"){j=(c.html&&(c.html.length>0))?c.html:c.url;i=(c.html&&(c.html.length>0))?true:false;l=c.name;k=c.left;d=c.top;b=c.width;n=c.height;o=c.scroll}else{j=c;i=true}var a=screen.availWidth?screen.availWidth:screen.width;var m=screen.availHeight?screen.availHeight:screen.height;if(parseInt(b)>0){}else{b=parseInt(a*0.8)}if(parseInt(n)>0){}else{n=parseInt(m*0.8)}if(b>a){b=a}if(n>m){n=m}if(parseInt(k)>0){}else{k=parseInt((a-b)/2)}if(parseInt(n)>0){}else{d=parseInt((m-n)/2)}var f="";if(i){f=j;j=""}var g=window.open(j,l,"top="+d+",left="+k+",scrollbars="+o+",dialog=no,minimizable=no,modal=no,width="+b+",height="+n+",resizable=yes");try{g.resizeTo(b,n);g.moveTo(k,d)}catch(h){}if(f){g.document.write(f);g.document.close()}g.focus();return(g)};AppLayer.prototype.fmFile=function(a){fmcb=function(i,f,h,c,e,d,b,g){fmCallback(a,i,f,h,c,e,d,b,g);return true};return this.popup({url:"/fmanager/?fm_Repository=default&",scroll:"no",name:"fmPopup"})};AppLayer.prototype.fmImage=function(a){fmcb=function(i,f,h,c,e,d,b,g){fmCallback(a,i,f,h,c,e,d,b,g);return true};return this.popup({url:"/fmanager/?fm_Repository=default&fm_Image=true&",scroll:"no",name:"fmPopup"})};AppLayer.prototype.setCookie=function(b,d,a){var c=b+"="+escape(d);if(parseInt(a)>0){var e=new Date();e.setDate(e.getSeconds()+parseInt(a));c+=";expires="+e.toGMTString()}document.cookie=c;return};AppLayer.prototype.getCookie=function(b){if(document.cookie.length>0){var c=document.cookie.indexOf(b+"=");if(c!=-1){c=c+b.length+1;var a=document.cookie.indexOf(";",c);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(c,a))}}return""};AppLayer.prototype.cookieEnabled=function(){var a="cx"+Math.floor(Math.random()*99999);this.setCookie(a,"abc");if(this.getCookie(a)=="abc"){document.cookie=a+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT";return true}else{return false}};AppLayer.prototype.setTip=function(a,b){this.tips[a]=b};AppLayer.prototype.setTips=function(b){for(var a in b){this.setTip(a,b[a])}};AppLayer.prototype.loadTips=function(){for(var a in this.tips){var b=this.tips[a];if(typeof(b)=="object"){if(!b.tag){b.tag=a}loadTipUp(b)}else{loadTipUp({tag:a,tip:b})}}};AppLayer.prototype.hideTip=function(){try{_getTipTag().xHide()}catch(a){}};AppLayer.prototype.showTip=function(b,a){_getTipTag().xShow(b,a)};AppLayer.prototype.download=function(b,d){var a=Math.floor(Math.random()*99999);var e=document.createElement("DIV");e.innerHTML='<iframe style="position: absolute; top: -1000; left: -1000; width: 1px; height: 1px;" frameborder="0" src="'+b+'" id="'+a+'" name="'+a+'"></iframe>';this.appendTag(e);var c=getTag(a);if(c){c.onreadystatechange=function(){if(typeof(d)=="function"){d()}}}return};AppLayer.prototype.update=function(d,c,b,f){this.onupdate();var e={};for(var a in locationUrl.params){if(locationUrl.params[a]!=null){if((a!="_url")||(a!="_method")){e[a]=locationUrl.params[a]}}}if(typeof(d)=="object"){for(var a in d){e[a]=d[a];if((a!="_url")||(a!="_method")){this.setParam(a,d[a])}}}this.request(e,c,b,f);return};AppLayer.prototype.request=function(d,c,b,e){if(this.ready){var a=myXMLHttpRequest();if(a){if(!defined(c)){c=this.requestModal}if(!defined(b)){b=this.requestASync}this.requestStack.push({callback:e,request:a,params:d,modal:((c)?true:false)});this.onrequest();if(c){this.showModal("wait")}sendHttpRequest(a,d,b);if(!this["requestInterval"]){this["requestInterval"]=setInterval("document.app.response()",50)}}}else{this.waitStack.push(d)}return};AppLayer.prototype.response=function(){var f=[];var b=[];for(var a=0;a<this.requestStack.length;a++){var g=this.requestStack[a]["callback"];var d=this.requestStack[a]["request"];var e=this.requestStack[a]["params"];var c=this.requestStack[a]["modal"];if(d.readyState==4){b.push({callback:g,request:d,params:e,modal:c})}else{f.push({callback:g,request:d,params:e,modal:c})}this.requestStack[a]=null}this.requestStack=f;if(this.requestStack.length<=0){clearInterval(this["requestInterval"]);this["requestInterval"]=null}for(var a=0;a<b.length;a++){var g=b[a]["callback"];var d=b[a]["request"];var e=b[a]["params"];var c=b[a]["modal"];this.onresponse();if(c){this.hideModal()}this.process(d,e,g);b[a]=null}return};AppLayer.prototype.flushWaitStack=function(){while(this.waitStack.length>0){this.request(this.waitStack.shift())}};AppLayer.prototype.addHtml=function(a){var b=document.createElement("SPAN");document.body.insertBefore(b,document.body.firstChild);return changeTagHtml(b,a)};AppLayer.prototype.appendTag=function(a,b){if(!b){b=getTag("apptagcontainer")}if(b){b.appendChild(a)}else{document.body.appendChild(a)}return};AppLayer.prototype.appendHtml=function(b,a){var c=document.createElement("SPAN");this.appendTag(c,a);return changeTagHtml(c,b)};AppLayer.prototype.showModal=function(k,a,l,f){var b=getTag("AppLayerModalDiv");if(!b){b=document.createElement("DIV");b.id="AppLayerModalDiv";b.style.top=0;b.style.left=0;b.style.right=0;b.style.bottom=0;b.style.width="100%";b.style.height=document.body.clientHeight;b.style.zIndex=-10;b.style.filter="alpha(opacity=50)";b.style.opacity="0.6";b.style.position="absolute";b.style.mozOpacity="0.5";b.style.backgroundColor="#EFEFEF";this.appendTag(b,getTag("appmodalcontainer"))}if(b.style.zIndex<0){var c=function(i,e){if(window.event){i=window.event}if(e){return checkEvTag(e,i)}else{return false}};var m=["mousedown","mouseup","keydown","keypress","keyup"];for(var g=0;g<m.length;g++){var j=m[g];if(typeof(document["on"+j])=="function"){document["disabled_on"+j]=document["on"+j]}document["on"+j]=function(e){c(e,f)}}var h=document.getElementsByTagName("select");for(var d=0;d<h.length;d++){if(h[d].style.visibility!="hidden"){h[d].style.visibility="hidden";h[d]["modal_hidden"]=true}}b.style.zIndex=10;b.style.width="100%";b.style.cursor=k;document.body.origScroll=document.body.style.overflow;if(isFirefox()){if(parseInt(l)>0){b.style.height=parseInt(document.body.scrollHeight)-parseInt(l);if(parseInt(b.style.height)<parseInt(document.documentElement.scrollHeight)){b.style.height=parseInt(document.documentElement.scrollHeight)}}else{b.style.height=document.body.scrollHeight}}else{b.style.top=this.scrollTop();b.style.height=document.body.clientHeight;document.body.style.overflow="hidden"}b._appcheck=true}if(a){b.keep=a}return};AppLayer.prototype.hideModal=function(f){var h=getTag("AppLayerModalDiv");if(h){if(!h.keep||f){h.style.zIndex=-10;h.style.width=0;h.style.cursor="default";var c=document.getElementsByTagName("select");for(var b=0;b<c.length;b++){if(c[b].style.visibility=="hidden"){if(c[b]["modal_hidden"]){c[b].style.visibility="visible";c[b]["modal_hidden"]=false}}}var a=["mousedown","mouseup","keydown","keypress","keyup"];for(var g=0;g<a.length;g++){var d=a[g];if(typeof(document["disabled_on"+d])=="function"){document["on"+d]=document["disabled_on"+d];document["disabled_on"+d]=null}else{document["on"+d]=null}}h.keep=false;h._appcheck=false;if(document.body.origScroll!=""){document.body.style.overflow=document.body.origScroll}else{document.body.style.overflow="auto"}}}return};AppLayer.prototype.checkModal=function(){var a=getTag("AppLayerModalDiv");if(a){if(a._appcheck){return true}}return false};AppLayer.prototype.process=function(c,d,e){var b=true;if(typeof(e)=="function"){b=e(c.responseText)}if(b){var a;if(c.responseXML&&c.responseXML.documentElement){a=c.responseXML.documentElement}else{if(c.responseText){a=newXmlDoc(c.responseText)}}if(a){if(a.nodeName=="Response"){if(a.getAttribute("Status")=="OK"){this.processXML(a)}else{if((a.getAttribute("Retry")=="1")&&(typeof(d)=="object")){this.request(d)}else{if(a.getAttribute("Description")!=""){this.onerror(a.getAttribute("Reason"));if(this.requestShowError){alert(a.getAttribute("Description"))}}else{this.onerror();if(this.requestShowError){alert("Error: "+xml2text(a))}}}}}else{if(String(c.responseText).search(/\w/)>-1){this.onerror();if(this.requestShowError){alert("Error: "+c.responseText)}}}}else{if(String(c.responseText).search(/\w/)>-1){this.onerror();if(this.requestShowError){alert("Error: "+c.responseText)}}}}};AppLayer.prototype.processXML=function(a){if(a.nodeName=="Response"){if(a.getAttribute("Status")=="OK"){this.processResponse(a)}else{if(a.getAttribute("Description")!=""){alert("Error: "+a.getAttribute("Description"))}else{alert("Error: "+xml2text(a))}}}else{alert("Error: "+xml2text(a))}};AppLayer.prototype.processResponse=function(xml){for(var i=0;i<xml.childNodes.length;i++){var node=xml.childNodes[i];var name=node.nodeName;if(name!="#text"){if(this["process"+name]){var ev=this["onprocess"+name];if(typeof(ev)=="function"){if(ev(node)==true){eval("this.process"+name+"(node);")}}else{eval("this.process"+name+"(node);")}}}}};AppLayer.prototype.processAlert=function(a){alert(makeStringValue(getNodeValue(a)))};AppLayer.prototype.processScript=function(node){eval("try { "+getNodeValue(node)+" } catch(e) { if (appDebugger && appDebugger.enabled) { alert(e.toString()) } } ")};AppLayer.prototype.processPopup=function(c){var e;if(c.attributes.length>0){e={};for(var b=0;b<c.attributes.length;b++){var a=c.attributes[b].nodeName;var d=c.attributes[b].nodeValue;e[a]=d}}else{e=getNodeValue(c)}this.popup(e)};AppLayer.prototype.processAnchor=function(a){document.location.hash=getNodeValue(a)};AppLayer.prototype.processScrollTo=function(a){var b=String(getNodeValue(a)).split(",");window.scrollTo(b[0],b[1])};AppLayer.prototype.processDownload=function(a){this.download(getNodeValue(a))};AppLayer.prototype.processRefresh=function(a){document.location.reload()};AppLayer.prototype.processRedirect=function(a){locationUrl.redirect(getNodeValue(a))};AppLayer.prototype.processGetParent=function(a){if(window.parent&&window.parent.document&&window.parent.document.app){window.parent.document.app.processResponse(a)}};AppLayer.prototype.processGetPart=function(b){var c=b.getAttribute("ID");if(c){var a=this.getPart(c);if(a){a.processResponse(b)}}};AppLayer.prototype.processGetTag=function(node){var id=node.getAttribute("ID");if(id){var tag=getTag(id);if(!tag){tag=getFlashObject(id)}if(tag){for(var i=0;i<node.childNodes.length;i++){var tnode=node.childNodes[i];var name=tnode.nodeName;if(name=="SetHtml"){changeTagHtml(tag,getNodeValue(tnode));tag=getTag(id);if(tag){if(isMSIE()||isChrome()){var scriptNodes=tag.getElementsByTagName("script");if(scriptNodes){for(var f=0;f<scriptNodes.length;f++){eval(scriptNodes[f].innerHTML)}}}}}else{if(name=="SetStyle"){for(var a=0;a<tnode.attributes.length;a++){var attr=tnode.attributes[a];tag.style[attr.nodeName]=attr.nodeValue}}else{if(name!="#text"){if(typeof(tag[name])=="function"){var firstChild=getFirstChild(tnode);if(firstChild){tag[name](xml2text(firstChild))}else{tag[name](getNodeValue(tnode))}}}}}}}}};AppLayer.prototype.processGetElement=function(a){var b=a.getAttribute("ID");if(this.elements[b]){this.elements[b].processResponse(a)}};AppLayer.prototype.processSetParam=function(c){if(c.attributes.length>0){for(var b=0;b<c.attributes.length;b++){var a=c.attributes[b].nodeName;var d=c.attributes[b].nodeValue;if((a!="_url")&&(a!="_method")){this.setParam(a,d)}}}};AppLayer.prototype.processClearParam=function(c){if(c.attributes.length>0){for(var b=0;b<c.attributes.length;b++){var a=c.attributes[b].nodeName;if((a!="_url")&&(a!="_method")){this.clearParam(a)}}}else{this.clearParam(getNodeValue(c))}};AppLayer.prototype.processAddHtml=function(a){this.addHtml(getNodeValue(a))};AppLayer.prototype.processAppendHtml=function(a){this.appendHtml(getNodeValue(a))};AppLayer.prototype.processSetTitle=function(a){document.title=getNodeValue(a)};AppLayer.prototype.processIf=function(node,inside){var condition=node.getAttribute("Condition");var nthen,nelsif,nelse;for(var i=0;i<node.childNodes.length;i++){var snode=node.childNodes[i];if(snode.nodeName=="Then"){nthen=snode}else{if(snode.nodeName=="Elsif"){nelsif=snode}else{if(snode.nodeName=="Else"){nelse=snode}}}}if(eval(condition)){if(nthen){this.processResponse(nthen)}}else{if(inside==true){var next=getNextSibling(node);if(next){if(next.nodeName=="Elsif"){this.processIf(next,true)}else{if(next.nodeName=="Else"){this.processResponse(next)}}}}else{if(nelsif){this.processIf(nelsif,true)}else{if(nelse){this.processResponse(nelse)}}}}};document.app=new AppLayer();function TElement(a,b){this["core"]=a;if(typeof(b)=="object"){this["props"]=b;this.setup()}}TElement.prototype.setup=function(a){if(!a){a=this.getNode()}if(a){a.e=this;if(defined(this.props.Width)){this.setStyle("width",this.props.Width,a)}if(defined(this.props.Height)){this.setStyle("height",this.props.Height,a)}}};TElement.prototype.setEvent=function(c,b,a){onEventManager.addEvent(this,c,b,a)};TElement.prototype.getID=function(){return this.props.ID};TElement.prototype.getPart=function(b){var a=this.getID();return this.core.getPart(a+b)};TElement.prototype.getNode=function(b){if(b>0){var a=this.getNodes();return a[b]}else{return getTag(this.getID())}};TElement.prototype.getNodes=function(){var a=[];var d=this.getNode();if(d){var b=document.getElementsByTagName(d.tagName);for(var c=0;c<b.length;c++){if(b[c].id==d.id){a.push(b[c])}}}return a};TElement.prototype.getNodeID=function(){if(this.props.N){return this.props.N}else{return this.props.NodeID}};TElement.prototype.justSeed=function(){if(this.props.Seed=="1"){return true}else{return false}};TElement.prototype.callEvent=function(c,d,b,a){if(!defined(b)){b=this.eventModal}this.core.setParam("act","callElementEvent");this.core.setParam("_",this.props.ID);this.core.setParam("_ev_",c);this.core.setParam("_id_",this.getNodeID());this.core.update(d,b,a)};TElement.prototype.showModal=function(params){var node=this.getNode();var width,height,cursor,top,left;if(typeof(params)=="object"){top=params.top;left=params.left;width=params.width;height=params.height;cursor=params.cursor}if(!defined(width)){if(defined(this.props.Width)){width=this.props.Width}else{width=parseInt(node.offsetWidth)}}if(!defined(height)){if(defined(this.props.Height)){height=this.props.Height;if(String(height).search(/\%$/)>-1){height=((document.body.clientHeight/100)*parseInt(height));this.props.RelativeHeight=height}}else{height=parseInt(node.offsetHeight)}}if(!defined(top)){top=(((document.body.clientHeight-height)/2)+this.core.scrollTop())}if(!defined(left)){left=(((document.body.clientWidth-width)/2)+this.core.scrollLeft())}this.core.showModal(cursor,true,height,node);var selects=node.getElementsByTagName("select");for(var i=0;i<selects.length;i++){if(selects[i].style.visibility=="hidden"){selects[i].style.visibility="visible";selects[i]["modal_hidden"]=false}}setTagAlpha(node,"0");this.setStyle({top:top,left:left,width:width,height:height,zIndex:"20",display:"block",position:"absolute"});var id=this.getID();for(var i=0;i<=100;i+=20){eval('setTimeout(function() { setTagAlpha("'+id+'","'+i+'"); },'+(i*4)+")")}var formNodes=node.getElementsByTagName("form");for(var f=0;f<formNodes.length;f++){compileFormFocus(formNodes[f],f)}return};TElement.prototype.hideModal=function(){var id=this.getID();for(var i=0;i<=100;i+=20){eval('setTimeout(function() { setTagAlpha("'+id+'","'+(100-i)+'"); },'+(i*4)+")")}setTimeout(function(){document.app.getElement(id).setStyle({top:-1000,left:0,zIndex:-20,position:"absolute"});document.app.hideModal(true)},500);return};TElement.prototype.remove=function(){var a=this.getNode();a.parentNode.removeChild(a)};TElement.prototype.addHtml=function(b,a){if(!a){a=this.getNode()}var c=document.createElement("span");if(a){a.appendChild(c);return changeTagHtml(c,b)}};TElement.prototype.newHtml=function(b){var c;if(this["C"]){c=this["C"]}else{c=this["Container"]}if(c){var a=this.core.getElement(c);if(a){a.addHtml(b)}else{c=null;this.core.addHtml(b)}}else{this.core.addHtml(b)}};TElement.prototype.getHtml=function(){var a=this.getNode();if(a.outerHTML){return a.outerHTML}else{var b=a.ownerDocument.createRange();b.setStartBefore(a);var c=b.createContextualFragment(html);return xml2text(c)}};TElement.prototype.setHtml=function(html){var nodes=this.getNodes();for(var i=0;i<nodes.length;i++){var element=nodes[i];element.e=null;var tag=getTagFromHtml(html,element);if(tag){if(isMSIE()){html=tag.outerHTML;destroyTag(tag);changeTagHtml(element,html)}else{element.parentNode.replaceChild(tag,element)}}else{changeTagHtml(element,html)}element=this.getNode(i);this.setup(element);if(isMSIE()||isChrome()||isSafari()){var scriptNodes=element.getElementsByTagName("script");for(var f=0;f<scriptNodes.length;f++){eval(scriptNodes[f].innerHTML)}}var formNodes=element.getElementsByTagName("form");for(var f=0;f<formNodes.length;f++){var formid=getProp(formNodes[f],"id");if(formid){var form=document.app.getElement(formid);if(form){form.setup(formNodes[f])}}appCompileForm(formNodes[f],f)}}this.core.loadTips();fixPageFooter()};TElement.prototype.appendHtml=TElement.prototype.addHtml;TElement.prototype.setStyle=function(a,d,c){if(typeof(a)=="object"){for(var b in a){this.setStyle(b,a[b],c)}}else{if(!c){c=this.getNode()}if(c){c.style[a]=d}}return};TElement.prototype.getStyle=function(a,b){if(!b){b=this.getNode()}if(b){return b.style[a]}return};TElement.prototype.processResponse=function(xml){for(var i=0;i<xml.childNodes.length;i++){var node=xml.childNodes[i];var name=node.nodeName;if(name!="#text"){var ev=this["onprocess"+name];if(typeof(ev)=="function"){if(ev(node)==true){eval("this.process"+name+"(node);")}}else{eval("this.process"+name+"(node);")}}}};TElement.prototype.processAlert=function(a){alert(makeStringValue(getNodeValue(a)))};TElement.prototype.processScript=function(node){eval("with (this) { "+getNodeValue(node)+" }")};TElement.prototype.processRemove=function(a){this.remove()};TElement.prototype.processAddHtml=function(a){this.addHtml(getNodeValue(a))};TElement.prototype.processAppendHtml=TElement.prototype.processAddHtml;TElement.prototype.processSetHtml=function(c){var a=c.getAttribute("Url");if(a){var b=this;document.app.request(a,false,false,function(d){b.setHtml(d);return false})}else{this.setHtml(getNodeValue(c))}};TElement.prototype.processGetPart=function(b){var c=b.getAttribute("ID");var a=this.getPart(c);if(a){a.processResponse(b)}};TElement.prototype.processSetStyle=function(c){for(var b=0;b<c.attributes.length;b++){var a=c.attributes[b].nodeName;var d=c.attributes[b].nodeValue;this.setStyle(a,d)}};function loadTipUp(a){if(document.app.ready){_loadTipUp(a)}else{document.app.setEvent("load",function(){_loadTipUp(a)},"last","false")}}function loadTagUp(a){if(document.app.ready){_loadTagUp(a)}else{document.app.setEvent("load",function(){_loadTagUp(a)},"last","false")}}function _posTipTag(c){var a=_getTipTag();a.style.display="block";var g=getTag("AppLayerTipUp");var j=getTag("AppLayerTipDown");g.style.display="none";j.style.display="block";var i=(c.offsetWidth/2);if(i>15){i=15}var d=getTagPos(a).x;var b=parseInt(a.offsetWidth);if((d+b)>document.body.clientWidth){a.style.left=document.body.clientWidth-b-10}var f=(getTagPos(c).x+i);try{if((parseInt(a.style.top)-document.app.scrollTop())>(parseInt(a.offsetHeight))){a.style.top=parseInt(a.style.top)-parseInt(a.offsetHeight)-parseInt(c.offsetHeight);g.style.display="block";j.style.display="none";g.style.left=(f-getTagPos(a).x-30)}else{j.style.left=(f-getTagPos(a).x-30)}}catch(h){}}function _getTipTag(){var a=getTag("AppLayerTip");if(!a){a=document.createElement("DIV");a.id="AppLayerTip";a.style.position="absolute";a.style.top=-1000;a.style.display="none";a.style.zIndex=100;a.innerHTML='<div id="AppLayerTipDown" class="tip_do"></div><div class="tip_bl"><div class="tip_br"><div class="tip_tl"><div class="tip_tr"><div class="tip_t"><div class="tip_b"><div class="tip_l"><div class="tip_r"><div class="tip_c" id="AppLayerTipContent"></div><div style="clear:both"></div></div></div></div></div></div></div></div></div><div id="AppLayerTipUp" class="tip_up"></div>';document.app.appendTag(a)}return a}function _loadTipUp(h){var k,j,e,a,d,g;if(typeof(h)=="object"){k=h.tag;j=h.tip;e=h.width;a=h.event;d=h.force;g=h.onshow;onhide=h.onhide;delay=h.delay}else{k=h}if(typeof(k)!="object"){k=getTag(k)}if(k&&((!k.tipLoaded)||d)){if(!defined(e)){e=getProp(k,"tipWidth");if(defined(e)){setProp(k,"tipWidth",e)}else{e=300}}if(defined(j)){setProp(k,"tip",j)}if(!defined(a)){var b=lc(k.nodeName);if((b=="input")&&(lc(k.type)=="text")){a="focus"}else{if((b=="textarea")||(b=="select")){a="focus"}else{a="over"}}}var f=_getTipTag();var i=getTag("AppLayerTipContent");i.innerHTML=getProp(k,"tip");if(typeof(g)=="function"){k.tip_onshow=g}if(!defined(delay)){delay=500}loadTagUp({target:f,opener:k,attach:k,event:a,mode:"float",width:e,delay:delay,onhide:onhide,onshow:function(m,l){var n=getTag("AppLayerTipContent");n.innerHTML=getProp(l,"tip");n.style.paddingTop="5px";n.style.paddingBottom="5px";if(typeof(l.tip_onshow)=="function"){l.tip_onshow(m,l)}_posTipTag(l)}});k.tipLoaded=true}}function _loadTagUp(params){var div,opener,closer,attach,showType,eventType,onShow,onHide,onOpen,posx,posy,w,delay,hideOnMouseOut,keepParent;if(typeof(params)=="object"){div=params.target;attach=params.attach;opener=params.opener;closer=params.closer;showType=params.mode;eventType=params.event;onShow=params.onshow;onHide=params.onhide;onOpen=params.onopen;posX=params.posX;posY=params.posY;w=params.width;delay=params.delay;hideOnMouseOut=params.hideonmouseout;keepParent=params.keepparent}if(typeof(div)!="object"){div=getTag(div)}if(typeof(opener)!="object"){opener=getTag(opener)}if(typeof(attach)!="object"){attach=getTag(attach)}if(div&&opener){if(typeof(onShow)=="function"){div._onshow_=onShow}if(typeof(onHide)=="function"){div._onhide_=onHide}if(typeof(onOpen)=="function"){opener[div.id+"_onopen_"]=onOpen}if(attach){opener[div.id+"_tagup_attach_"]=attach}if(delay){opener[div.id+"_tagup_delay_"]=delay}if((showType=="float")||(showType=="popup")||(showType=="modal")){if(keepParent){}else{div.parentNode.removeChild(div);document.app.appendTag(div)}div.style.top=-1000}else{if(showType=="block"){div.style.display="none"}}div.xShow=function(event,caller){_clearTagUp(div,caller);if(window.event){event=window.event}var showFunc=function(event,caller){_clearTagUp(div,caller);if((showType=="float")||(showType=="popup")||(showType=="modal")){var top,left;if(event){var att=caller[div.id+"_tagup_attach_"];if(att){var pos=getTagPos(att);top=pos.y+parseInt(att.offsetHeight);left=pos.x}else{if(showType=="modal"){top=((document.body.clientHeight-parseInt(div.offsetHeight))/2)+document.app.scrollTop();left=((document.body.clientWidth-parseInt(div.offsetWidth))/2)+document.app.scrollLeft()}else{top=(event.clientY)?event.clientY:event.screenY;left=(event.clientX)?event.clientX:event.screenX;top+=document.app.scrollTop();left+=document.app.scrollLeft()}}if(!defined(w)){w=getProp(caller,"tipWidth")}if(defined(w)){div.style.width=w}var width=parseInt(div.offsetWidth);if((left+width)>document.body.clientWidth){left=document.body.clientWidth-width-10;div.style.width=width}}if(showType=="popup"){var dh=parseInt(div.offsetHeight);var bh=parseInt(document.body.offsetHeight);var st=document.app.scrollTop();var sh=(bh-top+st-10);if(dh>=sh){div.style.height=sh}else{div.style.height="auto"}}if(defined(posX)){left+=posX}if(defined(posY)){top+=posY}setTagAlpha(div,0);div.style.top=parseInt(top);div.style.left=parseInt(left);div.style.position="absolute";if(showType=="modal"){div.style.zIndex=30;document.app.showModal()}if(typeof(div.alphaTimeouts)!="object"){div.alphaTimeouts=[]}for(var i=0;i<=100;i+=20){var t;eval('t = setTimeout(function() { setTagAlpha("'+div.id+'","'+i+'"); },'+(i*4)+");");div.alphaTimeouts.push(t)}}else{if(showType=="block"){div.style.display="block"}}enableAllTags(div,"showModal");if(typeof(div._onshow_)=="function"){div._onshow_(event,caller)}};if(caller[div.id+"_tagup_delay_"]){caller[div.id+"showTimeout"]=setTimeout(function(){showFunc(event,caller)},caller[div.id+"_tagup_delay_"])}else{showFunc(event,caller)}};div.xHide=function(timeout,caller){var hideFunc=function(caller){_clearTagUp(div,caller);if((showType=="float")||(showType=="popup")||(showType=="modal")){if(typeof(div.alphaTimeouts)!="object"){div.alphaTimeouts=[]}for(var i=0;i<=100;i+=20){var t;eval('t = setTimeout(function() { setTagAlpha("'+div.id+'","'+(100-i)+'"); },'+(i*4)+");");div.alphaTimeouts.push(t)}var t=setTimeout(function(){div.style.top=-1000},500);div.alphaTimeouts.push(t)}else{if(showType=="block"){div.style.display="none"}}if(showType=="modal"){document.app.hideModal()}if(typeof(div._onhide_)=="function"){div._onhide_()}};if(timeout>0){div.hideTimeout=setTimeout(function(){hideFunc(caller)},timeout)}else{hideFunc(caller)}};if(eventType=="over"){if(typeof(opener.onmouseout)=="function"){opener.old_onmouseout=opener.onmouseout}if(typeof(opener.onmouseover)=="function"){opener.old_onmouseover=opener.onmouseover}opener.onmouseout=function(event){clearTimeout(this[div.id+"showTimeout"]);div.xHide(250,this);if(typeof(this["old_onmouseout"])=="function"){this["old_onmouseout"](event)}};opener.onmouseover=function(event){div.xShow(event,this);if(typeof(this[div.id+"_onopen_"])=="function"){this[div.id+"_onopen_"](event)}if(typeof(this["old_onmouseover"])=="function"){this["old_onmouseover"](event)}}}else{if(eventType=="focus"){if(typeof(opener.onfocus)=="function"){opener.old_onfocus=opener.onfocus}opener.onfocus=function(event){div.xShow(event,this);if(typeof(this[div.id+"_onopen_"])=="function"){this[div.id+"_onopen_"](event)}if(typeof(this["old_onfocus"])=="function"){this["old_onfocus"](event)}}}else{if(eventType=="click"){if(typeof(opener.onclick)=="function"){opener.old_onclick=opener.onclick}opener.onclick=function(event){div.xShow(event,this);if(typeof(this[div.id+"_onopen_"])=="function"){this[div.id+"_onopen_"](event)}if(typeof(this["old_onclick"])=="function"){this["old_onclick"](event)}};if(hideOnMouseOut){if(typeof(opener.onmouseout)=="function"){opener.old_onmouseout=opener.onmouseout}opener.onmouseout=function(event){clearTimeout(this[div.id+"showTimeout"]);div.xHide(250,this);if(typeof(this["old_onmouseout"])=="function"){this["old_onmouseout"](event)}}}}}}if(eventType=="focus"){if(typeof(opener.onblur)=="function"){opener.old_onblur=opener.onblur}opener.onblur=function(event){div.xHide(0,this);if(typeof(this["old_onblur"])=="function"){this["old_onblur"](event)}}}if(closer){if(typeof(closer)!="object"){closer=getTag(closer)}closer.onclick=function(){div.onmouseover=null;div.onmousemove=null;div.xHide(0,this);return(false)}}else{if(eventType!="focus"){div.onmouseout=function(){div.xHide(250,this)}}}div.onmouseover=function(){_clearTagUp(this)};div.onmousemove=function(){_clearTagUp(this)};div.xHide(0)}}function _clearTagUp(b,f){if(typeof(b.alphaTimeouts)=="object"){for(var e=0;e<b.alphaTimeouts.length;e++){clearTimeout(b.alphaTimeouts[e])}}clearTimeout(b.hideTimeout);if(f){if(typeof(b.tagupCallers)!="object"){b.tagupCallers=[]}var g=false;for(var j=0;j<b.tagupCallers.length;j++){if(b.tagupCallers[j]==f){g=true;break}}if(!g){b.tagupCallers.push(f)}for(var j=0;j<b.tagupCallers.length;j++){var d=b.tagupCallers[j];for(var i in d){if(i.search(/showTimeout$/)>-1){clearTimeout(d[i]);var h=i.replace(/showTimeout$/,"");_clearTagUp(getTag(h))}}}}}var fmcb=null;function FMGetCallBackFunc(){return(fmcb)}function FMGetCallBackFunction(){return(fmcb)}function x(c){eval(decodeUrl(c))}function fmCallback(c,f,b,d,e,h,i,g,a){if(typeof(c)=="function"){c(f,b,d,e,h,i,g,a)}else{if(typeof(c)!="object"){c=getTag(c)}if(typeof(c)=="object"){var j=lc(c.tagName);if(j=="img"){j.src=b+f}else{if(j=="input"){j.value=b+f}}}}return true}function makeStringValue(string){string=string.replace(/\'/g,"\\'");string=string.replace(/\n/g,"\\n");string=string.replace(/\t/g,"\\t");eval("string = String('"+string+"')");return string}function makeQueryString(d){var c=[];if(typeof(d)=="object"){for(var b in d){if((b!="")&&(b!="_url")&&(b!="_method")&&(b!="")){if(typeof(d[b])!="object"){d[b]=new Array(String(d[b]))}for(var a=0;a<d[b].length;a++){c.push(cxEscape(b)+"="+cxEscape(d[b][a]))}}}}return String(c.join("&"))}function sendHttpRequest(b,f,c){if(b){var a,g,d;if(typeof(f)=="object"){a=(f._url)?String(f._url):"";g=lc(f._method);f._url=null;f._method=null;if(isNokia()){f.__request_ajax__=1}d=makeQueryString(f);if(a==""){var e=String(document.location.href).split(/\?/);a=e[0]}}else{a=f;g="get";d=""}if(a.match(/\#/)){a=a.replace(/\#.*$/,"")}if((g.indexOf("post")>-1)||(d.length>1000)){b.open("POST",a,c);b.setRequestHeader("Request-Ajax","1");b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.setRequestHeader("Content-length",d.length);b.setRequestHeader("Connection","close");b.send(d)}else{if(a.indexOf("?")==-1){a+="?"}b.open("GET",a+d,c);b.setRequestHeader("Request-Ajax","1");b.send(null)}}}function getTag(a){return document.getElementById(a)}function getTagPos(c){var b=0;var a=0;try{while(c.offsetParent){b+=c.offsetLeft;a+=c.offsetTop;c=c.offsetParent}}catch(c){}b+=c.offsetLeft;a+=c.offsetTop;return{x:b,y:a}}function setTagAlpha(a,b){if(typeof(a)!="object"){a=getTag(a)}try{a.style.filter="alpha(opacity="+b+")";a.style.opacity=parseFloat(b/100);a.style.mozOpacity=parseFloat(b/100)}catch(c){}}function enableAllTags(b,a){enableTags(b,"a",a);enableTags(b,"img",a);enableTags(b,"input",a);enableTags(b,"select",a);enableTags(b,"textarea",a)}function disableAllTags(b,a){disableTags(b,"a",a);disableTags(b,"img",a);disableTags(b,"input",a);disableTags(b,"select",a);disableTags(b,"textarea",a)}function enableTags(f,c,e){if(f&&c){var b=f.getElementsByTagName(c);for(var d=0;d<b.length;d++){var a=b[d];if(a._disabled_control_==e){a.disabled=false;if(typeof(a._disabled_onclick_)=="function"){a.onclick=a._disabled_onclick_}else{a.onclick=function(){return(true)}}a._disabled_control_=""}}}return}function disableTags(f,c,e){if(f&&c){var b=f.getElementsByTagName(c);for(var d=0;d<b.length;d++){var a=b[d];if(getProp(a,"disabled")==""){if(!defined(a._disabled_control_)){a.disabled=true;if(typeof(a.onclick)=="function"){a._disabled_onclick_=a.onclick}a.onclick=function(){return(false)};a._disabled_control_=e}}}}return}function getTagFromHtml(d,f){var e=document.createElement("SPAN");e.innerHTML=d;var a;var b=e.getElementsByTagName(f.tagName);for(var c=0;c<b.length;c++){if(b[c].id==f.id){a=b[c];break}}destroyTag(e);return a}function changeTagHtml(a,b){destroyTag(a);if(a.outerHTML){a.outerHTML=b;return a}else{var c=a.ownerDocument.createRange();c.setStartBefore(a);var d=c.createContextualFragment(b);a.parentNode.replaceChild(d,a);return d}}function destroyTag(a){var b=a.getElementsByTagName("a");for(var c=0;c<b.length;c++){var e=b[c];e.form=null}if(isMSIE()){var d=a.getElementsByTagName("object");for(var c=0;c<d.length;c++){var e=d[c];for(var f in e){if(typeof(e[f])=="function"){e[f]=null}}}}return}function getMouseCoords(a){if(a.pageX||a.pageY){return{x:a.pageX,y:a.pageY}}return{x:a.clientX+document.body.scrollLeft-document.body.clientLeft,y:a.clientY+document.body.scrollTop-document.body.clientTop}}function checkEvTag(a,g){var e=false;if(a&&g){var c=getMouseCoords(g);var d=getTagPos(a);var b=parseInt(a.offsetWidth);var f=parseInt(a.offsetHeight);var h=g.target||g.srcElement;if(h){while(h.parentNode){if(h.parentNode==a){e=true;break}else{h=h.parentNode}}}else{if((d.x<c.x)&&(d.y<c.y)&&((d.x+b)>c.x)&&((d.y+f)>c.y)){e=true}}}return e}function newXmlDoc(a){var b;if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a)}else{var c=new DOMParser();b=c.parseFromString(a,"text/xml")}return b.documentElement}function xml2text(a){if(a){if(isFirefox()){return(new XMLSerializer()).serializeToString(a)}else{if(a.xml){return a.xml}}}}function defined(a){if(String(""+a+"")=="undefined"){return false}else{if(String(""+a+"").length>0){return true}else{return false}}}function lc(a){return String(a).toLowerCase()}function getFlashObject(d){if(isFirefox()){var b=document.getElementsByTagName("embed");var c;for(var a=0;a<b.length;a++){if(b[a].name==d){c=b[a];break}}return c}else{return getTag(d)}}function fixFlashObject(b){var a=getFlashObject(b);if(a.form){window[b]=a}}var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a}function GetSwfVer(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];if(e[3]!=""){tempArrayMinor=e[3].split("r")}else{tempArrayMinor=e[4].split("r")}var d=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if(isIE&&isWin&&!isOpera){g=ControlVersion()}}}}}return g}function DetectFlashVer(f,d,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}}function supportFlex(){return DetectFlashVer(9,0,0)}function unloadApp(){document.app.clear();if(isMSIE()){var c=document.getElementsByTagName("object");for(var b=0;b<c.length;b++){var d=c[b];for(var e in d){if(typeof(d[e])=="function"){d[e]=null}}}}var a=document.getElementsByTagName("a");for(var b=0;b<a.length;b++){var d=a[b];d.form=null}document.app=null;return true}function fixPageFooter(){if(isMSIE()){var a=getTag("parent_footer");if(a){a.style.border="0px solid red";a.style.border="none"}}}function TPage(a,b){this.base=TElement;this.base(a,b)}TPage.prototype=new TElement;function TTableList(a,b){this.base=TElement;this.base(a,b)}TTableList.prototype=new TElement;function TStep(a,b){this.base=TElement;this.base(a,b)}TStep.prototype=new TElement;TStep.prototype.clearParams=function(){this.core.clearParam(this.getID()+"_index");this.core.clearParam(this.getID()+"_limit");return};TStep.prototype.processClearParams=function(a){this.clearParams();return};function TForm(a,b){this.base=TElement;this.base(a,b);this.setEvent("error",function(){})}TForm.prototype=new TElement;TForm.prototype.getForm=TElement.prototype.getNode;TForm.prototype.getUrl=function(){var a=getProp(this.getNode(),"action");if(a==""){a=""}return a};TForm.prototype.getMethod=function(){var b=getProp(this.getNode(),"method");var a=b.split(".");if(a.length>0){return a[0]}else{return b}};TForm.prototype.getParams=function(){var a=this.getNode();var f=a.submitedButton;var c={};for(var d=0;d<a.elements.length;d++){var e=a.elements[d];var b=e.name;var j=e.type;var h=e.value;if((lc(e.tagName)=="object")||(lc(e.tagName)=="embed")){continue}else{if(b){if(e.disabled){continue}if(j=="submit"){if(f&&(b==f.name)){if(typeof(c[b])!="object"){c[b]=[]}c[b].push(h)}}else{if(j=="checkbox"){if(e.checked){if(typeof(c[b])!="object"){c[b]=[]}c[b].push(h)}}else{if(j=="radio"){if(e.selected||e.checked){if(typeof(c[b])!="object"){c[b]=[]}c[b].push(h)}}else{if(j=="select-multiple"){for(var g=0;g<e.options.length;g++){if(e.options[g].selected){if(typeof(c[b])!="object"){c[b]=[]}c[b].push(e.options[g].value)}}}else{if(typeof(c[b])!="object"){c[b]=[]}c[b].push(h)}}}}}}}c._url=this.getUrl();c._method=this.getMethod();return c};TForm.prototype.isAjax=function(){var a=this.getMethod();if(a.indexOf("ajax")>-1){return true}else{return false}};TForm.prototype.isUpload=function(){var c=this.getNode();var a=false;for(var b=0;b<c.elements.length;b++){if(c.elements[b].type){if(lc(c.elements[b].type)=="file"){a=true;break}}}return a};TForm.prototype.isUpdate=function(){var b=getProp(this.getNode(),"method");var a=b.split(".");if(a.length>1){if(a[1]=="update"){return true}else{return false}}else{return false}};TForm.prototype.cancelAjax=function(b){var a=this.getNode();this.setDisabled(true);this.callEvent("Cancel",b)};TForm.prototype.submitAjax=function(){this.clearParams();var a=this.getParams();this.setDisabled(true);if(this.isUpdate()){this.core.update(a)}else{this.core.request(a)}return false};TForm.prototype.submitIframe=function(){var b=this.getNode();var a=this.getID()+Math.floor(Math.random()*99999);var c=document.createElement("DIV");c.innerHTML='<iframe style="display: none;" src="'+b.action+'" id="'+a+'" name="'+a+'" onload="document.app[\''+this.getID()+"'].responseUpload('"+a+"')\"></iframe>";this.core.appendTag(c);this.oldtarget=b.target;this.oldmethod=b.method;setProp(b,"target",a);b.target=a;setProp(b,"method","POST");b.method="POST";setTimeout(function(){b.e.setDisabled(true);document.app.onrequest()},100);return true};TForm.prototype.responseUpload=function(d){var c=this.getNode();setProp(c,"target",this.oldtarget);c.target=this.oldtarget;setProp(c,"method",this.oldmethod);c.method=this.oldmethod;this.core.onresponse();var b=getTag(d);if(b&&b.contentWindow&&b.contentWindow.document){var a=b.contentWindow.document;if(a.status!="ok"){this.iframeError=a.status;this.onerror();this.iframeError=null}}return};TForm.prototype.setAct=function(c){var b=this.getNode();for(var a=0;a<b.elements.length;a++){if(lc(b.elements[a].name)=="act"){b.elements[a].value=c}}};TForm.prototype.setFocus=function(a){var b=this.getNode();if(b.elements[a]&&b.elements[a].type){b.elements[a].focus()}};TForm.prototype.setValue=function(b,g){var c=this.getNode();if(c.elements[b]){var a=c.modified;var h=c.elements[b].modified;if(!defined(c.elements[b].type)&&(c.elements[b].length>0)){for(var d=0;d<c.elements[b].length;d++){var e=c.elements[b];var j=e[d].type;var f=e[d].value;if(String(j).search(/radio|check/)>-1){if(f==g){e[d].checked=true}if(e[d].onchange){e[d].onchange()}}else{if(String(j).search(/select/)>-1){e[d].value=g;setProp(e[d],"selected",g);if(e[d].onchange){e[d].onchange()}}else{if(defined(j)){e[d].value=g;if(e[d].onchange){e[d].onchange()}}}}}}else{if(c.elements[b].type.search(/checkbox/)>-1){c.elements[b].checked=(c.elements[b].value==g)?true:false}else{if(c.elements[b].type.search(/select/)>-1){setProp(c.elements[b],"selected",g);c.elements[b].value=g}else{if(c.elements[b].type.search(/radio/)>-1){radioSelect(c,b,g)}else{c.elements[b].value=g}}}if(c.elements[b].onchange){c.elements[b].onchange()}}c.elements[b].modified=h;c.modified=a}};TForm.prototype.setSubmit=function(a){this.setValue("_"+this.getID()+"Submit",a)};TForm.prototype.setDisabled=function(c){var a=this.getID();var b=this.getNode();if(c){disableAllTags(b,a)}else{enableAllTags(b,a)}return};TForm.prototype.setDisabledElement=function(a,c){var b=this.getNode();if(b.elements[a]){b.elements[a].disabled=c}return};TForm.prototype.reset=function(){var c=this.getForm();if(c){c.reset();for(var a=0;a<c.elements.length;a++){if(c.elements[a].type){if(c.elements[a].type.search(/select/i)>-1){var b=getProp(c.elements[a],"selected");if(b){setItemComboByValue(c.elements[a],b)}}else{if(c.elements[a].type.search(/submit/i)>-1){var d=getProp(c.elements[a],"oldvalue");if(d){c.elements[a].value=d}}}}}}};TForm.prototype.compile=function(d){var a=this.getForm();if(a){if(d){for(var b=0;b<a.elements.length;b++){if(lc(a.elements[b].tagName)!="object"){if(!a.elements[b].jslibCompiled){a.elements[b].jslibCompiled=false;for(var f=0;f<Plugins.length;f++){if(Plugins[f].processElement){Plugins[f].processElement(a.elements[b],b)}}a.elements[b].jslibCompiled=true}}}}else{appCompileForm(a,a.app_index)}}};TForm.prototype.checkAll=function(a,e){var d=this.getNode();if(d&&d.elements[a]){var c=d.elements[a];if(c.length){for(var b=0;b<c.length;b++){if(c[b].type=="checkbox"){if(c[b].disabled==false){c[b].checked=e}}}}else{if(c.type=="checkbox"){c.checked=e}}}};TForm.prototype.clearParams=function(){var b=this.getNode();for(var a=0;a<b.elements.length;a++){this.core.clearParam(b.elements[a].name)}};TForm.prototype.confirmChecked=function(a,e){var d=this.getNode();var c=false;if(d.elements[a]){if(d.elements[a].length){for(var b=0;b<d.elements[a].length;b++){if(d.elements[a][b].checked){c=true;break}}}else{if(d.elements[a].checked){c=true}}}if(c){return true}else{alert(e);return false}};TForm.prototype.processReset=function(a){this.reset();return};TForm.prototype.processEnable=function(a){this.setDisabled(false);return};TForm.prototype.processEnableElement=function(b){var a=getNodeValue(b);this.setDisabledElement(a,false);return};TForm.prototype.processCompile=function(a){var b=(getNodeValue(a)=="true")?true:false;this.compile(b);return};TForm.prototype.processClearParams=function(a){this.clearParams();return};TForm.prototype.processSetAct=function(a){this.setAct(getNodeValue(a));return};TForm.prototype.processSetValue=function(c){for(var b=0;b<c.attributes.length;b++){var a=c.attributes[b].nodeName;var d=c.attributes[b].nodeValue;this.setValue(a,d)}return};TForm.prototype.processSetFocus=function(a){this.setFocus(getNodeValue(a));return};function appFormAJAX(){}appFormAJAX.prototype.getName=function(){return("FormAJAX")};appFormAJAX.prototype.startForm=function(d,b){d.app_index=b;if(d.e){if(getProp(d,"retainFocus")=="true"){var a=d.getElementsByTagName("a");for(var c=0;c<a.length;c++){a[c]["form"]=d;onEventManager.addEvent(a[c],"blur",function(e){this.form.retainFocusTimeout=setTimeout(function(){this.focus()},100)},"last",false);onEventManager.addEvent(a[c],"focus",function(e){clearTimeout(this.form.retainFocusTimeout)},"last",false)}}onEventManager.addEvent(d,"submit",function(e){if(this.e){if(this.e.isAjax()&&this.e.isUpload()){return this.e.submitIframe()}else{if(this.e.isAjax()){return this.e.submitAjax()}else{return true}}}else{return true}},"last")}};appFormAJAX.prototype.processElement=function(b,a){if(b.form&&b.form.e&&(lc(b.tagName)!="object")){if(getProp(b.form,"retainFocus")=="true"){if((defined(b.type))){var c=parseInt(getProp(b,"autotab"));if(c>0){}else{onEventManager.addEvent(b,"blur",function(d){this.form.retainFocusTimeout=setTimeout(function(){this.focus()},100)},"last",false);onEventManager.addEvent(b,"focus",function(d){clearTimeout(this.form.retainFocusTimeout)},"last",false)}}}if((b.type=="checkbox")){if(getProp(b,"checkAll")){onEventManager.addEvent(b,"click",function(d){this.form.e.checkAll(getProp(this,"checkAll"),this.checked)},"last",false)}}if((b.type=="submit")||(b.type=="button")||(b.type=="image")){if(getProp(b,"confirmChecked")){onEventManager.addEvent(b,"click",function(d){return this.form.e.confirmChecked(getProp(this,"confirmChecked"),makeStringValue(getProp(this,"confirmCheckedMsg")))},"first",true)}if(getProp(b,"confirmClick")){onEventManager.addEvent(b,"click",function(d){return confirm(makeStringValue(getProp(this,"confirmClick")))},"middle",true)}if(getProp(b,"changeAct")){onEventManager.addEvent(b,"click",function(d){this.form.e.setAct(getProp(this,"changeAct"))},"last",false)}if(getProp(b,"changeSubmit")){onEventManager.addEvent(b,"click",function(d){this.form.e.setSubmit(getProp(this,"changeSubmit"))},"last",false)}if(getProp(b,"disableOnClick")){onEventManager.addEvent(b,"click",function(d){this.disabled=true},"last",false)}if(getProp(b,"alignToField")){alignButtonToField(b)}if(b.form.e.isAjax()){if((b.type=="submit")||(b.type=="image")){onEventManager.addEvent(b,"click",function(d){this.form.submitedButton=this},"last",false)}}}}};var FormAJAX=new appFormAJAX();if(appAddCompile){appAddCompile(FormAJAX)}function alignButtonToField(h){var a=getProp(h,"alignToField");var b=h.form;var g;var f=getTagPos(h);if(b.elements[a]){g=getTagPos(b.elements[a])}else{for(var j=0;j<b.elements.length;j++){var k=b.elements[j];var l=k.type;var c=k.name;if((lc(k.tagName)=="object")||(lc(k.tagName)=="embed")){}else{if(c){if(l=="submit"){}else{if(l=="button"){}else{if(l=="image"){}else{g=getTagPos(k)}}}}}}}if(g.x>0){var d=(g.x-f.x);if(!defined(h.style.marginLeft)){h.style.marginLeft=d}}}function TPart(a,b){this["core"]=a;if(typeof(b)=="object"){this["props"]=b}}TPart.prototype.remove=TElement.prototype.remove;TPart.prototype.getNode=TElement.prototype.getNode;TPart.prototype.getNodes=TElement.prototype.getNodes;TPart.prototype.setHtml=TElement.prototype.setHtml;TPart.prototype.addHtml=TElement.prototype.addHtml;TPart.prototype.appendHtml=TElement.prototype.appendHtml;TPart.prototype.setStyle=TElement.prototype.setStyle;TPart.prototype.processResponse=TElement.prototype.processResponse;TPart.prototype.processAlert=TElement.prototype.processAlert;TPart.prototype.processScript=TElement.prototype.processScript;TPart.prototype.processRemove=TElement.prototype.processRemove;TPart.prototype.processSetHtml=TElement.prototype.processSetHtml;TPart.prototype.processAddHtml=TElement.prototype.processAddHtml;TPart.prototype.processAppendHtml=TElement.prototype.processAppendHtml;TPart.prototype.processSetStyle=TElement.prototype.processSetStyle;TPart.prototype.setup=function(){};TPart.prototype.getID=function(){return this.props.ID};TPart.prototype.getNodeID=function(){if(this.props.N){return this.props.N}else{return this.props.NodeID}};TPart.prototype.getElement=function(){if(this.props.E){return this.core.getElement(this.props.E)}else{return this.core.getElement(this.props.ElementID)}};TPart.prototype.getNode=function(){return document.getElementById(this.getID())};
