
function _h1(node){return application.wrapNode(node);}
function _h3(depth,node){while(depth-->0){node=node.parentNode;}return application.wrapNode(node);}
function Application(){this.data=new Array();}
Application.prototype.openWindow=function(caption,node,icon,nohelp,nomin,nomax,overflow){var id=new Date().getTime();var div=document.createElement('div');div.style.display='none';div.setAttribute('jclass','JRapid_Window');div.className='jrapid_window';div.setAttribute('helpbutton','true');var w='<div style="display: none;" class="jrapid_window__dashed" onmousedown="var me=_h1(this);var current=_h3(1, this); current.top(event); current.onTitleDown(this, event); application.stopPropagation(event);" onselectstart="return false;"></div>';w+=' <div style="display: none;" class="jrapid_window__faded" onclick="return false;" onmousedown="return false;"></div>';w+='  <div>';w+=' <table class="jrapid_window__table" border="0" onclick="var me=_h1(this); var current=_h3(2, this); current.top(event); application.stopPropagation(event);">';w+=' <tbody>';w+='   <tr>';w+='    <td class="jrapid_window__topleft"></td>';w+='    <td onmousedown="var current=_h3(5, this);current.onTitleDown(this, event); application.preventDefault(event); return false;" onselectstart="return false;" ondblclick="var current=_h3(5, this);current.onTitleDblClick(this, event);" class="jrapid_window__title"><span></span><div class="jrapid_window__caption">'+caption+'</div></td><td nowrap="nowrap" class="jrapid_window__title_buttons">';w+='     <div class="jrapid_window__images">';w+='                 <a onclick="var me=_h1(this);var current=_h3(7, this);current.close(); application.stopPropagation(event); return false;" class="jrapid_window__closebutton" href="#"></a><a onmousedown="var me=_h1(this); var current=_h3(7, this);return false; application.stopPropagation(event);" onclick="var me=_h1(this); var current=_h3(7, this);current.onMaxClick(); application.stopPropagation(event); return false;" class="jrapid_window__maxbutton" href="#"'+(nomax?' style="display:none"':'')+'></a><a onclick="var me=_h1(this);var current=_h3(7, this);current.restore();application.stopPropagation(event); return false;" class="jrapid_window__restorebutton" style="display: none;" href="#"></a><a onclick="var me=_h1(this); var current=_h3(7, this);current.onMinClick(); application.stopPropagation(event); return false;" class="jrapid_window__minbutton" href="#"'+(nomin?' style="display:none"':'')+'></a><a onclick="var me=_h1(this);var current=_h3(7, this);current.onHelpClick(this, event); application.stopPropagation(event); return false;" class="jrapid_window__helpbutton" href="#"'+(nohelp?' style="display:none"':'')+'></a>';w+='     </div>';w+='    </td><td onmousedown="var me=_h1(this); var current=_h3(5, this);current.startResize(true, false); return false;" class="jrapid_window__topright"></td>';w+='   </tr>';w+='   <tr>';w+='    <td class="jrapid_window__left"></td>';w+='    <td class="jrapid_window__inner" colspan="2"><div id="'+id+'" style="width: 100%; display:block; position: relative; '+(overflow?'overflow: auto;':'')+'" htmliinner="6"></div></td>';w+='    <td onselectstart="var me=_h1(this); var current=_h3(5, this);return false;" onmousedown="var me=_h1(this);var current=_h3(5, this);current.startResize(true, false); return false;" class="jrapid_window__right"></td>';w+='   </tr>';w+='   <tr>';w+='    <td class="jrapid_window__bottoml"></td>';w+='    <td onmousedown="var me=_h1(this);var current=_h3(5, this);current.startResize(false, true); return false;" class="jrapid_window__bottom" colspan="2"></td>';w+='    <td onmousedown="var me=_h1(this);var current=_h3(5, this);current.startResize(true, true); return false;" class="jrapid_window__bottomr"></td>';w+='   </tr>';w+='   </tbody>';w+=' </table>';w+='</div>';div.innerHTML=w;node.parentNode.replaceChild(div,node);document.getElementById(id).appendChild(node);application.wrapNode(div).open();return div;}
Application.prototype._writeThemeForLib=function(theme,lib,base){var head=document.getElementsByTagName('head')[0];var link=document.createElement('link');link.type='text/css';link.href=theme.indexOf('http://')>=0?theme:('../jrapid-runtime/css/jrapid-tags'+lib+(theme?'.'+theme:'')+'.css');link.rel='stylesheet';head.appendChild(link);};Application.prototype._writeTheme=function(base,libs){var theme="";var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var c=cookies[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
if(c.indexOf("theme=")==0){theme=c.substring(6,c.length);}}
var url=window.location.search.toString();if(url.indexOf('theme=')!=-1){theme=url.substring(url.indexOf('theme=')+6);if(theme.indexOf('&')!=-1){theme=theme.substring(0,theme.indexOf('&'));}}
var date=new Date();date.setTime(new Date().getTime()+(365*24*60*60*1000));var expires='expires='+date.toGMTString()+';';document.cookie="theme="+theme+";"+expires;this._writeThemeForLib(theme,'',base);var libsArray=libs.split(',');for(var i=0;i<libsArray.length;i++){if(libsArray[i]!=''){this._writeThemeForLib(theme,libsArray[i],base);}}};Application.prototype.getElementById=function(id){return application.wrapNode(document.getElementById(this.getPrefix()+id));};Application.prototype.mappings=[];Application.prototype.mappings['jrapid_xml']='JRapid_Xml';Application.prototype.mappings['jrapid_xmlmultiple']='JRapid_XmlMultiple';Application.prototype.mappings['jrapid_xsl']='JRapid_Xsl';Application.prototype.mappings['jrapid_input']='JRapid_Input';Application.prototype.mappings['jrapid_textarea']='JRapid_Textarea';Application.prototype.mappings['jrapid_select']='JRapid_Select';Application.prototype.mappings['jrapid_accordeon']='JRapid_Accordeon';Application.prototype.mappings['jrapid_accordeonitem']='JRapid_AccordeonItem';Application.prototype.mappings['jrapid_menubar']='JRapid_MenuBar';Application.prototype.mappings['jrapid_menubaritem']='JRapid_MenuBarItem';Application.prototype.mappings['jrapid_menubaritem__hover']='JRapid_MenuBarItem';Application.prototype.mappings['jrapid_menu']='JRapid_Menu';Application.prototype.mappings['jrapid_menuitem']='JRapid_MenuItem';Application.prototype.mappings['jrapid_menuitem_highlight']='JRapid_MenuItem';Application.prototype.wrapNode=function(node){if(!node||node.outerNode){return node;}
if(node.nodeType==3){return new TextWrapper(node);}
if(node.location){return this.wrapHTMLNode(document.documentElement.lastChild);}
try{var jclass=node.getAttribute('jclass');if(jclass){var a;eval("a = new "+jclass+"(node);");return a;}else if(node.className){var classes=node.className.split(' ');for(var i=0;i<classes.length;i++){if(this.mappings[classes[i]]){var a;eval("a = new "+this.mappings[classes[i]]+"(node);");return a;}}
return this.wrapHTMLNode(node);}else{return this.wrapHTMLNode(node);}}catch(e){return null;}};Application.prototype.wrapHTMLNode=function(node){if(node.constructor&&node.constructor.toString()=='[Window]'){return new HTMLBodyElementWrapper(document.documentElement.lastChild);}else if(node==document.documentElement.lastChild){return new HTMLBodyElementWrapper(node);}else if(!node.tagName){return;}else if(HTMLElementWrapper.classes[node.tagName.toLowerCase()]){return new HTMLElementWrapper.classes[node.tagName.toLowerCase()](node);}else{return new HTMLElementWrapper(node);}};Application.prototype.wrapInnerNode=function(node){if(node==null||!node.getAttribute){return null;}
if(node.getAttribute('htmliinner')==null){return this.wrapNode(node);}
var height=parseInt(node.getAttribute('htmliinner'));while(height-->0){node=node.parentNode;}
return this.wrapNode(node);};Application.prototype.getContainerFor=function(node){var parentNode=node.parentNode;while(parentNode!=null){if(parentNode.className=='container__'){return new Container(parentNode);}
if(parentNode==node.ownerDocument.documentElement){return this;}
if(parentNode.parentNode==null){}
parentNode=parentNode.parentNode;}
return null;};Application.prototype.getPrefix=function(){var p=document.body.getAttribute('htmliprefix');return p==null?'':p;}
if(!window.addEventListener){window.addEventListener=function(type,listener,useCapture){document.attachEvent('on'+type,function(){listener(event)});};}
Application.prototype.dispatch=function(event,obj,eventType){if(eventType==null){if(obj.getAttribute('on'+event)){eval('obj.aux = function(ev) {'+obj.getAttribute('on'+event)+'};');obj.aux();}}else if(obj.dispatchEvent){var ev=document.createEvent(eventType);ev.initEvent(event,true,false);return obj.dispatchEvent(ev);}else if(obj.fireEvent){return obj.fireEvent('on'+event,document.createEventObject(eventType));}};Application.prototype.stopPropagation=function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}};Application.prototype.preventDefault=function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}};Application.prototype.getParent=function(){return null;};Application.prototype.getDocumentElement=function(){return application.wrapNode(document.documentElement);};Application.prototype.getScrollTop=function(){if(self.pageYOffset){return self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}else if(document.body){return document.body.scrollTop;}}
Application.prototype.getScrollLeft=function(){if(self.pageXOffset){return self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollLeft;}else if(document.body){return document.body.scrollLeft;}}
Application.prototype.logError=function(code,message,detail){return new Error(message+'\n\nError code: '+code+'\n\nDetail: '+detail);};var application=new Application();application.nextZIndex=1;application.errorMessage="";application._writeTheme('','');function Container(node){this.node=node;}
Container.prototype.open=function(url,handler){var httpRequest=HttpRequest.create();var container=this;var node=this.node;httpRequest.open("GET",url,true);httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){var text=httpRequest.responseText;node.innerHTML=text;node.setAttribute('name','');window.currentContainer=container;application.evalScripts(text,node,handler);}};httpRequest.send("");};Container.prototype.close=function(){this.node.innerHTML='';}
Container.prototype.getPrefix=function(){return this.node.getAttribute('name');}
Container.prototype.getElementById=function(id){if(this.node.querySelectorAll){var elements=this.node.querySelectorAll('#'+id);return elements.length>0?application.wrapNode(elements[0]):null;}
var n=document.all[id];if(n==null||n.length==null||n.length==0||n.tagName){return application.wrapNode(n);}
var isChildOf=function(obj,p){while(obj){if(obj==p)return true;obj=obj.parentNode;}
return false;};for(var i=0;i<n.length;i++){if(isChildOf(n[i],this.node)){return application.wrapNode(n[i]);}}
return null;}
Container.prototype.getParent=function(){var parentNode=this.node.parentNode;while(parentNode=parentNode.parentNode){if(parentNode.className=='container__'){return new Container(parentNode);}}
return application;}
function NodeListWrapper(nodeList){this.nodeList=nodeList;}
NodeListWrapper.prototype.getLength=function(){return this.nodeList.length;}
NodeListWrapper.prototype.item=function(n){return application.wrapNode(this.nodeList[n]);}
function HTMLCollectionWrapper(collection){this.collection=collection;}
HTMLCollectionWrapper.prototype.getLength=function(){return this.collection.length;}
HTMLCollectionWrapper.prototype.item=function(n){return application.wrapNode(this.collection[n]);}
HTMLCollectionWrapper.prototype.namedItem=function(str){return application.wrapNode(this.namedItem(str));}
function NodeWrapper(){};NodeWrapper.prototype.getNodeName=function(){return this.outerNode.nodeName;};NodeWrapper.prototype.getNodeValue=function(){return this.innerNode.nodeValue;};NodeWrapper.prototype.setNodeValue=function(value){this.innerNode.nodeValue=value;};NodeWrapper.prototype.getNodeType=function(){return this.outerNode.nodeType;};NodeWrapper.prototype.getParentNode=function(){return application.wrapInnerNode(this.outerNode.parentNode);};NodeWrapper.prototype.getChildNodes=function(){return new NodeListWrapper(this.innerNode.childNodes);};NodeWrapper.prototype.getChildren=function(){return new NodeListWrapper(this.innerNode.children);};NodeWrapper.prototype.getFirstChild=function(){return application.wrapNode(this.innerNode.firstChild);};NodeWrapper.prototype.getLastChild=function(){return application.wrapNode(this.innerNode.lastChild);};NodeWrapper.prototype.getFirstElementChild=function(){return application.wrapNode(this.innerNode.children[0]);};NodeWrapper.prototype.getLastElementChild=function(){return application.wrapNode(this.innerNode.children[this.innerNode.children.length-1]);};NodeWrapper.prototype.hasChildren=function(){return this.innerNode.children&&this.innerNode.children.length>0;};NodeWrapper.prototype.getPreviousSibling=function(){return application.wrapNode(this.outerNode.previousSibling);};NodeWrapper.prototype.getPreviousElementSibling=function(){var previous=this.outerNode.previousSibling;while(previous){if(previous.nodeType==1){return application.wrapNode(previous);}
previous=previous.previousSibling;}
return null;};NodeWrapper.prototype.getNextSibling=function(){return application.wrapNode(this.outerNode.nextSibling);};NodeWrapper.prototype.getNextElementSibling=function(){var next=this.outerNode.nextSibling;while(next){if(next.nodeType==1){return application.wrapNode(next);}
next=next.nextSibling;}
return null;};NodeWrapper.prototype.insertBefore=function(newChild,refChild){if(refChild){return application.wrapNode(this.innerNode.insertBefore(newChild.outerNode,refChild.outerNode));}
return application.wrapNode(this.innerNode.insertBefore(newChild.outerNode,null));};NodeWrapper.prototype.replaceChild=function(newChild,oldChild){return application.wrapNode(this.innerNode.replaceChild(newChild.outerNode,oldChild.outerNode));};NodeWrapper.prototype.removeChild=function(oldChild){return application.wrapNode(this.innerNode.removeChild(oldChild.outerNode));};NodeWrapper.prototype.appendChild=function(newChild){return application.wrapNode(this.innerNode.appendChild(newChild.outerNode));};NodeWrapper.prototype.hasChildNodes=function(){return this.innerNode.hasChildNodes();};NodeWrapper.prototype.cloneNode=function(deep){return application.wrapNode(this.outerNode.cloneNode(deep));};function TextWrapper(text){this.outerNode=this.innerNode=text;}
TextWrapper.prototype=new NodeWrapper();function HTMLiElement(outerNode){this.outerNode=outerNode;if(outerNode&&outerNode.id){var inner=document.getElementById(outerNode.id+'__inner');this.innerNode=inner?inner:outerNode;}else{this.innerNode=outerNode;}}
HTMLiElement.prototype=new NodeWrapper();HTMLiElement.prototype.init=function(node,className,tagName){this.outerNode=node;this.className=className;this.tagName=tagName;this.innerNode=node;}
HTMLiElement.prototype.getTagName=function(){return this.tagName;}
HTMLiElement.prototype.getAttribute=function(name){return this.outerNode.getAttribute(name);}
HTMLiElement.prototype.setAttribute=function(name,value){this.outerNode.setAttribute(name,value);}
HTMLiElement.prototype.removeAttribute=function(name){this.outerNode.removeAttribute(name);}
HTMLiElement.prototype.getElementsByTagName=function(name){return new NodeListWrapper(this.innerNode.getElementsByTagName(name));}
HTMLiElement.prototype.getId=function(){return this.outerNode.id;}
HTMLiElement.prototype.setId=function(id){this.outerNode.id=id;}
HTMLiElement.prototype.getTitle=function(){return this.outerNode.title;}
HTMLiElement.prototype.setTitle=function(title){this.outerNode.title=title;}
HTMLiElement.prototype.getLang=function(){return this.outerNode.lang;}
HTMLiElement.prototype.setLang=function(lang){this.outerNode.lang=lang;}
HTMLiElement.prototype.getDir=function(){return this.outerNode.dir;}
HTMLiElement.prototype.setDir=function(dir){this.outerNode.dir=dir;}
HTMLiElement.prototype.getClassName=function(){return this.outerNode.className;}
HTMLiElement.prototype.setClassName=function(className){this.outerNode.className=className;}
HTMLiElement.prototype.getStyle=function(){return this.outerNode.style;}
HTMLiElement.prototype.getClass=function(){return this.className;}
HTMLiElement.prototype.getContainer=function(){return application.getContainerFor(this.outerNode);}
HTMLiElement.prototype.getInnerHTML=function(){return this.innerNode.innerHTML;}
HTMLiElement.prototype.setInnerHTML=function(value){this.innerNode.innerHTML=value;}
HTMLiElement.prototype.getContainingBlock=function(){var node=this.outerNode.parentNode;if(document.defaultView){var view=document.defaultView;while(node!=null&&node!=document){var position=view.getComputedStyle(node,'').getPropertyValue("position");if(position=='absolute'||position=='relative'){return application.wrapNode(node);}
node=node.parentNode;}}else{while(node!=null&&node!=document){var position=node.currentStyle.position;if(position=='absolute'||position=='relative'){return application.wrapNode(node);}
node=node.parentNode;}}
return application.wrapNode(document.documentElement);}
HTMLiElement.prototype.getRelativeX=function(){return this.getX()-this.getContainingBlock().getX();}
HTMLiElement.prototype.getX=function(){if(document.getBoxObjectFor){return document.getBoxObjectFor(this.outerNode).x;}else if(this.outerNode.getBoundingClientRect){return this.outerNode.offsetLeft+(this.outerNode.offsetParent?application.wrapNode(this.outerNode.offsetParent).getX():0);}}
HTMLiElement.prototype.getRelativeY=function(){return this.getY()-this.getContainingBlock().getY()-this.getScrollTop();}
HTMLiElement.prototype.getY=function(){if(document.getBoxObjectFor){return document.getBoxObjectFor(this.outerNode).y;}else if(this.outerNode.getBoundingClientRect){return this.outerNode.offsetTop+(this.outerNode.offsetParent?application.wrapNode(this.outerNode.offsetParent).getY():0);}}
HTMLiElement.prototype.getScrollTop=function(){if(document.getBoxObjectFor){return 0;}else if(this.outerNode.getBoundingClientRect){return this.outerNode.scrollTop+(this.outerNode.offsetParent?application.wrapNode(this.outerNode.offsetParent).getScrollTop():0);}}
HTMLiElement.prototype.getWidth=function(){if(document.getBoxObjectFor){return document.getBoxObjectFor(this.outerNode).width;}else if(this.outerNode.getBoundingClientRect){return this.outerNode.getBoundingClientRect().right-this.outerNode.getBoundingClientRect().left;}}
HTMLiElement.prototype.getHeight=function(){if(document.getBoxObjectFor){return document.getBoxObjectFor(this.outerNode).height;}else if(this.outerNode.getBoundingClientRect){return this.outerNode.getBoundingClientRect().bottom-this.outerNode.getBoundingClientRect().top;}}
HTMLiElement.prototype.center=function(){var style=this.outerNode.style;var htmlElement=application.getDocumentElement();style.top=(document.documentElement.clientHeight/2-this.getHeight()/2+application.getScrollTop())+'px';style.left=(document.documentElement.clientWidth/2-this.getWidth()/2+application.getScrollLeft())+'px';};function HTMLElementWrapper(node){this.innerNode=node;this.outerNode=node;}
HTMLElementWrapper.prototype=new HTMLiElement();HTMLElementWrapper.classes=new Array();function HttpRequest(){}
HttpRequest.create=function(){try{var o=new XMLHttpRequest();return o;}catch(e){}
var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<prefixes.length;i++){try{var o=new ActiveXObject(prefixes[i]+".XmlHttp");return o;}catch(e){}}}
function XmlDocument(){}
XmlDocument.create=function(){if(document.implementation&&document.implementation.createDocument){var doc=document.implementation.createDocument("","",null);if(doc.readyState==null){doc.readyState=1;doc.addEventListener("load",function(){doc.readyState=4;if(typeof doc.onreadystatechange=="function")
doc.onreadystatechange();},false);}
return doc;}else{try{var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<prefixes.length;i++){try{var o=new ActiveXObject(prefixes[i]+".DomDocument");o.setProperty("SelectionLanguage","XPath");return o;}catch(ex){}}}catch(e){}}}
if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){XMLDocument.prototype.loadXML=Document.prototype.loadXML=function(s){var doc2=(new DOMParser()).parseFromString(s,"text/xml");while(this.hasChildNodes())
this.removeChild(this.lastChild);for(var i=0;i<doc2.childNodes.length;i++){this.appendChild(this.adoptNode(doc2.childNodes[i],true));}};XMLDocument.prototype.selectSingleNode=Document.prototype.selectSingleNode=function(xpath){var result=this.evaluate(xpath,this,null,XPathResult.SINGLE_NODE_TYPE,null);if(item=result.iterateNext()){return item;}
return null;};XMLDocument.prototype.selectNodes=Document.prototype.selectNodes=function(xpath){var nodes=new Array();var result=this.evaluate(xpath,this,null,XPathResult.ANY_TYPE,null);var i=0;while(item=result.iterateNext()){nodes[i++]=item;}
return nodes;};XMLDocument.prototype.transformNode=Element.prototype.transformNode=function(xslt){var processor=new XSLTProcessor();processor.importStylesheet(xslt);var result=processor.transformToDocument(this);if(!result.documentElement){return'';}else if(result.documentElement.tagName=='transformiix:result'){var doc=document.createElement('div');if(result.documentElement){var root=result.documentElement;var m=root.childNodes.length;for(var i=0;i<m;i++){doc.appendChild(root.childNodes[0]);}
return doc.innerHTML;}else{return'';}}else{var doc=document.createElement('div');if(result.documentElement){try{doc.appendChild(result.documentElement);}catch(e){doc.appendChild(document.adoptNode(result.documentElement));}}
return doc.innerHTML;}};XMLDocument.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this);});HTMLDocument.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this);});Element.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this);});HTMLElement.prototype.__defineGetter__("outerHTML",function(){var attrs=this.attributes;var str="<"+this.tagName;for(var i=0;i<attrs.length;i++){str+=" "+attrs[i].name+"=\""+attrs[i].value+"\"";}
return str+">"+this.innerHTML+"</"+this.tagName+">";});HTMLElement.prototype.__defineGetter__("runtimeStyle",function(){return document.defaultView.getComputedStyle(this,null);});}
function HTMLAnchorElementWrapper(node){this.init(node,'HTMLAnchorElementWrapper',node.tagName);};HTMLAnchorElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['a']=HTMLAnchorElementWrapper;HTMLAnchorElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLAnchorElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLAnchorElementWrapper.prototype.getCharset=function(){return this.outerNode.charset;};HTMLAnchorElementWrapper.prototype.setCharset=function(value){this.outerNode.charset=value;};HTMLAnchorElementWrapper.prototype.getCoords=function(){return this.outerNode.coords;};HTMLAnchorElementWrapper.prototype.setCoords=function(value){this.outerNode.coords=value;};HTMLAnchorElementWrapper.prototype.getHref=function(){return this.outerNode.href;};HTMLAnchorElementWrapper.prototype.setHref=function(value){this.outerNode.href=value;};HTMLAnchorElementWrapper.prototype.getHrefLang=function(){return this.outerNode.hrefLang;};HTMLAnchorElementWrapper.prototype.setHrefLang=function(value){this.outerNode.hrefLang=value;};HTMLAnchorElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLAnchorElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLAnchorElementWrapper.prototype.getRel=function(){return this.outerNode.rel;};HTMLAnchorElementWrapper.prototype.setRel=function(value){this.outerNode.rel=value;};HTMLAnchorElementWrapper.prototype.getRev=function(){return this.outerNode.rev;};HTMLAnchorElementWrapper.prototype.setRev=function(value){this.outerNode.rev=value;};HTMLAnchorElementWrapper.prototype.getShape=function(){return this.outerNode.shape;};HTMLAnchorElementWrapper.prototype.setShape=function(value){this.outerNode.shape=value;};HTMLAnchorElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLAnchorElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLAnchorElementWrapper.prototype.getTarget=function(){return this.outerNode.target;};HTMLAnchorElementWrapper.prototype.setTarget=function(value){this.outerNode.target=value;};HTMLAnchorElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLAnchorElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLAnchorElementWrapper.prototype.blur=function(){return this.outerNode.blur();};HTMLAnchorElementWrapper.prototype.focus=function(){return this.outerNode.focus();};function HTMLAppletElementWrapper(node){this.init(node,'HTMLAppletElementWrapper',node.tagName);};HTMLAppletElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['applet']=HTMLAppletElementWrapper;HTMLAppletElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLAppletElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLAppletElementWrapper.prototype.getAlt=function(){return this.outerNode.alt;};HTMLAppletElementWrapper.prototype.setAlt=function(value){this.outerNode.alt=value;};HTMLAppletElementWrapper.prototype.getArchive=function(){return this.outerNode.archive;};HTMLAppletElementWrapper.prototype.setArchive=function(value){this.outerNode.archive=value;};HTMLAppletElementWrapper.prototype.getCode=function(){return this.outerNode.code;};HTMLAppletElementWrapper.prototype.setCode=function(value){this.outerNode.code=value;};HTMLAppletElementWrapper.prototype.getCodeBase=function(){return this.outerNode.codeBase;};HTMLAppletElementWrapper.prototype.setCodeBase=function(value){this.outerNode.codeBase=value;};HTMLAppletElementWrapper.prototype.getHeight=function(){return this.outerNode.height;};HTMLAppletElementWrapper.prototype.setHeight=function(value){this.outerNode.height=value;};HTMLAppletElementWrapper.prototype.getHspace=function(){return this.outerNode.hspace;};HTMLAppletElementWrapper.prototype.setHspace=function(value){this.outerNode.hspace=value;};HTMLAppletElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLAppletElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLAppletElementWrapper.prototype.getObject=function(){return this.outerNode.object;};HTMLAppletElementWrapper.prototype.setObject=function(value){this.outerNode.object=value;};HTMLAppletElementWrapper.prototype.getVspace=function(){return this.outerNode.vspace;};HTMLAppletElementWrapper.prototype.setVspace=function(value){this.outerNode.vspace=value;};HTMLAppletElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLAppletElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLAreaElementWrapper(node){this.init(node,'HTMLAreaElementWrapper',node.tagName);};HTMLAreaElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['area']=HTMLAreaElementWrapper;HTMLAreaElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLAreaElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLAreaElementWrapper.prototype.getAlt=function(){return this.outerNode.alt;};HTMLAreaElementWrapper.prototype.setAlt=function(value){this.outerNode.alt=value;};HTMLAreaElementWrapper.prototype.getCoords=function(){return this.outerNode.coords;};HTMLAreaElementWrapper.prototype.setCoords=function(value){this.outerNode.coords=value;};HTMLAreaElementWrapper.prototype.getHref=function(){return this.outerNode.href;};HTMLAreaElementWrapper.prototype.setHref=function(value){this.outerNode.href=value;};HTMLAreaElementWrapper.prototype.getNoHref=function(){return this.outerNode.noHref;};HTMLAreaElementWrapper.prototype.setNoHref=function(value){this.outerNode.noHref=value;};HTMLAreaElementWrapper.prototype.getShape=function(){return this.outerNode.shape;};HTMLAreaElementWrapper.prototype.setShape=function(value){this.outerNode.shape=value;};HTMLAreaElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLAreaElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLAreaElementWrapper.prototype.getTarget=function(){return this.outerNode.target;};HTMLAreaElementWrapper.prototype.setTarget=function(value){this.outerNode.target=value;};function HTMLBaseElementWrapper(node){this.init(node,'HTMLBaseElementWrapper',node.tagName);};HTMLBaseElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['base']=HTMLBaseElementWrapper;HTMLBaseElementWrapper.prototype.getHref=function(){return this.outerNode.href;};HTMLBaseElementWrapper.prototype.setHref=function(value){this.outerNode.href=value;};HTMLBaseElementWrapper.prototype.getTarget=function(){return this.outerNode.target;};HTMLBaseElementWrapper.prototype.setTarget=function(value){this.outerNode.target=value;};function HTMLBaseFontElementWrapper(node){this.init(node,'HTMLBaseFontElementWrapper',node.tagName);};HTMLBaseFontElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['basefont']=HTMLBaseFontElementWrapper;HTMLBaseFontElementWrapper.prototype.getColor=function(){return this.outerNode.color;};HTMLBaseFontElementWrapper.prototype.setColor=function(value){this.outerNode.color=value;};HTMLBaseFontElementWrapper.prototype.getFace=function(){return this.outerNode.face;};HTMLBaseFontElementWrapper.prototype.setFace=function(value){this.outerNode.face=value;};HTMLBaseFontElementWrapper.prototype.getSize=function(){return this.outerNode.size;};HTMLBaseFontElementWrapper.prototype.setSize=function(value){this.outerNode.size=value;};function HTMLBodyElementWrapper(node){this.init(node,'HTMLBodyElementWrapper',node.tagName);};HTMLBodyElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['body']=HTMLBodyElementWrapper;HTMLBodyElementWrapper.prototype.getALink=function(){return this.outerNode.aLink;};HTMLBodyElementWrapper.prototype.setALink=function(value){this.outerNode.aLink=value;};HTMLBodyElementWrapper.prototype.getBackground=function(){return this.outerNode.background;};HTMLBodyElementWrapper.prototype.setBackground=function(value){this.outerNode.background=value;};HTMLBodyElementWrapper.prototype.getBgColor=function(){return this.outerNode.bgColor;};HTMLBodyElementWrapper.prototype.setBgColor=function(value){this.outerNode.bgColor=value;};HTMLBodyElementWrapper.prototype.getLink=function(){return this.outerNode.link;};HTMLBodyElementWrapper.prototype.setLink=function(value){this.outerNode.link=value;};HTMLBodyElementWrapper.prototype.getText=function(){return this.outerNode.text;};HTMLBodyElementWrapper.prototype.setText=function(value){this.outerNode.text=value;};HTMLBodyElementWrapper.prototype.getVLink=function(){return this.outerNode.vLink;};HTMLBodyElementWrapper.prototype.setVLink=function(value){this.outerNode.vLink=value;};function HTMLBrElementWrapper(node){this.init(node,'HTMLBrElementWrapper',node.tagName);};HTMLBrElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['br']=HTMLBrElementWrapper;HTMLBrElementWrapper.prototype.getClear=function(){return this.outerNode.clear;};HTMLBrElementWrapper.prototype.setClear=function(value){this.outerNode.clear=value;};function HTMLButtonElementWrapper(node){this.init(node,'HTMLButtonElementWrapper',node.tagName);};HTMLButtonElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['button']=HTMLButtonElementWrapper;HTMLButtonElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLButtonElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLButtonElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLButtonElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLButtonElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLButtonElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLButtonElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLButtonElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLButtonElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLButtonElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLButtonElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLButtonElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};function HTMLDirectoryElementWrapper(node){this.init(node,'HTMLDirectoryElementWrapper',node.tagName);};HTMLDirectoryElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['directory']=HTMLDirectoryElementWrapper;HTMLDirectoryElementWrapper.prototype.getCompact=function(){return this.outerNode.compact;};HTMLDirectoryElementWrapper.prototype.setCompact=function(value){this.outerNode.compact=value;};function HTMLDivElementWrapper(node){this.init(node,'HTMLDivElementWrapper',node.tagName);};HTMLDivElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['div']=HTMLDivElementWrapper;HTMLDivElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLDivElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};function HTMLDListElementWrapper(node){this.init(node,'HTMLDListElementWrapper',node.tagName);};HTMLDListElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['dlist']=HTMLDListElementWrapper;HTMLDListElementWrapper.prototype.getCompact=function(){return this.outerNode.compact;};HTMLDListElementWrapper.prototype.setCompact=function(value){this.outerNode.compact=value;};function HTMLFieldSetElementWrapper(node){this.init(node,'HTMLFieldSetElementWrapper',node.tagName);};HTMLFieldSetElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['fieldset']=HTMLFieldSetElementWrapper;HTMLFieldSetElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};function HTMLFontElementWrapper(node){this.init(node,'HTMLFontElementWrapper',node.tagName);};HTMLFontElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['font']=HTMLFontElementWrapper;HTMLFontElementWrapper.prototype.getColor=function(){return this.outerNode.color;};HTMLFontElementWrapper.prototype.setColor=function(value){this.outerNode.color=value;};HTMLFontElementWrapper.prototype.getFace=function(){return this.outerNode.face;};HTMLFontElementWrapper.prototype.setFace=function(value){this.outerNode.face=value;};HTMLFontElementWrapper.prototype.getSize=function(){return this.outerNode.size;};HTMLFontElementWrapper.prototype.setSize=function(value){this.outerNode.size=value;};function HTMLFormElementWrapper(node){this.init(node,'HTMLFormElementWrapper',node.tagName);};HTMLFormElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['form']=HTMLFormElementWrapper;HTMLFormElementWrapper.prototype.getAcceptCharset=function(){return this.outerNode.acceptCharset;};HTMLFormElementWrapper.prototype.setAcceptCharset=function(value){this.outerNode.acceptCharset=value;};HTMLFormElementWrapper.prototype.getAction=function(){return this.outerNode.action;};HTMLFormElementWrapper.prototype.setAction=function(value){this.outerNode.action=value;};HTMLFormElementWrapper.prototype.getElements=function(){return new HTMLCollectionWrapper(this.outerNode.elements);};HTMLFormElementWrapper.prototype.getEnctype=function(){return this.outerNode.enctype;};HTMLFormElementWrapper.prototype.setEnctype=function(value){this.outerNode.enctype=value;};HTMLFormElementWrapper.prototype.getLength=function(){return this.outerNode.length;};HTMLFormElementWrapper.prototype.getMethod=function(){return this.outerNode.method;};HTMLFormElementWrapper.prototype.setMethod=function(value){this.outerNode.method=value;};HTMLFormElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLFormElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLFormElementWrapper.prototype.getTarget=function(){return this.outerNode.target;};HTMLFormElementWrapper.prototype.setTarget=function(value){this.outerNode.target=value;};HTMLFormElementWrapper.prototype.reset=function(){return this.outerNode.reset();};HTMLFormElementWrapper.prototype.submit=function(){return this.outerNode.submit();};function HTMLFrameElementWrapper(node){this.init(node,'HTMLFrameElementWrapper',node.tagName);};HTMLFrameElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['frame']=HTMLFrameElementWrapper;HTMLFrameElementWrapper.prototype.getContentDocument=function(){return this.outerNode.contentDocument;};HTMLFrameElementWrapper.prototype.getFrameBorder=function(){return this.outerNode.frameBorder;};HTMLFrameElementWrapper.prototype.setFrameBorder=function(value){this.outerNode.frameBorder=value;};HTMLFrameElementWrapper.prototype.getLongDesc=function(){return this.outerNode.longDesc;};HTMLFrameElementWrapper.prototype.setLongDesc=function(value){this.outerNode.longDesc=value;};HTMLFrameElementWrapper.prototype.getMarginHeight=function(){return this.outerNode.marginHeight;};HTMLFrameElementWrapper.prototype.setMarginHeight=function(value){this.outerNode.marginHeight=value;};HTMLFrameElementWrapper.prototype.getMarginWidth=function(){return this.outerNode.marginWidth;};HTMLFrameElementWrapper.prototype.setMarginWidth=function(value){this.outerNode.marginWidth=value;};HTMLFrameElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLFrameElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLFrameElementWrapper.prototype.getNoResize=function(){return this.outerNode.noResize;};HTMLFrameElementWrapper.prototype.setNoResize=function(value){this.outerNode.noResize=value;};HTMLFrameElementWrapper.prototype.getScrolling=function(){return this.outerNode.scrolling;};HTMLFrameElementWrapper.prototype.setScrolling=function(value){this.outerNode.scrolling=value;};HTMLFrameElementWrapper.prototype.getSrc=function(){return this.outerNode.src;};HTMLFrameElementWrapper.prototype.setSrc=function(value){this.outerNode.src=value;};function HTMLFrameSetElementWrapper(node){this.init(node,'HTMLFrameSetElementWrapper',node.tagName);};HTMLFrameSetElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['frameset']=HTMLFrameSetElementWrapper;HTMLFrameSetElementWrapper.prototype.getCols=function(){return this.outerNode.cols;};HTMLFrameSetElementWrapper.prototype.setCols=function(value){this.outerNode.cols=value;};HTMLFrameSetElementWrapper.prototype.getRows=function(){return this.outerNode.rows;};HTMLFrameSetElementWrapper.prototype.setRows=function(value){this.outerNode.rows=value;};function HTMLHeadElementWrapper(node){this.init(node,'HTMLHeadElementWrapper',node.tagName);};HTMLHeadElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['head']=HTMLHeadElementWrapper;HTMLHeadElementWrapper.prototype.getProfile=function(){return this.outerNode.profile;};HTMLHeadElementWrapper.prototype.setProfile=function(value){this.outerNode.profile=value;};function HTMLHeadingElementWrapper(node){this.init(node,'HTMLHeadingElementWrapper',node.tagName);};HTMLHeadingElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['h1']=HTMLHeadingElementWrapper;HTMLElementWrapper.classes['h2']=HTMLHeadingElementWrapper;HTMLElementWrapper.classes['h3']=HTMLHeadingElementWrapper;HTMLElementWrapper.classes['h4']=HTMLHeadingElementWrapper;HTMLElementWrapper.classes['h5']=HTMLHeadingElementWrapper;HTMLElementWrapper.classes['h6']=HTMLHeadingElementWrapper;HTMLHeadingElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLHeadingElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};function HTMLHrElementWrapper(node){this.init(node,'HTMLHrElementWrapper',node.tagName);};HTMLHrElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['hr']=HTMLHrElementWrapper;HTMLHrElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLHrElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLHrElementWrapper.prototype.getNoShade=function(){return this.outerNode.noShade;};HTMLHrElementWrapper.prototype.setNoShade=function(value){this.outerNode.noShade=value;};HTMLHrElementWrapper.prototype.getSize=function(){return this.outerNode.size;};HTMLHrElementWrapper.prototype.setSize=function(value){this.outerNode.size=value;};HTMLHrElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLHrElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLHtmlElementWrapper(node){this.init(node,'HTMLHtmlElementWrapper',node.tagName);};HTMLHtmlElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['html']=HTMLHtmlElementWrapper;HTMLHtmlElementWrapper.prototype.getVersion=function(){return this.outerNode.version;};HTMLHtmlElementWrapper.prototype.setVersion=function(value){this.outerNode.version=value;};function HTMLIFrameElementWrapper(node){this.init(node,'HTMLIFrameElementWrapper',node.tagName);};HTMLIFrameElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['iframe']=HTMLIFrameElementWrapper;HTMLIFrameElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLIFrameElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLIFrameElementWrapper.prototype.getContentDocument=function(){return this.outerNode.contentDocument;};HTMLIFrameElementWrapper.prototype.getFrameBorder=function(){return this.outerNode.frameBorder;};HTMLIFrameElementWrapper.prototype.setFrameBorder=function(value){this.outerNode.frameBorder=value;};HTMLIFrameElementWrapper.prototype.getHeight=function(){return this.outerNode.height;};HTMLIFrameElementWrapper.prototype.setHeight=function(value){this.outerNode.height=value;};HTMLIFrameElementWrapper.prototype.getLongDesc=function(){return this.outerNode.longDesc;};HTMLIFrameElementWrapper.prototype.setLongDesc=function(value){this.outerNode.longDesc=value;};HTMLIFrameElementWrapper.prototype.getMarginHeight=function(){return this.outerNode.marginHeight;};HTMLIFrameElementWrapper.prototype.setMarginHeight=function(value){this.outerNode.marginHeight=value;};HTMLIFrameElementWrapper.prototype.getMarginWidth=function(){return this.outerNode.marginWidth;};HTMLIFrameElementWrapper.prototype.setMarginWidth=function(value){this.outerNode.marginWidth=value;};HTMLIFrameElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLIFrameElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLIFrameElementWrapper.prototype.getScrolling=function(){return this.outerNode.scrolling;};HTMLIFrameElementWrapper.prototype.setScrolling=function(value){this.outerNode.scrolling=value;};HTMLIFrameElementWrapper.prototype.getSrc=function(){return this.outerNode.src;};HTMLIFrameElementWrapper.prototype.setSrc=function(value){this.outerNode.src=value;};HTMLIFrameElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLIFrameElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLImageElementWrapper(node){this.init(node,'HTMLImageElementWrapper',node.tagName);};HTMLImageElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['img']=HTMLImageElementWrapper;HTMLImageElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLImageElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLImageElementWrapper.prototype.getAlt=function(){return this.outerNode.alt;};HTMLImageElementWrapper.prototype.setAlt=function(value){this.outerNode.alt=value;};HTMLImageElementWrapper.prototype.getBorder=function(){return this.outerNode.border;};HTMLImageElementWrapper.prototype.setBorder=function(value){this.outerNode.border=value;};HTMLImageElementWrapper.prototype.getHeight=function(){return this.outerNode.height;};HTMLImageElementWrapper.prototype.setHeight=function(value){this.outerNode.height=value;};HTMLImageElementWrapper.prototype.getHspace=function(){return this.outerNode.hspace;};HTMLImageElementWrapper.prototype.setHspace=function(value){this.outerNode.hspace=value;};HTMLImageElementWrapper.prototype.getIsMap=function(){return this.outerNode.isMap;};HTMLImageElementWrapper.prototype.setIsMap=function(value){this.outerNode.isMap=value;};HTMLImageElementWrapper.prototype.getLongDesc=function(){return this.outerNode.longDesc;};HTMLImageElementWrapper.prototype.setLongDesc=function(value){this.outerNode.longDesc=value;};HTMLImageElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLImageElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLImageElementWrapper.prototype.getSrc=function(){return this.outerNode.src;};HTMLImageElementWrapper.prototype.setSrc=function(value){this.outerNode.src=value;};HTMLImageElementWrapper.prototype.getUseMap=function(){return this.outerNode.useMap;};HTMLImageElementWrapper.prototype.setUseMap=function(value){this.outerNode.useMap=value;};HTMLImageElementWrapper.prototype.getVspace=function(){return this.outerNode.vspace;};HTMLImageElementWrapper.prototype.setVspace=function(value){this.outerNode.vspace=value;};HTMLImageElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLImageElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLInputElementWrapper(node){this.init(node,'HTMLInputElementWrapper',node.tagName);};HTMLInputElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['input']=HTMLInputElementWrapper;HTMLInputElementWrapper.prototype.getDefaultValue=function(){return this.outerNode.defaultValue;};HTMLInputElementWrapper.prototype.setDefaultValue=function(value){this.outerNode.defaultValue=value;};HTMLInputElementWrapper.prototype.getDefaultChecked=function(){return this.outerNode.defaultChecked;};HTMLInputElementWrapper.prototype.setDefaultChecked=function(value){this.outerNode.defaultChecked=value;};HTMLInputElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLInputElementWrapper.prototype.getAccept=function(){return this.outerNode.accept;};HTMLInputElementWrapper.prototype.setAccept=function(value){this.outerNode.accept=value;};HTMLInputElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLInputElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLInputElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLInputElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLInputElementWrapper.prototype.getAlt=function(){return this.outerNode.alt;};HTMLInputElementWrapper.prototype.setAlt=function(value){this.outerNode.alt=value;};HTMLInputElementWrapper.prototype.getChecked=function(){return this.outerNode.checked;};HTMLInputElementWrapper.prototype.setChecked=function(value){this.outerNode.checked=value;};HTMLInputElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLInputElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLInputElementWrapper.prototype.getMaxLength=function(){return this.outerNode.maxLength;};HTMLInputElementWrapper.prototype.setMaxLength=function(value){this.outerNode.maxLength=value;};HTMLInputElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLInputElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLInputElementWrapper.prototype.getReadOnly=function(){return this.outerNode.readOnly;};HTMLInputElementWrapper.prototype.setReadOnly=function(value){this.outerNode.readOnly=value;};HTMLInputElementWrapper.prototype.getSize=function(){return this.outerNode.size;};HTMLInputElementWrapper.prototype.setSize=function(value){this.outerNode.size=value;};HTMLInputElementWrapper.prototype.getSrc=function(){return this.outerNode.src;};HTMLInputElementWrapper.prototype.setSrc=function(value){this.outerNode.src=value;};HTMLInputElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLInputElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLInputElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLInputElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLInputElementWrapper.prototype.getUseMap=function(){return this.outerNode.useMap;};HTMLInputElementWrapper.prototype.setUseMap=function(value){this.outerNode.useMap=value;};HTMLInputElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLInputElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};HTMLInputElementWrapper.prototype.blur=function(){return this.outerNode.blur();};HTMLInputElementWrapper.prototype.focus=function(){return this.outerNode.focus();};HTMLInputElementWrapper.prototype.select=function(){return this.outerNode.select();};HTMLInputElementWrapper.prototype.click=function(){return this.outerNode.click();};function HTMLIsIndexElementWrapper(node){this.init(node,'HTMLIsIndexElementWrapper',node.tagName);};HTMLIsIndexElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['isindex']=HTMLIsIndexElementWrapper;HTMLIsIndexElementWrapper.prototype.getForm=function(){return this.outerNode.form;};HTMLIsIndexElementWrapper.prototype.getPrompt=function(){return this.outerNode.prompt;};HTMLIsIndexElementWrapper.prototype.setPrompt=function(value){this.outerNode.prompt=value;};function HTMLLabelElementWrapper(node){this.init(node,'HTMLLabelElementWrapper',node.tagName);};HTMLLabelElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['label']=HTMLLabelElementWrapper;HTMLLabelElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLLabelElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLLabelElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLLabelElementWrapper.prototype.getHtmlFor=function(){return this.outerNode.htmlFor;};HTMLLabelElementWrapper.prototype.setHtmlFor=function(value){this.outerNode.htmlFor=value;};function HTMLLegendElementWrapper(node){this.init(node,'HTMLLegendElementWrapper',node.tagName);};HTMLLegendElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['legend']=HTMLLegendElementWrapper;HTMLLegendElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLLegendElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLLegendElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLLegendElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLLegendElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};function HTMLLIElementWrapper(node){this.init(node,'HTMLLIElementWrapper',node.tagName);};HTMLLIElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['li']=HTMLLIElementWrapper;HTMLLIElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLLIElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLLIElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLLIElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};function HTMLLinkElementWrapper(node){this.init(node,'HTMLLinkElementWrapper',node.tagName);};HTMLLinkElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['link']=HTMLLinkElementWrapper;HTMLLinkElementWrapper.prototype.getCharset=function(){return this.outerNode.charset;};HTMLLinkElementWrapper.prototype.setCharset=function(value){this.outerNode.charset=value;};HTMLLinkElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLLinkElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLLinkElementWrapper.prototype.getHref=function(){return this.outerNode.href;};HTMLLinkElementWrapper.prototype.setHref=function(value){this.outerNode.href=value;};HTMLLinkElementWrapper.prototype.getHreflang=function(){return this.outerNode.hreflang;};HTMLLinkElementWrapper.prototype.setHreflang=function(value){this.outerNode.hreflang=value;};HTMLLinkElementWrapper.prototype.getMedia=function(){return this.outerNode.media;};HTMLLinkElementWrapper.prototype.setMedia=function(value){this.outerNode.media=value;};HTMLLinkElementWrapper.prototype.getRel=function(){return this.outerNode.rel;};HTMLLinkElementWrapper.prototype.setRel=function(value){this.outerNode.rel=value;};HTMLLinkElementWrapper.prototype.getRev=function(){return this.outerNode.rev;};HTMLLinkElementWrapper.prototype.setRev=function(value){this.outerNode.rev=value;};HTMLLinkElementWrapper.prototype.getTarget=function(){return this.outerNode.target;};HTMLLinkElementWrapper.prototype.setTarget=function(value){this.outerNode.target=value;};HTMLLinkElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLLinkElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};function HTMLMapElementWrapper(node){this.init(node,'HTMLMapElementWrapper',node.tagName);};HTMLMapElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['map']=HTMLMapElementWrapper;HTMLMapElementWrapper.prototype.getAreas=function(){return new HTMLCollectionWrapper(this.outerNode.areas);};HTMLMapElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLMapElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};function HTMLMenuElementWrapper(node){this.init(node,'HTMLMenuElementWrapper',node.tagName);};HTMLMenuElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['menu']=HTMLMenuElementWrapper;HTMLMenuElementWrapper.prototype.getCompact=function(){return this.outerNode.compact;};HTMLMenuElementWrapper.prototype.setCompact=function(value){this.outerNode.compact=value;};function HTMLMetaElementWrapper(node){this.init(node,'HTMLMetaElementWrapper',node.tagName);};HTMLMetaElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['meta']=HTMLMetaElementWrapper;HTMLMetaElementWrapper.prototype.getContent=function(){return this.outerNode.content;};HTMLMetaElementWrapper.prototype.setContent=function(value){this.outerNode.content=value;};HTMLMetaElementWrapper.prototype.getHttpEquiv=function(){return this.outerNode.httpEquiv;};HTMLMetaElementWrapper.prototype.setHttpEquiv=function(value){this.outerNode.httpEquiv=value;};HTMLMetaElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLMetaElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLMetaElementWrapper.prototype.getScheme=function(){return this.outerNode.scheme;};HTMLMetaElementWrapper.prototype.setScheme=function(value){this.outerNode.scheme=value;};function HTMLModElementWrapper(node){this.init(node,'HTMLModElementWrapper',node.tagName);};HTMLModElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['ins']=HTMLModElementWrapper;HTMLElementWrapper.classes['del']=HTMLModElementWrapper;HTMLModElementWrapper.prototype.getCite=function(){return this.outerNode.cite;};HTMLModElementWrapper.prototype.setCite=function(value){this.outerNode.cite=value;};HTMLModElementWrapper.prototype.getDateTime=function(){return this.outerNode.dateTime;};HTMLModElementWrapper.prototype.setDateTime=function(value){this.outerNode.dateTime=value;};function HTMLObjectElementWrapper(node){this.init(node,'HTMLObjectElementWrapper',node.tagName);};HTMLObjectElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['object']=HTMLObjectElementWrapper;HTMLObjectElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLObjectElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLObjectElementWrapper.prototype.getArchive=function(){return this.outerNode.archive;};HTMLObjectElementWrapper.prototype.setArchive=function(value){this.outerNode.archive=value;};HTMLObjectElementWrapper.prototype.getBorder=function(){return this.outerNode.border;};HTMLObjectElementWrapper.prototype.setBorder=function(value){this.outerNode.border=value;};HTMLObjectElementWrapper.prototype.getCode=function(){return this.outerNode.code;};HTMLObjectElementWrapper.prototype.setCode=function(value){this.outerNode.code=value;};HTMLObjectElementWrapper.prototype.getCodeBase=function(){return this.outerNode.codeBase;};HTMLObjectElementWrapper.prototype.setCodeBase=function(value){this.outerNode.codeBase=value;};HTMLObjectElementWrapper.prototype.getCodeType=function(){return this.outerNode.codeType;};HTMLObjectElementWrapper.prototype.setCodeType=function(value){this.outerNode.codeType=value;};HTMLObjectElementWrapper.prototype.getContentDocument=function(){return this.outerNode.contentDocument;};HTMLObjectElementWrapper.prototype.getData=function(){return this.outerNode.data;};HTMLObjectElementWrapper.prototype.setData=function(value){this.outerNode.data=value;};HTMLObjectElementWrapper.prototype.getDeclare=function(){return this.outerNode.declare;};HTMLObjectElementWrapper.prototype.setDeclare=function(value){this.outerNode.declare=value;};HTMLObjectElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLObjectElementWrapper.prototype.setForm=function(value){this.outerNode.form=value;};HTMLObjectElementWrapper.prototype.getHeight=function(){return this.outerNode.height;};HTMLObjectElementWrapper.prototype.setHeight=function(value){this.outerNode.height=value;};HTMLObjectElementWrapper.prototype.getHspace=function(){return this.outerNode.hspace;};HTMLObjectElementWrapper.prototype.setHspace=function(value){this.outerNode.hspace=value;};HTMLObjectElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLObjectElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLObjectElementWrapper.prototype.getStandBy=function(){return this.outerNode.standBy;};HTMLObjectElementWrapper.prototype.setStandBy=function(value){this.outerNode.standBy=value;};HTMLObjectElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLObjectElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLObjectElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLObjectElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLObjectElementWrapper.prototype.getUseMap=function(){return this.outerNode.useMap;};HTMLObjectElementWrapper.prototype.setUseMap=function(value){this.outerNode.useMap=value;};HTMLObjectElementWrapper.prototype.getVspace=function(){return this.outerNode.vspace;};HTMLObjectElementWrapper.prototype.setVspace=function(value){this.outerNode.vspace=value;};HTMLObjectElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLObjectElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLOListElementWrapper(node){this.init(node,'HTMLOListElementWrapper',node.tagName);};HTMLOListElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['olist']=HTMLOListElementWrapper;HTMLOListElementWrapper.prototype.getCompact=function(){return this.outerNode.compact;};HTMLOListElementWrapper.prototype.setCompact=function(value){this.outerNode.compact=value;};HTMLOListElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLOListElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLOListElementWrapper.prototype.getStart=function(){return this.outerNode.start;};HTMLOListElementWrapper.prototype.setStart=function(value){this.outerNode.start=value;};function HTMLOptGroupElementWrapper(node){this.init(node,'HTMLOptGroupElementWrapper',node.tagName);};HTMLOptGroupElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['optgroup']=HTMLOptGroupElementWrapper;HTMLOptGroupElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLOptGroupElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLOptGroupElementWrapper.prototype.getLabel=function(){return this.outerNode.label;};HTMLOptGroupElementWrapper.prototype.setLabel=function(value){this.outerNode.label=value;};function HTMLOptionElementWrapper(node){this.init(node,'HTMLOptionElementWrapper',node.tagName);};HTMLOptionElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['option']=HTMLOptionElementWrapper;HTMLOptionElementWrapper.prototype.getDefaultSelected=function(){return this.outerNode.defaultSelected;};HTMLOptionElementWrapper.prototype.setDefaultSelected=function(value){this.outerNode.defaultSelected=value;};HTMLOptionElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLOptionElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLOptionElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLOptionElementWrapper.prototype.getIndex=function(){return this.outerNode.index;};HTMLOptionElementWrapper.prototype.getLabel=function(){return this.outerNode.label;};HTMLOptionElementWrapper.prototype.setLabel=function(value){this.outerNode.label=value;};HTMLOptionElementWrapper.prototype.getSelected=function(){return this.outerNode.selected;};HTMLOptionElementWrapper.prototype.setSelected=function(value){this.outerNode.selected=value;};HTMLOptionElementWrapper.prototype.getText=function(){return this.outerNode.text;};HTMLOptionElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLOptionElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};function HTMLOptionsCollectionWrapper(node){this.init(node,'HTMLOptionsCollectionWrapper',node.tagName);};HTMLOptionsCollectionWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['']=HTMLOptionsCollectionWrapper;HTMLOptionsCollectionWrapper.prototype.getLength=function(){return this.outerNode.length;};HTMLOptionsCollectionWrapper.prototype.setLength=function(value){this.outerNode.length=value;};HTMLOptionsCollectionWrapper.prototype.item=function(index){return application.wrapHTMLNode(this.outerNode.item(index));};HTMLOptionsCollectionWrapper.prototype.namedItem=function(name){return application.wrapHTMLNode(this.outerNode.namedItem(name));};function HTMLParagraphElementWrapper(node){this.init(node,'HTMLParagraphElementWrapper',node.tagName);};HTMLParagraphElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['p']=HTMLParagraphElementWrapper;HTMLParagraphElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLParagraphElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};function HTMLParamElementWrapper(node){this.init(node,'HTMLParamElementWrapper',node.tagName);};HTMLParamElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['param']=HTMLParamElementWrapper;HTMLParamElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLParamElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLParamElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLParamElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};HTMLParamElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLParamElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};HTMLParamElementWrapper.prototype.getValueType=function(){return this.outerNode.valueType;};HTMLParamElementWrapper.prototype.setValueType=function(value){this.outerNode.valueType=value;};function HTMLPreElementWrapper(node){this.init(node,'HTMLPreElementWrapper',node.tagName);};HTMLPreElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['pre']=HTMLPreElementWrapper;HTMLPreElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLPreElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLQuoteElementWrapper(node){this.init(node,'HTMLQuoteElementWrapper',node.tagName);};HTMLQuoteElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['q']=HTMLQuoteElementWrapper;HTMLElementWrapper.classes['blockquote']=HTMLQuoteElementWrapper;HTMLQuoteElementWrapper.prototype.getCite=function(){return this.outerNode.cite;};HTMLQuoteElementWrapper.prototype.setCite=function(value){this.outerNode.cite=value;};function HTMLScriptElementWrapper(node){this.init(node,'HTMLScriptElementWrapper',node.tagName);};HTMLScriptElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['script']=HTMLScriptElementWrapper;HTMLScriptElementWrapper.prototype.getCharset=function(){return this.outerNode.charset;};HTMLScriptElementWrapper.prototype.setCharset=function(value){this.outerNode.charset=value;};HTMLScriptElementWrapper.prototype.getDefer=function(){return this.outerNode.defer;};HTMLScriptElementWrapper.prototype.setDefer=function(value){this.outerNode.defer=value;};HTMLScriptElementWrapper.prototype.getEvent=function(){return this.outerNode.event;};HTMLScriptElementWrapper.prototype.setEvent=function(value){this.outerNode.event=value;};HTMLScriptElementWrapper.prototype.getHtmlFor=function(){return this.outerNode.htmlFor;};HTMLScriptElementWrapper.prototype.setHtmlFor=function(value){this.outerNode.htmlFor=value;};HTMLScriptElementWrapper.prototype.getSrc=function(){return this.outerNode.src;};HTMLScriptElementWrapper.prototype.setSrc=function(value){this.outerNode.src=value;};HTMLScriptElementWrapper.prototype.getText=function(){return this.outerNode.text;};HTMLScriptElementWrapper.prototype.setText=function(value){this.outerNode.text=value;};HTMLScriptElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLScriptElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};function HTMLSelectElementWrapper(node){this.init(node,'HTMLSelectElementWrapper',node.tagName);};HTMLSelectElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['select']=HTMLSelectElementWrapper;HTMLSelectElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLSelectElementWrapper.prototype.getSelectedIndex=function(){return this.outerNode.selectedIndex;};HTMLSelectElementWrapper.prototype.setSelectedIndex=function(value){this.outerNode.selectedIndex=value;};HTMLSelectElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLSelectElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};HTMLSelectElementWrapper.prototype.getLength=function(){return this.outerNode.length;};HTMLSelectElementWrapper.prototype.setLength=function(value){this.outerNode.length=value;};HTMLSelectElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLSelectElementWrapper.prototype.getOptions=function(){return new HTMLOptionsCollectionWrapper(this.outerNode.options);};HTMLSelectElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLSelectElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLSelectElementWrapper.prototype.getMultiple=function(){return this.outerNode.multiple;};HTMLSelectElementWrapper.prototype.setMultiple=function(value){this.outerNode.multiple=value;};HTMLSelectElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLSelectElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLSelectElementWrapper.prototype.getSize=function(){return this.outerNode.size;};HTMLSelectElementWrapper.prototype.setSize=function(value){this.outerNode.size=value;};HTMLSelectElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLSelectElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLSelectElementWrapper.prototype.add=function(element,before){return this.outerNode.add(element,before);};HTMLSelectElementWrapper.prototype.remove=function(index){return this.outerNode.remove(index);};HTMLSelectElementWrapper.prototype.blur=function(){return this.outerNode.blur();};HTMLSelectElementWrapper.prototype.focus=function(){return this.outerNode.focus();};function HTMLStyleElementWrapper(node){this.init(node,'HTMLStyleElementWrapper',node.tagName);};HTMLStyleElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['style']=HTMLStyleElementWrapper;HTMLStyleElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLStyleElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLStyleElementWrapper.prototype.getMedia=function(){return this.outerNode.media;};HTMLStyleElementWrapper.prototype.setMedia=function(value){this.outerNode.media=value;};HTMLStyleElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLStyleElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};function HTMLTableCaptionElementWrapper(node){this.init(node,'HTMLTableCaptionElementWrapper',node.tagName);};HTMLTableCaptionElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['caption']=HTMLTableCaptionElementWrapper;HTMLTableCaptionElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableCaptionElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};function HTMLTableCellElementWrapper(node){this.init(node,'HTMLTableCellElementWrapper',node.tagName);};HTMLTableCellElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['td']=HTMLTableCellElementWrapper;HTMLElementWrapper.classes['th']=HTMLTableCellElementWrapper;HTMLTableCellElementWrapper.prototype.getAbbr=function(){return this.outerNode.abbr;};HTMLTableCellElementWrapper.prototype.setAbbr=function(value){this.outerNode.abbr=value;};HTMLTableCellElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableCellElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLTableCellElementWrapper.prototype.getAxis=function(){return this.outerNode.axis;};HTMLTableCellElementWrapper.prototype.setAxis=function(value){this.outerNode.axis=value;};HTMLTableCellElementWrapper.prototype.getBgColor=function(){return this.outerNode.bgColor;};HTMLTableCellElementWrapper.prototype.setBgColor=function(value){this.outerNode.bgColor=value;};HTMLTableCellElementWrapper.prototype.getCellIndex=function(){return this.outerNode.cellIndex;};HTMLTableCellElementWrapper.prototype.getCh=function(){return this.outerNode.ch;};HTMLTableCellElementWrapper.prototype.setCh=function(value){this.outerNode.ch=value;};HTMLTableCellElementWrapper.prototype.getChOff=function(){return this.outerNode.chOff;};HTMLTableCellElementWrapper.prototype.setChOff=function(value){this.outerNode.chOff=value;};HTMLTableCellElementWrapper.prototype.getColSpan=function(){return this.outerNode.colSpan;};HTMLTableCellElementWrapper.prototype.setColSpan=function(value){this.outerNode.colSpan=value;};HTMLTableCellElementWrapper.prototype.getHeaders=function(){return this.outerNode.headers;};HTMLTableCellElementWrapper.prototype.setHeaders=function(value){this.outerNode.headers=value;};HTMLTableCellElementWrapper.prototype.getHeight=function(){return this.outerNode.height;};HTMLTableCellElementWrapper.prototype.setHeight=function(value){this.outerNode.height=value;};HTMLTableCellElementWrapper.prototype.getNoWrap=function(){return this.outerNode.noWrap;};HTMLTableCellElementWrapper.prototype.setNoWrap=function(value){this.outerNode.noWrap=value;};HTMLTableCellElementWrapper.prototype.getRowSpan=function(){return this.outerNode.rowSpan;};HTMLTableCellElementWrapper.prototype.setRowSpan=function(value){this.outerNode.rowSpan=value;};HTMLTableCellElementWrapper.prototype.getScope=function(){return this.outerNode.scope;};HTMLTableCellElementWrapper.prototype.setScope=function(value){this.outerNode.scope=value;};HTMLTableCellElementWrapper.prototype.getValign=function(){return this.outerNode.valign;};HTMLTableCellElementWrapper.prototype.setValign=function(value){this.outerNode.valign=value;};HTMLTableCellElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLTableCellElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLTableColElementWrapper(node){this.init(node,'HTMLTableColElementWrapper',node.tagName);};HTMLTableColElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['col']=HTMLTableColElementWrapper;HTMLTableColElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableColElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLTableColElementWrapper.prototype.getCh=function(){return this.outerNode.ch;};HTMLTableColElementWrapper.prototype.setCh=function(value){this.outerNode.ch=value;};HTMLTableColElementWrapper.prototype.getChOff=function(){return this.outerNode.chOff;};HTMLTableColElementWrapper.prototype.setChOff=function(value){this.outerNode.chOff=value;};HTMLTableColElementWrapper.prototype.getSpan=function(){return this.outerNode.span;};HTMLTableColElementWrapper.prototype.setSpan=function(value){this.outerNode.span=value;};HTMLTableColElementWrapper.prototype.getVAlign=function(){return this.outerNode.vAlign;};HTMLTableColElementWrapper.prototype.setVAlign=function(value){this.outerNode.vAlign=value;};HTMLTableColElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLTableColElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};function HTMLTableElementWrapper(node){this.init(node,'HTMLTableElementWrapper',node.tagName);};HTMLTableElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['table']=HTMLTableElementWrapper;HTMLTableElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLTableElementWrapper.prototype.getBgColor=function(){return this.outerNode.bgColor;};HTMLTableElementWrapper.prototype.setBgColor=function(value){this.outerNode.bgColor=value;};HTMLTableElementWrapper.prototype.getBorder=function(){return this.outerNode.border;};HTMLTableElementWrapper.prototype.setBorder=function(value){this.outerNode.border=value;};HTMLTableElementWrapper.prototype.getCaption=function(){return application.wrapHTMLNode(this.outerNode.caption);};HTMLTableElementWrapper.prototype.setCaption=function(value){this.outerNode.caption=value;};HTMLTableElementWrapper.prototype.getCellPadding=function(){return this.outerNode.cellPadding;};HTMLTableElementWrapper.prototype.setCellPadding=function(value){this.outerNode.cellPadding=value;};HTMLTableElementWrapper.prototype.getCellSpacing=function(){return this.outerNode.cellSpacing;};HTMLTableElementWrapper.prototype.setCellSpacing=function(value){this.outerNode.cellSpacing=value;};HTMLTableElementWrapper.prototype.getFrame=function(){return this.outerNode.frame;};HTMLTableElementWrapper.prototype.setFrame=function(value){this.outerNode.frame=value;};HTMLTableElementWrapper.prototype.getRows=function(){return new HTMLCollectionWrapper(this.outerNode.rows);};HTMLTableElementWrapper.prototype.getRules=function(){return this.outerNode.rules;};HTMLTableElementWrapper.prototype.setRules=function(value){this.outerNode.rules=value;};HTMLTableElementWrapper.prototype.getSummary=function(){return this.outerNode.summary;};HTMLTableElementWrapper.prototype.setSummary=function(value){this.outerNode.summary=value;};HTMLTableElementWrapper.prototype.getTBodies=function(){return new HTMLCollectionWrapper(this.outerNode.tBodies);};HTMLTableElementWrapper.prototype.getTFoot=function(){return application.wrapHTMLNode(this.outerNode.tFoot);};HTMLTableElementWrapper.prototype.setTFoot=function(value){this.outerNode.tFoot=value;};HTMLTableElementWrapper.prototype.getTHead=function(){return application.wrapHTMLNode(this.outerNode.tHead);};HTMLTableElementWrapper.prototype.setTHead=function(value){this.outerNode.tHead=value;};HTMLTableElementWrapper.prototype.getWidth=function(){return this.outerNode.width;};HTMLTableElementWrapper.prototype.setWidth=function(value){this.outerNode.width=value;};HTMLTableElementWrapper.prototype.createCaption=function(){return application.wrapHTMLNode(this.outerNode.createCaption());};HTMLTableElementWrapper.prototype.createTFoot=function(){return application.wrapHTMLNode(this.outerNode.createTFoot());};HTMLTableElementWrapper.prototype.createTHead=function(){return application.wrapHTMLNode(this.outerNode.createTHead());};HTMLTableElementWrapper.prototype.deleteCaption=function(){return this.outerNode.deleteCaption();};HTMLTableElementWrapper.prototype.deleteRow=function(index){return this.outerNode.deleteRow(index);};HTMLTableElementWrapper.prototype.deleteTFoot=function(){return this.outerNode.deleteTFoot();};HTMLTableElementWrapper.prototype.deleteTHead=function(){return this.outerNode.deleteTHead();};HTMLTableElementWrapper.prototype.insertRow=function(index){return application.wrapHTMLNode(this.outerNode.insertRow(index));};function HTMLTableRowElementWrapper(node){this.init(node,'HTMLTableRowElementWrapper',node.tagName);};HTMLTableRowElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['tr']=HTMLTableRowElementWrapper;HTMLTableRowElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableRowElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLTableRowElementWrapper.prototype.getBgColor=function(){return this.outerNode.bgColor;};HTMLTableRowElementWrapper.prototype.setBgColor=function(value){this.outerNode.bgColor=value;};HTMLTableRowElementWrapper.prototype.getCells=function(){return new HTMLCollectionWrapper(this.outerNode.cells);};HTMLTableRowElementWrapper.prototype.getCh=function(){return this.outerNode.ch;};HTMLTableRowElementWrapper.prototype.setCh=function(value){this.outerNode.ch=value;};HTMLTableRowElementWrapper.prototype.getChOff=function(){return this.outerNode.chOff;};HTMLTableRowElementWrapper.prototype.setChOff=function(value){this.outerNode.chOff=value;};HTMLTableRowElementWrapper.prototype.getRowIndex=function(){return this.outerNode.rowIndex;};HTMLTableRowElementWrapper.prototype.getSectionRowIndex=function(){return this.outerNode.sectionRowIndex;};HTMLTableRowElementWrapper.prototype.getVAlign=function(){return this.outerNode.vAlign;};HTMLTableRowElementWrapper.prototype.setVAlign=function(value){this.outerNode.vAlign=value;};HTMLTableRowElementWrapper.prototype.deleteCell=function(index){return this.outerNode.deleteCell(index);};HTMLTableRowElementWrapper.prototype.insertCell=function(index){return application.wrapHTMLNode(this.outerNode.insertCell(index));};function HTMLTableSectionElementWrapper(node){this.init(node,'HTMLTableSectionElementWrapper',node.tagName);};HTMLTableSectionElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['thead']=HTMLTableSectionElementWrapper;HTMLElementWrapper.classes['tfoot']=HTMLTableSectionElementWrapper;HTMLElementWrapper.classes['tbody']=HTMLTableSectionElementWrapper;HTMLTableSectionElementWrapper.prototype.getAlign=function(){return this.outerNode.align;};HTMLTableSectionElementWrapper.prototype.setAlign=function(value){this.outerNode.align=value;};HTMLTableSectionElementWrapper.prototype.getCh=function(){return this.outerNode.ch;};HTMLTableSectionElementWrapper.prototype.setCh=function(value){this.outerNode.ch=value;};HTMLTableSectionElementWrapper.prototype.getChOff=function(){return this.outerNode.chOff;};HTMLTableSectionElementWrapper.prototype.setChOff=function(value){this.outerNode.chOff=value;};HTMLTableSectionElementWrapper.prototype.getRows=function(){return new HTMLCollectionWrapper(this.outerNode.rows);};HTMLTableSectionElementWrapper.prototype.getVAlign=function(){return this.outerNode.vAlign;};HTMLTableSectionElementWrapper.prototype.setVAlign=function(value){this.outerNode.vAlign=value;};HTMLTableSectionElementWrapper.prototype.deleteRow=function(index){return this.outerNode.deleteRow(index);};HTMLTableSectionElementWrapper.prototype.insertRow=function(index){return application.wrapHTMLNode(this.outerNode.insertRow(index));};function HTMLTextAreaElementWrapper(node){this.init(node,'HTMLTextAreaElementWrapper',node.tagName);};HTMLTextAreaElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['textarea']=HTMLTextAreaElementWrapper;HTMLTextAreaElementWrapper.prototype.getDefaultValue=function(){return this.outerNode.defaultValue;};HTMLTextAreaElementWrapper.prototype.setDefaultValue=function(value){this.outerNode.defaultValue=value;};HTMLTextAreaElementWrapper.prototype.getForm=function(){return application.wrapHTMLNode(this.outerNode.form);};HTMLTextAreaElementWrapper.prototype.getAccessKey=function(){return this.outerNode.accessKey;};HTMLTextAreaElementWrapper.prototype.setAccessKey=function(value){this.outerNode.accessKey=value;};HTMLTextAreaElementWrapper.prototype.getCols=function(){return this.outerNode.cols;};HTMLTextAreaElementWrapper.prototype.setCols=function(value){this.outerNode.cols=value;};HTMLTextAreaElementWrapper.prototype.getDisabled=function(){return this.outerNode.disabled;};HTMLTextAreaElementWrapper.prototype.setDisabled=function(value){this.outerNode.disabled=value;};HTMLTextAreaElementWrapper.prototype.getName=function(){return this.outerNode.name;};HTMLTextAreaElementWrapper.prototype.setName=function(value){this.outerNode.name=value;};HTMLTextAreaElementWrapper.prototype.getReadOnly=function(){return this.outerNode.readOnly;};HTMLTextAreaElementWrapper.prototype.setReadOnly=function(value){this.outerNode.readOnly=value;};HTMLTextAreaElementWrapper.prototype.getRows=function(){return this.outerNode.rows;};HTMLTextAreaElementWrapper.prototype.setRows=function(value){this.outerNode.rows=value;};HTMLTextAreaElementWrapper.prototype.getTabIndex=function(){return this.outerNode.tabIndex;};HTMLTextAreaElementWrapper.prototype.setTabIndex=function(value){this.outerNode.tabIndex=value;};HTMLTextAreaElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLTextAreaElementWrapper.prototype.getValue=function(){return this.outerNode.value;};HTMLTextAreaElementWrapper.prototype.setValue=function(value){this.outerNode.value=value;};HTMLTextAreaElementWrapper.prototype.blur=function(){return this.outerNode.blur();};HTMLTextAreaElementWrapper.prototype.focus=function(){return this.outerNode.focus();};HTMLTextAreaElementWrapper.prototype.select=function(){return this.outerNode.select();};function HTMLTitleElementWrapper(node){this.init(node,'HTMLTitleElementWrapper',node.tagName);};HTMLTitleElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['title']=HTMLTitleElementWrapper;HTMLTitleElementWrapper.prototype.getText=function(){return this.outerNode.text;};HTMLTitleElementWrapper.prototype.setText=function(value){this.outerNode.text=value;};function HTMLUListElementWrapper(node){this.init(node,'HTMLUListElementWrapper',node.tagName);};HTMLUListElementWrapper.prototype=new HTMLElementWrapper();HTMLElementWrapper.classes['ulist']=HTMLUListElementWrapper;HTMLUListElementWrapper.prototype.getCompact=function(){return this.outerNode.compact;};HTMLUListElementWrapper.prototype.setCompact=function(value){this.outerNode.compact=value;};HTMLUListElementWrapper.prototype.getType=function(){return this.outerNode.type;};HTMLUListElementWrapper.prototype.setType=function(value){this.outerNode.type=value;};function JRapid_Input(outerNode){this.init(outerNode,'com.htmli.forms.Input','Input');}
JRapid_Input.prototype=new HTMLiElement();JRapid_Input.prototype.getSrc=function(){return this.getAttribute('src');};JRapid_Input.prototype.setSrc=function(src){this.setAttribute('src',src);};JRapid_Input.prototype.getSelect=function(){return this.getAttribute('select');};JRapid_Input.prototype.setSelect=function(select){this.setAttribute('select',select);};JRapid_Input.prototype.getSelectFunc=function(){return this.getAttribute('selectfunc');};JRapid_Input.prototype.setSelectFunc=function(selectFunc){this.setAttribute('selectfunc',selectFunc);};JRapid_Input.prototype.getSelectExpr=function(){return this.getAttribute('selectexpr');};JRapid_Input.prototype.setSelectExpr=function(selectExpr){this.setAttribute('selectexpr',selectExpr);};JRapid_Input.prototype.getType=function(){return this.getAttribute('type');};JRapid_Input.prototype.getDisabled=function(){return this.outerNode.disabled;};JRapid_Input.prototype.setDisabled=function(disabled){this.outerNode.disabled=disabled;};JRapid_Input.prototype.getChecked=function(){return this.outerNode.checked;};JRapid_Input.prototype.setChecked=function(checked){me.outerNode.checked=checked;};JRapid_Input.prototype.getValue=function(){return this.outerNode.value;};JRapid_Input.prototype.setValue=function(value){this.outerNode.value=value;};JRapid_Input.prototype.getReadonly=function(){return this.getAttribute('readonly');};JRapid_Input.prototype.sync=function(select){var me=this;var xml=me.getContainer().getElementById(me.getSrc());if(!xml){return;}
var xmlDoc=xml.getXmlDocument();var node;var info;var path;if(select){info=path=select;}else if(me.getSelectFunc()){try{path=eval(me.getSelectFunc());}catch(e){throw application.logError(302,'Cannot set value.','"selectfunc" expression failed to evaluate: '+me.getSelectFunc()+'.');}
info=path+';'+me.getSelectFunc();}else if(me.getSelectExpr()){try{path=eval(me.getSelectExpr()+';');}catch(e){throw application.logError(303,'Cannot set value.','"selectexpr" expression failed to evaluate: '+me.getSelectExpr()+'.');}
info=path+';'+me.getSelectExpr();}else{info=path=me.getSelect();}
node=xmlDoc.selectSingleNode(path);if(node==null&&path.indexOf('/@')!=-1){var parent=path.substring(0,path.lastIndexOf('/@'));node=xmlDoc.selectSingleNode(parent);if(node==null){throw application.logError(304,'Cannot set value.','Invalid attribute xpath: '+info+'. Parent node ('+parent+') is null.');}
node.setAttribute(path.substring(path.lastIndexOf('/@')+2),0);node=xmlDoc.selectSingleNode(path);}
if(!node){throw application.logError(301,'Cannot set value','Invalid xpath: '+info+'.');}
var value=me.outerNode.type=='checkbox'?(me.outerNode.checked?'true':'false'):me.getValue();try{if(node.childNodes.length>0){node.replaceChild(xmlDoc.createTextNode(value),node.childNodes[0]);}else{node.appendChild(xmlDoc.createTextNode(value));}}catch(e){if(path.indexOf('/@')!=-1){var parent=path.substring(0,path.lastIndexOf('/@'));node=xmlDoc.selectSingleNode(parent);var attrName=path.substring(path.lastIndexOf('/@')+2);node.setAttribute(attrName,value);}}
xml.setXml(xmlDoc.xml);};JRapid_Input.prototype.focus=function(){this.outerNode.focus();};function JRapid_Select(outerNode){this.init(outerNode,'com.htmli.forms.Select','Select');}
JRapid_Select.prototype=new HTMLiElement();JRapid_Select.prototype.getSrc=function(){return this.getAttribute('src');};JRapid_Select.prototype.setSrc=function(src){this.setAttribute('src',src);};JRapid_Select.prototype.getSelect=function(){return this.getAttribute('select');};JRapid_Select.prototype.setSelect=function(select){this.setAttribute('select',select);};JRapid_Select.prototype.getSelectExpr=function(){return this.getAttribute('selectexpr');};JRapid_Select.prototype.setSelectExpr=function(selectExpr){this.setAttribute('selectexpr',selectExpr);};JRapid_Select.prototype.getValue=function(){return this.outerNode.value;};JRapid_Select.prototype.setValue=function(value){this.outerNode.value=value;};JRapid_Select.prototype.getDisabled=function(){return this.outerNode.disabled;};JRapid_Select.prototype.setDisabled=function(disabled){this.outerNode.disabled=disabled};JRapid_Select.prototype.getSelectedIndex=function(){return this.outerNode.selectedIndex;};JRapid_Select.prototype.setSelectedIndex=function(selectedIndex){this.outerNode.selectedIndex=selectedIndex;};JRapid_Select.prototype.getOptions=function(){return new NodeListWrapper(this.outerNode.options);};JRapid_Select.prototype.sync=function(select,value){var me=this;var xml=me.getContainer().getElementById(me.getSrc());if(!xml){return;}
var xmlDoc=xml.getXmlDocument();var info;var sel;if(select){info=sel=select.split(';');}else if(me.getSelectExpr()){try{sel=eval(me.getSelectExpr()).split(';');}catch(e){throw application.logError(305,'Cannot set value','"selectexpr" expression failed to evaluate: '+me.getSelectExpr()+'.');}
info=sel+';'+me.getSelectExpr();}else{sel=me.getSelect().split(';');info=sel+';'+me.getSelectExpr();}
var node=xmlDoc.selectSingleNode(sel[0]);if(!node){throw application.logError(306,'Cannot set value','Invalid xpath: '+info+'.');}
if(value){if(node.childNodes.length>0){node.childNodes[0].nodeValue=value;}else{node.appendChild(xmlDoc.createTextNode(value));}}else{if(node.nodeType==2){node.value=me.getValue();}else{if(node.childNodes.length>0){for(var i=node.childNodes.length-1;i>=0;i--){node.removeChild(node.childNodes[i]);}}
node.appendChild(xmlDoc.createTextNode(me.getValue()));}}
if(sel.length>=2){try{node=xmlDoc.selectSingleNode(sel[1]);if(node.childNodes.length>0){node.childNodes[0].nodeValue=me.outerNode.options[me.outerNode.selectedIndex].text;}else{node.appendChild(xmlDoc.createTextNode(me.outerNode.options[me.outerNode.selectedIndex].text));}}catch(e){}}
xml.setXml(xmlDoc.xml);};function JRapid_Textarea(outerNode){this.init(outerNode,'com.htmli.forms.Textarea','Textarea');}
JRapid_Textarea.prototype=new HTMLiElement();JRapid_Textarea.prototype.getSrc=function(){return this.getAttribute('src');};JRapid_Textarea.prototype.setSrc=function(src){this.setAttribute('src',src);};JRapid_Textarea.prototype.getSelect=function(){return this.getAttribute('select');};JRapid_Textarea.prototype.setSelect=function(select){this.setAttribute('select',select);};JRapid_Textarea.prototype.getSelectExpr=function(){return this.getAttribute('selectexpr');};JRapid_Textarea.prototype.setSelectExpr=function(selectExpr){this.setAttribute('selectexpr',selectExpr);};JRapid_Textarea.prototype.getValue=function(){return this.outerNode.value;};JRapid_Textarea.prototype.setValue=function(value){this.outerNode.value=value;};JRapid_Textarea.prototype.getMaxLength=function(){return this.getAttribute('maxlength')==null?0:this.getAttribute('maxlength');};JRapid_Textarea.prototype.setMaxLength=function(maxLength){this.setAttribute('maxlength',maxLength);};JRapid_Textarea.prototype.sync=function(select){var me=this;var xml=me.getContainer().getElementById(me.getSrc());if(!xml){return;}
var xmlDoc=xml.getXmlDocument();var node;var info;var path;if(select){path=info=select;}else if(me.getSelectExpr()){try{path=eval(me.getSelectExpr());info=path+";"+me.getSelectExpr();}catch(e){throw application.logError(307,'Cannot set value','"selectexpr" expression failed to evaluate: '+me.getSelectExpr()+'.');}}else{path=info=me.getSelect();}
node=xmlDoc.selectSingleNode(path);if(!node){throw application.logError(308,'Cannot set value','Invalid xpath: '+info+'.');}
var value=me.getValue();while(node.childNodes.length>0){node.childNodes[0].parentNode.removeChild(node.childNodes[0]);}
node.appendChild(xmlDoc.createTextNode(value));xml.setXml(xmlDoc.xml);};JRapid_Textarea.checkMaxLength=function(current,max){if(current.value.length>max){current.value=current.value.substr(0,max);return false;}
return true;}
Application.prototype.showAccordeon=function(button){var accordeon=button.parentNode.parentNode;for(var i=0,c=accordeon.children,n=c.length;i<n;i++){c[i].children[1].style.display='none';}
button.parentNode.children[1].style.display='';};function JRapid_Menu(outerNode){this.init(outerNode,'com.htmli.ui.Menu','Menu');this.innerNode=outerNode.children[0].children[0];}
JRapid_Menu.prototype=new HTMLiElement();JRapid_Menu.prototype.show=function(top,left){var me=this;var length=JRapid_Menu.active.length;if(length){for(var i=length-1;i>=0;i--){if(!this.isChildOf(JRapid_Menu.active[i])){JRapid_Menu.active[i].hide();}}}
try{if(length){for(var i=length-1;i>=0;i--){if(JRapid_Menu.active[i].outerNode==me.outerNode){return;}}}}catch(e){}
JRapid_Menu.active.push(me);var style=me.outerNode.style;style.visibility='visible';style.zIndex=application.nextZIndex++;if(top){style.top=top+"px";}
if(left){style.left=left+"px";}
var table=application.wrapNode(this.outerNode.children[0]);var outer=application.wrapNode(this.outerNode);var shadow=me.outerNode.children[me.outerNode.children.length-1];shadow.style.height=table.getHeight()+"px";shadow.style.width=outer.getWidth()+"px";};JRapid_Menu.prototype.hideChildren=function(){if(JRapid_Menu.active.length){for(var i=JRapid_Menu.active.length-1;i>0;i--){if(!this.isChildOf(JRapid_Menu.active[i])){JRapid_Menu.active[i].hide();}}}};JRapid_Menu.prototype.hide=function(){this.outerNode.style.visibility='hidden';for(var i=JRapid_Menu.active.length-1;i>=0;i--){if(JRapid_Menu.active[i].outerNode==this.outerNode){JRapid_Menu.active.splice(i,1);break;}}
var items=this.getChildren();var length=items.getLength();for(var i=0;i<length;i++){if(items.item(i).getClassName()=='jrapid_menuitem'){items.item(i).turnOff();}}};JRapid_Menu.active=new Array();JRapid_Menu.flag=true;JRapid_Menu.clickedDisabled=false;JRapid_Menu.prototype.isChildOf=function(parent){var node=parent.outerNode;var parentNode=this.outerNode;while(parentNode!=null){if(parentNode==node){return true;}
parentNode=parentNode.parentNode;}
parentNode=null;return false;};JRapid_Menu.hideAll=function(ev){var length=JRapid_Menu.active.length;if(ev.button!=2&&length&&!JRapid_Menu.clickedDisabled){for(var i=length-1;i>=0;i--){var element=JRapid_Menu.active[i];if(element.getParentNode().getClassName()=='jrapid_menubaritem__hover'){element.getParentNode().setClassName('jrapid_menubaritem');}
element.hide();}
JRapid_Menu.active=new Array();JRapid_Menu.open=null;if(JRapid_MenuItem.active){JRapid_MenuItem.active.turnOff();JRapid_MenuItem.active=null;}}
JRapid_Menu.clickedDisabled=false;}
window.addEventListener('click',function(ev){if((ev.srcElement&&ev.srcElement.className=='jrapid_menubaritem_title')||(ev.target&&ev.target.className=='jrapid_menubaritem_title')){return;}
JRapid_Menu.hideAll(ev);},false);function JRapid_MenuBar(outerNode){this.init(outerNode,'com.htmli.ui.MenuBar','MenuBar');}
JRapid_MenuBar.prototype=new HTMLiElement();JRapid_MenuBar.prototype.open=function(){this.getChildren().item(0).showMenu();};JRapid_MenuBar.open=false;JRapid_MenuBar.defaultMenu=null;window.addEventListener('keyup',function(ev){if(ev.keyCode==40&&ev.ctrlKey&&ev.altKey){JRapid_MenuBar.defaultMenu.open();}
application.stopPropagation(ev);application.preventDefault(ev);return false;},false);function JRapid_MenuBarItem(outerNode){this.init(outerNode,'com.htmli.ui.MenuBarItem','MenuBarItem');this.innerNode=outerNode.children[1];this.outerNode=outerNode;}
JRapid_MenuBarItem.prototype=new HTMLiElement();JRapid_MenuBarItem.prototype.showMenu=function(selectFirst){this.highlight();var child=this.getFirstElementChild();if(child!=null){JRapid_MenuBarItem.open=this;child.show(this.getHeight());}
this.selectFirst(selectFirst);};JRapid_MenuBarItem.prototype.hideMenu=function(){this.turnOff();var child=this.getFirstElementChild();if(child!=null){JRapid_MenuBarItem.open=null;child.hide();}};JRapid_MenuBarItem.prototype.mouseOver=function(ev){this.highlight();if(JRapid_Menu.flag&&JRapid_MenuBarItem.open){this.showMenu();return false;}
return true;};JRapid_MenuBarItem.prototype.highlight=function(){var node=this.getParentNode().outerNode;node.style.zIndex=application.nextZIndex++;for(var i=0,c=node.children,n=c.length;i<n;i++){c[i].className='jrapid_menubaritem';}
this.outerNode.className='jrapid_menubaritem__hover';JRapid_MenuBarItem.active=this;};JRapid_MenuBarItem.prototype.turnOff=function(){this.outerNode.className='jrapid_menubaritem';JRapid_MenuBarItem.active=null;}
JRapid_MenuBarItem.prototype.click=function(ev){if(!JRapid_MenuBarItem.open){JRapid_MenuBarItem.open=this;this.showMenu();}else{JRapid_MenuBarItem.open=null;this.hideMenu();}
return false;};JRapid_MenuBarItem.prototype.selectFirst=function(highlight){if(this.getChildren().getLength()>0&&this.getFirstElementChild()){var me=this.getFirstElementChild().getFirstElementChild();if(highlight){me.highlight();}
JRapid_MenuBarItem.active=me;}};function JRapid_MenuItem(outerNode){this.init(outerNode,'com.htmli.ui.MenuItem','MenuItem');this.innerNode=outerNode.children[1];}
JRapid_MenuItem.prototype=new HTMLiElement();JRapid_MenuItem.prototype.setChecked=function(checked){var style=this.outerNode.children[0].children[0].style;style.display=checked?'':'none';};JRapid_MenuItem.prototype.getDisabled=function(){var value=this.getAttribute('disabled');return(value=='false'||value=='no'||value==null||!value)?false:true;};JRapid_MenuItem.prototype.getType=function(){return this.getAttribute('type');};JRapid_MenuItem.prototype.setDisabled=function(disabled){if(disabled){me.outerNode.children[0].children[0].className='com_htmli_ui_MenuItem__check com_htmli_ui_MenuItem__faded';me.outerNode.children[1].children[0].className='com_htmli_ui_MenuItem__icon com_htmli_ui_MenuItem__faded';me.outerNode.className='com_htmli_ui_MenuItem__disabled';}else{me.outerNode.children[0].children[0].className='com_htmli_ui_MenuItem__check';me.outerNode.children[1].children[0].className='com_htmli_ui_MenuItem__icon';me.outerNode.className='';}};JRapid_MenuItem.prototype.showMenu=function(){var firstChild=this.getFirstElementChild();if(firstChild!=null){firstChild.show(this.getHeight()*this.outerNode.rowIndex);JRapid_MenuItem.active=firstChild.getFirstElementChild();JRapid_MenuItem.active.highlight();}};JRapid_MenuItem.prototype.hideMenu=function(){var firstChild=this.getFirstElementChild();if(firstChild!=null){firstChild.hide();}
firstChild=null;JRapid_MenuItem.active=this;JRapid_MenuItem.active.highlight();};JRapid_MenuItem.prototype.mouseover=function(){this.highlight();if(JRapid_Menu.flag){JRapid_Menu.flag=false;if(this.getFirstElementChild()!=null){this.showMenu();}else{this.getParentNode().hideChildren();}}};JRapid_MenuItem.prototype.mouseout=function(){JRapid_Menu.flag=true;this.turnOff();};JRapid_MenuItem.prototype.highlight=function(){this.setClassName('jrapid_menuitem_highlight');};JRapid_MenuItem.prototype.turnOff=function(){this.setClassName('');};JRapid_MenuItem.prototype.clickDisabled=function(ev){JRapid_Menu.clickedDisabled=true;application.stopPropagation(ev);};JRapid_MenuItem.prototype.click=function(ev){var child=this.getFirstElementChild();if(child&&child.getClass()=='com.htmli.ui.Menu'){this.clickDisabled(ev);}
if(!this.getDisabled()){var length=JRapid_Menu.active.length;if(length&&!child){for(var i=length-1;i>=0;i--){var element=JRapid_Menu.active[i];if(element.getParentNode().getClassName()=='com_htmli_ui_MenuBarItem__hover'){element.getParentNode().setClassName('com_htmli_ui_MenuBarItem');}
element.hide();}
JRapid_Menu.active=new Array();JRapid_MenuBarItem.open=null;if(JRapid_MenuItem.active){JRapid_MenuItem.active.turnOff();JRapid_MenuItem.active=null;}
application.stopPropagation(ev);}
if(this.getType()=='check'){this.toggleCheck();}}};JRapid_MenuItem.prototype.toggleCheck=function(){var style=this.outerNode.children[0].children[0].style;if(style.display==''){this.setChecked(false);}else{this.setChecked(true);}};function JRapid_Source(outerNode){this.init(outerNode,'com.htmli.ui.Source','Source');}
JRapid_Source.prototype=new HTMLiElement();JRapid_Source.prototype.getUrl=function(){return this.getAttribute('url');};JRapid_Source.prototype.setUrl=function(url){this.setAttribute('url',url);};JRapid_Source.prototype.getAuto=function(){return this.getAttribute('auto');};JRapid_Source.prototype.setAuto=function(auto){this.setAttribute('auto',auto);};JRapid_Source.prototype.isOpened=function(){return this.outerNode.innerHTML!='';};JRapid_Source.prototype.open=function(handler){var me=this;me.outerNode.style.display='';me.container=new Container(me.outerNode);var connector=me.getUrl().indexOf('?')>=0?'&':'?';me.container.open(me.getUrl()+(JRapid_Source.cache?'':(connector+new Date().getTime())),function(){application.dispatch('open',me);if(handler)handler();});};JRapid_Source.prototype.close=function(){this.outerNode.style.display='none';this.outerNode.innerHTML='';};JRapid_Source.prototype.getChildContainer=function(){return new Container(this.outerNode);};JRapid_Source.cache=false;Application.prototype.showTab=function(obj){var i=0;obj=obj.parentNode;while(obj.previousSibling){if(obj.previousSibling.nodeType==1){i++;}
obj=obj.previousSibling;}
var pane=obj.parentNode.nextSibling;var j=0;while(pane&&(pane.nodeType!=1||pane.className.indexOf('jrapid_tab')>=0)){if(pane.nodeType==1){var li=obj.parentNode.children[j]
li.className=j==i?'active':'';li.setAttribute('active',j==i?'active':null);pane.style.display=j++==i?'block':'none';}
pane=pane.nextSibling;}
return false;};function JRapid_Window(outerNode){this.init(outerNode,'com.htmli.ui.Window','Window');try{var aux=outerNode.children[2].children[0].children[0].children[1].children[1].children[0];if(aux.getAttribute('htmliinner')!=null){this.innerNode=aux;return;}}catch(e){}
try{var aux=outerNode.children[2].children[0].children[0].children[1].children[1].children[0];if(aux.getAttribute('htmliinner')!=null){this.innerNode=aux;return;}}catch(e){}}
JRapid_Window.prototype=new HTMLiElement();JRapid_Window.prototype.getUrl=function(){return this.getAttribute('url');};JRapid_Window.prototype.setUrl=function(url){this.setAttribute('url',url);};JRapid_Window.prototype.getIcon=function(){return this.getAttribute('icon');};JRapid_Window.prototype.setIcon=function(icon){var me=this;var __value=icon;me.outerNode.children[2].children[0].children[0].children[0].children[1].children[0].src=icon;this.setAttribute('icon',__value);};JRapid_Window.prototype.getCaption=function(){return this.getAttribute('caption');};JRapid_Window.prototype.setCaption=function(caption){var me=this;var __value=caption;me.outerNode.children[2].children[0].children[0].children[0].children[1].children[1].innerHTML=caption;this.setAttribute('caption',__value);};JRapid_Window.prototype.getResizeMode=function(){return this.getAttribute('resizemode');};JRapid_Window.prototype.setResizeMode=function(resizeMode){this.setAttribute('resizemode',resizeMode);};JRapid_Window.prototype.getDndMode=function(){return this.getAttribute('dndmode');};JRapid_Window.prototype.setDndMode=function(dndMode){this.setAttribute('dndmode',dndMode);};JRapid_Window.prototype.getState=function(){var me=this;var __value=this.getAttribute('state');var state=__value;if(__value==null){__value='normal';}
return __value;};JRapid_Window.prototype.setState=function(state){this.setAttribute('state',state);};JRapid_Window.prototype.getNoCloseButton=function(){return this.getAttribute('noclosebutton');};JRapid_Window.prototype.getNoMaxButton=function(){return this.getAttribute('nomaxbutton');};JRapid_Window.prototype.setNoMaxButton=function(noMaxButton){var me=this;var __value=noMaxButton;var change=function(){if(noMaxButton){me.outerNode.children[2].children[0].children[0].children[0].children[2].children[0].children[1].style.display='none';}else{me.outerNode.children[2].children[0].children[0].children[0].children[2].children[0].children[1].style.display='';}};if(document.all){setTimeout(change,1);}else{change();}
this.setAttribute('nomaxbutton',__value);};JRapid_Window.prototype.getNoMinButton=function(){return this.getAttribute('nominbutton');};JRapid_Window.prototype.getHelpButton=function(){return this.getAttribute('helpbutton');};JRapid_Window.prototype.setHelpButton=function(helpButton){var me=this;var __value=helpButton;var change=function(){if(helpButton){me.outerNode.children[2].children[0].children[0].children[0].children[2].children[0].children[4].style.display='';}else{me.outerNode.children[2].children[0].children[0].children[0].children[2].children[0].children[4].style.display='none';}};if(document.all){setTimeout(change,1);}else{change();}
this.setAttribute('helpbutton',__value);};JRapid_Window.prototype.getNotResizable=function(){var value=this.getAttribute('notresizable');return(value=='false'||value=='no'||value==null||!value)?false:true;};JRapid_Window.prototype.setNotResizable=function(notResizable){this.setAttribute('notresizable',notResizable?'true':'false');};JRapid_Window.prototype.getNotDraggable=function(){var value=this.getAttribute('notdraggable');return(value=='false'||value=='no'||value==null||!value)?false:true;};JRapid_Window.prototype.setNotDraggable=function(notDraggable){this.setAttribute('notdraggable',notDraggable?'true':'false');};JRapid_Window.prototype.getRememberSize=function(){var value=this.getAttribute('remembersize');return(value=='false'||value=='no'||value==null||!value)?false:true;};JRapid_Window.prototype.setRememberSize=function(rememberSize){this.setAttribute('remembersize',rememberSize?'true':'false');};JRapid_Window.prototype.getContentHeight=function(){var me=this;var __value=this.getAttribute('');var contentHeight=__value;var table=application.wrapNode(me.outerNode.children[2].children[0]);return table.getHeight();return __value;};JRapid_Window.prototype.getContentWidth=function(){var me=this;var __value=this.getAttribute('');var contentWidth=__value;var table=application.wrapNode(me.outerNode.children[2].children[0]);return table.getWidth();return __value;};JRapid_Window.prototype.getPreviousWidth=function(){return parseInt(this.outerNode.previousWidth);};JRapid_Window.prototype.getPreviousHeight=function(){return parseInt(this.outerNode.previousHeight);};JRapid_Window.hideAll=function(){for(var i=0,length=JRapid_Window.active.length;i<length;i++){JRapid_Window.active[i].outerNode.style.display='none';}};JRapid_Window.showAll=function(){var length=JRapid_Window.active.length;for(var i=0;i<length;i++){JRapid_Window.active[i].outerNode.style.display='block';}};JRapid_Window.prototype.moveTo=function(top,left){var style=this.outerNode.style;style.top=top+'px';style.left=left+'px';};JRapid_Window.prototype.isOpened=function(){return this.outerNode.style.display=='block';};JRapid_Window.prototype.open=function(handler){var me=this;if(me.isOpened()){me.top();return;}
me.outerNode.style.display='block';me.getCookies();var table=application.wrapNode(me.outerNode.children[2].children[0]);var width=me.outerNode.width?me.outerNode.width:me.outerNode.style.width?me.outerNode.style.width:table.getWidth()?table.getWidth()+'px':JRapid_Window.MINIMIZED_WIDTH;var height=me.outerNode.height?me.outerNode.height:me.outerNode.style.height?me.outerNode.style.height:table.getHeight()?table.getHeight()+'px':JRapid_Window.MINIMIZED_HEIGHT;if(navigator.userAgent.indexOf('MSIE 7.0')>=0){me.outerNode.children[2].children[0].style.width='30px';}
var buttons=me.outerNode.children[2].children[0].children[0].children[0].children[2].children[0];me.outerNode.closeButton=buttons.children[0];me.outerNode.maxButton=buttons.children[1];me.outerNode.restoreButton=buttons.children[2];me.outerNode.minButton=buttons.children[3];me.outerNode.helpButton=buttons.children[4];me.push();me.top();if(me.getUrl()){var childContainer=new Container(me.innerNode);childContainer.open(me.getUrl()+'?'+new Date().getTime(),handler);}
if(!me.outerNode.style.top&&!me.outerNode.style.left){me.outerNode.style.top=JRapid_Window.getNextTop(height)-me.getContainingBlock().getRelativeY()+"px";me.outerNode.style.left=JRapid_Window.getNextLeft(width)-me.getContainingBlock().getRelativeX()+"px";}
if(JRapid_Window.alwaysCentered){me.center();}
if(JRapid_Window.alwaysExclusive){me.showOverlay();me.setNotDraggable(true);}
me.setState('normal');};JRapid_Window.prototype.openExclusive=function(handler){this.open();this.center();this.showOverlay();this.setNotDraggable(true);};JRapid_Window.prototype.openMaximized=function(handler){this.open(handler);this.maximize();};JRapid_Window.prototype.openMinimized=function(handler){this.open(handler);this.minimize();};JRapid_Window.prototype.openCentered=function(handler){this.center();this.open(handler);};JRapid_Window.prototype.close=function(){var me=this;if(me.getState().indexOf('minimized')>=0){me.loadSizeMin(me.getId());}
me.outerNode.style.display='none';JRapid_Window.remove(me);JRapid_Window.refreshActive(true);if(me.getUrl()){me.innerNode.innerHTML='';}
application.dispatch('closewindow',me,null);JRapid_Window.nextTop=30;JRapid_Window.nextLeft=30;};JRapid_Window.prototype.getChildContainer=function(){return new Container(this.innerNode);};JRapid_Window.prototype.top=function(ev){var me=this;me.outerNode.style.zIndex=application.nextZIndex++;JRapid_Window.remove(me);JRapid_Window.active.push(me);JRapid_Window.refreshActive();};JRapid_Window.prototype.minimize=function(){var me=this;var position=me.saveSizeMin(me.getX(),me.getY(),me.outerNode.children[0].style.width,me.outerNode.children[0].style.height,me.getId());this.outerNode.restoreButton.style.display='';this.outerNode.minButton.style.display='none';var height=JRapid_Window.MINIMIZED_HEIGHT;var width=JRapid_Window.MINIMIZED_WIDTH;if(position>=0){var length=position;}else{var length=JRapid_Window.minimized.length-1;}
var rowsize=Math.floor(application.getDocumentElement().getWidth()/parseFloat(width));var row=Math.floor(length/rowsize);var col=length%rowsize;var bottom=parseFloat(height)*row+'px';var left=parseFloat(width)*col+'px';var style=me.outerNode.style;style.top=null;style.bottom=bottom;style.left=left;me.resizeTo(width,height,true,true,true);application.dispatch('minwindow',me,null);me.setState('minimized');JRapid_Window.shiftTop();JRapid_Window.refreshActive(true);};JRapid_Window.prototype.restore=function(){if(this.getState().indexOf('maximized')>=0){return this.restoreMax();}else if(this.getState().indexOf('minimized')>=0){return this.restoreMin();}};JRapid_Window.prototype.maximize=function(){var me=this;this.saveSizeMax();this.outerNode.restoreButton.style.display='';this.outerNode.maxButton.style.display='none';var height=JRapid_Window.getMaxHeight()+"px";var width=JRapid_Window.getMaxWidth()+"px";if(height!="0px"&&width!="0px"){this.resizeTo(width,height,true,true,true);this.moveTo(0,0);this.setState('maximized');application.dispatch('maxwindow',me);}};JRapid_Window.resizingTable=null;JRapid_Window.resizingAxis=null;JRapid_Window.resizingBase=null;JRapid_Window.dndTarget=null;JRapid_Window.dndCoords=null;JRapid_Window.minimized=null;JRapid_Window.maximized=null;JRapid_Window.nextTop=30;JRapid_Window.nextLeft=30;JRapid_Window.xAdd=true;JRapid_Window.yAdd=true;JRapid_Window.active=new Array();JRapid_Window.MINIMIZED_HEIGHT='34px';JRapid_Window.MINIMIZED_WIDTH='200px';JRapid_Window.prototype.click=function(obj,ev){this.showMenu(ev);ev.stopPropagation();};JRapid_Window.prototype.saveSizeMax=function(){JRapid_Window.maximized=new Object();JRapid_Window.maximized.x=this.getRelativeX();JRapid_Window.maximized.y=this.getRelativeY();JRapid_Window.maximized.width=this.outerNode.children[0].style.width;JRapid_Window.maximized.height=this.outerNode.children[0].style.height;};JRapid_Window.prototype.restoreMax=function(){var x=JRapid_Window.maximized.x;var y=JRapid_Window.maximized.y;var width=JRapid_Window.maximized.width;var height=JRapid_Window.maximized.height;this.outerNode.restoreButton.style.display='none';this.outerNode.maxButton.style.display='';this.resizeTo(width,height,true,true,true);this.moveTo(x,y);this.setState('normal');};JRapid_Window.prototype.saveSizeMin=function(x,y,width,height,id){var minimized=new Object();minimized.id=id;minimized.x=x;minimized.y=y;minimized.width=width;minimized.height=height;if(JRapid_Window.minimized==null||JRapid_Window.minimized.length==0){minimized.position=0;JRapid_Window.minimized=new Array(minimized);}else{minimized.position=JRapid_Window.length;var position=this.searchFirstBlank();if(position>=0){JRapid_Window.minimized[position]=minimized;return position;}else{JRapid_Window.minimized.push(minimized);return-1;}}};JRapid_Window.prototype.loadSizeMin=function(id){var length=JRapid_Window.minimized.length;for(var i=0;i<length;i++){var win=JRapid_Window.minimized[i];if(win!=null&&win.id==id){JRapid_Window.minimized[i]=null;return win;}}};JRapid_Window.prototype.searchFirstBlank=function(){var length=JRapid_Window.minimized.length;for(var i=0;i<length;i++){if(JRapid_Window.minimized[i]==null){return i;}}
return-1;};JRapid_Window.prototype.restoreMin=function(){var win=this.loadSizeMin(this.getId());var x=win.x;var y=win.y;var width=win.width;var height=win.height;this.resizeTo(width,height,true,true,true);this.moveTo(x,y);this.outerNode.minButton.style.display='';this.outerNode.restoreButton.style.display='none';this.setState('normal');JRapid_Window.active.push(this);JRapid_Window.refreshActive();};JRapid_Window.prototype.startDnd=function(x,y){if(this.getState().indexOf('maximized')<0&&this.getState().indexOf('minimized')<0&&(!this.getNotDraggable())){JRapid_Window.dndTarget=this;JRapid_Window.dndCoords=[x,y];var style=JRapid_Window.dndTarget.outerNode.style;if(!style.top&&!style.left){style.top=JRapid_Window.dndTarget.getRelativeY()+"px";style.left=JRapid_Window.dndTarget.getRelativeX()+"px";}
if(!this.getDndMode()||this.getDndMode().indexOf('outline')>=0){style=JRapid_Window.dndTarget.outerNode.children[1].style;if(!style.top&&!style.left){style.top="0px";style.left="0px";}}}};JRapid_Window.prototype.startResize=function(horizontal,vertical){if(this.getState().indexOf('maximized')<0&&this.getState().indexOf('minimized')<0&&(this.getNotResizable()!=null&&!this.getNotResizable())){JRapid_Window.resizingTable=this;JRapid_Window.resizingBase=[this.getX(),this.getY()];JRapid_Window.resizingAxis=[horizontal,vertical];}};JRapid_Window.prototype.resizeTo=function(width,height,changeDashed,ignoreRememberSize,ignoreDispatch){this.outerNode.children[2].children[0].children[0].children[1].children[1].style.height=(height)+'px';var s=this.outerNode.children[2].children[0].children[0].children[1].children[1].children[0].style;if(s.overflowY=='scroll'||s.overflowY=='auto'){s.height=height+'px';}
return;var last=this.outerNode.children[this.outerNode.children.length-1];last.style.display='none';this.resizeToW(width,changeDashed);this.resizeToH(height,changeDashed);if(!ignoreRememberSize&&this.getRememberSize()){var id=this.outerNode.id;var date=new Date();date.setTime(new Date().getTime()+(365*24*60*60*1000));var expires='expires='+date.toGMTString()+';';document.cookie=id+'_SZ='+width+'*'+height+'; '+expires;}
last.style.display='';};JRapid_Window.prototype.getCookies=function(){if(this.getRememberSize()){var cookies=document.cookie.split(';');var id=this.outerNode.id;var width,height;for(var i=0;i<cookies.length;i++){var c=cookies[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
if(c.indexOf(id+'_SZ=')==0){width=c.substring(id.length+4,c.indexOf('px'));height=c.substring(c.indexOf('px')+3,c.length-2);}}
this.outerNode.width=parseInt(width);this.outerNode.height=parseInt(height);}};JRapid_Window.prototype.resizeToW=function(width,changeDashed){var w=parseInt(width)+(2*15);if(parseInt(width)<(this.getButtonBarWidth()+10)){width=(this.getButtonBarWidth()+10)+"px";this.outerNode.children[1].style.width=width;}
this.outerNode.previousWidth=this.getWidth();this.outerNode.style.width=w+'px';this.outerNode.children[2].style.width=w+'px';this.outerNode.children[2].children[0].style.width=w+'px';if(changeDashed){this.outerNode.children[0].style.width=(w-12)+'px';this.outerNode.children[0].style.margin='10px';}
var style=this.innerNode.style;style.width=(w-30)+'px';};JRapid_Window.prototype.resizeToH=function(height,changeDashed){var h=parseInt(height);this.outerNode.previousHeight=this.getHeight();if(parseInt(height)<35){height="35px";}
this.outerNode.children[2].children[0].children[0].children[1].children[1].style.height=(h)+'px';var s=this.outerNode.children[2].children[0].children[0].children[1].children[1].children[0].style;if(s.overflowY=='scroll'||s.overflowY=='auto'){s.height=h+'px';}
if(changeDashed){this.outerNode.children[0].style.height=(h+52)+'px';}};JRapid_Window.prototype.onTitleDown=function(obj,ev){if(this.getState().indexOf('minimized')<0){this.startDnd(ev.clientX,ev.clientY);}
return false;};JRapid_Window.prototype.onTitleDblClick=function(obj,ev){if(this.getNoMaxButton()==''){if(this.getState().indexOf('minimized')>=0){this.restoreMin();}
else if(this.getState().indexOf('normal')>=0){this.maximize();}
else if(this.getState().indexOf('maximized')>=0){this.restoreMax();}}};JRapid_Window.prototype.onMaxClick=function(){if(this.getState().indexOf('minimized')>=0){this.restore();this.maximize();}
else{this.maximize();}};JRapid_Window.prototype.onMinClick=function(){if(this.getState().indexOf('maximized')>=0){this.restore();this.minimize();}
else{this.minimize();}};JRapid_Window.prototype.onHelpClick=function(obj,ev){application.dispatch('helpclick',obj);return false;};JRapid_Window.prototype.getButtonBarWidth=function(){var closeWidth=(this.getNoCloseButton())?0:23;var maxWidth=(this.getNoMaxButton())?0:23;var minWidth=(this.getNoMinButton())?0:23;var helpWidth=(this.getHelpButton())?23:0;return(closeWidth+maxWidth+minWidth+helpWidth+5);};JRapid_Window.remove=function(obj){if(JRapid_Window.active.length>0){var active=JRapid_Window.active;var length=active.length;for(var i=length-1;i>=0;i--){var window=active[i];if(window.outerNode.id==obj.outerNode.id){active.splice(i,1);return window;}}}
return null;};JRapid_Window.prototype.push=function(){var active=JRapid_Window.active;var length=active.length;for(var i=length-1;i>=0;i--){var window=active[i];if(!window.getContainer()){active.splice(i,1);}
if(window.outerNode.id==this.outerNode.id){return;}}
JRapid_Window.active.push(this);};JRapid_Window.shiftTop=function(){if(JRapid_Window.active.length>0){var top=JRapid_Window.active.pop();JRapid_Window.active.splice(0,0,top);}};JRapid_Window.shiftBottom=function(){if(JRapid_Window.active.length>0){var last=JRapid_Window.active[0];JRapid_Window.active.splice(0,1);JRapid_Window.active.splice(JRapid_Window.active.length,JRapid_Window.active.length,last);}};JRapid_Window.top=function(){if(JRapid_Window.active.length>0){var top=JRapid_Window.active.pop();JRapid_Window.active.push(top);return top;}};JRapid_Window.bottom=function(){if(JRapid_Window.active.length>0){var last=JRapid_Window.active[0];return last;}};JRapid_Window.refreshActive=function(onlyActivate){if(JRapid_Window.active.length>0){var act=JRapid_Window.active.pop();if(!onlyActivate&&JRapid_Window.active.length>0){var deact=JRapid_Window.active.pop();if(deact){deact.deactivate();JRapid_Window.active.push(deact);}}
if(act){act.activate();JRapid_Window.active.push(act);}}};JRapid_Window.prototype.deactivate=function(){if(this.getState().indexOf('minimized')<0){if(this.outerNode.children[0]){this.outerNode.children[0].style.display='';this.outerNode.children[0].style.height='30px';this.outerNode.children[0].className='jrapid_window__faded';}}};JRapid_Window.prototype.activate=function(){if(this.outerNode.children[0]){this.outerNode.children[0].style.height=this.outerNode.style.height;this.outerNode.children[0].style.display='none';this.outerNode.children[0].className='jrapid_window__dashed';}};JRapid_Window.getMaxHeight=function(){if(document.all){return application.getDocumentElement().getHeight()-4;}else{return application.getDocumentElement().getHeight();}};JRapid_Window.getMaxWidth=function(){if(document.all){return application.getDocumentElement().getWidth()-22;}else{return application.getDocumentElement().getWidth();}};JRapid_Window.getNextTop=function(windowHeight){var maxHeight=JRapid_Window.getMaxHeight();if(JRapid_Window.yAdd){JRapid_Window.nextTop+=30;}else{JRapid_Window.nextTop-=30;}
if(JRapid_Window.yAdd&&JRapid_Window.nextTop+parseInt(windowHeight)>=maxHeight){JRapid_Window.yAdd=false;JRapid_Window.nextTop-=60;if(JRapid_Window.nextTop+parseInt(windowHeight)>=maxHeight){JRapid_Window.nextTop=30;}}else if(JRapid_Window.nextTop<30){JRapid_Window.nextTop=60;JRapid_Window.yAdd=true;}
return JRapid_Window.nextTop;};JRapid_Window.getNextLeft=function(windowWidth){var maxWidth=JRapid_Window.getMaxWidth();if(JRapid_Window.xAdd){JRapid_Window.nextLeft+=30;}else{JRapid_Window.nextLeft-=30;}
if(JRapid_Window.xAdd&&JRapid_Window.nextLeft+parseInt(windowWidth)>=maxWidth){JRapid_Window.xAdd=false;JRapid_Window.nextLeft-=60;if(JRapid_Window.nextLeft+parseInt(windowWidth)>=maxWidth){JRapid_Window.nextLeft=30;}}else if(JRapid_Window.nextLeft<30){JRapid_Window.nextLeft=60;JRapid_Window.xAdd=true;}
return JRapid_Window.nextLeft;};window.addEventListener('mousemove',function(ev){if(JRapid_Window.resizingTable!=null){var obj=JRapid_Window.resizingTable;var div=obj.outerNode.children[0];var axis=JRapid_Window.resizingAxis;var base=JRapid_Window.resizingBase;var x=ev.clientX-10;var y=ev.clientY-10;if(!obj.getResizeMode()||obj.getResizeMode().indexOf('outline')>=0){div.style.display='';}
if(axis[0]&&(x-base[0])>0){var newWidth=(x-base[0])+"px";div.style.width=newWidth;if(obj.getResizeMode()&&obj.getResizeMode().indexOf('real')>=0){obj.resizeToW(newWidth);}}
if(axis[1]&&(y-base[1])>0){var newHeight=(y-base[1])+"px";div.style.height=newHeight;if(obj.getResizeMode()&&obj.getResizeMode().indexOf('real')>=0){obj.resizeToH(newHeight);}}}else if(JRapid_Window.dndTarget!=null){var obj=JRapid_Window.dndTarget;var div=obj.outerNode.children[0];var x=ev.clientX;var y=ev.clientY;var diff=[x-JRapid_Window.dndCoords[0],y-JRapid_Window.dndCoords[1]];if(!obj.getDndMode()||obj.getDndMode().indexOf('outline')>=0){div.style.display='';var style=div.style;style.top=(isNaN(parseInt(style.top))?0:parseInt(style.top)+diff[1])+"px";style.left=(isNaN(parseInt(style.left))?0:parseInt(style.left)+diff[0])+"px";style.width=obj.getWidth()+'px';style.height=obj.getHeight()+'px';}else{var style=obj.outerNode.style;if((parseInt(style.top)+diff[1])<0){style.top="0px";}else{style.top=(parseInt(style.top)+diff[1])+"px";}
if((parseInt(style.left)+diff[0])<0){style.left="0px";}else{style.left=(parseInt(style.left)+diff[0])+"px";}}
JRapid_Window.dndCoords=[x,y];}},false);JRapid_Window.prototype.showOverlay=function(){var me=this;var height;if(navigator.userAgent.toLowerCase().indexOf('msie')>-1){height=document.body.clientHeight;}else{height=JRapid_Window.getMaxHeight()+"px";}
var width=JRapid_Window.getMaxWidth()+"px";var top=me.getY();var left=me.getX();var style=me.outerNode.children[1].style;style.height=height;style.width=width;style.display='';style.top=(-top)+"px";style.left=(-left)+"px";}
window.addEventListener('mouseup',function(){if(JRapid_Window.resizingTable!=null){var drawingDiv=JRapid_Window.resizingTable.outerNode.children[0];var width=drawingDiv.style.width;if(JRapid_Window.resizingAxis[1]){var height=drawingDiv.style.height;JRapid_Window.resizingTable.resizeTo(0,parseInt(height)-52-20);}
if(JRapid_Window.resizingAxis[0]){var w=parseInt(width)-15;JRapid_Window.resizingTable.outerNode.style.width=w+'px';JRapid_Window.resizingTable.outerNode.children[2].style.width=w+'px';JRapid_Window.resizingTable.outerNode.children[2].children[0].style.width=w+'px';}
drawingDiv.style.display='none';application.dispatch('resizewindow',JRapid_Window.resizingTable);}
else if(JRapid_Window.dndTarget!=null){var obj=JRapid_Window.dndTarget;if(!obj.getDndMode()||obj.getDndMode().indexOf('outline')>=0){var drawingDiv=obj.outerNode.children[0];var diff=[parseInt(drawingDiv.style.left),parseInt(drawingDiv.style.top)];var style=obj.outerNode.style;if((parseInt(style.top)+diff[1])<0){style.top="0px";}else{style.top=(parseInt(style.top)+diff[1])+"px";}
if((parseInt(style.left)+diff[0])<0){style.left="0px";}else{style.left=(parseInt(style.left)+diff[0])+"px";}
drawingDiv.style.top="0px";drawingDiv.style.left="0px";drawingDiv.style.display='none';}}
JRapid_Window.resizingTable=null;JRapid_Window.dndTarget=null;},false);window.addEventListener('keyup',function(ev){if(ev.keyCode==37&&ev.ctrlKey&&ev.altKey){JRapid_Window.shiftTop();if(JRapid_Window.bottom()){JRapid_Window.bottom().deactivate();}
JRapid_Window.refreshActive(true);if(JRapid_Window.top()){JRapid_Window.top().top();}}else if(ev.keyCode==39&&ev.ctrlKey&&ev.altKey){JRapid_Window.shiftBottom();JRapid_Window.refreshActive();if(JRapid_Window.top()){JRapid_Window.top().top();}}else if(ev.keyCode==68&&ev.ctrlKey&&ev.altKey){JRapid_Window.hideAll();}else if(ev.keyCode==87&&ev.ctrlKey&&ev.altKey){JRapid_Window.showAll();}
application.stopPropagation(ev);application.preventDefault(ev);},false);function JRapid_Xml(outerNode){this.init(outerNode,'com.htmli.xml.Xml','Xml');}
JRapid_Xml.prototype=new HTMLiElement();JRapid_Xml.prototype.getUrl=function(){return this.getAttribute('url');};JRapid_Xml.prototype.setUrl=function(url){this.setAttribute('url',url);};JRapid_Xml.prototype.getCache=function(){var value=this.getAttribute('cache');return(value=='false'||value=='no'||value==null||!value)?false:true;};JRapid_Xml.prototype.setCache=function(cache){this.setAttribute('cache',cache?'true':'false');};JRapid_Xml.prototype.getXmlDocument=function(){var xmlDocument=XmlDocument.create();xmlDocument.loadXML(this.outerNode.value);return xmlDocument;};JRapid_Xml.prototype.post=function(handler){var me=this;var httpRequest=HttpRequest.create();me.outerNode.httpRequest=httpRequest;httpRequest.open("POST",me.getUrl(),true);httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){if(handler){var x=XmlDocument.create();x.loadXML(httpRequest.responseText);handler(x,httpRequest.status);}}};var xmlDoc=XmlDocument.create();xmlDoc.loadXML(me.outerNode.value.replace('<?xml version="1.0"?>','<?xml version="1.0" encoding="utf-8" ?>'));httpRequest.setRequestHeader("Content-Type","application/xml;charset=UTF-8");httpRequest.send(xmlDoc);};JRapid_Xml.prototype.get=function(handler,param){var me=this;var httpRequest=HttpRequest.create();var url=me.getCache()?(me.getUrl()+'?'+JRapid_Xml.cacheHash):(me.getUrl()+'?'+new Date().getTime());httpRequest.open("GET",url,true);httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){me.outerNode.value=httpRequest.responseText;if(handler){handler(param,httpRequest.responseXML,httpRequest.status);}
application.dispatch('change',me,'HTMLEvents');}};httpRequest.send("");};JRapid_Xml.prototype.abort=function(){if(this.outerNode.httpRequest){this.outerNode.httpRequest.onreadystatechange=function(){};this.outerNode.httpRequest.abort();}};JRapid_Xml.prototype.setXml=function(xml){this.outerNode.value=xml;application.dispatch('change',this,'HTMLEvents');};JRapid_Xml.prototype.append=function(node,xmlChild){var me=this;var xml=me.getXmlDocument();xml.selectSingleNode(node).appendChild(xmlChild.getXmlDocument().documentElement);me.setXml(xml.xml);application.dispatch('change',me,'HTMLEvents');};JRapid_Xml.prototype.replace=function(node,xmlChild){var me=this;var xml=me.getXmlDocument();var node=xml.selectSingleNode(node);node.parentNode.appendChild(xmlChild.getXmlDocument().documentElement);node.parentNode.removeChild(node);me.setXml(xml.xml);application.dispatch('change',me,'HTMLEvents');};JRapid_Xml.prototype.remove=function(node){var me=this;var xml=me.getXmlDocument();var node=xml.selectSingleNode(node);node.parentNode.removeChild(node);me.setXml(xml.xml);application.dispatch('change',me,'HTMLEvents');};JRapid_Xml.cacheHash=new Date().getTime();window.addEventListener('keyup',function(ev){if(ev.keyCode==123){JRapid_Xml.cacheHash=new Date().getTime();alert('Cache cleaned.');}},true);function JRapid_XmlMultiple(outerNode){this.init(outerNode,'com.htmli.xml.XmlMultiple','XmlMultiple');}
JRapid_XmlMultiple.prototype=new HTMLiElement();JRapid_XmlMultiple.prototype.getRoot=function(){return this.getAttribute('root');};JRapid_XmlMultiple.prototype.setRoot=function(root){this.setAttribute('root',root);};JRapid_XmlMultiple.prototype.getXmlDocument=function(){var me=this;var xmlDocument=XmlDocument.create();xmlDocument.loadXML('<'+me.getRoot()+'/>');var children=me.getChildren();for(var i=0;i<children.getLength();i++){var n=document.all?children.item(i).getXmlDocument().documentElement:xmlDocument.adoptNode(children.item(i).getXmlDocument().documentElement);xmlDocument.documentElement.appendChild(n);}
return xmlDocument;};JRapid_XmlMultiple.prototype.get=function(handler,param){var me=this;var children=me.getChildren();var count=children.getLength();var aux=count;var status=200;for(var i=0;i<count;i++){children.item(i).get(function(foo,xmlDoc,currentStatus){status=currentStatus==200?status:currentStatus;if(--aux<=0){if(handler){handler(param,me.getXmlDocument(),status);}}});}};function JRapid_XmlRpcServer(url){this.url=url;}
JRapid_XmlRpcServer.prototype.execute=function(service){var args='';for(var i=1;i<arguments.length;i++){args+=',arguments['+i+']';}
var handler=function(){};eval('this.call(handler, this.url, false, service '+args+')');};JRapid_XmlRpcServer.prototype.executeAsync=function(service,handler){var args='';for(var i=2;i<arguments.length;i++){args+=',arguments['+i+']';}
eval('this.call(handler, this.url, true, service '+args+')');};JRapid_XmlRpcServer.prototype.objectToXMLRPC=function(obj){var wo=obj.valueOf();retstr="<struct>";for(prop in obj){if(typeof wo[prop]!="function"){retstr+="<member><name>"+prop+"</name><value>"+this.getXML(wo[prop])+"</value></member>";}}
retstr+="</struct>";return retstr;};JRapid_XmlRpcServer.prototype.stringToXMLRPC=function(obj){return"<string><![CDATA["+obj.replace(/\]\]/g,"]"+" ]")+"]"+"]></string>";};JRapid_XmlRpcServer.prototype.numberToXMLRPC=function(obj){if(obj==parseInt(obj)){return"<int>"+obj+"</int>";}else if(obj==parseFloat(obj)){return"<double>"+obj+"</double>";}else{return this.booleanToXMLRPC(false);}};JRapid_XmlRpcServer.prototype.booleanToXMLRPC=function(obj){return"<boolean>"+(obj?"1":"0")+"</boolean>";};JRapid_XmlRpcServer.prototype.dateToXMLRPC=function(obj){return"<dateTime.iso8601>"+doYear(obj.getUTCFullYear())+doZero(obj.getMonth())+doZero(obj.getUTCDate())+"T"+doZero(obj.getHours())+":"+doZero(obj.getMinutes())+":"+doZero(obj.getSeconds())+"</dateTime.iso8601>";function doZero(nr){nr=String("0"+nr);return nr.substr(nr.length-2,2);}
function doYear(year){if(year>9999||year<0){throw new Error("Unsupported year: "+year);}
year=String("0000"+year)
return year.substr(year.length-4,4);}};JRapid_XmlRpcServer.prototype.arrayToXMLRPC=function(obj){var retstr="<array><data>";for(var i=0;i<obj.length;i++){retstr+="<value>"+this.getXML(obj[i])+"</value>";}
return retstr+"</data></array>";};JRapid_XmlRpcServer.prototype.getXML=function(obj){switch(typeof(obj)){case"string":return this.stringToXMLRPC(obj);case"number":return this.numberToXMLRPC(obj);case"boolean":return this.booleanToXMLRPC(obj);}
if(obj.getUTCFullYear){return this.dateToXMLRPC(obj);}else if(obj.constructor.toString().match(/array/i)){return this.arrayToXMLRPC(obj);}else{return this.objectToXMLRPC(obj);}};JRapid_XmlRpcServer.prototype.parseResponse=function(xmlDoc){var rpcErr=xmlDoc.getElementsByTagName("fault");if(rpcErr.length>0){rpcErr=JRapid_XmlRpcServer.prototype.toObject(rpcErr[0].firstChild.firstChild);if(document.all){throw new Error(rpcErr.faultCode,rpcErr.faultString);}else{throw new Error(rpcErr.faultString,rpcErr.faultCode);}}
var main=xmlDoc.getElementsByTagName("param");if(main.length==0){throw new Error("Malformed XMLRPC Message");}
return JRapid_XmlRpcServer.prototype.toObject(main[0].firstChild);};JRapid_XmlRpcServer.prototype.toObject=function(data){if(!data){return data;}
if(!data.tagName){return data.nodeValue;}
switch(data.tagName){case"string":return(data.firstChild)?new String(data.firstChild.nodeValue):"";case"value":return this.toObject(data.firstChild);case"int":case"i4":case"double":return(data.firstChild)?new Number(data.firstChild.nodeValue):0;case"dateTime.iso8601":var sn=(document.all)?"-":"/";if(/^(\d{4})(\d{2})(\d{2})T(\d{2}):(\d{2}):(\d{2})/.test(data.firstChild.nodeValue)){;return new Date(RegExp.$2+sn+RegExp.$3+sn+RegExp.$1+" "+RegExp.$4+":"+RegExp.$5+":"+RegExp.$6);}else{return new Date();}
case"array":var ret=[];for(var i=0;i<data.firstChild.childNodes.length;i++){ret[ret.length]=this.toObject(data.firstChild.childNodes[i]);}
case"struct":var ret={};for(var i=0;i<data.childNodes.length;i++){ret[data.childNodes[i].firstChild.firstChild.nodeValue]=this.toObject(data.childNodes[i].lastChild);}
return ret;case"boolean":return Boolean(isNaN(parseInt(data.firstChild.nodeValue))?(data.firstChild.nodeValue=="true"):parseInt(data.firstChild.nodeValue))
case"base64":return this.decodeBase64(data.firstChild.nodeValue);default:throw new Error("Malformed XMLRPC Message: "+data.tagName);}};JRapid_XmlRpcServer.prototype.call=function(handler,url,async,service,params){var message='<?xml version="1.0" ?><methodCall><methodName>'+service+'</methodName><params>';for(i=4;i<arguments.length;i++){message+='<param><value>'+this.getXML(arguments[i])+'</value></param>';}
message+='</params></methodCall>';var xmlDoc=XmlDocument.create();xmlDoc.loadXML(message);var httpRequest=HttpRequest.create();httpRequest.open('POST',url,async);httpRequest.setRequestHeader("Content-type","text/xml");var parseResponse=this.parseResponse;if(async){httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){try{var r=parseResponse(httpRequest.responseXML);}catch(e){handler(null,e);return;}
handler(r);}}}
httpRequest.send(xmlDoc);if(!async){handler(this.parseResponse(httpRequest.responseXML));}};JRapid_XmlRpcServer.prototype.decodeBase64=function(sEncoded){if(!sEncoded||(sEncoded.length%4)>0)
return sEncoded;else if(typeof(atob)!='undefined')
return atob(sEncoded);var nBits,i,sDecoded='';var base64='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';sEncoded=sEncoded.replace(/\W|=/g,'');for(i=0;i<sEncoded.length;i+=4){nBits=(base64.indexOf(sEncoded.charAt(i))&0xff)<<18|(base64.indexOf(sEncoded.charAt(i+1))&0xff)<<12|(base64.indexOf(sEncoded.charAt(i+2))&0xff)<<6|base64.indexOf(sEncoded.charAt(i+3))&0xff;sDecoded+=String.fromCharCode((nBits&0xff0000)>>16,(nBits&0xff00)>>8,nBits&0xff);}
return sDecoded.substring(0,sDecoded.length-
((sEncoded.charCodeAt(i-2)==61)?2:(sEncoded.charCodeAt(i-1)==61?1:0)));};function JRapid_Xsl(outerNode){this.init(outerNode,'com.htmli.xml.Xsl','Xsl');this.innerNode=outerNode.children[0];}
JRapid_Xsl.prototype=new HTMLiElement();JRapid_Xsl.prototype.getUrl=function(){return this.getAttribute('url');};JRapid_Xsl.prototype.setUrl=function(url){this.setAttribute('url',url);};JRapid_Xsl.prototype.getSrc=function(){return this.getAttribute('src');};JRapid_Xsl.prototype.setSrc=function(src){this.setAttribute('src',src);};JRapid_Xsl.prototype.getStatus=function(){var me=this;return me.getUrl()?me.outerNode.status:me.getContainer().getElementById(me.getSrc()).getStatus();};JRapid_Xsl.prototype.refresh=function(handler,refreshXml,param){var me=this;var url;var xmlDocument;var xslDocument=this.getXslt();if(me.getUrl()){var httpRequest=HttpRequest.create();var createTime=new Date().getTime();me.outerNode.lastRequest=createTime;httpRequest.open("GET",me.getUrl()+'?rand='+new Date().getTime(),true);httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){if(createTime==me.outerNode.lastRequest){var xmlDocument=httpRequest.responseXML;if(me&&me.outerNode&&me.outerNode.children[0]){var txt=xmlDocument.transformNode(xslDocument);me.outerNode.children[0].innerHTML=txt;me.evalScripts(txt);}}
if(handler){handler(param,xmlDocument,httpRequest.status);}
application.dispatch('refresh',me);}};httpRequest.send('');}else{var xml=me.getContainer().getElementById(me.getSrc());var onrefresh=function(p,xmlDocument,status){if(!xml){throw new Error("Source "+me.getSrc()+" for XSL "+me.getId()+" doesn't exist");}
var e;try{var txt=xmlDocument.transformNode(xslDocument);me.outerNode.children[0].innerHTML=txt;me.evalScripts(txt);application.dispatch('refresh',me);}catch(e1){alert(e1.message);e=e1;}
if(handler){handler(p,xmlDocument,status,e);}};if(refreshXml){xml.get(onrefresh);}else{onrefresh(param,xml.getXmlDocument());}}};JRapid_Xsl.prototype.getXslt=function(){var me=this;var xsl='<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" ';xsl+='xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xslt2="http://www.htmli.com/1999/XSL/Transform">';xsl+='<xslt:namespace-alias stylesheet-prefix="xslt2" result-prefix="xslt"/>';xsl+='<xslt:output method="html" omit-xml-declaration="yes" /><xslt:template match="/">';xsl+=me.outerNode.children[1].value;xsl+='</xslt:template></xslt:stylesheet>';var xslDocument=XmlDocument.create();xslDocument.async=false;xslDocument.loadXML(xsl);return xslDocument;};JRapid_Xsl.prototype.populate=function(xmlDocument){this.outerNode.children[0].innerHTML=this.getXslt().transformNode(xslDocument);};JRapid_Xsl.prototype.evalScripts=function(txt){var d=document.createElement('div');d.innerHTML='<br>'+txt;var scripts=d.getElementsByTagName('script');var n=scripts.length;for(var i=0;i<n;i++){eval(scripts[i].text);}};Application.prototype.evalScripts=function(txt,node,handler){document.write=function(line){};var allScripts=document.getElementsByTagName('script');var scripts=node.getElementsByTagName('script');var n=scripts.length;var isIncluded=function(x,s){for(var i=0;i<s.length;i++){if(s[i]!=x&&s[i].src==x.src)return true;}
return false;};if(!scripts){if(handler)handler();return;}
var loadScript=function(scripts,i){var script=document.createElement('script');if(scripts[i].src&&isIncluded(scripts[i],allScripts)){i++;if(i<scripts.length){loadScript(scripts,i);}else if(handler)handler();return;}
script.type=scripts[i].type;script.text=scripts[i].text;if(scripts[i].src){script.src=scripts[i].src;if(script.addEventListener){script.addEventListener('load',function(){i++;if(i<scripts.length){loadScript(scripts,i);}else if(handler)handler();},true);script.addEventListener('error',function(){i++;if(i<scripts.length){loadScript(scripts,i);}else if(handler)handler();},true);}else{script.onreadystatechange=function(){if(script.readyState=='complete'||script.readyState=='loaded'){i++;if(i<scripts.length){loadScript(scripts,i);}else if(handler)handler();}};}}
document.body.appendChild(script);if(!scripts[i].src){i++;if(i<scripts.length){loadScript(scripts,i);}else if(handler)handler();}};loadScript(scripts,0);if(document.all){var links=node.getElementsByTagName('link');var n=links.length;var head=document.getElementsByTagName('head')[0];for(var i=0;i<n;i++){var link=document.createElement('link');link.type=links[i].type;link.href=links[i].href;link.rel=links[i].rel;head.appendChild(link);}}};if(typeof(jrapid)=='undefined'){JRapid_Source.cache=false;JRapid_Input.dontDispatchChangeEvent=true;function JRapid(obj){this.timeoutSeconds=10;this.dateRegExp='\\d\\d/\\d\\d/\\d\\d\\d\\d';this.dateTimeRegExp='\\d\\d/\\d\\d/\\d\\d\\d\\d \\d\\d:\\d\\d';this.timeRegExp='\\d\\d:\\d\\d';this.timeQuantityRegExp='^([\\d]+d){0,1}[ ]{0,1}([\\d]+h){0,1}[ ]{0,1}([\\d]+m){0,1}[ ]{0,1}$';this.timeRangeRegExp='\\d\\d:\\d\\d - \\d\\d:\\d\\d';}
JRapid.prototype.form=function(obj){if((typeof obj)=='string'){return jrapid.openForm(null,obj,null,obj.id?obj.id:0,null,obj.module?obj.module:'Main');}else{return jrapid.openForm(obj.obj,obj.entity,obj.canvas,obj.id?obj.id:0,obj.defaultset,obj.module?obj.module:'Main',obj.openWindow,obj.center);}};JRapid.prototype.listing=function(obj){jrapid.openListing(obj.me,obj.entity,obj.canvas,obj.listing,obj.subset,obj.replace,obj.handler,obj.openWindow,obj.url,obj.serverPath,obj.defaultset,obj.defaultsetparams);};JRapid.prototype.panel=function(obj){};JRapid.FILE_EXTENSION='.html';JRapid.prototype.wrap=function(obj){return application.wrapNode(obj);};JRapid.prototype.get=function(id){return application.getElementById(id);};JRapid.prototype.getServerPath=function(container,def){if(jrapid.url){return jrapid.url+'/xml/';}
if(def){container.node.setAttribute('serverPath',def);}
return jrapid.SERVER_PATH;};JRapid.prototype.getElementsById=function(id,node){if(document.all){var n=document.all[id];var ret=[];if(n==null){return[];};if(n.length==null||n.length==0||(n.tagName&&n.tagName.toLowerCase()=='select')){return[n];}
var isChildOf=function(obj,p){while(obj){if(obj==p)return true;obj=obj.parentNode;}
return false;};for(var i=0;i<n.length;i++){if(!node||isChildOf(n[i],node)){ret[ret.length]=n[i];}}
return ret;}else if(node&&node.querySelectorAll){return node.querySelectorAll('#'+id);}else if(document.querySelectorAll){return document.querySelectorAll('#'+id);}else if(document.evaluate){var ret=new Array();var result=document.evaluate("//*[@id='"+id+"']",node?node:document,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);var el;while(el=result.iterateNext()){ret[ret.length]=el;}
return ret;}};JRapid.prototype.getParam=function(param,def){var url=window.location.search.toString().substring(1);var params=url.split('&');for(var i=0;i<params.length;i++){var parameter=params[i].split("=");if(parameter[0]==param){return parameter[1];}}
var hash=window.location.hash;if(hash&&hash.length>0){var params=hash.substring(1).split('&');for(var i=0;i<params.length;i++){var parameter=params[i].split("=");if(parameter[0]==param){return parameter[1];}}}
return def;};JRapid.prototype.createSource=function(){var source=document.createElement('div');source.setAttribute('jclass','JRapid_Source');source.setAttribute('class','JRapid_Source');source.className='container__';return jrapid.wrap(source);};JRapid.prototype.replaceAll=function(string,pattern,replacement){while(string.match(pattern)){string=string.replace(pattern,replacement);}
return string;};JRapid.prototype.escapeParam=function(param){if(param==null){return param;}
var parts=param.split('/');var ret='';for(var i=0;i<parts.length;i++){ret+=(i>0?'|/':'')+parts[i];}
return ret;};JRapid.prototype.getRowFor=function(me){var row=me.outerNode;while(row&&row.getAttribute){if(row.getAttribute('row')=='row'){return row;}
row=row.parentNode;}};JRapid.prototype.nextreport=function(key,me){window.open('../report/'+me.getAttribute('report')+'?'+key
+(me.getAttribute('pdf')?'&pdf=pdf':''),'_blank','width=700,height=600,resizable=yes');};JRapid.prototype.nextfunction=function(key,me){eval(me.getAttribute('function')+'(key, me)');};JRapid.prototype.nextpanel=function(key,me){window.location=me.getAttribute('panel')+JRapid.FILE_EXTENSION;};JRapid.prototype.nextform=function(key,me){jrapid.openForm(me,me.getAttribute('entity'),'formcanvas',key,me.getAttribute('defaultset'),null,true);};JRapid.prototype.nextmessage=function(key,me){me.getContainer().getElementById('windowcontainer').outerNode.innerHTML='<div class="jrapid_message">'+me.getAttribute('message');+'</div>';};JRapid.prototype.cancel=function(obj){var container=jrapid.wrap(obj).getContainer();container.node.parentNode.removeChild(container.node);}
JRapid.prototype.apply=function(me,handler,confirmed,prompted,doNotClose){var container=me.getContainer();var xml=container.getElementById('xml');me.setDisabled(true);jrapid.hasErrors='';var xmlOuter=xml.outerNode;if(xmlOuter&&xmlOuter.triggers&&xmlOuter.triggers['__onapply']){for(var i=0;i<xmlOuter.triggers['__onapply'].length;i++){xmlOuter.triggers['__onapply'][i].execute(null,me);}}
if(jrapid.hasErrors.length||!this.validate(container.getElementById('form').outerNode)){if(jrapid.hasErrors.length){alert(jrapid.hasErrors);}
me.setDisabled(false);return false;}
if(!jrapid.url){this.setConfirmedAndPrompted(xml,confirmed,prompted);}
var t;if(jrapid.timeoutSeconds){var timeout=function(){if(t&&!confirm(jrapid.timeoutSeconds+' seconds have passed. \n\nPlease verify your Internet connection.\n\nKeep waiting?')){me.setDisabled(false);xml.abort();}else if(t){t=setTimeout(timeout,jrapid.timeoutSeconds*1000);}};t=setTimeout(timeout,jrapid.timeoutSeconds*1000);}
var tx=jrapid.startConsole('Applying',false,'green');xml.post(function(xmlDoc,status){jrapid.endConsole(tx);if(t){clearTimeout(t);t=null;}
if(status!=200){me.setDisabled(false);jrapid.startConsole('Network error',true,'red');return false;}
if(xmlDoc==null||xmlDoc.documentElement==null||xmlDoc.documentElement.tagName=='exception'){me.setDisabled(false);jrapid.startConsole('Error',true,'red');if(xmlDoc!=null&&xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()){alert(xmlDoc.documentElement.childNodes[0].nodeValue);}else{alert('Unable to store');}
return false;}else if(xmlDoc.documentElement.tagName=='confirmation'){jrapid.startConsole('Confirm',true,'yellow');if(confirm(xmlDoc.documentElement.childNodes[0].nodeValue)){return jrapid.apply(me,handler,(confirmed?(confirmed+','):'')+xmlDoc.documentElement.getAttribute('code'));}else{me.setDisabled(false);return;}}else if(xmlDoc.documentElement.tagName=='prompt'){jrapid.startConsole('Prompt',true,'yellow');var value;if(value=prompt(xmlDoc.documentElement.childNodes[0].nodeValue,'')){return jrapid.apply(me,handler,confirmed,(prompted?(prompted+','):'')+xmlDoc.documentElement.getAttribute('code')+'='+value);}else{me.setDisabled(false);return;}}
jrapid.startConsole('Saved',true,'green');if(container.node&&container.node.listingContainer){var xsl=jrapid.listingGetXsl(container.node.listingContainer);if(xsl&&xsl.refresh){xsl.refresh();}}
if(doNotClose){var id=xmlDoc.documentElement.childNodes[0].nodeValue;var oldDoc=xml.getXmlDocument();oldDoc.selectSingleNode('/*').setAttribute('id',id);xml.setXml(oldDoc.xml);me.setDisabled(false);}
if(handler){handler(xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()?xmlDoc.documentElement.childNodes[0].nodeValue:null);}
try{if(!doNotClose&&!xml.getAttribute('repeat')){container.close();}}catch(e){}
me.setDisabled(false);});};JRapid.prototype.setConfirmedAndPrompted=function(xml,confirmed,prompted){var url=xml.getUrl();if(url.indexOf('?')>=0){url=url.split('?')[0];}
url+='?';if(confirmed){url+='confirmed='+confirmed;}
if(prompted){var prompts=prompted.split(',');var promptParam='';for(var i=0;i<prompts.length;i++){promptParam+=(i>0?',':'')+prompts[i].split('=')[0];url+='&'+prompts[i];}
url+='&prompted='+promptParam;}
xml.setUrl(url);};JRapid.prototype.store=function(me,handler,isAsync,entity){this.apply(me,function(key){var container=me.getContainer();if(handler){if(handler(key,me)){return;}}
if(isAsync){jrapid.startAsyncConsole(container,key,entity);}
var xml=container.getElementById('xml');if(xml&&xml.getAttribute('repeat')){jrapid.loadForm(me.getContainer(),entity,'0',null,false,null,null,null,true);}},null,null,handler==jrapid.nextmessage);};JRapid.prototype.openListing=function(me,entity,canvas,listing,subset,replace,handler,openWindow,url,serverPath,defaultset,defaultsetparams){var container=me.getContainer();if(replace&&canvas){canvas.innerHTML='';}
var id='listing'+Math.random();var source=jrapid.createSource(true);source.setId(id);source.setInnerHTML('');if(canvas){canvas.appendChild(source.outerNode);}else{document.body.appendChild(source.outerNode);}
var w;if(openWindow){w=application.openWindow(entity,source.outerNode);w.setAttribute('onresizewindow','jrapid.onResizeListWindow(this, "'+id+'");');w.helpButton.setAttribute("onhelpclick","jrapid.openHelp(jrapid.wrap(this),'"+entity+"',false)");}
var txOpenListing=jrapid.startConsole('Opening listing',false,'green');source.setUrl(url?url:(entity+(listing&&listing.length>0?'_':'')+listing+'_list'+JRapid.FILE_EXTENSION));source.open(function(){if(!source.isOpened()){jrapid.endConsole(txOpenListing);jrapid.startConsole('Network error',true,'red');return;}
var childContainer=source.getChildContainer();var xsl=jrapid.listingGetXsl(childContainer);xsl.getStyle().display='';var baseurl=jrapid.getServerPath(childContainer,serverPath)+entity+(subset&&subset.length>0?('/'+subset):'');xsl.setUrl(baseurl+',page1');xsl.setAttribute('baseurl',baseurl);xsl.setAttribute('entity',entity);xsl.refresh(function(foo,xmlDoc,status){jrapid.endConsole(txOpenListing);if(status!=200){jrapid.startConsole('Network error',true,'green');return;}
if(xmlDoc==null||xmlDoc.documentElement==null||xmlDoc.documentElement.tagName=='exception'){jrapid.startConsole('Network error',true,'red');if(xmlDoc!=null&&xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()){alert(xmlDoc.documentElement.childNodes[0].nodeValue);}else{alert('Unable to read');}
return;}
var add=childContainer.getElementById('add');if(add&&defaultset){add.setAttribute('defaultset',defaultset);add.setAttribute('defaultsetparams',defaultsetparams);}
if(handler){handler(xsl.getContainer());}
if(w){var maindiv=xsl.getContainer().getElementById('maindiv');var m=maindiv.outerNode;m.style.position='absolute';m.style.top='0px';var h=Math.min(maindiv.getHeight(),document.documentElement.clientHeight-m.getBoundingClientRect().top-52);jrapid.wrap(w).resizeTo(maindiv.getWidth()+'px',h,true);m.style.width='100%';m.style.position='';}});});};JRapid.prototype.loadListing=function(container,entity,subset,openWindow,canvas,handler,serverPath,inOnLoad){if(inOnLoad&&!document.location.toString().match(new RegExp(entity+"([_a-zA-Z0-9]*)_list.html"))){return;}
var xsl=container.getElementById('xsl_1_1');var baseurl=jrapid.getServerPath(container,serverPath)+entity+(subset&&subset.length>0?('/'+subset):'');xsl.setUrl(baseurl+',page1');xsl.setAttribute('baseurl',baseurl);xsl.setAttribute('entity',entity);xsl.getStyle().display='';var w;if(openWindow){w=application.openWindow(entity,container.getElementById('maindiv').outerNode);w.setAttribute('onresizewindow','jrapid.onResizeListWindow(this, "maindiv");');w.helpButton.setAttribute("onhelpclick","jrapid.openHelp(jrapid.wrap(this),'"+entity+"',false)");}
if(canvas){if(container.node){container.node.canvas=canvas;}else{application.canvas=canvas;}}
var tx=jrapid.startConsole('Loading listing...',false,'green');xsl.refresh(function(){jrapid.endConsole(tx);jrapid.startConsole('Listing loaded',true,'green');if(w){var maindiv=xsl.getContainer().getElementById('maindiv');jrapid.wrap(w).resizeTo(700+'px',maindiv.getHeight(),true);}
if(handler){handler();}},true);};JRapid.prototype.resizeTable=function(xsl,win){var container=xsl.getContainer();var canvas;if(win){canvas=win;}else{canvas=(container.node&&container.node.canvas)?container.node.canvas:(application.canvas?application.canvas:null);}
if(canvas){var table=jrapid.listingGetTable(container);if(!table){return;}
if(table.outerNode.tagName.toLowerCase()=='table'){table=table.getParentNode();}
var filters=container.getElementById('filterfieldset');xsl.getStyle().display='none';var canvasHeight=canvas.getHeight()-(win?jrapid.WINDOW_HEIGHT:0);xsl.getStyle().display='';var diff=canvasHeight-container.getElementById('maindiv').getHeight();var h=table.getHeight()+diff-2;if(h>0)table.getStyle().height=h+'px';table.getStyle().width='100%';table.getStyle().overflowY='scroll';if(table.getAttribute('onresize')){eval('table.outerNode.aux = function(ev) {'+table.getAttribute('onresize')+'};');table.outerNode.aux();}
if(filters){filters.getStyle().display='';}}};JRapid.prototype.onResizeListWindow=function(me,id){setTimeout(function(){jrapid.resizeTable(jrapid.listingGetXsl(new Container(document.getElementById(id))),me);},10);};JRapid.prototype.openForm=function(me,entity,canvas,id,defaultset,module,openWindow,center){var container=(me&&me.getContainer)?me.getContainer():null;var sourcePrototype=jrapid.createSource();sourcePrototype.outerNode.id='source'+new Date().getTime();document.body.appendChild(sourcePrototype.outerNode);skipWindow=true;module=module?module:'Main';sourcePrototype.setUrl((jrapid.url?(jrapid.url+'/forms.'+module+'/'):('../forms.'+module+'/'))+entity+(skipWindow?'_form.html':'_form.html'));var txOpenForm=jrapid.startConsole('Opening form',false,'green');sourcePrototype.open(function(){jrapid.endConsole(txOpenForm);if(!sourcePrototype.isOpened()){var tx=jrapid.startConsole('Network error',true,'red');return;}
var childContainer=sourcePrototype.getChildContainer();jrapid.loadForm(childContainer,entity,id,defaultset,openWindow,function(ok){if(!ok){sourcePrototype.outerNode.parentNode.removeChild(sourcePrototype.outerNode);}},null,null,null,null,null,center);});sourcePrototype.getChildContainer().node.listingContainer=container;return sourcePrototype.outerNode;};JRapid.prototype.loadForm=function(container,entity,id,defaultset,openWindow,handler,confirmed,prompted,repeat,serverPath,inOnLoad,center){if(inOnLoad&&entity!='Login'&&!document.location.toString().match(new RegExp(entity+"([_a-zA-Z0-9]*)_form.html"))){return;}
serverPath=jrapid.getServerPath(container,serverPath);var children=container.getElementById('xmlmultiple').getChildren();for(var i=0;i<children.getLength();i++){if(children.item(i).getAttribute('baseurl')){children.item(i).setUrl(serverPath+children.item(i).getAttribute('baseurl'));}}
var w;var windowcontainer=container.getElementById('windowcontainer').outerNode;if(openWindow){w=application.openWindow(windowcontainer.getAttribute('label'),windowcontainer,null,null,true,true);w.helpButton.setAttribute("onhelpclick","jrapid.openHelp(jrapid.wrap(this),'"+entity+"',true)");w.style.display='none';}
var xsl=container.getElementById('xsl');var xml=container.getElementById('xml');xml.setUrl(serverPath+entity+'/'+(defaultset?(defaultset+'/'):'')+id);xml.setAttribute('repeat',repeat?'repeat':'');xml.setAttribute('baseurl',serverPath+entity+'/'+(defaultset?(defaultset+'/'):''));xml.setAttribute('entity',entity);if(!jrapid.url){this.setConfirmedAndPrompted(xml,confirmed,prompted);}
var tx=jrapid.startConsole('Loading form...',false,'green');xml.setUrl(xml.getUrl()+'&'+new Date().getTime());xsl.refresh(function(foo,xmlDoc,status){jrapid.endConsole(tx);if(status!=200){alert('Network error');jrapid.startConsole('Network error',true,'red');if(handler){handler(false);}
return;}
var xmlDoc=xml.getXmlDocument();if(!JRapid.ignoreErrors){if(xmlDoc==null||xmlDoc.documentElement==null||xmlDoc.documentElement.tagName=='exception'){jrapid.startConsole('Error',true,'red');if(xmlDoc!=null&&xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()){alert(xmlDoc.documentElement.childNodes[0].nodeValue);}else{alert('Unable to read');}
if(handler){handler(false);}
return false;}else if(xmlDoc.documentElement.tagName=='confirmation'){jrapid.startConsole('Confirm',true,'yellow');if(confirm(xmlDoc.documentElement.childNodes[0].nodeValue)){if(handler){handler(false);}
return jrapid.loadForm(container,entity,id,defaultset,false,handler,(confirmed?(confirmed+','):'')+xmlDoc.documentElement.getAttribute('code'));}else{if(handler){handler(false);}
return;}}else if(xmlDoc.documentElement.tagName=='prompt'){jrapid.startConsole('Prompt',true,'yellow');var value;if(value=prompt(xmlDoc.documentElement.childNodes[0].nodeValue,'')){if(handler){handler(false);}
return jrapid.loadForm(container,entity,id,defaultset,false,handler,confirmed,xmlDoc.documentElement.getAttribute('code')+'='+value);}else{if(handler){handler(false);}
return;}}
jrapid.startConsole('Form loaded',true,'green');}
if(w){w.style.display='';var size=document.documentElement.clientHeight-windowcontainer.getBoundingClientRect().top-52;if(size<windowcontainer.offsetHeight){windowcontainer.style.overflowY='scroll';windowcontainer.style.height=size+'px';}
if(center){jrapid.wrap(w).center();}}
if(handler){handler(true);}},true);};JRapid.prototype.openFormFromListing=function(me,entity,canvas,defaultsetparams,defaultset,module){var id=jrapid.evaluateIfNotNull(defaultsetparams,me,'0');if(defaultsetparams&&(id=='0'||id=='')){if(confirm('It is necessary to save before continuing. Save now?')){var submit=me.getContainer().getParent().getElementById('submit');jrapid.apply(submit,function(newId){jrapid.openForm(me,entity,canvas,newId,defaultset,module,true);var xml=submit.getContainer().getElementById('xml');if(xml.getAttribute('baseurl')){xml.setUrl(xml.getAttribute('baseurl')+'/'+newId);var path=xml.getAttribute('entity');path=path==null||path.length==0?path:path.substring(0,1).toLowerCase()+path.substring(1);path='/'+path+'/@id';if(xml.outerNode.triggers&&xml.outerNode.triggers[path]){for(var i=0;i<xml.outerNode.triggers[path].length;i++){xml.outerNode.triggers[path][i].execute(null,submit);}}}},null,null,true);}}else{jrapid.openForm(me,entity,canvas,id,defaultset,module,true);}
return false;};var c;JRapid.prototype.validateElement=function(element){var validation=element.getAttribute('validate');var msg='';var hasErrors=false;if(validation){var validations=validation.split(',');for(var j=0;j<validations.length;j++){if(element.value){if(jrapid.validations[validations[j]]){var errorMessage=jrapid.validations[validations[j]](element);if(errorMessage){msg+=errorMessage+' - ';hasErrors=true;}}}}
element.style.color=hasErrors?'red':'';window.status=msg;}};JRapid.prototype.validate=function(form){var elements=form.elements;var n=elements.length;var msg='';var first=null;for(var i=0;i<n;i++){var e=elements[i];var p=e.parentNode;var validation=e.getAttribute('validate');var currentStyle=p.currentStyle?p.currentStyle:window.getComputedStyle(p,null);if(validation&&currentStyle.color!='green'&&currentStyle.color!='rgb(0, 128, 0)'){var validations=validation.split(',');var hasErrors=false;for(var j=0;j<validations.length;j++){if(jrapid.validations[validations[j]]){var errorMessage=jrapid.validations[validations[j]](e);if(errorMessage){msg+=errorMessage+'\n';first=elements[i];hasErrors=true;e.style.color='red';}}}
e.style.color=hasErrors?'red':'';}}
if(msg.length){alert(msg);try{first.focus();}catch(e){}
return false;}
return true;};var jrapid=new JRapid();var prd=new JRapid();jrapid.validations=[];jrapid.validations['required']=function(obj){return obj.value&&(obj.tagName.toLowerCase()!='select'||obj.value!='0')?null:(obj.title+' is required');};jrapid.validations['date']=function(obj){return obj.value==''||obj.value.match(jrapid.dateRegExp)?null:(obj.title+' is a date');};jrapid.validations['datetime']=function(obj){return obj.value==''||obj.value.match(jrapid.dateTimeRegExp)?null:(obj.title+' is datetime');};jrapid.validations['time']=function(obj){return obj.value==''||obj.value.match(jrapid.timeRegExp)?null:(obj.title+' is time');};jrapid.validations['timequantity']=function(obj){return obj.value==''||obj.value.match(jrapid.timeQuantityRegExp)?null:(obj.title+' is timequantity');};jrapid.validations['timerange']=function(obj){return obj.value==''||obj.value.match(jrapid.timeRangeRegExp)?null:(obj.title+' is timerange');};jrapid.validations['email']=function(obj){return obj.value==''||obj.value.match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/)?null:(obj.title+' is email');};jrapid.validations['short']=function(obj){return obj.value==''||obj.value.match(/^\-?[0-9]+$/)?null:(obj.title+' is short');};jrapid.validations['integer']=function(obj){return obj.value==''||obj.value.match(/^\-?[0-9]+$/)?null:(obj.title+' is integer');};jrapid.validations['long']=function(obj){return obj.value==''||obj.value.match(/^\-?[0-9]+$/)?null:(obj.title+' is long');};jrapid.validations['float']=function(obj){return obj.value==''||obj.value.match(/^\-?[0-9]+(\.[0-9]+)?$/)?null:(obj.title+' is float');};jrapid.validations['double']=function(obj){return obj.value==''||obj.value.match(/^\-?[0-9]+(\.[0-9]+)?$/)?null:(obj.title+' is double');};function evaluated(path,row){try{var n=-1;var newPath='';for(var i=0;i<path.length;i++){var c=path.charAt(i);if(c=='('||c==')'||c==','||c==' '){newPath+=evaluatedPart(path.substring(n+1,i),row)+path.charAt(i);n=i;}}
if(n!=path.length-1){newPath+=evaluatedPart(path.substring(n),row);}}catch(e){throw e;alert(e.message);}
return newPath;}
function evaluatedPart(path,row){if(row.outerNode){row=row.outerNode;}
var partsBracket=path.split(new RegExp('(\\[|\\])'));var parts=[];for(var i=0,j=0;i<partsBracket.length;i++){if(partsBracket[i]!='['&&partsBracket[i]!=']'){parts[j++]=partsBracket[i]}}
var newPath='';var k=0;for(var i=0;i<parts.length;i++){if((i%2)==0){newPath=newPath+parts[i];}else{if(parts[i]=='*'){newPath=newPath+'[(\\d+)]';}else{var expr=parts[i].replace('ROWNUM',rownum(row,k++));newPath=newPath+'['+eval(expr)+']';}}}
return newPath;}
function rownum(row,k){var ks=[];while(row&&row.getAttribute){if(row.getAttribute('row')=='row'){ks[ks.length]=row.rowIndex;}
row=row.parentNode;}
return ks[ks.length-k-1];}
function evaluateBoolean(xpath,obj){var xsl='<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:xslt2="http://www.htmli.com/1999/XSL/Transform"  exclude-result-prefixes="xslt xslt2">';xsl+='<xslt:namespace-alias stylesheet-prefix="xslt2" result-prefix="xslt"/>';xsl+='<xslt:output method="xml" omit-xml-declaration="yes" /><xslt:template match="/"><out>';xsl+='<xslt:choose><xslt:when test="'+xpath+'">1</xslt:when><xslt:otherwise>0</xslt:otherwise></xslt:choose>';xsl+='</out></xslt:template></xslt:stylesheet>';var xslDocument=XmlDocument.create();xslDocument.async=false;xslDocument.loadXML(xsl);var container=application.wrapNode(obj).getContainer();var xmlDoc=container.getElementById('xml').getXmlDocument();var str=xmlDoc.transformNode(xslDocument).substring(5);return str.substring(0,str.length-6)=='1';}
JRapid.prototype.evaluateXpath=function(xpath,obj){var xslCollection='<xslt:for-each select="'+xpath+'"><xslt:value-of select="." /><xslt:if test="position()!=last()">,</xslt:if></xslt:for-each>';var xslSingle='<xslt:value-of select="'+xpath+'" />';var buildXsl=function(m){var xsl='<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:xslt2="http://www.htmli.com/1999/XSL/Transform" exclude-result-prefixes="xslt xslt2">';xsl+='<xslt:namespace-alias stylesheet-prefix="xslt2" result-prefix="xslt"/>';xsl+='<xslt:output method="xml" omit-xml-declaration="yes" /><xslt:template match="/"><out>';xsl+=m;xsl+='</out></xslt:template></xslt:stylesheet>';return xsl;}
var parseResult=function(str){str=str.substring(5);str=str.substring(0,str.length-6);return str=='NaN'?'':str;};var xslDocument=XmlDocument.create();xslDocument.async=false;xslDocument.loadXML(buildXsl(xslCollection));var container=application.wrapNode(obj).getContainer();var xmlDoc=container.getElementById('xml').getXmlDocument();try{return parseResult(xmlDoc.transformNode(xslDocument));}catch(e){xslDocument.async=false;xslDocument.loadXML(buildXsl(xslSingle));return parseResult(xmlDoc.transformNode(xslDocument));}};JRapid.prototype.evaluateIfNotNull=function(expr,obj,def){if(expr==null||expr=='0'||!expr){return def;}
var node=application.wrapNode(obj.getContainer().node.parentNode);return jrapid.evaluateXpath(expr,node);};JRapid.prototype.startConsole=function(label,timeout,color){var console=document.getElementById('jrapid_console');if(console==null){console=document.createElement('div');console.className='jrapid_console';console.id='jrapid_console';document.body.appendChild(console);}
var div=document.createElement('div');div.id=new Date().getTime();div.innerHTML=label;div.className='jrapid_console_message '+color;console.appendChild(div);if(timeout){setTimeout(function(){div.parentNode.removeChild(div);},400);}
return div.id;};JRapid.prototype.endConsole=function(id){if(!id){return;}
var console=document.getElementById('jrapid_console');if(console==null){return;}
for(var i=0;i<console.childNodes.length;i++){if(console.childNodes[i].id==id){console.removeChild(console.childNodes[i]);return;}}};JRapid.prototype.initialTriggers=function(me,repeat){var xml=me.getContainer().getElementById('xml');if(xml.outerNode.initial){return;}
if(xml.outerNode.triggers&&xml.outerNode.triggers['main']!=null){var c=xml.outerNode.triggers['main'];if(c.length)xml.outerNode.initial=true;setTimeout(function(){for(var i=0;i<c.length;i++){c[i].execute(null,xml);}},1);}};JRapid.prototype.trigger=function(fpath,me){setTimeout(function(){jrapid.triggerWrapped(fpath,me);},1);};JRapid.prototype.triggerWrapped=function(fpath,me){c=new Date().getTime();me.sync();var spath=fpath;while(spath.indexOf('[')!=-1){spath=spath.replace(new RegExp('\\[[^\\]]*\\]'),'');}
var evaluatedPath=evaluated(fpath,me.outerNode);var xml=me.getContainer().getElementById('xml').outerNode;if(xml.triggers&&xml.triggers[spath]){for(var i=0;i<xml.triggers[spath].length;i++){xml.triggers[spath][i].execute(evaluatedPath,me);}}};JRapid.prototype.registerAbstract=function(container,triggers,handler){var xml=container.getElementById('xml').outerNode;if(xml.triggers==null){xml.triggers=new Array();}
var triggerArray=triggers.split(';');for(var i=0;i<triggerArray.length;i++){var k=jrapid.replaceAll(triggerArray[i],new RegExp('\\[[^\\]]*\\]'),'');if(xml.triggers[k]==null){xml.triggers[k]=new Array();}
handler(xml.triggers[k],xml.triggers[k].length,triggerArray[i]);}};JRapid.prototype.registerInitialTrigger=function(container,trigger){var xml=container.getElementById('xml').outerNode;if(xml.triggers==null){xml.triggers=new Array();}
if(xml.triggers['main']==null){xml.triggers['main']=new Array();}
xml.triggers['main'][xml.triggers['main'].length]=trigger;};JRapid.prototype.registerCalculatedProperty=function(container,slaveFpath,slaveId,calculus,triggers,triggerMode){if(triggerMode!='onload'){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_CalculatedProperty(slaveFpath,slaveId,calculus,trigger,triggerMode);});}
if(!triggerMode||triggerMode=='onload'){jrapid.registerInitialTrigger(container,new JRapid_Registration_CalculatedProperty(slaveFpath,slaveId,calculus,null,triggerMode));}};JRapid.prototype.registerSubsetParams=function(container,slaveFpath,slaveId,params,subset,triggers,whenNotInSubset){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_SubsetParams(slaveFpath,slaveId,params,trigger,subset,whenNotInSubset);});jrapid.registerInitialTrigger(container,new JRapid_Registration_SubsetParams(slaveFpath,slaveId,params,null,subset,whenNotInSubset));var xml=container.getElementById('xml').outerNode;if(!xml.subsetParams){xml.subsetParams=[];}
xml.subsetParams[slaveId]=params;};JRapid.prototype.registerIf=function(container,slaveFpath,slaveId,condition,triggers,func,applyToCanvas,triggerOnApply){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_If(slaveFpath,slaveId,condition,trigger,func,applyToCanvas);});if(func!=jrapid.checkIf){jrapid.registerInitialTrigger(container,new JRapid_Registration_If(slaveFpath,slaveId,condition,null,func,applyToCanvas));}
if(triggerOnApply){jrapid.registerAbstract(container,'__onapply',function(array,index,trigger){array[index]=new JRapid_Registration_If(slaveFpath,slaveId,condition,null,func,applyToCanvas);});}};JRapid.prototype.registerCondition=function(container,slaveFpath,slaveId,params,triggers,func,rpcService,applyToCanvas){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_Condition(slaveFpath,slaveId,params,trigger,func,rpcService,applyToCanvas);});jrapid.registerInitialTrigger(container,new JRapid_Registration_Condition(slaveFpath,slaveId,params,null,func,rpcService,applyToCanvas));};JRapid.prototype.registerDynamicValue=function(container,slaveFpath,slaveId,params,triggers,rpcService,triggerMode){if(triggerMode!='onload'){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_DynamicValue(slaveFpath,slaveId,params,trigger,rpcService,triggerMode);});}
if(!triggerMode||triggerMode=='onload'){jrapid.registerInitialTrigger(container,new JRapid_Registration_DynamicValue(slaveFpath,slaveId,params,null,rpcService,triggerMode));}};JRapid.prototype.registerDynamicForEach=function(prefix,slaveFpath,slaveId,params,triggers,service,fullXpath,triggerMode){jrapid.registerAbstract(prefix,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_DynamicForEach(slaveFpath,slaveId,params,trigger,service,fullXpath,triggerMode);});if(!triggerMode||triggerMode=='onload'){jrapid.registerInitialTrigger(prefix,new JRapid_Registration_DynamicForEach(slaveFpath,slaveId,params,null,service,fullXpath));}};JRapid.prototype.registerEmbeddedListing=function(container,slaveId,entity,params,triggers,subset,listing,name,containerEntity,module,defaultset,defaultsetparams){jrapid.registerAbstract(container,triggers,function(array,index,trigger){array[index]=new JRapid_Registration_EmbeddedListing(slaveId,params,trigger,entity,subset,listing,name,containerEntity,module,defaultset,defaultsetparams);});jrapid.registerInitialTrigger(container,new JRapid_Registration_EmbeddedListing(slaveId,params,null,entity,subset,listing,name,containerEntity,module,defaultset,defaultsetparams));};JRapid.prototype.registerjQuery=function(container,id,plugin,options){jrapid.registerInitialTrigger(container,new JRapid_Registration_jQuery(id,plugin,options));};JRapid.prototype.registerRememberLast=function(container,id){jrapid.registerInitialTrigger(container,new JRapid_Registration_RememberLast(id));};function JRapid_Registration_CalculatedProperty(slaveFpath,slaveId,calculus,trigger,triggerMode){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.calculus=calculus;this.trigger=trigger;this.triggerMode=triggerMode;};function JRapid_Registration_SubsetParams(slaveFpath,slaveId,params,trigger,subset,whenNotInSubset){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.params=params.length?params.split(';'):[];this.trigger=trigger;this.subset=subset;this.whenNotInSubset=whenNotInSubset;};function JRapid_Registration_If(slaveFpath,slaveId,condition,trigger,func,applyToCanvas){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.condition=condition;this.trigger=trigger;this.func=func;this.applyToCanvas=applyToCanvas;};function JRapid_Registration_Condition(slaveFpath,slaveId,params,trigger,func,rpcService,applyToCanvas){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.params=params.length?params.split(';'):[];this.trigger=trigger;this.func=func;this.rpcService=rpcService;this.applyToCanvas=applyToCanvas;};function JRapid_Registration_DynamicValue(slaveFpath,slaveId,params,trigger,rpcService,triggerMode){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.params=params.length?params.split(';'):[];this.trigger=trigger;this.rpcService=rpcService;this.triggerMode=triggerMode;};function JRapid_Registration_DynamicForEach(slaveFpath,slaveId,params,trigger,service,fullXpath){this.slaveFpath=slaveFpath;this.slaveId=slaveId;this.params=params.length?params.split(';'):[];this.trigger=trigger;this.service=service;this.fullXpath=fullXpath;};function JRapid_Registration_EmbeddedListing(slaveId,params,trigger,entity,subset,listing,name,containerEntity,module,defaultset,defaultsetparams){this.slaveId=slaveId;this.params=params.length?params.split(';'):[];this.trigger=trigger;this.entity=entity;this.subset=subset;this.listing=listing;this.name=name;this.containerEntity=containerEntity;this.module=module;this.defaultset=defaultset;this.defaultsetparams=defaultsetparams;};function JRapid_Registration_jQuery(id,plugin,options){this.id=id;this.plugin=plugin;this.options=options;};function JRapid_Registration_RememberLast(id){this.id=id;};JRapid_Registration_SubsetParams.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var xsl=container.getElementById('window_subset_'+this.slaveId);var xmlmultiple=xsl.getPreviousElementSibling();var xml=xmlmultiple.getFirstElementChild();xmlmultiple.getLastElementChild().setXml(container.getElementById('xml').getXmlDocument().xml);var ud=this.slaveId;var canvas=jrapid.getElementsById('div_subset_'+this.slaveId,container.node);for(var i=0;i<canvas.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);if(child==evaluatedPath){var url=jrapid.getServerPath(container)+this.subset;for(var j=0;j<this.params.length;j++){url+='/'+jrapid.escapeParam(jrapid.evaluateXpath(evaluated(this.params[j],canvas[i]),canvas[i]));}
var whenNotInSubset=this.whenNotInSubset;xml.setUrl(url);xml.get(function(c){xsl.refresh();var disabled;var option;var value;if(c.children.length){var obj=c.children[0];disabled=obj.disabled;option=obj.options&&obj.selectedIndex>=0?obj.options[obj.selectedIndex]:null;value=obj.value;}
c.innerHTML=xsl.getInnerHTML();if(c.children.length){c.children[0].disabled=disabled;c.children[0].value=value;if(option&&value!=c.children[0].value&&whenNotInSubset!='donotshow'){if(whenNotInSubset=='shownotvalid'){option.style.color='red';}
c.children[0].options[c.children[0].options.length]=option;option.selected=true;}}},canvas[i]);}}};JRapid.prototype.getSubsetParams=function(me,slaveId){var container=me.getContainer();var xml=container.getElementById('xml').outerNode;if(xml.subsetParams&&xml.subsetParams[slaveId]){return xml.subsetParams[slaveId];}
return'';};JRapid_Registration_CalculatedProperty.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var canvas=jrapid.getElementsById(this.slaveId,container.node);for(var i=0;i<canvas.length;i++){if(this.triggerMode=='onchangenew'&&canvas[i].value){continue;}
var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);var currentStyle=canvas[i].parentNode.currentStyle?canvas[i].parentNode.currentStyle:window.getComputedStyle(canvas[i].parentNode,null);if(currentStyle.color!='green'&&currentStyle.color!='rgb(0, 128, 0)'&&(child==evaluatedPath||evaluatedPath.match(child.replace(/\[/g,'\\[').replace(/\]/g,'\\]')))){if(!jrapid.isNewOrHidden(canvas[i])){var value=jrapid.evaluateXpath(evaluated(this.calculus,canvas[i]),canvas[i]);canvas[i].value=value;application.dispatch('change',canvas[i],'HTMLEvents');}}}};JRapid_Registration_If.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var canvas=jrapid.getElementsById((this.applyToCanvas?'td_':'')+this.slaveId,container.node);for(var i=0;i<canvas.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);if(evaluatedPath==child||evaluatedPath.match(child.replace(/\[/g,'\\[').replace(/\]/g,'\\]'))){var value=evaluateBoolean(evaluated(this.condition,canvas[i]),canvas[i]);if(this.applyToCanvas&&canvas[i].parentNode.getAttribute('labelposition')=='top'){this.func(canvas[i].parentNode,value);this.func(jrapid.wrap(canvas[i].parentNode).getPreviousElementSibling().outerNode,value);}else if(this.applyToCanvas&&!canvas[i].parentNode.getAttribute('row')){this.func(canvas[i].parentNode,value);}else{this.func(canvas[i],value);}}}}
JRapid.prototype.displayTabIf=function(obj,bool){var tab=application.wrapNode(obj);var i=0;while(tab.getPreviousElementSibling()){i++;tab=tab.getPreviousElementSibling();}
if(bool){tab.getParentNode().showChild(i);}else{tab.getParentNode().hideChild(i);}};JRapid.prototype.displayIf=function(obj,bool){obj.style.display=(bool?'':'none');};JRapid.prototype.visibleIf=function(obj,bool){obj.style.visibility=(bool?'':'hidden');};JRapid.prototype.readonlyIf=function(obj,bool){obj.readOnly=bool;};JRapid.prototype.disabledIf=function(obj,bool){obj.disabled=bool;};JRapid.prototype.checkIf=function(obj,bool,msg){if(!bool){jrapid.hasErrors+=(msg?msg:'Invalid value')+'\n';}
obj.style.backgroundColor=bool?'':'red';};JRapid.prototype.checkUnique=function(obj,isUnique){if(isUnique!=null&&!isUnique){alert('This field is not unique. ');jrapid.hasErrors+='This field is not unique. ';}
obj.style.backgroundColor=isUnique==null||isUnique?'':'red';};JRapid_Registration_Condition.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var canvas=jrapid.getElementsById((this.applyToCanvas?'td_':'')+this.slaveId,container.node);var params=[];var x=[];for(var i=0;i<canvas.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);if(child==evaluatedPath){var paramsString='';params[i]=[];for(var j=0;j<this.params.length;j++){params[i][params[i].length]=jrapid.evaluateXpath(evaluated(this.params[j],canvas[i]),canvas[i]);paramsString+=',params['+i+']['+j+']';}
if(this.applyToCanvas&&canvas[i].parentNode.getAttribute('labelposition')=='top'){x[i]=canvas[i].parentNode;}else if(this.applyToCanvas&&!canvas[i].parentNode.getAttribute('row')){x[i]=canvas[i].parentNode;}else{x[i]=canvas[i];}
var xmlrpcserver=new JRapid_XmlRpcServer(JRapid.XMLRPC_PATH);var func=this.func;eval('xmlrpcserver.executeAsync(this.rpcService, function(r) { func(x['+i+'], r); }'+paramsString+')');}}};JRapid_Registration_DynamicValue.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var canvas=jrapid.getElementsById((this.applyToCanvas?'td_':'')+this.slaveId,container.node);for(var i=0;i<canvas.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);if(this.triggerMode=='onchangenew'&&canvas[i].value){continue;}
var currentStyle=canvas[i].parentNode.currentStyle?canvas[i].parentNode.currentStyle:window.getComputedStyle(canvas[i].parentNode,null);if(currentStyle.color!='green'&&currentStyle.color!='rgb(0, 128, 0)'&&(child==evaluatedPath||evaluatedPath.match(child.replace(/\[/g,'\\[').replace(/\]/g,'\\]')))){var params=new Array();var p='';for(var j=0;j<this.params.length;j++){params[params.length]=jrapid.evaluateXpath(evaluated(this.params[j],canvas[i]),canvas[i]);p+=',params['+j+']';}
var x=canvas[i];var xmlrpcserver=new JRapid_XmlRpcServer(JRapid.XMLRPC_PATH);var setDynamicValue=this.setDynamicValue;eval('xmlrpcserver.executeAsync(this.rpcService, function(r, e) {  if (e) { } else { setDynamicValue(canvas['+i+'], r);}} '+p+')');}}};JRapid_Registration_DynamicValue.prototype.setDynamicValue=function(x,r){r=r==null?'':r;if(x.type=='checkbox'){x.checked=r||r=='true';}else{x.value=r;}
application.dispatch('change',x,'HTMLEvents');};JRapid_Registration_DynamicForEach.prototype.execute=function(evaluatedPath,me){try{var container=me.getContainer();var prefix=container.getPrefix();var canvas=jrapid.getElementsById(prefix+'div_'+this.slaveId);var xslt=container.getElementById('xsl');var xsl='<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:xslt2="http://www.htmli.com/1999/XSL/Transform">';xsl+='<xslt:namespace-alias stylesheet-prefix="xslt2" result-prefix="xslt"/>';xsl+='<xslt:output method="html" omit-xml-declaration="yes" /><xslt:template match="/">';xsl+=xslt.getXslt().selectSingleNode('//*[@id = "'+prefix+'div_'+this.slaveId+'"]').xml;xsl+='</xslt:template></xslt:stylesheet>';var xslDocument=XmlDocument.create();xslDocument.async=false;xslDocument.loadXML(xsl);var multipleXml=container.getElementById('xmlmultiple').getXmlDocument();var fullXpath=this.fullXpath;var xpath=fullXpath.substring(0,fullXpath.lastIndexOf('/'));for(var i=0;i<canvas.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),canvas[i]);if(child==evaluatedPath||evaluatedPath.match(child.replace(/\[/g,'\\[').replace(/\]/g,'\\]'))){var params=new Array();var p='';for(var j=0;j<this.params.length;j++){params[params.length]=jrapid.evaluateXpath(evaluated(this.params[j],canvas[i]),canvas[i]);p+='/'+params[j];}
var x=canvas[i];var xml=XmlDocument.create();xml.onreadystatechange=function(){if(xml.readyState==4){if(xml.parseError.errorCode!=0){alert(xml.parseError.reason);return;}
var parentNode=multipleXml.selectSingleNode(xpath);var childNodes=multipleXml.selectNodes(fullXpath);for(var k=childNodes.length-1;k>=0;k--){childNodes[k].parentNode.removeChild(childNodes[k]);}
var newNodes=xml.documentElement.childNodes;var n=newNodes.length;var elementName=fullXpath.substring(fullXpath.lastIndexOf('/')+1);for(var k=0;k<n;k++){if(!newNodes[k].attributes){continue;}
var e=xml.createElement(elementName);for(var l=0;l<newNodes[k].attributes.length;l++){var name=newNodes[k].attributes[l].name;var value=newNodes[k].attributes[l].value;e.setAttribute(name,value);}
while(newNodes[k].hasChildNodes()){e.appendChild(newNodes[k].childNodes[0]);}
parentNode.appendChild(e);}
container.getElementById('xml').setXml(multipleXml.selectSingleNode(xpath).xml);x.innerHTML=multipleXml.transformNode(xslDocument);}};xml.load(jrapid.getServerPath(container)+this.service+p);}}}catch(e){throw e;}};JRapid_Registration_EmbeddedListing.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var sources=jrapid.getElementsById(this.slaveId,container.node);for(var i=0;i<sources.length;i++){var child=evaluatedPath==null?null:evaluated(jrapid.replaceAll(this.trigger,'_','.'),sources[i]);if(child==evaluatedPath){var params='';for(var j=0;j<this.params.length;j++){if(this.params[j]&&this.params[j].length){params+='/'+jrapid.escapeParam(jrapid.evaluateXpath(evaluated(this.params[j],sources[i]),sources[i]));}}
var defaultsetparams=this.defaultsetparams?this.defaultsetparams.split(';')[0]:null;var defaultset=this.defaultset;var subset=this.subset+params;if(sources[i].innerHTML==''){jrapid.openListing(me,this.entity,sources[i],this.listing,subset,true,function(c){var add=c.getElementById('add');if(add){add.setAttribute('defaultset',defaultset);add.setAttribute('defaultsetparams',defaultsetparams);}},false,'../forms.'+this.module+'/'+this.entity+(this.listing?('_'+this.listing):'')+'_list.html');}else{jrapid.loadListing(new Container(sources[i].children[0]),this.entity,subset,false);}}}};JRapid_Registration_jQuery.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();var elements=jrapid.getElementsById(this.id,container.node);var plugin=this.plugin;var options=this.options;for(var i=0;i<elements.length;i++){var a=elements[i];eval('$(a).'+plugin+'('+options+');');};};JRapid_Registration_RememberLast.prototype.execute=function(evaluatedPath,me){var container=me.getContainer();if(window.rememberLast&&window.rememberLast[this.id]){var objs=jrapid.getElementsById(this.id,container.node);var value=window.rememberLast[this.id];for(var i=0,n=objs.length;i<n;i++){if(!objs[i].value||objs[i].value=='0'){objs[i].value=value;jrapid.wrap(objs[i]).sync();}}}};JRapid.prototype.rememberLast=function(obj){if(!window.rememberLast){window.rememberLast=[];}
window.rememberLast[obj.id]=obj.value;};JRapid.prototype.suggestKeyDown=function(me,entity,property,ev){if(ev.keyCode==13){application.stopPropagation(ev);application.preventDefault(ev);}};JRapid.prototype.suggestDblClick=function(me,entity,property){this.suggest(me,entity,property);};JRapid.prototype.suggestBlur=function(me,entity,property){var container=me.getContainer();var xsl=container.getElementById('suggests');setTimeout(function(){xsl.getStyle().display='none';},250);xsl.outerNode.suggestSelectedIndex==null};JRapid.prototype.suggestKeyUp=function(me,entity,property,ev){var container=me.getContainer();var xsl=container.getElementById('suggests');if(ev.keyCode==9||ev.keyCode==27||ev.keyCode==13||(me.getValue().length<1&&ev.keyCode!=40&&ev.keyCode!=38)){xsl.outerNode.suggestSelectedIndex==null
xsl.getStyle().display='none';return;}
if(ev.keyCode==40&&xsl.getStyle().display!='none'){if(xsl.outerNode.suggestSelectedIndex==null){xsl.outerNode.suggestSelectedIndex=-1;}
if(xsl.outerNode.suggestSelectedIndex>=xsl.getChildren().getLength()-1){return;}
if(xsl.outerNode.suggestSelectedIndex>=0){var oldItem=xsl.getChildren().item(xsl.outerNode.suggestSelectedIndex);oldItem.getStyle().backgroundColor='';oldItem.getStyle().color='';}
xsl.outerNode.suggestSelectedIndex++;var item=xsl.getChildren().item(xsl.outerNode.suggestSelectedIndex);item.getStyle().backgroundColor='#000099';item.getStyle().color='#ffffff';me.setValue(item.outerNode.title);application.dispatch('change',me,'HTMLEvents');}else if(ev.keyCode==38&&xsl.getStyle().display!='none'){if(xsl.outerNode.suggestSelectedIndex==null){xsl.outerNode.suggestSelectedIndex=-1;}
if(xsl.outerNode.suggestSelectedIndex<=0){return;}
if(xsl.outerNode.suggestSelectedIndex>=0){var oldItem=xsl.getChildren().item(xsl.outerNode.suggestSelectedIndex);oldItem.getStyle().backgroundColor='';oldItem.getStyle().color='';}
xsl.outerNode.suggestSelectedIndex--;var item=xsl.getChildren().item(xsl.outerNode.suggestSelectedIndex);item.getStyle().backgroundColor='#000099';item.getStyle().color='#ffffff';me.setValue(item.outerNode.title);application.dispatch('change',me,'HTMLEvents');}else if(ev.keyCode!=16){if(me.getValue().length||ev.keyCode==40){this.suggest(me,entity,property);}}};JRapid.prototype.suggest=function(me,entity,property){var container=me.getContainer();var xsl=container.getElementById('suggests');xsl.outerNode.suggestSelectedIndex=null;xsl.setUrl(jrapid.getServerPath(container)+entity+'/suggest'+property+'/'+me.getValue());xsl.outerNode.input=me.outerNode;xsl.refresh(function(){var style=xsl.getStyle();style.top=(me.getY()-xsl.getContainingBlock().getY()+me.getHeight()-2)+"px";style.left=(me.getRelativeX()-4)+"px";style.display=xsl.hasChildren()?'':'none';});};JRapid.prototype.multilineRemove=function(obj,fpath){var me=jrapid.wrap(obj);var container=me.getContainer();var row=jrapid.getRowFor(me);var xpath=evaluated(fpath,row);var xml=container.getElementById('xml');xml.remove(xpath);row.parentNode.removeChild(row);return;};JRapid.prototype.multilineInsert=function(obj,xpath,property){var me=jrapid.wrap(obj);return jrapid.multilineAdd(obj,xpath,property,jrapid.getRowFor(me).rowIndex);};JRapid.prototype.multilineUp=function(obj,xpath){var me=jrapid.wrap(obj);var row=jrapid.getRowFor(me);if(row.rowIndex>1){var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var node=xmlDoc.selectSingleNode(evaluated(xpath,row));node.parentNode.insertBefore(node,jrapid.wrap(node).getPreviousElementSibling().outerNode);xml.setXml(xmlDoc.xml);row.parentNode.insertBefore(row,jrapid.wrap(row).getPreviousElementSibling().outerNode);}};JRapid.prototype.insertAfterNode=function(node,newNode,refNode){var refNodeWrapped=jrapid.wrap(refNode);if(refNodeWrapped.getNextElementSibling()){return node.insertBefore(newNode,refNodeWrapped.getNextElementSibling().outerNode);}else{return node.appendChild(newNode);}};JRapid.prototype.multilineDown=function(obj,xpath){var me=jrapid.wrap(obj);var row=jrapid.getRowFor(me);if(row.rowIndex<row.parentNode.children.length-3){var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var node=xmlDoc.selectSingleNode(evaluated(xpath,row));var nodeWrapped=jrapid.wrap(node);var rowWrapped=jrapid.wrap(row);if(nodeWrapped.getNextElementSibling()){jrapid.insertAfterNode(node.parentNode,node,nodeWrapped.getNextElementSibling().outerNode);xml.setXml(xmlDoc.xml);jrapid.insertAfterNode(row.parentNode,row,rowWrapped.getNextElementSibling().outerNode);}}};JRapid.prototype.multilineAdd=function(obj,fpath,property,rowNum){var me=jrapid.wrap(obj);var tr=jrapid.getRowFor(me);var tbody=tr.parentNode;jrapid.checkIfIsNew(jrapid.wrap(tbody));var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();if(rowNum){var node=xmlDoc.selectSingleNode(evaluated(fpath+'/'+property+'[ROWNUM]',tr));if(node.nextSibling){node.parentNode.insertBefore(xmlDoc.createElement(property),node.nextSibling);}
else{node.parentNode.appendChild(xmlDoc.createElement(property));}}else{var node=xmlDoc.selectSingleNode(evaluated(fpath,tbody));node.appendChild(xmlDoc.createElement(property));}
xml.setXml(xmlDoc.xml);var newTr=tbody.children[tbody.children.length-2].cloneNode(true);tr.style.color='';newTr.style.display='';tr.parentNode.insertBefore(newTr,rowNum?tbody.children[rowNum]:tbody.children[tbody.children.length-2]);newTr.children[0].style.display='';if(rowNum){for(var i=0;i<newTr.children.length;i++){newTr.children[i].style.display='';}}
return true;};JRapid.prototype.multilineInsertEntity=function(obj,xpath,entity){return jrapid.multilineAddEntity(obj,xpath.substring(0,xpath.lastIndexOf('/')),xpath.substring(xpath.lastIndexOf('/')+1,xpath.lastIndexOf('[')),entity,jrapid.getRowFor(me).rowIndex);};JRapid.prototype.multilineAddEntity=function(obj,fpath,property,entity,rowNum,async){var me=jrapid.wrap(obj);var tr=jrapid.getRowFor(me);var tbody=tr.parentNode;var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var tx=jrapid.startConsole('Adding',false,'green');var httpRequest=HttpRequest.create();httpRequest.open("GET",jrapid.getServerPath(container)+entity+'/0',false);var command=function(){if(httpRequest.readyState==4){jrapid.endConsole(tx);if(httpRequest.status!=200){jrapid.startConsole('Network error',true,'red');window.status='Network error';return false;}
var newNode=xmlDoc.createElement(property);var childDoc=httpRequest.responseXML;var children=childDoc.documentElement.childNodes;for(var i=0;i<children.length;i++){var n=children[i].cloneNode(true);newNode.appendChild(n);}
newNode.setAttribute('id',0);var actualNodesLength=xmlDoc.selectNodes(evaluated(fpath,tbody)+'/'+property).length;if(rowNum&&rowNum<=actualNodesLength){var n=xmlDoc.selectSingleNode(evaluated(fpath,tbody)+'/'+property+'['+rowNum+']');n.parentNode.insertBefore(newNode,n);}else{xmlDoc.selectSingleNode(evaluated(fpath,tbody)).appendChild(newNode);}
xml.setXml(xmlDoc.xml);var newTr=tbody.children[tbody.children.length-2].cloneNode(true);tr.style.color='';newTr.style.display='';newTr.onkeydown=function(){};if(rowNum){tr.parentNode.insertBefore(newTr,tbody.children[rowNum]);}else{var previous=tbody.children[tbody.children.length-1].previousSibling;while(previous){if(previous.nodeType==1){tr.parentNode.insertBefore(newTr,previous);break;}
previous=previous.previousSibling;}}
if(rowNum!=null){var length=newTr.children.length;for(var i=length-1;i>2;i--){newTr.children[i].style.display='';}}
return true;}};try{httpRequest.send("");return command();}catch(e){jrapid.startConsole('Network error',true,'red');window.status='Network error';}
return false;};JRapid.prototype.multilineCalculateIndexes=function(tbody){for(var i=0;i<tbody.children.length;i++){tbody.children[i].children[0].children[0].value=i;}};JRapid.prototype.checkIfIsNew=function(me){var node=me.outerNode;var success=false;while(node&&node.parentNode&&node.parentNode.getAttribute){node=node.parentNode;if(node.getAttribute("row")){if(node.parentNode.getAttribute('extendable')=='extendable'){var current=node.rowIndex;var total=node.parentNode.children.length;if(current==(total-2)){if(node.getAttribute('entity')){success=jrapid.multilineAddEntity(me,node.getAttribute('selectexpr').substring(0,node.getAttribute('selectexpr').lastIndexOf('/')),node.getAttribute('property'),node.getAttribute('entity'),null,true);}else{success=jrapid.multilineAdd(me,node.getAttribute('selectexpr'),node.getAttribute('property'));}
if(success){for(var i=0;i<node.children.length;i++){node.children[i].style.display='';}}}}
break;}}
return success;};JRapid.prototype.isNewOrHidden=function(me){var node=me;while(node&&node.parentNode&&node.parentNode.getAttribute){node=node.parentNode;if(node.getAttribute("row")){if(node.parentNode.getAttribute('extendable')=='extendable'){var current=node.rowIndex;var total=node.parentNode.children.length;return current==(total-2)||current==(total-1);}
break;}}
return false;};JRapid.prototype.multilineChangedNew=function(me,fpath,property,entity,rowNum){};JRapid.prototype.multilineDetailAdd=function(obj,selectexpr,name,id,entity){var me=jrapid.wrap(obj);var tbody=me.outerNode.previousSibling.previousSibling.lastChild;var newTR=tbody.insertRow(tbody.children.length-1);newTR.setAttribute('row','row');var newCell=newTR.insertCell(-1);var div=document.createElement('div');div.id='row_'+id;newCell.appendChild(div);jrapid.suggestEmbeddedEntity(me,application.wrapNode(div),selectexpr,entity,name,null,true);};JRapid.prototype.showHideEmbeddedEntity=function(obj,xpath,entity,property,value,handler){var me=jrapid.wrap(obj);var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var checked=typeof(value)!='undefined'?value:me.getChecked();var div=me.getParentNode().getNextElementSibling();var xpath=evaluated(xpath,me);var node=xmlDoc.selectSingleNode(xpath+'/'+property);if(node){node.setAttribute('id',checked?1:-1);xml.setXml(xmlDoc.xml);if(handler){handler();}}else if(checked){jrapid.suggestEmbeddedEntity(me,div,xpath,entity,property,handler);}
var style=div.getStyle();style.visibility=checked?'visible':'hidden';style.color=checked?'':'green';}
JRapid.prototype.suggestEmbeddedEntity=function(me,div,xpath,entity,property,handler,isMultiLine){var container=me.getContainer();var prefix=container.getPrefix();var xslt=container.getElementById('xsl');var lcFirstEntity=entity.substring(0,1).toLowerCase()+entity.substring(1);var xsl='<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:xslt2="http://www.htmli.com/1999/XSL/Transform">';xsl+='<xslt:namespace-alias stylesheet-prefix="xslt2" result-prefix="xslt"/>';xsl+='<xslt:output method="html" omit-xml-declaration="yes" /><xslt:template match="/">';xsl+=xslt.getXslt().selectSingleNode('//*[@id = "'+prefix+div.getId()+'"]').xml;xsl+='</xslt:template></xslt:stylesheet>';var xslDocument=XmlDocument.create();xslDocument.async=false;xslDocument.loadXML(xsl);var multipleXml=container.getElementById('xmlmultiple').getXmlDocument();var oldNode=multipleXml.selectSingleNode('/*/'+xpath+'/'+property);var ajax=new XMLHttpRequest();ajax.open('GET',jrapid.getServerPath(container)+entity+'/0',true);var tx=jrapid.startConsole('Embedding',false,'green');ajax.onreadystatechange=function(){if(ajax.readyState==4){jrapid.endConsole(tx);var xml=ajax.responseXML;if(!oldNode||isMultiLine){oldNode=multipleXml.createElement(property);var parentNode=multipleXml.selectSingleNode('/*'+xpath);parentNode.appendChild(oldNode);}
var n=oldNode.childNodes.length;for(var i=0;i<n;i++){oldNode.removeChild(oldNode.childNodes[0]);}
var children=xml.documentElement.childNodes;for(var i=0;i<children.length;i++){oldNode.appendChild(children[i].cloneNode(true));}
oldNode.setAttribute('id',isMultiLine?0:1);container.getElementById('xml').setXml(multipleXml.selectSingleNode('/root'+xpath).xml);div.setInnerHTML(multipleXml.transformNode(xslDocument));if(handler){handler();}}};ajax.send('');};JRapid.prototype.textareaCollectionSync=function(obj,expr,name){var me=jrapid.wrap(obj);var values=me.getValue().split('\n');jrapid.checkIfIsNew(me);var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var selectexpr=evaluated(expr+'/'+name,me);var nodes=xmlDoc.selectNodes(selectexpr);for(var i=nodes.length-1;i>=0;i--){nodes[i].parentNode.removeChild(nodes[i]);}
var parentNode=xmlDoc.selectSingleNode(evaluated(expr,me));for(var i=0;i<values.length;i++){if(values[i]&&values[i].replace(/^\s+|\s+$/g,'').length){var newNode=xmlDoc.createElement(name);newNode.appendChild(xmlDoc.createTextNode(values[i].replace(/^\s+|\s+$/g,'')));parentNode.appendChild(newNode);}}
xml.setXml(xmlDoc.xml);};JRapid.prototype.collectionKeyDown=function(select,event,xpath,property){var xml=jrapid.wrap(select).getContainer().getElementById('xml');var i=select.selectedIndex;if(event.keyCode==38&&event.ctrlKey&&i>0){jrapid.collectionSwap(select,-1,0,xml.getXmlDocument(),xml,i,xpath,property,event);select.selectedIndex=i;}else if(event.keyCode==40&&event.ctrlKey&&i<(select.options.length-1)){jrapid.collectionSwap(select,1,1,xml.getXmlDocument(),xml,i,xpath,property,event);}};JRapid.prototype.collectionSwap=function(select,n,j,xmlDoc,xml,i,xpath,property,ev){var aux=select.options[i+n];var option=select.options[i];select.options[i+n]=new Option(option.text,option.value);select.options[i]=aux;select.options[i].selected=true;var path=evaluated(xpath,select)+'/'+property;var node1=xmlDoc.selectSingleNode(path+'['+(i+j)+']');var node2=xmlDoc.selectSingleNode(path+'['+(i+1+j)+']');node1.parentNode.insertBefore(node2,node1);xml.setXml(xmlDoc.xml);};JRapid.prototype.collectionRemoveEntity=function(me,xpath,property){var select=me.outerNode;if(select.selectedIndex>=0){var container=me.getContainer();var xml=container.getElementById('xml');var xmlDoc=xml.getXmlDocument();var node=xmlDoc.selectSingleNode(evaluated(xpath,me)+'/'+property+'['+(select.selectedIndex+1)+']');node.parentNode.removeChild(node);xml.setXml(xmlDoc.xml);select.remove(select.selectedIndex);application.dispatch('change',select,'HTMLEvents');}};JRapid.prototype.collectionAddEntity=function(me,id,entity,subset,subsetparams,minrows,maxrows,displayCanvas,unique,firstPage){var select=me.getParentNode().getParentNode().getFirstElementChild();if(maxrows&&select.outerNode.options.length>=maxrows){alert('Max rows: '+maxrows);return false;}
var container=me.getContainer();var selectxsl=container.getElementById('window_select_xsl'+id);if(subset&&subset!=''){var url=jrapid.getServerPath(container)+entity+'/'+subset;if(subsetparams&&subsetparams.length){var params=subsetparams.split(';');for(var j=0;j<params.length;j++){url+='/'+jrapid.escapeParam(jrapid.evaluateXpath(evaluated(params[j],me),me));}}
selectxsl.setUrl(url+(firstPage?',page1':''));}else{selectxsl.setUrl(jrapid.getServerPath(container)+entity+(firstPage?',page1':''));}
selectxsl.setAttribute('baseurl',selectxsl.getUrl());var tx=jrapid.startConsole('Add',false,'green');selectxsl.refresh(function(){jrapid.endConsole(tx);if(unique){var windowSelect=selectxsl.getLastElementChild().outerNode;var currentSelect=select.outerNode;for(var i=windowSelect.options.length-1;i>=0;i--){for(var j=0,n=currentSelect.options.length;j<n;j++){if(windowSelect.options[i].value==currentSelect.options[j].value){windowSelect.remove(i);break;}}}}});selectxsl.getPreviousElementSibling().getStyle().display=firstPage?'':'none';selectxsl.outerNode.parentNode.style.display='';var win=container.getElementById(selectxsl.outerNode.id+'_window');if(win){win.open();}else{var win=application.openWindow('Choose',selectxsl.outerNode.parentNode,null,true,true,true);win.id=selectxsl.outerNode.id+'_window';}
selectxsl.outerNode.slaveSelect=select;selectxsl.outerNode.displayCanvas=displayCanvas;selectxsl.outerNode.unique=unique;};JRapid.prototype.collectionSelectFilter=function(input,value,comboproperty){var xsl=input.getNextElementSibling();xsl.setUrl(xsl.getAttribute('baseurl')+(value?('!'+comboproperty+'='+value):''));xsl.refresh();};JRapid.prototype.collectionSelectWindowDblClick=function(me){if(me.getSelectedIndex()==-1){return;}
var xsl=me.getParentNode().getParentNode().outerNode;jrapid.checkIfIsNew(xsl.slaveSelect);var select=xsl.slaveSelect.outerNode;var maxrows=select.getAttribute('maxrows');if(maxrows&&select.options.length>=parseInt(maxrows)){alert('Max rows: '+maxrows);return false;}
var container=me.getContainer();var text=me.outerNode.options[me.outerNode.selectedIndex].text;var value=me.outerNode.options[me.outerNode.selectedIndex].value;select.options[select.options.length]=new Option(text,value);if(xsl.unique){me.remove(me.getSelectedIndex());}
var node=select.getAttribute('property');var selectexpr=evaluated(select.getAttribute('selectexpr'),select);var xmlDoc=XmlDocument.create();xmlDoc.loadXML('<'+node+' id=\''+value+'\' />');var target=container.getElementById('xml');var targetDoc=target.getXmlDocument();targetDoc.selectSingleNode(selectexpr).appendChild(targetDoc.adoptNode?targetDoc.adoptNode(xmlDoc.documentElement):xmlDoc.documentElement);target.setXml(targetDoc.xml);application.dispatch('change',select,'HTMLEvents');var canvas=xsl.displayCanvas;if(canvas){var txt='';for(var i=0;i<select.options.length;i++){txt+=(i==0?'':', ')+select.options[i].text;}
canvas.innerHTML=txt;canvas.title=txt;}};JRapid.prototype.comboKeyDown=function(me,entity,event){if(event.keyCode==13){jrapid.comboOpened=false;application.stopPropagation(event);application.preventDefault(event);}else if(event.keyCode==9){jrapid.comboOpened=false;var container=me.getContainer();var xsl=container.getElementById('window_combo_xsl'+me.getId());xsl.getStyle().display='none';if(me.getNextElementSibling().getValue()==-1){me.getStyle().color='red';}
return;}
return false;};JRapid.prototype.comboBlur=function(obj){var me=jrapid.wrap(obj);obj.style.color=me.getNextSibling().getValue()==''?'red':'';jrapid.tooltipOff(me.outerNode);};JRapid.prototype.comboKeyUp=function(me,entity,ev,subset,subsetparams,comboproperty){var container=me.getContainer();var xsl=container.getElementById('window_combo_xsl'+me.getId());me.getStyle().color='';if(ev.keyCode==9||ev.keyCode==27||ev.keyCode==13||(me.getValue().length<1&&ev.keyCode!=40&&ev.keyCode!=38)){xsl.getStyle().display='none';return;}
if(ev.keyCode==40&&xsl.getStyle().display!='none'){var tbody=xsl.outerNode.children[0].children[0].children[0];this.comboMove(xsl,tbody,1);var c=tbody.children[xsl.outerNode.comboSelectedIndex];jrapid.comboSetValue(me,c.title,c.getAttribute('rowid'));}else if(ev.keyCode==38&&xsl.getStyle().display!='none'){var tbody=xsl.outerNode.children[0].children[0].children[0];this.comboMove(xsl,tbody,-1);var c=tbody.children[xsl.outerNode.comboSelectedIndex];jrapid.comboSetValue(me,c.title,c.getAttribute('rowid'));}else if(ev.keyCode!=16){jrapid.comboShow(me,xsl,entity,ev,subset,subsetparams,comboproperty,true);}};JRapid.prototype.comboMove=function(xsl,tbody,diff){if(xsl.outerNode.comboSelectedIndex==null){xsl.outerNode.comboSelectedIndex=-1;}
if((diff>0&&xsl.outerNode.comboSelectedIndex>=tbody.children.length-1)||diff<0&&xsl.outerNode.comboSelectedIndex<=0){return;}
if(xsl.outerNode.comboSelectedIndex>=0){var style=tbody.children[xsl.outerNode.comboSelectedIndex].style;style.backgroundColor='';style.color='';}
xsl.outerNode.comboSelectedIndex+=diff;var style=tbody.children[xsl.outerNode.comboSelectedIndex].style;style.backgroundColor='#000099';style.color='#ffffff';};JRapid.prototype.comboSetValue=function(keyInput,key,id){if(key!=null){keyInput.setValue(key);}
var input=keyInput.getNextSibling();id=id==null?'':id;if(id!=input.getValue()){input.setValue(id);application.dispatch('change',input.outerNode,'HTMLEvents');}
keyInput.outerNode.style.backgroundColor='';keyInput.outerNode.style.color='';};JRapid.prototype.suggestClicked=function(obj){var input=application.wrapNode(obj.getContainer().getElementById('suggests').outerNode.input);input.setValue(obj.getTitle());application.dispatch('change',input,'HTMLEvents');};JRapid.prototype.comboShow=function(me,xsl,entity,ev,subset,subsetparams,comboproperty,setFirst){var url;var container=me.getContainer();if(subset){url=jrapid.getServerPath(container)+entity+'/'+subset;if(subsetparams){var params=subsetparams.split(';');for(var j=0;j<params.length;j++){url+='/'+jrapid.evaluateXpath(evaluated(params[j],me),me);}}
url+=',page1';url+=(me.getValue()?('!'+comboproperty+'='+me.getValue()):'');}else{url=jrapid.getServerPath(container)+entity+',page1'+(me.getValue()?('!'+comboproperty+'='+me.getValue()):'');}
xsl.setUrl(encodeURI(url));xsl.outerNode.comboSelectedIndex=-1;xsl.outerNode.comboSelected=me;var comboTime=new Date().getTime();jrapid.comboOpened=true;xsl.refresh(function(){if(!jrapid.comboOpened||(jrapid.lastComboTime&&jrapid.lastComboTime>comboTime)){return;}
jrapid.lastComboTime=comboTime;xsl.getStyle().top=(me.getY()-xsl.getContainingBlock().getY()+me.getHeight()-2)+"px";xsl.getStyle().left=(me.getRelativeX()-4)+"px";if(xsl.getLastElementChild()&&xsl.getLastElementChild().getFirstElementChild().hasChildren()){xsl.getStyle().display='';if(setFirst&&me.getValue().toLowerCase()==xsl.getLastElementChild().getFirstElementChild().getFirstElementChild().getFirstElementChild().getTitle().toLowerCase()){jrapid.comboSetValue(me,xsl.getLastElementChild().getFirstElementChild().getFirstElementChild().getFirstElementChild().getTitle(),xsl.getLastElementChild().getFirstElementChild().getFirstElementChild().getFirstElementChild().getAttribute('rowid'));}}else{xsl.getStyle().display='none';}});jrapid.comboSetValue(me,null,null);}
JRapid.prototype.comboDblClick=function(obj,entity,eventObj,subset,subsetparams,comboproperty){var me=jrapid.wrap(obj);var ev=jrapid.wrap(eventObj)
var container=me.getContainer();var xsl=container.getElementById('window_combo_xsl'+me.getId());jrapid.comboShow(me,xsl,entity,ev,subset,subsetparams,comboproperty,false);};JRapid.prototype.comboClicked=function(obj,id,key,rowid){var me=jrapid.wrap(obj);var container=me.getContainer();var xsl=container.getElementById('window_combo_xsl'+id);xsl.getStyle().display='none';jrapid.comboSetValue(xsl.outerNode.comboSelected,key,rowid);};JRapid.prototype.checkboxClicked=function(obj,selectexpr,name,value,isEntity,refreshCanvas){var me=jrapid.wrap(obj);var id=me.getValue();selectexpr=evaluated(selectexpr,me);var target=me.getContainer().getElementById('xml');var targetDoc=target.getXmlDocument();if(me.outerNode.checked){jrapid.checkIfIsNew(me);var xmlDoc=XmlDocument.create();if(isEntity){xmlDoc.loadXML('<'+name+' id="'+id+'" />');}else{xmlDoc.loadXML('<'+name+'>'+value+'</'+name+'>');}
targetDoc.selectSingleNode(selectexpr).appendChild(targetDoc.adoptNode?targetDoc.adoptNode(xmlDoc.documentElement):xmlDoc.documentElement);target.setXml(targetDoc.xml);}else{var expr=isEntity?(selectexpr+'/'+name+'[@id="'+id+'"]'):(selectexpr+'/'+name+'[. = "'+value+'"]');var node=targetDoc.selectSingleNode(expr);node.parentNode.removeChild(node);target.setXml(targetDoc.xml);}
if(refreshCanvas){var values=targetDoc.selectNodes(selectexpr+'/'+name);var txt='';for(var i=0;i<values.length;i++){txt+=(i==0?'':', ')+values[i].firstChild.nodeValue;}
refreshCanvas.innerHTML=txt;}};JRapid.prototype.openHelp=function(me,entity,form,width,height){var type;if(form)
type='form';else
type='list';var div=document.createElement('div');div.style.overflow='scroll';div.innerHTML="<iframe scrolling='no' frameborder='no' style='width: 400px; height: 500px' name='iframe'"+entity+"'>";width=width?width:'';height=height?height:'';div.children[0].src='../help.Main/'+entity+'_'+type+'.htm';document.body.appendChild(div);var win=application.openWindow(entity+' Help',div);jrapid.uploadinput=me.getPreviousElementSibling().getPreviousElementSibling();jrapid.uploaddiv=win;jrapid.wrap(win).resizeTo('407px','80px',true);};JRapid.prototype.fileChange=function(me,entity,width,height,ev){var div=document.createElement('div');div.innerHTML="<iframe scrolling='no' frameborder='no' style='width: 400px; height: 80px' name='iframe'"+entity+"'>";width=width?width:'';height=height?height:'';div.children[0].src='../jrapid-runtime/upload.jsp?entity='+entity+'&width='+width+'&height='+height;document.body.appendChild(div);var win=application.openWindow('Upload file',div);jrapid.uploadinput=me.getPreviousElementSibling().getPreviousElementSibling();jrapid.uploaddiv=win;jrapid.wrap(win).resizeTo('407px','80px',true);win.style.zIndex=9999;};JRapid.prototype.onupload=function(file){var input=jrapid.uploadinput;input.setValue(file);if(input.getNextElementSibling().outerNode.tagName.toLowerCase()=='img'){input.getNextElementSibling().outerNode.src=('../upload/'+file);}else{input.getNextElementSibling().outerNode.href='../upload/'+file;input.getNextElementSibling().outerNode.innerHTML=file.substring(file.indexOf('!')+1);}
application.dispatch('change',input.outerNode,'HTMLEvents');jrapid.uploaddiv.parentNode.removeChild(jrapid.uploaddiv);};JRapid.prototype.setFilter=function(node,property,value,op){if(!node.filter){node.filter=[];}
if(value==''){return node.filter[property]=null;}
if(!op){node.filter[property]=[value];}else if(op<0){for(var c=node.filter[property],i=c.length;i>=0;i--){if(c[i]==value){c.splice(i,1);}}}else{if(!node.filter[property]){node.filter[property]=[value];}else{node.filter[property].push(value);}}};JRapid.prototype.getFilters=function(node){var url='';for(var property in node.filter){var c=node.filter[property];if(property!='toXMLRPC'&&c&&c!="0"&&c.length){url+=(property+'='+c.join(',')+':');}}
return url==''?'':url.substring(0,url.length-1);};JRapid.prototype.filter=function(property,value,me,op){var container=me.getContainer();var node=container.node?container.node:application;this.setFilter(node,property,value,op);this.refreshFilter(container);};JRapid.prototype.refreshFilter=function(container){var xsl=jrapid.listingGetXsl(container);var node=container.node?container.node:application;var filters=this.getFilters(node);if(xsl.getAttribute('useparams')){xsl.setUrl(xsl.getAttribute('baseurl')+'/'+container.node.subsetParams+',page1'+(filters.length?('!'+filters):''));}else{xsl.setUrl(xsl.getAttribute('baseurl')+',page1'+(filters.length?('!'+filters):''));}
var tx=jrapid.startConsole('Filtering',false,'green');xsl.refresh(function(){jrapid.endConsole(tx);});};JRapid.prototype.showHideFilters=function(obj){var me=jrapid.wrap(obj);var next=me.getNextElementSibling();next.outerNode.style.display=(next.outerNode.style.display=='none'?'':'none');};JRapid.prototype.listingTabClick=function(obj,entity){var me=application.wrapNode(obj);var container=me.getContainer();var index=0;obj=obj.parentNode;while(obj.previousSibling){if(obj.previousSibling.nodeType==1){index++;}
obj=obj.previousSibling;}
var pane=obj.parentNode.nextSibling;var j=0;var tab;while(pane&&(pane.nodeType!=1||pane.className.indexOf('jrapid_tab')>=0)){if(pane.nodeType==1){if(j++==index){tab=application.wrapNode(pane);break;}}
pane=pane.nextSibling;}
var node=container.node?container.node:application;if(tab.getAttribute('restriction')){this.setFilter(node,'_saved',tab.getAttribute('restriction'));}else{this.setFilter(node,'_saved','');}
if(tab.getAttribute('view')){container.getElementById('selectview').setSelectedIndex(tab.getAttribute('view'));}else{container.getElementById('selectview').setSelectedIndex(0);}
var filters=this.getFilters(node);var children=tab.getChildren();for(var i=0;i<children.getLength();i++){var child=children.item(i);child.setUrl(child.getAttribute('baseurl')+(filters.length?('!'+filters):''));if(container.getElementById('selectview').getSelectedIndex()==i){this.refreshFilter(container);child.getStyle().display='';}else{child.getStyle().display='none';}}};JRapid.prototype.appendSavedFilter=function(me,title,restriction){var container=me.getContainer();var tabpane=container.getElementById('tabpane');if(!tabpane||me.getInnerHTML()==''){return;}
var node=tabpane.getFirstElementChild();tabpane.appendTab(node,title);tabpane.getLastElementChild().setAttribute('restriction',restriction);var tabs=tabpane.getChildren();var id='xsl_1_'+tabs.getLength();var views=tabpane.getLastElementChild().getChildren();for(var i=0;i<views.getLength();i++){views.item(i).setId('xsl_'+(i+1)+'_'+tabs.getLength());}};JRapid.prototype.removeSavedFilters=function(me){var container=me.getContainer();var tabpane=container.getElementById('tabpane');if(!tabpane||me.getInnerHTML()==''){return;}
var nodes=tabpane.getChildren();for(var i=nodes.getLength()-1;i>=0;i--){if(nodes.item(i).getAttribute('restriction')){tabpane.removeTab(i);}}};JRapid.prototype.listingSavedFilterRefresh=function(me){var t=me.getInnerHTML().split(';');var tabpane=me.getContainer().getElementById('tabpane');if(!tabpane){return;}
var tabs=tabpane.getChildren();var j=0;for(;j<tabs.getLength();j++){if(tabs.item(j).getAttribute('restriction')){break;}}
for(var i=0;i<t.length;i++){tabs=tabpane.getChildren();if(!tabs.item(j+i)||!tabs.item(j+i).getAttribute('restriction')){this.appendSavedFilter(me,t[i].split(',')[0],t[i].split(',')[1]);}}
if(me.getAttribute('focusLast')=='true'){tabpane.focusChild(j+i-1);}};JRapid.prototype.showSaveFilter=function(me){var container=me.getContainer();container.getElementById('saveFilterPanel').getStyle().display='';container.getElementById('saveFilterLink').getStyle().display='none';container.getElementById('saveFilterInput').focus();};JRapid.prototype.saveFilter=function(me){var container=me.getContainer();container.getElementById('saveFilterPanel').getStyle().display='none';container.getElementById('saveFilterLink').getStyle().display='';var xsl=jrapid.listingGetXsl(container);var name=me.getPreviousSibling().getValue();var node=container.node?container.node:application;var filters=this.getFilters(node);xsl.setUrl(xsl.getAttribute('baseurl')+',saveas='+name+(filters.length?('!'+filters):''));xsl.refresh(function(){container.getElementById('othertabs').setAttribute('focusLast','true');container.getElementById('othertabs').refresh();});};JRapid.prototype.listingChangeView=function(obj){var me=jrapid.wrap(obj);var container=me.getContainer();var tabpane=container.getElementById('tabpane');var index=1;if(tabpane){for(index=1,c=tabpane.outerNode.children,n=c.length;index<=n;index++){if(c[index-1].className=='active'){break;}}}
if(tabpane){}
var i=tabpane?(index):1;for(var j=0;j<me.outerNode.options.length;j++){var xsl=container.getElementById('xsl_'+(j+1)+'_'+i);xsl.getStyle().display=(j==me.getSelectedIndex())?'':'none';if(j==me.getSelectedIndex()){this.refreshFilter(container);}}};JRapid.prototype.listingGetXsl=function(container){var tabpane=container.getElementById('tabpane');var i=1;if(tabpane){for(i=1,c=tabpane.outerNode.children,n=c.length;i<=n;i++){if(c[i-1].className=='active'){break;}}}
var view=container.getElementById('selectview');view=view==null?1:(view.getSelectedIndex()+1);return container.getElementById('xsl_'+view+'_'+i);};JRapid.prototype.listingGetTable=function(container){var tabpane=container.getElementById('tabpane');var index=1;if(tabpane){for(var i=0,c=tabpane.outerNode.children,n=c.length;i<n;i++){if(c[i].getAttribute('active')){index=i+1;break;}}}
var view=container.getElementById('selectview');view=view==null?1:(view.outerNode.selectedIndex+1);return container.getElementById('table_'+view+'_'+index);};JRapid.prototype.page=function(obj,page,total){var me=jrapid.wrap(obj);if(page<=total&&page>0){var container=me.getContainer();var key=container.getPrefix();var xsl=jrapid.listingGetXsl(container);var node=container.node?container.node:application;var filters=this.getFilters(node);var order=xsl.getAttribute('order')?('$'+xsl.getAttribute('order')):'';xsl.setUrl(xsl.getAttribute('baseurl')+',page'+page+(filters.length?('!'+filters):'')+order);var tx=jrapid.startConsole('Paging',false,'green');xsl.refresh(function(param,xmlDoc,status){jrapid.endConsole(tx);if(status!=200){jrapid.startConsole('Network error',true,'green');return;}
if(xmlDoc==null||xmlDoc.documentElement==null||xmlDoc.documentElement.tagName=='exception'){jrapid.startConsole('Network error',true,'red');if(xmlDoc!=null&&xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()){alert(xmlDoc.documentElement.childNodes[0].nodeValue);}else{alert('Unable to read');}
return;}});}};JRapid.prototype.pageList=function(obj,num,size){var me=jrapid.wrap(obj);var pages=application.wrapNode(me);if(pages.getChildren().getLength()==1){for(var i=1,cell;i<=size;i++){cell=document.createElement('option');cell.value=cell.innerHTML=i;if(num==i){cell.selected="selected";}
obj.appendChild(cell);}
pages.removeChild(pages.getFirstElementChild());}};JRapid.prototype.order=function(obj,label,ev){var index=ev.target?ev.target.cellIndex:ev.srcElement.cellIndex;var me=jrapid.wrap(obj);var container=me.getContainer();var xsl=jrapid.listingGetXsl(container);var node=container.node?container.node:application;var filters=this.getFilters(node);if(xsl.getAttribute('order')==index){index+='d';}
xsl.setUrl(xsl.getAttribute('baseurl')+',page1'+(filters.length?('!'+filters):'')+'$'+index);xsl.setAttribute('order',index);var tx=jrapid.startConsole('Ordering',false,'green');xsl.refresh(function(i,xmlDoc,status){jrapid.endConsole(tx);if(status!=200){jrapid.startConsole('Network error',true,'green');return;}
if(xmlDoc==null||xmlDoc.documentElement==null||xmlDoc.documentElement.tagName=='exception'){jrapid.startConsole('Error',true,'red');if(xmlDoc!=null&&xmlDoc.documentElement&&xmlDoc.documentElement.hasChildNodes()){alert(xmlDoc.documentElement.childNodes[0].nodeValue);}else{alert('Unable to read');}
return;}
jrapid.resizeTable(xsl);},0);};JRapid.prototype.tooltipOn=function(obj){var div=document.createElement('div');div.innerHTML=obj.getAttribute('tooltip');div.className='jrapid_tooltip';obj.tooltipElement=div;document.body.appendChild(div);var style=div.style;style.display='';var r=obj.getBoundingClientRect();if(r.right+50<document.body.clientWidth){style.top=r.top+'px';style.left=(r.right+5)+'px';}else if(r.top+r.height+30<document.body.clientHeight){style.left=r.left+'px';style.top=(r.top+r.height+3)+'px';}else{style.left=r.left+'px';var h=div.getBoundingClientRect().bottom-div.getBoundingClientRect().top;style.top=(r.top-h-10)+'px';}};JRapid.prototype.tooltipOff=function(obj){var tooltip=obj.tooltipElement;if(tooltip){tooltip.parentNode.removeChild(tooltip);}};JRapid.prototype.javascriptFormAction=function(obj,name){var me=jrapid.wrap(obj);var container=me.getContainer();var id=container.getElementById('xml').getXmlDocument().selectSingleNode('/*').getAttribute('id');var ids=[id];eval(name+'(obj, ids)');return false;};JRapid.prototype.javascriptListingAction=function(obj,name){var me=jrapid.wrap(obj);var ids=this.getIds(me);eval(name+'(obj, ids);');return false;};JRapid.prototype.reportListingAction=function(obj,report,pdf,ids){var me=jrapid.wrap(obj);if(!ids){ids=this.getIds(me);}
window.open('../report/'+report+'?id='+ids+'&pdf='+pdf+'&rand='+new Date().getTime(),'_blank','width=1000,height=600,resizable=yes');return false;};JRapid.prototype.reportFormAction=function(obj,report,pdf){var me=jrapid.wrap(obj);var container=me.getContainer();var id=container.getElementById('xml').getXmlDocument().selectSingleNode('/*').getAttribute('id');var ids=[id];window.open('../report/'+report+'?id='+ids+'&pdf='+pdf+'&rand='+new Date().getTime(),'_blank','width=1000,height=600,resizable=yes');return false;};JRapid.prototype.openRelatedForm=function(obj,entity,defaultset,defaultsetparams,isEntityAction){var me=jrapid.wrap(obj);var container=me.getContainer();var id=isEntityAction?container.getElementById('xml').getXmlDocument().selectSingleNode('/*').getAttribute('id'):'';if(defaultset){var params=defaultsetparams?defaultsetparams.split(';'):[];for(var j=0;j<params.length;j++){id+=(id==''?'':'/')+jrapid.escapeParam(jrapid.evaluateXpath(params[j],me));}}
return jrapid.openForm(me,entity,'formcanvas',id,defaultset,null,true);};JRapid.prototype.openRelatedListing=function(obj,entity,listing,subset,subsetparams,defaultset,defaultsetparams){var me=jrapid.wrap(obj);var id='';if(subsetparams){var params=subsetparams.split(';');for(var j=0;j<params.length;j++){id+=(j>0?'/':'')+jrapid.evaluateXpath(params[j],me);}}
var p='';if(defaultsetparams){var params=defaultsetparams.split(';');for(var j=0;j<params.length;j++){p+=(j>0?'/':'')+jrapid.evaluateXpath(params[j],me);}}
return jrapid.openListing(me,entity,null,listing,subset+(subset&&id?'/':'')+id,null,null,true,null,null,defaultset,p);};JRapid.prototype.getIdsAsString=function(me,first){var ids=jrapid.getIds(me);if(first&&ids&&ids.length){return ids[0];}
var s='';for(var i=0;i<ids.length;i++){s+=(i>0?',':'')+ids[i];}
return s.length?s:'0';}
JRapid.prototype.getIds=function(me){var container=me.getContainer();var type=container.getElementById('selectview').getValue();var table=jrapid.listingGetTable(container);var ids=new Array();var index=1;var tabpane=container.getElementById('tabpane');if(tabpane){for(var i=0,c=tabpane.outerNode.children,n=c.length;i<n;i++){if(c[i].getAttribute('active')){index=i+1;break;}}}
var view=container.getElementById('selectview');view=view==null?1:(view.getSelectedIndex()+1);var items;switch(type){case'thumbnails':items=jrapid.getElementsById('thumbnails_'+view+'_'+index,container.node);break;case'icons':items=jrapid.getElementsById('icons_'+view+'_'+index,container.node);break;case'table':default:items=jrapid.getElementsById('tableitem_'+view+'_'+index,container.node);break;}
for(var i=0;i<items.length;i++){if(items[i].getAttribute('selected')||items[i].getAttribute('selected')=='true'){ids[ids.length]=items[i].getAttribute('rowid');}}
return ids;};JRapid.prototype.listingMouseOverThumbnail=function(obj){obj.children[0].children[0].children[0].children[1].style.display='inline';};JRapid.prototype.listingMouseOutThumbnail=function(obj){obj.children[0].children[0].children[0].children[1].style.display='none';};JRapid.prototype.listingToggleThumbnail=function(me){if(me.getAttribute('selected')=='true'){me.setAttribute('selected','false');me.className='listing_thumbnails';}else{me.setAttribute('selected','true');me.className='listing_thumbnails listing_highlight';}};JRapid.prototype.listingToggleIcon=function(me){if(me.getAttribute('selected')=='true'){me.setAttribute('selected','false');me.setClassName('listing_icons');}else{me.setAttribute('selected','true');me.setClassName('listing_highlight');}};JRapid.prototype.listingToggleTable=function(obj,odd,ev){var current=obj.parentNode.currentRows;if(!current){current=obj.parentNode.currentRows=[];}
if(!ev.ctrlKey){for(var i=0,n=current.length;i<n;i++){var c=current[i];c.removeAttribute('selected');c.className='';}
current=obj.parentNode.currentRows=[];}
obj.className="jrapid_table_tr__selected";obj.setAttribute('selected','true');current[current.length]=obj;};JRapid.prototype.listingClicked=function(me,id){var me=jrapid.wrap(me);var node=me.getContainer().node;if(node&&node.triggers&&node.triggers.length){for(var i=0,n=node.triggers.length;i<n;i++){node.triggers[i](me,id);}}};JRapid.prototype.listingRemove=function(obj,name){if(confirm('Sure to delete these elements?')){var me=jrapid.wrap(obj);var ids=this.getIds(me);var xmlrpcserver=new JRapid_XmlRpcServer(JRapid.XMLRPC_PATH);xmlrpcserver.executeAsync(name+'.remove',function(id,e){if(e){alert('Unable to delete');}else{jrapid.refreshFilter(me.getContainer());}},ids);}
return false;};JRapid.prototype.selectTimeSync=function(obj){var me=jrapid.wrap(obj);var children=me.getParentNode().getChildren();var input=children.item(3);var s1=children.item(0).outerNode;var s2=children.item(2).outerNode;input.setValue(s1.options[s1.selectedIndex].text+':'+s2.options[s2.selectedIndex].text);input.sync();};JRapid.prototype.selectDateSync=function(obj){var me=jrapid.wrap(obj);var children=me.getParentNode().getChildren();var input=children.item(5);var s1=children.item(0).outerNode;var s2=children.item(2).outerNode;var s3=children.item(4).outerNode;input.setValue(s1.value+'/'+s2.value+'/'+s3.value);input.sync();};JRapid.prototype.auditHistory=function(obj,entity){var me=jrapid.wrap(obj);var id=me.getContainer().getElementById('xml').getXmlDocument().selectSingleNode('/*/@id').nodeValue;window.open('../jrapid-runtime/history.jsp?entity='+entity+'&id='+id,entity,'resizable=yes,status=no,scrollbars=yes,width=500,height=300');};JRapid.prototype.navigate=function(me,select,dir,entity){var options=select.outerNode.options;var newIndex=select.outerNode.selectedIndex+dir;if(newIndex>=0&&newIndex<options.length){options[newIndex].selected=true;}
jrapid.loadForm(me.getContainer(),entity,select.outerNode.value);};JRapid.prototype.startAsyncConsole=function(container,key,service){var textarea=document.createElement('textarea');textarea.className='jrapid_asyncconsole';document.body.appendChild(textarea);var win=application.openWindow('Executing',textarea);var message="";var callServer=function(key){var xmlrpcserver=new JRapid_XmlRpcServer(JRapid.XMLRPC_PATH);xmlrpcserver.executeAsync(service+'.getMessage',function(result){textarea.value=message=message+result;textarea.scrollTop=textarea.scrollHeight;if(result==null||result.indexOf('%END%')==-1){setTimeout(function(){callServer(key)},1000);}},parseInt(key));};callServer(key);};JRapid.prototype.accordeonOnClickResize=function(){var table=application.getElementById('table');if(table){jrapid.panelResizeTable(table.outerNode,document.documentElement.clientHeight-30);}};JRapid.prototype.registerPanelListing=function(me,entity,subset,subsetparams,defaultset){var container=me.getContainer();var params=subsetparams.split(';');for(var i=0;i<params.length;i++){var childContainer=container.getElementById(params[i]).getChildContainer();var node=childContainer.node;if(node.triggers==null){node.triggers=[];}
node.triggers[node.triggers.length]=function(foo,id){var child=me.getChildContainer();child.node.subsetParams=id;if(defaultset){var add=child.getElementById('add');if(add){add.setAttribute('defaultset',defaultset);add.setAttribute('defaultsetparams',id);}}
jrapid.loadListing(child,entity,subset+'/'+id,false,me.getParentNode());};}};JRapid.prototype.registerPanelForm=function(me,entity,defaultsetparams,defaultset){var container=me.getContainer();var params=defaultsetparams.split(';');for(var i=0;i<params.length;i++){var listing=container.getElementById(params[i]);var childContainer=listing.getChildContainer();var node=childContainer.node;if(node.triggers==null){node.triggers=[];}
node.triggers[node.triggers.length]=function(foo,id){jrapid.loadForm(me.getChildContainer(),entity,id,defaultset,false,false,false,false,true);};}};JRapid.prototype.panelResizeTable=function(table,height){for(var i=0,c=table.children[0].children,n=c.length;i<n;i++){jrapid.panelResizeTr(c[i],height);}};JRapid.prototype.panelResizeTr=function(tr,height){var fixedHeight=0;for(var i=0,c=tr.children,n=c.length;i<n;i++){var h=c[i].getAttribute('panelheight');if(h&&h.indexOf('%')==-1){fixedHeight+=parseInt(h);}}
for(var i=0,c=tr.children,n=c.length;i<n;i++){jrapid.panelResizeTd(c[i],height-fixedHeight);}};JRapid.prototype.panelResizeTd=function(td,height){if(td.getAttribute('panelheight')){var tdHeight=td.getAttribute('panelheight');var index=tdHeight.indexOf('%');var actualHeight=index==-1?parseInt(tdHeight):parseInt(tdHeight)*height/100;td.children[0].style.height=actualHeight+'px';var fixedHeight=0;for(var i=0,c=td.children[0].children,n=c.length;i<n;i++){var h=c[i].getAttribute('panelheight');if(h&&h.indexOf('%')==-1){fixedHeight+=parseInt(h);}}
for(var i=0,c=td.children[0].children,n=c.length;i<n;i++){var node=c[i];if(node.className=='jrapid_accordeon'){jrapid.panelResizeAccordeon(node,actualHeight-fixedHeight);}else{jrapid.panelResizeItem(node,actualHeight-fixedHeight);}}}};JRapid.prototype.panelResizeItem=function(item,height){var h=item.getAttribute('panelheight');if(h){if(h.indexOf('%')==-1){item.style.height=h;}else{item.style.height=(height*parseInt(h)/100)+'px';}
item.style.overflowY='auto';}
if(item.getAttribute('listing')){var xsl=jrapid.listingGetXsl(jrapid.wrap(item.children[0]).getChildContainer());if(xsl){jrapid.resizeTable(xsl);}}else if(item.tagName.toLowerCase()=='img'){if(!item.getAttribute('baseurl')){item.setAttribute('baseurl',item.src);}
item.style.width='100%';item.src=item.getAttribute('baseurl')+'&width='+item.offsetWidth+'&height='+parseInt(item.style.height);}};JRapid.prototype.panelResizeAccordeonItem=function(item,height){var fixedHeight=0;var c=item.children[1].children;for(var i=0,n=c.length;i<n;i++){var h=c[i].getAttribute('panelheight');if(h&&h.indexOf('%')==-1){fixedHeight+=parseInt(h);}}
for(var i=0,n=c.length;i<n;i++){jrapid.panelResizeItem(c[i],height-fixedHeight);}};JRapid.prototype.panelResizeAccordeon=function(accordeon,height){for(var i=0,c=accordeon.children,n=c.length;i<n;i++){jrapid.panelResizeAccordeonItem(c[i],height-n*jrapid.ACCORDEON_HEIGHT-jrapid.ACCORDEONBODY_PADDING);}};JRapid.prototype.panelOnload=function(){var h=document.location.hash;if(h.length){h=h.substring(1).split(';');for(var i=0;i<h.length;i++){var t=h[i].split('-');if(t[0]=='form'){jrapid.openForm(jrapid.wrap(document.body),t[1],null,t[2],null,null,true);}else if(t[0]=='listing'){jrapid.openListing(jrapid.wrap(document.body),t[1],null,'',null,null,null,true);}}}};JRapid.prototype.script=function(url){var script=document.createElement("script");script.src=url;script.type='text/javascript';document.body.appendChild(script);}
JRapid.prototype.stylesheet=function(url){var link=document.createElement("link");link.rel='stylesheet';link.href=url;document.body.appendChild(link);}
jrapid.ACCORDEONBODY_PADDING=10;jrapid.ACCORDEON_HEIGHT=21;jrapid.SERVER_PATH=jrapid.getParam('path','../xml/');JRapid.XMLRPC_PATH=jrapid.getParam('xmlrpcpath','../xmlrpc/');jrapid.WINDOW_HEIGHT=30;window.addEventListener('keydown',function(ev){if(ev.keyCode==75&&ev.ctrlKey){if(JRapid_Source.cache){JRapid_Source.cache=false;alert('Cache disabled.');}else{JRapid_Source.cache=true;alert('Cache enabled.');}}},false);jrapid._onload=function(){if(window.isPanel){var table=application.getElementById('table');if(table){jrapid.panelResizeTable(table.outerNode,document.documentElement.clientHeight-30);}
jrapid.panelOnload();window.onresize=jrapid._onload;}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",jrapid._onload,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",jrapid._onload);}}function BI(){}
BI.action=function(obj,url,value){if(value){var data=value.split(',');obj.options[0].selected=true;url=BI.removeParam(url,'noheader');jrapid.openForm(jrapid.wrap(obj),data[0],null,'Table/'+escape(url.replace(new RegExp("/",'g'),'|/')),data[1],'Main',true);}};BI.openForm=function(id,entity){jrapid.openForm(null,entity,null,id,null,'Main',true);};BI.include=function(url,canvas){if(!canvas){canvas=document.createElement('div');document.body.appendChild(canvas);}
var o=new XMLHttpRequest();o.open('GET',url,true);o.onreadystatechange=function(){if(o.readyState==4){canvas.innerHTML=o.responseText;}};o.send('');};BI.open=function(url,target,params){var div=document.createElement('div');document.body.appendChild(div);var o=new XMLHttpRequest();o.open('GET',url,true);o.onreadystatechange=function(){if(o.readyState==4){div.id='bi'+new Date().getTime();div.innerHTML=o.responseText;div.style.position='absolute';div.style.top='0px';var w=div.offsetWidth;var h=div.offsetHeight;var win=jrapid.wrap(application.openWindow('Table',div,null,null,null,null,true));var size=document.documentElement.clientHeight-div.getBoundingClientRect().top-52;if(size<h){div.parentNode.style.overflowY='scroll';div.parentNode.style.height=size+'px';}
h=Math.min(h,size);win.resizeTo(w,h,true);div.style.width='100%';div.style.position='';}};o.send('');};BI.chartDashboard=function(obj,id){var img=document.getElementById('img'+id);var url=BI.removeParam(BI.removeParam(img.src.replace(new RegExp("/",'g'),'|/'),'width'),'height');url=escape(url);jrapid.openForm(jrapid.wrap(obj),'Chart',null,url,'forUrl','Main',true);};BI.chartConfigure=function(obj,type,id){var name=type;type=type.charAt(0).toUpperCase()+type.substring(1);var sourcePrototype=jrapid.createSource();sourcePrototype.outerNode.id='source'+new Date().getTime();document.body.appendChild(sourcePrototype.outerNode);sourcePrototype.setUrl('../jrapid-runtime/forms.Chart/'+type+'Configuration_form.html');var container=jrapid.wrap(obj).getContainer();sourcePrototype.open(function(){application.openWindow(type,container.getElementById('windowcontainer').outerNode);var xml=container.getElementById('xml');xml.setXml(BI.chartsXml[name]);var xsl=container.getElementById('xsl');xsl.refresh();var submit=container.getElementById('submit');submit.outerNode.onclick=function(){var form=container.getElementById('form').outerNode;var s='';for(var i=0,c=form.elements,n=c.length;i<n;i++){if(c[i].id.indexOf(name)==0){if(c[i].type=='checkbox'&&c[i].checked){s+='&'+c[i].id.substring((name+'configuration').length+1)+'=true';}else if(c[i].value.length){s+='&'+c[i].id.substring((name+'configuration').length+1)+'='+c[i].value;}}}
var img=document.getElementById('img'+id);img.basesrc=img.basesrc+s;img.src=img.basesrc+s+'&width='+img.width+'&height='+img.height;sourcePrototype.outerNode.parentNode.removeChild(sourcePrototype.outerNode);}});};BI.chartsXml=[];BI.chartsXml['pie']='<pieConfiguration><title>My Pie Chart</title><backgroundColor id="" /><perRow /><lowerLimit /><use3D /></pieConfiguration>';BI.chartsXml['bar']='<barConfiguration><title>My Bar Chart</title><backgroundColor id="" /><perRow /><categoryLabel />'+'<valueLabel /><vertical /><stacked /><includeLegend /><includeTooltip /><base /><legendFontSize /></barConfiguration>';BI.chartsXml['line']='<lineConfiguration><title>My Bar Chart</title><backgroundColor id="" /><perRow /><manyCharts /><categoryLabel />'+'<valueLabel /><vertical /><stacked /><includeLegend /><includeTooltip /><base /><itemLabelsVisible /><legendFontSize /></lineConfiguration>';BI.openImage=function(url,target,type){var id=new Date().getTime();var div=document.createElement('div');var img=document.createElement('img');var conf=document.createElement('div');conf.innerHTML='<a href="#" onclick="BI.chartConfigure(this, \''+type+'\', '+id+');">Configure</a>'+'<a href="#" onclick="BI.chartDashboard(this, '+id+');">To dashboard</a>';img.basesrc=img.src=url;img.id='img'+id;div.appendChild(conf);div.appendChild(img);document.body.appendChild(div);var win=application.openWindow('Chart',div);win.id='win'+id;win.setAttribute('onresizewindow','BI.resizeChart("'+id+'")');};BI.resizeChart=function(id){var img=document.getElementById('img'+id);img.style.display='none';var rect=document.getElementById('win'+id).getBoundingClientRect();img.src=img.basesrc+'&width='+rect.width+'&height='+rect.height;img.style.display='';img.width=rect.width;img.height=rect.height;};BI.exclude=function(obj,event,dimension){var url=obj.parentNode.parentNode.parentNode.parentNode.getAttribute('url');BI.refresh(obj,url.replace(new RegExp('(,?)'+dimension),''));}
BI.order=function(obj,event,dimension,id){var url=obj.parentNode.parentNode.parentNode.parentNode.getAttribute('url');BI.refresh(obj,BI.addParam(url,'order',dimension+':'+id));}
BI.swap=function(obj,event,dimension){var url=obj.parentNode.parentNode.parentNode.parentNode.getAttribute('url');if(!BI.swapOne(obj,dimension,url,'rows')){BI.swapOne(obj,dimension,url,'columns');}}
BI.swapOne=function(obj,dimension,url,type){var v=BI.paramValues(url,type);for(var i=0;i<v.length;i++){if(v[i]==dimension){var aux=v[i-1];v[i-1]=v[i];v[i]=aux;url=BI.addParam(url,type,v.join(','));BI.refresh(obj,url);return true;}}
return false;}
BI.rotate=function(obj,event,dimension){var url=obj.parentNode.parentNode.parentNode.parentNode.getAttribute('url');var rows=BI.paramValues(url,'rows');var columns=BI.paramValues(url,'columns');for(var i=0;i<rows.length;i++){if(rows[i]==dimension){rows.splice(i,1);columns[columns.length]=dimension;url=BI.addParam(url,'rows',rows.join(','));url=BI.addParam(url,'columns',columns.join(','));BI.refresh(obj,url);return;}}
for(var i=0;i<columns.length;i++){if(columns[i]==dimension){columns.splice(i,1);rows[rows.length]=dimension;url=BI.addParam(url,'rows',rows.join(','));url=BI.addParam(url,'columns',columns.join(','));BI.refresh(obj,url);return;}}}
BI.getUrl=function(obj){var c=obj.parentNode.parentNode.parentNode.parentNode;c=c.children[c.children.length-1];if(c.children&&c.children.length&&c.children[c.children.length-1].tagName.toLowerCase()=='div'){return c.children[c.children.length-1].children[0].getAttribute('url');}
return c.getAttribute('url');};BI.table=function(obj,event,columnCount,rowCount){var thead=obj.parentNode.parentNode.parentNode.parentNode.children[1];var url=thead.parentNode.getAttribute('url');var n=thead.children[columnCount-1].children[obj.parentNode.cellIndex];var names=n.getAttribute('keyname').split('#');var keys=n.getAttribute('key').split('#');for(var i=0;i<names.length;i++){url=BI.addParam(url,names[i],keys[i]);}
for(var i=0;i<rowCount;i++){var n=obj.parentNode.parentNode.children[i];url=BI.addParam(url,n.getAttribute('keyname'),n.getAttribute('key'));}
BI.open(BI.addParam(BI.removeParam(url,'noheader'),'table','true'),'_blank','width=700');};BI.refresh=function(obj,url){var div;while(obj){if(obj.id=='canvas'){div=obj;break;}
if(obj.id=='container'){var canvas=obj.children[obj.children.length-1];div=canvas;break;}
obj=obj.parentNode;}
var o=new XMLHttpRequest();o.open('GET',BI.addParam(url,'noheader',''),true);o.onreadystatechange=function(){if(o.readyState==4){div.innerHTML=o.responseText;}};o.send('');};BI.addParam=function(url,param,value){var url=BI.removeParam(url,param);return url+(url.indexOf('?')==-1?'?':'&')+param+'='+value;};BI.paramValues=function(url,param){var parts=url.split('?');if(parts.length==1){return[];}
var params=parts[1].split('&');for(var i=0;i<params.length;i++){var keyValue=params[i].split('=');if(keyValue[0]==param){return keyValue.length==0?[]:keyValue[1].split(',');}}
return url;};BI.removeParam=function(url,param){var parts=url.split('?');if(parts.length==1){return url;}
url=parts[0]+'?';var params=parts[1].split('&');for(var i=0;i<params.length;i++){var keyValue=params[i].split('=');if(keyValue[0]!=param){url+='&'+params[i];}}
return url;};BI.chart=function(obj,foo,type){if(type){var url=obj.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('table')[0].getAttribute('url');obj.options[0].selected=true;BI.openImage(BI.addParam(url,'chart',type),null,type);}};BI.showFilters=function(button){button.parentNode.nextSibling.style.display=button.parentNode.nextSibling.style.display==''?'none':'';};BI.showFilter=function(obj,index){var divs=obj.parentNode.nextSibling.childNodes;for(var i=0;i<divs.length;i++){divs[i].style.display=i==index?'':'none';}};BI.measure=function(obj,url){BI.refresh(obj,BI.addParam(BI.removeParam(BI.removeParam(url,'measure'),'conf'),'measure',obj.value));};BI.refreshFilters=function(button,url,field){var select=button.parentNode.parentNode.childNodes[0].firstChild;var ids="-1";for(var i=0;i<select.options.length;i++){ids+=","+select.options[i].value;}
url=BI.removeParam(url,'conf');url=BI.removeParam(url,'filter'+field);if(select.options.length==0){BI.refresh(button,url);}else{BI.refresh(button,BI.addParam(url,'filter'+field,ids));}};BI.refreshDimensions=function(button,url){var select=button.parentNode.parentNode.childNodes[1].firstChild;var rows="";for(var i=0;i<select.options.length;i++){rows+=(i==0?"":",")+select.options[i].value;}
select=button.parentNode.parentNode.childNodes[4].firstChild;var columns="";for(var i=0;i<select.options.length;i++){columns+=(i==0?"":",")+select.options[i].value;}
url=BI.addParam(url,'rows',rows);url=BI.addParam(url,'columns',columns);url=BI.removeParam(url,'conf');BI.refresh(button,url);};BI.reportAction=function(obj,id,url){var c=document.getElementById('html_canvas');c.style.padding='10px';BI.include(BI.removeParam(url,'conf'),c);};BI.resizeDashboard=function(obj){var i=obj.children[0].selectedIndex+1;var height=obj.getBoundingClientRect().bottom-obj.getBoundingClientRect().top;var h=(height-20)/2;obj.style.overflow='hidden';var tbody=obj.children[i].children[0];BI.resizeDashboardImg(tbody,0,0,h);BI.resizeDashboardImg(tbody,0,1,h);BI.resizeDashboardImg(tbody,1,0,h);BI.resizeDashboardImg(tbody,1,1,h);};BI.resizeDashboardImg=function(tbody,x,y,h){var img=tbody.children[x].children[y].children[0];if(!parseInt(img.offsetWidth))return;if(!img.basesrc){img.basesrc=BI.removeParam(BI.removeParam(img.src,'width'),'height');}
img.src=img.basesrc+'&width='+parseInt(img.offsetWidth)+'&height='+parseInt(h);img.style.height=h+'px';};BI.selectDashboard=function(obj){for(var i=1,c=obj.parentNode.children,n=c.length;i<n;i++){c[i].style.display=obj.selectedIndex==(i-1)?'':'none';}
BI.resizeDashboard(obj.parentNode);};
