All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ro.isdc.wro.extensions.script.env.rhino.min.js Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
var Envjs=function(){if(arguments.length===2)for(var a in arguments[1]){var b=arguments[1].__lookupGetter__(a),c=arguments[1].__lookupSetter__(a);b||c?(b&&Envjs.__defineGetter__(a,b),c&&Envjs.__defineSetter__(a,c)):Envjs[a]=arguments[1][a]}window.location=arguments[0]};(function(a){a.appCodeName="Envjs",a.appName="Resig/20070309 BirdDog/0.0.0.1",a.profile=!1,a.log=function(a,b){},a.debug=function(){},a.info=function(){},a.warn=function(){},a.error=function(){},a.info=function(b){a.log(b,"INFO")},a.warn=function(b){a.log(b,"WARNIING")},a.error=function(b,c){a.log(b+" Line: "+a.lineSource(c),"ERROR"),a.log(c||"","ERROR")},a.info("Initializing Core Platform Env"),a.lineSource=function(a){},a.hashCode=function(a){},a.location=function(a,b){},a.timer=function(a,b){},a.javaEnabled=!1,a.runAsync=function(a){},a.writeToFile=function(a,b){},a.writeToTempFile=function(a,b){},a.deleteFile=function(a){},a.connection=function(a,b,c){},a.parseHTML=function(a){},a.parseXML=function(a){},a.xpath=function(a,b){},a.tmpdir="",a.os_name="",a.os_arch="",a.os_version="",a.lang="",a.platform="Rhino ",a.safeScript=function(){},a.scriptTypes={"text/javascript":!1,"text/envjs":!0},a.loadLocalScript=function(b,c){a.debug("loading script ");var d,e,f,g,h,i=[],j=document.write,k=document.writeln;document.write=function(a){i.push(a)};try{if(b.type){d=b.type?b.type.split(";"):[];for(g=0;g1)return(new java.net.URL(a)).toString()+"";if(b)return(new java.net.URL(new java.net.URL(b),a)).toString()+"";if(window.location.href.length>0){b=window.location.href.substring(0,window.location.href.lastIndexOf("/"));return b+"/"+a}return(new java.io.File(a)).toURL().toString()+""},a.timer=function(a,b){var c=!0,d=new java.lang.Thread(new java.lang.Runnable({run:function(){while(c)java.lang.Thread.currentThread().sleep(b),a()}}));this.start=function(){d.start()},this.stop=function(){c=!1}},a.javaEnabled=!0,a.runAsync=function(b){a.debug("running async"),(new java.lang.Thread(new java.lang.Runnable({run:b}))).start()},a.writeToFile=function(b,c){a.debug("writing text to url : "+c);var d=new java.io.FileWriter(new java.io.File(new java.net.URI(c.toString())));d.write(b,0,b.length),d.flush(),d.close()},a.writeToTempFile=function(b,c){a.debug("writing text to temp url : "+c);var d=java.io.File.createTempFile("envjs-tmp",c);d.deleteOnExit();var e=new java.io.FileWriter(d);e.write(b,0,b.length),e.close();return d.getAbsolutePath().toString()+""},a.deleteFile=function(a){var b=new java.io.File(new java.net.URI(a));b["delete"]()},a.connection=function(b,c,d){var e=java.net.URL(b.url),f;if(/^file\:/.test(e))if(b.method=="PUT"){var g=d||"";a.writeToFile(g,e)}else b.method=="DELETE"?a.deleteFile(e):(f=e.openConnection(),f.connect());else{f=e.openConnection(),f.setRequestMethod(b.method);for(var h in b.headers)f.addRequestProperty(h+"",b.headers[h]+"");if(d&&d.length&&d.length>0){if(b.method=="PUT"){f.setDoOutput(!0);var i=f.getOutputStream(),j=(new java.lang.String(d)).getBytes("UTF-8");i.write(j,0,j.length),i.close()}}else f.connect();var k=f.getHeaderFields().size();for(var l=0;l-1&&(b.prefix=a.substring(0,c),b.localName=a.substring(c+1,a.length));return b}function __parseNSName__(a){var b=new Object;b.prefix=a,b.namespaceName="";var c=a.indexOf(":");c>-1&&(b.prefix=a.substring(0,c),b.namespaceName=a.substring(c+1,a.length));return b}function __isValidString__(a){return a.search(re_invalidStringChars)<0}function __isValidName__(a){return a.match(re_validName)}function __isIdDeclaration__(a){return a.toLowerCase()=="id"}function __isNamespaceDeclaration__(a){return a.indexOf("xmlns")>-1}function __parseLoop__(a,b,c){var d,e,f,g,h=b,i=0,j=[],k=[];if(a.namespaceAware){var l=b.createNamespace("");l.value="http://www.w3.org/2000/xmlns/",b._namespaces.setNamedItem(l)}while(!0){d=c.next();if(d==XMLP._ELM_B){var m=c.getName();m=trim(m,!0,!0),m.toLowerCase()=="script"&&(c.replaceEntities=!1);if(!a.namespaceAware){e=b.createElement(c.getName());for(var n=0;n0){var q=b.createTextNode(p);h.appendChild(q),d==XMLP._ENTITY?j[j.length]=q:k[k.length]=q}}else if(d==XMLP._PI)h.appendChild(b.createProcessingInstruction(c.getName(),c.getContent().substring(c.getContentBegin(),c.getContentEnd())));else if(d==XMLP._CDATA)p=c.getContent().substring(c.getContentBegin(),c.getContentEnd()),a.preserveWhiteSpace||(p=trim(p,!0,!0),p.replace(/ +/g," ")),p.length>0&&h.appendChild(b.createCDATASection(p));else if(d==XMLP._COMMENT){var p=c.getContent().substring(c.getContentBegin(),c.getContentEnd());a.preserveWhiteSpace||(p=trim(p,!0,!0),p.replace(/ +/g," ")),p.length>0&&h.appendChild(b.createComment(p))}else if(d!=XMLP._DTD){if(d==XMLP._ERROR){$error("Fatal Error: "+c.getContent()+"\nLine: "+c.getLineNumber()+"\nColumn: "+c.getColumnNumber()+"\n");throw new DOMException(DOMException.SYNTAX_ERR)}if(d==XMLP._NONE)break}}for(var n=0;n").replace(unquotRegEx,'"').replace(unaposRegEx,"'");return a}function __escapeXML__(a){a=a.replace(escAmpRegEx,"&").replace(escLtRegEx,"<").replace(escGtRegEx,">").replace(quotRegEx,""").replace(aposRegEx,"'");return a}function isEmpty(a){return a==null||a.length==0}function __setArray__(a,b){a.length=0,Array.prototype.push.apply(a,b)}function trim(a){return(a||"").replace(/^\s+|\s+$/g,"")}function __extend__(a,b){for(var c in b){var d=b.__lookupGetter__(c),e=b.__lookupSetter__(c);d||e?(d&&a.__defineGetter__(c,d),e&&a.__defineSetter__(c,e)):a[c]=b[c]}return a}var $log=$env.log,$debug=$env.debug,$info=$env.info,$warn=$env.warn,$error=$env.error,$version="0.1",$revision="0.0.0.0",$closed=!1,$defaultStatus="Done",$event=null,$frames=[],$innerHeight=600,$innerWidth=800,$name="Resig Env Browser",$opener,$outerHeight=$innerHeight,$outerWidth=$innerWidth,$pageXOffset=0,$pageYOffset=0,$parent,$screenX=0,$screenY=0,$screenLeft=$screenX,$screenTop=$screenY,$self,$status="",$top,$window=$w;$debug("Initializing Window."),__extend__($w,{get closed(){return $closed},get defaultStatus(){return $defaultStatus},set defaultStatus(a){$defaultStatus=a},get event(){return $event},get frames(){return $frames},get innerHeight(){return $innerHeight},get innerWidth(){return $innerWidth},get clientHeight(){return $innerHeight},get clientWidth(){return $innerWidth},get name(){return $name},get opener(){return $opener},get outerHeight(){return $outerHeight},get outerWidth(){return $outerWidth},get pageXOffest(){return $pageXOffset},get pageYOffset(){return $pageYOffset},get parent(){return $parent},get screenLeft(){return $screenLeft},get screenTop(){return $screenTop},get screenX(){return $screenX},get screenY(){return $screenY},get self(){return $self},get status(){return $status},set status(a){$status=a},get top(){return $top||$window},get window(){return $window}}),$w.open=function(a,b,c,d){},$w.close=function(){},$debug("Defining NodeList");var DOMNodeList=function(a,b){this.length=0,this.parentNode=b,this.ownerDocument=a,this._readonly=!1,__setArray__(this,[])};__extend__(DOMNodeList.prototype,{item:function(a){var b=null;a>=0&&a0&&this[b-1].nodeType==DOMNode.TEXT_NODE?a+=" "+this[b].xml:a+=this[b].xml);return a},toArray:function(){var a=[];for(var b=0;b0?Array.prototype.join.apply(this,[", "]):"Empty NodeList")+" ]"}});var __findItemIndex__=function(a,b){var c=-1;if(b>-1)for(var d=0;d=0&&c=0&&c-1&&(c=a[b],Array.prototype.splice.apply(a,[b,1]));return c},__appendChild__=function(a,b){b.nodeType==DOMNode.DOCUMENT_FRAGMENT_NODE?Array.prototype.push.apply(a,b.childNodes.toArray()):Array.prototype.push.apply(a,[b])},__cloneNodes__=function(a,b,c){var d=new DOMNodeList(a.ownerDocument,c);for(var e=0;e-1&&(b=this[c]);return b},setNamedItem:function(a){if(__ownerDocument__(this).implementation.errorChecking){if(this.ownerDocument!=a.ownerDocument)throw new DOMException(DOMException.WRONG_DOCUMENT_ERR);if(this._readonly||this.parentNode&&this.parentNode._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(a.ownerElement&&a.ownerElement!=this.parentNode)throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR)}var b=__findNamedItemIndex__(this,a.name),c=null;if(b>-1){c=this[b];if(__ownerDocument__(this).implementation.errorChecking&&c._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);this[b]=a,this[a.name]=a}else Array.prototype.push.apply(this,[a]),this[a.name]=a;a.ownerElement=this.parentNode;return c},removeNamedItem:function(a){var b=null;if(__ownerDocument__(this).implementation.errorChecking&&(this._readonly||this.parentNode&&this.parentNode._readonly))throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);var c=__findNamedItemIndex__(this,a);if(__ownerDocument__(this).implementation.errorChecking&&c<0)throw new DOMException(DOMException.NOT_FOUND_ERR);var d=this[c];if(__ownerDocument__(this).implementation.errorChecking&&d._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);return __removeChild__(this,c)},getNamedItemNS:function(a,b){var c=null,d=__findNamedItemNSIndex__(this,a,b);d>-1&&(c=this[d]);return c},setNamedItemNS:function(a){if(__ownerDocument__(this).implementation.errorChecking){if(this._readonly||this.parentNode&&this.parentNode._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(__ownerDocument__(this)!=__ownerDocument__(a))throw new DOMException(DOMException.WRONG_DOCUMENT_ERR);if(a.ownerElement&&a.ownerElement!=this.parentNode)throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR)}var b=__findNamedItemNSIndex__(this,a.namespaceURI,a.localName),c=null;if(b>-1){c=this[b];if(__ownerDocument__(this).implementation.errorChecking&&c._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);this[b]=a}else Array.prototype.push.apply(this,[a]);a.ownerElement=this.parentNode;return c},removeNamedItemNS:function(a,b){var c=null;if(__ownerDocument__(this).implementation.errorChecking&&(this._readonly||this.parentNode&&this.parentNode._readonly))throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);var d=__findNamedItemNSIndex__(this,a,b);if(__ownerDocument__(this).implementation.errorChecking&&d<0)throw new DOMException(DOMException.NOT_FOUND_ERR);var e=this[d];if(__ownerDocument__(this).implementation.errorChecking&&e._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);return __removeChild__(this,d)},get xml(){var a="";for(var b=0;b0&&(a+=this[this.length-1].xml);return a}});var __findNamedItemIndex__=function(a,b,c){var d=-1;for(var e=0;e-1&&(c=!0);return c},__hasAttributeNS__=function(a,b,c){var d=!1,e=__findNamedItemNSIndex__(a,b,c);e>-1&&(d=!0);return d},__cloneNamedNodes__=function(a,b,c){var d=c?new DOMNamespaceNodeMap(a.ownerDocument,b):new DOMNamedNodeMap(a.ownerDocument,b);for(var e=0;e0){for(var f=0;f0&&(c?c.nextSibling=a.childNodes[0]:this.firstChild=a.childNodes[0],a.childNodes[0].previousSibling=c,a.childNodes[a.childNodes.length-1].nextSibling=b):(c?c.nextSibling=a:this.firstChild=a,a.previousSibling=c,a.nextSibling=b);return a},replaceChild:function(a,b){var c=null;if(a==null||b==null)return b;if(__ownerDocument__(this).implementation.errorChecking){if(this._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(__ownerDocument__(this)!=__ownerDocument__(a))throw new DOMException(DOMException.WRONG_DOCUMENT_ERR);if(__isAncestor__(this,a))throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR)}var d=__findItemIndex__(this.childNodes,b._id);if(__ownerDocument__(this).implementation.errorChecking&&d<0)throw new DOMException(DOMException.NOT_FOUND_ERR);var e=a.parentNode;e&&e.removeChild(a),c=__replaceChild__(this.childNodes,a,d);if(a.nodeType==DOMNode.DOCUMENT_FRAGMENT_NODE){if(a.childNodes.length>0){for(var f=0;f0){for(var c=0;c0},cloneNode:function(a){try{return __ownerDocument__(this).importNode(this,a)}catch(b){return null}},normalize:function(){var a,b=new DOMNodeList;if(this.nodeType==DOMNode.ELEMENT_NODE||this.nodeType==DOMNode.DOCUMENT_NODE){var c=null;for(var d=0;df&&2;return c}});var __getElementsByTagNameRecursive__=function(a,b,c){if(a.nodeType==DOMNode.ELEMENT_NODE||a.nodeType==DOMNode.DOCUMENT_NODE){a.nodeType!==DOMNode.DOCUMENT_NODE&&(a.nodeName.toUpperCase()==b.toUpperCase()||b=="*")&&__appendChild__(c,a);for(var d=0;dthis.data.length||b<0))throw new DOMException(DOMException.INDEX_SIZE_ERR);!b||a+b>this.data.length?this.data=this.data.substring(0,a):this.data=this.data.substring(0,a).concat(this.data.substring(a+b))}},insertData:function(a,b){if(__ownerDocument__(this).implementation.errorChecking&&this._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(this.data){if(__ownerDocument__(this).implementation.errorChecking&&(a<0||a>this.data.length))throw new DOMException(DOMException.INDEX_SIZE_ERR);this.data=this.data.substring(0,a).concat(b,this.data.substring(a))}else{if(__ownerDocument__(this).implementation.errorChecking&&a!=0)throw new DOMException(DOMException.INDEX_SIZE_ERR);this.data=b}},replaceData:function(a,b,c){if(__ownerDocument__(this).implementation.errorChecking&&this._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(this.data){if(__ownerDocument__(this).implementation.errorChecking&&(a<0||a>this.data.length||b<0))throw new DOMException(DOMException.INDEX_SIZE_ERR);this.data=this.data.substring(0,a).concat(c,this.data.substring(a+b))}else this.data=c},substringData:function(a,b){var c=null;if(this.data){if(__ownerDocument__(this).implementation.errorChecking&&(a<0||a>this.data.length||b<0))throw new DOMException(DOMException.INDEX_SIZE_ERR);b?c=this.data.substring(a,a+b):c=this.data.substring(a)}return c}}),$w.CharacterData=DOMCharacterData,$debug("Defining Text");var DOMText=function(a){this.DOMCharacterData=DOMCharacterData,this.DOMCharacterData(a),this.nodeName="#text"};DOMText.prototype=new DOMCharacterData,__extend__(DOMText.prototype,{splitText:function(a){var b,c;if(__ownerDocument__(this).implementation.errorChecking){if(this._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(a<0||a>this.data.length)throw new DOMException(DOMException.INDEX_SIZE_ERR)}this.parentNode&&(b=this.substringData(a),c=__ownerDocument__(this).createTextNode(b),this.nextSibling?this.parentNode.insertBefore(c,this.nextSibling):this.parentNode.appendChild(c),this.deleteData(a));return c},get nodeType(){return DOMNode.TEXT_NODE},get xml(){return __escapeXML__(""+this.nodeValue)},toString:function(){return"Text #"+this._id}}),$w.Text=DOMText,$debug("Defining CDATASection");var DOMCDATASection=function(a){this.DOMText=DOMText,this.DOMText(a),this.nodeName="#cdata-section"};DOMCDATASection.prototype=new DOMText,__extend__(DOMCDATASection.prototype,{get nodeType(){return DOMNode.CDATA_SECTION_NODE},get xml(){return""},toString:function(){return"CDATA #"+this._id}}),$w.CDATASection=DOMCDATASection,$debug("Defining Comment");var DOMComment=function(a){this.DOMCharacterData=DOMCharacterData,this.DOMCharacterData(a),this.nodeName="#comment"};DOMComment.prototype=new DOMCharacterData,__extend__(DOMComment.prototype,{get nodeType(){return DOMNode.COMMENT_NODE},get xml(){return""},toString:function(){return"Comment #"+this._id}}),$w.Comment=DOMComment,$debug("Defining DocumentType");var DOMDocumentType=function(){$error("DOMDocumentType.constructor(): Not Implemented")};$w.DocumentType=DOMDocumentType,$debug("Defining Attr");var DOMAttr=function(a){this.DOMNode=DOMNode,this.DOMNode(a),this.ownerElement=null};DOMAttr.prototype=new DOMNode,__extend__(DOMAttr.prototype,{get name(){return this.nodeName},set name(a){this.nodeName=a},get value(){return this.nodeValue},set value(a){if(__ownerDocument__(this).implementation.errorChecking&&this._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);this.nodeValue=a},get specified(){return this.value.length>0},get nodeType(){return DOMNode.ATTRIBUTE_NODE},get xml(){return this.nodeName+'="'+__escapeXML__(this.nodeValue)+'" '},toString:function(){return"Attr #"+this._id+" "+this.name}}),$w.Attr=DOMAttr,$debug("Defining Element");var DOMElement=function(a){this.DOMNode=DOMNode,this.DOMNode(a),this.id=""};DOMElement.prototype=new DOMNode,__extend__(DOMElement.prototype,{get tagName(){return this.nodeName},set tagName(a){this.nodeName=a},addEventListener:function(){window.addEventListener.apply(this,arguments)},removeEventListener:function(){window.removeEventListener.apply(this,arguments)},dispatchEvent:function(){window.dispatchEvent.apply(this,arguments)},getAttribute:function(a){var b=null,c=this.attributes.getNamedItem(a);c&&(b=c.value);return b},setAttribute:function(a,b){var c=this.attributes.getNamedItem(a),b=b+"";if(__ownerDocument__(this)){c||(c=__ownerDocument__(this).createAttribute(a));if(__ownerDocument__(this).implementation.errorChecking){if(c._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(!__isValidString__(b))throw new DOMException(DOMException.INVALID_CHARACTER_ERR)}!__isIdDeclaration__(a),c.value=b,this.attributes.setNamedItem(c)}},removeAttribute:function removeAttribute(a){return this.attributes.removeNamedItem(a)},getAttributeNode:function getAttributeNode(a){return this.attributes.getNamedItem(a)},setAttributeNode:function(a){__isIdDeclaration__(a.name)&&(this.id=a.value);return this.attributes.setNamedItem(a)},removeAttributeNode:function(a){if(__ownerDocument__(this).implementation.errorChecking&&a._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);var b=this.attributes._findItemIndex(a._id);if(__ownerDocument__(this).implementation.errorChecking&&b<0)throw new DOMException(DOMException.NOT_FOUND_ERR);return this.attributes._removeChild(b)},getAttributeNS:function(a,b){var c="",d=this.attributes.getNamedItemNS(a,b);d&&(c=d.value);return c},setAttributeNS:function(a,b,c){var d=this.attributes.getNamedItem(a,b);d||(d=__ownerDocument__(this).createAttributeNS(a,b));var c=c+"";if(__ownerDocument__(this).implementation.errorChecking){if(d._readonly)throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);if(!__isValidNamespace__(a,b))throw new DOMException(DOMException.NAMESPACE_ERR);if(!__isValidString__(c))throw new DOMException(DOMException.INVALID_CHARACTER_ERR)}__isIdDeclaration__(name)&&(this.id=c),d.value=c,d.nodeValue=c,this.attributes.setNamedItemNS(d)},removeAttributeNS:function(a,b){return this.attributes.removeNamedItemNS(a,b)},getAttributeNodeNS:function(a,b){return this.attributes.getNamedItemNS(a,b)},setAttributeNodeNS:function(a){a.prefix==""&&__isIdDeclaration__(a.name)&&(this.id=a.value+"");return this.attributes.setNamedItemNS(a)},hasAttribute:function(a){return __hasAttribute__(this.attributes,a)},hasAttributeNS:function(a,b){return __hasAttributeNS__(this.attributes,a,b)},get nodeType(){return DOMNode.ELEMENT_NODE},get xml(){var a="",b=this._namespaces.xml;b.length>0&&(b=" "+b);var c=this.attributes.xml;c.length>0&&(c=" "+c),a+="<"+this.nodeName.toLowerCase()+b+c+">",a+=this.childNodes.xml,a+="";return a},toString:function(){return"Element #"+this._id+" "+this.tagName+(this.id?" => "+this.id:"")}}),$w.Element=DOMElement;var DOMException=function(a){this.code=a};DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,$debug("Defining DocumentFragment");var DOMDocumentFragment=function(a){this.DOMNode=DOMNode,this.DOMNode(a),this.nodeName="#document-fragment"};DOMDocumentFragment.prototype=new DOMNode,__extend__(DOMDocumentFragment.prototype,{get nodeType(){return DOMNode.DOCUMENT_FRAGMENT_NODE},get xml(){var a="",b=this.childNodes.length;for(var c=0;c"},toString:function(){return"ProcessingInstruction #"+this._id}}),$w.ProcessesingInstruction=DOMProcessingInstruction,$debug("Defining DOMParser");var DOMParser=function(){};__extend__(DOMParser.prototype,{parseFromString:function(a){return document.implementation.createDocument().loadXML(a)}}),$debug("Initializing Internal DOMParser."),$domparser=new DOMParser,$w.DOMParser=DOMParser;var whitespace="\n\r\t ",XMLP=function(a){a=SAXStrings.replace(a,null,null,"\r\n","\n"),a=SAXStrings.replace(a,null,null,"\r","\n"),this.m_xml=a,this.m_iP=0,this.m_iState=XMLP._STATE_PROLOG,this.m_stack=new Stack,this._clearAttributes(),this.replaceEntities=!0};XMLP._NONE=0,XMLP._ELM_B=1,XMLP._ELM_E=2,XMLP._ELM_EMP=3,XMLP._ATT=4,XMLP._TEXT=5,XMLP._ENTITY=6,XMLP._PI=7,XMLP._CDATA=8,XMLP._COMMENT=9,XMLP._DTD=10,XMLP._ERROR=11,XMLP._CONT_XML=0,XMLP._CONT_ALT=1,XMLP._ATT_NAME=0,XMLP._ATT_VAL=1,XMLP._STATE_PROLOG=1,XMLP._STATE_DOCUMENT=2,XMLP._STATE_MISC=3,XMLP._errs=[],XMLP._errs[XMLP.ERR_CLOSE_PI=0]="PI: missing closing sequence",XMLP._errs[XMLP.ERR_CLOSE_DTD=1]="DTD: missing closing sequence",XMLP._errs[XMLP.ERR_CLOSE_COMMENT=2]="Comment: missing closing sequence",XMLP._errs[XMLP.ERR_CLOSE_CDATA=3]="CDATA: missing closing sequence",XMLP._errs[XMLP.ERR_CLOSE_ELM=4]="Element: missing closing sequence",XMLP._errs[XMLP.ERR_CLOSE_ENTITY=5]="Entity: missing closing sequence",XMLP._errs[XMLP.ERR_PI_TARGET=6]="PI: target is required",XMLP._errs[XMLP.ERR_ELM_EMPTY=7]="Element: cannot be both empty and closing",XMLP._errs[XMLP.ERR_ELM_NAME=8]='Element: name must immediatly follow "<"',XMLP._errs[XMLP.ERR_ELM_LT_NAME=9]='Element: "<" not allowed in element names',XMLP._errs[XMLP.ERR_ATT_VALUES=10]="Attribute: values are required and must be in quotes",XMLP._errs[XMLP.ERR_ATT_LT_NAME=11]='Element: "<" not allowed in attribute names',XMLP._errs[XMLP.ERR_ATT_LT_VALUE=12]='Attribute: "<" not allowed in attribute values',XMLP._errs[XMLP.ERR_ATT_DUP=13]="Attribute: duplicate attributes not allowed",XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN=14]="Entity: unknown entity",XMLP._errs[XMLP.ERR_INFINITELOOP=15]="Infininte loop",XMLP._errs[XMLP.ERR_DOC_STRUCTURE=16]="Document: only comments, processing instructions, or whitespace allowed outside of document element",XMLP._errs[XMLP.ERR_ELM_NESTING=17]="Element: must be nested correctly",XMLP.prototype._addAttribute=function(a,b){this.m_atts[this.m_atts.length]=[a,b]},XMLP.prototype._checkStructure=function(a){if(XMLP._STATE_PROLOG==this.m_iState){if(XMLP._TEXT==a||XMLP._ENTITY==a)if(SAXStrings.indexOfNonWhitespace(this.getContent(),this.getContentBegin(),this.getContentEnd())!=-1)return this._setErr(XMLP.ERR_DOC_STRUCTURE);if(XMLP._ELM_B==a||XMLP._ELM_EMP==a)this.m_iState=XMLP._STATE_DOCUMENT}if(XMLP._STATE_DOCUMENT==this.m_iState){(XMLP._ELM_B==a||XMLP._ELM_EMP==a)&&this.m_stack.push(this.getName());if(XMLP._ELM_E==a||XMLP._ELM_EMP==a){var b=this.m_stack.pop();if(b==null||b!=this.getName())return this._setErr(XMLP.ERR_ELM_NESTING)}if(this.m_stack.count()==0){this.m_iState=XMLP._STATE_MISC;return a}}if(XMLP._STATE_MISC==this.m_iState){if(XMLP._ELM_B==a||XMLP._ELM_E==a||XMLP._ELM_EMP==a||XMLP.EVT_DTD==a)return this._setErr(XMLP.ERR_DOC_STRUCTURE);if(XMLP._TEXT==a||XMLP._ENTITY==a)if(SAXStrings.indexOfNonWhitespace(this.getContent(),this.getContentBegin(),this.getContentEnd())!=-1)return this._setErr(XMLP.ERR_DOC_STRUCTURE)}return a},XMLP.prototype._clearAttributes=function(){this.m_atts=[]},XMLP.prototype._findAttributeIndex=function(a){for(var b=0;b=this.m_atts.length?null:this.m_atts[a][XMLP._ATT_NAME]},XMLP.prototype.getAttributeValue=function(a){return a<0||a>=this.m_atts.length?null:__unescapeXML__(this.m_atts[a][XMLP._ATT_VAL])},XMLP.prototype.getAttributeValueByName=function(a){return this.getAttributeValue(this._findAttributeIndex(a))},XMLP.prototype.getColumnNumber=function(){return SAXStrings.getColumnNumber(this.m_xml,this.m_iP)},XMLP.prototype.getContent=function(){return this.m_cSrc==XMLP._CONT_XML?this.m_xml:this.m_cAlt},XMLP.prototype.getContentBegin=function(){return this.m_cB},XMLP.prototype.getContentEnd=function(){return this.m_cE},XMLP.prototype.getLineNumber=function(){return SAXStrings.getLineNumber(this.m_xml,this.m_iP)},XMLP.prototype.getName=function(){return this.m_name},XMLP.prototype.next=function(){return this._checkStructure(this._parse())},XMLP.prototype.appendFragment=function(a){var b=this.m_xml.slice(0,this.m_iP),c=this.m_xml.slice(this.m_iP);this.m_xml=b+a+c},XMLP.prototype._parse=function(){if(this.m_iP==this.m_xml.length)return XMLP._NONE;if(this.m_iP!=this.m_xml.indexOf("<",this.m_iP))return this.m_iP==this.m_xml.indexOf("&",this.m_iP)?this._parseEntity(this.m_iP+1):this._parseText(this.m_iP);if(this.m_xml.charAt(this.m_iP+1)=="?")return this._parsePI(this.m_iP+2);if(this.m_xml.charAt(this.m_iP+1)!="!")return this._parseElement(this.m_iP+1);if(this.m_xml.charAt(this.m_iP+2)=="D")return this._parseDTD(this.m_iP+9);if(this.m_xml.charAt(this.m_iP+2)=="-")return this._parseComment(this.m_iP+4);if(this.m_xml.charAt(this.m_iP+2)=="[")return this._parseCDATA(this.m_iP+9)},XMLP.prototype._parseAttribute=function(a,b){var c,d,e,f,g,h,i,j;this.m_cAlt="",c=SAXStrings.indexOfNonWhitespace(this.m_xml,a,b);if(c==-1||c>=b)return c;e=this.m_xml.indexOf("=",c);if(e==-1||e>b)return this._setErr(XMLP.ERR_ATT_VALUES);d=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,c,e),f=SAXStrings.indexOfNonWhitespace(this.m_xml,e+1,b);if(f==-1||f>b)return this._setErr(XMLP.ERR_ATT_VALUES);h=this.m_xml.charAt(f);if(_SAXStrings.QUOTES.indexOf(h)==-1)return this._setErr(XMLP.ERR_ATT_VALUES);g=this.m_xml.indexOf(h,f+1);if(g==-1||g>b)return this._setErr(XMLP.ERR_ATT_VALUES);i=this.m_xml.substring(c,d+1),j=this.m_xml.substring(f+1,g);if(i.indexOf("<")!=-1)return this._setErr(XMLP.ERR_ATT_LT_NAME);if(j.indexOf("<")!=-1)return this._setErr(XMLP.ERR_ATT_LT_VALUE);j=SAXStrings.replace(j,null,null,"\n"," "),j=SAXStrings.replace(j,null,null,"\t"," "),iRet=this._replaceEntities(j);if(iRet==XMLP._ERROR)return iRet;j=this.m_cAlt;if(this._findAttributeIndex(i)==-1)this._addAttribute(i,j);else return this._setErr(XMLP.ERR_ATT_DUP);this.m_iP=g+2;return XMLP._ATT},XMLP.prototype._parseCDATA=function(a){var b=this.m_xml.indexOf("]]>",a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_CDATA);this._setContent(XMLP._CONT_XML,a,b),this.m_iP=b+3;return XMLP._CDATA},XMLP.prototype._parseComment=function(a){var b=this.m_xml.indexOf("-->",a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_COMMENT);this._setContent(XMLP._CONT_XML,a,b),this.m_iP=b+3;return XMLP._COMMENT},XMLP.prototype._parseDTD=function(a){var b,c,d,e;b=this.m_xml.indexOf(">",a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_DTD);d=this.m_xml.indexOf("[",a),c=d!=-1&&d":">";while(!0){b=this.m_xml.indexOf(c,a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_DTD);if(this.m_xml.substring(b-1,b+2)!="]]>")break}this.m_iP=b+c.length;return XMLP._DTD},XMLP.prototype._parseElement=function(a){var b,c,d,e,f,g,h;c=b=this.m_xml.indexOf(">",a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_ELM);this.m_xml.charAt(a)=="/"?(f=XMLP._ELM_E,a++):f=XMLP._ELM_B;if(this.m_xml.charAt(b-1)=="/"){if(f==XMLP._ELM_E)return this._setErr(XMLP.ERR_ELM_EMPTY);f=XMLP._ELM_EMP,c--}c=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,a,c),this._clearAttributes(),d=SAXStrings.indexOfWhitespace(this.m_xml,a,c);if(d==-1)d=c+1;else{this.m_iP=d;while(this.m_iP",a);if(b==-1)return this._setErr(XMLP.ERR_CLOSE_PI);c=SAXStrings.indexOfNonWhitespace(this.m_xml,a,b);if(c==-1)return this._setErr(XMLP.ERR_PI_TARGET);d=SAXStrings.indexOfWhitespace(this.m_xml,c,b),d==-1&&(d=b),e=SAXStrings.indexOfNonWhitespace(this.m_xml,d,b),e==-1&&(e=b),f=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,e,b),f==-1&&(f=b-1),this.m_name=this.m_xml.substring(c,d),this._setContent(XMLP._CONT_XML,e,f+1),this.m_iP=b+2;return XMLP._PI},XMLP.prototype._parseText=function(a){var b,c;b=this.m_xml.indexOf("<",a),b==-1&&(b=this.m_xml.length),this.replaceEntities&&(c=this.m_xml.indexOf("&",a),c!=-1&&c<=b&&(b=c)),this._setContent(XMLP._CONT_XML,a,b),this.m_iP=b;return XMLP._TEXT},XMLP.prototype._replaceEntities=function(a,b,c){if(SAXStrings.isEmpty(a))return"";b=b||0,c=c||a.length;var d,e,f="";d=a.indexOf("&",b),e=b;while(d>0&&dc)return this._setErr(XMLP.ERR_CLOSE_ENTITY);iRet=this._replaceEntity(a,d+1,e-1);if(iRet==XMLP._ERROR)return iRet;f+=this.m_cAlt,d=a.indexOf("&",e)}e!=c&&(f+=a.substring(e,c)),this._setContent(XMLP._CONT_ALT,f);return XMLP._ENTITY},XMLP.prototype._replaceEntity=function(a,b,c){if(SAXStrings.isEmpty(a))return-1;b=b||0,c=c||a.length;switch(a.substring(b,c)){case"amp":strEnt="&";break;case"lt":strEnt="<";break;case"gt":strEnt=">";break;case"apos":strEnt="'";break;case"quot":strEnt='"';break;default:if(a.charAt(b)=="#")strEnt=String.fromCharCode(parseInt(a.substring(b+1,c)))+"";else return this._setErr(XMLP.ERR_ENTITY_UNKNOWN)}this._setContent(XMLP._CONT_ALT,strEnt);return XMLP._ENTITY},XMLP.prototype._setContent=function(a){var b=arguments;XMLP._CONT_XML==a?(this.m_cAlt=null,this.m_cB=b[1],this.m_cE=b[2]):(this.m_cAlt=b[1],this.m_cB=0,this.m_cE=b[1].length),this.m_cSrc=a},XMLP.prototype._setErr=function(a){var b=XMLP._errs[a];this.m_cAlt=b,this.m_cB=0,this.m_cE=b.length,this.m_cSrc=XMLP._CONT_ALT;return XMLP._ERROR};var SAXDriver=function(){this.m_hndDoc=null,this.m_hndErr=null,this.m_hndLex=null};SAXDriver.DOC_B=1,SAXDriver.DOC_E=2,SAXDriver.ELM_B=3,SAXDriver.ELM_E=4,SAXDriver.CHARS=5,SAXDriver.PI=6,SAXDriver.CD_B=7,SAXDriver.CD_E=8,SAXDriver.CMNT=9,SAXDriver.DTD_B=10,SAXDriver.DTD_E=11,SAXDriver.prototype.parse=function(a){var b=new XMLP(a);this.m_hndDoc&&this.m_hndDoc.setDocumentLocator&&this.m_hndDoc.setDocumentLocator(this),this.m_parser=b,this.m_bErr=!1,this.m_bErr||this._fireEvent(SAXDriver.DOC_B),this._parseLoop(),this.m_bErr||this._fireEvent(SAXDriver.DOC_E),this.m_xml=null,this.m_iP=0},SAXDriver.prototype.setDocumentHandler=function(a){this.m_hndDoc=a},SAXDriver.prototype.setErrorHandler=function(a){this.m_hndErr=a},SAXDriver.prototype.setLexicalHandler=function(a){this.m_hndLex=a},SAXDriver.prototype.getColumnNumber=function(){return this.m_parser.getColumnNumber()},SAXDriver.prototype.getLineNumber=function(){return this.m_parser.getLineNumber()},SAXDriver.prototype.getMessage=function(){return this.m_strErrMsg},SAXDriver.prototype.getPublicId=function(){return null},SAXDriver.prototype.getSystemId=function(){return null},SAXDriver.prototype.getLength=function(){return this.m_parser.getAttributeCount()},SAXDriver.prototype.getName=function(a){return this.m_parser.getAttributeName(a)},SAXDriver.prototype.getValue=function(a){return this.m_parser.getAttributeValue(a)},SAXDriver.prototype.getValueByName=function(a){return this.m_parser.getAttributeValueByName(a)},SAXDriver.prototype._fireError=function(a){this.m_strErrMsg=a,this.m_bErr=!0,this.m_hndErr&&this.m_hndErr.fatalError&&this.m_hndErr.fatalError(this)},SAXDriver.prototype._fireEvent=function(a){var b,c,d=arguments,e=d.length-1;this.m_bErr||(SAXDriver.DOC_B==a?(c="startDocument",b=this.m_hndDoc):SAXDriver.DOC_E==a?(c="endDocument",b=this.m_hndDoc):SAXDriver.ELM_B==a?(c="startElement",b=this.m_hndDoc):SAXDriver.ELM_E==a?(c="endElement",b=this.m_hndDoc):SAXDriver.CHARS==a?(c="characters",b=this.m_hndDoc):SAXDriver.PI==a?(c="processingInstruction",b=this.m_hndDoc):SAXDriver.CD_B==a?(c="startCDATA",b=this.m_hndLex):SAXDriver.CD_E==a?(c="endCDATA",b=this.m_hndLex):SAXDriver.CMNT==a&&(c="comment",b=this.m_hndLex),b&&b[c]&&(0==e?b[c]():1==e?b[c](d[1]):2==e?b[c](d[1],d[2]):3==e&&b[c](d[1],d[2],d[3])))},SAXDriver.prototype._parseLoop=function(a){var b,a;a=this.m_parser;while(!this.m_bErr){b=a.next();if(b==XMLP._ELM_B)this._fireEvent(SAXDriver.ELM_B,a.getName(),this);else if(b==XMLP._ELM_E)this._fireEvent(SAXDriver.ELM_E,a.getName());else if(b==XMLP._ELM_EMP)this._fireEvent(SAXDriver.ELM_B,a.getName(),this),this._fireEvent(SAXDriver.ELM_E,a.getName());else if(b==XMLP._TEXT)this._fireEvent(SAXDriver.CHARS,a.getContent(),a.getContentBegin(),a.getContentEnd()-a.getContentBegin());else if(b==XMLP._ENTITY)this._fireEvent(SAXDriver.CHARS,a.getContent(),a.getContentBegin(),a.getContentEnd()-a.getContentBegin());else if(b==XMLP._PI)this._fireEvent(SAXDriver.PI,a.getName(),a.getContent().substring(a.getContentBegin(),a.getContentEnd()));else if(b==XMLP._CDATA)this._fireEvent(SAXDriver.CD_B),this._fireEvent(SAXDriver.CHARS,a.getContent(),a.getContentBegin(),a.getContentEnd()-a.getContentBegin()),this._fireEvent(SAXDriver.CD_E);else if(b==XMLP._COMMENT)this._fireEvent(SAXDriver.CMNT,a.getContent(),a.getContentBegin(),a.getContentEnd()-a.getContentBegin());else if(b!=XMLP._DTD)if(b==XMLP._ERROR)this._fireError(a.getContent());else if(b==XMLP._NONE)return}};var _SAXStrings=function(){};_SAXStrings.WHITESPACE=" \t\n\r",_SAXStrings.NONWHITESPACE=/\S/,_SAXStrings.QUOTES="\"'",_SAXStrings.prototype.getColumnNumber=function(a,b){if(a===null||a.length===0)return-1;b=b||a.length;var c=a.substring(0,b).split("\n"),d=c[c.length-1];c.length--;var e=c.join("\n").length;return b-e},_SAXStrings.prototype.getLineNumber=function(a,b){if(a===null||a.length===0)return-1;b=b||a.length;return a.substring(0,b).split("\n").length},_SAXStrings.prototype.indexOfNonWhitespace=function(a,b,c){if(a===null||a.length===0)return-1;b=b||0,c=c||a.length;while(a.charCodeAt(b++)<33);return b>c?-1:b-1},_SAXStrings.prototype.indexOfWhitespace=function(a,b,c){if(a===null||a.length===0)return-1;b=b||0,c=c||a.length;while(a.charCodeAt(b++)>=33);return b>c?-1:b-1},_SAXStrings.prototype.isEmpty=function(a){return a==null||a.length==0},_SAXStrings.prototype.lastIndexOfNonWhitespace=function(a,b,c){if(a===null||a.length===0)return-1;b=b||0,c=c||a.length;while(c>=b&&a.charCodeAt(--c)<33);return c/g,quotRegEx=/"/g,aposRegEx=/'/g,unescAmpRegEx=/&/g,unescLtRegEx=/</g,unescGtRegEx=/>/g,unquotRegEx=/"/g,unaposRegEx=/'/g;$debug("Defining DOMImplementation");var DOMImplementation=function(){this.preserveWhiteSpace=!1,this.namespaceAware=!0,this.errorChecking=!0};__extend__(DOMImplementation.prototype,{hasFeature:function(a,b){var c=!1;a.toLowerCase()=="xml"?c=!b||b=="1.0"||b=="2.0":a.toLowerCase()=="core"&&(c=!b||b=="2.0");return c},createDocumentType:function(a,b,c){return new DOMDocumentType},createDocument:function(a,b,c){return new HTMLDocument($implementation)},translateErrCode:function(a){var b="";switch(a){case DOMException.INDEX_SIZE_ERR:b="INDEX_SIZE_ERR: Index out of bounds";break;case DOMException.DOMSTRING_SIZE_ERR:b="DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a DOMString";break;case DOMException.HIERARCHY_REQUEST_ERR:b="HIERARCHY_REQUEST_ERR: The Node can not be inserted at this location";break;case DOMException.WRONG_DOCUMENT_ERR:b="WRONG_DOCUMENT_ERR: The source and the destination Documents are not the same";break;case DOMException.INVALID_CHARACTER_ERR:b="INVALID_CHARACTER_ERR: The string contains an invalid character";break;case DOMException.NO_DATA_ALLOWED_ERR:b="NO_DATA_ALLOWED_ERR: This Node / NodeList does not support data";break;case DOMException.NO_MODIFICATION_ALLOWED_ERR:b="NO_MODIFICATION_ALLOWED_ERR: This object cannot be modified";break;case DOMException.NOT_FOUND_ERR:b="NOT_FOUND_ERR: The item cannot be found";break;case DOMException.NOT_SUPPORTED_ERR:b="NOT_SUPPORTED_ERR: This implementation does not support function";break;case DOMException.INUSE_ATTRIBUTE_ERR:b="INUSE_ATTRIBUTE_ERR: The Attribute has already been assigned to another Element";break;case DOMException.INVALID_STATE_ERR:b="INVALID_STATE_ERR: The object is no longer usable";break;case DOMException.SYNTAX_ERR:b="SYNTAX_ERR: Syntax error";break;case DOMException.INVALID_MODIFICATION_ERR:b="INVALID_MODIFICATION_ERR: Cannot change the type of the object";break;case DOMException.NAMESPACE_ERR:b="NAMESPACE_ERR: The namespace declaration is incorrect";break;case DOMException.INVALID_ACCESS_ERR:b="INVALID_ACCESS_ERR: The object does not support this function";break;default:b="UNKNOWN: Unknown Exception Code ("+a+")"}return b}});var re_validName=/^[a-zA-Z_:][a-zA-Z0-9\.\-_:]*$/,re_invalidStringChars=/\x01|\x02|\x03|\x04|\x05|\x06|\x07|\x08|\x0B|\x0C|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F|\x7F/;$debug("Initializing document.implementation");var $implementation=new DOMImplementation;$implementation.namespaceAware=!1,$implementation.errorChecking=!1,$debug("Defining Document");var DOMDocument=function(a){this.DOMNode=DOMNode,this.DOMNode(this),this.doctype=null,this.implementation=a,this.documentElement=null,this.nodeName="#document",this._id=0,this._lastId=0,this._parseComplete=!1,this._url="",this.ownerDocument=null,this._performingImportNodeOperation=!1};DOMDocument.prototype=new DOMNode,__extend__(DOMDocument.prototype,{addEventListener:function(){window.addEventListener.apply(this,arguments)},removeEventListener:function(){window.removeEventListener.apply(this,arguments)},attachEvent:function(){window.addEventListener.apply(this,arguments)},detachEvent:function(){window.removeEventListener.apply(this,arguments)},dispatchEvent:function(){window.dispatchEvent.apply(this,arguments)},get styleSheets(){return[]},get all(){return this.getElementsByTagName("*")},loadXML:function(a){var b=new XMLP(a+""),c=new HTMLDocument(this.implementation);this===$document&&($debug("Setting internal window.document"),$document=c);try{__parseLoop__(this.implementation,c,b)}catch(d){$error(d)}c._parseComplete=!0;return c},load:function(a){$debug("Loading url into DOM Document: "+a+" - (Asynch? "+$w.document.async+")");var b,c=this,d=new XMLHttpRequest;d.open("GET",a,$w.document.async),d.onreadystatechange=function(){try{c.loadXML(d.responseText)}catch(b){$error("Error Parsing XML - ",b),c.loadXML("

Parse Error

"+b.toString()+"

"+"")}c._url=a,$info("Sucessfully loaded document at "+a);var e=document.createEvent();e.initEvent("load"),$w.dispatchEvent(e)},d.send()},createEvent:function(a){var b;a==="UIEvents"?b=new UIEvent:a==="MouseEvents"?b=new MouseEvent:b=new Event;return b},createExpression:function(a,b){return new XPathExpression(a,b)},createElement:function(a){if(__ownerDocument__(this).implementation.errorChecking&&!__isValidName__(a))throw new DOMException(DOMException.INVALID_CHARACTER_ERR);var b=new DOMElement(this);b.tagName=a;return b},createDocumentFragment:function(){var a=new DOMDocumentFragment(this);return a},createTextNode:function(a){var b=new DOMText(this);b.data=a;return b},createComment:function(a){var b=new DOMComment(this);b.data=a;return b},createCDATASection:function(a){var b=new DOMCDATASection(this);b.data=a;return b},createProcessingInstruction:function(a,b){if(__ownerDocument__(this).implementation.errorChecking&&!__isValidName__(a))throw new DOMException(DOMException.INVALID_CHARACTER_ERR);var c=new DOMProcessingInstruction(this);c.target=a,c.data=b;return c},createAttribute:function(a){if(__ownerDocument__(this).implementation.errorChecking&&!__isValidName__(a))throw new DOMException(DOMException.INVALID_CHARACTER_ERR);var b=new DOMAttr(this);b.name=a;return b},createElementNS:function(a,b){if(__ownerDocument__(this).implementation.errorChecking){if(!__isValidNamespace__(this,a,b))throw new DOMException(DOMException.NAMESPACE_ERR);if(!__isValidName__(b))throw new DOMException(DOMException.INVALID_CHARACTER_ERR)}var c=new DOMElement(this),d=__parseQName__(b);c.namespaceURI=a,c.prefix=d.prefix,c.localName=d.localName,c.tagName=b;return c},createAttributeNS:function(a,b){if(__ownerDocument__(this).implementation.errorChecking){if(!__isValidNamespace__(this,a,b,!0))throw new DOMException(DOMException.NAMESPACE_ERR);if(!__isValidName__(b))throw new DOMException(DOMException.INVALID_CHARACTER_ERR)}var c=new DOMAttr(this),d=__parseQName__(b);c.namespaceURI=a,c.prefix=d.prefix,c.localName=d.localName,c.name=b,c.nodeValue="";return c},createNamespace:function(a){var b=new DOMNamespace(this),c=__parseQName__(a);b.prefix=c.prefix,b.localName=c.localName,b.name=a,b.nodeValue="";return b},getElementById:function(a){var b=null,c,d=this.all;for(var e=0;e-1&&(e=!1),e&&!d&&(b||(e=!1)),e&&f.prefix==""&&(e=!1)),e&&f.prefix=="xml"&&b!="http://www.w3.org/XML/1998/namespace"&&(e=!1);return e};$w.Document=DOMDocument;var html2dom,html2xml;(function(){function k(a){var b={},c=a.split(",");for(var d=0;d\s]+))?)*)\s*(\/?)>/,b=/^<\/([\w\:\-]+)[^>]*>/,c=/([\w\:\-]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,d=k("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),e=k("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),f=k("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),g=k("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),h=k("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),i=k("script,style"),j=function(j,k){function s(a,b){var c;if(!b)c=0;else for(c=o.length-1;c>=0;c--)if(o[c]==b)break;if(c>=0){for(var d=o.length-1;d>=c;d--)k.end&&k.end(o[d]);o.length=c}}function r(a,b,i,j){if(e[b])while(o.last()&&f[o.last()])s("",o.last());g[b]&&o.last()==b&&s("",b),j=d[b]||!!j,j||o.push(b);if(k.start){var l=[];i.replace(c,function(a,b){var c=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:h[b]?b:"";l.push({name:b,value:c,escaped:c.replace(/(^|[^\\])"/g,'$1\\"')})}),k.start&&k.start(b,l,j)}}var l,m,n,o=[],p=j;o.last=function(){return this[this.length-1]};while(j){m=!0;if(!o.last()||!i[o.last()]){j.indexOf(""),l>=0&&(k.comment&&k.comment(j.substring(4,l)),j=j.substring(l+3),m=!1)):j.indexOf("]*>"),function(a,b){b=b.replace(//g,"$1").replace(//g,"$1"),k.chars&&k.chars(b);return""}),s("",o.last());if(j==p)throw"Parse Error: "+j;p=j}s()};html2xml=function(a){var b="";j(a,{start:function(a,c,d){b+="<"+a;for(var e=0;e"},end:function(a){b+=""},chars:function(a){b+=a},comment:function(a){b+=""}});return b},html2dom=function(a,b){var c=k("html,head,body,title");b?b=b.ownerDocument||b.getOwnerDocument&&b.getOwnerDocument()||b:typeof DOMDocument!="undefined"?b=new DOMDocument:typeof document!="undefined"&&document.implementation&&document.implementation.createDocument?b=document.implementation.createDocument("","",null):typeof ActiveX!="undefined"&&(b=new ActiveXObject("Msxml.DOMDocument"));var d=[],e=b.documentElement||b.getDocumentElement&&b.getDocumentElement(),f;j(a,{start:function(a,c,e){var g;g=b.createElement(a);for(var h in c)g.setAttribute(c[h].name,c[h].value);b.documentElement?f&&f.appendChild&&f.appendChild(g):(b.documentElement=g,b.appendChild(g)),e||(d.push(g),f=g)},end:function(a){d.length-=1,f=d[d.length-1]},chars:function(a){f.appendChild(b.createTextNode(a))},comment:function(a){f.appendChild(b.createComment(a))}});return b}})(),$debug("Defining HTMLDocument");var HTMLDocument=function(a){this.DOMDocument=DOMDocument,this.DOMDocument(a),this.title="",this._refferer="",this._domain,this._open=!1};HTMLDocument.prototype=new DOMDocument,__extend__(HTMLDocument.prototype,{createElement:function(a){if(__ownerDocument__(this).implementation.errorChecking&&!__isValidName__(a))throw new DOMException(DOMException.INVALID_CHARACTER_ERR);a=a.toUpperCase(),a.match(/^A$/)?node=new HTMLAnchorElement(this):a.match(/AREA/)?node=new HTMLAreaElement(this):a.match(/BASE/)?node=new HTMLBaseElement(this):a.match(/BLOCKQUOTE|Q/)?node=new HTMLQuoteElement(this):a.match(/BODY/)?node=new HTMLElement(this):a.match(/BR/)?node=new HTMLElement(this):a.match(/BUTTON/)?node=new HTMLButtonElement(this):a.match(/CAPTION/)?node=new HTMLElement(this):a.match(/COL|COLGROUP/)?node=new HTMLTableColElement(this):a.match(/DEL|INS/)?node=new HTMLModElement(this):a.match(/DIV/)?node=new HTMLElement(this):a.match(/DL/)?node=new HTMLElement(this):a.match(/FIELDSET/)?node=new HTMLFieldSetElement(this):a.match(/FORM/)?node=new HTMLFormElement(this):a.match(/^FRAME$/)?node=new HTMLFrameElement(this):a.match(/FRAMESET/)?node=new HTMLFrameSetElement(this):a.match(/H1|H2|H3|H4|H5|H6/)?node=new HTMLElement(this):a.match(/HEAD/)?node=new HTMLHeadElement(this):a.match(/HR/)?node=new HTMLElement(this):a.match(/HTML/)?node=new HTMLElement(this):a.match(/IFRAME/)?node=new HTMLIFrameElement(this):a.match(/IMG/)?node=new HTMLImageElement(this):a.match(/INPUT/)?node=new HTMLInputElement(this):a.match(/LABEL/)?node=new HTMLLabelElement(this):a.match(/LEGEND/)?node=new HTMLLegendElement(this):a.match(/^LI$/)?node=new HTMLElement(this):a.match(/LINK/)?node=new HTMLLinkElement(this):a.match(/MAP/)?node=new HTMLMapElement(this):a.match(/META/)?node=new HTMLMetaElement(this):a.match(/OBJECT/)?node=new HTMLObjectElement(this):a.match(/OL/)?node=new HTMLElement(this):a.match(/OPTGROUP/)?node=new HTMLOptGroupElement(this):a.match(/OPTION/)?node=new HTMLOptionElement(this):a.match(/^P$/)?node=new HTMLElement(this):a.match(/PARAM/)?node=new HTMLParamElement(this):a.match(/PRE/)?node=new HTMLElement(this):a.match(/SCRIPT/)?node=new HTMLScriptElement(this):a.match(/SELECT/)?node=new HTMLSelectElement(this):a.match(/STYLE/)?node=new HTMLStyleElement(this):a.match(/TABLE/)?node=new HTMLTableElement(this):a.match(/TBODY|TFOOT|THEAD/)?node=new HTMLSectionElement(this):a.match(/TD|TH/)?node=new HTMLTableCellElement(this):a.match(/TEXTAREA/)?node=new HTMLElement(this):a.match(/TITLE/)?node=new HTMLElement(this):a.match(/TR/)?node=new HTMLTableRowElement(this):a.match(/UL/)?node=new HTMLElement(this):node=new HTMLElement(this),node.tagName=a;return node},get anchors(){return new HTMLCollection(this.getElementsByTagName("a"),"Anchor")},get applets(){return new HTMLCollection(this.getElementsByTagName("applet"),"Applet")},get body(){var a=this.getElementsByTagName("body");return a.item(0)},set body(a){return this.replaceNode(this.body,a)},get domain(){return this._domain||window.location.domain},set domain(){return},get forms(){return new HTMLCollection(this.getElementsByTagName("form"),"Form")},get images(){return new HTMLCollection(this.getElementsByTagName("img"),"Image")},get lastModified(){return this._lastModified},get links(){return new HTMLCollection(this.getElementsByTagName("a"),"Link")},get location(){return $w.location},get referrer(){return this._refferer},get URL(){return this._url},close:function(){this._open=!1},getElementsByName:function(a){var b=__extend__([],new DOMNodeList(this,this.documentElement)),c,d=this.all;for(var e=0;e"+a+"
"),c=b.documentElement;while(this.firstChild!=null)this.removeChild(this.firstChild);var d;while(c.firstChild!=null)d=this.importNode(c.removeChild(c.firstChild),!0),this.appendChild(d);b=null},get lang(){return this.getAttribute("lang")||""},set lang(a){return this.setAttribute("lang",a)},get offsetHeight(){return Number(this.style.height.replace("px",""))},get offsetWidth(){return Number(this.style.width.replace("px",""))},offsetLeft:0,offsetRight:0,get offsetParent(){return},set offsetParent(a){return},scrollHeight:0,scrollWidth:0,scrollLeft:0,scrollRight:0,get style(){this.$css2props===null&&(this.$css2props=new CSS2Properties({cssText:this.getAttribute("style")}));return this.$css2props},get title(){return this.getAttribute("title")||""},set title(a){return this.setAttribute("title",a)},get outerHTML(){return this.xml},scrollIntoView:function(){return},onclick:function(a){__eval__(this.getAttribute("onclick")||"")},ondblclick:function(a){__eval__(this.getAttribute("ondblclick")||"")},onkeydown:function(a){__eval__(this.getAttribute("onkeydown")||"")},onkeypress:function(a){__eval__(this.getAttribute("onkeypress")||"")},onkeyup:function(a){__eval__(this.getAttribute("onkeyup")||"")},onmousedown:function(a){__eval__(this.getAttribute("onmousedown")||"")},onmousemove:function(a){__eval__(this.getAttribute("onmousemove")||"")},onmouseout:function(a){__eval__(this.getAttribute("onmouseout")||"")},onmouseover:function(a){__eval__(this.getAttribute("onmouseover")||"")},onmouseup:function(a){__eval__(this.getAttribute("onmouseup")||"")}});var __eval__=function(script){try{eval(script)}catch(e){$error(e)}},__registerEventAttrs__=function(a){a.hasAttribute("onclick")&&a.addEventListener("click",a.onclick),a.hasAttribute("ondblclick")&&a.addEventListener("dblclick",a.onclick),a.hasAttribute("onkeydown")&&a.addEventListener("keydown",a.onclick),a.hasAttribute("onkeypress")&&a.addEventListener("keypress",a.onclick),a.hasAttribute("onkeyup")&&a.addEventListener("keyup",a.onclick),a.hasAttribute("onmousedown")&&a.addEventListener("mousedown",a.onclick),a.hasAttribute("onmousemove")&&a.addEventListener("mousemove",a.onclick),a.hasAttribute("onmouseout")&&a.addEventListener("mouseout",a.onclick),a.hasAttribute("onmouseover")&&a.addEventListener("mouseover",a.onclick),a.hasAttribute("onmouseup")&&a.addEventListener("mouseup",a.onclick);return a},__click__=function(a){var b=new Event({target:a,currentTarget:a});b.initEvent("click"),a.dispatchEvent(b)},__submit__=function(a){var b=new Event({target:a,currentTarget:a});b.initEvent("submit"),a.dispatchEvent(b)},__focus__=function(a){var b=new Event({target:a,currentTarget:a});b.initEvent("focus"),a.dispatchEvent(b)},__blur__=function(a){var b=new Event({target:a,currentTarget:a});b.initEvent("blur"),a.dispatchEvent(b)};$w.HTMLElement=HTMLElement,$debug("Defining HTMLCollection");var HTMLCollection=function(a,b){__setArray__(this,[]);for(var c=0;c=0&&a1?b[1]:""},set hash(a){a=a.indexOf("#")===0?a:"#"+a,this.href=this.protocol+this.host+this.pathname+this.search+a},get host(){return this.hostname+(this.port!=="")?":"+this.port:""},set host(a){this.href=this.protocol+a+this.pathname+this.search+this.hash},get hostname(){var a=b.exec(this.href);return a&&a.length>1?a[1]:""},set hostname(a){this.href=this.protocol+a+(this.port==""?"":":"+this.port)+this.pathname+this.search+this.hash},get pathname(){var a=this.href;a=c.exec(a.substring(a.indexOf(this.hostname)));return a&&a.length>1?a[1]:"/"},set pathname(a){this.href=this.protocol+this.host+a+this.search+this.hash},get port(){var a=d.exec(this.href);return a&&a.length>1?a[1]:""},set port(a){this.href=this.protocol+this.hostname+":"+a+this.pathname+this.search+this.hash},get protocol(){return e.exec(this.href)[0]},set protocol(a){this.href=a+this.host+this.pathname+this.search+this.hash},get search(){var a=f.exec(this.href);return a&&a.length>1?a[1]:""},set search(a){this.href=this.protocol+this.host+this.pathname+a+this.hash}})})(),$w.Anchor=Anchor,$debug("Defining HTMLAreaElement");var HTMLAreaElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLAreaElement.prototype=new HTMLElement,__extend__(HTMLAreaElement.prototype,{get accessKey(){return this.getAttribute("accesskey")},set accessKey(a){this.setAttribute("accesskey",a)},get alt(){return this.getAttribute("alt")},set alt(a){this.setAttribute("alt",a)},get coords(){return this.getAttribute("coords")},set coords(a){this.setAttribute("coords",a)},get href(){return this.getAttribute("href")},set href(a){this.setAttribute("href",a)},get noHref(){return this.hasAttribute("href")},get shape(){return 0},get tabIndex(){return this.getAttribute("tabindex")},set tabIndex(a){this.setAttribute("tabindex",a)},get target(){return this.getAttribute("target")},set target(a){this.setAttribute("target",a)}}),$w.HTMLAreaElement=HTMLAreaElement,$debug("Defining HTMLBaseElement");var HTMLBaseElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLBaseElement.prototype=new HTMLElement,__extend__(HTMLBaseElement.prototype,{get href(){return this.getAttribute("href")},set href(a){this.setAttribute("href",a)},get target(){return this.getAttribute("target")},set target(a){this.setAttribute("target",a)}}),$w.HTMLBaseElement=HTMLBaseElement,$debug("Defining HTMLQuoteElement");var HTMLQuoteElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLQuoteElement.prototype=new HTMLElement,__extend__(HTMLQuoteElement.prototype,{get cite(){return this.getAttribute("cite")},set cite(a){this.setAttribute("cite",a)}}),$w.HTMLQuoteElement=HTMLQuoteElement,$debug("Defining HTMLButtonElement");var HTMLButtonElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLButtonElement.prototype=new HTMLElement,__extend__(HTMLButtonElement.prototype,{get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a},get accessKey(){return this.getAttribute("accesskey")},set accessKey(a){this.setAttribute("accesskey",a)},get tabIndex(){return Number(this.getAttribute("tabindex"))},set tabIndex(a){this.setAttribute("tabindex",Number(a))},get type(){return this.getAttribute("type")},set type(a){this.setAttribute("type",a)},get value(){return this.getAttribute("value")},set value(a){this.setAttribute("value",a)}}),$w.HTMLButtonElement=HTMLButtonElement,$debug("Defining HTMLTableColElement");var HTMLTableColElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLTableColElement.prototype=new HTMLElement,__extend__(HTMLTableColElement.prototype,{get align(){return this.getAttribute("align")},set align(a){this.setAttribute("align",a)},get ch(){return this.getAttribute("ch")},set ch(a){this.setAttribute("ch",a)},get chOff(){return this.getAttribute("ch")},set chOff(a){this.setAttribute("ch",a)},get span(){return this.getAttribute("span")},set span(a){this.setAttribute("span",a)},get vAlign(){return this.getAttribute("valign")},set vAlign(a){this.setAttribute("valign",a)},get width(){return this.getAttribute("width")},set width(a){this.setAttribute("width",a)}}),$w.HTMLTableColElement=HTMLTableColElement,$debug("Defining HTMLModElement");var HTMLModElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLModElement.prototype=new HTMLElement,__extend__(HTMLModElement.prototype,{get cite(){return this.getAttribute("cite")},set cite(a){this.setAttribute("cite",a)},get dateTime(){return this.getAttribute("datetime")},set dateTime(a){this.setAttribute("datetime",a)}}),$w.HTMLModElement=HTMLModElement,$debug("Defining HTMLFieldSetElement");var HTMLFieldSetElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLFieldSetElement.prototype=new HTMLElement,__extend__(HTMLFieldSetElement.prototype,{get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a}}),$w.HTMLFieldSetElement=HTMLFieldSetElement,$debug("Defining HTMLFormElement");var HTMLFormElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLFormElement.prototype=new HTMLElement,__extend__(HTMLFormElement.prototype,{get acceptCharset(){return this.getAttribute("accept-charset")},set acceptCharset(a){this.setAttribute("accept-charset",a)},get action(){return this.getAttribute("action")},set action(a){this.setAttribute("action",a)},get elements(){return this.getElementsByTagName("*")},get enctype(){return this.getAttribute("enctype")},set enctype(a){this.setAttribute("enctype",a)},get length(){return this.elements.length},get method(){return this.getAttribute("method")},set method(a){this.setAttribute("method",method)},get name(){return this.getAttribute("name")||""},set name(a){return this.setAttribute("name",a)},get target(){return this.getAttribute("target")||""},set target(a){return this.setAttribute("target",a)},submit:function(){__submit__(this)},reset:function(){__reset__(this)}}),$w.HTMLFormElement=HTMLFormElement,$debug("Defining HTMLFrameElement");var HTMLFrameElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLFrameElement.prototype=new HTMLElement,__extend__(HTMLFrameElement.prototype,{get frameBorder(){return this.getAttribute("border")||""},set frameBorder(a){this.setAttribute("border",a)},get longDesc(){return this.getAttribute("longdesc")||""},set longDesc(a){this.setAttribute("longdesc",a)},get marginHeight(){return this.getAttribute("marginheight")||""},set marginHeight(a){this.setAttribute("marginheight",a)},get marginWidth(){return this.getAttribute("marginwidth")||""},set marginWidth(a){this.setAttribute("marginwidth",a)},get name(){return this.getAttribute("name")||""},set name(a){this.setAttribute("name",a)},get noResize(){return this.getAttribute("noresize")||""},set noResize(a){this.setAttribute("noresize",a)},get scrolling(){return this.getAttribute("scrolling")||""},set scrolling(a){this.setAttribute("scrolling",a)},get src(){return this.getAttribute("src")||""},set src(a){this.setAttribute("src",a)},get contentDocument(){$debug("getting content document for (i)frame");if(!this._content){this._content=new HTMLDocument($implementation);if(this.src.length>0){$info("Loading frame content from "+this.src);try{this._content.load(this.src)}catch(a){$error("failed to load frame content: from "+this.src,a)}}}return!0}}),$w.HTMLFrameElement=HTMLFrameElement,$debug("Defining HTMLFrameSetElement");var HTMLFrameSetElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLFrameSetElement.prototype=new HTMLElement,__extend__(HTMLFrameSetElement.prototype,{get cols(){return this.getAttribute("cols")},set cols(a){this.setAttribute("cols",a)},get rows(){return this.getAttribute("rows")},set rows(a){this.setAttribute("rows",a)}}),$w.HTMLFrameSetElement=HTMLFrameSetElement,$debug("Defining HTMLHeadElement");var HTMLHeadElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLHeadElement.prototype=new HTMLElement,__extend__(HTMLHeadElement.prototype,{get profile(){return this.getAttribute("profile")},set profile(a){this.setAttribute("profile",a)},appendChild:function(a){var a=HTMLElement.prototype.appendChild.apply(this,[a]);return a},insertBefore:function(a,b){var a=HTMLElement.prototype.insertBefore.apply(this,[a]);return a}});var __evalScript__=function(a){a.nodeType==DOMNode.ELEMENT_NODE&&a.ownerDocument==window.document&&a.nodeName.toUpperCase()=="SCRIPT"&&($debug("loading script via policy. "),$policy.loadScript(a))};$w.HTMLHeadElement=HTMLHeadElement,$debug("Defining HTMLIFrameElement");var HTMLIFrameElement=function(a){this.HTMLFrameElement=HTMLFrameElement,this.HTMLFrameElement(a)};HTMLIFrameElement.prototype=new HTMLFrameElement,__extend__(HTMLIFrameElement.prototype,{get height(){return this.getAttribute("height")||""},set height(a){return this.setAttribute("height",a)},get width(){return this.getAttribute("width")||""},set width(a){return this.setAttribute("width",a)}}),$w.HTMLIFrameElement=HTMLIFrameElement,$debug("Defining HTMLImageElement");var HTMLImageElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLImageElement.prototype=new HTMLElement,__extend__(HTMLImageElement.prototype,{get alt(){return this.getAttribute("alt")},set alt(a){this.setAttribute("alt",a)},get height(){return this.getAttribute("height")},set height(a){this.setAttribute("height",a)},get isMap(){return this.hasAttribute("map")},set useMap(a){this.setAttribute("map",a)},get longDesc(){return this.getAttribute("longdesc")},set longDesc(a){this.setAttribute("longdesc",a)},get name(){return this.getAttribute("name")},set name(a){this.setAttribute("name",a)},get src(){return this.getAttribute("src")},set src(a){this.setAttribute("src",a)},get width(){return this.getAttribute("width")},set width(a){this.setAttribute("width",a)}}),$w.HTMLImageElement=HTMLImageElement,$debug("Defining HTMLInputElement");var HTMLInputElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLInputElement.prototype=new HTMLElement,__extend__(HTMLInputElement.prototype,{get defaultValue(){return this.getAttribute("defaultValue")},set defaultValue(a){this.setAttribute("defaultValue",a)},get defaultChecked(){return this.getAttribute("defaultChecked")},get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a},get accessKey(){return this.getAttribute("accesskey")},set accessKey(a){this.setAttribute("accesskey",a)},get access(){return this.getAttribute("access")},set access(a){this.setAttribute("access",a)},get alt(){return this.getAttribute("alt")},set alt(a){this.setAttribute("alt",a)},get checked(){return this.getAttribute("checked")=="checked"},set checked(a){this.setAttribute("checked",a?"checked":"")},get disabled(){return this.getAttribute("disabled")=="disabled"},set disabled(a){this.setAttribute("disabled",a?"disabled":"")},get maxLength(){return Number(this.getAttribute("maxlength")||"0")},set maxLength(a){this.setAttribute("maxlength",a)},get name(){return this.getAttribute("name")||""},set name(a){this.setAttribute("name",a)},get readOnly(){return this.getAttribute("readonly")=="readonly"},set readOnly(a){this.setAttribute("readonly",a?"readonly":"")},get size(){return this.getAttribute("size")},set size(a){this.setAttribute("size",a)},get src(){return this.getAttribute("src")},set src(a){this.setAttribute("src",a)},get tabIndex(){return Number(this.getAttribute("tabindex"))},set tabIndex(a){this.setAttribute("tabindex",Number(a))},get type(){return this.getAttribute("type")},set type(a){this.setAttribute("type",a)},get useMap(){return this.getAttribute("map")},get value(){return this.getAttribute("value")},set value(a){this.setAttribute("value",a)},blur:function(){__blur__(this)},focus:function(){__focus__(this)},select:function(){__select__(this)},click:function(){__click__(this)}}),$w.HTMLInputElement=HTMLInputElement,$debug("Defining HTMLLabelElement");var HTMLLabelElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLLabelElement.prototype=new HTMLElement,__extend__(HTMLLabelElement.prototype,{get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a},get accessKey(){return this.getAttribute("accesskey")},set accessKey(a){this.setAttribute("accesskey",a)},get htmlFor(){return this.getAttribute("for")},set htmlFor(a){this.setAttribute("for",a)}}),$w.HTMLLabelElement=HTMLLabelElement,$debug("Defining HTMLLegendElement");var HTMLLegendElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLLegendElement.prototype=new HTMLElement,__extend__(HTMLLegendElement.prototype,{get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a},get accessKey(){return this.getAttribute("accesskey")},set accessKey(a){this.setAttribute("accesskey",a)}}),$w.HTMLLegendElement=HTMLLegendElement,$w.__defineGetter__("Link",function(){return function(){throw new Error("Object cannot be created in this context")}}),$debug("Defining HTMLLinkElement");var HTMLLinkElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLLinkElement.prototype=new HTMLElement,__extend__(HTMLLinkElement.prototype,{get disabled(){return this.getAttribute("disabled")},set disabled(a){this.setAttribute("disabled",a)},get charset(){return this.getAttribute("charset")},set charset(a){this.setAttribute("charset",a)},get href(){return this.getAttribute("href")},set href(a){this.setAttribute("href",a)},get hreflang(){return this.getAttribute("hreflang")},set hreflang(a){this.setAttribute("hreflang",a)},get media(){return this.getAttribute("media")},set media(a){this.setAttribute("media",a)},get rel(){return this.getAttribute("rel")},set rel(a){this.setAttribute("rel",a)},get rev(){return this.getAttribute("rev")},set rev(a){this.setAttribute("rev",a)},get target(){return this.getAttribute("target")},set target(a){this.setAttribute("target",a)},get type(){return this.getAttribute("type")},set type(a){this.setAttribute("type",a)}}),$w.HTMLLinkElement=HTMLLinkElement,$debug("Defining HTMLMapElement");var HTMLMapElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLMapElement.prototype=new HTMLElement,__extend__(HTMLMapElement.prototype,{get areas(){return this.getElementsByTagName("area")},get name(){return this.getAttribute("name")},set name(a){this.setAttribute("name",a)}}),$w.HTMLMapElement=HTMLMapElement,$debug("Defining HTMLMetaElement");var HTMLMetaElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLMetaElement.prototype=new HTMLElement,__extend__(HTMLMetaElement.prototype,{get content(){return this.getAttribute("content")},set content(a){this.setAttribute("content",a)},get httpEquiv(){return this.getAttribute("http-equiv")},set httpEquiv(a){this.setAttribute("http-equiv",a)},get name(){return this.getAttribute("name")},set name(a){this.setAttribute("name",a)},get scheme(){return this.getAttribute("scheme")},set scheme(a){this.setAttribute("scheme",a)}}),$w.HTMLMetaElement=HTMLMetaElement,$debug("Defining HTMLObjectElement");var HTMLObjectElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLObjectElement.prototype=new HTMLElement,__extend__(HTMLObjectElement.prototype,{get code(){return this.getAttribute("code")},set code(a){this.setAttribute("code",a)},get archive(){return this.getAttribute("archive")},set archive(a){this.setAttribute("archive",a)},get codeBase(){return this.getAttribute("codebase")},set codeBase(a){this.setAttribute("codebase",a)},get codeType(){return this.getAttribute("codetype")},set codeType(a){this.setAttribute("codetype",a)},get data(){return this.getAttribute("data")},set data(a){this.setAttribute("data",a)},get declare(){return this.getAttribute("declare")},set declare(a){this.setAttribute("declare",a)},get height(){return this.getAttribute("height")},set height(a){this.setAttribute("height",a)},get standby(){return this.getAttribute("standby")},set standby(a){this.setAttribute("standby",a)},get tabIndex(){return this.getAttribute("tabindex")},set tabIndex(a){this.setAttribute("tabindex",a)},get type(){return this.getAttribute("type")},set type(a){this.setAttribute("type",a)},get useMap(){return this.getAttribute("usemap")},set useMap(a){this.setAttribute("usemap",a)},get width(){return this.getAttribute("width")},set width(a){this.setAttribute("width",a)},get contentDocument(){return this.ownerDocument}}),$w.HTMLObjectElement=HTMLObjectElement,$debug("Defining HTMLOptGroupElement");var HTMLOptGroupElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLOptGroupElement.prototype=new HTMLElement,__extend__(HTMLOptGroupElement.prototype,{get disabled(){return this.getAttribute("disabled")},set disabled(a){this.setAttribute("disabled",a)},get label(){return this.getAttribute("label")},set label(a){this.setAttribute("label",a)}}),$w.HTMLOptGroupElement=HTMLOptGroupElement,$debug("Defining HTMLOptionElement");var HTMLOptionElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLOptionElement.prototype=new HTMLElement,__extend__(HTMLOptionElement.prototype,{get form(){var a=this.parent;while(a.nodeName.toLowerCase()!="form")a=a.parent;return a},get defaultSelected(){return this.getAttribute("defaultSelected")},set defaultSelected(a){this.setAttribute("defaultSelected",a)},get text(){return this.nodeValue===null||this.nodeValue===undefined?this.innerHTML:this.nodeValue},get index(){var a=this.parent.childNodes;for(var b;bc)throw new Error("Index > rows.length in call to HTMLTableElement.insertRow");var e=document.createElement("tr");a===-1||a===c?(f=b[b.length-1],f.parentNode.appendChild(e)):b[a].parentNode.insertBefore(e,b[a]);return e},deleteRow:function(a){var b=this.rows[a];b.parentNode.removeChild(b)},get summary(){return this.getAttribute("summary")},set summary(a){this.setAttribute("summary",a)},get align(){return this.getAttribute("align")},set align(a){this.setAttribute("align",a)},get bgColor(){return this.getAttribute("bgColor")},set bgColor(a){return this.setAttribute("bgColor",a)},get cellPadding(){return this.getAttribute("cellPadding")},set cellPadding(a){return this.setAttribute("cellPadding",a)},get cellSpacing(){return this.getAttribute("cellSpacing")},set cellSpacing(a){this.setAttribute("cellSpacing",a)},get frame(){return this.getAttribute("frame")},set frame(a){this.setAttribute("frame",a)},get rules(){return this.getAttribute("rules")},set rules(a){this.setAttribute("rules",a)},get width(){return this.getAttribute("width")},set width(a){this.setAttribute("width",a)}}),$w.HTMLTableElement=HTMLTableElement,$debug("Defining HTMLTableSectionElement");var HTMLTableSectionElement=function(a){this.HTMLElement=HTMLElement,this.HTMLElement(a)};HTMLTableSectionElement.prototype=new HTMLElement,__extend__(HTMLTableSectionElement.prototype,{appendChild:function(a){return a.tagName.match(/TBODY|TFOOT|THEAD/)?this.parentNode.appendChild(a):DOMNode.prototype.appendChild.apply(this,arguments)},get align(){return this.getAttribute("align")},get ch(){return this.getAttribute("ch")},set ch(a){this.setAttribute("ch",a)},set chOff(a){this.setAttribute("chOff",a)},get chOff(a){return this.getAttribute("chOff")},get vAlign(){return this.getAttribute("vAlign")},get rows(){return new HTMLCollection(this.getElementsByTagName("tr"))},insertRow:function(a){if(a===undefined)throw new Error("Index omitted in call to HTMLTableSectionElement.insertRow ");var b=this.rows.length,c=null;if(a>b)throw new Error("Index > rows.length in call to HTMLTableSectionElement.insertRow");var d=document.createElement("tr");if(a===-1||a===b)this.appendChild(d);else{c=this.firstChild;for(var e=0;eb)throw new Error("Index > rows.length in call to HTMLTableRow.insertCell");var d=document.createElement("td");if(a===-1||a===b)this.appendChild(d);else{c=this.firstChild;for(var e=0;e0?"{\n\t"+Array.prototype.join.apply(this,[";\n\t"])+"}\n":""}});var __cssTextToStyles__=function(a,b){var c=[],d,e,f,g,h,i=b.split(";");for(var j=0;j1?a[1]:""},set hash(a){a=a.indexOf("#")===0?a:"#"+a,$location=this.protocol+this.host+this.pathname+this.search+a,setHistory(a,"hash")},get host(){return this.hostname+(this.port!=="")?":"+this.port:""},set host(a){$w.location=this.protocol+a+this.pathname+this.search+this.hash},get hostname(){var a=c.exec(this.href);return a&&a.length>1?a[1]:""},set hostname(a){$w.location=this.protocol+a+(this.port===""?"":":"+this.port)+this.pathname+this.search+this.hash},get href(){return $location},set href(a){$w.location=a},get pathname(){var a=this.href;a=d.exec(a.substring(a.indexOf(this.hostname)));return a&&a.length>1?a[1]:"/"},set pathname(a){$w.location=this.protocol+this.host+a+this.search+this.hash},get port(){var a=e.exec(this.href);return a&&a.length>1?a[1]:""},set port(a){$w.location=this.protocol+this.hostname+":"+a+this.pathname+this.search+this.hash},get protocol(){return f.exec(this.href)[0]},set protocol(a){$w.location=a+this.host+this.pathname+this.search+this.hash},get search(){var a=g.exec(this.href);return a&&a.length>1?a[1]:""},set search(a){$w.location=this.protocol+this.host+this.pathname+a+this.hash},toString:function(){return this.href},reload:function(a){},replace:function(a){}}}),$info("Initializing Window History."),$currentHistoryIndex=0,$history=[],$w.__defineGetter__("history",function(){return{get length(){return $history.length},back:function(a){a?go(-a):go(-1)},forward:function(a){a?go(a):go(1)},go:function(a){typeof a=="number"&&(a=$currentHistoryIndex+a,a>-1&&a<$history.length&&($history[a].location=="hash"?$w.location.hash=$history[a].value:$w.location=$history[a].value,$currentHistoryIndex=a,$history.pop()))}}});var setHistory=function(a,b){$info("adding value to history: "+a),$currentHistoryIndex++,$history.push({location:b||"href",value:a})};$debug("Initializing Window Navigator.");var $appCodeName=$env.appCodeName,$appName=$env.appName;$w.__defineGetter__("navigator",function(){return{get appCodeName(){return $appCodeName},get appName(){return $appName},get appVersion(){return $version+" ("+$w.navigator.platform+"; "+"U; "+$env.os_name+" "+$env.os_arch+" "+$env.os_version+"; "+$env.lang+"; "+"rv:"+$revision+")"},get cookieEnabled(){return!0},get mimeTypes(){return[]},get platform(){return $env.platform},get plugins(){return[]},get userAgent(){return $w.navigator.appCodeName+"/"+$w.navigator.appVersion+" "+$w.navigator.appName},javaEnabled:function(){return $env.javaEnabled}}}),$debug("Initializing Window Timer.");var $timers=[];$w.setTimeout=function(a,b){var c;return c=window.setInterval(function(){a(),window.clearInterval(c)},b)},window.setInterval=function(fn,time){var num=$timers.length+1;if(typeof fn=="string"){var fnstr=fn;fn=function(){eval(fnstr)}}time===0?fn():($debug("Creating timer number "+num),$timers[num]=new $env.timer(fn,time),$timers[num].start());return num},window.clearInterval=window.clearTimeout=function(a){$timers[a]&&($debug("Deleting timer number "+a),$timers[a].stop(),delete $timers[a])},$debug("Initializing Window Event.");var $events=[],$onerror,$onload,$onunload;$w.addEventListener=function(a,b){this.uuid||(this.uuid=$events.length,$events[this.uuid]={}),$events[this.uuid][a]||($events[this.uuid][a]=[]),$events[this.uuid][a].indexOf(b)<0&&$events[this.uuid][a].push(b)},$w.removeEventListener=function(a,b){this.uuid||(this.uuid=$events.length,$events[this.uuid]={}),$events[this.uuid][a]||($events[this.uuid][a]=[]),$events[this.uuid][a]=$events[this.uuid][a].filter(function(a){return a!=b})},$w.dispatchEvent=function(a){$debug("dispatching event "+a.type),$event=a,a.target||(a.target=this),$debug("event target: "+a.target);if(a.type){if(this.uuid&&$events[this.uuid][a.type]){var b=this;$events[this.uuid][a.type].forEach(function(c){$debug("calling event handler "+c+" on target "+b),c.call(b,a)})}this["on"+a.type]&&($debug("calling event handler "+a.type+" on target "+this),this["on"+a.type].call(b,a))}this.parentNode&&this.parentNode.dispatchEvent.call(this.parentNode,a)},$w.__defineGetter__("onerror",function(){return function(){}}),$w.__defineSetter__("onerror",function(a){}),$debug("Initializing Window XMLHttpRequest."),$w.XMLHttpRequest=function(){this.headers={},this.responseHeaders={},$debug("creating xhr")},XMLHttpRequest.prototype={open:function(a,b,c,d,e){this.readyState=1,c===!1?this.async=!1:this.async=!0,this.method=a||"GET",this.url=$env.location(b),this.onreadystatechange()},setRequestHeader:function(a,b){this.headers[a]=b},getResponseHeader:function(a){},send:function(a){function c(){$env.connection(b,function(){var a=null;b.__defineGetter__("responseXML",function(){if(!b.responseText.match(/^\s*0&&(e+=a[f]),a[f]>b&&(b=a[f]),a[f]0?(c=trim(f[0]),d=trim(f[1]),c=="max-age"?a[c]=parseInt(d,10):c=="domain"?domainValid(d)?a.domain=d:a.domain=$w.location.domain:c=="path"?a.path=d:e[c]=d):f[0]=="secure"&&(a[f[0]]=!0);a["max-age"]?a["max-age"]!==0&&(mergeCookie($cookies.persistent,a,e),persistCookies()):mergeCookie($cookies.temporary,a,e)}),document.__defineGetter__("cookie",function(a){var b=[],c});var domainValid=function(a){},mergeCookie=function(a,b,c){var d,e;a[b.domain]||(a[b.domain]={}),a[b.domain][b.path]||(a[b.domain][b.path]={});for(d in c)e=(new Date).getTime(),a[b.domain][b.path][d]={value:c[d],"@env:secure":b.secure,"@env:max-age":b["max-age"],"@env:date-created":e,"@env:expiration":e+b["max-age"]}},persistCookies=function(){},loadCookies=function(){};$info("Loading Cookies");try{loadCookies()}catch(e){}})(window,Envjs)}catch(e){Envjs.error("ERROR LOADING ENV : "+e+"\nLINE SOURCE:\n"+Envjs.lineSource(e))}



© 2015 - 2025 Weber Informatics LLC | Privacy Policy