Skip to content

Instantly share code, notes, and snippets.

@foolip
Created September 16, 2016 22:58
Show Gist options
  • Save foolip/bb1928299e53ffd4f4fa1a38f1f3ce54 to your computer and use it in GitHub Desktop.
Save foolip/bb1928299e53ffd4f4fa1a38f1f3ce54 to your computer and use it in GitHub Desktop.
SELECT * FROM [httparchive:har.2016_09_01_chrome_requests_bodies] WHERE body CONTAINS 'XMLDocument.prototype.load';
This file has been truncated, but you can view the full file.
{"page":"http://www.hyangmusic.com/","url":"http://hyangmusic.com/cart_box/xmlextras.js","body":"//<script>\n//////////////////\n// Helper Stuff //\n//////////////////\n\n// used to find the Automation server name\nfunction getDomDocumentPrefix() {\n\tif (getDomDocumentPrefix.prefix)\n\t\treturn getDomDocumentPrefix.prefix;\n\t\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\t// try to create the objects\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\n\t\t}\n\t\tcatch (ex) {};\n\t}\n\t\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\n\nfunction getXmlHttpPrefix() {\n\tif (getXmlHttpPrefix.prefix)\n\t\treturn getXmlHttpPrefix.prefix;\n\t\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\t// try to create the objects\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\n\t\t}\n\t\tcatch (ex) {};\n\t}\n\t\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\n\n//////////////////////////\n// Start the Real stuff //\n//////////////////////////\n\n\n// XmlHttp factory\nfunction XmlHttp() {}\n\nXmlHttp.create = function () {\n\ttry {\n\t\tif (window.XMLHttpRequest) {\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\t\n\t\t\t// some versions of Moz do not support the readyState property\n\t\t\t// and the onreadystate event so we patch it!\n\t\t\tif (req.readyState == null) {\n\t\t\t\treq.readyState = 1;\n\t\t\t\treq.addEventListener(\"load\", function () {\n\t\t\t\t\treq.readyState = 4;\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\n\t\t\t\t\t\treq.onreadystatechange();\n\t\t\t\t}, false);\n\t\t\t}\n\t\t\t\n\t\t\treturn req;\n\t\t}\n\t\tif (window.ActiveXObject) {\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\n\t\t}\n\t}\n\tcatch (ex) {}\n\t// fell through\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\n};\n\n// XmlDocument factory\nfunction XmlDocument() {}\n\nXmlDocument.create = function () {\n\ttry {\n\t\t// DOM2\n\t\tif (document.implementation && document.implementation.createDocument) {\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\n\t\t\t\n\t\t\t// some versions of Moz do not support the readyState property\n\t\t\t// and the onreadystate event so we patch it!\n\t\t\tif (doc.readyState == null) {\n\t\t\t\tdoc.readyState = 1;\n\t\t\t\tdoc.addEventListener(\"load\", function () {\n\t\t\t\t\tdoc.readyState = 4;\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\n\t\t\t\t\t\tdoc.onreadystatechange();\n\t\t\t\t}, false);\n\t\t\t}\n\t\t\t\n\t\t\treturn doc;\n\t\t}\n\t\tif (window.ActiveXObject)\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\n\t}\n\tcatch (ex) {}\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\n};\n\n// Create the loadXML method and xml getter for Mozilla\nif (window.DOMParser &&\n\twindow.XMLSerializer &&\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\n\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\t//XMLDocument.prototype.loadXML = \n\tDocument.prototype.loadXML = function (s) {\n\t\t\n\t\t// parse the string to a new doc\t\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\n\t\t\n\t\t// remove all initial children\n\t\twhile (this.hasChildNodes())\n\t\t\tthis.removeChild(this.lastChild);\n\t\t\t\n\t\t// insert and import nodes\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\n\t\t}\n\t};\n\t\n\t\n\t/*\n\t * xml getter\n\t *\n\t * This serializes the DOM tree to an XML String\n\t *\n\t * Usage: var sXml = oNode.xml\n\t *\n\t */\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\t/*\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n\t*/\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n}","truncated":"false"}
{"page":"http://www.ims.gov.il/","url":"http://www.ims.gov.il/IMS/JSFunctions/XmlCB.js","body":"\u00ef\u00bb\u00bf//@@@ Cross browser XML impementation\r\n//@@@ Author: Gleyser Denis\r\n//@@@ Tested with IE6.0, Mozilla 2.0, Opera 9.02\r\n/*@@@ public functions interface \r\n xml_CreateDOMFromPath(url) : creates xml dom object and loads remote data\r\n xml_CreateDOMFromXMLString(xmlString) : creates xml dom object and loads xml string (assync = false) \r\n xml_GetDOMFromXMLIsland(XmlIslandId) : gets xml dom object from xml island \r\n@@@ ------------------------------------------------------------ @@@*/\r\n \r\nvar xml_Ver = \"\";\r\ntry{\r\n if(window.ActiveXObject) xml_Ver = \"IE\";\r\nelse if(document.implementation && document.implementation.createDocument) \r\n xml_Ver = \"MZ\";\r\n else xml_Ver = \"\";\r\n}catch(e){\r\n if(document.implementation && document.implementation.createDocument) \r\n xml_Ver = \"MZ\";\r\n else xml_Ver = \"\";\r\n}\r\n\r\n//@@@ iplementation missinj methods and properties for mozilla\r\nif(xml_Ver==\"MZ\"){ //@@@ if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n //@@@ prototying the XMLDocument.loadXML()\r\n XMLDocument.prototype.loadXML = function(strXML) { \r\n var objDOMParser = new DOMParser();\r\n var objDoc = objDOMParser.parseFromString(strXML, \"text/xml\");\r\n while(this.hasChildNodes())this.removeChild(this.lastChild); \r\n for (var i=0; i < objDoc.childNodes.length; i++) { \r\n var objImportedNode = this.importNode(objDoc.childNodes[i], true); \r\n this.appendChild(objImportedNode); \r\n }\r\n }\r\n\r\n //@@@ prototying the Node.xml property\r\n function xml_Node_getXML() { \r\n var objXMLSerializer = new XMLSerializer;\r\n var strXML = objXMLSerializer.serializeToString(this);\r\n return strXML;\r\n }\r\n Node.prototype.__defineGetter__(\"xml\", xml_Node_getXML); \r\n\r\n\r\n //@@@ prototying the XMLDocument.selectNodes()\r\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode){\r\n if(!xNode){xNode = this;} \r\n var oNSResolver = this.createNSResolver(this.documentElement);\r\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\r\n var aResult = [];\r\n for( var i = 0; i < aItems.snapshotLength; i++){\r\n aResult[i] = aItems.snapshotItem(i);\r\n }\r\n return aResult;\r\n }\r\n\r\n //@@@ prototying the Element.selectNodes()\r\n Element.prototype.selectNodes = function(cXPathString){\r\n if(this.ownerDocument.selectNodes){\r\n return this.ownerDocument.selectNodes(cXPathString, this);\r\n }else{\r\n throw \"For XML Elements Only\";\r\n }\r\n }\r\n\r\n //@@@ prototying the XMLDocument.selectSingleNode()\r\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode){\r\n if(!xNode) {xNode = this;} \r\n var xItems = this.selectNodes(cXPathString, xNode);\r\n if(xItems.length > 0){\r\n return xItems[0];\r\n }else{\r\n return null;\r\n }\r\n }\r\n\r\n //@@@ prototying the Element.selectSingleNode()\r\n Element.prototype.selectSingleNode = function(cXPathString){ \r\n if(this.ownerDocument.selectSingleNode){\r\n return this.ownerDocument.selectSingleNode(cXPathString, this);\r\n }else{\r\n throw \"For XML Elements Only\";\r\n }\t \r\n }\r\n \r\n \r\n //@@@ prototying the XMLDocument.transformNodeToObject()\r\n XMLDocument.prototype.transformNodeToObject = function(xslDoc, oResult){\r\n\t\tvar xsltProcessor = new XSLTProcessor();\r\n\t\tif(xsltProcessor.reset){\r\n //@@@ new nsIXSLTProcessor is available\r\n xsltProcessor.importStylesheet(xslDoc);\r\n var newFragment = xsltProcessor.transformToFragment(this, oResult);\r\n oResult.__copyDOM(newFragment);\r\n\t }else{\r\n //@@@ only nsIXSLTProcessorObsolete is available\r\n xsltProcessor.transformDocument(this, xslDoc, oResult, null);\r\n }\t\t\r\n\t}\r\n \r\n \r\n //@@@ prototying the XMLDocument.transformNode()\r\n XMLDocument.prototype.transformNode = function(xslDoc){\r\n\t\tvar out = document.implementation.createDocument(\"\", \"\", null);\r\n\t\tthis.transformNodeToObject(xslDoc, out);\r\n\t\tvar serializer = new XMLSerializer();\r\n\t\tvar str = serializer.serializeToString(out);\t\t\r\n\t\treturn str;\t\t\t\t\t\r\n\t}\r\n\t\r\n \r\n //@@@ prototying the Element.transformNodeToObject()\r\n Element.prototype.transformNodeToObject = function(xslDoc, oResult){\r\n\t\tvar oDoc = document.implementation.createDocument(\"\", \"\", null);\r\n\t\toDoc.__copyDOM(this);\r\n\t\toDoc.transformNodeToObject(xslDoc, oResult);\r\n\t}\r\n\t\r\n \r\n //@@@ prototying the Element.transformNode()\r\n Element.prototype.transformNode = function(xslDoc){\r\n var oDoc = document.implementation.createDocument(\"\", \"\", null);\r\n\t\toDoc.__copyDOM(this);\r\n\t\treturn oDoc.transformNode(xslDoc);\r\n\t}\r\n\t\r\n\t\r\n\tXMLDocument.prototype.__copyDOM = function(oDoc){\r\n\t\t//@@@ clear doom\r\n\t\twhile(this.hasChildNodes())this.removeChild(this.firstChild);\r\n\t\t//@@@ copy\r\n\t\tif(oDoc.nodeType == Node.DOCUMENT_NODE || oDoc.nodeType == Node.DOCUMENT_FRAGMENT_NODE){\r\n var oNodes = oDoc.childNodes;\r\n for(i=0;i<oNodes.length;i++)this.appendChild(this.importNode(oNodes[i], true));\r\n }else if(oDoc.nodeType == Node.ELEMENT_NODE)this.appendChild(this.importNode(oDoc, true));\r\n\t}\r\n}//@@@ end of //@@@ iplementation missinj methods and properties for mozilla \r\n \r\n\r\nfunction xml_CreateDOMFromPath(url){\r\n if(xml_Ver==\"IE\"){\r\n var oXml = new ActiveXObject(\"MSXML2.DomDocument\");\r\n oXml.async = false;\r\n if(url!=null && url!=\"\"){\r\n oXml.load(url);\r\n }\r\n return oXml;\r\n }else if(xml_Ver==\"MZ\"){\r\n try\r\n {\r\n var oXml = document.implementation.createDocument(\"\", \"\", null);\r\n oXml.async = false;\r\n if(url!=null && url!=\"\"){\r\n oXml.load(url);\r\n }\r\n return oXml; \r\n }\r\n catch (ex)\r\n {\r\n var xmlhttp = new window.XMLHttpRequest();\r\n xmlhttp.open(\"GET\",url,false);\r\n xmlhttp.send(null);\r\n var xmlDoc = xmlhttp.responseXML.documentElement;\r\n return xmlDoc;\r\n }\r\n } \r\n}\r\n\r\nfunction xml_CreateDOMFromXMLString(xmlString){\r\n if(xml_Ver==\"IE\"){\r\n var oXml = new ActiveXObject(\"MSXML2.DomDocument\");\r\n oXml.async = false;\r\n if(xmlString!=null && xmlString!=\"\"){\r\n oXml.loadXML(xmlString);\r\n }\r\n return oXml;\r\n }else if(xml_Ver==\"MZ\"){\r\n if(xmlString==null || xmlString==\"\"){\r\n var oXml = document.implementation.createDocument(\"\", \"\", null);\r\n return oXml;\r\n }else{\r\n var objDOMParser = new DOMParser(); \r\n var oXml = objDOMParser.parseFromString(xmlString, \"text/xml\"); \r\n return oXml;\r\n } \r\n }\r\n}\r\n\r\nfunction xml_GetDOMFromXMLIsland(XmlIslandId){\r\n var oIsland = document.getElementById(XmlIslandId);\r\n if(xml_Ver==\"IE\"){\r\n return oIsland.XMLDocument; \r\n }else if(xml_Ver==\"MZ\"){\r\n var oXMLSerializer = new XMLSerializer();\r\n var sXml = oXMLSerializer.serializeToString(oIsland.firstChild); //@@@ upper case for Element Names and Lover case for attributes names problem\r\n return xml_CreateDOMFromXMLString(sXml); \r\n } \r\n} \r\n\r\n\r\n\r\n","truncated":"false"}
{"page":"http://www.kslaw.com/","url":"http://www.kslaw.com/imageserver/plumtree/common/private/js/jsxml/366908/PTXML.js","body":"\r\nPTHTTPTransport = function() {}\n\nPTHTTPTransport.VERSION = '366908';\r\nPTHTTPTransport.CCMODE_QUEUE \t\t= 'queue';\t\t\r\nPTHTTPTransport.CCMODE_ASYNC \t\t= 'async';\t\t\r\nPTHTTPTransport.CCMODE_SYNC \t\t= 'sync';\t\t\r\nPTHTTPTransport.TRANSPORT_TYPE_MSXML\t\t\t= 'MSXML';\r\nPTHTTPTransport.TRANSPORT_TYPE_XMLHTTPREQUEST\t= 'XMLHttpRequest';\r\nPTHTTPTransport.TRANSPORT_TYPE_IFRAME\t\t\t= 'iframe';\r\nPTHTTPTransport.transportType\t\t\t= false;\r\nPTHTTPTransport.transportTypeMSIE\t\t= ''; \r\nPTHTTPTransport._requestInProcess\t\t= false;\r\nPTHTTPTransport._requestQueue \t\t\t= new Array();\r\nPTHTTPTransport._timers\t\t\t\t= new Object();\r\nPTHTTPTransport.getVehicle = function ()\r\n{\r\n\tif (PTHTTPTransport.transportType == PTHTTPTransport.TRANSPORT_TYPE_MSXML)\r\n\t{\r\n\t\treturn new ActiveXObject(PTHTTPTransport.transportTypeMSIE);\r\n\t}\r\n\telse if (PTHTTPTransport.transportType == PTHTTPTransport.TRANSPORT_TYPE_XMLHTTPREQUEST)\r\n\t{\r\n\t\treturn new XMLHttpRequest(); \r\n\t}\r\n\telse if (PTHTTPTransport.transportType == PTHTTPTransport.TRANSPORT_TYPE_IFRAME)\r\n\t{\r\n\t\treturn PTHTTPTransport._iFrameVehicle;\r\n\t}\n}\n\nPTHTTPTransport.invokeRequest = function (request) \r\n{\r\tif (!request || !request.url || request.url == '') { return false; }\r\n\tif (request.concurrencyMode == PTHTTPTransport.CCMODE_QUEUE &&\r\n\t\tPTHTTPTransport._requestInProcess)\r\n\t{\r\n\t\tPTArrayUtil.push(PTHTTPTransport._requestQueue,request);\r\n\t\treturn;\r\n\t}\r\n\tif (request.concurrencyMode == PTHTTPTransport.CCMODE_QUEUE)\r\n\t{\r\n\t\tPTHTTPTransport._requestInProcess = true;\r\n\t}\r\n\tif (window.PT_DEBUG && (PT_DEBUG >= 2))\r\n\t{\r\n\t\tvar start = (new Date()).getTime();\r\n\t\trequest.properties.timerID = 'timer_' + start;\r\n\t\tPTHTTPTransport._timers[request.properties.timerID] = new Object();\r\n\t\tPTHTTPTransport._timers[request.properties.timerID].start = start;\r\n\t}\r\n\tvar requestMethod = (request.className == 'PTHTTPPOSTRequest') ? 'POST' : 'GET';\r\n\tif (PTHTTPTransport.transportType != PTHTTPTransport.TRANSPORT_TYPE_IFRAME)\r\n\t{\t\t\r\n\t\tvar async = (request.concurrencyMode == PTHTTPTransport.CCMODE_SYNC) ? false : true;\r\n\t\tvar vehicle = PTHTTPTransport.getVehicle();\r\n\t\tPTHTTPTransport.vehicle = vehicle;\r\n\t\tvehicle.open(requestMethod, request.url, async);\r\n\t\tvehicle.setRequestHeader(PTHTTPRequest.REQUEST_TYPE_HEADER, request.type);\r\t\tvehicle.setRequestHeader('Referer', window.location); \r\n\t\tfor (var header in request.requestHeaders)\r\n\t\t{\r\n\t\t\tif (typeof request.requestHeaders[header] == 'string' || typeof request.requestHeaders[header] == 'number' || typeof request.requestHeaders[header] == 'boolean')\r\n\t\t\t{\r\n\t\t\t\tvehicle.setRequestHeader(header,request.requestHeaders[header]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ((requestMethod == 'POST') && !request.requestHeaders[PTHTTPRequest.CONTENT_TYPE_HEADER])\r\n\t\t{\r\n\t\t\tvehicle.setRequestHeader(PTHTTPRequest.CONTENT_TYPE_HEADER,'application/x-www-form-urlencoded');\r\n\t\t}\r\n\t\tif ((requestMethod == 'POST') && PTBrowserInfo.IS_MSIE && (request.url.indexOf('https') == 0)) {\r\n\t\t\tvehicle.setRequestHeader('Connection', 'close');\r\n\t\t}\t\t\r\n\t\tif (async)\r\n\t\t{\r\n\t\t\tvehicle.onreadystatechange = function()\r\n\t\t\t{\r\n\t\t\t\tif (vehicle.readyState == 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tPTHTTPTransport.handleResponse(vehicle, request);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (requestMethod == 'POST')\r\n\t\t{\r\n\t\t\tvar formDataSet = (!request.formDataSet) ? '' : request.formDataSet;\r\n\t\t\tvehicle.send(formDataSet);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tvehicle.send('');\r\n\t\t}\r\n\t\tif (!async)\r\n\t\t{\r\n\t\t\tvar response = PTHTTPTransport.handleResponse(vehicle, request);\r\n\t\t\treturn response;\r\n\t\t}\r\n\t}\r\telse\r\n\t{\r\n\t\tif (requestMethod == 'POST')\r\n\t\t{\r\n\t\t\tPTHTTPTransport._iFrameVehicle.document.write(request.submitFormHTML);\r\n\t\t\tPTHTTPTransport._iFrameVehicle.document.close();\r\n\t\t\tPTHTTPTransport._iFrameVehicle.document.forms[0].submit();\t\t\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tPTHTTPTransport._vehicle.document.location.replace(request.url);\r\n\t\t}\r\n\t\tvar maxWaitMs = 10000; // Don't wait more than 10 seconds for a response\r\n\t\tvar start = new Date();\r\n\t\tvar waitMs = 0;\r\n\t\twhile (PTHTTPTransport._iFrameVehicle.readyState == 'loading' ||\r\n\t\t\t PTHTTPTransport._iFrameVehicle.readyState == 'loaded' ||\r\n\t\t\t PTHTTPTransport._iFrameVehicle.readyState == 'interactive')\r\n\t\t{\r\n\t\t\tvar now = new Date();\r\n\t\t\twaitMs = now - start;\r\n\t\t\tif (waitMs > maxWaitMs) { break; }\r\n\t\t}\r\n\t\tif (!(PTHTTPTransport._iFrameVehicle.readyState == 'loading' ||\r\n\t\t\t PTHTTPTransport._iFrameVehicle.readyState == 'loaded' ||\r\n\t\t\t PTHTTPTransport._iFrameVehicle.readyState == 'interactive'))\r\n\t\t{\r\n\t\t\tvar response = PTHTTPTransport.handleResponse(null, request);\r\n\t\t\treturn response;\r\n\t\t}\r\n\t}\n}\n\nPTHTTPTransport.handleResponse = function (vehicle, request) \r\n{ \t\r\tvar response;\r\tvar emptyResponse = false;\r\n\tif (PTHTTPTransport.transportType != PTHTTPTransport.TRANSPORT_TYPE_IFRAME)\r\n\t{\r\n\t\tvar status;\r\n\t\temptyResponse = false;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tstatus = vehicle.status;\r\n\t\t}\r\n\t\tcatch(e)\r\n\t\t{\r\n\t\t\tif (e.name == 'NS_ERROR_NOT_AVAILABLE')\r\n\t\t\t{\r\n\t\t\t\tresponse = new PTHTTPResponse(request, '', false, false, PTHTTPResponse.RESPONSE_TYPE_NO_RESPONSE);\r\n\t\t\t\temptyResponse = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (status == 12029)\r\n\t\t{\r\n\t\t\tresponse = new PTHTTPResponse(request, '', false, false, PTHTTPResponse.RESPONSE_TYPE_NO_RESPONSE);\r\n\t\t\temptyResponse = true;\r\n\t\t}\r\n\t\tif (!emptyResponse)\r\n\t\t{\r\n\t\t\tresponse = new PTHTTPResponse(request, \r\n\t\t\t\t\t\t\t\t\t\t vehicle.responseText,\r\n\t\t\t\t\t\t\t\t\t\t vehicle.responseXML,\r\n\t\t\t\t\t\t\t\t\t\t vehicle.status,\r\n\t\t\t\t\t\t\t\t\t\t false,\r\n\t\t\t\t\t\t\t\t\t\t vehicle.getAllResponseHeaders());\r\n\t\t\tresponse._contentType = vehicle.getResponseHeader(PTHTTPRequest.CONTENT_TYPE_HEADER);\r\n\t\t\tif (window.PT_DEBUG && (PT_DEBUG >= 2))\r\n\t\t\t{\r\n\t\t\t\tvar end = (new Date()).getTime();\r\n\t\t\t\tif (request && request.properties && request.properties.timerID)\r\n\t\t\t\t{\r\n\t\t\t\t\tPTHTTPTransport._timers[request.properties.timerID].end = end;\r\n\t\t\t\t\tvar diff = end - PTHTTPTransport._timers[request.properties.timerID].start;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\t}\r\tif (PTHTTPTransport.transportType == PTHTTPTransport.TRANSPORT_TYPE_IFRAME) \r\t{\r\t\tresponse = new PTHTTPResponse(request, PTHTTPTransport._iFrameVehicle.document.body.innerText);\r\t}\r\n\tif (request.responsePreProcHandler && \r\n\t\ttypeof request.responsePreProcHandler == 'function')\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvar ok2Continue = request.responsePreProcHandler(response);\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t\tok2Continue = false;\r\n\t\t}\r\t\tif (ok2Continue === false)\r\n\t\t{\r\n\t\t\tif (request.targetElement)\r\n\t\t\t{\r\t\t\t\trequest.targetElement.style.cursor = request._targetElementCursorStyle;\r\n\t\t\t}\r\n\t\t\tif (request.concurrencyMode == PTHTTPTransport.CCMODE_QUEUE)\r\n\t\t\t{\r\n\t\t\t\tPTHTTPTransport._requestInProcess = false;\r\n\t\t\t\twindow.setTimeout('PTHTTPTransport._invokeNextRequest()',1);\t\t\t\r\n\t\t\t}\r\n\t\t\treturn response;\r\n\t\t}\r\n\t}\r\n\tif (response.type == PTHTTPResponse.RESPONSE_TYPE_SESSION_EXPIRED)\r\n\t{\r\n\t\tPTHTTPTransport._requestInProcess = false;\t\r\t\tvar loginURL = response.getResponseHeaders()[PTHTTPResponse.PT_LOGIN_URL_HEADER];\r\n\t\tif (loginURL)\r\n\t\t{\r\n\t\t\twindow.location = loginURL;\t\r\n\t\t\treturn;\r\n\t\t}\r\t\telse\r\n\t\t{\r\n\t\t\twindow.location.reload();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\t\r\n\tif (response.type == PTHTTPResponse.RESPONSE_TYPE_REDIRECT)\r\n\t{\r\n\t\tvar redirectURL = response.getResponseHeaders()['Location'];\r\n\t\trequest.url = redirectURL;\r\n\t\tPTHTTPTransport._requestInProcess = false;\r\n\t\treturn request.invoke();\t\t\r\n\t}\t\r\n\tif (request.callback)\r\n\t{\t\t\r\n\t\tif (typeof request.callback == 'string')\r\n\t\t{\r\n\t\t\tif (eval(request.callback))\r\n\t\t\t{\r\n\t\t\t\teval(request.callback + '(response)');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (typeof request.callback == 'function')\r\n\t\t{\r\n\t\t\trequest.callback(response);\r\n\t\t}\r\n\t}\r\n\telse if (request.targetElement && response._contentType.indexOf('text') != 0 )\r\n\t{\r\n\t\trequest.targetElement.style.cursor = request._targetElementCursorStyle;\r\n\t\twindow.location = request.url;\r\n\t}\r\telse if (request.targetElement)\r\n\t{\r\n\t\tvar targetElement = request.targetElement;\r\n\t\ttargetElement.innerHTML = '';\r\n\t\tvar responseHTML = response.responseText;\r\n\t\tif (PTBrowserInfo.IS_SAFARI)\r\n\t\t{\r\t\t\tresponseHTML = responseHTML.replace(new RegExp('(<style)','gi'), '<!-- $1');\r\n\t\t\tresponseHTML = responseHTML.replace(new RegExp('(<\\/style>)','gi'), '$1 -->');\r\n\t\t\tresponseHTML = responseHTML.replace(new RegExp('(<link.*?>)','gi'), '<!-- $1 -->');\r\n\t\t}\r\n\t\ttargetElement.innerHTML = '<input type=\"hidden\"/>' + responseHTML;\r\n\t\trequest.targetElement.style.cursor = request._targetElementCursorStyle;\r\n\t\tvar scriptElements = targetElement.getElementsByTagName('SCRIPT');\r\n\t\tif (scriptElements && scriptElements.length > 0)\r\n\t\t{\r\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tPTHTTPTransport._jsToEval = ''; \r\n\t\t\t\tfor (var i = 0; i<scriptElements.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar scriptElement = scriptElements[i];\r\n\t\t\t\t\tif (scriptElement.defer && PTBrowserInfo.IS_MSIE && PTBrowserInfo.MSIE_VERSION >= 5.5) { continue; }\r\n\t\t\t\t\tif (scriptElement.src)\r\n\t\t\t\t\t{\t\t\t\t\t\t\r\t\t\t\t\t\tif (PTHTTPTransport.transportType != PTHTTPTransport.TRANSPORT_TYPE_IFRAME) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar scriptGetRequest = new PTHTTPGETRequest(scriptElement.src, false, PTHTTPTransport.CCMODE_SYNC);\r\n\t\t\t\t\t\t\t\tvar scriptGetResponse = scriptGetRequest.invoke();\r\n\t\t\t\t\t\t\t\tif (scriptGetResponse.status == 200)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tPTHTTPTransport._jsToEval += scriptGetResponse.responseText + '\\n';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch(e)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (scriptElement.innerHTML)\r\n\t\t\t\t\t{\t\t\t\r\t\t\t\t\t\tvar scriptLines = scriptElement.innerHTML.split('\\n');\r\t\t\t\t\t\tfor (var j=0; j<scriptLines.length; j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (scriptLines[j].indexOf('document.write') > -1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tscriptLines[j] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (scriptLines[j].indexOf('<!--') != -1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tscriptLines[j] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tPTHTTPTransport._jsToEval += scriptLines.join('\\n') + '\\n';;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (PTBrowserInfo.IS_MSIE)\r\n\t\t\t\t{\r\n\t\t\t\t\twindow.setTimeout('window.execScript(PTHTTPTransport._jsToEval)',10);\r\n\t\t\t\t}\r\n\t\t\t\telse if (PTBrowserInfo.IS_SAFARI)\r\n\t\t\t\t{\r\n\t\t\t\t\twindow.setTimeout('window.eval(PTHTTPTransport._jsToEval)',10);\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\twindow.eval(PTHTTPTransport._jsToEval);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (e)\r\n\t\t\t{\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t}\r\n\tif (request.responsePostProcHandler && typeof request.responsePostProcHandler == 'function')\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\trequest.responsePostProcHandler(response);\r\n\t\t}\r\n\t\tcatch(e)\r\n\t\t{\r\n\t\t}\r\n\t}\r\n\tif (request.concurrencyMode == PTHTTPTransport.CCMODE_QUEUE)\r\n\t{\r\n\t\tPTHTTPTransport._requestInProcess = false;\r\n\t\twindow.setTimeout('PTHTTPTransport._invokeNextRequest()',1);\r\n\t}\r\n\treturn response;\n}\n\nPTHTTPTransport._invokeNextRequest = function()\r\n{\r\n\tif (PTHTTPTransport._requestQueue.length > 0) \r\n\t{ \r\n\t\tvar nextRequest = PTHTTPTransport._requestQueue.shift(); \r\n\t\tPTHTTPTransport.invokeRequest(nextRequest); \r\n\t}\n}\n\nPTHTTPTransport.init\t\t\t\t\t= function()\r\n{\r\tif (PTBrowserInfo.IS_MSIE && PTBrowserInfo.MSIE_VERSION >= 5)\r\n\t{\r\n\t\tPTHTTPTransport._setTransportTypeMSIE();\r\n\t}\r\tif (!PTHTTPTransport.transportType)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvar object = new XMLHttpRequest();\r\n\t\t\tPTHTTPTransport.transportType = PTHTTPTransport.TRANSPORT_TYPE_XMLHTTPREQUEST;\r\n\t\t}\r\n\t\tcatch (e) {}\n\n\t}\t\r\n\tif (!PTHTTPTransport.transportType)\r\n\t{\r\n\t\tif (!document.body)\r\n\t\t{\r\n\t\t\twindow.setTimeout('PTHTTPTransport.init()',200);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (document.createElement && !document.frames['_ptHttpTransportIFrame'])\r\n\t\t{\r\n\t\t\tif (PTBrowserInfo.IS_OPERA)\r\n\t\t\t{\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle = document.createElement('iframe');\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle.setAttribute('id','_ptHttpTransportIFrame');\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle.style.border = '0px';\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle.style.width\t= '0px';\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle.style.height\t= '0px';\r\n\t\t\t\tdocument.body.appendChild(PTHTTPTransport._iFrameVehicle);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tvar tempIFrame = document.createElement('iframe');\r\n\t\t\t\ttempIFrame.setAttribute('id','_ptHttpTransportIFrame');\r\n\t\t\t\ttempIFrame.style.border = '0px';\r\n\t\t\t\ttempIFrame.style.width\t= '0px';\r\n\t\t\t\ttempIFrame.style.height\t= '0px';\r\n\t\t\t\tdocument.body.appendChild(tempIFrame);\t\t\t\r\n\t\t\t\tPTHTTPTransport._iFrameVehicle = document.frames['_ptHttpTransportIFrame'];\r\n\t\t\t}\r\n\t\t\tPTHTTPTransport.transportType = PTHTTPTransport.TRANSPORT_TYPE_IFRAME;\r\n\t\t}\r\n\t}\n}\n\nPTHTTPTransport._setTransportTypeMSIE = function()\r\n{\r\n\tvar transportTypes = new Array(\r\n\t\t'MSXML2.XMLHTTP.6.0', \r\n\t\t'MSXML2.XMLHTTP.3.0', \r\n\t\t'MSXML2.XMLHTTP', \r\n\t\t'Microsoft.XMLHTTP'\r\n\t);\r\n\tvar transportTypeMSIE = false;\r\n\tTEST:\r\n\tfor (var t = 0; t < transportTypes.length; t++)\r\n\t{\r\n\t\tvar transportType = transportTypes[t];\r\n\t\tvar object;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tobject = new ActiveXObject(transportType);\r\n\t\t}\r\n\t\tcatch(e) { continue TEST; }\r\n\t\tPTHTTPTransport.transportType = PTHTTPTransport.TRANSPORT_TYPE_MSXML;\r\n\t\tPTHTTPTransport.transportTypeMSIE = transportType;\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\n}\n\nPTHTTPTransport.init();\r\nPTHTTPRequest = function()\r\n{\n}\n\nPTHTTPRequest.VERSION = '366908'; \r\nPTHTTPRequest.REQUEST_TYPE_HEADER\t\t\t\t= 'PT-HTTPRequest-Type';\r\nPTHTTPRequest.REQUEST_TYPE_CLIENT_SIDE \t\t= 'CLIENT_SIDE'; \r\nPTHTTPRequest.REQUEST_TYPE_PORTLET_REFRESH \t= 'PORTLET_REFRESH';\r\nPTHTTPRequest.CONTENT_TYPE_HEADER\t\t\t\t= 'Content-Type';\r\nPTHTTPRequest.prototype.url = null;\r\nPTHTTPRequest.prototype.type = PTHTTPRequest.REQUEST_TYPE_CLIENT_SIDE;\r\nPTHTTPRequest.prototype.callback = null;\r\nPTHTTPRequest.prototype.targetElement = null;\r\nPTHTTPRequest.prototype.responsePreProcHandler = null;\r\nPTHTTPRequest.prototype.responsePostProcHandler = null;\r\nPTHTTPRequest.prototype.concurrencyMode = PTHTTPTransport.CCMODE_QUEUE;\r\nPTHTTPRequest.prototype.requestHeaders = {};\r\nPTHTTPRequest.prototype.properties = {};\r\nPTHTTPRequest.prototype._requestForm = null;\r\nPTHTTPRequest.prototype.formDataSet = null;\r\nPTHTTPRequest.prototype._setFormURLEncodedDataFromNVPairs = function(nvPairs)\r\n{\r\n\tif (!nvPairs) { return null; }\r\n\tvar formData = '';\r\n\tfor (theName in nvPairs)\r\n\t{\r\n\t\tformData += PTStringUtil.encodeURL(theName) + '=' + PTStringUtil.encodeURL(nvPairs[theName]) + '&';\r\n\t}\r\n\tif (formData.length > 0)\r\n\t\tthis.formDataSet = formData.substring(0,formData.length-1);\n}\n\nPTHTTPRequest.prototype._setFormURLEncodedDataFromForm = function(formRef)\r\n{\r\n\tthis._requestForm = PTHTTPRequest._resolveFormReference(formRef);\r\n\tif (!this._requestForm) { return null; }\r\n\tvar formData = '';\r\n\tvar formInputs = this._requestForm.elements;\r\n\tfor (var i=0; i<formInputs.length; i++)\r\n\t{\r\n\t\tvar theInput = formInputs[i];\r\n\t\tif (theInput.tagName == 'BUTTON')\r\n\t\t{\r\n\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\tvar encodedValue = PTStringUtil.encodeURL(PTStringUtil.getInnerText(theInput));\r\n\t\t\tformData += encodedName + '=' + encodedValue + '&';\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'SELECT')\r\n\t\t{\r\n\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\tfor (var j=0; j<theInput.options.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (theInput.options[j].selected)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar valueToEncode = (theInput.options[j].value) ? theInput.options[j].value : theInput.options[j].text;\r\n\t\t\t\t\tvar encodedValue = PTStringUtil.encodeURL(valueToEncode);\r\n\t\t\t\t\tformData += encodedName + '=' + encodedValue + '&';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'TEXTAREA')\r\n\t\t{\r\n\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\tvar encodedValue = PTStringUtil.encodeURL(theInput.value);\r\n\t\t\tformData += encodedName + '=' + encodedValue + '&';\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'INPUT' && theInput.name)\r\n\t\t{\r\t\t\tif (theInput.type == 'button' || theInput.type == 'file' || theInput.type == 'image' || theInput.type == 'submit')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if (theInput.type == 'checkbox' || theInput.type == 'radio')\r\n\t\t\t{\r\n\t\t\t\tif (theInput.checked)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\t\t\tvar encodedValue = PTStringUtil.encodeURL(theInput.value);\r\n\t\t\t\t\tformData += encodedName + '=' + encodedValue + '&';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\t\tvar encodedValue = PTStringUtil.encodeURL(theInput.value);\r\n\t\t\t\tformData += encodedName + '=' + encodedValue + '&';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (formData.length > 0)\r\n\t\tthis.formDataSet = formData.substring(0,formData.length-1);\n}\n\nPTHTTPRequest.prototype.setResponseHandler = function(responseHandler)\r\n{\r\n\tif (typeof responseHandler == 'string' || typeof responseHandler == 'function')\r\n\t{\r\n\t\tthis.callback = responseHandler;\r\n\t}\r\n\telse if (responseHandler && responseHandler.tagName)\r\n\t{\r\n\t\tthis.targetElement = responseHandler;\r\n\t}\n}\n\nPTHTTPRequest.prototype.setFormContent = function(formContent)\r\n{\r\n\tif (!formContent) { return; }\r\n\tif ((formContent.tagName && formContent.tagName == 'FORM') || typeof formContent == 'string') \r\n\t{\r\n\t\tthis._setFormURLEncodedDataFromForm(formContent);\r\n\t}\r\n\telse if (typeof formContent == 'object')\r\n\t{\r\n\t\tthis._setFormURLEncodedDataFromNVPairs(formContent);\r\n\t}\n}\n\nPTHTTPRequest.prototype.setRequestHeader = function(header, value)\r\n{\r\n\tif (!header) { return; }\r\n\tthis.requestHeaders[header] = value;\n}\n\nPTHTTPRequest.prototype.invoke = function (loadMessageCommand)\r\n{\r\n\tvar gotURLFromForm = false;\r\n\tif (!this.url && this._requestForm)\r\n\t{\r\n\t\tthis.url = this._requestForm.action;\r\n\t\tgotURLFromForm = true;\r\n\t}\r\n\tif (!this.url)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\tif (this.className == 'PTHTTPGETRequest' && this.formDataSet)\r\n\t{\r\n\t\tthis.url += '?' + this.formDataSet;\r\n\t}\r\n\tvar calledFromOnSubmit = false;\r\n\tvar priorCaller = arguments.callee.caller;\r\n\tvar callDepth = 0;\r\n\twhile (priorCaller && ++callDepth < 100)\r\n\t{\r\n\t\tif (this._requestForm && \r\n\t\t\tthis._requestForm.onsubmit && \r\n\t\t\tpriorCaller == this._requestForm.onsubmit)\r\n\t\t{\r\n\t\t\tcalledFromOnSubmit = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tpriorCaller = priorCaller.arguments.callee.caller;\r\n\t}\t\r\n\tif (this._requestForm && this._requestForm.onsubmit && this._requestForm.onsubmit.toString().indexOf('PTValidate_') == -1 && !calledFromOnSubmit)\r\n\t{\r\n\t\tvar onsubmitReturn = this._requestForm.onsubmit();\r\n\t\tif (!onsubmitReturn)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\t\tif (gotURLFromForm)\r\n\t\t{\t\r\n\t\t\tthis.url = this._requestForm.action;\r\n\t\t}\r\n\t}\r\n\tif (this.callback)\r\n\t{\r\n\t}\r\n\telse if (this.targetElement)\r\n\t{\r\n\t\tthis._targetElementCursorStyle = this.targetElement.style.cursor;\r\n\t\tthis.targetElement.style.cursor = 'wait';\r\n\t}\r\n\tif (loadMessageCommand && (loadMessageCommand = new String(loadMessageCommand)))\r\n\t{\r\t\tif (loadMessageCommand.lastIndexOf(')') != (loadMessageCommand.length - 1)) { loadMessageCommand += '(true)'; }\r\n\t\ttry\t\t\t{ eval(loadMessageCommand); }\r\n\t\tcatch(e)\t{ }\r\n\t}\r\n\treturn PTHTTPTransport.invokeRequest(this);\n}\n\nPTHTTPRequest._resolveFormReference = function(formRef)\r\n{\r\n\tif (!formRef) { return null; }\r\n\tvar formElement = null;\r\n\tif (formRef.tagName && (formRef.tagName == 'FORM'))\r\n\t{\r\n\t\tformElement = formRef;\r\n\t}\r\n\telse if (typeof formRef == 'string')\r\n\t{\r\t\tif (document[formRef])\r\n\t\t{\r\n\t\t\tformElement = document[formRef];\r\n\t\t}\r\t\telse if (document.getElementById(formRef))\r\n\t\t{\r\n\t\t\tformElement = document.getElementById(formRef);\r\n\t\t}\r\n\t}\r\n\treturn formElement;\n}\n\nPTHTTPGETRequest = function(url, responseHandler, concurrencyMode, properties)\r\n{\r\tif (url) { this.url = url; }\r\n\tthis.setResponseHandler(responseHandler);\r\n\tif (concurrencyMode) { this.concurrencyMode = concurrencyMode; }\r\n\tif (properties)\r\n\t{\r\n\t\tfor (var p in properties) { this.properties[p] = properties[p]; }\r\n\t}\r\n\telse\r\n\t{\r\n\t\tthis.properties = {};\t\r\n\t}\t\t\r\n\tthis.requestHeaders['Referer'] = window.location;\r\n\treturn this;\n}\n\nPTHTTPGETRequest.prototype = new PTHTTPRequest();\r\nPTHTTPGETRequest.prototype.constructor = PTHTTPGETRequest;\r\nPTHTTPGETRequest.prototype._superClass = PTHTTPRequest;\r\nPTHTTPGETRequest.VERSION = '366908';\r\nPTHTTPGETRequest.prototype.className\t= 'PTHTTPGETRequest';\r\nPTHTTPPOSTRequest = function(url, formContent, responseHandler, concurrencyMode, properties)\r\n{\r\tif (url) { this.url = url; }\r\n\tthis.setFormContent(formContent);\r\n\tthis.setResponseHandler(responseHandler);\r\n\tif (concurrencyMode) { this.concurrencyMode = concurrencyMode; }\r\n\tif (properties)\r\n\t{\r\n\t\tfor (var p in properties) { this.properties[p] = properties[p]; }\r\n\t}\r\n\telse\r\n\t{\r\n\t\tthis.properties = {};\t\r\n\t}\t\t\r\n\treturn this;\n}\n\nPTHTTPPOSTRequest.prototype = new PTHTTPRequest();\r\nPTHTTPPOSTRequest.prototype.constructor = PTHTTPPOSTRequest;\r\nPTHTTPPOSTRequest.prototype._superClass = PTHTTPRequest;\r\nPTHTTPPOSTRequest.VERSION = '366908';\r\nPTHTTPPOSTRequest.prototype.className\t= 'PTHTTPPOSTRequest';\r\nPTHTTPPOSTRequest.prototype.setFormContent = function(formContent)\r\n{\r\tif (PTHTTPTransport.transportType == 'iframe')\r\n\t{\r\n\t\tif (formContent && formContent.tagName && formContent.tagName == 'FORM')\r\n\t\t{\r\n\t\t\tthis._submitFormHTML = \r\n\t\t\t\tPTHTTPPOSTRequest._genSubmitFormHTMLFromForm(formContent, this.url);\r\n\t\t}\r\n\t\telse if (formContent && typeof formContent == 'object')\r\n\t\t{\r\n\t\t\tthis._submitFormHTML = \r\n\t\t\t\tPTHTTPPOSTRequest._genSubmitFormHTMLFromNVPairs(formContent, this.url);\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\t\tif (!this._super_setFormContent) \r\n\t\t{ \r\n\t\t\tthis._super_setFormContent = this._superClass.prototype.setFormContent;\r\n\t\t}\r\n\t\tthis._super_setFormContent(formContent);\r\n\t}\n}\n\nPTHTTPPOSTRequest.prototype.setPostBody = function(payload,contentType)\r\n{\r\n\tif (!contentType) { contentType = 'text/plain'; }\r\n\tthis.formDataSet = payload;\r\n\tthis.setRequestHeader(PTHTTPRequest.CONTENT_TYPE_HEADER, contentType);\n}\n\nPTHTTPPOSTRequest.prototype.setPostBodyXML = function(xmlString)\r\n{\r\n\tthis.setPostBody(xmlString,'text/xml');\n}\n\nPTHTTPPOSTRequest._genSubmitFormHTMLFromNVPairs = function(theArray, url)\r\n{\r\n\tvar submitFormHTML = '<form name=\"submitForm\" method=\"POST\" action=\"' + url + '\">\\n';\r\n\tfor (prop in theArray)\r\n\t{\r\n\t\tsubmitFormHTML += '<input type=\"hidden\" ';\r\n\t\tsubmitFormHTML += 'name=\"' + PTStringUtil.escapeHTML(prop) + '\" ';\r\n\t\tsubmitFormHTML += 'value=\"' + PTStringUtil.escapeHTML(theArray[prop]) + '\">\\n';\r\n\t}\r\n\tsubmitFormHTML += '</form>';\r\n\treturn submitFormHTML;\n}\n\nPTHTTPPOSTRequest._genSubmitFormHTMLFromForm = function(theForm, url)\r\n{\r\n\tvar submitFormHTML = '<form name=\"submitForm\" method=\"POST\" action=\"' + url + '\">\\n';\r\n\tvar formInputs = theForm.elements;\r\n\tfor (var i=0; i<formInputs.length; i++)\r\n\t{\r\n\t\tvar theInput = formInputs[i];\r\n\t\tif (theInput.tagName == 'BUTTON')\r\n\t\t{\r\n\t\t\tvar escapedName = PTStringUtil.escapeHTML(theInput.name);\r\n\t\t\tvar escapedValue = PTStringUtil.escapeHTML(theInput.innerText);\r\n\t\t\tsubmitFormHTML += '<input type=\"hidden\" ';\r\n\t\t\tsubmitFormHTML += 'name=\"' + escapedName + '\" ';\r\n\t\t\tsubmitFormHTML += 'value=\"' + escapedValue + '\">\\n';\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'SELECT')\r\n\t\t{\r\n\t\t\tvar escapedName = PTStringUtil.escapeHTML(theInput.name);\r\n\t\t\tfor (var j=0; j<theInput.options.length; j++)\r\n\t\t\t{\r\n\t\t\t\tif (theInput.options[j].selected)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar valueToEscape = (theInput.options[j].value) ? theInput.options[j].value : theInput.options[j].text;\r\n\t\t\t\t\tvar escapedValue = PTStringUtil.escapeHTML(valueToEscape);\r\n\t\t\t\t\tsubmitFormHTML += 'name=\"' + escapedName + '\" ';\r\n\t\t\t\t\tsubmitFormHTML += 'value=\"' + escapedValue + '\">\\n';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'TEXTAREA')\r\n\t\t{\r\n\t\t\tvar escapedName = PTStringUtil.escapeHTML(theInput.name);\r\n\t\t\tvar escapedValue = PTStringUtil.escapeHTML(theInput.value);\r\n\t\t\tsubmitFormHTML += 'name=\"' + escapedName + '\" ';\r\n\t\t\tsubmitFormHTML += 'value=\"' + escapedValue + '\">\\n';\r\n\t\t}\r\n\t\telse if (theInput.tagName == 'INPUT' && theInput.name)\r\n\t\t{\r\t\t\tif (theInput.type == 'file' || theInput.type == 'image')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if (theInput.type == 'checkbox' || theInput.type == 'radio')\r\n\t\t\t{\r\n\t\t\t\tif (theInput.checked)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar escapedName = PTStringUtil.escapeHTML(theInput.name);\r\n\t\t\t\t\tvar escapedValue = PTStringUtil.escapeHTML(theInput.value);\r\n\t\t\t\t\tsubmitFormHTML += 'name=\"' + escapedName + '\" ';\r\n\t\t\t\t\tsubmitFormHTML += 'value=\"' + escapedValue + '\">\\n';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvar encodedName = PTStringUtil.encodeURL(theInput.name);\r\n\t\t\t\tvar encodedValue = PTStringUtil.encodeURL(theInput.value);\r\n\t\t\t\tsubmitFormHTML += 'name=\"' + escapedName + '\" ';\r\n\t\t\t\tsubmitFormHTML += 'value=\"' + escapedValue + '\">\\n';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tsubmitFormHTML += '</form>';\r\n\treturn submitFormHTML;\n}\n\nPTHTTPResponse = function(request, responseText, responseXML, status, type, responseHeadersString)\r\n{\r\n\tthis.request \t\t\t= (request) ? request : new Object();\r\n\tthis.responseText\t\t= (responseText) ? responseText : '';\r\n\tthis.responseXML\t\t= (responseXML) ? responseXML : false;\r\n\tthis.status\t\t\t\t= (status) ? parseInt(status) : false;\r\n\tthis.type\t\t\t\t= (type) ? type : null;\r\n\tthis._responseHeaders\t\t= false;\r\n\tthis._responseHeadersString\t= responseHeadersString;\r\n\tif (!type && this.status)\r\n\t{\r\t\tvar hasPTResponseType = (responseHeadersString.toLowerCase().indexOf(PTHTTPResponse.PT_RESPONSE_TYPE_HEADER.toLowerCase()) > -1) ? true: false;\r\n\t\tif\t (this.status == 200 && !hasPTResponseType) { this.type = PTHTTPResponse.RESPONSE_TYPE_OK; }\r\n\t\telse if (this.status == 204 || this.status == 1223) { this.type = PTHTTPResponse.RESPONSE_TYPE_EMPTY_RESPONSE; }\r\n\t\telse if (this.status >= 400 && this.status < 600) { this.type = PTHTTPResponse.RESPONSE_TYPE_SERVER_ERROR; }\r\n\t\telse\r\n\t\t{\r\t\t\tthis.type = this._getResponseTypeFromHeaders(this.status);\r\n\t\t}\r\n\t}\r\n\tthis.className\t\t\t= 'PTHTTPResponse';\r\n\treturn this;\n}\n\nPTHTTPResponse.VERSION = '366908';\r\nPTHTTPResponse.RESPONSE_TYPE_OK\t\t\t\t\t= 'ok';\r\nPTHTTPResponse.RESPONSE_TYPE_REDIRECT\t\t\t\t= 'redirect';\r\nPTHTTPResponse.RESPONSE_TYPE_SESSION_EXPIRED\t\t= 'session_expired';\r\nPTHTTPResponse.RESPONSE_TYPE_PORTLET_ERROR\t\t= 'portlet_error';\r\nPTHTTPResponse.RESPONSE_TYPE_PORTLET_TIMEOUT\t\t= 'portlet_timeout';\r\nPTHTTPResponse.RESPONSE_TYPE_SERVER_ERROR\t\t\t= 'server_error';\r\nPTHTTPResponse.RESPONSE_TYPE_EMPTY_RESPONSE\t\t= 'empty_response';\r\nPTHTTPResponse.RESPONSE_TYPE_NO_RESPONSE\t\t\t= 'no_response';\r\nPTHTTPResponse.PT_RESPONSE_TYPE_HEADER\t\t\t= 'PT-HTTPResponse-Type';\r\nPTHTTPResponse.PT_RESPONSE_TYPE_HEADER_SAFARI\t\t= 'Pt-Httpresponse-Type'; \r\nPTHTTPResponse.PT_RESPONSE_TYPE_PORTLET_ERROR\t\t= 'PORTLET_ERROR';\r\nPTHTTPResponse.PT_RESPONSE_TYPE_PORTLET_TIMEOUT\t= 'PORTLET_TIMEOUT';\r\nPTHTTPResponse.PT_RESPONSE_TYPE_SESSION_TIMEOUT\t= 'SESSION_TIMEOUT';\r\nPTHTTPResponse.PT_LOGIN_URL_HEADER\t\t\t\t= 'PT-Login-URL';\r\nPTHTTPResponse.prototype._getResponseTypeFromHeaders = function(status)\r\n{\r\n\tvar responseHeaders = this.getResponseHeaders();\r\n\tvar ptReponseTypeHeader = (PTBrowserInfo.IS_SAFARI) ? PTHTTPResponse.PT_RESPONSE_TYPE_HEADER_SAFARI : PTHTTPResponse.PT_RESPONSE_TYPE_HEADER;\r\n\tif (responseHeaders[ptReponseTypeHeader] == PTHTTPResponse.PT_RESPONSE_TYPE_PORTLET_ERROR)\r\n\t{\r\n\t\treturn PTHTTPResponse.RESPONSE_TYPE_PORTLET_ERROR;\r\n\t}\r\n\telse if (responseHeaders[ptReponseTypeHeader] == PTHTTPResponse.PT_RESPONSE_TYPE_PORTLET_TIMEOUT)\r\n\t{\r\n\t\treturn PTHTTPResponse.RESPONSE_TYPE_PORTLET_TIMEOUT;\r\n\t}\r\n\telse if (responseHeaders[ptReponseTypeHeader] == PTHTTPResponse.PT_RESPONSE_TYPE_SESSION_TIMEOUT)\r\n\t{\r\n\t\treturn PTHTTPResponse.RESPONSE_TYPE_SESSION_EXPIRED;\r\n\t}\r\telse if (status == 302) \r\n\t{ \r\n\t\treturn PTHTTPResponse.RESPONSE_TYPE_REDIRECT; \r\n\t}\n}\n\nPTHTTPResponse.prototype.getResponseHeaders = function()\r\n{\r\tif (this._responseHeaders) { return this._responseHeaders; }\r\n\telse\r\n\t{\r\n\t\tthis._responseHeaders = new Object();\r\n\t\tif (this._responseHeadersString)\r\n\t\t{\r\n\t\t\tvar responseHeadersArray = this._responseHeadersString.split('\\n');\r\n\t\t\tfor (var i=0; i<responseHeadersArray.length; i++)\r\n\t\t\t{\r\n\t\t\t\tvar headerLine = responseHeadersArray[i];\r\n\t\t\t\tvar headerNVPair = headerLine.split(': ');\r\n\t\t\t\tif (headerNVPair[0] && headerNVPair[1])\r\n\t\t\t\t{\r\n\t\t\t\t\tvar headerName = PTStringUtil.trimWhitespace(headerNVPair[0], true, true);\r\n\t\t\t\t\tvar headerValue = PTStringUtil.trimWhitespace(headerNVPair[1], true, true);\r\n\t\t\t\t\tthis._responseHeaders[headerName] = headerValue;\r\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this._responseHeaders;\r\n\t}\n}\n\nPTHTTPResponse.isValid = function(HTTPResponse)\r\n{\r\n\treturn (HTTPResponse && HTTPResponse.responseText && (HTTPResponse.responseText.length > 0) && !PTStringUtil.isAllWhitespace(HTTPResponse.responseText));\n}\n\nfunction PTXMLCompositor() {\r\n\treturn this;\n}\n\nPTXMLCompositor.VERSION = '366908';\r\nPTXMLCompositor.VALUE_AUTOSET \t= 'VALUE_AUTOSET';\r\nPTXMLCompositor.nextUID\t\t\t= (new Date()).getTime();\r\nPTXMLCompositor.URLNodes\t\t= { 'baseURL' : true, 'imgSrc' : true ,'URL' : true, 'srcURL' : true, 'defaultPageURL' : true, 'relativeBaseURL' : true };\r\nPTXMLCompositor.expandFromXML = function(xml,w,obj)\r\n{\r\n\tvar topObjectName = w.getAttribute(xml,'class');\r\n\tif (!topObjectName)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\tif (!obj) { obj = PTXMLCompositor.inflateObject(topObjectName,xml,w); }\r\n\tvar onFinishCompositorID = 'finishcompositor' + ++PTXMLCompositor.nextUID;\r\n\tobj = PTXMLCompositor.inflateNode(xml,obj,w,null,onFinishCompositorID);\r\n\tvar evt = new Object();\r\n\tevt.type = onFinishCompositorID;\r\n\tdocument.PCC.RaiseWindowEvent(evt);\r\n\treturn obj;\n}\n\nPTXMLCompositor.inflateObject = function(objName,node,w,mode,obj)\r\n{\r\n\ttry\r\n\t{\r\n\t\tvar newObj = null;\r\n\t\tif ((objName == 'Number') && node)\r\n\t\t{\r\n\t\t\tvar nodeValue = new String(w.getNodeValue(node));\r\n\t\t\tif (isNaN(nodeValue)) { throw ''; }\r\n\t\t\tif (nodeValue.indexOf('.') > -1)\r\n\t\t\t{\r\n\t\t\t\tnewObj = parseFloat(nodeValue);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tnewObj = parseInt(nodeValue);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ((objName == 'Boolean') && node)\r\n\t\t{\r\n\t\t\tif ((w.getNodeValue(node) == 'false') || (w.getNodeValue(node) == '0'))\r\n\t\t\t{\r\n\t\t\t\tnewObj = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnewObj = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (objName == 'Date')\r\n\t\t{\r\n\t\t\tvar dateValue = w.getNodeValue(node);\r\n\t\t\ttry {\r\n\t\t\t\tnewObj = new Date(dateValue);\r\n\t\t\t} catch(e) {\r\n\t\t\t\tnewObj = new Date('\\'' + dateValue + '\\'');\r\n\t\t\t}\r\n\t\t\tif (!newObj) { throw ''; }\r\n\t\t}\r\n\t\telse if (objName == 'PTDate')\r\n\t\t{\r\n\t\t\tnewObj = new PTDate(w.getNodeValue(node));\r\n\t\t\tnewObj.date = new Date(w.getNodeValue(node));\r\n\t\t}\r\n\t\telse if ((objName == 'Hash') || (objName == 'Array'))\r\n\t\t{\r\n\t\t\tif (mode && (mode == 'merge') && obj)\r\n\t\t\t{\r\n\t\t\t\tnewObj = obj;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnewObj = new Array();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (objName == 'PTSimpleMenuItem')\r\n\t\t{\r\n\t\t\tnewObj = new PTMenuItem();\r\n\t\t\tnewObj.type = PTMenuItem.SIMPLE_MENU_ITEM;\r\n\t\t}\r\n\t\telse if (objName == 'PTDividerMenuItem')\r\n\t\t{\r\n\t\t\tnewObj = new PTMenuItem();\r\n\t\t\tnewObj.type = PTMenuItem.DIVIDER_MENU_ITEM;\r\n\t\t}\r\n\t\telse if (objName == 'PTRadioMenuItem')\r\n\t\t{\r\n\t\t\tnewObj = new PTMenuItem();\r\n\t\t\tnewObj.type = PTMenuItem.RADIO_MENU_ITEM;\r\n\t\t}\r\n\t\telse if (objName == 'PTCheckboxMenuItem')\r\n\t\t{\r\n\t\t\tnewObj = new PTMenuItem();\r\n\t\t\tnewObj.type = PTMenuItem.CHECKBOX_MENU_ITEM;\r\n\t\t}\r\n\t\telse if (objName == 'PTCascadingMenuItem')\r\n\t\t{\r\n\t\t\tnewObj = new PTMenuItem();\r\n\t\t\tnewObj.type = PTMenuItem.CASCADING_MENU_ITEM;\r\n\t\t}\r\n\t\telse if (objName == 'PTAntiMatter')\r\n\t\t{\r\n\t\t\tnewObj = null;\r\n\t\t}\r\n\t\telse if (objName == 'null')\r\n\t\t{\r\n\t\t\tnewObj = null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnewObj = new window[objName]();\r\n\t\t}\r\t\treturn newObj;\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\tvar alertMsg = 'PTXMLCompositor: Failed to create new ' + objName + '.';\r\n\t\tif ((objName == 'Number') && node && w)\r\n\t\t{\r\n\t\t\tif (isNaN(w.getNodeValue(node)))\r\n\t\t\t{\r\n\t\t\t\talertMsg += '\\n\\nInvalid numeric value: ';\r\n\t\t\t\talertMsg += w.getNodeValue(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (e.message) { alertMsg += '\\n\\n' + e.message; }\r\n\t\t}\r\n\t\treturn;\r\n\t}\n}\n\nPTXMLCompositor.inflateNode\t= function(node,obj,w,parentObj,onFinishCompositorID)\r\n{\r\n\tif (!node) \r\n\t{ \r\n\t\treturn;\r\n\t}\r\n\tvar c = node.childNodes;\r\n\tvar childNodesLength = c.length;\r\n\tfor (var i = 0; i < childNodesLength; i++) {\r\n\t\tvar child = c[i];\r\n\t\tvar cNodeName = new String(w.getNodeName(child));\r\n\t\tif (cNodeName == '#text' || cNodeName == '#comment') { continue; }\r\n\t\ttry {\r\n\t\t\tvar index = w.getAttribute(child,'index');\t\t\t\r\n\t\t\tvar key = w.getAttribute(child,'key');\r\n\t\t\tvar objName = w.getAttribute(child,'class');\r\n\t\t\tvar mod = w.getAttribute(child,'mod');\r\n\t\t\tvar mode = w.getAttribute(child,'mode');\r\n\t\t} catch(e) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (cNodeName == 'component')\r\n\t\t{\r\n\t\t\tvar ptComponent = PTXMLCompositor.expandComponent(node,child,w);\r\n\t\t\tif (ptComponent)\r\n\t\t\t{\r\n\t\t\t\tobj[cNodeName] = ptComponent;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tobj[cNodeName] = PTXMLCompositor.inflateObject(objName,child,w,mode,obj[cNodeName]);\r\n\t\t\t\tobj[cNodeName] = PTXMLCompositor.inflateNode(child,obj[cNodeName],w,obj,onFinishCompositorID);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ((objName == 'PTPanelSet') && (index != null))\r\n\t\t{\r\n\t\t\tvar ptComponent = PTXMLCompositor.expandComponent(node,child,w);\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tif (ptComponent)\r\n\t\t\t{\r\n\t\t\t\tobj[orderNum] = ptComponent;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tobj[orderNum] = PTXMLCompositor.inflateObject(objName,child,w,mode,obj[orderNum]);\r\n\t\t\t\tobj[orderNum] = PTXMLCompositor.inflateNode(child,obj[orderNum],w,obj,onFinishCompositorID);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (cNodeName == 'javascript')\r\n\t\t{\r\n\t\t\teval(w.getNodeValue(child));\r\n\t\t}\r\n\t\telse if (index && objName)\r\n\t\t{\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tobj[orderNum] = PTXMLCompositor.inflateObject(objName,child,w,mode,obj[orderNum]);\r\n\t\t\tobj[orderNum] = PTXMLCompositor.inflateNode(child,obj[orderNum],w,obj,onFinishCompositorID);\r\n\t\t}\r\n\t\telse if (index)\r\n\t\t{\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tobj[orderNum] = w.getNodeValue(child);\r\n\t\t}\r\n\t\telse if (key)\r\n\t\t{\r\n\t\t\tif (objName)\r\n\t\t\t{\r\n\t\t\t\tobj[key] = PTXMLCompositor.inflateObject(objName,child,w,mode,obj[key]);\r\n\t\t\t\tobj[key] = PTXMLCompositor.inflateNode(child,obj[key],w,obj,onFinishCompositorID);\r\n\t\t\t}\r\n\t\t\tobj[key] = w.getNodeValue(child);\r\n\t\t}\r\n\t\telse if (cNodeName == 'rows' && obj.className == 'PTTableControl')\r\n\t\t{\r\n\t\t\tobj.rowNodes = new Array();\r\n\t\t\tfor (var j=0; j < child.childNodes.length; j++)\r\n\t\t\t{\r\n\t\t\t\tvar rowNode = child.childNodes[j];\r\n\t\t\t\tvar rowNodeName = new String(w.getNodeName(rowNode));\r\n\t\t\t\tif (rowNodeName == '#text' || rowNodeName == '#comment') { continue; }\r\n\t\t\t\tvar rowIndex = parseInt(w.getAttribute(rowNode,'index'));\t\r\n\t\t\t\tobj.rowNodes[rowIndex] = rowNode;\r\n\t\t\t}\r\n\t\t\tobj.rows = new Array(obj.rowNodes.length);\r\n\t\t}\r\n\t\telse if (objName)\r\n\t\t{\r\n\t\t\tobj[cNodeName] = PTXMLCompositor.inflateObject(objName,child,w,mode,obj[cNodeName]);\r\n\t\t\tobj[cNodeName] = PTXMLCompositor.inflateNode(child,obj[cNodeName],w,obj,onFinishCompositorID);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tvar nodeValue = new String(w.getNodeValue(child));\r\n\t\t\tif ((cNodeName == 'js') && (nodeValue.indexOf('<script>') > -1))\r\n\t\t\t{\r\n\t\t\t\tvar endIndex = nodeValue.indexOf('</script>');\r\n\t\t\t\tvar js = nodeValue.substring(nodeValue.indexOf('<script>') + 8,endIndex);\r\n\t\t\t\tobj[cNodeName] = js;\r\n\t\t\t}\r\n\t\t\telse if (nodeValue.indexOf('<html-frag>') > -1)\r\n\t\t\t{\r\n\t\t\t\tvar endIndex = nodeValue.indexOf('</html-frag>');\r\n\t\t\t\tvar html = nodeValue.substring(nodeValue.indexOf('<html-frag>') + 11,endIndex);\r\n\t\t\t\tobj[cNodeName] = html;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvar isURLNode = PTXMLCompositor.URLNodes[cNodeName] ? true : false;\r\n\t\t\t\tif (isURLNode && (nodeValue.indexOf('<a href=\"') > -1))\r\n\t\t\t\t{\r\n\t\t\t\t\tvar endIndex = nodeValue.indexOf('\"></a>');\r\n\t\t\t\t\tvar href = nodeValue.substring(nodeValue.indexOf('<a href=\"') + 9,endIndex);\r\n\t\t\t\t\tobj[cNodeName] = href;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\t\t\t\t\tobj[cNodeName] = w.getNodeValue(child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ((cNodeName == 'srcURL') && obj.className && (obj.className == 'PTHTMLPanel'))\r\n\t\t{\r\n\t\t\tvar tempPanelName = 'PTXMLCompositor_PanelLoadPointer_' + ++PTXMLCompositor.nextUID;\r\n\t\t\twindow[tempPanelName] = obj;\r\n\t\t\tdocument.PCC.RegisterForWindowEvent('on' + onFinishCompositorID, tempPanelName + '.loadSrcURL');\r\n\t\t}\r\n\t\tif (obj[cNodeName] && obj[cNodeName].parent && (obj[cNodeName].parent == PTXMLCompositor.VALUE_AUTOSET))\r\n\t\t{\r\n\t\t\tobj[cNodeName].parent = obj;\r\n\t\t}\r\n\t\telse if (index)\r\n\t\t{\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tif (obj[orderNum] && obj[orderNum].parent && (obj[orderNum].parent == PTXMLCompositor.VALUE_AUTOSET))\r\n\t\t\t{\r\n\t\t\t\tobj[orderNum].parent = parentObj;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj[cNodeName] && obj[cNodeName].uid && (obj[cNodeName].uid == PTXMLCompositor.VALUE_AUTOSET))\r\n\t\t{\r\n\t\t\tobj[cNodeName].uid = ++PTXMLCompositor.nextUID;\r\n\t\t}\r\n\t\telse if (index)\r\n\t\t{\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tif (obj[orderNum] && obj[orderNum].uid && (obj[orderNum].uid == PTXMLCompositor.VALUE_AUTOSET))\r\n\t\t\t{\r\n\t\t\t\tobj[orderNum].uid = ++PTXMLCompositor.nextUID;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (index)\r\n\t\t{\r\n\t\t\tvar orderNum = parseInt(index);\r\n\t\t\tif (obj[orderNum] && obj[orderNum].index && (obj[orderNum].index == PTXMLCompositor.VALUE_AUTOSET))\r\n\t\t\t{\r\n\t\t\t\tobj[orderNum].index = orderNum;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (cNodeName == 'objName')\r\n\t\t{\r\n\t\t\tvar globalObjectName = w.getNodeValue(child);\r\n\t\t\tif (globalObjectName && (globalObjectName.length > 0))\r\n\t\t\t{\r\n\t\t\t\tPTControls.makeGlobalObject(obj,globalObjectName);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn obj;\n}\n\nPTXMLCompositor.expandComponent = function(parentNode,node,w)\r\n{\r\n\tif (!node) { return false; }\r\n\tvar ptComponent = false;\r\n\ttry {\r\n\t\tvar cls = w.getAttribute(node,'class');\r\n\t} catch(e) {\r\n\t\treturn false;\r\n\t}\r\n\tvar elem = window[cls];\r\n\tif (!elem)\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\tvar mode = false;\r\n\ttry {\r\n\t\tmode = w.getAttribute(node,'mode');\r\n\t} catch(e) {}\n\n\tvar objNameNode = w.selectSingleNode(node,'objName');\r\n\tif (!objNameNode)\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\tvar objName = w.getNodeValue(objNameNode);\r\n\ttry {\r\n\t\tif (mode && (mode == 'merge'))\r\n\t\t{\r\n\t\t\twindow[objName] = window[cls].createFromNode(node,w,objName);\r\n\t\t\treturn window[objName];\r\n\t\t}\r\n\t\telse if (parentNode)\r\n\t\t{\r\n\t\t\tptComponent = window[cls].createFromXML(parentNode,w);\r\n\t\t}\r\n\t} catch(e) {\r\n\t\treturn false;\r\n\t}\r\n\tif (!ptComponent)\r\n\t{\r\n\t\ttry {\r\n\t\t\tptComponent = window[cls].createFromNode(node,w);\r\n\t\t} catch(e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tif (!ptComponent)\r\n\t{\r\n\t}\r\n\tPTControls.makeGlobalObject(ptComponent,objName,true);\r\n\treturn ptComponent;\n}\n\nPTXMLCompositor.unescapeTokens = function(str)\r\n{\r\n\treturn str;\n}\n\nPTXMLDocument = function(doc) \r\n{\r\n\tif (doc) { this._doc = doc; }\r\n\telse\r\n\t{\r\n\t\tvar msg = 'No document to wrap. To create a new document, use the PTXMLDocumentBuilder class.';\r\n\t\tthrow msg;\r\n\t}\n}\n\nPTXMLDocument.VERSION = '366908';\r\nPTXMLDocument.ELEMENT_NODE \t\t\t\t= 1;\r\nPTXMLDocument.ATTRIBUTE_NODE \t\t\t\t= 2;\r\nPTXMLDocument.TEXT_NODE \t\t\t\t\t= 3;\r\nPTXMLDocument.CDATA_SECTION_NODE \t\t\t= 4;\r\nPTXMLDocument.ENTITY_REFERENCE_NODE \t\t= 5;\r\nPTXMLDocument.ENTITY_NODE \t\t\t\t\t= 6;\r\nPTXMLDocument.PROCESSING_INSTRUCTION_NODE \t= 7;\r\nPTXMLDocument.COMMENT_NODE \t\t\t\t\t= 8;\r\nPTXMLDocument.DOCUMENT_NODE \t\t\t\t= 9;\r\nPTXMLDocument.DOCUMENT_TYPE_NODE \t\t\t= 10;\r\nPTXMLDocument.DOCUMENT_FRAGMENT_NODE \t\t= 11;\r\nPTXMLDocument.NOTATION_NODE \t\t\t\t= 12;\r\nPTXMLDocument.prototype.getUnderlyingObject = function()\r\n{\r\n\treturn this._doc;\n}\n\nPTXMLDocument.prototype.loadFromString = function(str)\r\n{\r\n\tvar ptdoc = PTXMLDocumentBuilder.createFromString(str);\r\n\tthis._doc = ptdoc._doc;\n}\n\nPTXMLDocument.prototype.serializeToString = function()\r\n{\r\n\tif (!this._doc)\r\n\t{\r\n\t\treturn '';\t\r\n\t}\r\n\tif (this._doc.xml) \t\r\n\t{\r\n\t\treturn this._doc.xml;\r\n\t} \r\n\telse if (window.XMLSerializer) \r\n\t{\r\n\t\tvar xml = (new XMLSerializer()).serializeToString(this._doc);\r\n\t\treturn xml;\r\n\t} \r\n\telse \r\n\t{\r\n\t\treturn '';\r\n\t}\n}\n\nPTXMLDocument.prototype.getDocumentElement = function()\r\n{\r\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_PTXML)\r\n\t{\r\n\t\treturn this._doc;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn this._doc.documentElement;\r\n\t}\n}\n\nPTXMLDocument.prototype.createElement = function(elementName)\r\n{\r\n\treturn this._doc.createElement(elementName);\n}\n\nPTXMLDocument.prototype.appendChild = function(node)\r\n{\r\n\treturn this._doc.appendChild(node);\n}\n\nPTXMLDocument.prototype.getElementsByTagName = function(tagName)\r\n{\r\n\treturn this._doc.getElementsByTagName(tagName);\n}\n\nPTXMLDocument.prototype.importNode = function(node, deep)\r\n{\r\n\treturn this._doc.importNode(node, deep);\n}\n\nPTXMLDocument.selectSingleNode = function(contextNode,expr)\r\n{\r\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MSXML)\r\n\t{\r\n\t\treturn contextNode.selectSingleNode(expr);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvar childNodes = contextNode.childNodes;\r\n\t\tif (childNodes)\r\n\t\t{\r\n\t\t\tvar len = childNodes.length;\r\n\t\t\tfor (var n = 0; n < len; n++)\r\n\t\t\t{\r\n\t\t\t\tvar cn = childNodes.item(n);\r\n\t\t\t\tif (cn.nodeName == expr)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn childNodes.item(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\n}\n\nPTXMLDocument.prototype.selectSingleNode = function(expr)\r\n{\r\n\treturn PTXMLDocument.selectSingleNode(this._doc,expr);\n}\n\nPTXMLDocument.getAttributeValue = function(node,attrName)\r\n{\r\n\tif (!node) { return null; }\r\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MSXML) \r\n\t{\r\n\t\treturn node.getAttribute(attrName);\r\n\t} \r\telse if (node.attributes && node.attributes.getNamedItem)\r\n\t{\r\n\t\tvar ni = node.attributes.getNamedItem(attrName);\r\n\t\tif (ni) { return ni.nodeValue; }\r\n\t}\r\n\treturn null;\n}\n\nPTXMLDocument.prototype.getAttributeValue = function(node,attrName)\r\n{\r\n\treturn PTXMLDocument.getAttributeValue(node,attrName);\n}\n\nPTXMLDocument.getNodeValue = function(node)\r\n{\r\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MSXML) \r\n\t{\r\n\t\tvar v = node.nodeValue;\r\n\t\tif (v) \t\t\t\t\t{ return v; } \r\n\t\telse if (node.text) \t{ return node.text; } \r\n\t\telse \t\t\t\t\t{ return null; }\r\n\t} \r\telse \r\n\t{\r\n\t\tif (node.childNodes && node.childNodes[1] && (node.childNodes[1].nodeType == PTXMLDocument.CDATA_SECTION_NODE))\r\n\t\t{\r\n\t\t\treturn node.childNodes[1].nodeValue;\r\n\t\t}\r\n\t\telse if (node.firstChild) \t\r\n\t\t{ \r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\telse\t\t\t\t\t\t\r\n\t\t{ \r\n\t\t\treturn null; \r\n\t\t}\r\n\t} \n}\n\nPTXMLDocument.prototype.getNodeValue = function(node)\r\n{\r\n\treturn PTXMLDocument.getNodeValue(node);\n}\n\nPTXMLDocumentBuilder = function() {}\n\nPTXMLDocumentBuilder.VERSION = '366908';\r\nPTXMLDocumentBuilder.PARSER_TYPE_MSXML = 'MSXML';\t\r\nPTXMLDocumentBuilder.PARSER_TYPE_MOZDP = 'MOZDP';\r\nPTXMLDocumentBuilder.PARSER_TYPE_PTXML = 'PTXML';\r\nPTXMLDocumentBuilder.parserType \t\t= false;\r\nPTXMLDocumentBuilder.parserTypeMSIE \t= false; \t \r\nPTXMLDocumentBuilder._testXMLString = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n<root>test</root>\\n';\r\nPTXMLDocumentBuilder._getParserTypeMSIE = function()\r\n{\r\n\tvar parserTypes = new Array(\r\n\t\t'MSXML2.DOMDocument.6.0',\r\n\t\t'MSXML2.DOMDocument.3.0',\r\n\t\t'MSXML2.DOMDocument.2.6',\r\n\t\t'MSXML2.DOMDocument',\r\n\t\t'MSXML.DOMDocument',\r\n\t\t'Microsoft.XMLDOM'\r\n\t);\r\n\tvar parserTypeMSIE = false;\r\n\tTEST:\r\n\tfor (var p = 0; p < parserTypes.length; p++)\r\n\t{\r\n\t\tvar parserType = parserTypes[p];\r\n\t\ttry {\r\n\t\t\tobject = new ActiveXObject(parserType);\r\n\t\t\tobject.async = false;\r\n\t\t\tobject.loadXML(PTXMLDocumentBuilder._testXMLString);\r\n\t\t\twhile (object.readyState != 4) {\r\n\t\t\t\tif (object.parseError.errorCode != 0) {\r\n\t\t\t\t\tcontinue TEST;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar doc = object.documentElement;\r\n\t\t\tif (!doc) { continue TEST; }\r\n\t\t\tvar ssn1Test = object.selectSingleNode('root');\r\n\t\t\tif (!ssn1Test) { continue TEST; }\r\n\t\t\tvar ceTest = object.createElement('newnode');\r\n\t\t\tif (!ceTest) { continue TEST; }\r\n\t\t}\r\n\t\tcatch(e) { continue TEST; }\r\n\t\tparserTypeMSIE = parserType;\r\n\t\tbreak;\r\n\t}\r\n\treturn parserTypeMSIE;\n}\n\nPTXMLDocumentBuilder.init = function()\r\n{\r\tif (PTBrowserInfo.IS_MSIE && PTBrowserInfo.MSIE_VERSION >= 5)\r\n\t{\r\n\t\tvar parserTypeMSIE = PTXMLDocumentBuilder._getParserTypeMSIE();\r\n\t\tif (parserTypeMSIE)\r\n\t\t{\r\n\t\t\tPTXMLDocumentBuilder.parserType = PTXMLDocumentBuilder.PARSER_TYPE_MSXML;\r\n\t\t\tPTXMLDocumentBuilder.parserTypeMSIE = parserTypeMSIE;\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\tif (PTBrowserInfo.IS_MOZILLA && window.DOMParser)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t(new DOMParser()).parseFromString(PTXMLDocumentBuilder._testXMLString,'text/xml');\r\n\t\t\tPTXMLDocumentBuilder.parserType = PTXMLDocumentBuilder.PARSER_TYPE_MOZDP;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcatch(e) {}\n\n\t}\r\n\tPTXMLDocumentBuilder.parserType = PTXMLDocumentBuilder.PARSER_TYPE_PTXML;\n}\n\nPTXMLDocumentBuilder.init();\r\nPTXMLDocumentBuilder._unescapeCDATAs = function(str)\r\n{\r\n\tvar startCDATA = /&lt;!\\[CDATA\\[/g;\r\n\tstr = str.replace(startCDATA,'<![CDATA[');\r\n\tvar endCDATA = /\\]\\]&gt;/g;\r\n\tstr = str.replace(endCDATA,']]>');\r\n\treturn str;\n}\n\nPTXMLDocumentBuilder._stripPreXML = function(str)\r\n{\r\n\tif (str.indexOf('<?xml') > -1)\r\n\t{\r\n\t\treturn str.substr(str.indexOf('<?xml'));\r\n\t}\r\n\telse { return str; }\n}\n\nPTXMLDocumentBuilder.createFromString = function(str)\r\n{\r\n\tstr = PTXMLDocumentBuilder._stripPreXML(str);\r\n\tstr = PTXMLDocumentBuilder._unescapeCDATAs(str);\r\n\tvar doc;\r\n\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MSXML)\r\n\t{\r\n\t\tif (str.indexOf('<?xml') == -1)\r\n\t\t{\r\n\t\t\tstr = '<?xml version=\"1.0\"?>\\n' + str;\r\n\t\t}\r\n\t\tdoc = new ActiveXObject(PTXMLDocumentBuilder.parserTypeMSIE);\r\n\t\tdoc.async = false;\r\n\t\tdoc.loadXML(str);\r\n\t\ttry {\r\t\t\tdoc.setProperty('NewParser',true);\r\n\t\t} catch(e) {}\n\n\t\twhile (doc.readyState != 4) { }\r\n\t}\r\n\telse if (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MOZDP)\r\n\t{\r\n\t\tvar domParser = new DOMParser();\r\n\t\tif (str.indexOf('<?xml') == -1)\r\n\t\t{\r\n\t\t\tstr = '<?xml version=\"1.0\"?>\\n' + str;\r\n\t\t}\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdoc = domParser.parseFromString(str,'text/xml');\r\n\t\t\tif(doc.documentElement.tagName == \"parsererror\")\r\n\t\t\t{\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t}\r\n\t}\r\n\telse if (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_PTXML)\r\n\t{\r\n\t\tdoc = PTXMLParser.parseFromString(str);\r\n\t}\r\n\treturn new PTXMLDocument(doc);\n}\n\nPTXMLDocumentBuilder.createFromURI = function(uri)\r\n{\r\n\tvar request = new PTHTTPGETRequest(uri, false, PTHTTPTransport.CCMODE_SYNC);\r\n\tvar resp = request.invoke();\r\tif(resp && resp.responseXML)\r\n\t{\r\n\t\treturn new PTXMLDocument(resp.responseXML);\r\n\t}\r\n\telse if (resp && resp.responseText)\r\n\t{\r\n\t\treturn PTXMLDocumentBuilder.createFromString(resp.responseText);\r\n\t}\r\n\telse\r\n\t{\r\n\t}\n}\n\nPTXMLDocumentBuilder.create = function()\r\n{\r\n\tvar doc;\r\tif (PTXMLDocumentBuilder.parserType == PTXMLDocumentBuilder.PARSER_TYPE_MSXML)\r\n\t{\r\n\t\tdoc = new ActiveXObject(PTXMLDocumentBuilder.parserTypeMSIE);\r\n\t}\r\telse if (document.implementation && document.implementation.createDocument)\r\n\t{\r\n\t\tdoc = document.implementation.createDocument('', '', null);\r\n\t}\r\n\treturn new PTXMLDocument(doc);\n}\n\nPTXMLParser = function() \r\n{ \r\n\treturn this;\n}\n\nPTXMLParser.VERSION = '366908';\r\nPTXMLParser.parseFromString = function(str)\r\n{\r\tvar doc;\r\n\tif (document.implementation && document.implementation.createDocument)\r\n\t{\r\n\t\tdoc = document.implementation.createDocument('', '', null);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\tvar frag = new _PTXMLParserFrag(doc);\r\n\tfrag.str = PTXMLUtil.stripProlog(str);\r\n\tPTXMLParser._recurseAndParse(frag);\r\n\tfor (var i=0; i<frag.childNodes.length; i++)\r\n\t{\r\n\t\tvar childNode = frag.childNodes[i];\r\t\tif (childNode.nodeType == 1) \r\n\t\t{\r\n\t\t\tdoc.appendChild(childNode);\r\n\t\t}\r\n\t}\r\n\treturn doc;\n}\n\n_PTXMLParserFrag = function(parentNode) \r\n{ \r\n\tthis.parentNode = parentNode;\r\n\tthis.str = new String();\r\n\tthis.childNodes = new Array();\r\n\tthis.end = new String();\n}\n\nPTXMLParser._getDoc = function(frag)\r\n{\r\n\tif (frag.parentNode.nodeType == 9) \r\n\t{\r\n\t\treturn frag.parentNode\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn frag.parentNode.ownerDocument;\r\n\t}\n}\n\nPTXMLParser._recurseAndParse = function(frag)\r\n{\r\twhile (1) {\r\t\tif (frag.str.length == 0) { return; }\r\n\t\tvar tagStart = frag.str.indexOf('<');\r\n\t\tif (tagStart != 0) \r\n\t\t{\r\t\t\tvar thisNodeIdx = frag.childNodes.length;\r\n\t\t\tfrag.childNodes[thisNodeIdx] = PTXMLParser._getDoc(frag).createTextNode('');\r\n\t\t\tif (tagStart == -1) \r\n\t\t\t{\r\n\t\t\t\tfrag.childNodes[thisNodeIdx].nodeValue = PTXMLUtil.unescapeEntities(frag.str);\r\n\t\t\t\tfrag.str = '';\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tfrag.childNodes[thisNodeIdx].nodeValue = PTXMLUtil.unescapeEntities(frag.str.substring(0,tagStart));\r\n\t\t\t\tfrag.str = frag.str.substring(tagStart,frag.str.length);\r\n\t\t\t}\r\n\t\t} \r\n\t\telse \r\n\t\t{\r\t\t\tif(frag.str.substring(1,2) == '?') \r\n\t\t\t{\r\n\t\t\t\tPTXMLParser._processPI(frag);\r\n\t\t\t} \r\n\t\t\telse if (frag.str.substring(1,4) == '!--') \r\n\t\t\t{\r\n\t\t\t\tPTXMLParser._processComment(frag);\r\n\t\t\t} \r\n\t\t\telse if (frag.str.substring(1,9) == '![CDATA[') \r\n\t\t\t{\r\n\t\t\t\tPTXMLParser._processCDATA(frag);\r\n\t\t\t} \r\n\t\t\telse if (frag.str.substring(1,frag.end.length + 3) == '/' + frag.end + '>' || PTXMLUtil.stripWhitespace(frag.str.substring(1,frag.end.length + 3)) == '/' + frag.end) \r\n\t\t\t{\r\t\t\t\tfrag.str = frag.str.substring(frag.end.length + 3,frag.str.length);\r\n\t\t\t\tfrag.end = '';\r\n\t\t\t\treturn;\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tPTXMLParser._processElement(frag);\r\n\t\t\t}\r\n\t\t}\r\n\t}\n}\n\nPTXMLParser._processElement = function(frag)\r\n{\r\n\tvar close = frag.str.indexOf('>');\r\n\tvar empty = (frag.str.substring(close - 1,close) == '/');\r\n\tif (empty) { close -= 1; }\r\n\tvar starttag = PTXMLUtil.normalizeWhitespace(frag.str.substring(1,close));\r\n\tvar nextspace = starttag.indexOf(' ');\r\n\tvar attribs = new String();\r\n\tvar name = new String();\r\n\tif (nextspace != -1) \r\n\t{\r\n\t\tname = starttag.substring(0,nextspace);\r\n\t\tattribs = starttag.substring(nextspace + 1,starttag.length);\r\n\t} \r\n\telse \r\n\t{ \r\n\t\tname = starttag; \r\n\t}\r\n\tvar thisNodeIdx = frag.childNodes.length;\r\n\tvar elmName = PTXMLUtil.stripWhitespace(name);\r\n\tfrag.childNodes[thisNodeIdx] = PTXMLParser._getDoc(frag).createElement(elmName);\r\n\tif (attribs.length > 0) \r\n\t{\r\n\t\tPTXMLParser._processAttributes(frag.childNodes[thisNodeIdx], attribs);\r\n\t}\r\n\tif (!empty) \r\n\t{\r\n\t\tvar childFrag = new _PTXMLParserFrag(frag.parentNode);\r\n\t\tchildFrag.str = frag.str.substring(close + 1,frag.str.length);\r\n\t\tchildFrag.end = name;\r\n\t\tPTXMLParser._recurseAndParse(childFrag);\r\n\t\tfor (var i=0; i<childFrag.childNodes.length; i++)\r\n\t\t{\r\n\t\t\tfrag.childNodes[thisNodeIdx].appendChild(childFrag.childNodes[i]);\r\n\t\t}\r\n\t\tfrag.str = childFrag.str;\r\n\t} \r\n\telse \r\n\t{\r\n\t\tfrag.str = frag.str.substring(close + 2,frag.str.length);\r\n\t}\n}\n\nPTXMLParser._processPI = function(frag)\r\n{\r\n\tvar close = frag.str.indexOf('?>');\r\n\tvar val = frag.str.substring(2,close);\r\n\tvar thisNodeIdx = frag.childNodes.length;\r\n\tfrag.childNodes[thisNodeIdx] = PTXMLParser._getDoc(frag).createProcessingInstruction();\r\n\tfrag.childNodes[thisNodeIdx].nodeValue = val;\r\n\tfrag.str = frag.str.substring(close + 2,frag.str.length);\n}\n\nPTXMLParser._processComment = function(frag)\r\n{\r\n\tvar close = frag.str.indexOf('-->');\r\n\tvar val = frag.str.substring(4,close);\r\n\tvar thisNodeIdx = frag.childNodes.length;\r\n\tfrag.childNodes[thisNodeIdx] = PTXMLParser._getDoc(frag).createComment();\r\n\tfrag.childNodes[thisNodeIdx].nodeValue = val;\r\n\tfrag.str = frag.str.substring(close + 3,frag.str.length);\n}\n\nPTXMLParser._processCDATA = function(frag)\r\n{\r\n\tvar close = frag.str.indexOf(']]>');\r\n\tvar val = frag.str.substring(9,close);\r\n\tvar thisNodeIdx = frag.childNodes.length;\r\n\tfrag.childNodes[thisNodeIdx] = PTXMLParser._getDoc(frag).createCDATASection();\r\n\tfrag.childNodes[thisNodeIdx].nodeValue = val;\r\n\tfrag.str = frag.str.substring(close + 3,frag.str.length);\n}\n\nPTXMLParser._processAttributes = function(node, str) \r\n{\r\n\twhile (1)\r\n\t{\r\n\t\tvar eq = str.indexOf('=');\r\n\t\tif (str.length == 0 || eq == -1) { return; }\r\n\t\tvar id1 = str.indexOf('\\'');\r\n\t\tvar id2 = str.indexOf('\\\"');\r\n\t\tvar ids = new Number();\r\n\t\tvar id = new String();\r\n\t\tif ((id1 < id2 && id1 != -1) || id2 == -1) \r\n\t\t{\r\n\t\t\tids = id1;\r\n\t\t\tid = '\\'';\r\n\t\t}\r\n\t\tif ((id2 < id1 || id1 == -1) && id2 != -1) \r\n\t\t{\r\n\t\t\tids = id2;\r\n\t\t\tid = '\\\"';\r\n\t\t}\r\n\t\tvar nextid = str.indexOf(id,ids + 1);\r\n\t\tvar val = str.substring(ids + 1,nextid);\r\n\t\tvar name = PTXMLUtil.stripWhitespace(str.substring(0,eq));\r\n\t\tnode.setAttribute(name, val);\r\n\t\tstr = str.substring(nextid + 1,str.length);\r\n\t}\n}\n\nPTXMLUtil = function() {}\n\nPTXMLUtil.VERSION = '366908';\r\nPTXMLUtil.stripProlog = function(str) \r\n{\r\n\tvar a = new Array();\r\n\ta = str.split('\\r\\n');\r\n\tstr = a.join('\\n');\r\n\ta = str.split('\\r');\r\n\tstr = a.join('\\n');\r\n\tvar start = str.indexOf('<');\r\n\tif (str.substring(start,start + 3) == '<?x' || str.substring(start,start + 3) == '<?X' ) \r\n\t{\r\n\t\tvar close = str.indexOf('?>');\r\n\t\tstr = str.substring(close + 2,str.length);\r\n\t}\r\n\tvar start = str.indexOf('<!DOCTYPE');\r\n\tif (start != -1) \r\n\t{\r\n\t\tvar close = str.indexOf('>',start) + 1;\r\n\t\tvar dp = str.indexOf('[',start);\r\n\t\tif(dp < close && dp != -1) \r\n\t\t{\r\n\t\t\tclose = str.indexOf(']>',start) + 2;\r\n\t\t}\r\n\t\tstr = str.substring(close,str.length);\r\n\t}\r\n\treturn str;\n}\n\nPTXMLUtil.stripWhitespace = function(str)\r\n{\r\n\tvar a = new Array();\r\n\ta = str.split('\\n');\r\n\tstr = a.join('');\r\n\ta = str.split(' ');\r\n\tstr = a.join('');\r\n\ta = str.split('\\t');\r\n\tstr = a.join('');\r\n\treturn str;\n}\n\nPTXMLUtil.normalizeWhitespace = function(str)\r\n{\r\n\tvar a = new Array();\r\n\ta = str.split('\\n');\r\n\tstr = a.join(' ');\r\n\ta = str.split('\\t');\r\n\tstr = a.join(' ');\r\n\treturn str;\n}\n\nPTXMLUtil.unescapeEntities = function(str) \r\n{\r\n\tvar a = new Array();\r\n\ta = str.split('&lt;');\r\n\tstr = a.join('<');\r\n\ta = str.split('&gt;');\r\n\tstr = a.join('>');\r\n\ta = str.split('&quot;');\r\n\tstr = a.join('\\\"');\r\n\ta = str.split('&apos;');\r\n\tstr = a.join('\\'');\r\n\ta = str.split('&amp;');\r\n\tstr = a.join('&');\r\n\treturn str;\n}\n\nPTXMLUtil.unescapeCDATAs = function(str)\r\n{\r\n\tvar startCDATA = /&lt;!\\[CDATA\\[/g;\r\n\tstr = str.replace(startCDATA,'<![CDATA[');\r\n\tvar endCDATA = /\\]\\]&gt;/g;\r\n\tstr = str.replace(endCDATA,']]>');\r\n\treturn str;\n}\n\nPTXMLUtil.stripPreXML = function(str)\r\n{\r\n\tif (str.indexOf('<?xml') > -1)\r\n\t{\r\n\t\treturn str.substr(str.indexOf('<?xml'));\r\n\t}\r\n\telse { return str; }\n}\n\nPTXMLWrapper = function()\r\n{\r\n\tthis.parser = 'PTXML';\r\n\tthis.parserString = '';\r\n\tthis.uidIndex = 1;\r\n\treturn this;\n}\n\nPTXMLWrapper.VERSION = '366908';\r\nPTXMLWrapper.NODE_ELEMENT\t\t\t\t\t= 1;\r\nPTXMLWrapper.NODE_ATTRIBUTE\t\t\t\t\t= 2;\r\nPTXMLWrapper.NODE_TEXT\t\t\t\t\t\t= 3;\r\nPTXMLWrapper.NODE_CDATA_SECTION\t\t\t\t\t= 4;\r\nPTXMLWrapper.NODE_ENTITY_REFERENCE\t\t\t\t= 5;\r\nPTXMLWrapper.NODE_ENTITY\t\t\t\t\t= 6;\r\nPTXMLWrapper.NODE_PROCESSING_INSTRUCTION\t\t\t= 7;\r\nPTXMLWrapper.NODE_COMMENT\t\t\t\t\t= 8;\r\nPTXMLWrapper.NODE_DOCUMENT\t\t\t\t\t= 9;\r\nPTXMLWrapper.NODE_DOCUMENT_TYPE\t\t\t\t\t= 10;\r\nPTXMLWrapper.NODE_DOCUMENT_FRAGMENT\t\t\t\t= 11;\r\nPTXMLWrapper.NODE_NOTATION\t\t\t\t\t= 12;\r\nPTXMLWrapper.unescapeCDATAs = function(str)\r\n{\r\n\tvar startCDATA = /&lt;!\\[CDATA\\[/g;\r\n\tstr = str.replace(startCDATA,'<![CDATA[');\r\n\tvar endCDATA = /\\]\\]&gt;/g;\r\n\tstr = str.replace(endCDATA,']]>');\r\n\treturn str;\n}\n\nPTXMLWrapper.stripPreXML = function(str)\r\n{\r\n\tif (str.indexOf('<?xml') > -1)\r\n\t{\r\n\t\treturn str.substr(str.indexOf('<?xml'));\r\n\t}\r\n\telse { return str; }\n}\n\nPTXMLWrapper.prototype.defaultPreferredParsers = new Array('MSXML','NS6','PTXML');\r\nPTXMLWrapper.prototype.xmlTestString = '<?xml version=\\\"1.0\\\" encoding=\"UTF-8\"?>\\n<pts:cjb xmlns:pts=\"http://pts.plumtree.com/\">Blah</pts:cjb>\\n';\r\nPTXMLWrapper.prototype.init = function(pref,ignoreNamespaces,requireXSL)\r\n{\r\n\tif (!pref) { pref = this.defaultPreferredParsers; }\r\n\tvar ua = new String(navigator.userAgent);\r\n\tPARSER:\r\n\tfor (var p = 0; p < pref.length; p++) {\r\n\t\tvar parser = pref[p];\r\n\t\tif (parser == 'MSXML') {\r\n\t\t\tvar useMSIE = this.checkMSIEParsers(ignoreNamespaces,requireXSL);\r\n\t\t\tif (useMSIE) {\r\n\t\t\t\tthis.parser = 'MSXML';\r\n\t\t\t\tbreak;\r\n\t\t\t} else { continue; }\r\n\t\t} else if (parser == 'NS6') {\r\n\t\t\ttry {\r\n\t\t\t\tvar DP = new DOMParser();\r\n\t\t\t\tvar xml = DP.parseFromString(this.xmlTestString,'text/xml');\r\n\t\t\t\tthis.parser = 'NS6';\r\n\t\t\t\tbreak PARSER;\r\n\t\t\t} catch(e) { continue; }\r\n\t\t} else if (parser == 'PTXML') {\r\n\t\t\tthis.parser = 'PTXML';\r\n\t\t\tbreak PARSER;\r\n\t\t}\r\n\t}\r\n\tvar brk = '';\r\n\tif (this.parser == 'MSXML')\r\n\t{\r\n\t\tthis.getNodeValue = _ptxmlw_getNodeValue_MSXML;\r\n\t\tthis.getNodeName = _ptxmlw_getNodeName_MSXML_NS6;\r\n\t\tthis.getAttribute = _ptxmlw_getAttribute_MSXML_PTXML;\r\n\t}\r\n\telse if (this.parser == 'NS6')\r\n\t{\r\n\t\tthis.getNodeValue = _ptxmlw_getNodeValue_NS6;\r\n\t\tthis.getNodeName = _ptxmlw_getNodeName_MSXML_NS6;\r\n\t\tthis.getAttribute = _ptxmlw_getAttribute_Other;\r\n\t}\r\n\telse if (this.parser == 'PTXML')\r\n\t{\r\n\t\tthis.getNodeValue = _ptxmlw_getNodeValue_Other;\r\n\t\tthis.getNodeName = _ptxmlw_getNodeName_Other;\r\n\t\tthis.getAttribute = _ptxmlw_getAttribute_MSXML_PTXML;\r\n\t}\n}\n\nPTXMLWrapper.prototype.checkMSIEParsers = function(ignoreNamespaces,requireXSL)\r\n{\r\n\tvar encoding = (ignoreNamespaces) ? '' : ' encoding=\"UTF-8\"';\r\n\tvar xml = '<?xml version=\"1.0\"' + encoding + '?>\\n<root>Test Text.</root>\\n';\r\n\tvar xmlNamespaces = '<?xml version=\"1.0\"' + encoding + '?>\\n<ns:root xmlns:ns=\"http://pts.plumtree.com/\">Namespace Test Text.</ns:root>\\n';\r\n\tvar xsl = '<?xml version=\"1.0\"' + encoding + '?><xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"pagina\"><xsl:processing-instruction name=\"cocoon-format\">type=\"text/html\"</xsl:processing-instruction><html><head><title><xsl:value-of select=\"titulus\"/></title></head> <body bgcolor=\"#ffffff\"> <xsl:apply-templates/> </body> </html> </xsl:template><xsl:template match=\"titulus\"><h1 align=\"center\"><font color=\"darkgreen\"><xsl:apply-templates/></font></h1></xsl:template><xsl:template match=\"auctor\"><h1 align=\"center\"><xsl:apply-templates/></h1> </xsl:template><xsl:template match=\"versus\"><p align=\"center\"><tt><xsl:apply-templates/></tt> </p></xsl:template></xsl:stylesheet>';\r\n\tvar parsers = new Array(\r\n\t\t'MSXML2.DOMDocument.6.0',\r\t\t'MSXML2.DOMDocument.3.0',\r\n\t\t'MSXML2.DOMDocument.2.6',\r\n\t\t'MSXML2.DOMDocument',\r\n\t\t'MSXML.DOMDocument',\r\n\t\t'Microsoft.XMLDOM'\r\n\t);\r\n\tvar useMSIE = false;\r\n\tTEST:\r\n\tfor (var p = 0; p < parsers.length; p++)\r\n\t{\r\n\t\tvar parser = parsers[p];\r\n\t\ttry {\r\n\t\t\tobject = new ActiveXObject(parser);\r\n\t\t\tobject.async = false;\r\n\t\t\tobject.loadXML(xml);\r\n\t\t\twhile (object.readyState != 4) {\r\n\t\t\t\tif (object.parseError.errorCode != 0) {\r\n\t\t\t\t\tcontinue TEST;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar doc = object.documentElement;\r\n\t\t\tif (!doc) { continue TEST; }\r\n\t\t\tvar ssn1Test = object.selectSingleNode('root');\r\n\t\t\tif (!ssn1Test) { continue TEST; }\r\n\t\t\tvar ceTest = object.createElement('newnode');\r\n\t\t\tif (!ceTest) { continue TEST; }\r\n\t\t\tif (!ignoreNamespaces)\r\n\t\t\t{\r\n\t\t\t\tvar xmlns = new ActiveXObject(parser);\r\n\t\t\t\txmlns.async = false;\r\n\t\t\t\txmlns.loadXML(xmlNamespaces);\r\n\t\t\t\tif (!xmlns) { continue TEST; }\r\n\t\t\t\tvar ssn3Test = xmlns.selectSingleNode('ns:root');\r\n\t\t\t\tif (!ssn3Test) { continue TEST; }\r\n\t\t\t}\r\n\t\t\tif (requireXSL)\r\n\t\t\t{\r\n\t\t\t\tvar stylesheet = new ActiveXObject(parser);\r\n\t\t\t\tstylesheet.async = false;\r\n\t\t\t\tstylesheet.loadXML(xsl);\r\n\t\t\t\tif (!stylesheet) { continue TEST; }\r\n\t\t\t\tvar xslText = object.transformNode(stylesheet);\r\n\t\t\t\tif (!xslText) { continue TEST; }\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(e) { continue TEST; }\r\n\t\tuseMSIE = true;\r\n\t\tthis.parserString = parser;\r\n\t\tbreak;\r\n\t}\r\n\treturn useMSIE;\n}\n\nPTXMLWrapper.prototype.newXMLFromString = function(str)\r\n{\r\n\tstr = PTXMLWrapper.stripPreXML(str);\r\n\tstr = PTXMLWrapper.unescapeCDATAs(str);\r\n\tvar newXML;\r\n\tif (this.parser == 'MSXML')\r\n\t{\r\n\t\tif (str.indexOf('<?xml') == -1)\r\n\t\t{\r\n\t\t\tstr = '<?xml version=\"1.0\"?>\\n' + str;\r\n\t\t}\r\n\t\tnewXML = new ActiveXObject(this.parserString);\r\n\t\tnewXML.async = false;\r\n\t\tnewXML.loadXML(str);\r\n\t\ttry {\r\t\t\tnewXML.setProperty('NewParser',true);\r\n\t\t} catch(e) {}\n\n\t\twhile (newXML.readyState != 4) { }\r\n\t}\r\n\telse if (this.parser == 'NS6')\r\n\t{\r\n\t\tvar DP = new DOMParser();\r\n\t\tif (str.indexOf('<?xml') == -1)\r\n\t\t{\r\n\t\t\tstr = '<?xml version=\"1.0\"?>\\n' + str;\r\n\t\t}\r\n\t\ttry\r\n\t\t{\r\n\t\t\tnewXML = DP.parseFromString(str,'text/xml');\r\n\t\t\tparserErrorNode = this.selectSingleNode(newXML,'parsererror');\r\n\t\t\tif (parserErrorNode)\r\n\t\t\t{\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t}\r\n\t}\r\n\telse if (this.parser == 'PTXML')\r\n\t{\r\n\t\tnewXML = new PTXMLParser(str);\r\n\t}\r\n\twhile (!newXML) {\r\n\t\tvar Start = new Date().valueOf();\r\n\t\twhile ((new Date().valueOf() - Start) < 1000) {}\n\n\t}\r\n\treturn newXML;\n}\n\nPTXMLWrapper.prototype.createNode = function(node,name,val)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\tvar newNode = node.ownerDocument.createElement(name);\r\n\t\tif (val || (val == 0) || (val == false)) {\r\n\t\t\tnewNode.text = new String(val);\r\n\t\t}\r\n\t\tnode.appendChild(newNode);\r\n\t\treturn newNode;\r\n\t} else {\r\n\t\tvar newNode = node.createNode(name,val);\r\n\t\treturn newNode;\r\n\t}\n}\n\nPTXMLWrapper.prototype.cloneNode = function(node)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\tvar newNode = node.cloneNode(true);\r\n\t\tif (node.parentNode) {\r\n\t\t\tnode.parentNode.appendChild(newNode);\r\n\t\t} else {\r\n\t\t\tnode.ownerDocument.documentElement.appendChild(newNode);\r\n\t\t}\r\t\tnewNode = this.createNewNodeUIDs(newNode);\r\n\t\treturn newNode;\r\n\t} else {\r\n\t\treturn node.parentNode.cloneNode(node);\r\n\t}\n}\n\nPTXMLWrapper.prototype.createNewNodeUIDs = function(node)\r\n{\r\n\tif (!node) { return; }\r\n\tvar node = this.recurseAndCreateNewNodeUIDs(node);\r\n\treturn node;\n}\n\nPTXMLWrapper.prototype.recurseAndCreateNewNodeUIDs = function(node)\r\n{\r\n\tnode.removeAttribute('uid');\r\n\tthis.getUID(node);\r\n\tif (node && node.childNodes && node.childNodes.length)\r\n\t{\r\n\t\tfor (var i = 0; i < node.childNodes.length; i++)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tvar itm = node.childNodes.item(i);\r\n\t\t\t\titm.removeAttribute('uid');\r\n\t\t\t\tthis.getUID(node.childNodes.item(i));\r\n\t\t\t\tnode.replaceChild(this.recurseAndCreateNewNodeUIDs(node.childNodes.item(i)), node.childNodes.item(i));\r\n\t\t\t} catch(e) {}\n\n\t\t}\r\n\t}\r\n\treturn node;\n}\n\nPTXMLWrapper.prototype.deleteNode = function(node)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\tif (node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t} else {\r\n\t\t\tdelete node;\r\n\t\t}\r\n\t} else {\r\n\t\tnode.deleteNode();\r\n\t}\n}\n\nPTXMLWrapper.prototype.selectSingleNode = function(node,val)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'PTXML'))\r\n\t{\r\n\t\treturn node.selectSingleNode(val);\r\n\t}\r\n\telse if (this.parser == 'NS6')\r\n\t{\r\n\t\tvar nodes = node.childNodes;\r\n\t\tif (nodes)\r\n\t\t{\r\n\t\t\tvar len = nodes.length;\r\n\t\t\tfor (var n = 0; n < len; n++)\r\n\t\t\t{\r\n\t\t\t\tvar cn = nodes.item(n);\r\n\t\t\t\tif (cn.nodeName == val)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn nodes.item(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\n}\n\nPTXMLWrapper.prototype.getElementsByTagName = function(node,tagName)\r\n{\r\n\tif (this.parser == 'PTXML')\r\n\t{\r\n\t\treturn node.selectNodes(tagName);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn node.getElementsByTagName(tagName);\r\n\t}\n}\n\nPTXMLWrapper.prototype.getNodeValue = function(node)\r\n{\r\n\tif (this.parser == 'MSXML') {\r\n\t\tvar v = node.nodeValue;\r\n\t\tif (v) {\r\n\t\t\treturn v;\r\n\t\t} else if (node.text) {\r\n\t\t\treturn node.text;\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t} else if (this.parser == 'NS6') {\r\n\t\tvar v = '';\r\n\t\tif (node.firstChild) { v = node.firstChild.nodeValue; }\r\n\t\treturn v;\r\n\t} else {\r\n\t\tif (node.getNodeValue) {\r\n\t\t\treturn node.getNodeValue();\r\n\t\t} else {\r\n\t\t\treturn node.value;\r\n\t\t}\r\n\t}\n}\n\n_ptxmlw_getNodeValue_MSXML = function(node)\r\n{\r\n\tvar v = node.nodeValue;\r\n\tif (v) {\r\n\t\treturn v;\r\n\t} else if (node.text) {\r\n\t\treturn node.text;\r\n\t} else {\r\n\t\treturn '';\r\n\t}\n}\n\n_ptxmlw_getNodeValue_NS6 = function(node)\r\n{\r\n\tvar v = '';\r\n\tif (node.childNodes && node.childNodes[1] && (node.childNodes[1].nodeType == PTXMLWrapper.NODE_CDATA_SECTION))\r\n\t{\r\n\t\treturn node.childNodes[1].nodeValue;\r\n\t}\r\n\tif (node.firstChild) { v = node.firstChild.nodeValue; }\r\n\treturn v;\n}\n\n_ptxmlw_getNodeValue_Other = function(node)\r\n{\r\n\tif (node.getNodeValue) {\r\n\t\treturn node.getNodeValue();\r\n\t} else {\r\n\t\treturn node.value;\r\n\t}\n}\n\nPTXMLWrapper.prototype.setNodeValue = function(node,val)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\tnode.text = new String(val);\r\n\t} else {\r\n\t\tnode.setNodeValue(val);\r\n\t}\n}\n\nPTXMLWrapper.prototype.getNodeName = function(node)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\treturn node.nodeName;\r\n\t} else {\r\n\t\treturn node.name;\r\n\t}\n}\n\n_ptxmlw_getNodeName_MSXML_NS6 = function(node)\r\n{\r\n\treturn node.nodeName;\n}\n\n_ptxmlw_getNodeName_Other = function(node)\r\n{\r\n\treturn node.name;\n}\n\nPTXMLWrapper.prototype.getAttribute = function(node,val)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'PTXML')) {\r\n\t\treturn node.getAttribute(val);\r\n\t} else {\r\n\t\tif (!node) { return; }\r\n\t\tvar ni = node.attributes.getNamedItem(val);\r\n\t\tif (ni) { return ni.nodeValue; }\r\t}\n}\n\n_ptxmlw_getAttribute_MSXML_PTXML = function(node,val)\r\n{\r\n\treturn node.getAttribute(val);\n}\n\n_ptxmlw_getAttribute_Other = function(node,val)\r\n{\r\n\tif (!node) { return; }\r\n\tvar ni = node.attributes.getNamedItem(val);\r\n\tif (ni) { return ni.nodeValue; }\n}\n\nPTXMLWrapper.prototype.getUID = function(node)\r\n{\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\tvar attrIDValue = this.getAttribute(node,'uid');\r\n\t\tif (attrIDValue) {\r\n\t\t\treturn attrIDValue;\r\n\t\t} else {\r\n\t\t\tvar newUID = this.uidIndex++;\r\n\t\t\tnode.setAttribute('uid',newUID);\r\n\t\t\treturn newUID;\r\n\t\t}\r\n\t} else {\r\n\t\treturn node.uid;\r\n\t}\n}\n\nPTXMLWrapper.prototype.getNodeByUID = function(uid,node)\r\n{\r\n\tif (!node) { return; }\r\n\tvar node = this.recurseAndFindNodeByUID(node,uid);\r\n\treturn node;\n}\n\nPTXMLWrapper.prototype.recurseAndFindNodeByUID = function(node,uid)\r\n{\r\n\tif (!node || !node.childNodes || !node.childNodes.length) { return; }\r\n\tvar targetNode;\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\t\tvar itm = node.childNodes.item(i);\r\n\t\t\tif (itm.nodeTypeString == 'element') {\r\n\t\t\t\tif (parseInt(this.getAttribute(itm,'uid')) == parseInt(uid)) {\r\n\t\t\t\t\ttargetNode = itm;\r\n\t\t\t\t\treturn itm;\r\n\t\t\t\t}\r\n\t\t\t\ttargetNode = this.recurseAndFindNodeByUID(itm,uid);\r\n\t\t\t\tif (targetNode) { return targetNode; }\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar itm = node.childNodes[i];\r\n\t\t\tif (!itm) { continue; }\r\n\t\t\tif (itm.nodeTypeString == 'element') {\r\n\t\t\t\tif (parseInt(itm.uid) == parseInt(uid)) {\r\n\t\t\t\t\ttargetNode = itm;\r\n\t\t\t\t\treturn itm;\r\n\t\t\t\t}\r\n\t\t\t\ttargetNode = this.recurseAndFindNodeByUID(itm,uid);\r\n\t\t\t\tif (targetNode) { return targetNode; }\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn targetNode;\n}\n\nPTXMLWrapper.prototype.genXML = function(xmlObject)\r\n{\r\n\tif (this.parser == 'MSXML') {\r\n\t\treturn xmlObject.xml;\r\n\t} else if (this.parser == 'NS6') {\r\n\t\treturn (new XMLSerializer()).serializeToString(xmlObject);\r\n\t} else {\r\n\t\treturn xmlObject.genXML();\r\n\t}\n}\n\nPTXMLWrapper.prototype.deleteNodeByUID = function(xmlObject,uid)\r\n{\r\n\tvar root;\r\n\tif ((this.parser == 'MSXML') || (this.parser == 'NS6')) {\r\n\t\troot = xmlObject.documentElement;\r\n\t} else {\r\n\t\troot = xmlObject;\r\n\t}\r\n\tvar node = this.getNodeByUID(uid,root);\r\n\tif (node) { this.deleteNode(node); }\n}\n\nvar XMLW = new PTXMLWrapper();\r\n","truncated":"false"}
{"page":"http://www.dg.gov.cn/","url":"http://www.dg.gov.cn/business/htmlfiles/js/ie-ff.js","body":"if(window.Event){\r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n event yes yes yes yes yes \r\n event.returnValue yes yes no no no \r\n event.cancelBubble yes yes no no no \r\n event.srcElement yes yes no no no \r\n event.fromElement yes yes no no no \r\n \r\n */ \r\n Event.prototype.__defineSetter__(\"returnValue\",function(b){// \r\n if(!b)this.preventDefault(); \r\n return b; \r\n }); \r\n Event.prototype.__defineSetter__(\"cancelBubble\",function(b){ \r\n if(b)this.stopPropagation(); \r\n return b; \r\n }); \r\n Event.prototype.__defineGetter__(\"srcElement\",function(){ \r\n var node=this.target; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"fromElement\",function(){ \r\n var node; \r\n if(this.type==\"mouseover\") \r\n node=this.relatedTarget; \r\n else if(this.type==\"mouseout\") \r\n node=this.target; \r\n if(!node)return; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"toElement\",function(){ \r\n var node; \r\n if(this.type==\"mouseout\") \r\n node=this.relatedTarget; \r\n else if(this.type==\"mouseover\") \r\n node=this.target; \r\n if(!node)return; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"offsetX\",function(){ \r\n return this.layerX; \r\n }); \r\n Event.prototype.__defineGetter__(\"offsetY\",function(){ \r\n return this.layerY; \r\n }); \r\n } \r\nif(window.Document){ \r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n document.documentElement yes yes yes yes no \r\n document.activeElement yes null no no no \r\n \r\n */ \r\n } \r\nif(window.Node){ \r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n Node.contains yes yes no no yes \r\n Node.replaceNode yes no no no no \r\n Node.removeNode yes no no no no \r\n Node.children yes yes no no no \r\n Node.hasChildNodes yes yes yes yes no \r\n Node.childNodes yes yes yes yes no \r\n Node.swapNode yes no no no no \r\n Node.currentStyle yes yes no no no \r\n \r\n */ \r\n Node.prototype.replaceNode=function(Node){\r\n this.parentNode.replaceChild(Node,this); \r\n } \r\n Node.prototype.removeNode=function(removeChildren){ \r\n if(removeChildren) \r\n return this.parentNode.removeChild(this); \r\n else{ \r\n var range=document.createRange(); \r\n range.selectNodeContents(this); \r\n return this.parentNode.replaceChild(range.extractContents(),this); \r\n } \r\n } \r\n Node.prototype.swapNode=function(Node){ \r\n var nextSibling=this.nextSibling; \r\n var parentNode=this.parentNode; \r\n node.parentNode.replaceChild(this,Node); \r\n parentNode.insertBefore(node,nextSibling); \r\n } \r\n } \r\nif(window.HTMLElement){ \r\n HTMLElement.prototype.__defineGetter__(\"all\",function(){ \r\n var a=this.getElementsByTagName(\"*\"); \r\n var node=this; \r\n a.tags=function(sTagName){ \r\n return node.getElementsByTagName(sTagName); \r\n } \r\n return a; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"parentElement\",function(){ \r\n if(this.parentNode==this.ownerDocument)return null; \r\n return this.parentNode; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"children\",function(){ \r\n var tmp=[]; \r\n var j=0; \r\n var n; \r\n for(var i=0;i<this.childNodes.length;i++){ \r\n n=this.childNodes[i]; \r\n if(n.nodeType==1){ \r\n tmp[j++]=n; \r\n if(n.name){ \r\n if(!tmp[n.name]) \r\n tmp[n.name]=[]; \r\n tmp[n.name][tmp[n.name].length]=n; \r\n } \r\n if(n.id) \r\n tmp[n.id]=n; \r\n } \r\n } \r\n return tmp; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"currentStyle\", function(){ \r\n return this.ownerDocument.defaultView.getComputedStyle(this,null); \r\n }); \r\n HTMLElement.prototype.__defineSetter__(\"outerHTML\",function(sHTML){ \r\n var r=this.ownerDocument.createRange(); \r\n r.setStartBefore(this); \r\n var df=r.createContextualFragment(sHTML); \r\n this.parentNode.replaceChild(df,this); \r\n return sHTML; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"outerHTML\",function(){ \r\n var attr; \r\n var attrs=this.attributes; \r\n var str=\"<\"+this.tagName; \r\n for(var i=0;i<attrs.length;i++){ \r\n attr=attrs[i]; \r\n if(attr.specified) \r\n str+=\" \"+attr.name+'=\"'+attr.value+'\"'; \r\n } \r\n if(!this.canHaveChildren) \r\n return str+\">\"; \r\n return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\"; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function(){ \r\n switch(this.tagName.toLowerCase()){ \r\n case \"area\": \r\n case \"base\": \r\n case \"basefont\": \r\n case \"col\": \r\n case \"frame\": \r\n case \"hr\": \r\n case \"img\": \r\n case \"br\": \r\n case \"input\": \r\n case \"isindex\": \r\n case \"link\": \r\n case \"meta\": \r\n case \"param\": \r\n return false; \r\n } \r\n return true; \r\n }); \r\n\r\n HTMLElement.prototype.__defineSetter__(\"innerText\",function(sText){ \r\n var parsedText=document.createTextNode(sText); \r\n this.innerHTML=parsedText; \r\n return parsedText; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"innerText\",function(){ \r\n var r=this.ownerDocument.createRange(); \r\n r.selectNodeContents(this); \r\n return r.toString(); \r\n }); \r\n HTMLElement.prototype.__defineSetter__(\"outerText\",function(sText){ \r\n var parsedText=document.createTextNode(sText); \r\n this.outerHTML=parsedText; \r\n return parsedText; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"outerText\",function(){ \r\n var r=this.ownerDocument.createRange(); \r\n r.selectNodeContents(this); \r\n return r.toString(); \r\n }); \r\n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n fHandler._ieEmuEventHandler=function(e){ \r\n window.event=e; \r\n return fHandler(); \r\n } \r\n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n } \r\n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \r\n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n else \r\n this.removeEventListener(shortTypeName,fHandler,true); \r\n } \r\n HTMLElement.prototype.contains=function(Node){ \r\n do if(Node==this)return true; \r\n while(Node=Node.parentNode); \r\n return false; \r\n } \r\n HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){ \r\n switch(where){ \r\n case \"beforeBegin\": \r\n this.parentNode.insertBefore(parsedNode,this); \r\n break; \r\n case \"afterBegin\": \r\n this.insertBefore(parsedNode,this.firstChild); \r\n break; \r\n case \"beforeEnd\": \r\n this.appendChild(parsedNode); \r\n break; \r\n case \"afterEnd\": \r\n if(this.nextSibling) \r\n this.parentNode.insertBefore(parsedNode,this.nextSibling); \r\n else \r\n this.parentNode.appendChild(parsedNode); \r\n break; \r\n } \r\n } \r\n HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){ \r\n var r=this.ownerDocument.createRange(); \r\n r.setStartBefore(this); \r\n var parsedHTML=r.createContextualFragment(htmlStr); \r\n this.insertAdjacentElement(where,parsedHTML); \r\n } \r\n HTMLElement.prototype.insertAdjacentText=function(where,txtStr){ \r\n var parsedText=document.createTextNode(txtStr); \r\n this.insertAdjacentElement(where,parsedText); \r\n } \r\n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n fHandler._ieEmuEventHandler=function(e){ \r\n window.event=e; \r\n return fHandler(); \r\n } \r\n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n } \r\n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \r\n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n else \r\n this.removeEventListener(shortTypeName,fHandler,true); \r\n } \r\n } \r\n///////////////////////////////////////////\t\r\nvar GetNodeValue = function(obj)\r\n{\r\n var str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.text;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.childNodes[0].nodeValue;\r\n }\r\n catch(ex)\r\n {\r\n str = \"\";\r\n }\r\n }\r\n return str;\r\n}\r\n\r\nif(document.implementation && document.implementation.createDocument)\r\n{\r\n XMLDocument.prototype.loadXML = function(xmlString)\r\n {\r\n var childNodes = this.childNodes;\r\n for (var i = childNodes.length - 1; i >= 0; i--)\r\n this.removeChild(childNodes[i]);\r\n\r\n var dp = new DOMParser();\r\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\r\n var newElt = this.importNode(newDOM.documentElement, true);\r\n this.appendChild(newElt);\r\n };\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var oNSResolver = this.createNSResolver(this.documentElement)\r\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\r\n var aResult = [];\r\n for( var i = 0; i < aItems.snapshotLength; i++)\r\n {\r\n aResult[i] = aItems.snapshotItem(i);\r\n }\r\n return aResult;\r\n }\r\n\r\n // prototying the Element\r\n Element.prototype.selectNodes = function(cXPathString)\r\n {\r\n if(this.ownerDocument.selectNodes)\r\n {\r\n return this.ownerDocument.selectNodes(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var xItems = this.selectNodes(cXPathString, xNode);\r\n if( xItems.length > 0 )\r\n {\r\n return xItems[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n \r\n // prototying the Element\r\n Element.prototype.selectSingleNode = function(cXPathString)\r\n { \r\n if(this.ownerDocument.selectSingleNode)\r\n {\r\n return this.ownerDocument.selectSingleNode(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n}","truncated":"false"}
{"page":"http://www.svenskakyrkan.se/","url":"https://www.svenskakyrkan.se/~js/global.min.js","body":"function encodeUTF8(n){try{return encodeURIComponent(n).replace(/\\+/g,\"%2B\")}catch(t){}return escape(n).replace(/\\+/g,\"%2B\")}function decodeUTF8(n){try{return decodeURIComponent(n.replace(/\\+/g,\" \"))}catch(t){}return unescape(n.replace(/\\+/g,\" \"))}function getXMLHttpRequestObject(){var n=null;try{n=new ActiveXObject(\"MSXML2.XMLHttp.6.0\")}catch(t){n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject(\"MSXML2.XMLHttp.3.0\")}return n}function getDomDocument(){var n=null;try{n=new ActiveXObject(\"MSXML2.DomDocument.6.0\");n.setProperty(\"ProhibitDTD\",!1);n.setProperty(\"AllowXsltScript\",!0);n.setProperty(\"ResolveExternals\",!0)}catch(t){try{n=new ActiveXObject(\"MSXML2.DomDocument.3.0\")}catch(t){n=document.implementation.createDocument(\"\",\"\",null)}}return n}function requestQueryString(n,t){var r,i,f,u;if(!t||(n||typeof n==\"string\"||(n=location.search),r=n.indexOf(\"?\"),r==-1))return null;for(i=null,n=n.substring(r),f=new RegExp(\"[\\\\?\\\\&]\"+t+\"\\\\=[^&#]*\",\"ig\"),u=null;(u=f.exec(n))!=null;)i=(i==null?\"\":i+\", \")+decodeUTF8(u[0].substring(t.length+2));return i}function getCookie(n,t){n=encodeUTF8(n);var u=document.cookie,f=new RegExp(\"(^|; )\"+n+\"\\\\=[^;]*\",\"i\"),i=null,r=f.exec(u);if(r==null)return null;if(i=r[0].substring(r[0].indexOf(\"=\")+1),!t)return decodeUTF8(i);for(u=i,t=encodeUTF8(t),f=new RegExp(\"(^|&)\"+t+\"\\\\=[^&]*\",\"ig\"),i=null,r=null;(r=f.exec(u))!=null;)i=(i==null?\"\":i+\", \")+r[0].substring(r[0].indexOf(\"=\")+1);return i==null?null:decodeUTF8(i)}function setCookie(n,t,i,r){var u=SiteURL,s,a,c,h,o;u?u.substring(8).indexOf(\"/\")>-1&&(u=u.substring(u.substring(8).indexOf(\"/\")+8),u=u.substring(0,u.lastIndexOf(\"/\"))):(u=new String(document.location.pathname),u=u.substring(0,u.lastIndexOf(\"/\")),u.indexOf(\"/\")!=0&&(u=\"/\"+u),(u.substring(u.length-3)==\"/sv\"||u.substring(u.length-3)==\"/fi\"||u.substring(u.length-3)==\"/nb\")&&(u=u.substring(0,u.length-3)));u||(u=\"/\");s=\"\";r&&(a=new Date,c=new Date,c.setTime(a.getTime()+864e5*r),s=\";expires=\"+c.toGMTString());var l=document.cookie,f=null,e=null;if(n=encodeUTF8(n),t=encodeUTF8(t),!i){for(f=new RegExp(\"(^|; )\"+n+\"\\\\=\",\"ig\");(e=f.exec(l))!=null;)o=e[0].replace(/; /g,\"\"),o.replace(/\\=/,\"\")!=n&&(document.cookie=o+\";path=\"+u+\";expires=Fri, 4 Mar 1980 08:19:41 UTC\");document.cookie=n+\"=\"+t+\";path=\"+u+s;return}if(i=encodeUTF8(i),f=new RegExp(\"(^|; )\"+n+\"\\\\=[^;]*\",\"i\"),e=f.exec(l),e==null){document.cookie=n+\"=\"+i+\"=\"+t+\";path=\"+u+s;return}for(h=e[0].substring(e[0].indexOf(\"=\")+1),f=new RegExp(\"(^|&)\"+i+\"\\\\=[^&]*(&|$)\",\"ig\"),h=h.replace(f,\"\"),document.cookie=n+\"=\"+i+\"=\"+t+(h?\"&\":\"\")+h+\";path=\"+u+s,f=new RegExp(\"(^|; )\"+n+\"\\\\=\",\"ig\");(e=f.exec(l))!=null;)o=e[0].replace(/; /g,\"\"),o.replace(/\\=/,\"\")!=n&&(document.cookie=o+\";path=\"+u+\";expires=Fri, 4 Mar 1980 08:19:41 UTC\")}function getXMLHttpRequest(){var n=null;try{return n=getXMLHttpRequestObject()}catch(t){try{return n=new ActiveXObject(\"Microsoft.XMLHttp\")}catch(t){try{return n=new XMLHttpRequest}catch(t){return null}}}return null}function showModalBrowseDialog(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){if(a)return v||(v=[t,i,new Array(r),null,null,null]),a(v);var w=[t,i,r,u,f,e,o,s,h,c,l,y,p],b=getAdminURL(\"CS_Dialog_Open.htm\");return window.showModalDialog(b,w,\"dialogHeight:480px;dialogWidth:900px;status:no;status:no;scroll:no;help:no;resizable:yes\")}function HTMLEncode(n){if(!n||typeof n!=\"string\")return n;var t=/&/g,i=/\"/g,r=/</g,u=/>/g;return t.test(n)&&(n=n.replace(t,\"&amp;\")),i.test(n)&&(n=n.replace(i,\"&quot;\")),r.test(n)&&(n=n.replace(r,\"&lt;\")),u.test(n)&&(n=n.replace(u,\"&gt;\")),fixLineEndings(n)}function fixLineEndings(n){if(!n)return n;var t=/([^\\r]|^)(?=\\n)/g;return t.test(n)?n.replace(t,\"$1\\r\"):n}function xPathEncode(n){return n.search(/'/)>-1?\"concat('\"+n.replace(/'/g,\"', \\\"'\\\", '\")+\"')\":\"'\"+n+\"'\"}function showModalLinkDialog(n,t,i,r,u,f,e,o,s,h,c,l){var a=[t,i,r,u,f,e,o,s,h,c,l],v=getAdminURL(\"CS_Dialog_Link.htm\");return window.showModalDialog(v,a,\"DialogHeight:228px;DialogWidth:480px;status:No;scroll:no;\")}function showModalImageDialog(n,t,i,r,u,f){var e=getAdminURL(\"w_dialog_image_properties.htm\"),o=[t,i,r,u,f];window.showModalDialog(e,o,\"dialogHeight:740px;dialogWidth:460px;status:no;status:no;scroll:no;help:no;resizable:no\")}function sortCase(n,t){var i=n,r=t,u;try{return(typeof i!=\"string\"&&(i=i.toString()),typeof r!=\"string\"&&(r=r.toString()),i=i.toLowerCase(),r=r.toLowerCase(),i==r)?0:(u=[i,r],u.sort(),u[0]==i?-1:1)}catch(f){return 0}}function xmlHttp(n,t,i){return getXMLDOM(n,t,i)}function getDOMObject(){var n;try{return n=getDomDocument(),n.preserveWhiteSpace=!0,n.setProperty(\"SelectionLanguage\",\"XPath\"),n.async=!1,n}catch(t){}try{return n=new ActiveXObject(\"Microsoft.XmlDom\"),n.preserveWhiteSpace=!0,n.setProperty(\"SelectionLanguage\",\"XPath\"),n.async=!1,n}catch(t){}try{return document.implementation.createDocument(\"\",\"\",null)}catch(t){}return null}function getDOM(n,t){var i=getDOMObject();return i==null?null:(t?i.load(t):n&&i.loadXML(n),(i.parseError.errorCode!=0||i.xml.length==0)&&(window.clipboardData&&confirm(\"The server returned invalid xml. Would you like to copy the text content to your clipboard? URL: \"+t+\". XML: \"+n)&&window.clipboardData.setData(\"Text\",i.text),i.loadXML(\"<root><result>\"+i.parseError.errorCode+\"<\\/result><resulttext>\"+HTMLEncode(i.parseError.reason)+\"<\\/resulttext><status>\"+i.parseError.errorCode+\"<\\/status><statustext>\"+HTMLEncode(i.parseError.reason)+\"<\\/statustext><\\/root>\")),i)}function getXMLDOM(n,t,i){var u=getXMLHttpRequest(),l,r,e,h,s,o,c;if(u==null)return null;l=n;window.DocumentVersionInformation&&n.indexOf(\".ashx\")!=-1&&(n+=n.indexOf(\"?\")==-1?\"?\":\"&\",n+=\"DocumentVersionInformation=\"+DocumentVersionInformation.contentVersion);try{u.open(t,n,!1)}catch(f){return f.description?getDOM(\"<root><result>\"+f.number+\"<\\/result><resulttext>\"+HTMLEncode(f.description)+\"<\\/resulttext><status>\"+f.number+\"<\\/status><statustext>\"+HTMLEncode(f.description)+\"<\\/statustext><\\/root>\"):getDOM(\"<root><result>-1<\\/result><resulttext>\"+HTMLEncode(f)+\"<\\/resulttext><status>-1<\\/status><statustext>\"+HTMLEncode(f)+\"<\\/statustext><\\/root>\")}if(u.setRequestHeader(\"Accept\",\"text/xml\"),!IsMozilla)try{u.responseType=\"msxml-document\"}catch(f){}r=null;try{u.send(i)}catch(f){r=getXmlHttpXMLDocument(u);r.loadXML(\"<root><result>-1<\\/result><resulttext>Could not connect to web server.<\\/resulttext><status>-1<\\/status><statustext>Could not connect to web server.<\\/statustext><\\/root>\")}n=l;r=getXmlHttpXMLDocument(u);try{r.setProperty(\"SelectionLanguage\",\"XPath\");(r.parseError.errorCode!=0||r.xml.length==0)&&(window.clipboardData&&confirm(\"The server returned invalid xml. Would you like to copy the text content to your clipboard? URL: \"+n)&&window.clipboardData.setData(\"Text\",u.responseText),r.parseError.errorCode==0?r.loadXML(\"<root><result>\"+u.status+\"<\\/result><resulttext>\"+HTMLEncode(u.statusText)+\"<\\/resulttext><status>\"+u.status+\"<\\/status><statustext>\"+HTMLEncode(u.statusText)+\"<\\/statustext><\\/root>\"):r.loadXML(\"<root><result>\"+r.parseError.errorCode+\"<\\/result><resulttext>\"+HTMLEncode(r.parseError.reason)+\"<\\/resulttext><status>\"+r.parseError.errorCode+\"<\\/status><statustext>\"+HTMLEncode(r.parseError.reason)+\"<\\/statustext><\\/root>\"));r.preserveWhiteSpace=!0}catch(f){}if(r==null)return getDOM(\"<root><result>\"+u.status+\"<\\/result><resulttext>\"+HTMLEncode(u.statusText)+\"<\\/resulttext><status>\"+u.status+\"<\\/status><statustext>\"+HTMLEncode(u.statusText)+\"<\\/statustext><\\/root>\",null);try{if(e=r.documentElement.selectSingleNode(\"status\"),e&&!EnableAnonymousAccess){if((h=e.text,h==\"-5\"&&(o=new mWindow(getAdminURL(\"CS_Dialog_Connect.htm\"),400,300,\"\"),o.showModal()))||h==\"-6\"&&(o=new mWindow(getAdminURL(\"CS_Dialog_CustomLogInPage.htm?ReturnURL=\"+encodeUTF8(n)),400,300,r,!0,!1,!1),o.showModal()))return getXMLDOM(n,t,i);if(h==\"-7\"&&!HasRenewedSession)return HasRenewedSession=!0,getXMLDOM(n,t,i);if(h==\"-10\"&&window.DocumentVersionInformation&&GlobalEditTemplateFocusTimeoutId!=-1){if(GlobalEditTemplateFocusTimeoutId>0&&window.clearTimeout(GlobalEditTemplateFocusTimeoutId),GlobalEditTemplateFocusTimeoutId=-1,window.showModalDialog&&(o=new mWindow(getAdminURL(\"CS_Dialog_ConfirmDocumentReload.htm\"),300,150,[\"Dokumentet har modifierats utanf\\u00f6r detta f\\u00f6nster. Vad vill du g\\u00f6ra?\",!0],!1,!1,!1),s=o.showModal()),typeof s==\"number\"&&window.showModalDialog||(c=confirm(\"Dokumentet har modifierats utanf\\u00f6r detta f\\u00f6nster. Vill du ladda om?\"),c===!0&&(s=6),c===!1&&(s=5)),GlobalEditTemplateFocusTimeoutId=-2,s==5)return window.DocumentVersionInformation.contentVersion=0,window.setTimeout(function(){GlobalEditTemplateFocusTimeoutId=0},1e3),getXMLDOM(n,t,i);s==6?(window.detachEvent?window.detachEvent(\"onbeforeunload\",onBeforeEditTemplateUnload):window.removeEventListener(\"beforeunload\",onBeforeEditTemplateUnload,!1),location.replace(location.href)):window.setTimeout(function(){GlobalEditTemplateFocusTimeoutId=0},1e3)}}HasRenewedSession=!1;window.DocumentVersionInformation&&(e=r.documentElement.selectSingleNode(\"DocumentVersionInformation\"),e&&(DocumentVersionInformation.contentVersion=parseInt(e.getAttribute(\"contentVersion\"))))}catch(f){}return r}function selectSingleNode(n){var t=null;return t=this.ownerDocument?this.ownerDocument.evaluate(n,this,nsResolver,XPathResult.ANY_TYPE,null):this.evaluate(n,this,nsResolver,XPathResult.ANY_TYPE,null),t.iterateNext()}function selectNodes(n){var r=null,t,i;for(r=this.ownerDocument?this.ownerDocument.evaluate(n,this,nsResolver,XPathResult.ANY_TYPE,null):this.evaluate(n,this,nsResolver,XPathResult.ANY_TYPE,null),t=[],i=null;(i=r.iterateNext())!=null;)t[t.length]=i;return t}function loadXML(n){for(var t=this,f=new DOMParser,r=f.parseFromString(n,\"text/xml\"),i,u;t.hasChildNodes();)t.removeChild(t.lastChild);for(i=0;i<r.childNodes.length;i++)u=t.importNode(r.childNodes[i],!0),t.appendChild(u)}function nsResolver(n){for(var t=0;t<MozillaSelectionNameSpaceArr.length;t++)if(MozillaSelectionNameSpaceArr[t][0]==n)return MozillaSelectionNameSpaceArr[t][1];return null}function buildDOMForMozilla(){window.XMLDocument&&XMLDocument.prototype.getElementsByTagName&&(XMLDocument.prototype.__defineGetter__(\"parseError\",function(){var n=this.getElementsByTagName(\"parsererror\"),t=n.length==0?0:-1,i=n.length==0?\"\":n[0].textContent;return{errorCode:t,reason:i}}),XMLDocument.prototype.setProperty=function(n,t){switch(n){case\"SelectionNamespaces\":/xmlns\\:(\\w+)\\=['\"]([\\s\\S]+?)['\"]/.test(t)&&(MozillaSelectionNameSpaceArr[MozillaSelectionNameSpaceArr.length]=[RegExp.$1,RegExp.$2]);break;default:throw\"Invalid or unrecognised property\";}},XMLDocument.prototype.loadXML=loadXML,XMLDocument.prototype.load=function(n){for(var r=getXMLDOM(n,\"GET\",null),t=this,i,u;t.hasChildNodes();)t.removeChild(t.lastChild);for(i=0;i<r.childNodes.length;i++)u=t.importNode(r.childNodes[i],!0),t.appendChild(u)},buildNodeForMozilla(XMLDocument),buildNodeForMozilla(Element),Text.prototype.__defineGetter__(\"text\",nodeGetText),Text.prototype.__defineSetter__(\"text\",nodeSetText),Text.prototype.__defineGetter__(\"xml\",_Node_getXML),buildAttributeForMozilla())}function _Node_getXML(){var n=new XMLSerializer;return n.serializeToString(this)}function buildNodeForMozilla(n){n.prototype.selectSingleNode=selectSingleNode;n.prototype.selectNodes=selectNodes;n.prototype.__defineGetter__(\"xml\",_Node_getXML);n.prototype.__defineGetter__(\"text\",nodeGetText);n.prototype.__defineSetter__(\"text\",nodeSetText);n.prototype.transformNode=function(n){var t=new XSLTProcessor;t.importStylesheet(n);var i=t.transformToDocument(this),r=new XMLSerializer;return r.serializeToString(i)};n.prototype.transformNodeToObject=function(n,t){t.loadXML(this.transformNode(n))}}function nodeGetText(){return this.textContent}function nodeSetText(n){this.nodeValue==null?this.textContent=n:this.nodeValue=n}function buildAttributeForMozilla(){Attr.prototype.__defineGetter__(\"text\",nodeGetText);Attr.prototype.__defineSetter__(\"text\",nodeSetText);Attr.prototype.__defineGetter__(\"xml\",function(){return this.nodeName+'=\"'+this.text+'\"'})}function showResultText(n,t){var i=getDOM(\"<root><status>\"+n+\"<\\/status><statustext>\"+HTMLEncode(t)+\"<\\/statustext><\\/root>\");return showResult(i)}function showResult(n){return showResultEx(n)==0}function showResultEx(n,t){var r=0,u=\"\",i,h,f,o,e,s,n,c,l,a;if(n.documentElement==null)return 0;if(i=n.documentElement.selectSingleNode(\"status\"),h=null,i&&(r=parseInt(i.text),h=i.getAttribute(\"parsed\")),i=n.documentElement.selectSingleNode(\"statustext\"),i&&(u=i.text),i=n.documentElement.selectSingleNode(\"result\"),i&&(r=parseInt(i.text)),i=n.documentElement.selectSingleNode(\"resulttext\"),i&&(u=i.text),i=n.documentElement.selectSingleNode(\"statusfulltext\"),i&&(u=i.text),i=n.documentElement.selectSingleNode(\"resultfulltext\"),i&&(u=i.text),r==0)return r;if(r>999&&r<3e3&&h!=\"1\"){f=Lang;o=\"\";try{o=top.location.toString()}catch(v){o=location.toString()}try{AdminURL.length>0&&o.indexOf(AdminURL)==0&&(f=\"\",e=o.substring(AdminURL.length),e.indexOf(\"/\")>-1&&(e=e.substring(0,e.indexOf(\"/\")),f=e))}catch(v){}f=f.replace(\"/\",\"\");s=\"<root><parameters>\";s+=\"<parameter name='OriginalMessage'>\"+HTMLEncode(u)+\"<\\/parameter><parameter name='MessageId'>\"+r.toString()+\"<\\/parameter><parameter name='LanguageCode'>\"+f+\"<\\/parameter><\\/parameters><\\/root>\";n=getXMLDOM(getAdminURL(\"WebAPI/ContentStudio_CSApplication.ashx?Action=TranslateMessage\"),\"POST\",s);c=n.selectSingleNode(\"//message\");c!=null?u=c.text:(u+=\" (An error occured in the errorhandler)\\nXML sent:\"+s+\"\\nXML recived:\"+n.xml,r=-1)}if(typeof t==\"string\"){l=t.split(\", \");for(a in l)if(parseInt(l[a])==r)return r}return r!=-10&&raiseCSError(u,r,window.CategoryID,window.DocumentID),r}function CSF_hasUserPermission(n,t,i){var r=0,u,f,o;try{switch(t.toUpperCase()){case\"R\":break;case\"U\":break;case\"C\":break;case\"D\":break;default:return raiseCSError(\"Invalid containertype\"),!1}}catch(e){return raiseCSError(\"Invalid argument 'type' \\n\"+e),!1}try{switch(i.toLowerCase()){case\"browse\":r=1;break;case\"read\":r=2;break;case\"write\":r=4;break;case\"create\":r=8;break;case\"delete\":r=16;break;case\"sendforrevision\":r=32;break;case\"removefromrevision\":r=64;break;case\"reject\":r=128;break;case\"approve\":r=256;break;case\"readcontainer\":r=512;break;case\"writecontainer\":r=1024;break;case\"createcontainer\":r=2048;break;case\"deletecontainer\":r=4096;break;case\"setowner\":r=8192;break;case\"admin\":r=8388608;break;case\"default\":return raiseCSError(\"Invalid permission name '\"+i+\"'\"),!1}}catch(e){return raiseCSError(\"Invalid argument 'namedPermission' \\n\"+e),!1}return(u=\"WebAPI/ContentStudio_Security_AccessControl.ashx?Action=ObjectAccessCheck&ObjectId=\"+n+\"&ObjectType=\"+t+\"&AccessMask=\"+r,u=getAdminURL(u),f=getXMLDOM(u,\"GET\",null),!showResult(f))?!1:(o=f.documentElement.selectSingleNode(\"access[.='grant']\"),o==null)?!1:!0}function getAdminURL(n){typeof n!=\"string\"&&(n=\"\");var t=null;return AdminURL.length>0&&(!EnableAnonymousAccess||(t=getCookie(\"SessionID\"))!=null&&t!=\"\"&&t!=\"\")?AdminURL+Lang+n:(SiteURL.length==0&&(SiteURL=location.href.substring(0,location.href.lastIndexOf(\"/\")+1).toLowerCase()),SiteURL+\"~js/DelegateHttpRequest.ashx?Action=sendrequest&Lang=\"+encodeUTF8(Lang)+\"&URL=\"+encodeUTF8(n))}function CSF_OpenWindow(n,t){return window.open(n.href,t),!1}function getXmlHttpXMLDocument(n){var t=n.responseXML;return!IsMozilla||t instanceof XMLDocument||(t=getDOM(n.responseText)),t}function documentInformation(n,t){var o=DocumentId,s=PresentationTemplateId,h=EditId,c=RefId,r,u,f,e,i;if(n&&(n.indexOf(\":\")==-1||n.indexOf(\"//\")>-1)){try{if(r=this.xmlHttp=getXMLHttpRequestObject(),n.indexOf(\"#\")!=-1&&(n=n.substring(0,n.indexOf(\"#\"))),n+=n.indexOf(\"?\")==-1?\"?CS_GetResolveInformation=1\":\"&CS_GetResolveInformation=1\",u=!1,f=this,t&&(r.onreadystatechange=function(){r.readyState==4&&(f.callback(r),t.call(f,f))},u=!0),r.open(\"GET\",n,u),!IsMozilla)try{r.responseType=\"msxml-document\"}catch(l){}if(r.send(),e=null,u||r.status!=200||(e=r.getResponseHeader(\"Content-Type\"))==null||e.toLowerCase()!=\"text/xml\")i=requestQueryString(n,\"id\"),i&&(o=parseInt(i)),i=requestQueryString(n,\"editid\"),i&&(h=parseInt(i)),i=requestQueryString(n,\"ptid\"),i&&(s=parseInt(i)),i=requestQueryString(n,\"refid\"),i&&(c=parseInt(i));else{this.callback(r);return}}catch(l){}u||(this.xmlHttp=null)}this.documentId=o;this.documentPath=n;this.documentUrl=n;this.editId=h;this.presentationTemplateId=s;this.refId=c}function attachToCSEvent(n,t){for(var f,i,e=n.split(/\\s+/),r=!0,u=0;u<e.length;u++)f=e[u],i=!1,document.addEventListener?i=document.addEventListener(f,t,!1):document.attachEvent(\"onpropertychange\",function(n){n.propertyName==f&&(i=t(n))}),typeof i==\"boolean\"&&(r=r&&i);return r}function dispatchCSEvent(n,t,i){var u=!0,r,f;if(document.createEvent){r=null;try{r=new CustomEvent(n,{bubbles:!1,cancelable:t,detail:i})}catch(e){r=document.createEvent(\"CustomEvent\");r.initCustomEvent(n,!1,t,i)}u=document.dispatchEvent(r);u&&frameElement&&(u=frameElement.dispatchEvent(r))}else document.createEventObject&&(r=document.createEventObject(),r.returnValue=!0,r.expando=i,r.propertyName=n,f=document.fireEvent(\"onpropertychange\",r),r.returnValue===!1&&(u=!1),u&&frameElement&&(frameElement.fireEvent(\"onpropertychange\",r),r.returnValue===!1&&(u=!1)));return u}function raiseCSError(n,t,i,r,u){var o=function(n){this.message=n},f,e;return o.prototype={message:\"\",number:0,documentId:0,categoryId:0,eptField:null},f=new o(n),t&&(t=parseInt(t),t>0&&(n=\"(\"+t+\") \"+n),f.number=t),i&&(f.categoryId=parseInt(i)),r&&(f.documentId=parseInt(r)),u&&(f.eptField=u),e=dispatchCSEvent(\"cserror\",!0,f),e&&alert(n),e}var HasRenewedSession;window.execScript&&window.dialogWidth&&(window.execScript('Sub VBAlert(msg)\\nMsgBox msg, vbExclamation, \"Content Studio\"\\nEnd Sub',\"VBScript\"),window.execScript(\"Function ShowOkCancelDialog(msg, title)\\nShowOkCancelDialog = MsgBox(msg, vbOkCancel Or vbQuestion, title)\\nEnd function\",\"VBScript\"),window.alert=function(n){typeof n==\"undefined\"&&(n=\"undefined\");n===null&&(n=\"null\");try{typeof n!=\"string\"&&(n=n.toString())}catch(t){n=\"[\"+typeof n+\"]\"}VBAlert(n)},window.confirm=function(n){typeof n==\"undefined\"&&(n=\"\");n===null&&(n=\"null\");try{typeof n!=\"string\"&&(n=n.toString())}catch(t){n=\"[\"+typeof n+\"]\"}return ShowOkCancelDialog(n,\"Content Studio\")==1});var EnableAnonymousAccess=!1,MozillaSelectionNameSpaceArr=[],IsMozilla=navigator.userAgent.indexOf(\"MSIE\")==-1&&typeof document.implementation.createDocument==\"function\";IsMozilla&&buildDOMForMozilla();HasRenewedSession=!1;documentInformation.prototype={documentId:0,documentPath:\"\",guoid:\"\",documentUrl:\"\",editId:0,presentationTemplateId:0,refId:0,versionNumber:0,documentType:\"\",contentType:\"\",categoryId:\"\",xmlHttp:null,abort:function(){this.xmlHttp&&(this.xmlHttp.abort(),this.xmlHttp=null)},callback:function(n){if(n.status!=200){this.xmlHttp=null;return}var i=getXmlHttpXMLDocument(n),t=i.selectSingleNode(\"/*/identifier/@documentid\");t&&(dId=parseInt(t.text,10));t=i.selectSingleNode(\"/*/identifier/@editid\");t&&(eId=parseInt(t.text,10));t=i.selectSingleNode(\"/*/identifier/@presentationtemplateid\");t&&(pId=parseInt(t.tex,10));t=i.selectSingleNode(\"/*/identifier/@refid\");t&&(rId=parseInt(t.text,10));this.documentId=dId;this.editId=eId;this.presentationTemplateId=pId;this.refId=rId;t=i.selectSingleNode(\"/*/identifier/@documentpath\");t&&(this.documentPath=t.text);t=i.selectSingleNode(\"/*/identifier/@guoid\");t&&(this.guoid=t.text);t=i.selectSingleNode(\"/*/identifier/@documenturl\");t&&(this.documentUrl=t.text);t=i.selectSingleNode(\"/*/identifier/@versionnumber\");t&&(this.versionNumber=parseInt(t.text,10));t=i.selectSingleNode(\"/*/identifier/@documenttype\");t&&(this.documentType=t.text);t=i.selectSingleNode(\"/*/identifier/@contenttype\");t&&(this.contentType=t.text);t=i.selectSingleNode(\"/*/identifier/@categoryid\");t&&(this.categoryId=parseInt(t.text,10));this.xmlHttp=null}};\n//# sourceMappingURL=global.min.js.map","truncated":"false"}
{"page":"http://www.puredata.info/","url":"http://puredata.info/portal_javascripts/Plone%20Default/ploneScripts2304.js","body":"\n/* Merged Plone Javascript file\n * This file is dynamically assembled from separate parts.\n * Some of these parts have 3rd party licenses or copyright information attached\n * Such information is valid for that section,\n * not for the entire composite file\n * originating files are separated by ----- filename.js -----\n */\n\n/* ----- register_function.js ----- */\n/* Essential javascripts, used a lot. \n * These should be placed inline\n * We have to be certain they are loaded before anything that uses them \n */\n\n// check for ie5 mac\nvar bugRiddenCrashPronePieceOfJunk = (\n navigator.userAgent.indexOf('MSIE 5') != -1\n &&\n navigator.userAgent.indexOf('Mac') != -1\n)\n\n// check for W3CDOM compatibility\nvar W3CDOM = (!bugRiddenCrashPronePieceOfJunk &&\n document.getElementsByTagName &&\n document.createElement);\n\n// cross browser function for registering event handlers\nfunction registerEventListener(elem, event, func) {\n if (elem.addEventListener) {\n elem.addEventListener(event, func, false);\n return true;\n } else if (elem.attachEvent) {\n var result = elem.attachEvent(\"on\"+event, func);\n return result;\n }\n // maybe we could implement something with an array\n return false;\n}\n\n// cross browser function for unregistering event handlers\nfunction unRegisterEventListener(elem, event, func) {\n if (elem.removeEventListener) {\n elem.removeEventListener(event, func, false);\n return true;\n } else if (elem.detachEvent) {\n var result = elem.detachEvent(\"on\"+event, func);\n return result;\n }\n // maybe we could implement something with an array\n return false;\n}\n\nfunction registerPloneFunction(func) {\n // registers a function to fire onload.\n registerEventListener(window, \"load\", func);\n}\n\nfunction unRegisterPloneFunction(func) {\n // unregisters a function so it does not fire onload.\n unRegisterEventListener(window, \"load\", func);\n}\n\nfunction getContentArea() {\n // returns our content area element\n if (W3CDOM) {\n var node = document.getElementById('region-content');\n if (!node) {\n node = document.getElementById('content');\n }\n return node;\n }\n} \n\n\n/* ----- cssQuery.js ----- */\n/*\n\tcssQuery, version 2.0.2 (2005-08-19)\n\tCopyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)\n\tLicense: http://creativecommons.org/licenses/LGPL/2.1/\n*/\neval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('7 x=6(){7 1D=\"2.0.2\";7 C=/\\\\s*,\\\\s*/;7 x=6(s,A){33{7 m=[];7 u=1z.32.2c&&!A;7 b=(A)?(A.31==22)?A:[A]:[1g];7 1E=18(s).1l(C),i;9(i=0;i<1E.y;i++){s=1y(1E[i]);8(U&&s.Z(0,3).2b(\"\")==\" *#\"){s=s.Z(2);A=24([],b,s[1])}1A A=b;7 j=0,t,f,a,c=\"\";H(j<s.y){t=s[j++];f=s[j++];c+=t+f;a=\"\";8(s[j]==\"(\"){H(s[j++]!=\")\")a+=s[j];a=a.Z(0,-1);c+=\"(\"+a+\")\"}A=(u&&V[c])?V[c]:21(A,t,f,a);8(u)V[c]=A}m=m.30(A)}2a x.2d;5 m}2Z(e){x.2d=e;5[]}};x.1Z=6(){5\"6 x() {\\\\n [1D \"+1D+\"]\\\\n}\"};7 V={};x.2c=L;x.2Y=6(s){8(s){s=1y(s).2b(\"\");2a V[s]}1A V={}};7 29={};7 19=L;x.15=6(n,s){8(19)1i(\"s=\"+1U(s));29[n]=12 s()};x.2X=6(c){5 c?1i(c):o};7 D={};7 h={};7 q={P:/\\\\[([\\\\w-]+(\\\\|[\\\\w-]+)?)\\\\s*(\\\\W?=)?\\\\s*([^\\\\]]*)\\\\]/};7 T=[];D[\" \"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=X(f[i],t,n);9(j=0;(e=s[j]);j++){8(M(e)&&14(e,n))r.z(e)}}};D[\"#\"]=6(r,f,i){7 e,j;9(j=0;(e=f[j]);j++)8(e.B==i)r.z(e)};D[\".\"]=6(r,f,c){c=12 1t(\"(^|\\\\\\\\s)\"+c+\"(\\\\\\\\s|$)\");7 e,i;9(i=0;(e=f[i]);i++)8(c.l(e.1V))r.z(e)};D[\":\"]=6(r,f,p,a){7 t=h[p],e,i;8(t)9(i=0;(e=f[i]);i++)8(t(e,a))r.z(e)};h[\"2W\"]=6(e){7 d=Q(e);8(d.1C)9(7 i=0;i<d.1C.y;i++){8(d.1C[i]==e)5 K}};h[\"2V\"]=6(e){};7 M=6(e){5(e&&e.1c==1&&e.1f!=\"!\")?e:23};7 16=6(e){H(e&&(e=e.2U)&&!M(e))28;5 e};7 G=6(e){H(e&&(e=e.2T)&&!M(e))28;5 e};7 1r=6(e){5 M(e.27)||G(e.27)};7 1P=6(e){5 M(e.26)||16(e.26)};7 1o=6(e){7 c=[];e=1r(e);H(e){c.z(e);e=G(e)}5 c};7 U=K;7 1h=6(e){7 d=Q(e);5(2S d.25==\"2R\")?/\\\\.1J$/i.l(d.2Q):2P(d.25==\"2O 2N\")};7 Q=6(e){5 e.2M||e.1g};7 X=6(e,t){5(t==\"*\"&&e.1B)?e.1B:e.X(t)};7 17=6(e,t,n){8(t==\"*\")5 M(e);8(!14(e,n))5 L;8(!1h(e))t=t.2L();5 e.1f==t};7 14=6(e,n){5!n||(n==\"*\")||(e.2K==n)};7 1e=6(e){5 e.1G};6 24(r,f,B){7 m,i,j;9(i=0;i<f.y;i++){8(m=f[i].1B.2J(B)){8(m.B==B)r.z(m);1A 8(m.y!=23){9(j=0;j<m.y;j++){8(m[j].B==B)r.z(m[j])}}}}5 r};8(![].z)22.2I.z=6(){9(7 i=0;i<1z.y;i++){o[o.y]=1z[i]}5 o.y};7 N=/\\\\|/;6 21(A,t,f,a){8(N.l(f)){f=f.1l(N);a=f[0];f=f[1]}7 r=[];8(D[t]){D[t](r,A,f,a)}5 r};7 S=/^[^\\\\s>+~]/;7 20=/[\\\\s#.:>+~()@]|[^\\\\s#.:>+~()@]+/g;6 1y(s){8(S.l(s))s=\" \"+s;5 s.P(20)||[]};7 W=/\\\\s*([\\\\s>+~(),]|^|$)\\\\s*/g;7 I=/([\\\\s>+~,]|[^(]\\\\+|^)([#.:@])/g;7 18=6(s){5 s.O(W,\"$1\").O(I,\"$1*$2\")};7 1u={1Z:6(){5\"\\'\"},P:/^(\\'[^\\']*\\')|(\"[^\"]*\")$/,l:6(s){5 o.P.l(s)},1S:6(s){5 o.l(s)?s:o+s+o},1Y:6(s){5 o.l(s)?s.Z(1,-1):s}};7 1s=6(t){5 1u.1Y(t)};7 E=/([\\\\/()[\\\\]?{}|*+-])/g;6 R(s){5 s.O(E,\"\\\\\\\\$1\")};x.15(\"1j-2H\",6(){D[\">\"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=1o(f[i]);9(j=0;(e=s[j]);j++)8(17(e,t,n))r.z(e)}};D[\"+\"]=6(r,f,t,n){9(7 i=0;i<f.y;i++){7 e=G(f[i]);8(e&&17(e,t,n))r.z(e)}};D[\"@\"]=6(r,f,a){7 t=T[a].l;7 e,i;9(i=0;(e=f[i]);i++)8(t(e))r.z(e)};h[\"2G-10\"]=6(e){5!16(e)};h[\"1x\"]=6(e,c){c=12 1t(\"^\"+c,\"i\");H(e&&!e.13(\"1x\"))e=e.1n;5 e&&c.l(e.13(\"1x\"))};q.1X=/\\\\\\\\:/g;q.1w=\"@\";q.J={};q.O=6(m,a,n,c,v){7 k=o.1w+m;8(!T[k]){a=o.1W(a,c||\"\",v||\"\");T[k]=a;T.z(a)}5 T[k].B};q.1Q=6(s){s=s.O(o.1X,\"|\");7 m;H(m=s.P(o.P)){7 r=o.O(m[0],m[1],m[2],m[3],m[4]);s=s.O(o.P,r)}5 s};q.1W=6(p,t,v){7 a={};a.B=o.1w+T.y;a.2F=p;t=o.J[t];t=t?t(o.13(p),1s(v)):L;a.l=12 2E(\"e\",\"5 \"+t);5 a};q.13=6(n){1d(n.2D()){F\"B\":5\"e.B\";F\"2C\":5\"e.1V\";F\"9\":5\"e.2B\";F\"1T\":8(U){5\"1U((e.2A.P(/1T=\\\\\\\\1v?([^\\\\\\\\s\\\\\\\\1v]*)\\\\\\\\1v?/)||[])[1]||\\'\\')\"}}5\"e.13(\\'\"+n.O(N,\":\")+\"\\')\"};q.J[\"\"]=6(a){5 a};q.J[\"=\"]=6(a,v){5 a+\"==\"+1u.1S(v)};q.J[\"~=\"]=6(a,v){5\"/(^| )\"+R(v)+\"( |$)/.l(\"+a+\")\"};q.J[\"|=\"]=6(a,v){5\"/^\"+R(v)+\"(-|$)/.l(\"+a+\")\"};7 1R=18;18=6(s){5 1R(q.1Q(s))}});x.15(\"1j-2z\",6(){D[\"~\"]=6(r,f,t,n){7 e,i;9(i=0;(e=f[i]);i++){H(e=G(e)){8(17(e,t,n))r.z(e)}}};h[\"2y\"]=6(e,t){t=12 1t(R(1s(t)));5 t.l(1e(e))};h[\"2x\"]=6(e){5 e==Q(e).1H};h[\"2w\"]=6(e){7 n,i;9(i=0;(n=e.1F[i]);i++){8(M(n)||n.1c==3)5 L}5 K};h[\"1N-10\"]=6(e){5!G(e)};h[\"2v-10\"]=6(e){e=e.1n;5 1r(e)==1P(e)};h[\"2u\"]=6(e,s){7 n=x(s,Q(e));9(7 i=0;i<n.y;i++){8(n[i]==e)5 L}5 K};h[\"1O-10\"]=6(e,a){5 1p(e,a,16)};h[\"1O-1N-10\"]=6(e,a){5 1p(e,a,G)};h[\"2t\"]=6(e){5 e.B==2s.2r.Z(1)};h[\"1M\"]=6(e){5 e.1M};h[\"2q\"]=6(e){5 e.1q===L};h[\"1q\"]=6(e){5 e.1q};h[\"1L\"]=6(e){5 e.1L};q.J[\"^=\"]=6(a,v){5\"/^\"+R(v)+\"/.l(\"+a+\")\"};q.J[\"$=\"]=6(a,v){5\"/\"+R(v)+\"$/.l(\"+a+\")\"};q.J[\"*=\"]=6(a,v){5\"/\"+R(v)+\"/.l(\"+a+\")\"};6 1p(e,a,t){1d(a){F\"n\":5 K;F\"2p\":a=\"2n\";1a;F\"2o\":a=\"2n+1\"}7 1m=1o(e.1n);6 1k(i){7 i=(t==G)?1m.y-i:i-1;5 1m[i]==e};8(!Y(a))5 1k(a);a=a.1l(\"n\");7 m=1K(a[0]);7 s=1K(a[1]);8((Y(m)||m==1)&&s==0)5 K;8(m==0&&!Y(s))5 1k(s);8(Y(s))s=0;7 c=1;H(e=t(e))c++;8(Y(m)||m==1)5(t==G)?(c<=s):(s>=c);5(c%m)==s}});x.15(\"1j-2m\",6(){U=1i(\"L;/*@2l@8(@\\\\2k)U=K@2j@*/\");8(!U){X=6(e,t,n){5 n?e.2i(\"*\",t):e.X(t)};14=6(e,n){5!n||(n==\"*\")||(e.2h==n)};1h=1g.1I?6(e){5/1J/i.l(Q(e).1I)}:6(e){5 Q(e).1H.1f!=\"2g\"};1e=6(e){5 e.2f||e.1G||1b(e)};6 1b(e){7 t=\"\",n,i;9(i=0;(n=e.1F[i]);i++){1d(n.1c){F 11:F 1:t+=1b(n);1a;F 3:t+=n.2e;1a}}5 t}}});19=K;5 x}();',62,190,'|||||return|function|var|if|for||||||||pseudoClasses||||test|||this||AttributeSelector|||||||cssQuery|length|push|fr|id||selectors||case|nextElementSibling|while||tests|true|false|thisElement||replace|match|getDocument|regEscape||attributeSelectors|isMSIE|cache||getElementsByTagName|isNaN|slice|child||new|getAttribute|compareNamespace|addModule|previousElementSibling|compareTagName|parseSelector|loaded|break|_0|nodeType|switch|getTextContent|tagName|document|isXML|eval|css|_1|split|ch|parentNode|childElements|nthChild|disabled|firstElementChild|getText|RegExp|Quote|x22|PREFIX|lang|_2|arguments|else|all|links|version|se|childNodes|innerText|documentElement|contentType|xml|parseInt|indeterminate|checked|last|nth|lastElementChild|parse|_3|add|href|String|className|create|NS_IE|remove|toString|ST|select|Array|null|_4|mimeType|lastChild|firstChild|continue|modules|delete|join|caching|error|nodeValue|textContent|HTML|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard||odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|Function|name|first|level2|prototype|item|scopeName|toUpperCase|ownerDocument|Document|XML|Boolean|URL|unknown|typeof|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try'.split('|'),0,{}))\n\n\n/* ----- plone_javascript_variables.js ----- */\n\n// Global Plone variables that need to be accessible to the Javascripts\nvar portal_url = 'http://puredata.info';\nvar form_modified_message = 'Your form has not been saved. All changes you have made will be lost.';\nvar form_resubmit_message = 'Your already clicked the submit button. Do you really want to submit this form again?';\n\n\n/* ----- nodeutilities.js ----- */\n\nfunction wrapNode(node, wrappertype, wrapperclass){\n /* utility function to wrap a node in an arbitrary element of type \"wrappertype\"\n * with a class of \"wrapperclass\" */\n var wrapper = document.createElement(wrappertype)\n wrapper.className = wrapperclass;\n var innerNode = node.parentNode.replaceChild(wrapper,node);\n wrapper.appendChild(innerNode);\n};\n\nfunction nodeContained(innernode, outernode){\n // check if innernode is contained in outernode\n var node = innernode.parentNode;\n while (node != document) {\n if (node == outernode) {\n return true; \n }\n node=node.parentNode;\n }\n return false;\n};\n\nfunction findContainer(node, func) {\n // Starting with the given node, find the nearest containing element\n // for which the given function returns true.\n\n while (node != null) {\n if (func(node)) {\n return node;\n }\n node = node.parentNode;\n }\n return false;\n};\n\nfunction hasClassName(node, class_name) {\n return new RegExp('\\\\b'+class_name+'\\\\b').test(node.className);\n};\n\nfunction addClassName(node, class_name) {\n if (!node.className) {\n node.className = class_name;\n } else if (!hasClassName(node, class_name)) {\n var className = node.className+\" \"+class_name;\n // cleanup\n node.className = className.split(/\\s+/).join(' ');\n }\n};\n\nfunction removeClassName(node, class_name) {\n var className = node.className;\n if (className) {\n // remove\n className = className.replace(new RegExp('\\\\b'+class_name+'\\\\b'), '');\n // cleanup\n className = className.replace(/\\s+/g, ' ');\n node.className = className.replace(/\\s+$/g, '');\n }\n};\n\nfunction replaceClassName(node, old_class, new_class, ignore_missing) {\n if (ignore_missing && !hasClassName(node, old_class)) {\n addClassName(node, new_class);\n } else {\n var className = node.className;\n if (className) {\n // replace\n className = className.replace(new RegExp('\\\\b'+old_class+'\\\\b'), new_class);\n // cleanup\n className = className.replace(/\\s+/g, ' ');\n node.className = className.replace(/\\s+$/g, '');\n }\n }\n};\n\nfunction walkTextNodes(node, func, data) {\n // traverse childnodes and call func when a textnode is found\n if (!node){return false}\n if (node.hasChildNodes) {\n // we can't use for (i in childNodes) here, because the number of\n // childNodes might change (higlightsearchterms)\n for (var i=0;i<node.childNodes.length;i++) {\n walkTextNodes(node.childNodes[i], func, data);\n }\n if (node.nodeType == 3) {\n // this is a text node\n func(node, data);\n }\n }\n};\n\n/* These are two functions, because getInnerTextFast doesn't always return the\n * the same results, as it depends on the implementation of node.innerText of\n * the browser. getInnerTextCompatible will always return the same values, but\n * is a bit slower. The difference is just in the whitespace, so if this\n * doesn't matter, you should always use getInnerTextFast.\n */\n\nfunction getInnerTextCompatible(node) {\n var result = new Array();\n walkTextNodes(node,\n function(n, d){d.push(n.nodeValue)},\n result);\n return result.join(\"\");\n};\n\nfunction getInnerTextFast(node) {\n if (node.innerText) {\n return node.innerText;\n } else {\n return getInnerTextCompatible(node);\n }\n};\n\n/* This function reorder nodes in the DOM.\n * fetch_func - the function which returns the value for comparison\n * cmp_func - the compare function, if not provided then the string of the\n * value returned by fetch_func is used.\n */\nfunction sortNodes(nodes, fetch_func, cmp_func) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n // wrapper for sorting\n var SortNodeWrapper = function(node) {\n this.value = fetch_func(node);\n this.cloned_node = node.cloneNode(true);\n this.toString = function() {\n if (this.value.toString) {\n return this.value.toString();\n } else {\n return this.value;\n }\n }\n }\n\n // wrap nodes\n var items = new Array();\n for (var i=0; i<nodes.length; i++) {\n items.push(new SortNodeWrapper(nodes[i]));\n }\n\n //sort\n if (cmp_func) {\n items.sort(cmp_func);\n } else {\n items.sort();\n }\n\n // reorder nodes\n for (var i=0; i<items.length; i++) {\n var dest = nodes[i];\n dest.parentNode.replaceChild(items[i].cloned_node, dest);\n }\n};\n\n\n/* ----- cookie_functions.js ----- */\nfunction createCookie(name,value,days) {\n if (days) {\n var date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n var expires = \"; expires=\"+date.toGMTString();\n } else {\n expires = \"\";\n }\n document.cookie = name+\"=\"+escape(value)+expires+\"; path=/;\";\n};\n\nfunction readCookie(name) {\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';');\n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') {\n c = c.substring(1,c.length);\n }\n if (c.indexOf(nameEQ) == 0) {\n return unescape(c.substring(nameEQ.length,c.length));\n }\n }\n return null;\n};\n\n\n/* ----- livesearch.js ----- */\n/*\n// +----------------------------------------------------------------------+\n// | Copyright (c) 2004 Bitflux GmbH |\n// +----------------------------------------------------------------------+\n// | Licensed under the Apache License, Version 2.0 (the \"License\"); |\n// | you may not use this file except in compliance with the License. |\n// | You may obtain a copy of the License at |\n// | http://www.apache.org/licenses/LICENSE-2.0 |\n// | Unless required by applicable law or agreed to in writing, software |\n// | distributed under the License is distributed on an \"AS IS\" BASIS, |\n// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |\n// | implied. See the License for the specific language governing |\n// | permissions and limitations under the License. |\n// +----------------------------------------------------------------------+\n// | Author: Bitflux GmbH <devel@bitflux.ch> |\n// +----------------------------------------------------------------------+\n\n*/\nvar liveSearchReq = false;\nvar t = null;\nvar liveSearchLast = \"\";\nvar queryTarget = \"livesearch_reply?q=\";\n\nvar searchForm = null;\nvar searchInput = null; \n\nvar isIE = false;\n\n\nvar _cache = new Object();\n\nvar widthOffset=1;\n\nfunction calculateWidth(){\n}\n\n\nfunction getElementDimensions(elemID) {\n var base = document.getElementById(elemID);\n var offsetTrail = base;\n var offsetLeft = 0;\n var offsetTop = 0;\n var width = 0;\n \n while (offsetTrail) {\n offsetLeft += offsetTrail.offsetLeft;\n offsetTop += offsetTrail.offsetTop;\n offsetTrail = offsetTrail.offsetParent;\n }\n if (navigator.userAgent.indexOf(\"Mac\") != -1 &&\n typeof document.body.leftMargin != \"undefined\") {\n offsetLeft += document.body.leftMargin;\n offsetTop += document.body.topMargin;\n }\n\n if(!isIE){\n width = searchInput.offsetWidth-widthOffset*2;\n }\n else {\n width = searchInput.offsetWidth;\n }\n\n return { left:offsetLeft, \n top:offsetTop, \n width: width, \n height: base.offsetHeight,\n bottom: offsetTop + base.offsetHeight, \n right : offsetLeft + width};\n}\n\nfunction liveSearchInit() {\n searchInput = document.getElementById('searchGadget');\n if (searchInput == null || searchInput == undefined) return\n// Only keypress catches repeats in moz/FF but keydown is needed for\n// khtml based browsers.\n if (navigator.userAgent.indexOf(\"KHTML\") > 0) {\n searchInput.addEventListener(\"keydown\",liveSearchKeyPress,false);\n searchInput.addEventListener(\"focus\",liveSearchDoSearch,false);\n searchInput.addEventListener(\"keydown\",liveSearchStart, false);\n searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false);\n } else if (searchInput.addEventListener) {\n searchInput.addEventListener(\"keypress\",liveSearchKeyPress,false);\n searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false);\n searchInput.addEventListener(\"keypress\",liveSearchStart, false);\n } else {\n searchInput.attachEvent(\"onkeydown\",liveSearchKeyPress);\n searchInput.attachEvent(\"onkeydown\",liveSearchStart);\n// searchInput.attachEvent(\"onblur\",liveSearchHide);\n isIE = true;\n }\n\n// Why doesn't this work in konq, setting it inline does.\n searchInput.setAttribute(\"autocomplete\",\"off\");\n\n var pos = getElementDimensions('searchGadget'); \n result = document.getElementById('LSResult');\n pos.left = pos.left - result.offsetParent.offsetLeft + pos.width;\n result.style.display='none';\n}\n\n\nfunction liveSearchHideDelayed() {\n window.setTimeout(\"liveSearchHide()\",400);\n}\n \nfunction liveSearchHide() { \n document.getElementById(\"LSResult\").style.display = \"none\";\n var highlight = document.getElementById(\"LSHighlight\");\n if (highlight) {\n highlight.removeAttribute(\"id\");\n }\n}\n\nfunction getFirstHighlight() {\n var set = getHits();\n return set[0];\n}\n\nfunction getLastHighlight() {\n var set = getHits();\n return set[set.length-1];\n}\n\nfunction getHits() {\n var res = document.getElementById(\"LSShadow\");\n var set = res.getElementsByTagName('li');\n return set\n}\n\nfunction findChild(object, specifier) {\n var cur = object.firstChild;\n try {\n while (cur != undefined) {\n cur = cur.nextSibling;\n if (specifier(cur) == true) return cur;\n }\n } catch(e) {};\n return null;\n \n}\n\nfunction findNext(object, specifier) {\n var cur = object;\n try {\n while (cur != undefined) {\n\n cur = cur.nextSibling;\n if (cur.nodeType==3) cur=cur.nextSibling;\n \n if (cur != undefined) {\n if (specifier(cur) == true) return cur;\n } else { break }\n }\n } catch(e) {};\n return null;\n}\n\nfunction findPrev(object, specifier) {\n var cur = object;\n try {\n cur = cur.previousSibling;\n if (cur.nodeType==3) cur=cur.previousSibling;\n if (cur!=undefined) {\n if (specifier(cur) == true) \n return cur;\n } \n } catch(e) {};\n return null;\n}\n\n\nfunction liveSearchKeyPress(event) {\n if (event.keyCode == 40 )\n //KEY DOWN\n {\n highlight = document.getElementById(\"LSHighlight\");\n if (!highlight) {\n highlight = getFirstHighlight();\n } else {\n highlight.removeAttribute(\"id\");\n highlight = findNext(highlight, function (o) {return o.className ==\"LSRow\";});\n\n }\n if (highlight) {\n highlight.setAttribute(\"id\",\"LSHighlight\");\n } \n if (!isIE) { event.preventDefault(); }\n } \n //KEY UP\n else if (event.keyCode == 38 ) {\n highlight = document.getElementById(\"LSHighlight\");\n if (!highlight) {\n highlight = getLastHighlight();\n } \n else {\n highlight.removeAttribute(\"id\");\n highlight = findPrev(highlight, function (o) {return o.className=='LSRow';});\n }\n if (highlight) {\n highlight.setAttribute(\"id\",\"LSHighlight\");\n }\n if (!isIE) { event.preventDefault(); }\n } \n //ESC\n else if (event.keyCode == 27) {\n highlight = document.getElementById(\"LSHighlight\");\n if (highlight) {\n highlight.removeAttribute(\"id\");\n }\n document.getElementById(\"LSResult\").style.display = \"none\";\n } \n}\nfunction liveSearchStart(event) {\n if (t) {\n window.clearTimeout(t);\n }\n code = event.keyCode;\n if (code!=40 && code!=38 && code!=27 && code!=37 && code!=39) {\n t = window.setTimeout(\"liveSearchDoSearch()\",200);\n } \n}\n\nfunction liveSearchDoSearch() {\n\n if (typeof liveSearchRoot == \"undefined\") {\n liveSearchRoot = \"\";\n }\n if (typeof liveSearchRootSubDir == \"undefined\") {\n liveSearchRootSubDir = \"\";\n }\n\n if (liveSearchLast != searchInput.value) {\n if (liveSearchReq && liveSearchReq.readyState < 4) {\n liveSearchReq.abort();\n }\n if ( searchInput.value == \"\") {\n liveSearchHide();\n return false;\n }\n\n // Do nothing as long as we have less then two characters - \n // the search results makes no sense, and it's harder on the server.\n if ( searchInput.value.length < 2) {\n liveSearchHide();\n return false;\n }\n\n // Do we have cached results\n var result = _cache[searchInput.value];\n if (result) {\n showResult(result); \n return;\n }\n liveSearchReq = new XMLHttpRequest();\n liveSearchReq.onreadystatechange= liveSearchProcessReqChange;\n // need to use encodeURIComponent instead of encodeURI, to escape +\n liveSearchReq.open(\"GET\", liveSearchRoot + queryTarget + encodeURIComponent(searchInput.value) );\n liveSearchLast = searchInput.value;\n liveSearchReq.send(null);\n }\n}\n\nfunction showResult(result) {\n var res = document.getElementById(\"LSResult\");\n res.style.display = \"block\";\n var sh = document.getElementById(\"LSShadow\");\n sh.innerHTML = result;\n}\n\nfunction liveSearchProcessReqChange() {\n if (liveSearchReq.readyState == 4) {\n if (liveSearchReq.status > 299 || liveSearchReq.status < 200 ||\n liveSearchReq.responseText.length < 10) return; \n showResult(liveSearchReq.responseText);\n _cache[liveSearchLast] = liveSearchReq.responseText;\n }\n}\n\nfunction liveSearchSubmit() {\n var highlight = document.getElementById(\"LSHighlight\");\n \n if (highlight){\n target = highlight.getElementsByTagName('a')[0];\n window.location = liveSearchRoot + liveSearchRootSubDir + target;\n return false;\n } \n else {\n return true;\n }\n}\n\n\n\nif (window.addEventListener) window.addEventListener(\"load\",liveSearchInit,false);\nelse if (window.attachEvent) window.attachEvent(\"onload\", liveSearchInit);\n\n\n\n/* ----- fullscreenmode.js ----- */\nfunction toggleFullScreenMode() {\n var body = cssQuery('body')[0];\n if(document.getElementById('icon-full_screen')) {\n var fsicon = document.getElementById('icon-full_screen'); }\n\n if (hasClassName(body, 'fullscreen')) {\n // unset cookie\n removeClassName(body, 'fullscreen');\n createCookie('fullscreenMode', '');\n if(fsicon) { fsicon.src = 'fullscreenexpand_icon.gif'; }\n } else {\n // set cookie\n addClassName(body, 'fullscreen');\n createCookie('fullscreenMode', '1');\n if(fsicon) { fsicon.src = 'fullscreencollapse_icon.gif'; }\n }\n};\n\nfunction fullscreenModeLoad() {\n if(document.getElementById('icon-full_screen')) {\n var fsicon = document.getElementById('icon-full_screen'); }\n // based on cookie\n if (readCookie('fullscreenMode') == '1') {\n var body = cssQuery('body')[0];\n addClassName(body, 'fullscreen');\n if(fsicon) { fsicon.src = 'fullscreencollapse_icon.gif'; }\n }\n};\nregisterPloneFunction(fullscreenModeLoad)\n\n\n/* ----- select_all.js ----- */\n// Functions for selecting all checkboxes in folder_contents/search_form view\nfunction selectAll(id, formName) {\n // Get the elements. if formName is provided, get the elements inside the form\n if (formName==null) {\n checkboxes = document.getElementsByName(id)\n for (i = 0; i < checkboxes.length; i++){\n checkboxes[i].checked = true ;\n }\n } else {\n for (i=0; i<document.forms[formName].elements.length;i++){\n if (document.forms[formName].elements[i].name==id){\n document.forms[formName].elements[i].checked=true; \n }\n }\n }\n }\nfunction deselectAll(id, formName) {\n if (formName==null) {\n checkboxes = document.getElementsByName(id)\n for (i = 0; i < checkboxes.length; i++){\n checkboxes[i].checked = false ;}\n } else {\n for (i=0; i<document.forms[formName].elements.length;i++){\n if (document.forms[formName].elements[i].name==id){\n document.forms[formName].elements[i].checked=false;\n }\n }\n }\n }\nfunction toggleSelect(selectbutton, id, initialState, formName) {\n /* required selectbutton: you can pass any object that will function as a toggle\n * optional id: id of the the group of checkboxes that needs to be toggled (default=ids:list\n * optional initialState: initial state of the group. (default=false)\n * e.g. folder_contents is false, search_form=true because the item boxes\n * are checked initially.\n * optional formName: name of the form in which the boxes reside, use this if there are more\n * forms on the page with boxes with the same name\n */\n id=id || 'ids:list' // defaults to ids:list, this is the most common usage\n\n if (selectbutton.isSelected==null){\n initialState=initialState || false;\n selectbutton.isSelected=initialState;\n }\n /* create and use a property on the button itself so you don't have to \n * use a global variable and we can have as much groups on a page as we like.\n */\n if (selectbutton.isSelected == false) {\n selectbutton.setAttribute('src', portal_url + '/select_none_icon.gif');\n selectbutton.isSelected=true;\n return selectAll(id, formName);\n } else {\n selectbutton.setAttribute('src',portal_url + '/select_all_icon.gif');\n selectbutton.isSelected=false;\n return deselectAll(id, formName);\n }\n } \n\n/* ----- dropdown.js ----- */\n/*\n * This is the code for the dropdown menus. It uses the following markup:\n *\n * <dl class=\"actionMenu\" id=\"uniqueIdForThisMenu\">\n * <dt class=\"actionMenuHeader\">\n * <!-- The following a-tag needs to be clicked to dropdown the menu -->\n * <a href=\"some_destination\">A Title</a>\n * </dt>\n * <dd class=\"actionMenuContent\">\n * <!-- Here can be any content you want -->\n * </dd>\n * </dl>\n *\n * When the menu is toggled, then the dl with the class actionMenu will get an\n * additional class which switches between 'activated' and 'deactivated'.\n * You can use this to style it accordingly, for example:\n *\n * .actionMenu.activated {\n * display: block;\n * }\n *\n * .actionMenu.deactivated {\n * display: none;\n * }\n *\n * When you click somewhere else than the menu, then all open menus will be\n * deactivated. When you move your mouse over the a-tag of another menu, then\n * that one will be activated and all others deactivated. When you click on a\n * link inside the actionMenuContent element, then the menu will be closed and\n * the link followed.\n *\n * This file uses functions from register_function.js, cssQuery.js and\n * nodeutils.js.\n *\n */\n\nfunction isActionMenu(node) {\n if (hasClassName(node, 'actionMenu')) {\n return true;\n }\n return false;\n};\n\nfunction hideAllMenus() {\n var menus = cssQuery('dl.actionMenu');\n for (var i=0; i < menus.length; i++) {\n replaceClassName(menus[i], 'activated', 'deactivated', true);\n }\n};\n\nfunction toggleMenuHandler(event) {\n if (!event) var event = window.event; // IE compatibility\n\n // terminate if we hit a non-compliant DOM implementation\n // returning true, so the link is still followed\n if (!W3CDOM){return true;}\n\n var container = findContainer(this, isActionMenu);\n if (!container) {\n return true;\n }\n\n // check if the menu is visible\n if (hasClassName(container, 'activated')) {\n // it's visible - hide it\n replaceClassName(container, 'activated', 'deactivated', true);\n } else {\n // it's invisible - make it visible\n replaceClassName(container, 'deactivated', 'activated', true);\n }\n\n return false;\n};\n\nfunction hideMenusHandler(event) {\n if (!event) var event = window.event; // IE compatibility\n\n hideAllMenus();\n\n // we want to follow this link\n return true;\n};\n\nfunction actionMenuDocumentMouseDown(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (event.target)\n targ = event.target;\n else if (event.srcElement)\n targ = event.srcElement;\n\n var container = findContainer(targ, isActionMenu);\n if (container) {\n // targ is part of the menu, so just return and do the default\n return true;\n }\n\n hideAllMenus();\n\n return true;\n};\n\nfunction actionMenuMouseOver(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (!this.tagName && (this.tagName == 'A' || this.tagName == 'a')) {\n return true;\n }\n\n var container = findContainer(this, isActionMenu);\n if (!container) {\n return true;\n }\n var menu_id = container.id;\n\n var switch_menu = false;\n // hide all menus\n var menus = cssQuery('dl.actionMenu');\n for (var i=0; i < menus.length; i++) {\n var menu = menus[i]\n // check if the menu is visible\n if (hasClassName(menu, 'activated')) {\n switch_menu = true;\n }\n // turn off menu when it's not the current one\n if (menu.id != menu_id) {\n replaceClassName(menu, 'activated', 'deactivated', true);\n }\n }\n\n if (switch_menu) {\n var menu = cssQuery('#'+menu_id)[0];\n if (menu) {\n replaceClassName(menu, 'deactivated', 'activated', true);\n }\n }\n\n return true;\n};\n\nfunction initializeMenus() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM) {return false;}\n\n document.onmousedown = actionMenuDocumentMouseDown;\n\n hideAllMenus();\n\n // add toggle function to header links\n var menu_headers = cssQuery('dl.actionMenu > dt.actionMenuHeader > a');\n for (var i=0; i < menu_headers.length; i++) {\n var menu_header = menu_headers[i];\n\n menu_header.onclick = toggleMenuHandler;\n menu_header.onmouseover = actionMenuMouseOver;\n }\n\n // add hide function to all links in the dropdown, so the dropdown closes\n // when any link is clicked\n var menu_contents = cssQuery('dl.actionMenu > dd.actionMenuContent');\n for (var i=0; i < menu_contents.length; i++) {\n menu_contents[i].onclick = hideMenusHandler;\n }\n\n // uncomment to enable sorting of elements\n //var nodes = cssQuery('#objectMenu > dd.actionMenuContent li');\n //sortNodes(nodes, getInnerTextFast);\n};\n\nregisterPloneFunction(initializeMenus);\n\n\n/* ----- mark_special_links.js ----- */\n/* Scan all links in the document and set classes on them if\n * they point outside the site, or are special protocols\n * To disable this effect for links on a one-by-one-basis,\n * give them a class of 'link-plain'\n */\n\nfunction scanforlinks() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM) { return false; }\n\n contentarea = getContentArea();\n if (!contentarea) { return false; }\n\n links = contentarea.getElementsByTagName('a');\n for (i=0; i < links.length; i++) {\n if ( (links[i].getAttribute('href'))\n && (links[i].className.indexOf('link-plain')==-1) ) {\n var linkval = links[i].getAttribute('href');\n\n // check if the link href is a relative link, or an absolute link to\n // the current host.\n if (linkval.toLowerCase().indexOf(window.location.protocol\n + '//'\n + window.location.host)==0) {\n // absolute link internal to our host - do nothing\n } else if (linkval.indexOf('http:') != 0) {\n // not a http-link. Possibly an internal relative link, but also\n // possibly a mailto or other protocol add tests for relevant\n // protocols as you like.\n protocols = ['mailto', 'ftp', 'news', 'irc', 'h323', 'sip',\n 'callto', 'https', 'feed', 'webcal'];\n // h323, sip and callto are internet telephony VoIP protocols\n for (p=0; p < protocols.length; p++) {\n if (linkval.indexOf(protocols[p]+':') == 0) {\n // if the link matches one of the listed protocols, add\n // className = link-protocol\n wrapNode(links[i], 'span', 'link-'+protocols[p]);\n break;\n }\n }\n } else {\n // we are in here if the link points to somewhere else than our\n // site.\n if ( links[i].getElementsByTagName('img').length == 0 ) {\n // we do not want to mess with those links that already have\n // images in them\n wrapNode(links[i], 'span', 'link-external');\n // uncomment the next line if you want external links to be\n // opened in a new window.\n // links[i].setAttribute('target', '_blank');\n }\n }\n }\n }\n};\n\nregisterPloneFunction(scanforlinks);\n\n\n/* ----- collapsiblesections.js ----- */\n/*\n * This is the code for the collapsibles. It uses the following markup:\n *\n * <dl class=\"collapsible\">\n * <dt class=\"collapsibleHeader\">\n * A Title\n * </dt>\n * <dd class=\"collapsibleContent\">\n * <!-- Here can be any content you want -->\n * </dd>\n * </dl>\n *\n * When the collapsible is toggled, then the dl will get an additional class\n * which switches between 'collapsedBlockCollapsible' and\n * 'expandedBlockCollapsible'. You can use this to style it accordingly, for\n * example:\n *\n * .expandedBlockCollapsible .collapsibleContent {\n * display: block;\n * }\n *\n * .collapsedBlockCollapsible .collapsibleContent {\n * display: none;\n * }\n *\n * If you add the 'collapsedOnLoad' class to the dl, then it will get\n * collapsed on page load, this is done, so the content is accessible even when\n * javascript is disabled.\n *\n * If you add the 'inline' class to the dl, then it will toggle between\n * 'collapsedInlineCollapsible' and 'expandedInlineCollapsible' instead of\n * 'collapsedBlockCollapsible' and 'expandedBlockCollapsible'.\n *\n * This file uses functions from register_function.js, cssQuery.js and\n * nodeutils.js.\n *\n */\n\nfunction isCollapsible(node) {\n if (hasClassName(node, 'collapsible')) {\n return true;\n }\n return false;\n};\n\nfunction toggleCollapsible(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (!this.tagName && (this.tagName == 'DT' || this.tagName == 'dt')) {\n return true;\n }\n\n var container = findContainer(this, isCollapsible);\n if (!container) {\n return true;\n }\n\n if (hasClassName(container, 'collapsedBlockCollapsible')) {\n replaceClassName(container, 'collapsedBlockCollapsible', 'expandedBlockCollapsible');\n } else if (hasClassName(container, 'expandedBlockCollapsible')) {\n replaceClassName(container, 'expandedBlockCollapsible', 'collapsedBlockCollapsible');\n } else if (hasClassName(container, 'collapsedInlineCollapsible')) {\n replaceClassName(container, 'collapsedInlineCollapsible', 'expandedInlineCollapsible');\n } else if (hasClassName(container, 'expandedInlineCollapsible')) {\n replaceClassName(container, 'expandedInlineCollapsible', 'collapsedInlineCollapsible');\n }\n};\n\nfunction activateCollapsibles() {\n if (!W3CDOM) {return false;}\n\n var collapsibles = cssQuery('dl.collapsible');\n for (var i=0; i < collapsibles.length; i++) {\n var collapsible = collapsibles[i];\n\n var collapsible_header = cssQuery('dt.collapsibleHeader', collapsible)[0];\n collapsible_header.onclick = toggleCollapsible;\n\n if (hasClassName(collapsible, 'inline')) {\n // the collapsible should be inline\n if (hasClassName(collapsible, 'collapsedOnLoad')) {\n replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedInlineCollapsible');\n } else {\n addClassName(collapsible, 'expandedInlineCollapsible');\n }\n } else {\n // the collapsible is a block\n if (hasClassName(collapsible, 'collapsedOnLoad')) {\n replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedBlockCollapsible');\n } else {\n addClassName(collapsible, 'expandedBlockCollapsible');\n }\n }\n }\n};\n\nregisterPloneFunction(activateCollapsibles);\n\n\n/* ----- highlightsearchterms.js ----- */\nfunction highlightTermInNode(node, word) {\n var contents = node.nodeValue;\n var index = contents.toLowerCase().indexOf(word.toLowerCase());\n if (index < 0){return false};\n\n var parent = node.parentNode;\n if (parent.className != \"highlightedSearchTerm\") {\n // make 3 shiny new nodes\n var hiword = document.createElement(\"span\");\n hiword.className = \"highlightedSearchTerm\";\n hiword.appendChild(document.createTextNode(contents.substr(index, word.length)));\n parent.insertBefore(document.createTextNode(contents.substr(0, index)), node);\n parent.insertBefore(hiword, node);\n parent.insertBefore(document.createTextNode(contents.substr(index+word.length)), node);\n parent.removeChild(node);\n }\n}\n\nfunction highlightSearchTerms(terms, startnode) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n if (!terms){return false};\n if (!startnode){return false};\n\n for (var term_index=0; term_index < terms.length; term_index++) {\n // don't highlight reserved catalog search terms\n var term = terms[term_index];\n var term_lower = term.toLowerCase();\n if (term_lower != 'not'\n && term_lower != 'and'\n && term_lower != 'or') {\n walkTextNodes(startnode, highlightTermInNode, term);\n }\n }\n}\n\nfunction getSearchTermsFromURI(uri) {\n var query;\n if (typeof decodeURI != 'undefined') {\n query = decodeURI(uri);\n } else if (typeof unescape != 'undefined') {\n // _robert_ ie 5 does not have decodeURI \n query = unescape(uri);\n } else {\n // we just try to be lucky, for single words this will still work\n }\n var result = new Array();\n if (window.decodeReferrer) {\n var referrerSearch = decodeReferrer();\n if (null != referrerSearch && referrerSearch.length > 0) {\n result = referrerSearch;\n }\n }\n var qfinder = new RegExp(\"searchterm=([^&]*)\", \"gi\");\n var qq = qfinder.exec(query);\n if (qq && qq[1]) {\n var terms = qq[1].replace(/\\+/g,' ').split(/\\s+/);\n for (var i=0; i < terms.length; i++) {\n if (terms[i] != '') {\n result.push(terms[i]);\n }\n }\n return result;\n }\n return result.length == 0 ? false : result;\n}\n\nfunction highlightSearchTermsFromURI() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n // search-term-highlighter function -- Geir B\u00c3\u00a6kholt\n var terms = getSearchTermsFromURI(window.location.search);\n // make sure we start the right place so we don't higlight menuitems or breadcrumb\n var contentarea = getContentArea();\n highlightSearchTerms(terms, contentarea);\n}\n\nregisterPloneFunction(highlightSearchTermsFromURI);\n\n\n/* ----- se-highlight.js ----- */\n/* List of search engine matchers and the referrer search\n * code where carefully borrowed from the\n * \"Search Engine Keyword Highlight\" by Scott Yang,\n * see http://fucoder.com/code/se-hilite/ for further\n * details.\n */\nvar searchEngines = [\n ['^http://(www)?\\\\.?google.*', 'q='], // Google\n ['^http://search\\\\.yahoo.*', 'p='], // Yahoo\n ['^http://search\\\\.msn.*', 'q='], // MSN\n ['^http://search\\\\.aol.*', 'userQuery='], // AOL\n ['^http://(www\\\\.)?altavista.*', 'q='], // AltaVista\n ['^http://(www\\\\.)?feedster.*', 'q='], // Feedster\n ['^http://search\\\\.lycos.*', 'query='], // Lycos\n ['^http://(www\\\\.)?alltheweb.*', 'q='] // AllTheWeb\n]\n\nfunction decodeReferrer(ref) {\n // checks if we are beeing searched by a search engine\n if (null == ref && document.referrer) {\n ref = document.referrer;\n }\n if (!ref) return null;\n\n var seQuery = '';\n for (var i = 0; i < searchEngines.length; i ++) {\n var match = new RegExp(searchEngines[i][0], 'i');\n if (ref.match(match)) {\n var match = new RegExp('^.*'+searchEngines[i][1]+'([^&]+)&?.*$');\n seQuery = ref.replace(match, '$1');\n if (seQuery) {\n seQuery = decodeURIComponent(seQuery);\n seQuery = seQuery.replace(/\\'|\"/, '');\n return seQuery.split(/[\\s,\\+\\.]+/);\n }\n\n }\n }\n return null;\n}\n\n\n/* ----- first_input_focus.js ----- */\n// Focus on error \nfunction setFocus(){\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var xre = new RegExp(/\\berror\\b/);\n // Search only forms to avoid spending time on regular text\n for (var f = 0; (formnode = document.getElementsByTagName('form').item(f)); f++){\n // Search for errors first, focus on first error if found\n for (var i = 0; (node = formnode.getElementsByTagName('div').item(i)); i++) {\n if (xre.exec(node.className)){\n for (var j = 0; (inputnode = node.getElementsByTagName('input').item(j)); j++) {\n try {\n if (inputnode.focus) { // check availability first\n inputnode.focus();\n return;\n }\n } catch(e) {\n // try next one, this can happen with a hidden or\n // invisible input field\n }\n }\n }\n }\n }\n}\nregisterPloneFunction(setFocus)\n\n\n/* ----- folder_contents_filter.js ----- */\n// Actions used in the folder_contents view\nfunction submitFolderAction(folderAction) {\n document.folderContentsForm.action = document.folderContentsForm.action+'/'+folderAction;\n document.folderContentsForm.submit();\n}\n\nfunction submitFilterAction() {\n document.folderContentsForm.action = document.folderContentsForm.action+'/folder_contents';\n filter_selection=document.getElementById('filter_selection');\n for (var i =0; i < filter_selection.length; i++){\n if (filter_selection.options[i].selected) {\n if (filter_selection.options[i].value=='#') {\n document.folderContentsForm.filter_state.value='clear_view_filter';\n }\n else {\n document.folderContentsForm.filter_state.value='set_view_filter';\n }\n }\n }\n document.folderContentsForm.submit();\n}\n\n\n\n/* ----- folder_contents_hideAddItems.js ----- */\n// function to hide the traditional add items pull down menu.\n\nfunction hideTraditionalAddItemPullDown() {\n // Get the old style Add Item pulldown. We already have\n // such a menu. This is only for system that don't have javascript\n // so we can savely remove it.\n pullDown = document.getElementById('traditional-add-item-pulldown');\n if (pullDown) { \n pullDown.style.display='none';\n }\n}\n\nregisterPloneFunction(hideTraditionalAddItemPullDown)\n\n/* ----- styleswitcher.js ----- */\n// StyleSwitcher functions written by Paul Sowden\nfunction setActiveStyleSheet(title, reset) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var i, a, main;\n for(i=0; (a = document.getElementsByTagName(\"link\")[i]); i++) {\n if (a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")) {\n a.disabled = true;\n if (a.getAttribute(\"title\") == title) {\n a.disabled = false;\n }\n }\n }\n if (reset == 1) {\n createCookie(\"wstyle\", title, 365);\n }\n};\n\nfunction setStyle() {\n var style = readCookie(\"wstyle\");\n if (style != null) {\n setActiveStyleSheet(style, 0);\n }\n};\nregisterPloneFunction(setStyle);\n\n\n\n\n/* ----- table_sorter.js ----- */\n\n/********* Table sorter script *************/\n// Table sorter script, thanks to Geir B\u00c3\u00a6kholt for this.\n// DOM table sorter originally made by Paul Sowden \n\nfunction compare(a,b)\n{\n au = new String(a);\n bu = new String(b);\n\n if (au.charAt(4) != '-' && au.charAt(7) != '-')\n {\n var an = parseFloat(au)\n var bn = parseFloat(bu)\n }\n if (isNaN(an) || isNaN(bn))\n {as = au.toLowerCase()\n bs = bu.toLowerCase()\n if (as > bs)\n {return 1;}\n else\n {return -1;}\n }\n else {\n return an - bn;\n }\n}\nfunction getConcatenedTextContent(node) {\n var _result = \"\";\n if (node == null) {\n return _result;\n }\n var childrens = node.childNodes;\n var i = 0;\n while (i < childrens.length) {\n var child = childrens.item(i);\n switch (child.nodeType) {\n case 1: // ELEMENT_NODE\n case 5: // ENTITY_REFERENCE_NODE\n _result += getConcatenedTextContent(child);\n break;\n case 3: // TEXT_NODE\n case 2: // ATTRIBUTE_NODE\n case 4: // CDATA_SECTION_NODE\n _result += child.nodeValue;\n break;\n case 6: // ENTITY_NODE\n case 7: // PROCESSING_INSTRUCTION_NODE\n case 8: // COMMENT_NODE\n case 9: // DOCUMENT_NODE\n case 10: // DOCUMENT_TYPE_NODE\n case 11: // DOCUMENT_FRAGMENT_NODE\n case 12: // NOTATION_NODE\n // skip\n break;\n }\n i ++;\n }\n return _result;\n}\n\nfunction sort(e) {\n var el = window.event ? window.event.srcElement : e.currentTarget;\n\n // a pretty ugly sort function, but it works nonetheless\n var a = new Array();\n // check if the image or the th is clicked. Proceed to parent id it is the image\n // NOTE THAT nodeName IS UPPERCASE\n if (el.nodeName == 'IMG') el = el.parentNode;\n //var name = el.firstChild.nodeValue;\n // This is not very robust, it assumes there is an image as first node then text\n var name = el.childNodes.item(1).nodeValue;\n var dad = el.parentNode;\n var node;\n \n // kill all arrows\n for (var im = 0; (node = dad.getElementsByTagName(\"th\").item(im)); im++) {\n // NOTE THAT nodeName IS IN UPPERCASE\n if (node.lastChild.nodeName == 'IMG')\n {\n lastindex = node.getElementsByTagName('img').length - 1;\n node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url + '/arrowBlank.gif');\n }\n }\n \n for (var i = 0; (node = dad.getElementsByTagName(\"th\").item(i)); i++) {\n var xre = new RegExp(/\\bnosort\\b/);\n // Make sure we are not messing with nosortable columns, then check second node.\n if (!xre.exec(node.className) && node.childNodes.item(1).nodeValue == name) \n {\n //window.alert(node.childNodes.item(1).nodeValue;\n lastindex = node.getElementsByTagName('img').length -1;\n node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url + '/arrowUp.gif');\n break;\n }\n }\n\n var tbody = dad.parentNode.parentNode.getElementsByTagName(\"tbody\").item(0);\n for (var j = 0; (node = tbody.getElementsByTagName(\"tr\").item(j)); j++) {\n\n // crude way to sort by surname and name after first choice\n a[j] = new Array();\n a[j][0] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(i));\n a[j][1] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(1));\n a[j][2] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(0)); \n a[j][3] = node;\n }\n\n if (a.length > 1) {\n \n a.sort(compare);\n\n // not a perfect way to check, but hell, it suits me fine\n if (a[0][0] == getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(0).getElementsByTagName(\"td\").item(i))\n && a[1][0] == getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(1).getElementsByTagName(\"td\").item(i))) \n {\n a.reverse();\n lastindex = el.getElementsByTagName('img').length - 1;\n el.getElementsByTagName('img').item(lastindex).setAttribute('src', portal_url + '/arrowDown.gif');\n }\n\n }\n \n for (var j = 0; j < a.length; j++) {\n a[j][3].className = ((j % 2) == 0) ? 'odd' : 'even';\n tbody.appendChild(a[j][3]);\n }\n}\n \nfunction initalizeTableSort(e) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var tbls = document.getElementsByTagName('table');\n for (var t = 0; t < tbls.length; t++)\n {\n // elements of class=\"listing\" can be sorted\n var re = new RegExp(/\\blisting\\b/)\n // elements of class=\"nosort\" should not be sorted\n var xre = new RegExp(/\\bnosort\\b/)\n if (re.exec(tbls[t].className) && !xre.exec(tbls[t].className))\n {\n try {\n var thead = tbls[t].getElementsByTagName(\"thead\").item(0);\n var node;\n // set up blank spaceholder gifs\n blankarrow = document.createElement('img');\n blankarrow.setAttribute('src', portal_url + '/arrowBlank.gif');\n blankarrow.setAttribute('height',6);\n blankarrow.setAttribute('width',9);\n // the first sortable column should get an arrow initially.\n initialsort = false;\n for (var i = 0; (node = thead.getElementsByTagName(\"th\").item(i)); i++) {\n // check that the columns does not have class=\"nosort\"\n if (!xre.exec(node.className)) {\n node.insertBefore(blankarrow.cloneNode(1), node.firstChild);\n node.style.cursor = 'pointer';\n if (!initialsort) {\n initialsort = true;\n uparrow = document.createElement('img');\n uparrow.setAttribute('src', portal_url + '/arrowUp.gif');\n uparrow.setAttribute('height',6);\n uparrow.setAttribute('width',9);\n node.appendChild(uparrow);\n } else {\n node.appendChild(blankarrow.cloneNode(1));\n }\n \n if (node.addEventListener) node.addEventListener(\"click\",sort,false);\n else if (node.attachEvent) node.attachEvent(\"onclick\",sort);\n }\n }\n } catch(er) {}\n }\n }\n} \n// **** End table sort script ***\nregisterPloneFunction(initalizeTableSort) \n\n\n\n/* ----- calendar_formfield.js ----- */\n// jscalendar glue -- Leonard Norrg\u00c3\u00a5rd <vinsci@*>\n// This function gets called when the user clicks on some date.\nfunction onJsCalendarDateUpdate(cal) {\n var year = cal.params.input_id_year;\n var month = cal.params.input_id_month;\n var day = cal.params.input_id_day;\n // var hour = cal.params.input_id_hour;\n // var minute = cal.params.input_id_minute;\n\n // cal.params.inputField.value = cal.date.print('%Y/%m/%d %H:%M'); // doesn't work in Opera, don't use time now\n //cal.params.inputField.value = cal.date.print('%Y/%m/%d'); // doesn't work in Opera\n var daystr = '' + cal.date.getDate();\n if (daystr.length == 1)\n \tdaystr = '0' + daystr;\n var monthstr = '' + (cal.date.getMonth()+1);\n if (monthstr.length == 1)\n\tmonthstr = '0' + monthstr;\n cal.params.inputField.value = '' + cal.date.getFullYear() + '/' + monthstr + '/' + daystr\n\n year.value = cal.params.inputField.value.substring(0,4);\n month.value = cal.params.inputField.value.substring(5,7);\n day.value = cal.params.inputField.value.substring(8,10);\n // hour.value = cal.params.inputField.value.substring(11,13);\n // minute.value= cal.params.inputField.value.substring(14,16);\n}\n\n\nfunction showJsCalendar(input_id_anchor, input_id, input_id_year, input_id_month, input_id_day, input_id_hour, input_id_minute, yearStart, yearEnd) {\n // do what jscalendar-x.y.z/calendar-setup.js:Calendar.setup would do\n var input_id_anchor = document.getElementById(input_id_anchor);\n var input_id = document.getElementById(input_id);\n var input_id_year = document.getElementById(input_id_year);\n var input_id_month = document.getElementById(input_id_month);\n var input_id_day = document.getElementById(input_id_day);\n // var input_id_hour = document.getElementById(input_id_hour);\n // var input_id_minute = document.getElementById(input_id_minute);\n var format = 'y/mm/dd';\n\n var dateEl = input_id;\n var mustCreate = false;\n var cal = window.calendar;\n\n var params = {\n 'range' : [yearStart, yearEnd],\n inputField : input_id,\n input_id_year : input_id_year,\n input_id_month: input_id_month,\n input_id_day : input_id_day\n // input_id_hour : input_id_hour,\n // input_id_minute: input_id_minute\n };\n\n function param_default(pname, def) { if (typeof params[pname] == \"undefined\") { params[pname] = def; } };\n\n param_default(\"inputField\", null);\n param_default(\"displayArea\", null);\n param_default(\"button\", null);\n param_default(\"eventName\", \"click\");\n param_default(\"ifFormat\", \"%Y/%m/%d\");\n param_default(\"daFormat\", \"%Y/%m/%d\");\n param_default(\"singleClick\", true);\n param_default(\"disableFunc\", null);\n param_default(\"dateStatusFunc\", params[\"disableFunc\"]); // takes precedence if both are defined\n param_default(\"dateText\", null);\n param_default(\"firstDay\", 1);\n param_default(\"align\", \"Bl\");\n param_default(\"range\", [1900, 2999]);\n param_default(\"weekNumbers\", true);\n param_default(\"flat\", null);\n param_default(\"flatCallback\", null);\n param_default(\"onSelect\", null);\n param_default(\"onClose\", null);\n param_default(\"onUpdate\", null);\n param_default(\"date\", null);\n param_default(\"showsTime\", false);\n param_default(\"timeFormat\", \"24\");\n param_default(\"electric\", true);\n param_default(\"step\", 2);\n param_default(\"position\", null);\n param_default(\"cache\", false);\n param_default(\"showOthers\", false);\n param_default(\"multiple\", null);\n\n if (!(cal && params.cache)) {\n\twindow.calendar = cal = new Calendar(params.firstDay,\n\t null,\n\t onJsCalendarDateUpdate,\n\t function(cal) { cal.hide(); });\n\tcal.time24 = true;\n\tcal.weekNumbers = true;\n\tmustCreate = true;\n } else {\n cal.hide();\n }\n cal.showsOtherMonths = false;\n cal.yearStep = 2;\n cal.setRange(yearStart,yearEnd);\n cal.params = params;\n cal.setDateStatusHandler(null);\n cal.getDateText = null;\n cal.setDateFormat(format);\n if (mustCreate)\n\tcal.create();\n cal.refresh();\n if (!params.position)\n cal.showAtElement(input_id_anchor, null);\n else\n cal.showAt(params.position[0], params.position[1]);\n return false;\n}\n\n\n// This function updates a hidden date field with the current values of the widgets\nfunction update_date_field(field, year, month, day, hour, minute, ampm)\n{\n var field = document.getElementById(field)\n var date = document.getElementById(date)\n var year = document.getElementById(year)\n var month = document.getElementById(month)\n var day = document.getElementById(day)\n var hour = document.getElementById(hour)\n var minute = document.getElementById(minute)\n var ampm = document.getElementById(ampm)\n\n if (0 < year.value)\n {\n // Return ISO date string\n // Note: This relies heavily on what date_components_support.py puts into the form.\n field.value = year.value + \"-\" + month.value + \"-\" + day.value + \" \" + hour.value + \":\" + minute.value\n // Handle optional AM/PM\n if (ampm && ampm.value)\n field.value = field.value + \" \" + ampm.value\n } \n else \n {\n // Return empty string\n field.value = ''\n // Reset widgets\n month.options[0].selected = 1\n day.options[0].selected = 1\n hour.options[0].selected = 1\n minute.options[0].selected = 1\n if (ampm && ampm.options)\n ampm.options[0].selected = 1\n }\n}\n\n\n\n\n/* ----- calendarpopup.js ----- */\n\n// The calendar popup show/hide:\n\n function showDay(date) {\n document.getElementById('day' + date).style.visibility = 'visible';\n return true;\n } \n function hideDay(date) {\n document.getElementById('day' + date).style.visibility = 'hidden';\n return true;\n }\n\n\n \n\n\n\n\n/* ----- ie5fixes.js ----- */\n/* Mike Malloch's fixes for Internet Explorer 5 - \n * We dont care too much about IE5,\n * But these stop if from spitting errormessages at the user \n */\nfunction hackPush(el){\n this[this.length] = el;\n}\n\nfunction hackPop(){\n var N = this.length - 1, el = this[N];\n this.length = N\n return el;\n}\n\nfunction hackShift(){\n var one = this[0], N = this.length;\n for (var i = 1; i < N; i++){\n this[i-1] = this[i];\n }\n this.length = N-1\n return one;\n}\n\nvar testPushPop = new Array();\nif (testPushPop.push){\n}else{\n Array.prototype.push = hackPush\n Array.prototype.pop = hackPop\n Array.prototype.shift = hackShift;\n}\n\n/* ----- formUnload.js ----- */\n/* BeforeUnload form processing */\nif (!window.beforeunload) (function() {\n var BeforeUnloadHandler = function() {\n var self = this;\n\n this.message = window.form_modified_message ||\n \"Your form has not been saved. All changes you have made will be lost.\";\n\n this.forms = [];\n this.chkId = [];\n this.chkType = new this.CheckType();\n this.handlers = [this.isAnyFormChanged];\n this.submitting = false;\n\n this.execute = function(event) {\n if (self.submitting) return;\n if (!event) event = window.event;\n\n for (var i = 0; i < self.handlers.length; i++) {\n var fn = self.handlers[i];\n var message = message || fn.apply(self);\n }\n if (message===true) message = self.message;\n if (message===false) message = undefined;\n if (event && message) { event.returnValue = message; }\n return message;\n }\n this.execute.tool = this;\n }\n var Class = BeforeUnloadHandler.prototype;\n\n // form checking code\n Class.isAnyFormChanged = function() {\n for (var i=0; i < this.forms.length; i++) {\n var form = this.forms[i];\n if (this.isElementChanged(form)) {\n return true;\n }\n }\n return false;\n }\n Class.addHandler = function(fn) {\n this.handlers.push(fn);\n }\n Class.onsubmit = function() {\n var tool = window.onbeforeunload && window.onbeforeunload.tool;\n tool.submitting = true;\n }\n Class.addForm = function(form) {\n for (var i = 0; i < this.forms.length; i++) {\n if (this.forms[i]==form) return;\n }\n this.forms.push(form);\n form.onsubmit = this.onsubmit;\n var elements = form.getElementsByTagName('input');\n for (var j = 0; j < elements.length; j++) {\n var ele = elements[j];\n if (ele.type=='hidden') {\n ele.setAttribute('originalValue', ele.defaultValue);\n }\n }\n }\n Class.addForms = function() {\n for (var i = 0; i < arguments.length; i++) {\n var element = arguments[i];\n if (!element) continue;\n if (element.tagName=='FORM') {\n this.addForm(element);\n }\n else {\n var forms = element.getElementsByTagName('form');\n for (var j = 0; j < forms.length; j++) {\n this.addForm(forms[j]);\n }\n }\n }\n }\n Class.removeForms = function() {\n for (var i = 0; i < arguments.length; i++) {\n var element = arguments[i];\n if (!element) continue;\n if (element.tagName=='FORM') {\n for (var j = 0; j < arguments.length; j++) {\n if (this.forms[j] == element) {\n this.forms.splice(j--, 1);\n element.onsubmit=null;\n }\n }\n } else {\n var forms = element.getElementsByTagName('form');\n for (var j = 0; j < forms.length; j++) {\n this.removeForms(forms[j]);\n }\n }\n }\n }\n\n Class.CheckType = function() {};\n var c = Class.CheckType.prototype;\n c.checkbox = c.radio = function(ele) {\n return ele.checked != ele.defaultChecked;\n }\n c.password = c.textarea = c.text = function(ele) {\n return ele.value != ele.defaultValue;\n }\n // hidden: cannot tell on Mozilla without special treatment\n c.hidden = function(ele) {\n var orig = ele.getAttribute(\"originalValue\");\n return orig && (ele.value != orig);\n }\n\n c['select-one'] = function(ele) {\n for (var i=0 ; i < ele.length; i++) {\n var opt = ele.options[i];\n if ( opt.selected != opt.defaultSelected) {\n if (i===0 && opt.selected) continue; /* maybe no default */\n return true;\n }\n }\n return false;\n }\n\n c['select-multiple'] = function(ele) {\n for (var i=0 ; i < ele.length; i++) {\n var opt = ele.options[i];\n if ( opt.selected != opt.defaultSelected) {\n return true;\n }\n }\n return false;\n }\n\n Class.chk_form = function(form) {\n var elements = form.elements;\n for (var i=0; i < elements.length; i++ ) {\n var element = elements[i];\n if (this.isElementChanged(element)) {\n return true;\n }\n }\n return false;\n }\n\n Class.isElementChanged = function(ele) {\n var method = ele.id && this.chkId[ele.id];\n if (!method && ele.type && ele.name)\n method = this.chkType[ele.type];\n if (!method && ele.tagName)\n method = this['chk_'+ele.tagName.toLowerCase()];\n\n return method? method.apply(this, [ele]) : false;\n };\n\n window.onbeforeunload = new BeforeUnloadHandler().execute;\n \n registerPloneFunction(function() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var tool = window.onbeforeunload && window.onbeforeunload.tool;\n var content = getContentArea();\n if (tool && content) {\n var forms = cssQuery('form.enableUnloadProtection');\n for (var i=0; i < forms.length; i++) {\n tool.addForm(forms[i]);\n }\n }\n });\n})();\n\n/* ----- sarissa.js ----- */\n/*****************************************************************************\n *\n * Sarissa XML library version 0.9.6\n * Copyright (c) 2003 Manos Batsis, \n * mailto: mbatsis at users full stop sourceforge full stop net\n * This software is distributed under the Kupu License. See\n * LICENSE.txt for license text. See the Sarissa homepage at\n * http://sarissa.sourceforge.net for more information.\n *\n *****************************************************************************\n\n * ====================================================================\n * About\n * ====================================================================\n * Sarissa cross browser XML library \n * @version 0.9.6\n * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net\n *\n * Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.\n * The library supports Gecko based browsers like Mozilla and Firefox,\n * Internet Explorer (5.5+ with MSXML3.0+) and, last but not least, KHTML based browsers like\n * Konqueror and Safari.\n *\n */\n/**\n * <p>Sarissa is a utility class. Provides static methods for DOMDocument and \n * XMLHTTP objects, DOM Node serializatrion to XML strings and other goodies.</p>\n * @constructor\n */\nfunction Sarissa(){};\n/** @private */\nSarissa.PARSED_OK = \"Document contains no parsing errors\";\n/**\n * Tells you whether transformNode and transformNodeToObject are available. This functionality\n * is contained in sarissa_ieemu_xslt.js and is deprecated. If you want to control XSLT transformations\n * use the XSLTProcessor\n * @deprecated\n * @type boolean\n */\nSarissa.IS_ENABLED_TRANSFORM_NODE = false;\n/**\n * tells you whether XMLHttpRequest (or equivalent) is available\n * @type boolean\n */\nSarissa.IS_ENABLED_XMLHTTP = false;\n/**\n * tells you whether selectNodes/selectSingleNode is available\n * @type boolean\n */\nSarissa.IS_ENABLED_SELECT_NODES = false;\nvar _sarissa_iNsCounter = 0;\nvar _SARISSA_IEPREFIX4XSLPARAM = \"\";\nvar _SARISSA_HAS_DOM_IMPLEMENTATION = document.implementation && true;\nvar _SARISSA_HAS_DOM_CREATE_DOCUMENT = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.createDocument;\nvar _SARISSA_HAS_DOM_FEATURE = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.hasFeature;\nvar _SARISSA_IS_MOZ = _SARISSA_HAS_DOM_CREATE_DOCUMENT && _SARISSA_HAS_DOM_FEATURE;\nvar _SARISSA_IS_SAFARI = navigator.userAgent.toLowerCase().indexOf(\"applewebkit\") != -1;\nvar _SARISSA_IS_IE = document.all && window.ActiveXObject && navigator.userAgent.toLowerCase().indexOf(\"msie\") > -1 && navigator.userAgent.toLowerCase().indexOf(\"opera\") == -1;\n\nif(!window.Node || !window.Node.ELEMENT_NODE){\n var Node = {ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12};\n};\n\n// IE initialization\nif(_SARISSA_IS_IE){\n // for XSLT parameter names, prefix needed by IE\n _SARISSA_IEPREFIX4XSLPARAM = \"xsl:\";\n // used to store the most recent ProgID available out of the above\n var _SARISSA_DOM_PROGID = \"\";\n var _SARISSA_XMLHTTP_PROGID = \"\";\n /**\n * Called when the Sarissa_xx.js file is parsed, to pick most recent\n * ProgIDs for IE, then gets destroyed.\n * @param idList an array of MSXML PROGIDs from which the most recent will be picked for a given object\n * @param enabledList an array of arrays where each array has two items; the index of the PROGID for which a certain feature is enabled\n */\n pickRecentProgID = function (idList, enabledList){\n // found progID flag\n var bFound = false;\n for(var i=0; i < idList.length && !bFound; i++){\n try{\n var oDoc = new ActiveXObject(idList[i]);\n o2Store = idList[i];\n bFound = true;\n for(var j=0;j<enabledList.length;j++)\n if(i <= enabledList[j][1])\n Sarissa[\"IS_ENABLED_\"+enabledList[j][0]] = true;\n }catch (objException){\n // trap; try next progID\n };\n };\n if (!bFound)\n throw \"Could not retreive a valid progID of Class: \" + idList[idList.length-1]+\". (original exception: \"+e+\")\";\n idList = null;\n return o2Store;\n };\n // pick best available MSXML progIDs\n _SARISSA_DOM_PROGID = pickRecentProgID([\"Msxml2.DOMDocument.5.0\", \"Msxml2.DOMDocument.4.0\", \"Msxml2.DOMDocument.3.0\", \"MSXML2.DOMDocument\", \"MSXML.DOMDocument\", \"Microsoft.XMLDOM\"], [[\"SELECT_NODES\", 2],[\"TRANSFORM_NODE\", 2]]);\n _SARISSA_XMLHTTP_PROGID = pickRecentProgID([\"Msxml2.XMLHTTP.5.0\", \"Msxml2.XMLHTTP.4.0\", \"MSXML2.XMLHTTP.3.0\", \"MSXML2.XMLHTTP\", \"Microsoft.XMLHTTP\"], [[\"XMLHTTP\", 4]]);\n _SARISSA_THREADEDDOM_PROGID = pickRecentProgID([\"Msxml2.FreeThreadedDOMDocument.5.0\", \"MSXML2.FreeThreadedDOMDocument.4.0\", \"MSXML2.FreeThreadedDOMDocument.3.0\"]);\n _SARISSA_XSLTEMPLATE_PROGID = pickRecentProgID([\"Msxml2.XSLTemplate.5.0\", \"Msxml2.XSLTemplate.4.0\", \"MSXML2.XSLTemplate.3.0\"], [[\"XSLTPROC\", 2]]);\n // we dont need this anymore\n pickRecentProgID = null;\n //============================================\n // Factory methods (IE)\n //============================================\n // see non-IE version\n Sarissa.getDomDocument = function(sUri, sName){\n var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);\n // if a root tag name was provided, we need to load it in the DOM\n // object\n if (sName){\n // if needed, create an artifical namespace prefix the way Moz\n // does\n if (sUri){\n oDoc.loadXML(\"<a\" + _sarissa_iNsCounter + \":\" + sName + \" xmlns:a\" + _sarissa_iNsCounter + \"=\\\"\" + sUri + \"\\\" />\");\n // don't use the same prefix again\n ++_sarissa_iNsCounter;\n }\n else\n oDoc.loadXML(\"<\" + sName + \"/>\");\n };\n return oDoc;\n };\n // see non-IE version \n Sarissa.getParseErrorText = function (oDoc) {\n var parseErrorText = Sarissa.PARSED_OK;\n if(oDoc.parseError != 0){\n parseErrorText = \"XML Parsing Error: \" + oDoc.parseError.reason + \n \"\\nLocation: \" + oDoc.parseError.url + \n \"\\nLine Number \" + oDoc.parseError.line + \", Column \" + \n oDoc.parseError.linepos + \n \":\\n\" + oDoc.parseError.srcText +\n \"\\n\";\n for(var i = 0; i < oDoc.parseError.linepos;i++){\n parseErrorText += \"-\";\n };\n parseErrorText += \"^\\n\";\n };\n return parseErrorText;\n };\n // see non-IE version\n Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {\n oDoc.setProperty(\"SelectionLanguage\", \"XPath\");\n oDoc.setProperty(\"SelectionNamespaces\", sNsSet);\n }; \n /**\n * Basic implementation of Mozilla's XSLTProcessor for IE. \n * Reuses the same XSLT stylesheet for multiple transforms\n * @constructor\n */\n XSLTProcessor = function(){\n this.template = new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);\n this.processor = null;\n };\n /**\n * Impoprts the given XSLT DOM and compiles it to a reusable transform\n * @argument xslDoc The XSLT DOMDocument to import\n */\n XSLTProcessor.prototype.importStylesheet = function(xslDoc){\n // convert stylesheet to free threaded\n var converted = new ActiveXObject(_SARISSA_THREADEDDOM_PROGID); \n converted.loadXML(xslDoc.xml);\n this.template.stylesheet = converted;\n this.processor = this.template.createProcessor();\n // (re)set default param values\n this.paramsSet = new Array();\n };\n /**\n * Transform the given XML DOM\n * @argument sourceDoc The XML DOMDocument to transform\n * @return The transformation result as a DOM Document\n */\n XSLTProcessor.prototype.transformToDocument = function(sourceDoc){\n this.processor.input = sourceDoc;\n var outDoc = new ActiveXObject(_SARISSA_DOM_PROGID);\n this.processor.output = outDoc; \n this.processor.transform();\n return outDoc;\n };\n /**\n * Not sure if this works in IE. Maybe this will allow non-well-formed\n * transformation results (i.e. with no single root element)\n * @argument sourceDoc The XML DOMDocument to transform\n * @return The transformation result as a DOM Fragment\n */\n XSLTProcessor.prototype.transformToFragment = function(sourceDoc, ownerDocument){\n return this.transformToDocument(sourceDoc);\n };\n /**\n * Set global XSLT parameter of the imported stylesheet\n * @argument nsURI The parameter namespace URI\n * @argument name The parameter base name\n * @argument value The new parameter value\n */\n XSLTProcessor.prototype.setParameter = function(nsURI, name, value){\n /* nsURI is optional but cannot be null */\n if(nsURI){\n this.processor.addParameter(name, value, nsURI);\n }else{\n this.processor.addParameter(name, value);\n };\n /* update updated params for getParameter */\n if(!this.paramsSet[\"\"+nsURI]){\n this.paramsSet[\"\"+nsURI] = new Array();\n };\n this.paramsSet[\"\"+nsURI][name] = value;\n };\n /**\n * Gets a parameter if previously set by setParameter. Returns null\n * otherwise\n * @argument name The parameter base name\n * @argument value The new parameter value\n * @return The parameter value if reviously set by setParameter, null otherwise\n */\n XSLTProcessor.prototype.getParameter = function(nsURI, name){\n if(this.paramsSet[\"\"+nsURI] && this.paramsSet[\"\"+nsURI][name])\n return this.paramsSet[\"\"+nsURI][name];\n else\n return null;\n };\n}\nelse{ /* end IE initialization, try to deal with real browsers now ;-) */\n if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){\n if(window.XMLDocument){\n /**\n * <p>Emulate IE's onreadystatechange attribute</p>\n */\n XMLDocument.prototype.onreadystatechange = null;\n /**\n * <p>Emulates IE's readyState property, which always gives an integer from 0 to 4:</p>\n * <ul><li>1 == LOADING,</li>\n * <li>2 == LOADED,</li>\n * <li>3 == INTERACTIVE,</li>\n * <li>4 == COMPLETED</li></ul>\n */\n XMLDocument.prototype.readyState = 0;\n /**\n * <p>Emulate IE's parseError attribute</p>\n */\n XMLDocument.prototype.parseError = 0;\n\n // NOTE: setting async to false will only work with documents\n // called over HTTP (meaning a server), not the local file system,\n // unless you are using Moz 1.4+.\n // BTW the try>catch block is for 1.4; I haven't found a way to check if\n // the property is implemented without\n // causing an error and I dont want to use user agent stuff for that...\n var _SARISSA_SYNC_NON_IMPLEMENTED = false;\n try{\n /**\n * <p>Emulates IE's async property for Moz versions prior to 1.4.\n * It controls whether loading of remote XML files works\n * synchronously or asynchronously.</p>\n */\n XMLDocument.prototype.async = true;\n _SARISSA_SYNC_NON_IMPLEMENTED = true;\n }catch(e){/* trap */};\n /**\n * <p>Keeps a handle to the original load() method. Internal use and only\n * if Mozilla version is lower than 1.4</p>\n * @private\n */\n XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load;\n\n /**\n * <p>Overrides the original load method to provide synchronous loading for\n * Mozilla versions prior to 1.4, using an XMLHttpRequest object (if\n * async is set to false)</p>\n * @returns the DOM Object as it was before the load() call (may be empty)\n */\n XMLDocument.prototype.load = function(sURI) {\n var oDoc = document.implementation.createDocument(\"\", \"\", null);\n Sarissa.copyChildNodes(this, oDoc);\n this.parseError = 0;\n Sarissa.__setReadyState__(this, 1);\n try {\n if(this.async == false && _SARISSA_SYNC_NON_IMPLEMENTED) {\n var tmp = new XMLHttpRequest();\n tmp.open(\"GET\", sURI, false);\n tmp.send(null);\n Sarissa.__setReadyState__(this, 2);\n Sarissa.copyChildNodes(tmp.responseXML, this);\n Sarissa.__setReadyState__(this, 3);\n }\n else {\n this._sarissa_load(sURI);\n };\n }\n catch (objException) {\n this.parseError = -1;\n }\n finally {\n if(this.async == false){\n Sarissa.__handleLoad__(this);\n };\n };\n return oDoc;\n };\n };//if(window.XMLDocument)\n\n /**\n * <p>Ensures the document was loaded correctly, otherwise sets the\n * parseError to -1 to indicate something went wrong. Internal use</p>\n * @private\n */\n Sarissa.__handleLoad__ = function(oDoc){\n if (!oDoc.documentElement || oDoc.documentElement.tagName == \"parsererror\")\n oDoc.parseError = -1;\n Sarissa.__setReadyState__(oDoc, 4);\n };\n \n /**\n * <p>Attached by an event handler to the load event. Internal use.</p>\n * @private\n */\n _sarissa_XMLDocument_onload = function(){\n Sarissa.__handleLoad__(this);\n };\n \n /**\n * <p>Sets the readyState property of the given DOM Document object.\n * Internal use.</p>\n * @private\n * @argument oDoc the DOM Document object to fire the\n * readystatechange event\n * @argument iReadyState the number to change the readystate property to\n */\n Sarissa.__setReadyState__ = function(oDoc, iReadyState){\n oDoc.readyState = iReadyState;\n if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == \"function\")\n oDoc.onreadystatechange();\n };\n /**\n * <p>Factory method to obtain a new DOM Document object</p>\n * @argument sUri the namespace of the root node (if any)\n * @argument sUri the local name of the root node (if any)\n * @returns a new DOM Document\n */\n Sarissa.getDomDocument = function(sUri, sName){\n var oDoc = document.implementation.createDocument(sUri?sUri:\"\", sName?sName:\"\", null);\n oDoc.addEventListener(\"load\", _sarissa_XMLDocument_onload, false);\n return oDoc;\n }; \n };//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT)\n};\n//==========================================\n// Common stuff\n//==========================================\nif(!window.DOMParser){\n /** \n * DOMParser is a utility class, used to construct DOMDocuments from XML strings\n * @constructor\n */\n DOMParser = function() {\n };\n /** \n * Construct a new DOM Document from the given XMLstring\n * @param sXml the given XML string\n * @param contentType the content type of the document the given string represents (one of text/xml, application/xml, application/xhtml+xml). \n * @return a new DOM Document from the given XML string\n */\n DOMParser.prototype.parseFromString = function(sXml, contentType){\n var doc = Sarissa.getDomDocument();\n doc.loadXML(sXml);\n return doc;\n };\n \n};\n\nif(window.XMLHttpRequest){\n Sarissa.IS_ENABLED_XMLHTTP = true;\n}\nelse if(_SARISSA_IS_IE){\n /**\n * Emulate XMLHttpRequest\n * @constructor\n */\n XMLHttpRequest = function() {\n return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);\n };\n Sarissa.IS_ENABLED_XMLHTTP = true;\n};\n\nif(!window.document.importNode && _SARISSA_IS_IE){\n try{\n /**\n * Implements importNode for the current window document in IE using innerHTML.\n * Testing showed that DOM was multiple times slower than innerHTML for this,\n * sorry folks. If you encounter trouble (who knows what IE does behind innerHTML)\n * please gimme a call.\n * @param oNode the Node to import\n * @param bChildren whether to include the children of oNode\n * @returns the imported node for further use\n */\n window.document.importNode = function(oNode, bChildren){\n var importNode = document.createElement(\"div\");\n if(bChildren)\n importNode.innerHTML = Sarissa.serialize(oNode);\n else\n importNode.innerHTML = Sarissa.serialize(oNode.cloneNode(false));\n return importNode.firstChild;\n };\n }catch(e){};\n};\nif(!Sarissa.getParseErrorText){\n /**\n * <p>Returns a human readable description of the parsing error. Usefull\n * for debugging. Tip: append the returned error string in a &lt;pre&gt;\n * element if you want to render it.</p>\n * <p>Many thanks to Christian Stocker for the initial patch.</p>\n * @argument oDoc The target DOM document\n * @returns The parsing error description of the target Document in\n * human readable form (preformated text)\n */\n Sarissa.getParseErrorText = function (oDoc){\n var parseErrorText = Sarissa.PARSED_OK;\n if(oDoc.parseError != 0){\n /*moz*/\n if(oDoc.documentElement.tagName == \"parsererror\"){\n parseErrorText = oDoc.documentElement.firstChild.data;\n parseErrorText += \"\\n\" + oDoc.documentElement.firstChild.nextSibling.firstChild.data;\n }/*konq*/\n else if(oDoc.documentElement.tagName == \"html\"){\n parseErrorText = Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"h1\")[0], false) + \"\\n\";\n parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"body\")[0], false) + \"\\n\";\n parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"pre\")[0], false);\n };\n };\n return parseErrorText;\n };\n};\nSarissa.getText = function(oNode, deep){\n var s = \"\";\n var nodes = oNode.childNodes;\n for(var i=0; i < nodes.length; i++){\n var node = nodes[i];\n var nodeType = node.nodeType;\n if(nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE){\n s += node.data;\n }\n else if(deep == true\n && (nodeType == Node.ELEMENT_NODE\n || nodeType == Node.DOCUMENT_NODE\n || nodeType == Node.DOCUMENT_FRAGMENT_NODE)){\n s += Sarissa.getText(node, true);\n };\n };\n return s;\n};\nif(window.XMLSerializer){\n /**\n * <p>Factory method to obtain the serialization of a DOM Node</p>\n * @returns the serialized Node as an XML string\n */\n Sarissa.serialize = function(oDoc){\n return (new XMLSerializer()).serializeToString(oDoc);\n };\n}else{\n if((Sarissa.getDomDocument(\"\",\"foo\", null)).xml){\n // see non-IE version\n Sarissa.serialize = function(oDoc) {\n // TODO: check for HTML document and return innerHTML instead\n return oDoc.xml;\n };\n /**\n * Utility class to serialize DOM Node objects to XML strings\n * @constructor\n */\n XMLSerializer = function(){};\n /**\n * Serialize the given DOM Node to an XML string\n * @param oNode the DOM Node to serialize\n */\n XMLSerializer.prototype.serializeToString = function(oNode) {\n return oNode.xml;\n };\n };\n};\n\n/**\n * strips tags from a markup string\n */\nSarissa.stripTags = function (s) {\n return s.replace(/<[^>]+>/g,\"\");\n};\n/**\n * <p>Deletes all child nodes of the given node</p>\n * @argument oNode the Node to empty\n */\nSarissa.clearChildNodes = function(oNode) {\n while(oNode.hasChildNodes()){\n oNode.removeChild(oNode.firstChild);\n };\n};\n/**\n * <p> Copies the childNodes of nodeFrom to nodeTo</p>\n * <p> <b>Note:</b> The second object's original content is deleted before \n * the copy operation, unless you supply a true third parameter</p>\n * @argument nodeFrom the Node to copy the childNodes from\n * @argument nodeTo the Node to copy the childNodes to\n * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false\n */\nSarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {\n if(!bPreserveExisting){\n Sarissa.clearChildNodes(nodeTo);\n };\n var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;\n var nodes = nodeFrom.childNodes;\n if(ownerDoc.importNode && (!_SARISSA_IS_IE)) {\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));\n };\n }\n else{\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(nodes[i].cloneNode(true));\n };\n };\n};\n\n/**\n * <p> Moves the childNodes of nodeFrom to nodeTo</p>\n * <p> <b>Note:</b> The second object's original content is deleted before \n * the move operation, unless you supply a true third parameter</p>\n * @argument nodeFrom the Node to copy the childNodes from\n * @argument nodeTo the Node to copy the childNodes to\n * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false\n */\nSarissa.moveChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {\n if(!bPreserveExisting){\n Sarissa.clearChildNodes(nodeTo);\n };\n \n var nodes = nodeFrom.childNodes;\n // if within the same doc, just move, else copy and delete\n if(nodeFrom.ownerDocument == nodeTo.ownerDocument){\n nodeTo.appendChild(nodes[i]);\n }else{\n var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;\n if(ownerDoc.importNode && (!_SARISSA_IS_IE)) {\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));\n };\n }\n else{\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(nodes[i].cloneNode(true));\n };\n };\n Sarissa.clearChildNodes(nodeFrom);\n };\n \n};\n\n/** \n * <p>Serialize any object to an XML string. All properties are serialized using the property name\n * as the XML element name. Array elements are rendered as <code>array-item</code> elements, \n * using their index/key as the value of the <code>key</code> attribute.</p>\n * @argument anyObject the object to serialize\n * @argument objectName a name for that object\n * @return the XML serializationj of the given object as a string\n */\nSarissa.xmlize = function(anyObject, objectName, indentSpace){\n indentSpace = indentSpace?indentSpace:'';\n var s = indentSpace + '<' + objectName + '>';\n var isLeaf = false;\n if(!(anyObject instanceof Object) || anyObject instanceof Number || anyObject instanceof String \n || anyObject instanceof Boolean || anyObject instanceof Date){\n s += Sarissa.escape(\"\"+anyObject);\n isLeaf = true;\n }else{\n s += \"\\n\";\n var itemKey = '';\n var isArrayItem = anyObject instanceof Array;\n for(var name in anyObject){\n s += Sarissa.xmlize(anyObject[name], (isArrayItem?\"array-item key=\\\"\"+name+\"\\\"\":name), indentSpace + \" \");\n };\n s += indentSpace;\n };\n return s += (objectName.indexOf(' ')!=-1?\"</array-item>\\n\":\"</\" + objectName + \">\\n\");\n};\n\n/** \n * Escape the given string chacters that correspond to the five predefined XML entities\n * @param sXml the string to escape\n */\nSarissa.escape = function(sXml){\n return sXml.replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&apos;\");\n};\n\n/** \n * Unescape the given string. This turns the occurences of the predefined XML \n * entities to become the characters they represent correspond to the five predefined XML entities\n * @param sXml the string to unescape\n */\nSarissa.unescape = function(sXml){\n return sXml.replace(/&apos;/g,\"'\")\n .replace(/&quot;/g,\"\\\"\")\n .replace(/&gt;/g,\">\")\n .replace(/&lt;/g,\"<\")\n .replace(/&amp;/g,\"&\");\n};\n// EOF\n\n\n/* ----- login.js ----- */\n// Functions used by login pages\r\n\r\nfunction cookiesEnabled() {\r\n // Test whether cookies are enabled by attempting to set a cookie and then change its value\r\n // set test cookie\r\n var c = \"areYourCookiesEnabled=0\";\r\n document.cookie = c;\r\n var dc = document.cookie;\r\n // cookie not set? fail\r\n if (dc.indexOf(c) == -1) return 0;\r\n // change test cookie\r\n c = \"areYourCookiesEnabled=1\";\r\n document.cookie = c;\r\n dc = document.cookie;\r\n // cookie not changed? fail\r\n if (dc.indexOf(c) == -1) return 0;\r\n // delete cookie\r\n document.cookie = \"areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT\";\r\n return 1;\r\n}\r\n\r\nfunction setLoginVars(user_name_id, alt_user_name_id, password_id, empty_password_id, js_enabled_id, cookies_enabled_id) {\r\n // Indicate that javascript is enabled, set cookie status, copy username and password length info to \r\n // alternative variables since these vars are removed from the request by zope's authentication mechanism.\r\n if (js_enabled_id) {\r\n el = document.getElementById(js_enabled_id);\r\n if (el) { el.value = 1; }\r\n }\r\n if (cookies_enabled_id) {\r\n el = document.getElementById(cookies_enabled_id);\r\n // Do a fresh cookies enabled test every time we press the login button\r\n // so that we are up to date in case the user enables cookies after seeing\r\n // the cookies message.\r\n if (el) { el.value = cookiesEnabled(); } \r\n }\r\n if (user_name_id && alt_user_name_id) {\r\n user_name = document.getElementById(user_name_id)\r\n alt_user_name = document.getElementById(alt_user_name_id)\r\n if (user_name && alt_user_name) {\r\n alt_user_name.value = user_name.value;\r\n } \r\n }\r\n if (password_id && empty_password_id) {\r\n password = document.getElementById(password_id)\r\n empty_password = document.getElementById(empty_password_id)\r\n if (password && empty_password) {\r\n if (password.value.length==0) {\r\n empty_password.value = '1';\r\n } else {\r\n empty_password.value = '0';\r\n }\r\n }\r\n }\r\n return 1;\r\n}\r\n\r\nfunction showCookieMessage(msg_id) {\r\n // Show the element with the given id if cookies are not enabled\r\n msg = document.getElementById(msg_id)\r\n if (msg) {\r\n if (cookiesEnabled()) {\r\n msg.style.display = 'none';\r\n } else {\r\n msg.style.display = 'block';\r\n }\r\n }\r\n}\r\n\r\nfunction showEnableCookiesMessage() {\r\n // Show the element with the id 'enable_cookies_message' if cookies are not enabled\r\n showCookieMessage('enable_cookies_message')\r\n}\r\n// Call showEnableCookiesMessage after the page loads\r\nregisterPloneFunction(showEnableCookiesMessage);\r\n\n","truncated":"false"}
{"page":"http://www.mtss.go.cr/","url":"http://www.mtss.go.cr/js_srv/xmlextras.js","body":"//<script>\r\n//////////////////\r\n// Helper Stuff //\r\n//////////////////\r\n\r\n// used to find the Automation server name\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\t\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\n//////////////////////////\r\n// Start the Real stuff //\r\n//////////////////////////\r\n\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1; \r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// fell through\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\r\n\t\t// DOM2\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\t\t\t\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\r\n\t\t\treturn doc;\r\n\t\t}\r\n\r\n\t\tif (window.ActiveXObject) \r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t/*\r\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\t*/\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\r\n}","truncated":"false"}
{"page":"http://www.8comic.com/","url":"http://www.comicbus.com/msg/xml.js","body":"//////////////////\r\n// Helper Funcs //\r\n//////////////////\r\n// used to find the Automation object name\r\n\r\nfunction LoadHtml(url,ele){ \r\nvar xh=window.Event?new XMLHttpRequest():new ActiveXObject(\"Microsoft.XMLHTTP\") ;\r\nxh.open(\"GET\",url,true) ;\r\nif(window.Event) \r\n{xh.overrideMimeType(\"text/xml;charset=gb2312\");}\r\n\r\nwindow.gb2utf8=function(data){ \r\nvar glbEncode=[],t,i,j,len ;gb2utf8_data=data;execScript(\"gb2utf8_data = MidB(gb2utf8_data, 1)+' '\", \"vbscript\");\r\nt=escape(gb2utf8_data).replace(/%u/g,\"\").replace(/(.{2})(.{2})/g,\"%$2%$1\").replace(/%([A-Z].)%(.{2})/g,\"@$1$2\");t=t.split(\"@\");i=0;len=t.length ;\r\nwhile(++i<len){j=t[i].substring(0,4);if(!glbEncode[j]){gb2utf8_char = eval(\"0x\"+j);execScript(\"gb2utf8_char=Chr(gb2utf8_char)\",\"vbscript\");glbEncode[j]=escape(gb2utf8_char).substring(1,6);} \r\nt[i]=glbEncode[j]+t[i].substring(4);} \r\ngb2utf8_data=gb2utf8_char=null;return unescape(t.join(\"%\")).slice(0,-1);\r\n} \r\nxh.onreadystatechange=function(){if(xh.readyState!=4) return;document.getElementById(ele).innerHTML=window.Event?xh.responseText:window.gb2utf8(xh.responseBody);} \r\n\r\nxh.send(null) \r\n} \r\n\r\n\r\nfunction GetHtml(url,ele)\r\n{\r\nvar xmlHttp = XmlHttpPool.pick();\t\r\nif(url.indexOf(\"?\")>=0) url+=\"&ran=\"+Math.random();else url+=\"?ran=\"+Math.random();\r\nxmlHttp.open(\"GET\", url, true); \r\nxmlHttp.send(null);\r\nxmlHttp.onreadystatechange = function(){if (xmlHttp.readyState == 4) \r\n{\r\n\tvar htm=typeof(xmlHttp.responseText)==\"undefined\"?\"&nbsp;\":xmlHttp.responseText;\r\n\tif(htm.indexOf(\"404\")>0 && htm.indexOf(\"javascript:history.back(1)\")>0) htm=\"\";\r\n\tif(ele==null) document.write(htm);else document.getElementById(ele).innerHTML= htm;\r\n\t//if(xmlHttp.responseText.indexOf(\"404\")>0 && xmlHttp.responseText.indexOf(\"javascript:history.back(1)\")>0) return \"\";\r\n\t//if(ele==null) document.write(xmlHttp.responseText);else document.getElementById(ele).innerHTML= typeof(xmlHttp.responseText)==\"undefined\"?\"&nbsp;\":xmlHttp.responseText;\r\n}\r\n}\r\n}\r\n\r\nfunction GetJS(url)\r\n{\r\nvar xmlHttp = XmlHttpPool.pick();\t\r\nif(url.indexOf(\"?\")>=0) url+=\"&ran=\"+Math.random();else url+=\"?ran=\"+Math.random();\r\nxmlHttp.open(\"GET\", url, true); \r\nxmlHttp.send(null);\r\nxmlHttp.onreadystatechange = function(){if (xmlHttp.readyState == 4)try{eval(xmlHttp.responseText);}catch(e){}}\r\n}\r\n\r\n\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XMLHttp object\");\r\n}\r\n\r\n\r\n//////////////////////////\r\n// Start the Real Funcs //\r\n//////////////////////////\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\t// NS & MOZ\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1;\r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\t// IE\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// Fail\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\t\t// DOM2, MOZ & NS\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn doc;\r\n\t\t}\r\n\t\tif (window.ActiveXObject)\r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\t\t\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\t\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n}\r\n\r\n/*\r\n * xmlHttp Pool\r\n * \r\n * userage: var xmlhttpObj = XmlHttpPool.pick()\r\n */\r\nvar XmlHttpPoolArr = new Array();\r\nvar XmlHttpPoolSize = 100;\r\nvar XHPCurrentAvailableID = 0;\r\n\r\nfunction XmlHttpPool() {}\r\n\r\nXmlHttpPool.pick = function() {\r\n\tvar pos = XHPCurrentAvailableID;\r\n\tXmlHttpPoolArr[pos] = XmlHttp.create();\r\n\t\r\n\tXHPCurrentAvailableID >= (XmlHttpPoolSize-1) ? 0 : XHPCurrentAvailableID++\r\n\t\r\n\treturn XmlHttpPoolArr[pos];\r\n}\r\n\r\n\r\n\r\n\r\nvar selectrow=-1;\r\nvar totalrow=0;\r\nfunction startsearch(obj){\r\n\r\nif(totalrow>0 && (event.keyCode==37 ||event.keyCode==39) ) {stopsearch();return;}\r\nif(totalrow>0 && (event.keyCode==38 || event.keyCode==40))\r\n{\r\nfor(i=0;i<totalrow;i++)document.getElementById('qtr'+i).style.backgroundColor='';\r\nif(event.keyCode==38) {if(selectrow>0) selectrow--;if(selectrow==-1) selectrow=totalrow-1;\r\n\tdocument.getElementById('qtr'+selectrow).style.backgroundColor='#E0F4FF'; \r\n\tdocument.getElementById('k').value=document.getElementById('qtd'+selectrow).innerHTML;\r\n\t}\r\nif(event.keyCode==40) {if(selectrow<totalrow-1) selectrow++;\r\n\tdocument.getElementById('qtr'+selectrow).style.backgroundColor='#E0F4FF';\r\n\tdocument.getElementById('k').value=document.getElementById('qtd'+selectrow).innerHTML;\r\n\t}\r\nreturn;\r\n}\t\r\n\t\r\n\t\r\n\t\r\n\t\r\nvar k=obj.value;\r\nvar w=obj.style.width;\r\nif(w.indexOf(\"px\")>0) w=(w.substring(0,w.length-2))*1-1;\r\nif(k==\"\") {stopsearch();return;}\r\nvar u=\"/member/quicksearchjs.aspx?r=\"+Math.random()+\"&t=item&o=id&k=\"+k;\r\n\r\nvar xx = XmlHttpPool.pick();\t\r\nvar tx=\"\";\r\nxx.open(\"GET\", u, true); \r\nxx.send(null);\r\nxx.onreadystatechange = function(){if (xx.readyState == 4){\r\nif(xx.responseText==\"\") {stopsearch();return;}\r\nvar tt=xx.responseText.split('|');\r\n\r\ntotalrow=tt.length;\r\nvar html=\"<table width=\"+w+\" id=searchtb bgcolor=#FFFFFF style='border:solid 1px #aaaaaa;'>\";\r\nfor(i=0;i<tt.length;i++){html+=\"<tr id=\\\"qtr\"+i+\"\\\" onmouseover=\\\"this.style.backgroundColor='#E0F4FF';selectrow=\"+i+\";document.getElementById('\"+obj.id+\"').value='\"+tt[i]+\"'\\\" onmouseout=this.style.backgroundColor='' onclick=\\\"document.getElementById('k').value='\"+tt[i]+\"'\\\"><td id=\\\"qtd\"+i+\"\\\">\"+tt[i]+\"</td></tr>\";}\r\nhtml+=\"</table>\";\r\ndocument.getElementById('quicksearch').innerHTML=html;\r\ndocument.getElementById('quicksearch').style.display='';\r\ndocument.getElementById('quicksearch').style.top=gety(obj)+20;\r\ndocument.getElementById(\"quicksearch\").style.left=getx(obj);\r\n//document.getElementById('searchtb').width=obj.style.width;\r\n\r\n}}\r\n\r\n}\r\n\r\nfunction stopsearch(){\r\ntotalrow=0;\r\ndocument.getElementById('quicksearch').innerHTML='';\r\ndocument.getElementById('quicksearch').style.display='none';\r\nselectrow=-1;\r\n\t}","truncated":"false"}
{"page":"http://www.bcn.cl/","url":"http://www.bcn.cl/portal_javascripts/Plone%20Default/ploneScripts2282.js","body":"\n/* Merged Plone Javascript file\n * This file is dynamically assembled from separate parts.\n * Some of these parts have 3rd party licenses or copyright information attached\n * Such information is valid for that section,\n * not for the entire composite file\n * originating files are separated by ----- filename.js -----\n */\n\n/* ----- register_function.js ----- */\n// http://www.bcn.cl/portal_javascripts/register_function.js?original=1\nvar bugRiddenCrashPronePieceOfJunk=(navigator.userAgent.indexOf('MSIE 5')!=-1&&navigator.userAgent.indexOf('Mac')!=-1)\nvar W3CDOM=(!bugRiddenCrashPronePieceOfJunk&&typeof document.getElementsByTagName!='undefined'&&typeof document.createElement!='undefined');var registerEventListener=undefined;if(typeof addEvent!='undefined'){registerEventListener=function(elem,event,func){addEvent(elem,event,func);return true}} else if(window.addEventListener){registerEventListener=function(elem,event,func){elem.addEventListener(event,func,false);return true}} else if(window.attachEvent){registerEventListener=function(elem,event,func){var result=elem.attachEvent(\"on\"+event,func);return result}} else{registerEventListener=function(elem,event,func){return false}}\nvar unRegisterEventListener=undefined;if(typeof removeEvent!='undefined'){unRegisterEventListener=function(elem,event,func){removeEvent(element,event,func);return true}} else if(window.removeEventListener){unRegisterEventListener=function(elem,event,func){elem.removeEventListener(event,func,false);return true}} else if(window.detachEvent){unRegisterEventListener=function(elem,event,func){var result=elem.detachEvent(\"on\"+event,func);return result}} else{unRegisterEventListener=function(elem,event,func){return false}}\nvar registerPloneFunction=undefined;if(typeof addDOMLoadEvent!='undefined'){registerPloneFunction=function(func){registerEventListener(window,\"domload\",func)}} else{registerPloneFunction=function(func){registerEventListener(window,\"load\",func)}}\nfunction getContentArea(){if(W3CDOM){var node=document.getElementById('region-content');if(!node){node=document.getElementById('content')}\nreturn node}}\n\n\n/* ----- cssQuery.js ----- */\n// http://www.bcn.cl/portal_javascripts/cssQuery.js?original=1\nvar cssQuery=function(){var version=\"2.0.2\";var $COMMA=/\\s*,\\s*/;var cssQuery=function($selector,$$from){try{var $match=[];var $useCache=arguments.callee.caching&&!$$from;var $base=($$from)?($$from.constructor==Array)?$$from:[$$from]:[document];var $$selectors=parseSelector($selector).split($COMMA),i;for(i=0;i<$$selectors.length;i++){$selector=_toStream($$selectors[i]);if(isMSIE&&$selector.slice(0,3).join(\"\")==\" *#\"){$selector=$selector.slice(2);$$from=_msie_selectById([],$base,$selector[1])} else $$from=$base;var j=0,$token,$filter,$arguments,$cacheSelector=\"\";while(j<$selector.length){$token=$selector[j++];$filter=$selector[j++];$cacheSelector+=$token+$filter;$arguments=\"\";if($selector[j]==\"(\"){while($selector[j++]!=\")\"&&j<$selector.length){$arguments+=$selector[j]}\n$arguments=$arguments.slice(0,-1);$cacheSelector+=\"(\"+$arguments+\")\"}\n$$from=($useCache&&cache[$cacheSelector])?cache[$cacheSelector]:select($$from,$token,$filter,$arguments);if($useCache) cache[$cacheSelector]=$$from}\n$match=$match.concat($$from)}\ndelete cssQuery.error;return $match} catch($error){cssQuery.error=$error;return []}};cssQuery.toString=function(){return \"function cssQuery() {\\n [version \"+version+\"]\\n}\"};var cache={};cssQuery.caching=false;cssQuery.clearCache=function($selector){if($selector){$selector=_toStream($selector).join(\"\");delete cache[$selector]} else cache={}};var modules={};var loaded=false;cssQuery.addModule=function($name,$script){if(loaded) eval(\"$script=\"+String($script));modules[$name]=new $script()};cssQuery.valueOf=function($code){return $code?eval($code):this};var selectors={};var pseudoClasses={};var AttributeSelector={match:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};var attributeSelectors=[];selectors[\" \"]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=getElementsByTagName($from[i],$tagName,$namespace);for(j=0;($element=$subset[j]);j++){if(thisElement($element)&&compareNamespace($element,$namespace))\n$results.push($element)}}};selectors[\"#\"]=function($results,$from,$id){var $element,j;for(j=0;($element=$from[j]);j++) if($element.id==$id) $results.push($element)};selectors[\".\"]=function($results,$from,$className){$className=new RegExp(\"(^|\\\\s)\"+$className+\"(\\\\s|$)\");var $element,i;for(i=0;($element=$from[i]);i++)\nif($className.test($element.className)) $results.push($element)};selectors[\":\"]=function($results,$from,$pseudoClass,$arguments){var $test=pseudoClasses[$pseudoClass],$element,i;if($test) for(i=0;($element=$from[i]);i++)\nif($test($element,$arguments)) $results.push($element)};pseudoClasses[\"link\"]=function($element){var $document=getDocument($element);if($document.links) for(var i=0;i<$document.links.length;i++){if($document.links[i]==$element) return true}};pseudoClasses[\"visited\"]=function($element){};var thisElement=function($element){return($element&&$element.nodeType==1&&$element.tagName!=\"!\")?$element:null};var previousElementSibling=function($element){while($element&&($element=$element.previousSibling)&&!thisElement($element)) continue;return $element};var nextElementSibling=function($element){while($element&&($element=$element.nextSibling)&&!thisElement($element)) continue;return $element};var firstElementChild=function($element){return thisElement($element.firstChild)||nextElementSibling($element.firstChild)};var lastElementChild=function($element){return thisElement($element.lastChild)||previousElementSibling($element.lastChild)};var childElements=function($element){var $childElements=[];$element=firstElementChild($element);while($element){$childElements.push($element);$element=nextElementSibling($element)}\nreturn $childElements};var isMSIE=true;var isXML=function($element){var $document=getDocument($element);return(typeof $document.mimeType==\"unknown\")?/\\.xml$/i.test($document.URL):Boolean($document.mimeType==\"XML Document\")};var getDocument=function($element){return $element.ownerDocument||$element.document};var getElementsByTagName=function($element,$tagName){return($tagName==\"*\"&&$element.all)?$element.all:$element.getElementsByTagName($tagName)};var compareTagName=function($element,$tagName,$namespace){if($tagName==\"*\") return thisElement($element);if(!compareNamespace($element,$namespace)) return false;if(!isXML($element)) $tagName=$tagName.toUpperCase();return $element.tagName==$tagName};var compareNamespace=function($element,$namespace){return!$namespace||($namespace==\"*\")||($element.scopeName==$namespace)};var getTextContent=function($element){return $element.innerText};\nfunction _msie_selectById($results,$from,id){var $match,i,j;for(i=0;i<$from.length;i++){if($match=$from[i].all.item(id)){if($match.id==id) $results.push($match);else if($match.length!=null){for(j=0;j<$match.length;j++){if($match[j].id==id) $results.push($match[j])}}}}\nreturn $results};if(![].push) Array.prototype.push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i]}\nreturn this.length};var $NAMESPACE=/\\|/;\nfunction select($$from,$token,$filter,$arguments){if($NAMESPACE.test($filter)){$filter=$filter.split($NAMESPACE);$arguments=$filter[0];$filter=$filter[1]}\nvar $results=[];if(selectors[$token]){selectors[$token]($results,$$from,$filter,$arguments)}\nreturn $results};var $STANDARD_SELECT=/^[^\\s>+~]/;var $$STREAM=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;\nfunction _toStream($selector){if($STANDARD_SELECT.test($selector)) $selector=\" \"+$selector;return $selector.match($$STREAM)||[]};var $WHITESPACE=/\\s*([\\s>+~(),]|^|$)\\s*/g;var $IMPLIED_ALL=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;var parseSelector=function($selector){return $selector.replace($WHITESPACE,\"$1\").replace($IMPLIED_ALL,\"$1*$2\")};var Quote={toString: function(){return \"'\"},match:/^('[^']*')|(\"[^\"]*\")$/,test: function($string){return this.match.test($string)},add: function($string){return this.test($string)?$string:this+$string+this},remove: function($string){return this.test($string)?$string.slice(1,-1):$string}};var getText=function($text){return Quote.remove($text)};var $ESCAPE=/([\\/()[\\]?{}|*+-])/g;\nfunction regEscape($string){return $string.replace($ESCAPE,\"\\\\$1\")};cssQuery.addModule(\"css-standard\", function(){isMSIE=eval(\"false;/*@cc_on@if(@\\x5fwin32)isMSIE=true@end@*/\");if(!isMSIE){getElementsByTagName=function($element,$tagName,$namespace){return $namespace?$element.getElementsByTagNameNS(\"*\",$tagName):$element.getElementsByTagName($tagName)};compareNamespace=function($element,$namespace){return!$namespace||($namespace==\"*\")||($element.prefix==$namespace)};isXML=document.contentType? function($element){return/xml/i.test(getDocument($element).contentType)}: function($element){return getDocument($element).documentElement.tagName!=\"HTML\"};getTextContent=function($element){return $element.textContent||$element.innerText||_getTextContent($element)};\nfunction _getTextContent($element){var $textContent=\"\",$node,i;for(i=0;($node=$element.childNodes[i]);i++){switch($node.nodeType){case 11:case 1:$textContent+=_getTextContent($node);break;case 3:$textContent+=$node.nodeValue;break}}\nreturn $textContent}}});cssQuery.addModule(\"css-level2\", function(){selectors[\">\"]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=childElements($from[i]);for(j=0;($element=$subset[j]);j++)\nif(compareTagName($element,$tagName,$namespace))\n$results.push($element)}};selectors[\"+\"]=function($results,$from,$tagName,$namespace){for(var i=0;i<$from.length;i++){var $element=nextElementSibling($from[i]);if($element&&compareTagName($element,$tagName,$namespace))\n$results.push($element)}};selectors[\"@\"]=function($results,$from,$attributeSelectorID){var $test=attributeSelectors[$attributeSelectorID].test;var $element,i;for(i=0;($element=$from[i]);i++)\nif($test($element)) $results.push($element)};pseudoClasses[\"first-child\"]=function($element){return!previousElementSibling($element)};pseudoClasses[\"lang\"]=function($element,$code){$code=new RegExp(\"^\"+$code,\"i\");while($element&&!$element.getAttribute(\"lang\")) $element=$element.parentNode;return $element&&$code.test($element.getAttribute(\"lang\"))};AttributeSelector.NS_IE=/\\\\:/g;AttributeSelector.PREFIX=\"@\";AttributeSelector.tests={};AttributeSelector.replace=function($match,$attribute,$namespace,$compare,$value){var $key=this.PREFIX+$match;if(!attributeSelectors[$key]){$attribute=this.create($attribute,$compare||\"\",$value||\"\");attributeSelectors[$key]=$attribute;attributeSelectors.push($attribute)}\nreturn attributeSelectors[$key].id};AttributeSelector.parse=function($selector){$selector=$selector.replace(this.NS_IE,\"|\");var $match;while($match=$selector.match(this.match)){var $replace=this.replace($match[0],$match[1],$match[2],$match[3],$match[4]);$selector=$selector.replace(this.match,$replace)}\nreturn $selector};AttributeSelector.create=function($propertyName,$test,$value){var $attributeSelector={};$attributeSelector.id=this.PREFIX+attributeSelectors.length;$attributeSelector.name=$propertyName;$test=this.tests[$test];$test=$test?$test(this.getAttribute($propertyName),getText($value)):false;$attributeSelector.test=new Function(\"e\",\"return \"+$test);return $attributeSelector};AttributeSelector.getAttribute=function($name){switch($name.toLowerCase()){case \"id\":return \"e.id\";case \"class\":return \"e.className\";case \"for\":return \"e.htmlFor\";case \"href\":if(isMSIE){return \"String((e.outerHTML.match(/href=\\\\x22?([^\\\\s\\\\x22]*)\\\\x22?/)||[])[1]||'')\"}}\nreturn \"e.getAttribute('\" + $name.replace($NAMESPACE, \":\") + \"')\"};AttributeSelector.tests[\"\"]=function($attribute){return $attribute};AttributeSelector.tests[\"=\"]=function($attribute,$value){return $attribute+\"==\"+Quote.add($value)};AttributeSelector.tests[\"~=\"]=function($attribute,$value){return \"/(^| )\"+regEscape($value)+\"( |$)/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"|=\"]=function($attribute,$value){return \"/^\"+regEscape($value)+\"(-|$)/.test(\"+$attribute+\")\"};var _parseSelector=parseSelector;parseSelector=function($selector){return _parseSelector(AttributeSelector.parse($selector))}});cssQuery.addModule(\"css-level3\", function(){selectors[\"~\"]=function($results,$from,$tagName,$namespace){var $element,i;for(i=0;($element=$from[i]);i++){while($element=nextElementSibling($element)){if(compareTagName($element,$tagName,$namespace))\n$results.push($element)}}};pseudoClasses[\"contains\"]=function($element,$text){$text=new RegExp(regEscape(getText($text)));return $text.test(getTextContent($element))};pseudoClasses[\"root\"]=function($element){return $element==getDocument($element).documentElement};pseudoClasses[\"empty\"]=function($element){var $node,i;for(i=0;($node=$element.childNodes[i]);i++){if(thisElement($node)||$node.nodeType==3) return false}\nreturn true};pseudoClasses[\"last-child\"]=function($element){return!nextElementSibling($element)};pseudoClasses[\"only-child\"]=function($element){$element=$element.parentNode;return firstElementChild($element)==lastElementChild($element)};pseudoClasses[\"not\"]=function($element,$selector){var $negated=cssQuery($selector,getDocument($element));for(var i=0;i<$negated.length;i++){if($negated[i]==$element) return false}\nreturn true};pseudoClasses[\"nth-child\"]=function($element,$arguments){return nthChild($element,$arguments,previousElementSibling)};pseudoClasses[\"nth-last-child\"]=function($element,$arguments){return nthChild($element,$arguments,nextElementSibling)};pseudoClasses[\"target\"]=function($element){return $element.id==location.hash.slice(1)};pseudoClasses[\"checked\"]=function($element){return $element.checked};pseudoClasses[\"enabled\"]=function($element){return $element.disabled===false};pseudoClasses[\"disabled\"]=function($element){return $element.disabled};pseudoClasses[\"indeterminate\"]=function($element){return $element.indeterminate};AttributeSelector.tests[\"^=\"]=function($attribute,$value){return \"/^\"+regEscape($value)+\"/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"$=\"]=function($attribute,$value){return \"/\"+regEscape($value)+\"$/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"*=\"]=function($attribute,$value){return \"/\"+regEscape($value)+\"/.test(\"+$attribute+\")\"};\nfunction nthChild($element,$arguments,$traverse){switch($arguments){case \"n\":return true;case \"even\":$arguments=\"2n\";break;case \"odd\":$arguments=\"2n+1\"}\nvar $$children=childElements($element.parentNode);\nfunction _checkIndex($index){var $index=($traverse==nextElementSibling)?$$children.length-$index:$index-1;return $$children[$index]==$element};if(!isNaN($arguments)) return _checkIndex($arguments);$arguments=$arguments.split(\"n\");var $multiplier=parseInt($arguments[0]);var $step=parseInt($arguments[1]);if((isNaN($multiplier)||$multiplier==1)&&$step==0) return true;if($multiplier==0&&!isNaN($step)) return _checkIndex($step);if(isNaN($step)) $step=0;var $count=1;while($element=$traverse($element)) $count++;if(isNaN($multiplier)||$multiplier==1)\nreturn($traverse==nextElementSibling)?($count<=$step):($step>=$count);return($count%$multiplier)==$step}});loaded=true;return cssQuery}();\n\n/* ----- plone_javascript_variables.js ----- */\n// http://www.bcn.cl/portal_javascripts/plone_javascript_variables.js?original=1\nvar portal_url='http://www.bcn.cl';var form_modified_message='Su formulario no ha sido guardado. Todos los cambios se perder\u00c3\u00a1n';var form_resubmit_message='Ya ha hecho clic en el bot\u00c3\u00b3n de enviar. \u00c2\u00bfRealmente desea enviar de nuevo este formulario?';\n\n/* ----- nodeutilities.js ----- */\n// http://www.bcn.cl/portal_javascripts/nodeutilities.js?original=1\nfunction wrapNode(node,wrappertype,wrapperclass){var wrapper=document.createElement(wrappertype)\nwrapper.className=wrapperclass;var innerNode=node.parentNode.replaceChild(wrapper,node);wrapper.appendChild(innerNode)};\nfunction nodeContained(innernode,outernode){var node=innernode.parentNode;while(node!=document){if(node==outernode){return true}\nnode=node.parentNode}\nreturn false};\nfunction findContainer(node,func){while(node!=null){if(func(node)){return node}\nnode=node.parentNode}\nreturn false};\nfunction hasClassName(node,class_name){return new RegExp('\\\\b'+class_name+'\\\\b').test(node.className)};\nfunction addClassName(node,class_name){if(!node.className){node.className=class_name} else if(!hasClassName(node,class_name)){var className=node.className+\" \"+class_name;node.className=className.split(/\\s+/).join(' ')}};\nfunction removeClassName(node,class_name){var className=node.className;if(className){className=className.replace(new RegExp('\\\\b'+class_name+'\\\\b'),'');className=className.replace(/\\s+/g,' ');node.className=className.replace(/\\s+$/g,'')}};\nfunction replaceClassName(node,old_class,new_class,ignore_missing){if(ignore_missing&&!hasClassName(node,old_class)){addClassName(node,new_class)} else{var className=node.className;if(className){className=className.replace(new RegExp('\\\\b'+old_class+'\\\\b'),new_class);className=className.replace(/\\s+/g,' ');node.className=className.replace(/\\s+$/g,'')}}};\nfunction walkTextNodes(node,func,data){if(!node){return false}\nif(node.hasChildNodes){for(var i=0;i<node.childNodes.length;i++){walkTextNodes(node.childNodes[i],func,data)}\nif(node.nodeType==3){func(node,data)}}};\nfunction getInnerTextCompatible(node){var result=new Array();walkTextNodes(node,\nfunction(n,d){d.push(n.nodeValue)},result);return result.join(\"\")};\nfunction getInnerTextFast(node){if(node.innerText){return node.innerText} else{return getInnerTextCompatible(node)}};\nfunction sortNodes(nodes,fetch_func,cmp_func){if(!W3CDOM){return false};var SortNodeWrapper=function(node){this.value=fetch_func(node);this.cloned_node=node.cloneNode(true);this.toString=function(){if(this.value.toString){return this.value.toString()} else{return this.value}}}\nvar items=new Array();for(var i=0;i<nodes.length;i++){items.push(new SortNodeWrapper(nodes[i]))}\nif(cmp_func){items.sort(cmp_func)} else{items.sort()}\nfor(var i=0;i<items.length;i++){var dest=nodes[i];dest.parentNode.replaceChild(items[i].cloned_node,dest)}};\n\n/* ----- cookie_functions.js ----- */\n// http://www.bcn.cl/portal_javascripts/cookie_functions.js?original=1\nfunction createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires=\"; expires=\"+date.toGMTString()} else{expires=\"\"}\ndocument.cookie=name+\"=\"+escape(value)+expires+\"; path=/;\"};\nfunction readCookie(name){var nameEQ=name+\"=\";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length)}\nif(c.indexOf(nameEQ)==0){return unescape(c.substring(nameEQ.length,c.length))}}\nreturn null};\n\n/* ----- livesearch.js ----- */\n// http://www.bcn.cl/portal_javascripts/livesearch.js?original=1\nvar liveSearchReq=false;var t=null;var liveSearchLast=\"\";var queryTarget=\"livesearch_reply?q=\";var searchForm=null;var searchInput=null;var isIE=false;var _cache=new Object();var widthOffset=1;\nfunction calculateWidth(){}\nfunction getElementDimensions(elemID){var base=document.getElementById(elemID);var offsetTrail=base;var offsetLeft=0;var offsetTop=0;var width=0;while(offsetTrail){offsetLeft+=offsetTrail.offsetLeft;offsetTop+=offsetTrail.offsetTop;offsetTrail=offsetTrail.offsetParent}\nif(navigator.userAgent.indexOf(\"Mac\")!=-1&&typeof document.body.leftMargin!=\"undefined\"){offsetLeft+=document.body.leftMargin;offsetTop+=document.body.topMargin}\nif(!isIE){width=searchInput.offsetWidth-widthOffset*2}\nelse{width=searchInput.offsetWidth}\nreturn{left:offsetLeft,top:offsetTop,width:width,height:base.offsetHeight,bottom:offsetTop+base.offsetHeight,right:offsetLeft+width}}\nfunction liveSearchInit(){searchInput=document.getElementById('searchGadget');if(searchInput==null||searchInput==undefined) return\nif(navigator.userAgent.indexOf(\"KHTML\")>0){searchInput.addEventListener(\"keydown\",liveSearchKeyPress,false);searchInput.addEventListener(\"focus\",liveSearchDoSearch,false);searchInput.addEventListener(\"keydown\",liveSearchStart,false);searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false)} else if(searchInput.addEventListener){searchInput.addEventListener(\"keypress\",liveSearchKeyPress,false);searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false);searchInput.addEventListener(\"keypress\",liveSearchStart,false)} else{searchInput.attachEvent(\"onkeydown\",liveSearchKeyPress);searchInput.attachEvent(\"onkeydown\",liveSearchStart);searchInput.attachEvent(\"onblur\",liveSearchHide);isIE=true}\nsearchInput.setAttribute(\"autocomplete\",\"off\");var pos=getElementDimensions('searchGadget');result=document.getElementById('LSResult');pos.left=pos.left-result.offsetParent.offsetLeft+pos.width;result.style.display='none'}\nfunction liveSearchHideDelayed(){window.setTimeout(\"liveSearchHide()\",400)}\nfunction liveSearchHide(){document.getElementById(\"LSResult\").style.display=\"none\";var highlight=document.getElementById(\"LSHighlight\");if(highlight){highlight.removeAttribute(\"id\")}}\nfunction getFirstHighlight(){var set=getHits();return set[0]}\nfunction getLastHighlight(){var set=getHits();return set[set.length-1]}\nfunction getHits(){var res=document.getElementById(\"LSShadow\");var set=res.getElementsByTagName('li');return set}\nfunction findChild(object,specifier){var cur=object.firstChild;try{while(cur!=undefined){cur=cur.nextSibling;if(specifier(cur)==true) return cur}} catch(e){};return null}\nfunction findNext(object,specifier){var cur=object;try{while(cur!=undefined){cur=cur.nextSibling;if(cur.nodeType==3) cur=cur.nextSibling;if(cur!=undefined){if(specifier(cur)==true) return cur} else{break}}} catch(e){};return null}\nfunction findPrev(object,specifier){var cur=object;try{cur=cur.previousSibling;if(cur.nodeType==3) cur=cur.previousSibling;if(cur!=undefined){if(specifier(cur)==true)\nreturn cur}} catch(e){};return null}\nfunction liveSearchKeyPress(event){if(event.keyCode==40){highlight=document.getElementById(\"LSHighlight\");if(!highlight){highlight=getFirstHighlight()} else{highlight.removeAttribute(\"id\");highlight=findNext(highlight, function(o){return o.className==\"LSRow\"})}\nif(highlight){highlight.setAttribute(\"id\",\"LSHighlight\")}\nif(!isIE){event.preventDefault()}}\nelse if(event.keyCode==38){highlight=document.getElementById(\"LSHighlight\");if(!highlight){highlight=getLastHighlight()}\nelse{highlight.removeAttribute(\"id\");highlight=findPrev(highlight, function(o){return o.className=='LSRow'})}\nif(highlight){highlight.setAttribute(\"id\",\"LSHighlight\")}\nif(!isIE){event.preventDefault()}}\nelse if(event.keyCode==27){highlight=document.getElementById(\"LSHighlight\");if(highlight){highlight.removeAttribute(\"id\")}\ndocument.getElementById(\"LSResult\").style.display=\"none\"}}\nfunction liveSearchStart(event){if(t){window.clearTimeout(t)}\ncode=event.keyCode;if(code!=40&&code!=38&&code!=27&&code!=37&&code!=39){t=window.setTimeout(\"liveSearchDoSearch()\",200)}}\nfunction liveSearchDoSearch(){if(typeof liveSearchRoot==\"undefined\"){liveSearchRoot=\"\"}\nif(typeof liveSearchRootSubDir==\"undefined\"){liveSearchRootSubDir=\"\"}\nif(liveSearchLast!=searchInput.value){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort()}\nif(searchInput.value==\"\"){liveSearchHide();return false}\nif(searchInput.value.length<2){liveSearchHide();return false}\nvar result=_cache[searchInput.value];if(result){showResult(result);return}\nliveSearchReq=new XMLHttpRequest();liveSearchReq.onreadystatechange=liveSearchProcessReqChange;liveSearchReq.open(\"GET\",liveSearchRoot+queryTarget+encodeURIComponent(searchInput.value));liveSearchLast=searchInput.value;liveSearchReq.send(null)}}\nfunction showResult(result){var res=document.getElementById(\"LSResult\");res.style.display=\"block\";var sh=document.getElementById(\"LSShadow\");sh.innerHTML=result}\nfunction liveSearchProcessReqChange(){if(liveSearchReq.readyState==4){if(liveSearchReq.status>299||liveSearchReq.status<200||liveSearchReq.responseText.length<10) return;showResult(liveSearchReq.responseText);_cache[liveSearchLast]=liveSearchReq.responseText}}\nfunction liveSearchSubmit(){var highlight=document.getElementById(\"LSHighlight\");if(highlight){target=highlight.getElementsByTagName('a')[0];window.location=liveSearchRoot+liveSearchRootSubDir+target;return false}\nelse{return true}}\nif(window.addEventListener) window.addEventListener(\"load\",liveSearchInit,false);else if(window.attachEvent) window.attachEvent(\"onload\",liveSearchInit);\n\n/* ----- fullscreenmode.js ----- */\n// http://www.bcn.cl/portal_javascripts/fullscreenmode.js?original=1\nfunction toggleFullScreenMode(){var body=cssQuery('body')[0];if(document.getElementById('icon-full_screen')){var fsicon=document.getElementById('icon-full_screen')}\nif(hasClassName(body,'fullscreen')){removeClassName(body,'fullscreen');createCookie('fullscreenMode','');if(fsicon){fsicon.src='fullscreenexpand_icon.gif'}} else{addClassName(body,'fullscreen');createCookie('fullscreenMode','1');if(fsicon){fsicon.src='fullscreencollapse_icon.gif'}}};\nfunction fullscreenModeLoad(){if(document.getElementById('icon-full_screen')){var fsicon=document.getElementById('icon-full_screen')}\nif(readCookie('fullscreenMode')=='1'){var body=cssQuery('body')[0];addClassName(body,'fullscreen');if(fsicon){fsicon.src='fullscreencollapse_icon.gif'}}};registerPloneFunction(fullscreenModeLoad)\n\n\n/* ----- select_all.js ----- */\n// http://www.bcn.cl/portal_javascripts/select_all.js?original=1\nfunction selectAll(id,formName){if(formName==null){checkboxes=document.getElementsByName(id)\nfor(i=0;i<checkboxes.length;i++){checkboxes[i].checked=true }} else{for(i=0;i<document.forms[formName].elements.length;i++){if(document.forms[formName].elements[i].name==id){document.forms[formName].elements[i].checked=true}}}}\nfunction deselectAll(id,formName){if(formName==null){checkboxes=document.getElementsByName(id)\nfor(i=0;i<checkboxes.length;i++){checkboxes[i].checked=false }} else{for(i=0;i<document.forms[formName].elements.length;i++){if(document.forms[formName].elements[i].name==id){document.forms[formName].elements[i].checked=false}}}}\nfunction toggleSelect(selectbutton,id,initialState,formName){id=id||'ids:list'\nif(selectbutton.isSelected==null){initialState=initialState||false;selectbutton.isSelected=initialState}\nif(selectbutton.isSelected==false){selectbutton.setAttribute('src',portal_url+'/select_none_icon.gif');selectbutton.isSelected=true;return selectAll(id,formName)} else{selectbutton.setAttribute('src',portal_url+'/select_all_icon.gif');selectbutton.isSelected=false;return deselectAll(id,formName)}}\n\n\n/* ----- dropdown.js ----- */\n// http://www.bcn.cl/portal_javascripts/dropdown.js?original=1\nfunction isActionMenu(node){if(hasClassName(node,'actionMenu')){return true}\nreturn false};\nfunction hideAllMenus(){var menus=cssQuery('dl.actionMenu');for(var i=0;i<menus.length;i++){replaceClassName(menus[i],'activated','deactivated',true)}};\nfunction toggleMenuHandler(event){if(!event) var event=window.event;if(!W3CDOM){return true}\nvar container=findContainer(this,isActionMenu);if(!container){return true}\nif(hasClassName(container,'activated')){replaceClassName(container,'activated','deactivated',true)} else{replaceClassName(container,'deactivated','activated',true)}\nreturn false};\nfunction hideMenusHandler(event){if(!event) var event=window.event;hideAllMenus();return true};\nfunction actionMenuDocumentMouseDown(event){if(!event) var event=window.event;if(event.target)\ntarg=event.target;else if(event.srcElement)\ntarg=event.srcElement;var container=findContainer(targ,isActionMenu);if(container){return true}\nhideAllMenus();return true};\nfunction actionMenuMouseOver(event){if(!event) var event=window.event;if(!this.tagName&&(this.tagName=='A'||this.tagName=='a')){return true}\nvar container=findContainer(this,isActionMenu);if(!container){return true}\nvar menu_id=container.id;var switch_menu=false;var menus=cssQuery('dl.actionMenu');for(var i=0;i<menus.length;i++){var menu=menus[i]\nif(hasClassName(menu,'activated')){switch_menu=true}\nif(menu.id!=menu_id){replaceClassName(menu,'activated','deactivated',true)}}\nif(switch_menu){var menu=cssQuery('#'+menu_id)[0];if(menu){replaceClassName(menu,'deactivated','activated',true)}}\nreturn true};\nfunction initializeMenus(){if(!W3CDOM){return false}\ndocument.onmousedown=actionMenuDocumentMouseDown;hideAllMenus();var menu_headers=cssQuery('dl.actionMenu > dt.actionMenuHeader > a');for(var i=0;i<menu_headers.length;i++){var menu_header=menu_headers[i];menu_header.onclick=toggleMenuHandler;menu_header.onmouseover=actionMenuMouseOver}\nvar menu_contents=cssQuery('dl.actionMenu > dd.actionMenuContent');for(var i=0;i<menu_contents.length;i++){menu_contents[i].onclick=hideMenusHandler}};registerPloneFunction(initializeMenus);\n\n/* ----- dragdropreorder.js ----- */\n// http://www.bcn.cl/portal_javascripts/dragdropreorder.js?original=1\nvar ploneDnDReorder={}\nploneDnDReorder.dragging=null;ploneDnDReorder.table=null;ploneDnDReorder.rows=null;ploneDnDReorder.isDraggable=function(node){return hasClassName(node,'draggable')};ploneDnDReorder.doDown=function(e){if(!e) var e=window.event;var target=findContainer(this,ploneDnDReorder.isDraggable);if(target==null)\nreturn;for(var i=0;i<ploneDnDReorder.rows.length;i++)\nploneDnDReorder.rows[i].onmousemove=ploneDnDReorder.doDrag;ploneDnDReorder.dragging=target;ploneDnDReorder.dragging._position=ploneDnDReorder.getPos(ploneDnDReorder.dragging);addClassName(ploneDnDReorder.dragging,\"dragging\");return false}\nploneDnDReorder.getPos=function(node){var children=node.parentNode.childNodes;var pos=0;for(var i=0;i<children.length;i++){if(node==children[i])\nreturn pos;if(hasClassName(children[i],\"draggable\"))\npos++}\nreturn null}\nploneDnDReorder.doDrag=function(e){if(!e) var e=window.event;if(!ploneDnDReorder.dragging)\nreturn;var target=this;if(!target)\nreturn;if(target.id!=ploneDnDReorder.dragging.id){ploneDnDReorder.swapElements(target,ploneDnDReorder.dragging)}\nreturn false}\nploneDnDReorder.swapElements=function(child1,child2){var parent=child1.parentNode;var children=parent.childNodes;var items=new Array();for(var i=0;i<children.length;i++){var node=children[i];items[i]=node;if(node.id){removeClassName(node,\"even\");removeClassName(node,\"odd\");if(node.id==child1.id)\nitems[i]=child2;if(node.id==child2.id)\nitems[i]=child1}}\nSarissa.clearChildNodes(parent);var pos=0;for(var i=0;i<items.length;i++){var node=parent.appendChild(items[i]);if(node.id){if(pos%2)\naddClassName(node,\"even\");else\naddClassName(node,\"odd\");pos++}}}\nploneDnDReorder.doUp=function(e){if(!e) var e=window.event;if(!ploneDnDReorder.dragging)\nreturn;removeClassName(ploneDnDReorder.dragging,\"dragging\");ploneDnDReorder.updatePositionOnServer();ploneDnDReorder.dragging._position=null;try{delete ploneDnDReorder.dragging._position} catch(e){}\nploneDnDReorder.dragging=null;for(var i=0;i<ploneDnDReorder.rows.length;i++)\nploneDnDReorder.rows[i].onmousemove=null;return false}\nploneDnDReorder.updatePositionOnServer=function(){var delta=ploneDnDReorder.getPos(ploneDnDReorder.dragging)-ploneDnDReorder.dragging._position;if(delta==0)\nreturn;var req=new XMLHttpRequest();req.open(\"POST\",\"folder_moveitem\",true);req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");req.send(\"item_id=\"+ploneDnDReorder.dragging.id+\"&delta:int=\"+delta)}\nploneDnDReorder.initializeDragDrop=function(){ploneDnDReorder.table=cssQuery(\"table#sortable\")[0];if(!ploneDnDReorder.table)\nreturn;ploneDnDReorder.rows=cssQuery(\"table#sortable > tr,\"+\"table#sortable > tbody > tr\");var targets=cssQuery(\"table#sortable > tr > td,\"+\"table#sortable > tbody > tr > td\");for(var i=0;i<targets.length;i++){if(hasClassName(targets[i],'notDraggable'))\ncontinue;targets[i].onmousedown=ploneDnDReorder.doDown;targets[i].onmouseup=ploneDnDReorder.doUp;addClassName(targets[i],\"draggingHook\")}}\nregisterPloneFunction(ploneDnDReorder.initializeDragDrop);\n\n/* ----- mark_special_links.js ----- */\n// http://www.bcn.cl/portal_javascripts/mark_special_links.js?original=1\nfunction scanforlinks(){if(!W3CDOM){return false}\ncontentarea=getContentArea();if(!contentarea){return false}\nlinks=contentarea.getElementsByTagName('a');for(i=0;i<links.length;i++){if((links[i].getAttribute('href'))&&(links[i].className.indexOf('link-plain')==-1)){var linkval=links[i].getAttribute('href');if(linkval.toLowerCase().indexOf(window.location.protocol+'//'+window.location.host)==0){} else if(linkval.indexOf('http:')!=0){protocols=['mailto','ftp','news','irc','h323','sip','callto','https','feed','webcal'];for(p=0;p<protocols.length;p++){if(linkval.indexOf(protocols[p]+':')==0){wrapNode(links[i],'span','link-'+protocols[p]);break}}} else{if(links[i].getElementsByTagName('img').length==0){wrapNode(links[i],'span','link-external')}}}}};registerPloneFunction(scanforlinks);\n\n/* ----- collapsiblesections.js ----- */\n// http://www.bcn.cl/portal_javascripts/collapsiblesections.js?original=1\nfunction isCollapsible(node){if(hasClassName(node,'collapsible')){return true}\nreturn false};\nfunction toggleCollapsible(event){if(!event) var event=window.event;if(!this.tagName&&(this.tagName=='DT'||this.tagName=='dt')){return true}\nvar container=findContainer(this,isCollapsible);if(!container){return true}\nif(hasClassName(container,'collapsedBlockCollapsible')){replaceClassName(container,'collapsedBlockCollapsible','expandedBlockCollapsible')} else if(hasClassName(container,'expandedBlockCollapsible')){replaceClassName(container,'expandedBlockCollapsible','collapsedBlockCollapsible')} else if(hasClassName(container,'collapsedInlineCollapsible')){replaceClassName(container,'collapsedInlineCollapsible','expandedInlineCollapsible')} else if(hasClassName(container,'expandedInlineCollapsible')){replaceClassName(container,'expandedInlineCollapsible','collapsedInlineCollapsible')}};\nfunction activateCollapsibles(){if(!W3CDOM){return false}\nvar collapsibles=cssQuery('dl.collapsible');for(var i=0;i<collapsibles.length;i++){var collapsible=collapsibles[i];var collapsible_header=cssQuery('dt.collapsibleHeader',collapsible)[0];collapsible_header.onclick=toggleCollapsible;if(hasClassName(collapsible,'inline')){if(hasClassName(collapsible,'collapsedOnLoad')){replaceClassName(collapsible,'collapsedOnLoad','collapsedInlineCollapsible')} else{addClassName(collapsible,'expandedInlineCollapsible')}} else{if(hasClassName(collapsible,'collapsedOnLoad')){replaceClassName(collapsible,'collapsedOnLoad','collapsedBlockCollapsible')} else{addClassName(collapsible,'expandedBlockCollapsible')}}}};registerPloneFunction(activateCollapsibles);\n\n/* ----- highlightsearchterms.js ----- */\n// http://www.bcn.cl/portal_javascripts/highlightsearchterms.js?original=1\nfunction highlightTermInNode(node,word){var contents=node.nodeValue;var index=contents.toLowerCase().indexOf(word.toLowerCase());if(index<0){return false};var parent=node.parentNode;if(parent.className!=\"highlightedSearchTerm\"){var hiword=document.createElement(\"span\");hiword.className=\"highlightedSearchTerm\";hiword.appendChild(document.createTextNode(contents.substr(index,word.length)));parent.insertBefore(document.createTextNode(contents.substr(0,index)),node);parent.insertBefore(hiword,node);parent.insertBefore(document.createTextNode(contents.substr(index+word.length)),node);parent.removeChild(node)}}\nfunction highlightSearchTerms(terms,startnode){if(!W3CDOM){return false};if(!terms){return false};if(!startnode){return false};for(var term_index=0;term_index<terms.length;term_index++){var term=terms[term_index];var term_lower=term.toLowerCase();if(term_lower!='not'&&term_lower!='and'&&term_lower!='or'){walkTextNodes(startnode,highlightTermInNode,term)}}}\nfunction getSearchTermsFromURI(uri){var query;if(typeof decodeURI!='undefined'){query=decodeURI(uri)} else if(typeof unescape!='undefined'){query=unescape(uri)} else{}\nvar result=new Array();if(window.decodeReferrer){var referrerSearch=decodeReferrer();if(null!=referrerSearch&&referrerSearch.length>0){result=referrerSearch}}\nvar qfinder=new RegExp(\"searchterm=([^&]*)\",\"gi\");var qq=qfinder.exec(query);if(qq&&qq[1]){var terms=qq[1].replace(/\\+/g,' ').split(/\\s+/);for(var i=0;i<terms.length;i++){if(terms[i]!=''){result.push(terms[i])}}\nreturn result}\nreturn result.length==0?false:result}\nfunction highlightSearchTermsFromURI(){if(!W3CDOM){return false};var terms=getSearchTermsFromURI(window.location.search);var contentarea=getContentArea();highlightSearchTerms(terms,contentarea)}\nregisterPloneFunction(highlightSearchTermsFromURI);\n\n/* ----- se-highlight.js ----- */\n// http://www.bcn.cl/portal_javascripts/se-highlight.js?original=1\nvar searchEngines=[['^http://(www)?\\\\.?google.*','q='],['^http://search\\\\.yahoo.*','p='],['^http://search\\\\.msn.*','q='],['^http://search\\\\.aol.*','userQuery='],['^http://(www\\\\.)?altavista.*','q='],['^http://(www\\\\.)?feedster.*','q='],['^http://search\\\\.lycos.*','query='],['^http://(www\\\\.)?alltheweb.*','q=']]\nfunction decodeReferrer(ref){if(null==ref&&document.referrer){ref=document.referrer}\nif(!ref) return null;var match=new RegExp('');var seQuery='';for(var i=0;i<searchEngines.length;i++){match.compile(searchEngines[i][0],'i');if(ref.match(match)){match.compile('^.*'+searchEngines[i][1]+'([^&]+)&?.*$');seQuery=ref.replace(match,'$1');if(seQuery){seQuery=decodeURIComponent(seQuery);seQuery=seQuery.replace(/\\'|\"/, '');return seQuery.split(/[\\s,\\+\\.]+/)}}}\nreturn null}\n\n\n/* ----- first_input_focus.js ----- */\n// http://www.bcn.cl/portal_javascripts/first_input_focus.js?original=1\nfunction setFocus(){if(!W3CDOM){return false};var xre=new RegExp(/\\berror\\b/);for(var f=0;(formnode=document.getElementsByTagName('form').item(f));f++){for(var i=0;(node=formnode.getElementsByTagName('div').item(i));i++){if(xre.exec(node.className)){for(var j=0;(inputnode=node.getElementsByTagName('input').item(j));j++){try{if(inputnode.focus){inputnode.focus();return}} catch(e){}}}}}}\nregisterPloneFunction(setFocus)\n\n\n/* ----- folder_contents_filter.js ----- */\n// http://www.bcn.cl/portal_javascripts/folder_contents_filter.js?original=1\nfunction submitFolderAction(folderAction){document.folderContentsForm.action=document.folderContentsForm.action+'/'+folderAction;document.folderContentsForm.submit()}\nfunction submitFilterAction(){document.folderContentsForm.action=document.folderContentsForm.action+'/folder_contents';filter_selection=document.getElementById('filter_selection');for(var i=0;i<filter_selection.length;i++){if(filter_selection.options[i].selected){if(filter_selection.options[i].value=='#'){document.folderContentsForm.filter_state.value='clear_view_filter'}\nelse{document.folderContentsForm.filter_state.value='set_view_filter'}}}\ndocument.folderContentsForm.submit()}\n\n\n/* ----- folder_contents_hideAddItems.js ----- */\n// http://www.bcn.cl/portal_javascripts/folder_contents_hideAddItems.js?original=1\nfunction hideTraditionalAddItemPullDown(){pullDown=document.getElementById('traditional-add-item-pulldown');if(pullDown){pullDown.style.display='none'}}\nregisterPloneFunction(hideTraditionalAddItemPullDown)\n\n\n/* ----- styleswitcher.js ----- */\n// http://www.bcn.cl/portal_javascripts/styleswitcher.js?original=1\nfunction setActiveStyleSheet(title,reset){if(!W3CDOM){return false};var i,a,main;for(i=0;(a=document.getElementsByTagName(\"link\")[i]);i++){if(a.getAttribute(\"rel\").indexOf(\"style\")!=-1&&a.getAttribute(\"title\")){a.disabled=true;if(a.getAttribute(\"title\")==title){a.disabled=false}}}\nif(reset==1){createCookie(\"wstyle\",title,365)}};\nfunction setStyle(){var style=readCookie(\"wstyle\");if(style!=null){setActiveStyleSheet(style,0)}};registerPloneFunction(setStyle);\n\n/* ----- table_sorter.js ----- */\n// http://www.bcn.cl/portal_javascripts/table_sorter.js?original=1\nfunction compare(a,b){au=new String(a);bu=new String(b);if(au.charAt(4)!='-'&&au.charAt(7)!='-'){var an=parseFloat(au)\nvar bn=parseFloat(bu)}\nif(isNaN(an)||isNaN(bn)){as=au.toLowerCase()\nbs=bu.toLowerCase()\nif(as>bs){return 1}\nelse{return-1}}\nelse{return an-bn}}\nfunction getConcatenedTextContent(node){var _result=\"\";if(node==null){return _result}\nvar childrens=node.childNodes;var i=0;while(i<childrens.length){var child=childrens.item(i);switch(child.nodeType){case 1:case 5:_result+=getConcatenedTextContent(child);break;case 3:case 2:case 4:_result+=child.nodeValue;break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:break}\ni++}\nreturn _result}\nfunction sort(e){var el=window.event?window.event.srcElement:e.currentTarget;var a=new Array();if(el.nodeName=='IMG') el=el.parentNode;var name=el.childNodes.item(1).nodeValue;var dad=el.parentNode;var node;for(var im=0;(node=dad.getElementsByTagName(\"th\").item(im));im++){if(node.lastChild.nodeName=='IMG'){lastindex=node.getElementsByTagName('img').length-1;node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowBlank.gif')}}\nfor(var i=0;(node=dad.getElementsByTagName(\"th\").item(i));i++){var xre=new RegExp(/\\bnosort\\b/);if(!xre.exec(node.className)&&node.childNodes.item(1).nodeValue==name){lastindex=node.getElementsByTagName('img').length-1;node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowUp.gif');break}}\nvar tbody=dad.parentNode.parentNode.getElementsByTagName(\"tbody\").item(0);for(var j=0;(node=tbody.getElementsByTagName(\"tr\").item(j));j++){a[j]=new Array();a[j][0]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(i));a[j][1]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(1));a[j][2]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(0));a[j][3]=node}\nif(a.length>1){a.sort(compare);if(a[0][0]==getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(0).getElementsByTagName(\"td\").item(i))&&a[1][0]==getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(1).getElementsByTagName(\"td\").item(i))){a.reverse();lastindex=el.getElementsByTagName('img').length-1;el.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowDown.gif')}}\nfor(var j=0;j<a.length;j++){a[j][3].className=((j%2)==0)?'odd':'even';tbody.appendChild(a[j][3])}}\nfunction initalizeTableSort(e){if(!W3CDOM){return false};var tbls=document.getElementsByTagName('table');for(var t=0;t<tbls.length;t++){var re=new RegExp(/\\blisting\\b/)\nvar xre=new RegExp(/\\bnosort\\b/)\nif(re.exec(tbls[t].className)&&!xre.exec(tbls[t].className)){try{var thead=tbls[t].getElementsByTagName(\"thead\").item(0);var node;blankarrow=document.createElement('img');blankarrow.setAttribute('src',portal_url+'/arrowBlank.gif');blankarrow.setAttribute('height',6);blankarrow.setAttribute('width',9);initialsort=false;for(var i=0;(node=thead.getElementsByTagName(\"th\").item(i));i++){if(!xre.exec(node.className)){node.insertBefore(blankarrow.cloneNode(1),node.firstChild);node.style.cursor='pointer';if(!initialsort){initialsort=true;uparrow=document.createElement('img');uparrow.setAttribute('src',portal_url+'/arrowUp.gif');uparrow.setAttribute('height',6);uparrow.setAttribute('width',9);node.appendChild(uparrow)} else{node.appendChild(blankarrow.cloneNode(1))}\nif(node.addEventListener) node.addEventListener(\"click\",sort,false);else if(node.attachEvent) node.attachEvent(\"onclick\",sort)}}} catch(er){}}}}\nregisterPloneFunction(initalizeTableSort)\n\n\n/* ----- calendar_formfield.js ----- */\n// http://www.bcn.cl/portal_javascripts/calendar_formfield.js?original=1\nfunction onJsCalendarDateUpdate(cal){var year=cal.params.input_id_year;var month=cal.params.input_id_month;var day=cal.params.input_id_day;var daystr=''+cal.date.getDate();if(daystr.length==1)\ndaystr='0'+daystr;var monthstr=''+(cal.date.getMonth()+1);if(monthstr.length==1)\nmonthstr='0'+monthstr;cal.params.inputField.value=''+cal.date.getFullYear()+'/'+monthstr+'/'+daystr\nyear.value=cal.params.inputField.value.substring(0,4);month.value=cal.params.inputField.value.substring(5,7);day.value=cal.params.inputField.value.substring(8,10)}\nfunction showJsCalendar(input_id_anchor,input_id,input_id_year,input_id_month,input_id_day,input_id_hour,input_id_minute,yearStart,yearEnd){var input_id_anchor=document.getElementById(input_id_anchor);var input_id=document.getElementById(input_id);var input_id_year=document.getElementById(input_id_year);var input_id_month=document.getElementById(input_id_month);var input_id_day=document.getElementById(input_id_day);var format='y/mm/dd';var dateEl=input_id;var mustCreate=false;var cal=window.calendar;var params={'range':[yearStart,yearEnd],inputField:input_id,input_id_year:input_id_year,input_id_month:input_id_month,input_id_day:input_id_day};\nfunction param_default(pname,def){if(typeof params[pname]==\"undefined\"){params[pname]=def}};param_default(\"inputField\",null);param_default(\"displayArea\",null);param_default(\"button\",null);param_default(\"eventName\",\"click\");param_default(\"ifFormat\",\"%Y/%m/%d\");param_default(\"daFormat\",\"%Y/%m/%d\");param_default(\"singleClick\",true);param_default(\"disableFunc\",null);param_default(\"dateStatusFunc\",params[\"disableFunc\"]);param_default(\"dateText\",null);param_default(\"firstDay\",1);param_default(\"align\",\"Bl\");param_default(\"range\",[1900,2999]);param_default(\"weekNumbers\",true);param_default(\"flat\",null);param_default(\"flatCallback\",null);param_default(\"onSelect\",null);param_default(\"onClose\",null);param_default(\"onUpdate\",null);param_default(\"date\",null);param_default(\"showsTime\",false);param_default(\"timeFormat\",\"24\");param_default(\"electric\",true);param_default(\"step\",2);param_default(\"position\",null);param_default(\"cache\",false);param_default(\"showOthers\",false);param_default(\"multiple\",null);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,null,onJsCalendarDateUpdate,\nfunction(cal){cal.hide()});cal.time24=true;cal.weekNumbers=true;mustCreate=true} else{cal.hide()}\ncal.showsOtherMonths=false;cal.yearStep=2;cal.setRange(yearStart,yearEnd);cal.params=params;cal.setDateStatusHandler(null);cal.getDateText=null;cal.setDateFormat(format);if(mustCreate)\ncal.create();cal.refresh();if(!params.position)\ncal.showAtElement(input_id_anchor,null);else\ncal.showAt(params.position[0],params.position[1]);return false}\nfunction update_date_field(field,year,month,day,hour,minute,ampm){var field=document.getElementById(field)\nvar date=document.getElementById(date)\nvar year=document.getElementById(year)\nvar month=document.getElementById(month)\nvar day=document.getElementById(day)\nvar hour=document.getElementById(hour)\nvar minute=document.getElementById(minute)\nvar ampm=document.getElementById(ampm)\nif(0<year.value){field.value=year.value+\"-\"+month.value+\"-\"+day.value+\" \"+hour.value+\":\"+minute.value\nif(ampm&&ampm.value)\nfield.value=field.value+\" \"+ampm.value}\nelse{field.value=''\nmonth.options[0].selected=1\nday.options[0].selected=1\nhour.options[0].selected=1\nminute.options[0].selected=1\nif(ampm&&ampm.options)\nampm.options[0].selected=1}}\n\n\n/* ----- calendarpopup.js ----- */\n// http://www.bcn.cl/portal_javascripts/calendarpopup.js?original=1\nfunction showDay(date){document.getElementById('day'+date).style.visibility='visible';return true}\nfunction hideDay(date){document.getElementById('day'+date).style.visibility='hidden';return true}\n\n\n/* ----- ie5fixes.js ----- */\n// http://www.bcn.cl/portal_javascripts/ie5fixes.js?original=1\nfunction hackPush(el){this[this.length]=el}\nfunction hackPop(){var N=this.length-1,el=this[N];this.length=N\nreturn el}\nfunction hackShift(){var one=this[0],N=this.length;for(var i=1;i<N;i++){this[i-1]=this[i]}\nthis.length=N-1\nreturn one}\nvar testPushPop=new Array();if(testPushPop.push){}else{Array.prototype.push=hackPush\nArray.prototype.pop=hackPop\nArray.prototype.shift=hackShift}\n\n\n/* ----- formUnload.js ----- */\n// http://www.bcn.cl/portal_javascripts/formUnload.js?original=1\nif(!window.beforeunload)(function(){var BeforeUnloadHandler=function(){var self=this;this.message=window.form_modified_message||\"Your form has not been saved. All changes you have made will be lost.\";this.forms=[];this.chkId=[];this.chkType=new this.CheckType();this.handlers=[this.isAnyFormChanged];this.submitting=false;this.execute=function(event){if(self.submitting) return;if(!event) event=window.event;for(var i=0;i<self.handlers.length;i++){var fn=self.handlers[i];var message=message||fn.apply(self)}\nif(message===true) message=self.message;if(message===false) message=undefined;if(event&&message){event.returnValue=message}\nreturn message}\nthis.execute.tool=this}\nvar Class=BeforeUnloadHandler.prototype;Class.isAnyFormChanged=function(){for(var i=0;i<this.forms.length;i++){var form=this.forms[i];if(this.isElementChanged(form)){return true}}\nreturn false}\nClass.addHandler=function(fn){this.handlers.push(fn)}\nClass.onsubmit=function(){var tool=window.onbeforeunload&&window.onbeforeunload.tool;tool.submitting=true}\nClass.addForm=function(form){for(var i=0;i<this.forms.length;i++){if(this.forms[i]==form) return}\nthis.forms.push(form);form.onsubmit=this.onsubmit;var elements=form.getElementsByTagName('input');for(var j=0;j<elements.length;j++){var ele=elements[j];if(ele.type=='hidden'){ele.setAttribute('originalValue',ele.defaultValue)}}}\nClass.addForms=function(){for(var i=0;i<arguments.length;i++){var element=arguments[i];if(!element) continue;if(element.tagName=='FORM'){this.addForm(element)}\nelse{var forms=element.getElementsByTagName('form');for(var j=0;j<forms.length;j++){this.addForm(forms[j])}}}}\nClass.removeForms=function(){for(var i=0;i<arguments.length;i++){var element=arguments[i];if(!element) continue;if(element.tagName=='FORM'){for(var j=0;j<arguments.length;j++){if(this.forms[j]==element){this.forms.splice(j--,1);element.onsubmit=null}}} else{var forms=element.getElementsByTagName('form');for(var j=0;j<forms.length;j++){this.removeForms(forms[j])}}}}\nClass.CheckType=function(){};var c=Class.CheckType.prototype;c.checkbox=c.radio=function(ele){return ele.checked!=ele.defaultChecked}\nc.password=c.textarea=c.text=function(ele){return ele.value!=ele.defaultValue}\nc.hidden=function(ele){var orig=ele.getAttribute(\"originalValue\");return orig&&(ele.value!=orig)}\nc['select-one']=function(ele){for(var i=0 ;i<ele.length;i++){var opt=ele.options[i];if(opt.selected!=opt.defaultSelected){if(i===0&&opt.selected) continue;return true}}\nreturn false}\nc['select-multiple']=function(ele){for(var i=0 ;i<ele.length;i++){var opt=ele.options[i];if(opt.selected!=opt.defaultSelected){return true}}\nreturn false}\nClass.chk_form=function(form){var elements=form.elements;for(var i=0;i<elements.length;i++){var element=elements[i];if(this.isElementChanged(element)){return true}}\nreturn false}\nClass.isElementChanged=function(ele){var method=ele.id&&this.chkId[ele.id];if(!method&&ele.type&&ele.name)\nmethod=this.chkType[ele.type];if(!method&&ele.tagName)\nmethod=this['chk_'+ele.tagName.toLowerCase()];return method?method.apply(this,[ele]):false};window.onbeforeunload=new BeforeUnloadHandler().execute;registerPloneFunction(function(){if(!W3CDOM){return false};var tool=window.onbeforeunload&&window.onbeforeunload.tool;var content=getContentArea();if(tool&&content){var forms=cssQuery('form.enableUnloadProtection');for(var i=0;i<forms.length;i++){tool.addForm(forms[i])}}})})();\n\n/* ----- sarissa.js ----- */\n// http://www.bcn.cl/portal_javascripts/sarissa.js?original=1\nfunction Sarissa(){};Sarissa.PARSED_OK=\"Document contains no parsing errors\";Sarissa.IS_ENABLED_TRANSFORM_NODE=false;Sarissa.IS_ENABLED_XMLHTTP=false;Sarissa.IS_ENABLED_SELECT_NODES=false;var _sarissa_iNsCounter=0;var _SARISSA_IEPREFIX4XSLPARAM=\"\";var _SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;var _SARISSA_HAS_DOM_CREATE_DOCUMENT=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;var _SARISSA_HAS_DOM_FEATURE=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;var _SARISSA_IS_MOZ=_SARISSA_HAS_DOM_CREATE_DOCUMENT&&_SARISSA_HAS_DOM_FEATURE;var _SARISSA_IS_SAFARI=navigator.userAgent.toLowerCase().indexOf(\"applewebkit\")!=-1;var _SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf(\"msie\")>-1&&navigator.userAgent.toLowerCase().indexOf(\"opera\")==-1;if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}};if(_SARISSA_IS_IE){_SARISSA_IEPREFIX4XSLPARAM=\"xsl:\";var _SARISSA_DOM_PROGID=\"\";var _SARISSA_XMLHTTP_PROGID=\"\";pickRecentProgID=function(idList,enabledList){var bFound=false;for(var i=0;i<idList.length&&!bFound;i++){try{var oDoc=new ActiveXObject(idList[i]);o2Store=idList[i];bFound=true;for(var j=0;j<enabledList.length;j++)\nif(i<=enabledList[j][1])\nSarissa[\"IS_ENABLED_\"+enabledList[j][0]]=true}catch(objException){}};if(!bFound)\nthrow \"Could not retreive a valid progID of Class: \"+idList[idList.length-1]+\". (original exception: \"+e+\")\";idList=null;return o2Store};_SARISSA_DOM_PROGID=pickRecentProgID([\"Msxml2.DOMDocument.5.0\",\"Msxml2.DOMDocument.4.0\",\"Msxml2.DOMDocument.3.0\",\"MSXML2.DOMDocument\",\"MSXML.DOMDocument\",\"Microsoft.XMLDOM\"],[[\"SELECT_NODES\",2],[\"TRANSFORM_NODE\",2]]);_SARISSA_XMLHTTP_PROGID=pickRecentProgID([\"Msxml2.XMLHTTP.5.0\",\"Msxml2.XMLHTTP.4.0\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\",\"Microsoft.XMLHTTP\"],[[\"XMLHTTP\",4]]);_SARISSA_THREADEDDOM_PROGID=pickRecentProgID([\"Msxml2.FreeThreadedDOMDocument.5.0\",\"MSXML2.FreeThreadedDOMDocument.4.0\",\"MSXML2.FreeThreadedDOMDocument.3.0\"]);_SARISSA_XSLTEMPLATE_PROGID=pickRecentProgID([\"Msxml2.XSLTemplate.5.0\",\"Msxml2.XSLTemplate.4.0\",\"MSXML2.XSLTemplate.3.0\"],[[\"XSLTPROC\",2]]);pickRecentProgID=null;Sarissa.getDomDocument=function(sUri,sName){var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);if(sName){if(sUri){oDoc.loadXML(\"<a\"+_sarissa_iNsCounter+\":\"+sName+\" xmlns:a\"+_sarissa_iNsCounter+\"=\\\"\"+sUri+\"\\\" />\");++_sarissa_iNsCounter}\nelse\noDoc.loadXML(\"<\"+sName+\"/>\")};return oDoc};Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc.parseError!=0){parseErrorText=\"XML Parsing Error: \"+oDoc.parseError.reason+\"\\nLocation: \"+oDoc.parseError.url+\"\\nLine Number \"+oDoc.parseError.line+\", Column \"+oDoc.parseError.linepos+\":\\n\"+oDoc.parseError.srcText+\"\\n\";for(var i=0;i<oDoc.parseError.linepos;i++){parseErrorText+=\"-\"};parseErrorText+=\"^\\n\"};return parseErrorText};Sarissa.setXpathNamespaces=function(oDoc,sNsSet){oDoc.setProperty(\"SelectionLanguage\",\"XPath\");oDoc.setProperty(\"SelectionNamespaces\",sNsSet)};XSLTProcessor=function(){this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);this.processor=null};XSLTProcessor.prototype.importStylesheet=function(xslDoc){var converted=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);converted.loadXML(xslDoc.xml);this.template.stylesheet=converted;this.processor=this.template.createProcessor();this.paramsSet=new Array()};XSLTProcessor.prototype.transformToDocument=function(sourceDoc){this.processor.input=sourceDoc;var outDoc=new ActiveXObject(_SARISSA_DOM_PROGID);this.processor.output=outDoc;this.processor.transform();return outDoc};XSLTProcessor.prototype.transformToFragment=function(sourceDoc,ownerDocument){return this.transformToDocument(sourceDoc)};XSLTProcessor.prototype.setParameter=function(nsURI,name,value){if(nsURI){this.processor.addParameter(name,value,nsURI)}else{this.processor.addParameter(name,value)};if(!this.paramsSet[\"\"+nsURI]){this.paramsSet[\"\"+nsURI]=new Array()};this.paramsSet[\"\"+nsURI][name]=value};XSLTProcessor.prototype.getParameter=function(nsURI,name){if(this.paramsSet[\"\"+nsURI]&&this.paramsSet[\"\"+nsURI][name])\nreturn this.paramsSet[\"\"+nsURI][name];else\nreturn null}}\nelse{if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){if(window.XMLDocument){XMLDocument.prototype.onreadystatechange=null;XMLDocument.prototype.readyState=0;XMLDocument.prototype.parseError=0;var _SARISSA_SYNC_NON_IMPLEMENTED=false;try{XMLDocument.prototype.async=true;_SARISSA_SYNC_NON_IMPLEMENTED=true}catch(e){};XMLDocument.prototype._sarissa_load=XMLDocument.prototype.load;XMLDocument.prototype.load=function(sURI){var oDoc=document.implementation.createDocument(\"\",\"\",null);Sarissa.copyChildNodes(this,oDoc);this.parseError=0;Sarissa.__setReadyState__(this,1);try{if(this.async==false&&_SARISSA_SYNC_NON_IMPLEMENTED){var tmp=new XMLHttpRequest();tmp.open(\"GET\",sURI,false);tmp.send(null);Sarissa.__setReadyState__(this,2);Sarissa.copyChildNodes(tmp.responseXML,this);Sarissa.__setReadyState__(this,3)}\nelse{this._sarissa_load(sURI)}}\ncatch(objException){this.parseError=-1}\nfinally{if(this.async==false){Sarissa.__handleLoad__(this)}};return oDoc}};Sarissa.__handleLoad__=function(oDoc){if(!oDoc.documentElement||oDoc.documentElement.tagName==\"parsererror\")\noDoc.parseError=-1;Sarissa.__setReadyState__(oDoc,4)};_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this)};Sarissa.__setReadyState__=function(oDoc,iReadyState){oDoc.readyState=iReadyState;if(oDoc.onreadystatechange!=null&&typeof oDoc.onreadystatechange==\"function\")\noDoc.onreadystatechange()};Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:\"\",sName?sName:\"\",null);oDoc.addEventListener(\"load\",_sarissa_XMLDocument_onload,false);return oDoc}}};if(!window.DOMParser){DOMParser=function(){};DOMParser.prototype.parseFromString=function(sXml,contentType){var doc=Sarissa.getDomDocument();doc.loadXML(sXml);return doc}};if(window.XMLHttpRequest){Sarissa.IS_ENABLED_XMLHTTP=true}\nelse if(_SARISSA_IS_IE){XMLHttpRequest=function(){return new ActiveXObject(_SARISSA_XMLHTTP_PROGID)};Sarissa.IS_ENABLED_XMLHTTP=true};if(!window.document.importNode&&_SARISSA_IS_IE){try{window.document.importNode=function(oNode,bChildren){var importNode=document.createElement(\"div\");if(bChildren)\nimportNode.innerHTML=Sarissa.serialize(oNode);else\nimportNode.innerHTML=Sarissa.serialize(oNode.cloneNode(false));return importNode.firstChild}}catch(e){}};if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc.parseError!=0){if(oDoc.documentElement.tagName==\"parsererror\"){parseErrorText=oDoc.documentElement.firstChild.data;parseErrorText+=\"\\n\"+oDoc.documentElement.firstChild.nextSibling.firstChild.data}\nelse if(oDoc.documentElement.tagName==\"html\"){parseErrorText=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"h1\")[0],false)+\"\\n\";parseErrorText+=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"body\")[0],false)+\"\\n\";parseErrorText+=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"pre\")[0],false)}};return parseErrorText}};Sarissa.getText=function(oNode,deep){var s=\"\";var nodes=oNode.childNodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];var nodeType=node.nodeType;if(nodeType==Node.TEXT_NODE||nodeType==Node.CDATA_SECTION_NODE){s+=node.data}\nelse if(deep==true&&(nodeType==Node.ELEMENT_NODE||nodeType==Node.DOCUMENT_NODE||nodeType==Node.DOCUMENT_FRAGMENT_NODE)){s+=Sarissa.getText(node,true)}};return s};if(window.XMLSerializer){Sarissa.serialize=function(oDoc){return(new XMLSerializer()).serializeToString(oDoc)}}else{if((Sarissa.getDomDocument(\"\",\"foo\",null)).xml){Sarissa.serialize=function(oDoc){return oDoc.xml};XMLSerializer=function(){};XMLSerializer.prototype.serializeToString=function(oNode){return oNode.xml}}};Sarissa.stripTags=function(s){return s.replace(/<[^>]+>/g,\"\")};Sarissa.clearChildNodes=function(oNode){while(oNode.hasChildNodes()){oNode.removeChild(oNode.firstChild)}};Sarissa.copyChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo)};var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;var nodes=nodeFrom.childNodes;if(ownerDoc.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true))}}\nelse{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true))}}};Sarissa.moveChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo)};var nodes=nodeFrom.childNodes;if(nodeFrom.ownerDocument==nodeTo.ownerDocument){nodeTo.appendChild(nodes[i])}else{var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;if(ownerDoc.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true))}}\nelse{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true))}};Sarissa.clearChildNodes(nodeFrom)}};Sarissa.xmlize=function(anyObject,objectName,indentSpace){indentSpace=indentSpace?indentSpace:'';var s=indentSpace+'<'+objectName+'>';var isLeaf=false;if(!(anyObject instanceof Object)||anyObject instanceof Number||anyObject instanceof String||anyObject instanceof Boolean||anyObject instanceof Date){s+=Sarissa.escape(\"\"+anyObject);isLeaf=true}else{s+=\"\\n\";var itemKey='';var isArrayItem=anyObject instanceof Array;for(var name in anyObject){s+=Sarissa.xmlize(anyObject[name],(isArrayItem?\"array-item key=\\\"\"+name+\"\\\"\":name),indentSpace+\" \")};s+=indentSpace};return s+=(objectName.indexOf(' ')!=-1?\"</array-item>\\n\":\"</\"+objectName+\">\\n\")};Sarissa.escape=function(sXml){return sXml.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g,\"&apos;\")};Sarissa.unescape=function(sXml){return sXml.replace(/&apos;/g,\"'\").replace(/&quot;/g,\"\\\"\").replace(/&gt;/g,\">\").replace(/&lt;/g,\"<\").replace(/&amp;/g,\"&\")};\n\n/* ----- login.js ----- */\n// http://www.bcn.cl/portal_javascripts/login.js?original=1\nfunction cookiesEnabled(){var c=\"areYourCookiesEnabled=0\";document.cookie=c;var dc=document.cookie;if(dc.indexOf(c)==-1) return 0;c=\"areYourCookiesEnabled=1\";document.cookie=c;dc=document.cookie;if(dc.indexOf(c)==-1) return 0;document.cookie=\"areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT\";return 1}\nfunction setLoginVars(user_name_id,alt_user_name_id,password_id,empty_password_id,js_enabled_id,cookies_enabled_id){if(js_enabled_id){el=document.getElementById(js_enabled_id);if(el){el.value=1}}\nif(cookies_enabled_id){el=document.getElementById(cookies_enabled_id);if(el){el.value=cookiesEnabled()}}\nif(user_name_id&&alt_user_name_id){user_name=document.getElementById(user_name_id)\nalt_user_name=document.getElementById(alt_user_name_id)\nif(user_name&&alt_user_name){alt_user_name.value=user_name.value}}\nif(password_id&&empty_password_id){password=document.getElementById(password_id)\nempty_password=document.getElementById(empty_password_id)\nif(password&&empty_password){if(password.value.length==0){empty_password.value='1'} else{empty_password.value='0'}}}\nreturn 1}\nfunction showCookieMessage(msg_id){msg=document.getElementById(msg_id)\nif(msg){if(cookiesEnabled()){msg.style.display='none'} else{msg.style.display='block'}}}\nfunction showEnableCookiesMessage(){showCookieMessage('enable_cookies_message')}\nregisterPloneFunction(showEnableCookiesMessage);\n\n/* ----- formsubmithelpers.js ----- */\n// http://www.bcn.cl/portal_javascripts/formsubmithelpers.js?original=1\nfunction inputSubmitOnClick(event){if(!event) var event=window.event;if(hasClassName(this,'submitting')){return confirm(window.form_resubmit_message)} else{addClassName(this,'submitting')}\nreturn true}\nfunction registerSubmitHandler(){var nodes=cssQuery('input[type=submit]');for(var i=0;i<nodes.length;i++){var node=nodes[i];if(!node.onclick){node.onclick=inputSubmitOnClick}}}\nregisterPloneFunction(registerSubmitHandler);\n","truncated":"false"}
{"page":"http://www.nordmaling.se/","url":"http://www.nordmaling.se/~js/global.js","body":"\u00ef\u00bb\u00bfif (window.execScript && window.dialogWidth)\r\n{\r\n\twindow.execScript(\"Sub VBAlert(msg)\\nMsgBox msg, vbExclamation, \\\"Content Studio\\\"\\nEnd Sub\", \"VB\"+\"Script\");\r\n\twindow.execScript(\"Function ShowOkCancelDialog(msg, title)\\nShowOkCancelDialog = MsgBox(msg, vbOkCancel Or vbQuestion, title)\\nEnd function\", \"VBScript\");\r\n\twindow.alert = function (sText)\r\n\t{\r\n\t\tif (typeof (sText) === \"undefined\")\r\n\t\t\tsText = \"undefined\";\r\n\t\tif (sText === null)\r\n\t\t\tsText = \"null\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (typeof (sText) != \"string\")\r\n\t\t\t\tsText = sText.toString();\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t\tsText = \"[\" + typeof (sText) + \"]\";\r\n\t\t}\r\n\t\tVBAlert(sText);\r\n\t}\r\n\twindow.confirm = function(sText)\r\n\t{\r\n\t\tif (typeof (sText) === \"undefined\")\r\n\t\t\tsText = \"\";\r\n\t\tif (sText === null)\r\n\t\t\tsText = \"null\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (typeof (sText) != \"string\")\r\n\t\t\t\tsText = sText.toString();\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t\tsText = \"[\" + typeof (sText) + \"]\";\r\n\t\t}\r\n\t\treturn ShowOkCancelDialog(sText, \"Content Studio\") == 1;\r\n\t}\r\n}\r\n// Global js-file\r\nvar EnableAnonymousAccess = false;\r\nvar MozillaSelectionNameSpaceArr = new Array();\r\nvar IsMozilla = navigator.userAgent.indexOf(\"MSIE\") == -1 && typeof (document.implementation.createDocument) == \"function\";\r\nif (IsMozilla)\r\n\tbuildDOMForMozilla();\r\nfunction encodeUTF8(sValue)\r\n{\r\n\ttry\r\n\t{\r\n\t\treturn encodeURIComponent(sValue).replace(/\\+/g, \"%2B\");\r\n\t}\r\n\tcatch (e)\r\n\t{ }\r\n\treturn escape(sValue).replace(/\\+/g, \"%2B\");\r\n}\r\nfunction decodeUTF8(sValue)\r\n{\r\n\ttry\r\n\t{\r\n\t\treturn decodeURIComponent(sValue.replace(/\\+/g, \" \"));\r\n\t}\r\n\tcatch (e)\r\n\t{ }\r\n\treturn unescape(sValue.replace(/\\+/g, \" \"));\r\n}\r\n\r\nfunction getXMLHttpRequestObject()\r\n{\r\n\tvar xmlHttp = null;\r\n\ttry\r\n\t{\r\n\t\txmlHttp = new ActiveXObject(\"MSXML2.XMLHttp.6.0\");\r\n\t}\r\n\tcatch (ex)\r\n\t{\r\n\t\tif (window.XMLHttpRequest)\r\n\t\t\txmlHttp = new XMLHttpRequest();\r\n\t\telse\r\n\t\t\txmlHttp = new ActiveXObject(\"MSXML2.XMLHttp.3.0\");\r\n\t}\r\n\treturn xmlHttp;\r\n}\r\n\r\nfunction getDomDocument()\r\n{\r\n\tvar dom = null;\r\n\ttry\r\n\t{\r\n\t\tdom = new ActiveXObject(\"MSXML2.DomDocument.6.0\");\r\n\t\tdom.setProperty(\"ProhibitDTD\", false);\r\n\t\tdom.setProperty(\"AllowXsltScript\", true);\r\n\t\tdom.setProperty(\"ResolveExternals\", true);\r\n\t}\r\n\tcatch (ex)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdom = new ActiveXObject(\"MSXML2.DomDocument.3.0\");\r\n\t\t}\r\n\t\tcatch (ex)\r\n\t\t{\r\n\t\t\tdom = document.implementation.createDocument(\"\", \"\", null);\r\n\t\t}\r\n\r\n\t}\r\n\treturn dom;\r\n}\r\n\r\nfunction requestQueryString(sURL, sParamName)\r\n{\r\n\tif (!sParamName)\r\n\t\treturn null;\r\n\tif (!sURL && typeof (sURL) != \"string\")\r\n\t\tsURL = location.search;\r\n\tvar i = sURL.indexOf(\"?\");\r\n\tif (i == -1)\r\n\t\treturn null;\r\n\tvar sRet = null;\r\n\tsURL = sURL.substring(i);\r\n\tvar regEx = new RegExp(\"[\\\\?\\\\&]\" + sParamName + \"\\\\=[^&#]*\", \"ig\");\r\n\tvar arr = null;\r\n\twhile ((arr = regEx.exec(sURL)) != null)\r\n\t\tsRet = (sRet == null ? \"\" : sRet + \", \") + decodeUTF8(arr[0].substring(sParamName.length + 2));\r\n\treturn sRet;\r\n}\r\n\r\n\r\nfunction getCookie(sName, sCollName)\r\n{\r\n\tsName = encodeUTF8(sName);\r\n\tvar sCookie = document.cookie;\r\n\tvar regEx = new RegExp(\"(^|; )\" + sName + \"\\\\=[^;]*\", \"i\");\r\n\tvar sRet = null;\r\n\tvar arr = regEx.exec(sCookie);\r\n\tif (arr == null)\r\n\t\treturn null;\r\n\tsRet = arr[0].substring(arr[0].indexOf(\"=\") + 1);\r\n\tif (!sCollName)\r\n\t\treturn decodeUTF8(sRet);\r\n\tsCookie = sRet;\r\n\tsCollName = encodeUTF8(sCollName);\r\n\tregEx = new RegExp(\"(^|&)\" + sCollName + \"\\\\=[^&]*\", \"ig\");\r\n\tsRet = null;\r\n\tarr = null;\r\n\twhile ((arr = regEx.exec(sCookie)) != null)\r\n\t\tsRet = (sRet == null ? \"\" : sRet + \", \") + arr[0].substring(arr[0].indexOf(\"=\") + 1);\r\n\tif (sRet == null)\r\n\t\treturn null;\r\n\treturn decodeUTF8(sRet);\r\n}\r\n\r\n\r\nfunction setCookie(sNameOfCookie, sValue, sCollName, nDays)\r\n{\r\n\tvar path = SiteURL;\r\n\tif (!path)\r\n\t{\r\n\t\tpath = new String(document.location.pathname);\r\n\t\tpath = path.substring(0, path.lastIndexOf(\"/\"));\r\n\t\tif (path.indexOf(\"/\") != 0)\r\n\t\t\tpath = \"/\" + path;\r\n\t\tif (path.substring(path.length - 3) == \"/sv\" || path.substring(path.length - 3) == \"/fi\" || path.substring(path.length - 3) == \"/nb\")\r\n\t\t\tpath = path.substring(0, path.length - 3);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (path.substring(8).indexOf(\"/\") > -1)\r\n\t\t{\r\n\t\t\tpath = path.substring(path.substring(8).indexOf(\"/\") + 8);\r\n\t\t\tpath = path.substring(0, path.lastIndexOf(\"/\"));\r\n\r\n\t\t}\r\n\t}\r\n\tif (!path)\r\n\t\tpath = \"/\";\r\n\tvar expires = \"\";\r\n\tif (nDays)\r\n\t{\r\n\t\tvar today = new Date();\r\n\t\tvar expire = new Date();\r\n\t\texpire.setTime(today.getTime() + 3600000 * 24 * nDays);\r\n\t\texpires = \";expires=\" + expire.toGMTString();\r\n\t}\r\n\tvar sCookie = document.cookie;\r\n\tvar regEx = null;\r\n\tvar arr = null;\r\n\tsNameOfCookie = encodeUTF8(sNameOfCookie);\r\n\tsValue = encodeUTF8(sValue);\r\n\tif (!sCollName)\r\n\t{\r\n\t\tregEx = new RegExp(\"(^|; )\" + sNameOfCookie + \"\\\\=\", \"ig\");\r\n\t\twhile ((arr = regEx.exec(sCookie)) != null)\r\n\t\t{\r\n\t\t\tvar sName = arr[0].replace(/; /g, \"\");\r\n\t\t\tif (sName.replace(/\\=/, \"\") != sNameOfCookie)\r\n\t\t\t\tdocument.cookie = sName + \";path=\" + path + \";expires=Fri, 4 Mar 1980 08:19:41 UTC\";\r\n\t\t}\r\n\t\tdocument.cookie = sNameOfCookie + \"=\" + sValue + \";path=\" + path + expires;\r\n\t\treturn;\r\n\t}\r\n\tsCollName = encodeUTF8(sCollName);\r\n\tregEx = new RegExp(\"(^|; )\" + sNameOfCookie + \"\\\\=[^;]*\", \"i\");\r\n\tarr = regEx.exec(sCookie);\r\n\tif (arr == null)\r\n\t{\r\n\t\t//alert(sNameOfCookie + \"=\" + sCollName + \"=\" + sValue + \";path=\" + path + expires);\r\n\t\tdocument.cookie = sNameOfCookie + \"=\" + sCollName + \"=\" + sValue + \";path=\" + path + expires;\r\n\t\treturn;\r\n\t}\r\n\tvar sOldCookieValue = arr[0].substring(arr[0].indexOf(\"=\") + 1);\r\n\tregEx = new RegExp(\"(^|&)\" + sCollName + \"\\\\=[^&]*(&|$)\", \"ig\");\r\n\tsOldCookieValue = sOldCookieValue.replace(regEx, \"\");\r\n\t//alert(sNameOfCookie + \"=\" + sCollName + \"=\" + sValue + (sOldCookieValue ? \"&\" : \"\") + sOldCookieValue + \";path=\" + path + expires);\r\n\tdocument.cookie = sNameOfCookie + \"=\" + sCollName + \"=\" + sValue + (sOldCookieValue ? \"&\" : \"\") + sOldCookieValue + \";path=\" + path + expires;\r\n\tregEx = new RegExp(\"(^|; )\" + sNameOfCookie + \"\\\\=\", \"ig\");\r\n\twhile ((arr = regEx.exec(sCookie)) != null)\r\n\t{\r\n\t\tvar sName = arr[0].replace(/; /g, \"\");\r\n\t\tif (sName.replace(/\\=/, \"\") != sNameOfCookie)\r\n\t\t\tdocument.cookie = sName + \";path=\" + path + \";expires=Fri, 4 Mar 1980 08:19:41 UTC\";\r\n\t}\r\n}\r\n\r\nfunction getXMLHttpRequest()\r\n{\r\n\tvar xmlHTTP = null;\r\n\ttry\r\n\t{\r\n\t\txmlHTTP = getXMLHttpRequestObject();\r\n\t\treturn xmlHTTP;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\txmlHTTP = new ActiveXObject(\"Microsoft.XMLHttp\");\r\n\t\t\treturn xmlHTTP;\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\txmlHTTP = new XMLHttpRequest();\r\n\t\t\t\treturn xmlHTTP;\r\n\t\t\t}\r\n\t\t\tcatch (e)\r\n\t\t\t{\r\n\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\nfunction showModalBrowseDialog(adminURL, unitId, categoryId, documentId, filterModule, bPreView, returnType, buttonLabel, shortCut, bLocked, bEditName, connectionId, customBrowseDialogFunction, customBrowseDialogArguments, disableContextMenu, sFileTypes)\r\n{\r\n\tif (!customBrowseDialogFunction)\r\n\t{\r\n\t\tvar argArr = new Array(unitId, categoryId, documentId, filterModule, bPreView, returnType, buttonLabel, shortCut, bLocked, bEditName, connectionId, disableContextMenu, sFileTypes);\r\n\t\tvar sURL = getAdminURL(\"CS_Dialog_Open.htm\");\r\n\t\treturn window.showModalDialog(sURL, argArr, \"dialogHeight:480px;dialogWidth:900px;status:no;status:no;scroll:no;help:no;resizable:yes\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (!customBrowseDialogArguments)\r\n\t\t\tcustomBrowseDialogArguments = new Array(unitId, categoryId, new Array(documentId), null, null, null);\r\n\t\treturn customBrowseDialogFunction(customBrowseDialogArguments);\r\n\t}\r\n}\r\nfunction HTMLEncode(sText)\r\n{\r\n\t\r\n\tif (!sText || typeof(sText) != \"string\")\r\n\t\treturn sText;\r\n\tvar re1 = /&/g;\r\n\tvar re2 = /\"/g;\r\n\tvar re3 = /</g;\r\n\tvar re4 = />/g;\r\n\tif (re1.test(sText))\r\n\t\tsText = sText.replace(re1, \"&amp;\");\r\n\tif (re2.test(sText))\r\n\t\tsText = sText.replace(re2, \"&quot;\");\r\n\tif (re3.test(sText))\r\n\t\tsText = sText.replace(re3, \"&lt;\");\r\n\tif (re4.test(sText))\r\n\t\tsText = sText.replace(re4, \"&gt;\");\r\n\treturn fixLineEndings(sText);\r\n}\r\nfunction fixLineEndings(sText)\r\n{\r\n\tvar re = /([^\\r]|^)\\n/g;\r\n\tif (!re.test(sText))\r\n\t\treturn sText;\r\n\treturn sText.replace(re, \"$1\\r\\n\");\r\n}\r\nfunction xPathEncode(text)\r\n{\r\n\tif (text.search(/'/) > -1)\r\n\t\treturn \"concat('\" + text.replace(/'/g, \"', \\\"'\\\", '\") + \"')\";\r\n\telse\r\n\t\treturn \"'\" + text + \"'\";\r\n}\r\nfunction showModalLinkDialog(adminURL, sURL, sTarget, sClass, classColl, connectionId, sTitle, categoryId, bLocked, linkColl, customBrowseDialogFunction, disableContextMenu)\r\n{\r\n\tvar argArr = new Array(sURL, sTarget, sClass, classColl, connectionId, sTitle, categoryId, bLocked, linkColl, customBrowseDialogFunction, disableContextMenu);\r\n\tvar sURL2 = getAdminURL(\"CS_Dialog_Link.htm\");\r\n\treturn window.showModalDialog(sURL2, argArr, \"DialogHeight:228px;DialogWidth:480px;status:No;scroll:no;\");\r\n}\r\nfunction showModalImageDialog(adminURL, img, connectionId, customBrowseDialogFunction, disableContextMenu, strict)\r\n{\r\n\tvar sURL = getAdminURL(\"w_dialog_image_properties.htm\");\r\n\tvar argArr = new Array(img, connectionId, customBrowseDialogFunction, disableContextMenu, strict);\r\n\twindow.showModalDialog(sURL, argArr, \"dialogHeight:740px;dialogWidth:460px;status:no;status:no;scroll:no;help:no;resizable:no\");\r\n}\r\n\r\nfunction sortCase(sValue1, sValue2)\r\n{\r\n\tvar s1 = sValue1;\r\n\tvar s2 = sValue2;\r\n\ttry\r\n\t{\r\n\t\tif (typeof (s1) != \"string\")\r\n\t\t\ts1 = s1.toString();\r\n\t\tif (typeof (s2) != \"string\")\r\n\t\t\ts2 = s2.toString();\r\n\t\ts1 = s1.toLowerCase();\r\n\t\ts2 = s2.toLowerCase();\r\n\r\n\t\tif (s1 == s2)\r\n\t\t\treturn 0;\r\n\t\tvar argArr = new Array(s1, s2);\r\n\t\targArr.sort();\r\n\r\n\t\tif (argArr[0] == s1)\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 1;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\treturn 0;\r\n\t}\r\n}\r\n\r\nfunction xmlHttp(sUrl, sMethod, sValue)\r\n{\r\n\treturn getXMLDOM(sUrl, sMethod, sValue);\r\n}\r\nfunction getDOMObject()\r\n{\r\n\ttry\r\n\t{\r\n\t\tvar dom = getDomDocument();\r\n\t\tdom.preserveWhiteSpace = true;\r\n\t\tdom.setProperty(\"SelectionLanguage\", \"XPath\");\r\n\t\tdom.async = false;\r\n\t\treturn dom;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\r\n\t}\r\n\ttry\r\n\t{\r\n\t\tvar dom = new ActiveXObject(\"Microsoft.XmlDom\");\r\n\t\tdom.preserveWhiteSpace = true;\r\n\t\tdom.setProperty(\"SelectionLanguage\", \"XPath\");\r\n\t\tdom.async = false;\r\n\t\treturn dom;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\r\n\t}\r\n\ttry\r\n\t{\r\n\t\tvar dom = document.implementation.createDocument(\"\", \"\", null);\r\n\t\treturn dom;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\r\n\t}\r\n\treturn null;\r\n}\r\nfunction getDOM(sXML, sUrl)\r\n{\r\n\r\n\tvar dom = getDOMObject();\r\n\tif (dom == null)\r\n\t\treturn null;\r\n\r\n\tif (sUrl)\r\n\t\tdom.load(sUrl);\r\n\telse\r\n\t{\r\n\t\tif (sXML)\r\n\t\t\tdom.loadXML(sXML);\r\n\t}\r\n\tif (dom.parseError.errorCode != 0 || dom.xml.length == 0)\r\n\t{\r\n\t\tif (window.clipboardData) {\r\n\t\t\tif (confirm(\"The server returned invalid xml. Would you like to copy the text content to your clipboard? URL: \" + sUrl + \". XML: \" + sXML))\r\n\t\t\t\twindow.clipboardData.setData(\"Text\", dom.text);\r\n\t\t}\r\n\t\tdom.loadXML(\"<root><result>\" + dom.parseError.errorCode + \"</result><resulttext>\" + HTMLEncode(dom.parseError.reason) + \"</resulttext><status>\" + dom.parseError.errorCode + \"</status><statustext>\" + HTMLEncode(dom.parseError.reason) + \"</statustext></root>\");\r\n\t}\r\n\treturn dom;\r\n}\r\nvar HasRenewedSession = false;\r\nfunction getXMLDOM(sUrl, sMethod, sValue)\r\n{\r\n\tvar xmlHttp = getXMLHttpRequest();\r\n\tif (xmlHttp == null)\r\n\t\treturn null;\r\n\tvar origUrl = sUrl;\r\n\tif (window.DocumentVersionInformation && window.showModalDialog && sUrl.indexOf(\".ashx\") != -1) {\r\n\t\tif (sUrl.indexOf(\"?\") == -1)\r\n\t\t\tsUrl += \"?\";\r\n\t\telse\r\n\t\t\tsUrl += \"&\";\r\n\t\tsUrl += \"DocumentVersionInformation=\" + DocumentVersionInformation.contentVersion;\r\n\t}\r\n\ttry\r\n\t{\r\n\t\txmlHttp.open(sMethod, sUrl, false);\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\tif (e.description)\r\n\t\t\treturn getDOM(\"<root><result>\" + e.number + \"</result><resulttext>\" + HTMLEncode(e.description) + \"</resulttext><status>\" + e.number + \"</status><statustext>\" + HTMLEncode(e.description) + \"</statustext></root>\");\r\n\t\telse\r\n\t\t\treturn getDOM(\"<root><result>-1</result><resulttext>\" + HTMLEncode(e) + \"</resulttext><status>-1</status><statustext>\" + HTMLEncode(e) + \"</statustext></root>\");\r\n\t}\r\n\txmlHttp.setRequestHeader(\"Accept\", \"text/xml\");\r\n\ttry { xmlHttp.responseType = 'msxml-document'; } catch (e) { }\r\n\tvar dom = null;\r\n\ttry\r\n\t{\r\n\t\txmlHttp.send(sValue);\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\tdom = getXmlHttpXMLDocument(xmlHttp);\r\n\t\tdom.loadXML(\"<root><result>-1</result><resulttext>Could not connect to web server.</resulttext><status>-1</status><statustext>Could not connect to web server.</statustext></root>\");\r\n\t}\r\n\tsUrl = origUrl;\r\n\tdom = getXmlHttpXMLDocument(xmlHttp);\r\n\ttry\r\n\t{\r\n\t\tdom.setProperty(\"SelectionLanguage\", \"XPath\");\r\n\t\tif (dom.parseError.errorCode != 0 || dom.xml.length == 0)\r\n\t\t{\r\n\t\t\tif (window.clipboardData) {\r\n\t\t\t\tif (confirm(\"The server returned invalid xml. Would you like to copy the text content to your clipboard? URL: \" + sUrl))\r\n\t\t\t\t\twindow.clipboardData.setData(\"Text\", xmlHttp.responseText);\r\n\t\t\t}\r\n\t\t\tif (dom.parseError.errorCode == 0)\r\n\t\t\t\tdom.loadXML(\"<root><result>\" + xmlHttp.status + \"</result><resulttext>\" + HTMLEncode(xmlHttp.statusText) + \"</resulttext><status>\" + xmlHttp.status + \"</status><statustext>\" + HTMLEncode(xmlHttp.statusText) + \"</statustext></root>\");\r\n\t\t\telse\r\n\t\t\t\tdom.loadXML(\"<root><result>\" + dom.parseError.errorCode + \"</result><resulttext>\" + HTMLEncode(dom.parseError.reason) + \"</resulttext><status>\" + dom.parseError.errorCode + \"</status><statustext>\" + HTMLEncode(dom.parseError.reason) + \"</statustext></root>\");\r\n\t\t}\r\n\t\tdom.preserveWhiteSpace = true;\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\r\n\t}\r\n\tif (dom == null)\r\n\t\treturn getDOM(\"<root><result>\" + xmlHttp.status + \"</result><resulttext>\" + HTMLEncode(xmlHttp.statusText) + \"</resulttext><status>\" + xmlHttp.status + \"</status><statustext>\" + HTMLEncode(xmlHttp.statusText) + \"</statustext></root>\", null);\r\n\ttry\r\n\t{\r\n\t\tvar node = dom.documentElement.selectSingleNode(\"status\");\r\n\t\tif (node && !EnableAnonymousAccess)\r\n\t\t{\r\n\t\t\tvar status = node.text;\r\n\t\t\tif (status == \"-5\")\r\n\t\t\t{\r\n\t\t\t\tvar oWnd = new mWindow(getAdminURL(\"CS_Dialog_Connect.htm\"), 400, 300, \"\");\r\n\t\t\t\tif (oWnd.showModal())\r\n\t\t\t\t\treturn getXMLDOM(sUrl, sMethod, sValue);\r\n\t\t\t}\r\n\t\t\t//Custom login\r\n\t\t\tif (status == \"-6\")\r\n\t\t\t{\r\n\t\t\t\tvar oWnd = new mWindow(getAdminURL(\"CS_Dialog_CustomLogInPage.htm?ReturnURL=\" + encodeUTF8(sUrl)), 400, 300, dom, true, false, false);\r\n\t\t\t\tif (oWnd.showModal())\r\n\t\t\t\t\treturn getXMLDOM(sUrl, sMethod, sValue);\r\n\t\t\t}\r\n\t\t\t//Renew session\r\n\t\t\tif (status == \"-7\" && !HasRenewedSession)\r\n\t\t\t{\r\n\t\t\t\tHasRenewedSession = true;\r\n\t\t\t\treturn getXMLDOM(sUrl, sMethod, sValue);\r\n\t\t\t}\r\n\t\t\t//Modified document??\r\n\t\t\tif (status == \"-10\" && window.DocumentVersionInformation && window.showModalDialog && GlobalEditTemplateFocusTimeoutId != -1) {\r\n\r\n\t\t\t\tif (GlobalEditTemplateFocusTimeoutId > 0)\r\n\t\t\t\t\twindow.clearTimeout(GlobalEditTemplateFocusTimeoutId);\r\n\r\n\t\t\t\tvar oWnd = new mWindow(getAdminURL(\"CS_Dialog_ConfirmDocumentReload.htm\"), 300, 150, new Array(\"The document has been modified in another source editor. What would you like to do?\", true), false, false, false);\r\n\t\t\t\tGlobalEditTemplateFocusTimeoutId = -1;\r\n\t\t\t\tvar result = oWnd.showModal();\r\n\t\t\t\tGlobalEditTemplateFocusTimeoutId = -2;\r\n\t\t\t\tif (result == 5) {\r\n\t\t\t\t\twindow.DocumentVersionInformation.contentVersion = 0;\r\n\t\t\t\t\twindow.setTimeout(function () {\r\n\t\t\t\t\t\tGlobalEditTemplateFocusTimeoutId = 0;\r\n\t\t\t\t\t}, 1000);\r\n\t\t\t\t\treturn getXMLDOM(sUrl, sMethod, sValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (result == 6) {\r\n\t\t\t\t\tif (window.detachEvent)\r\n\t\t\t\t\t\twindow.detachEvent(\"onbeforeunload\", onBeforeEditTemplateUnload);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twindow.removeEventListener(\"beforeunload\", onBeforeEditTemplateUnload, false);\r\n\t\t\t\t\tlocation.replace(location.href);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\twindow.setTimeout(function () {\r\n\t\t\t\t\t\tGlobalEditTemplateFocusTimeoutId = 0;\r\n\t\t\t\t\t}, 1000);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tHasRenewedSession = false;\r\n\r\n\t\tif (window.DocumentVersionInformation && window.showModalDialog) {\r\n\t\t\tnode = dom.documentElement.selectSingleNode(\"DocumentVersionInformation\");\r\n\t\t\tif (node)\r\n\t\t\t\tDocumentVersionInformation.contentVersion = parseInt(node.getAttribute(\"contentVersion\"));\r\n\t\t}\r\n\t}\r\n\tcatch (e)\r\n\t{ }\r\n\treturn dom;\r\n}\r\nfunction selectSingleNode(xPath)\r\n{\r\n\tvar nodes = null;\r\n\tif (this.ownerDocument)\r\n\t\tnodes = this.ownerDocument.evaluate(xPath, this, nsResolver, XPathResult.ANY_TYPE, null);\r\n\telse\r\n\t\tnodes = this.evaluate(xPath, this, nsResolver, XPathResult.ANY_TYPE, null);\r\n\r\n\r\n\tvar node = nodes.iterateNext();\r\n\treturn node;\r\n}\r\nfunction selectNodes(xPath)\r\n{\r\n\tvar nodes = null\r\n\tif (this.ownerDocument)\r\n\t\tnodes = this.ownerDocument.evaluate(xPath, this, nsResolver, XPathResult.ANY_TYPE, null);\r\n\telse\r\n\t\tnodes = this.evaluate(xPath, this, nsResolver, XPathResult.ANY_TYPE, null);\r\n\tvar arr = new Array();\r\n\tvar node = null;\r\n\twhile ((node = nodes.iterateNext()) != null)\r\n\t{\r\n\t\tarr[arr.length] = node;\r\n\t}\r\n\treturn arr;\r\n}\r\nfunction loadXML(strXML)\r\n{\r\n\tvar dom = this;\r\n\tvar parser = new DOMParser();\r\n\tvar newDom = parser.parseFromString(strXML, \"text/xml\");\r\n\twhile (dom.hasChildNodes())\r\n\t\tdom.removeChild(dom.lastChild);\r\n\r\n\tfor (var i = 0; i < newDom.childNodes.length; i++)\r\n\t{\r\n\t\t//import the node\r\n\t\tvar objImportedNode = dom.importNode(newDom.childNodes[i], true);\r\n\t\t//append the child to the current document\r\n\t\tdom.appendChild(objImportedNode);\r\n\t}\r\n}\r\nfunction nsResolver(prefix)\r\n{\r\n\tfor (var i = 0; i < MozillaSelectionNameSpaceArr.length; i++)\r\n\t{\r\n\t\tif (MozillaSelectionNameSpaceArr[i][0] == prefix)\r\n\t\t{\r\n\t\t\treturn MozillaSelectionNameSpaceArr[i][1];\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction buildDOMForMozilla()\r\n{\r\n\tif (!window.XMLDocument || !XMLDocument.prototype.getElementsByTagName)\r\n\t\treturn;\r\n\r\n\tXMLDocument.prototype.__defineGetter__(\"parseError\", function ()\r\n\t{\r\n\t\tvar nodes = this.getElementsByTagName(\"parsererror\");\r\n\t\tvar code = nodes.length == 0 ? 0 : -1;\r\n\t\tvar reason = nodes.length == 0 ? \"\" : nodes[0].textContent;\r\n\t\tvar parseError = {\r\n\t\t\terrorCode:code,\r\n\t\t\treason:reason \r\n\t\t};\r\n\r\n\t\treturn parseError;\r\n\t});\r\n\r\n\tXMLDocument.prototype.setProperty = function(sPropertyName, vPropertyValue)\r\n\t{\r\n\t\tswitch (sPropertyName)\r\n\t\t{\r\n\t\t\tcase \"SelectionNamespaces\":\r\n\t\t\t\tvar re = /xmlns\\:(\\w+)\\=['\"]([\\s\\S]+?)['\"]/;\r\n\t\t\t\tif (re.test(vPropertyValue))\r\n\t\t\t\t{\r\n\t\t\t\t\tMozillaSelectionNameSpaceArr[MozillaSelectionNameSpaceArr.length] = new Array(RegExp.$1, RegExp.$2);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow \"Invalid or unrecognised property\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tXMLDocument.prototype.loadXML = loadXML;\r\n\r\n\tXMLDocument.prototype.load = function (sUrl) {\r\n\t\tvar newDom = getXMLDOM(sUrl, \"GET\", null);\r\n\r\n\t\tvar dom = this;\r\n\t\twhile (dom.hasChildNodes())\r\n\t\t\tdom.removeChild(dom.lastChild);\r\n\r\n\t\tfor (var i = 0; i < newDom.childNodes.length; i++) {\r\n\t\t\t//import the node\r\n\t\t\tvar objImportedNode = dom.importNode(newDom.childNodes[i], true);\r\n\t\t\t//append the child to the current document\r\n\t\t\tdom.appendChild(objImportedNode);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tbuildNodeForMozilla(XMLDocument);\r\n\tbuildNodeForMozilla(Element);\r\n\tText.prototype.__defineGetter__(\"text\", nodeGetText);\r\n\tText.prototype.__defineSetter__(\"text\", nodeSetText);\r\n\tText.prototype.__defineGetter__(\"xml\", _Node_getXML);\r\n\t\r\n\tbuildAttributeForMozilla();\r\n}\r\nfunction _Node_getXML()\r\n{\r\n\t//create a new XMLSerializer\r\n\tvar objXMLSerializer = new XMLSerializer;\r\n\t//get the XML string\r\n\tvar strXML = objXMLSerializer.serializeToString(this);\r\n\t//return the XML string\r\n\treturn strXML;\r\n}\r\nfunction buildNodeForMozilla(type)\r\n{\r\n\t//alert(createEl.toSource());\r\n\ttype.prototype.selectSingleNode = selectSingleNode;\r\n\ttype.prototype.selectNodes = selectNodes;\r\n\ttype.prototype.__defineGetter__(\"xml\", _Node_getXML);\r\n\ttype.prototype.__defineGetter__(\"text\", nodeGetText);\r\n\ttype.prototype.__defineSetter__(\"text\", nodeSetText);\r\n\ttype.prototype.transformNode = function(inXslDom)\r\n\t{\r\n\t\tvar processor = new XSLTProcessor();\r\n\t\tprocessor.importStylesheet(inXslDom);\r\n\t\tvar newDocument = processor.transformToDocument(this);\r\n\t\t\r\n\t\t//create a new XMLSerializer\r\n\t\tvar objXMLSerializer = new XMLSerializer;\r\n\t\t//get the XML string\r\n\t\tvar strXML = objXMLSerializer.serializeToString(newDocument);\r\n\t\t//return the XML string\r\n\t\treturn strXML;\r\n\t}\r\n\ttype.prototype.transformNodeToObject = function(inXslDom, outDom)\r\n\t{\r\n\t\toutDom.loadXML(this.transformNode(inXslDom));\r\n\t}\r\n}\r\nfunction nodeGetText()\r\n{\r\n\treturn this.textContent;\r\n}\r\nfunction nodeSetText(sValue)\r\n{\r\n\tif (this.nodeValue == null)\r\n\t\tthis.textContent = sValue;\r\n\telse\r\n\t\tthis.nodeValue = sValue;\r\n}\r\nfunction buildAttributeForMozilla()\r\n{\r\n\tAttr.prototype.__defineGetter__(\"text\", nodeGetText);\r\n\tAttr.prototype.__defineSetter__(\"text\", nodeSetText);\r\n\tAttr.prototype.__defineGetter__(\"xml\", function()\r\n\t{\r\n\t\treturn this.nodeName + '=\"' + this.text + '\"';\r\n\t});\r\n}\r\nfunction showResultText(result, resultText)\r\n{\r\n\tvar dom = getDOM(\"<root><status>\" + result + \"</status><statustext>\" + HTMLEncode(resultText) + \"</statustext></root>\");\r\n\treturn showResult(dom);\r\n}\r\nfunction showResult(dom)\r\n{\r\n\treturn (showResultEx(dom) == 0)\r\n}\r\nfunction showResultEx(dom, bypassList)\r\n{\r\n\tvar result = 0;\r\n\tvar resultText = \"\";\r\n\tif (dom.documentElement == null)\r\n\t\treturn 0;\r\n\tvar nod = dom.documentElement.selectSingleNode(\"status\");\r\n\tvar parsed = null;\r\n\tif (nod)\r\n\t{\r\n\t\tresult = parseInt(nod.text);\r\n\t\tparsed = nod.getAttribute(\"parsed\");\r\n\t}\r\n\tnod = dom.documentElement.selectSingleNode(\"statustext\");\r\n\tif (nod)\r\n\t\tresultText = nod.text;\r\n\tnod = dom.documentElement.selectSingleNode(\"result\");\r\n\tif (nod)\r\n\t\tresult = parseInt(nod.text);\r\n\tnod = dom.documentElement.selectSingleNode(\"resulttext\");\r\n\tif (nod)\r\n\t\tresultText = nod.text;\r\n\tnod = dom.documentElement.selectSingleNode(\"statusfulltext\");\r\n\tif (nod)\r\n\t\tresultText = nod.text;\r\n\tnod = dom.documentElement.selectSingleNode(\"resultfulltext\");\r\n\tif (nod)\r\n\t\tresultText = nod.text;\r\n\tif (result == 0)\r\n\t\treturn result;\r\n\tif (result > 999 && result < 3000 && parsed != \"1\")\r\n\t{\r\n\t\tvar lang = Lang;\r\n\t\tvar realURL = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\trealURL = top.location.toString();\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{\r\n\t\t\trealURL = location.toString();\r\n\t\t}\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (AdminURL.length > 0 && realURL.indexOf(AdminURL) == 0)\r\n\t\t\t{\r\n\t\t\t\tlang = \"\";\r\n\t\t\t\tvar s = realURL.substring(AdminURL.length);\r\n\t\t\t\tif (s.indexOf(\"/\") > -1)\r\n\t\t\t\t{\r\n\t\t\t\t\ts = s.substring(0, s.indexOf(\"/\"));\r\n\t\t\t\t\tlang = s;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (e)\r\n\t\t{ }\r\n\t\tlang = lang.replace(\"/\", \"\");\r\n\t\tvar xml = \"<root><parameters>\";\r\n\t\txml += \"<parameter name='OriginalMessage'>\" + HTMLEncode(resultText) + \"</parameter><parameter name='MessageId'>\" + result.toString() + \"</parameter><parameter name='LanguageCode'>\" + lang + \"</parameter></parameters></root>\";\r\n\t\tvar dom = getXMLDOM(getAdminURL(\"WebAPI/ContentStudio_CSApplication.ashx?Action=TranslateMessage\"), \"POST\", xml);\r\n\t\tvar node = dom.selectSingleNode(\"//message\");\r\n\t\tif (node != null)\r\n\t\t{\r\n\t\t\tresultText = node.text;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tresultText += \" (An error occured in the errorhandler)\\nXML sent:\" + xml + \"\\nXML recived:\" + dom.xml;\r\n\t\t\tresult = -1;\r\n\t\t}\r\n\t}\r\n\tif (typeof (bypassList) == \"string\")\r\n\t{\r\n\t\tvar arr = bypassList.split(\", \");\r\n\r\n\t\tfor (var i in arr)\r\n\t\t{\r\n\t\t\tif (parseInt(arr[i]) == result)\r\n\t\t\t{\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//Already handled with an confirm dialog\r\n\tif (result != -10) {\r\n\t\t//if (parsed == \"1\")\r\n\t\t//\talert(resultText);\r\n\t\t//else\r\n\t\t//alert(\"(\" + result + \") \" + resultText);\r\n\t\traiseCSError(resultText, result, window.CategoryID, window.DocumentID);\r\n\t}\r\n\treturn result;\r\n}\r\n//returns true if the user can edit an event action\r\nfunction CSF_hasUserPermission(ID, type, namedPermission)\r\n{\r\n\tvar permiss = 0;\r\n\ttry\r\n\t{\r\n\t\tswitch (type.toUpperCase())\r\n\t\t{\r\n\t\t\tcase \"R\": break;\r\n\t\t\tcase \"U\": break;\r\n\t\t\tcase \"C\": break;\r\n\t\t\tcase \"D\": break;\r\n\t\t\tdefault:\r\n\t\t\t\traiseCSError(\"Invalid containertype\");\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\traiseCSError(\"Invalid argument 'type' \\n\" + e);\r\n\t\treturn false;\r\n\t}\r\n\ttry\r\n\t{\r\n\t\tswitch (namedPermission.toLowerCase())\r\n\t\t{\r\n\t\t\tcase \"browse\": permiss = 0x01; break;\r\n\t\t\tcase \"read\": permiss = 0x02; break;\r\n\t\t\tcase \"write\": permiss = 0x04; break;\r\n\t\t\tcase \"create\": permiss = 0x08; break;\r\n\t\t\tcase \"delete\": permiss = 0x10; break;\r\n\t\t\tcase \"sendforrevision\": permiss = 0x20; break;\r\n\t\t\tcase \"removefromrevision\": permiss = 0x40; break;\r\n\t\t\tcase \"reject\": permiss = 0x80; break;\r\n\t\t\tcase \"approve\": permiss = 0x100; break;\r\n\t\t\tcase \"readcontainer\": permiss = 0x200; break;\r\n\t\t\tcase \"writecontainer\": permiss = 0x400; break;\r\n\t\t\tcase \"createcontainer\": permiss = 0x800; break;\r\n\t\t\tcase \"deletecontainer\": permiss = 0x1000; break;\r\n\t\t\tcase \"setowner\": permiss = 0x2000; break;\r\n\t\t\tcase \"admin\": permiss = 0x800000; break;\r\n\t\t\tcase \"default\":\r\n\t\t\t\traiseCSError(\"Invalid permission name '\" + namedPermission + \"'\");\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\traiseCSError(\"Invalid argument 'namedPermission' \\n\" + e);\r\n\t\treturn false;\r\n\t}\r\n\tvar url = \"WebAPI/ContentStudio_Security_AccessControl.ashx?Action=ObjectAccessCheck&ObjectId=\" +\r\n\tID + \"&ObjectType=\" + type + \"&AccessMask=\" + permiss;\r\n\turl = getAdminURL(url);\r\n\tvar dom = getXMLDOM(url, \"GET\", null);\r\n\t//get the result\r\n\tif (!showResult(dom))\r\n\t\treturn false;\r\n\tvar node = dom.documentElement.selectSingleNode(\"access[.='grant']\");\r\n\tif (node == null)\r\n\t\treturn false;\r\n\treturn true;\r\n}\r\nfunction getAdminURL(sURL)\r\n{\r\n\tif (typeof (sURL) != \"string\")\r\n\t\tsURL = \"\";\r\n\tvar sessionId = null;\r\n\tif (AdminURL.length > 0 && (!EnableAnonymousAccess || ((sessionId = getCookie(\"SessionID\")) != null && sessionId != \"\" && sessionId != \"\")))\r\n\t\treturn AdminURL + Lang + sURL;\r\n\tif (SiteURL.length == 0)\r\n\t\tSiteURL = location.href.substring(0, location.href.lastIndexOf(\"/\") + 1).toLowerCase();\r\n\tsURL = SiteURL + \"~js/DelegateHttpRequest.ashx?Action=sendrequest&Lang=\" + encodeUTF8(Lang) + \"&URL=\" + encodeUTF8(sURL);\r\n\treturn sURL;\r\n}\r\nfunction CSF_OpenWindow(oLink, sTarget)\r\n{\r\n\twindow.open(oLink.href, sTarget);\r\n\treturn false;\r\n}\r\n\r\nfunction getXmlHttpXMLDocument(xmlHttp)\r\n{\r\n\tvar dom = xmlHttp.responseXML;\r\n\tif (IsMozilla && !(dom instanceof (XMLDocument)))\r\n\t\tdom = getDOM(xmlHttp.responseText);\r\n\treturn dom;\r\n}\r\n\r\nfunction documentInformation(url)\r\n{\r\n\tvar dId = DocumentId;\r\n\tvar pId = PresentationTemplateId;\r\n\tvar eId = EditId;\r\n\tvar rId = RefId;\r\n\tif (url && (url.indexOf(\":\") == -1 || url.indexOf(\"//\") > -1 )) {\r\n\t\ttry {\r\n\t\t\tvar xmlHttp = getXMLHttpRequestObject();\r\n\t\t\tif (url.indexOf(\"#\") != -1)\r\n\t\t\t\turl = url.substring(0, url.indexOf(\"#\"));\r\n\t\t\tif (url.indexOf(\"?\") == -1)\r\n\t\t\t\turl += \"?CS_GetResolveInformation=1\";\r\n\t\t\telse\r\n\t\t\t\turl += \"&CS_GetResolveInformation=1\";\r\n\t\t\txmlHttp.open(\"GET\", url, false);\r\n\t\t\ttry { xmlHttp.responseType = 'msxml-document'; } catch (e) { }\r\n\t\t\txmlHttp.send();\r\n\t\t\tvar contentType = xmlHttp.getResponseHeader(\"Content-Type\");\r\n\t\t\tif (xmlHttp.status == 200 && contentType != null && contentType.toLowerCase() == \"text/xml\") {\r\n\t\t\t\tvar dom = getXmlHttpXMLDocument(xmlHttp);\r\n\t\t\t\tvar node = dom.selectSingleNode(\"/*/identifier/@documentid\");\r\n\t\t\t\tif (node)\r\n\t\t\t\t\tdId = parseInt(node.text);\r\n\t\t\t\tnode = dom.selectSingleNode(\"/*/identifier/@editid\");\r\n\t\t\t\tif (node)\r\n\t\t\t\t\teId = parseInt(node.text);\r\n\t\t\t\tnode = dom.selectSingleNode(\"/*/identifier/@presentationtemplateid\");\r\n\t\t\t\tif (node)\r\n\t\t\t\t\tpId = parseInt(node.text);\r\n\t\t\t\tnode = dom.selectSingleNode(\"/*/identifier/@refid\");\r\n\t\t\t\tif (node)\r\n\t\t\t\t\trId = parseInt(node.text);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar tempId = requestQueryString(url, \"id\");\r\n\t\t\t\tif (tempId)\r\n\t\t\t\t\tdId = parseInt(tempId);\r\n\t\t\t\ttempId = requestQueryString(url, \"editid\");\r\n\t\t\t\tif (tempId)\r\n\t\t\t\t\teId = parseInt(tempId);\r\n\t\t\t\ttempId = requestQueryString(url, \"ptid\");\r\n\t\t\t\tif (tempId)\r\n\t\t\t\t\tpId = parseInt(tempId);\r\n\t\t\t\ttempId = requestQueryString(url, \"refid\");\r\n\t\t\t\tif (tempId)\r\n\t\t\t\t\trId = parseInt(tempId);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (e) {\r\n\r\n\t\t}\r\n\t}\r\n\tthis.documentId = dId;\r\n\tthis.editId = eId;\r\n\tthis.presentationTemplateId = pId;\r\n\tthis.refId = rId;\r\n}\r\n\r\nfunction attachToCSEvent(eventName, pFunc)\r\n{\r\n\tif (document.addEventListener)\r\n\t\treturn document.addEventListener(eventName, pFunc, false);\r\n\telse\r\n\t\tdocument.attachEvent(\"onpropertychange\", function (e) {\r\n\t\t\tif (e.propertyName != eventName)\r\n\t\t\t\treturn;\r\n\t\t\treturn pFunc(e);\r\n\t\t});\r\n\r\n}\r\n\r\nfunction dispatchCSEvent(eventName, canCancel, eventArg) {\r\n\tvar result = true;\r\n\tif (document.createEvent) {\r\n\t\tvar evt = document.createEvent(\"CustomEvent\");\r\n\t\tevt.initCustomEvent(eventName, false, canCancel, eventArg);\r\n\t\tresult = document.dispatchEvent(evt);\r\n\t\tif (result && frameElement)\r\n\t\t\tresult = frameElement.dispatchEvent(evt);\r\n\t}\r\n\telse if (document.createEventObject) {\r\n\t\tvar evt = document.createEventObject();\r\n\t\tevt.returnValue = true;\r\n\t\tevt.expando = eventArg;\r\n\t\tevt.propertyName = eventName;\r\n\t\tvar r = document.fireEvent(\"onpropertychange\", evt);\r\n\t\tif (evt.returnValue === false)\r\n\t\t\tresult = false;\r\n\t\tif (result && frameElement) {\r\n\t\t\tframeElement.fireEvent(\"onpropertychange\", evt);\r\n\t\t\tif (evt.returnValue === false)\r\n\t\t\t\tresult = false;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\n\r\nfunction raiseCSError(msg, number, categoryId, documentId, eptField) {\r\n\r\n\tvar CSError = function (msg)\r\n\t{\r\n\t\tthis.message = msg;\r\n\t}\r\n\tCSError.prototype = \r\n\t\t{\r\n\t\t\tmessage:\"\",\r\n\t\t\tnumber: 0,\r\n\t\t\tdocumentId: 0,\r\n\t\t\tcategoryId: 0,\r\n\t\t\teptField:null\r\n\t\t};\r\n\t\r\n\tvar arg = new CSError(msg);\r\n\tif(number)\r\n\t{\r\n\t\tnumber = parseInt(number);\r\n\t\tif(number > 0)\r\n\t\t\tmsg = \"(\" + number + \") \" + msg;\r\n\t\targ.number = number;\r\n\t}\r\n\tif(categoryId)\r\n\t\targ.categoryId = parseInt(categoryId);\r\n\r\n\tif(documentId)\r\n\t\targ.documentId = parseInt(documentId);\r\n\r\n\tif (eptField)\r\n\t\targ.eptField = eptField;\r\n\r\n\tvar result = dispatchCSEvent(\"cserror\", true, arg);\r\n\tif(result)\r\n\t\talert(msg);\r\n\treturn result;\r\n}","truncated":"false"}
{"page":"http://www.correos.go.cr/","url":"https://www.correos.go.cr/js_srv/xmlextras.js","body":"//<script>\r\n//////////////////\r\n// Helper Stuff //\r\n//////////////////\r\n\r\n// used to find the Automation server name\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\t\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\n//////////////////////////\r\n// Start the Real stuff //\r\n//////////////////////////\r\n\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1; \r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// fell through\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\r\n\t\t// DOM2\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\t\t\t\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\r\n\t\t\treturn doc;\r\n\t\t}\r\n\r\n\t\tif (window.ActiveXObject) \r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t/*\r\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\t*/\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\r\n}","truncated":"false"}
{"page":"http://www.rnpdigital.com/","url":"http://www.rnpdigital.com/js_srv/xmlextras.js","body":"//<script>\r\n//////////////////\r\n// Helper Stuff //\r\n//////////////////\r\n\r\n// used to find the Automation server name\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\t\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\n//////////////////////////\r\n// Start the Real stuff //\r\n//////////////////////////\r\n\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1; \r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// fell through\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\r\n\t\t// DOM2\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\t\t\t\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\r\n\t\t\treturn doc;\r\n\t\t}\r\n\r\n\t\tif (window.ActiveXObject) \r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t/*\r\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\t*/\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\r\n}","truncated":"false"}
{"page":"http://www.dongabiz.com/","url":"http://www.dongabiz.com/template/javascript/JSON/xmlextras.js","body":"//<script>\n//////////////////\n// Helper Stuff //\n//////////////////\n\n// used to find the Automation server name\nfunction getDomDocumentPrefix() {\n\tif (getDomDocumentPrefix.prefix)\n\t\treturn getDomDocumentPrefix.prefix;\n\t\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\t// try to create the objects\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\n\t\t}\n\t\tcatch (ex) {};\n\t}\n\t\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\n\nfunction getXmlHttpPrefix() {\n\tif (getXmlHttpPrefix.prefix)\n\t\treturn getXmlHttpPrefix.prefix;\n\t\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\t// try to create the objects\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\n\t\t}\n\t\tcatch (ex) {};\n\t}\n\t\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\n\n//////////////////////////\n// Start the Real stuff //\n//////////////////////////\n\n\n// XmlHttp factory\nfunction XmlHttp() {}\n\nXmlHttp.create = function () {\n\ttry {\n\t\tif (window.XMLHttpRequest) {\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\t\n\t\t\t// some versions of Moz do not support the readyState property\n\t\t\t// and the onreadystate event so we patch it!\n\t\t\tif (req.readyState == null) {\n\t\t\t\treq.readyState = 1;\n\t\t\t\treq.addEventListener(\"load\", function () {\n\t\t\t\t\treq.readyState = 4;\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\n\t\t\t\t\t\treq.onreadystatechange();\n\t\t\t\t}, false);\n\t\t\t}\n\t\t\t\n\t\t\treturn req;\n\t\t}\n\t\tif (window.ActiveXObject) {\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\n\t\t}\n\t}\n\tcatch (ex) {}\n\t// fell through\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\n};\n\n// XmlDocument factory\nfunction XmlDocument() {}\n\nXmlDocument.create = function () {\n\ttry {\n\t\t// DOM2\n\t\tif (document.implementation && document.implementation.createDocument) {\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\n\t\t\t\n\t\t\t// some versions of Moz do not support the readyState property\n\t\t\t// and the onreadystate event so we patch it!\n\t\t\tif (doc.readyState == null) {\n\t\t\t\tdoc.readyState = 1;\n\t\t\t\tdoc.addEventListener(\"load\", function () {\n\t\t\t\t\tdoc.readyState = 4;\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\n\t\t\t\t\t\tdoc.onreadystatechange();\n\t\t\t\t}, false);\n\t\t\t}\n\t\t\t\n\t\t\treturn doc;\n\t\t}\n\t\tif (window.ActiveXObject)\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\n\t}\n\tcatch (ex) {}\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\n};\n\n// Create the loadXML method and xml getter for Mozilla\nif (window.DOMParser &&\n\twindow.XMLSerializer &&\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\n\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\tXMLDocument.prototype.loadXML = \n\tDocument.prototype.loadXML = function (s) {\n\t\t\n\t\t// parse the string to a new doc\t\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\n\t\t\n\t\t// remove all initial children\n\t\twhile (this.hasChildNodes())\n\t\t\tthis.removeChild(this.lastChild);\n\t\t\t\n\t\t// insert and import nodes\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\n\t\t}\n\t};\n\t\n\t\n\t/*\n\t * xml getter\n\t *\n\t * This serializes the DOM tree to an XML String\n\t *\n\t * Usage: var sXml = oNode.xml\n\t *\n\t */\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n}","truncated":"false"}
{"page":"http://www.moveonnet.eu/","url":"http://www.moveonnet.eu/portal_javascripts/moveonnet/ploneScripts6318.js","body":"/* Merged Plone Javascript file\n * This file is dynamically assembled from separate parts.\n * Some of these parts have 3rd party licenses or copyright information attached\n * Such information is valid for that section,\n * not for the entire composite file\n * originating files are separated by ----- filename.js -----\n */\n\n/* ----- register_function.js ----- */\n/* Essential javascripts, used a lot. \n * These should be placed inline\n * We have to be certain they are loaded before anything that uses them \n */\n\n// check for ie5 mac\nvar bugRiddenCrashPronePieceOfJunk = (\n navigator.userAgent.indexOf('MSIE 5') != -1\n &&\n navigator.userAgent.indexOf('Mac') != -1\n)\n\n// check for W3CDOM compatibility\nvar W3CDOM = (!bugRiddenCrashPronePieceOfJunk &&\n document.getElementsByTagName &&\n document.createElement);\n\n// cross browser function for registering event handlers\nfunction registerEventListener(elem, event, func) {\n if (elem.addEventListener) {\n elem.addEventListener(event, func, false);\n return true;\n } else if (elem.attachEvent) {\n var result = elem.attachEvent(\"on\"+event, func);\n return result;\n }\n // maybe we could implement something with an array\n return false;\n}\n\n// cross browser function for unregistering event handlers\nfunction unRegisterEventListener(elem, event, func) {\n if (elem.removeEventListener) {\n elem.removeEventListener(event, func, false);\n return true;\n } else if (elem.detachEvent) {\n var result = elem.detachEvent(\"on\"+event, func);\n return result;\n }\n // maybe we could implement something with an array\n return false;\n}\n\nfunction registerPloneFunction(func) {\n // registers a function to fire onload.\n registerEventListener(window, \"load\", func);\n}\n\nfunction unRegisterPloneFunction(func) {\n // unregisters a function so it does not fire onload.\n unRegisterEventListener(window, \"load\", func);\n}\n\nfunction getContentArea() {\n // returns our content area element\n if (W3CDOM) {\n var node = document.getElementById('region-content');\n if (!node) {\n node = document.getElementById('content');\n }\n return node;\n }\n} \n\n\n/* ----- cssQuery.js ----- */\n/*\n\tcssQuery, version 2.0 (2005/05/23)\n\tCopyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)\n\tLicense: http://creativecommons.org/licenses/LGPL/2.1/\n*/\neval(function(p,a,c,k,e,d){e=function(c){return(c<a?\"\":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('7 z=5(){7 1M=\"2.0 (3e)\";7 Z=M;7 C=/\\\\s*,\\\\s*/;7 z=5(s,D){3d{7 m=[];7 u=1C.3c.2j&&!D;7 b=(D)?(D.3b==26)?D:[D]:[1l];7 1N=1f(s).1o(C),i;h(i=0;i<1N.x;i++){s=1I(1N[i]);8(Z&&s.V(0,3).2i(\"\")==\" *#\"){s=s.V(2);D=2e([],b,s[1])}1J D=b;7 j=0,t,f,a,c=\"\";H(j<s.x){t=s[j++];f=s[j++];c+=t+f;a=\"\";8(s[j]==\"(\"){H(s[j++]!=\")\")a+=s[j];a=a.V(0,-1);c+=\"(\"+a+\")\"}D=(u&&12[c])?12[c]:2c(D,t,f,a);8(u)12[c]=D}m=m.3a(D)}1E z.2k;6 m}39(e){z.2k=e;6[]}};z.2a=5(){6\"5 z() {\\\\n [1M \"+1M+\"]\\\\n}\"};7 12={};z.2j=P;z.38=5(s){8(s){s=1I(s).2i(\"\");1E 12[s]}1J 12={}};7 1y={};7 1g=P;z.1c=5(n,s){8(1g)1a(\"s=\"+17(s));1y[n]=X s()};z.37=5(c){6 c?1a(c):y};7 F={};7 l={};7 Y=[];F[\" \"]=5(r,f,t,n){7 e,i,j;h(i=0;i<f.x;i++){7 s=13(f[i],t,n);h(j=0;(e=s[j]);j++){8(R(e)&&19(e,n))r.B(e)}}};F[\"#\"]=5(r,f,i){7 e,j;h(j=0;(e=f[j]);j++)8(e.Q==i)r.B(e)};F[\".\"]=5(r,f,c){c=X 1x(\"(^|\\\\\\\\s)\"+c+\"(\\\\\\\\s|$)\");7 e,i;h(i=0;(e=f[i]);i++)8(c.q(e.23))r.B(e)};F[\":\"]=5(r,f,p,a){7 t=l[p],e,i;8(t)h(i=0;(e=f[i]);i++)8(t(e,a))r.B(e)};l[\"36\"]=5(e){7 d=T(e);8(d.1L)h(7 i=0;i<d.1L.x;i++){8(d.1L[i]==e)6 M}};l[\"35\"]=5(e){};7 R=5(e){6(e&&e.1i==1&&e.1k!=\"!\")?e:2d};7 1d=5(e){H(e&&(e=e.34)&&!R(e))2h;6 e};7 J=5(e){H(e&&(e=e.33)&&!R(e))2h;6 e};7 1v=5(e){6 R(e.2g)||J(e.2g)};7 1X=5(e){6 R(e.2f)||1d(e.2f)};7 1r=5(e){7 c=[];e=1v(e);H(e){c.B(e);e=J(e)}6 c};7 1m=5(e){6 T(e).32==\"31 30\"};7 T=5(e){6 e.2Z||e.1l};7 13=5(e,t){6(t==\"*\"&&e.1K)?e.1K:e.13(t)};7 1e=5(e,t,n){8(t==\"*\")6 R(e);8(!19(e,n))6 P;8(!1m(e))t=t.2Y();6 e.1k==t};7 19=5(e,n){6!n||(n==\"*\")||(e.2X==n)};7 1j=5(e){6 e.1P};5 2e(r,f,Q){7 m,i,j;h(i=0;i<f.x;i++){8(m=f[i].1K.2W(Q)){8(m.x==2d)r.B(m);1J h(j=0;j<m.x;j++)r.B(m[j])}}6 r};7 N=/\\\\|/;5 2c(D,t,f,a){8(N.q(f)){f=f.1o(N);a=f[0];f=f[1]}7 r=[];8(F[t]){F[t](r,D,f,a)}6 r};7 S=/^[^\\\\s>+~]/;7 2b=/[\\\\s#.:>+~()@]|[^\\\\s#.:>+~()@]+/g;5 1I(s){8(S.q(s))s=\" \"+s;6 s.10(2b)||[]};7 W=/\\\\s*([\\\\s>+~(),]|^|$)\\\\s*/g;7 I=/([\\\\s>+~,]|[^(]\\\\+|^)([#.:@])/g;7 1f=5(s){6 s.G(W,\"$1\").G(I,\"$1*$2\")};7 1z={2a:5(){6\"\\'\"},10:/^(\\'[^\\']*\\')|(\"[^\"]*\")$/,q:5(s){6 y.10.q(s)},21:5(s){6 y.q(s)?s:y+s+y},29:5(s){6 y.q(s)?s.V(1,-1):s}};7 1w=5(t){6 1z.29(t)};7 E=/([\\\\/()[\\\\]?{}|*+-])/g;5 U(s){6 s.G(E,\"\\\\\\\\$1\")};X 5(){7 1G=5(f,o,a){f.1H(o,a)};8(\\'\\'.G(/^/,17)){7 27=17.1D.G;7 28=5(e,r){7 m,n=\"\",s=y;H(s&&(m=e.2V(s))){n+=s.V(0,m.2U)+1G(r,y,m);s=s.V(m.2T)}6 n+s};17.1D.G=5(e,r){y.G=(2S r==\"5\")?28:27;6 y.G(e,r)}}8(!24.1H){7 L=\"1H-\"+2R(X 2Q);1G=5(f,o,a){7 r;o[L]=f;18(a.x){A 0:r=o[L]();O;A 1:r=o[L](a[0]);O;A 2:r=o[L](a[0],a[1]);O;A 3:r=o[L](a[0],a[1],a[2]);O;A 4:r=o[L](a[0],a[1],a[2],a[3]);O;2P:7 1F=[],i=a.x-1;2O 1F[i]=\"a[\"+i+\"]\";H(i--);1a(\"r=o[L](\"+1F+\")\")}1E o[L];6 r}}8(![].B)26.1D.B=5(){h(7 i=0;i<1C.x;i++){y[y.x]=1C[i]}6 y.x}};z.1c(\"1b-1Y\",5(){F[\">\"]=5(r,f,t,n){7 e,i,j;h(i=0;i<f.x;i++){7 s=1r(f[i]);h(j=0;(e=s[j]);j++)8(1e(e,t,n))r.B(e)}};F[\"+\"]=5(r,f,t,n){h(7 i=0;i<f.x;i++){7 e=J(f[i]);8(e&&1e(e,t,n))r.B(e)}};F[\"@\"]=5(r,f,a){7 t=Y[a].q;7 e,i;h(i=0;(e=f[i]);i++)8(t(e))r.B(e)};l[\"2N-15\"]=5(e){6!1d(e)};l[\"1B\"]=5(e,c){c=X 1x(\"^\"+c,\"i\");H(e&&!e.16(\"1B\"))e=e.1q;6 e&&c.q(e.16(\"1B\"))};7 9={};9.1A=\"@\";9.K={};9.10=/\\\\[([\\\\w-]+)\\\\s*(\\\\W?=)?\\\\s*([^\\\\]]*)\\\\]/g;9.G=5(m,a,c,v){7 k=9.1A+m;8(!Y[k]){a=9.25(a,c||\"\",v||\"\");Y[k]=a;Y.B(a)}6 Y[k].Q};9.1Z=5(s){6 s.G(y.10,y.G)};9.25=5(p,t,v){7 a={};a.Q=9.1A+Y.x;a.2M=p;t=y.K[t];t=t?t(9.16(p),1w(v)):P;a.q=X 24(\"e\",\"6 \"+t);6 a};9.16=5(n){18(n.2L()){A\"Q\":6\"e.Q\";A\"2K\":6\"e.23\";A\"h\":6\"e.2J\";A\"22\":8(Z){6\"17((e.2I.10(/22=\\\\\"?([^\\\\\\\\s\\\\\"]*)\\\\\"?/)||[])[1]||\\'\\')\"}}6\"e.16(\\'\"+n+\"\\')\"};y.9=9;9.K[\"\"]=5(a){6 a};9.K[\"=\"]=5(a,v){6 a+\"==\"+1z.21(v)};9.K[\"~=\"]=5(a,v){6\"/(^|\\\\\\\\s)\"+U(v)+\"(\\\\\\\\s|$)/.q(\"+a+\")\"};9.K[\"|=\"]=5(a,v){6\"/^\"+U(v)+\"(-|$)/.q(\"+a+\")\"};7 20=1f;1f=5(s){6 20(9.1Z(s))}});z.1c(\"1b-2H\",5(){7 1t=1y[\"1b-1Y\"];8(!1t)6;F[\"~\"]=5(r,f,t,n){7 e,i;h(i=0;(e=f[i]);i++){H(e=J(e)){8(1e(e,t,n))r.B(e)}}};l[\"2G\"]=5(e,t){t=X 1x(U(1w(t)));6 t.q(1j(e))};l[\"2F\"]=5(e){6 e==T(e).1Q};l[\"2E\"]=5(e){7 n,i;h(i=0;(n=e.1O[i]);i++){8(R(n)||n.1i==3)6 P}6 M};l[\"1V-15\"]=5(e){6!J(e)};l[\"2D-15\"]=5(e){e=e.1q;6 1v(e)==1X(e)};l[\"2C\"]=5(e,s){7 n=z(s,T(e));h(7 i=0;i<n.x;i++){8(n[i]==e)6 P}6 M};l[\"1W-15\"]=5(e,a){6 1s(e,a,1d)};l[\"1W-1V-15\"]=5(e,a){6 1s(e,a,J)};l[\"2B\"]=5(e){6 e.Q==2A.2z.V(1)};l[\"1U\"]=5(e){6 e.1U};l[\"2y\"]=5(e){6 e.1u===P};l[\"1u\"]=5(e){6 e.1u};l[\"1T\"]=5(e){6 e.1T};7 9=1t.9;9.K[\"^=\"]=5(a,v){6\"/^\"+U(v)+\"/.q(\"+a+\")\"};9.K[\"$=\"]=5(a,v){6\"/\"+U(v)+\"$/.q(\"+a+\")\"};9.K[\"*=\"]=5(a,v){6\"/\"+U(v)+\"/.q(\"+a+\")\"};5 1s(e,a,t){18(a){A\"n\":6 M;A\"2x\":a=\"2n\";O;A\"2w\":a=\"2n+1\"}7 1p=1r(e.1q);5 1n(i){7 i=(t==J)?1p.x-i:i-1;6 1p[i]==e};8(!14(a))6 1n(a);a=a.1o(\"n\");7 m=1S(a[0]);7 s=1S(a[1]);8((14(m)||m==1)&&s==0)6 M;8(m==0&&!14(s))6 1n(s);8(14(s))s=0;7 c=1;H(e=t(e))c++;8(14(m)||m==1)6(t==J)?(c<=s):(s>=c);6(c%m)==s}});z.1c(\"1b-2v\",5(){Z=1a(\"P;/*@2u@8(@\\\\2t)Z=M@2s@*/\");8(!Z){13=5(e,t,n){6 n?e.2r(\"*\",t):e.13(t)};19=5(e,n){6!n||(n==\"*\")||(e.2q==n)};1m=1l.1R?5(e){6/2p/i.q(T(e).1R)}:5(e){6 T(e).1Q.1k!=\"2o\"};1j=5(e){6 e.2m||e.1P||1h(e)};5 1h(e){7 t=\"\",n,i;h(i=0;(n=e.1O[i]);i++){18(n.1i){A 11:A 1:t+=1h(n);O;A 3:t+=n.2l;O}}6 t}}});1g=M;6 z}();',62,201,'|||||function|return|var|if|AttributeSelector||||||||for||||pseudoClasses|||||test|||||||length|this|cssQuery|case|push||fr||selectors|replace|while||nextElementSibling|tests|APPLY|true||break|false|id|thisElement||getDocument|regEscape|slice||new|attributeSelectors|isMSIE|match||cache|getElementsByTagName|isNaN|child|getAttribute|String|switch|compareNamespace|eval|css|addModule|previousElementSibling|compareTagName|parseSelector|loaded|_0|nodeType|getTextContent|tagName|document|isXML|_1|split|ch|parentNode|childElements|nthChild|css2|disabled|firstElementChild|getText|RegExp|modules|Quote|PREFIX|lang|arguments|prototype|delete|aa|ap|apply|_2|else|all|links|version|se|childNodes|innerText|documentElement|contentType|parseInt|indeterminate|checked|last|nth|lastElementChild|level2|parse|_3|add|href|className|Function|create|Array|_4|_5|remove|toString|ST|select|null|_6|lastChild|firstChild|continue|join|caching|error|nodeValue|textContent||HTML|xml|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard|odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|name|first|do|default|Date|Number|typeof|lastIndex|index|exec|item|scopeName|toUpperCase|ownerDocument|Document|XML|mimeType|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try|beta'.split('|'),0,{}))\n\n\n/* ----- plone_javascript_variables.js ----- */\n\n// Global Plone variables that need to be accessible to the Javascripts\nvar portal_url = 'http://www.moveonnet.eu';\nvar form_modified_message = 'Your form has not been saved. All changes you have made will be lost.';\nvar form_resubmit_message = 'Your already clicked the submit button. Do you really want to submit this form again?';\n\n\n/* ----- nodeutilities.js ----- */\n\nfunction wrapNode(node, wrappertype, wrapperclass){\n /* utility function to wrap a node in an arbitrary element of type \"wrappertype\"\n * with a class of \"wrapperclass\" */\n var wrapper = document.createElement(wrappertype)\n wrapper.className = wrapperclass;\n var innerNode = node.parentNode.replaceChild(wrapper,node);\n wrapper.appendChild(innerNode);\n};\n\nfunction nodeContained(innernode, outernode){\n // check if innernode is contained in outernode\n var node = innernode.parentNode;\n while (node != document) {\n if (node == outernode) {\n return true; \n }\n node=node.parentNode;\n }\n return false;\n};\n\nfunction findContainer(node, func) {\n // Starting with the given node, find the nearest containing element\n // for which the given function returns true.\n\n while (node != null) {\n if (func(node)) {\n return node;\n }\n node = node.parentNode;\n }\n return false;\n};\n\nfunction hasClassName(node, class_name) {\n return new RegExp('\\\\b'+class_name+'\\\\b').test(node.className);\n};\n\nfunction addClassName(node, class_name) {\n if (!node.className) {\n node.className = class_name;\n } else if (!hasClassName(node, class_name)) {\n var className = node.className+\" \"+class_name;\n // cleanup\n node.className = className.split(/\\s+/).join(' ');\n }\n};\n\nfunction removeClassName(node, class_name) {\n var className = node.className;\n if (className) {\n // remove\n className = className.replace(new RegExp('\\\\b'+class_name+'\\\\b'), '');\n // cleanup\n className = className.replace(/\\s+/g, ' ');\n node.className = className.replace(/\\s+$/g, '');\n }\n};\n\nfunction replaceClassName(node, old_class, new_class, ignore_missing) {\n if (ignore_missing && !hasClassName(node, old_class)) {\n addClassName(node, new_class);\n } else {\n var className = node.className;\n if (className) {\n // replace\n className = className.replace(new RegExp('\\\\b'+old_class+'\\\\b'), new_class);\n // cleanup\n className = className.replace(/\\s+/g, ' ');\n node.className = className.replace(/\\s+$/g, '');\n }\n }\n};\n\nfunction walkTextNodes(node, func, data) {\n // traverse childnodes and call func when a textnode is found\n if (!node){return false}\n if (node.hasChildNodes) {\n // we can't use for (i in childNodes) here, because the number of\n // childNodes might change (higlightsearchterms)\n for (var i=0;i<node.childNodes.length;i++) {\n walkTextNodes(node.childNodes[i], func, data);\n }\n if (node.nodeType == 3) {\n // this is a text node\n func(node, data);\n }\n }\n};\n\n/* These are two functions, because getInnerTextFast doesn't always return the\n * the same results, as it depends on the implementation of node.innerText of\n * the browser. getInnerTextCompatible will always return the same values, but\n * is a bit slower. The difference is just in the whitespace, so if this\n * doesn't matter, you should always use getInnerTextFast.\n */\n\nfunction getInnerTextCompatible(node) {\n var result = new Array();\n walkTextNodes(node,\n function(n, d){d.push(n.nodeValue)},\n result);\n return result.join(\"\");\n};\n\nfunction getInnerTextFast(node) {\n if (node.innerText) {\n return node.innerText;\n } else {\n return getInnerTextCompatible(node);\n }\n};\n\n/* This function reorder nodes in the DOM.\n * fetch_func - the function which returns the value for comparison\n * cmp_func - the compare function, if not provided then the string of the\n * value returned by fetch_func is used.\n */\nfunction sortNodes(nodes, fetch_func, cmp_func) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n // wrapper for sorting\n var SortNodeWrapper = function(node) {\n this.value = fetch_func(node);\n this.cloned_node = node.cloneNode(true);\n this.toString = function() {\n if (this.value.toString) {\n return this.value.toString();\n } else {\n return this.value;\n }\n }\n }\n\n // wrap nodes\n var items = new Array();\n for (var i=0; i<nodes.length; i++) {\n items.push(new SortNodeWrapper(nodes[i]));\n }\n\n //sort\n if (cmp_func) {\n items.sort(cmp_func);\n } else {\n items.sort();\n }\n\n // reorder nodes\n for (var i=0; i<items.length; i++) {\n var dest = nodes[i];\n dest.parentNode.replaceChild(items[i].cloned_node, dest);\n }\n};\n\n\n/* ----- cookie_functions.js ----- */\nfunction createCookie(name,value,days) {\n if (days) {\n var date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n var expires = \"; expires=\"+date.toGMTString();\n } else {\n expires = \"\";\n }\n document.cookie = name+\"=\"+escape(value)+expires+\"; path=/;\";\n};\n\nfunction readCookie(name) {\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';');\n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') {\n c = c.substring(1,c.length);\n }\n if (c.indexOf(nameEQ) == 0) {\n return unescape(c.substring(nameEQ.length,c.length));\n }\n }\n return null;\n};\n\n\n/* ----- livesearch.js ----- */\n/*\n// +----------------------------------------------------------------------+\n// | Copyright (c) 2004 Bitflux GmbH |\n// +----------------------------------------------------------------------+\n// | Licensed under the Apache License, Version 2.0 (the \"License\"); |\n// | you may not use this file except in compliance with the License. |\n// | You may obtain a copy of the License at |\n// | http://www.apache.org/licenses/LICENSE-2.0 |\n// | Unless required by applicable law or agreed to in writing, software |\n// | distributed under the License is distributed on an \"AS IS\" BASIS, |\n// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |\n// | implied. See the License for the specific language governing |\n// | permissions and limitations under the License. |\n// +----------------------------------------------------------------------+\n// | Author: Bitflux GmbH <devel@bitflux.ch> |\n// +----------------------------------------------------------------------+\n\n*/\nvar liveSearchReq = false;\nvar t = null;\nvar liveSearchLast = \"\";\nvar queryTarget = \"livesearch_reply?q=\";\n\nvar searchForm = null;\nvar searchInput = null; \n\nvar isIE = false;\n\n\nvar _cache = new Object();\n\nvar widthOffset=1;\n\nfunction calculateWidth(){\n}\n\n\nfunction getElementDimensions(elemID) {\n var base = document.getElementById(elemID);\n var offsetTrail = base;\n var offsetLeft = 0;\n var offsetTop = 0;\n var width = 0;\n \n while (offsetTrail) {\n offsetLeft += offsetTrail.offsetLeft;\n offsetTop += offsetTrail.offsetTop;\n offsetTrail = offsetTrail.offsetParent;\n }\n if (navigator.userAgent.indexOf(\"Mac\") != -1 &&\n typeof document.body.leftMargin != \"undefined\") {\n offsetLeft += document.body.leftMargin;\n offsetTop += document.body.topMargin;\n }\n\n if(!isIE){\n width = searchInput.offsetWidth-widthOffset*2;\n }\n else {\n width = searchInput.offsetWidth;\n }\n\n return { left:offsetLeft, \n top:offsetTop, \n width: width, \n height: base.offsetHeight,\n bottom: offsetTop + base.offsetHeight, \n right : offsetLeft + width};\n}\n\nfunction liveSearchInit() {\n searchInput = document.getElementById('searchGadget');\n if (searchInput == null || searchInput == undefined) return\n// Only keypress catches repeats in moz/FF but keydown is needed for\n// khtml based browsers.\n if (navigator.userAgent.indexOf(\"KHTML\") > 0) {\n searchInput.addEventListener(\"keydown\",liveSearchKeyPress,false);\n searchInput.addEventListener(\"focus\",liveSearchDoSearch,false);\n searchInput.addEventListener(\"keydown\",liveSearchStart, false);\n } else if (searchInput.addEventListener) {\n searchInput.addEventListener(\"keypress\",liveSearchKeyPress,false);\n searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false);\n searchInput.addEventListener(\"keypress\",liveSearchStart, false);\n } else {\n searchInput.attachEvent(\"onkeydown\",liveSearchKeyPress);\n searchInput.attachEvent(\"onkeydown\",liveSearchStart);\n// searchInput.attachEvent(\"onblur\",liveSearchHide);\n isIE = true;\n }\n\n// Why doesn't this work in konq, setting it inline does.\n searchInput.setAttribute(\"autocomplete\",\"off\");\n\n var pos = getElementDimensions('searchGadget'); \n result = document.getElementById('LSResult');\n pos.left = pos.left - result.offsetParent.offsetLeft + pos.width;\n result.style.display='none';\n}\n\n\nfunction liveSearchHideDelayed() {\n window.setTimeout(\"liveSearchHide()\",400);\n}\n \nfunction liveSearchHide() { \n document.getElementById(\"LSResult\").style.display = \"none\";\n var highlight = document.getElementById(\"LSHighlight\");\n if (highlight) {\n highlight.removeAttribute(\"id\");\n }\n}\n\nfunction getFirstHighlight() {\n var set = getHits();\n return set[0];\n}\n\nfunction getLastHighlight() {\n var set = getHits();\n return set[set.length-1];\n}\n\nfunction getHits() {\n var res = document.getElementById(\"LSShadow\");\n var set = res.getElementsByTagName('li');\n return set\n}\n\nfunction findChild(object, specifier) {\n var cur = object.firstChild;\n try {\n while (cur != undefined) {\n cur = cur.nextSibling;\n if (specifier(cur) == true) return cur;\n }\n } catch(e) {};\n return null;\n \n}\n\nfunction findNext(object, specifier) {\n var cur = object;\n try {\n while (cur != undefined) {\n\n cur = cur.nextSibling;\n if (cur.nodeType==3) cur=cur.nextSibling;\n \n if (cur != undefined) {\n if (specifier(cur) == true) return cur;\n } else { break }\n }\n } catch(e) {};\n return null;\n}\n\nfunction findPrev(object, specifier) {\n var cur = object;\n try {\n cur = cur.previousSibling;\n if (cur.nodeType==3) cur=cur.previousSibling;\n if (cur!=undefined) {\n if (specifier(cur) == true) \n return cur;\n } \n } catch(e) {};\n return null;\n}\n\n\nfunction liveSearchKeyPress(event) {\n if (event.keyCode == 40 )\n //KEY DOWN\n {\n highlight = document.getElementById(\"LSHighlight\");\n if (!highlight) {\n highlight = getFirstHighlight();\n } else {\n highlight.removeAttribute(\"id\");\n highlight = findNext(highlight, function (o) {return o.className ==\"LSRow\";});\n\n }\n if (highlight) {\n highlight.setAttribute(\"id\",\"LSHighlight\");\n } \n if (!isIE) { event.preventDefault(); }\n } \n //KEY UP\n else if (event.keyCode == 38 ) {\n highlight = document.getElementById(\"LSHighlight\");\n if (!highlight) {\n highlight = getLastHighlight();\n } \n else {\n highlight.removeAttribute(\"id\");\n highlight = findPrev(highlight, function (o) {return o.className=='LSRow';});\n }\n if (highlight) {\n highlight.setAttribute(\"id\",\"LSHighlight\");\n }\n if (!isIE) { event.preventDefault(); }\n } \n //ESC\n else if (event.keyCode == 27) {\n highlight = document.getElementById(\"LSHighlight\");\n if (highlight) {\n highlight.removeAttribute(\"id\");\n }\n document.getElementById(\"LSResult\").style.display = \"none\";\n } \n}\nfunction liveSearchStart(event) {\n if (t) {\n window.clearTimeout(t);\n }\n code = event.keyCode;\n if (code!=40 && code!=38 && code!=27 && code!=37 && code!=39) {\n t = window.setTimeout(\"liveSearchDoSearch()\",200);\n } \n}\n\nfunction liveSearchDoSearch() {\n\n if (typeof liveSearchRoot == \"undefined\") {\n liveSearchRoot = \"\";\n }\n if (typeof liveSearchRootSubDir == \"undefined\") {\n liveSearchRootSubDir = \"\";\n }\n\n if (liveSearchLast != searchInput.value) {\n if (liveSearchReq && liveSearchReq.readyState < 4) {\n liveSearchReq.abort();\n }\n if ( searchInput.value == \"\") {\n liveSearchHide();\n return false;\n }\n\n // Do nothing as long as we have less then two characters - \n // the search results makes no sense, and it's harder on the server.\n if ( searchInput.value.length < 2) {\n liveSearchHide();\n return false;\n }\n\n // Do we have cached results\n var result = _cache[searchInput.value];\n if (result) {\n showResult(result); \n return;\n }\n liveSearchReq = new XMLHttpRequest();\n liveSearchReq.onreadystatechange= liveSearchProcessReqChange;\n liveSearchReq.open(\"GET\", liveSearchRoot + queryTarget + encodeURI(searchInput.value) );\n liveSearchLast = searchInput.value;\n liveSearchReq.send(null);\n }\n}\n\nfunction showResult(result) {\n var res = document.getElementById(\"LSResult\");\n res.style.display = \"block\";\n var sh = document.getElementById(\"LSShadow\");\n sh.innerHTML = result;\n}\n\nfunction liveSearchProcessReqChange() {\n if (liveSearchReq.readyState == 4) {\n if (liveSearchReq.status > 299 || liveSearchReq.status < 200 ||\n liveSearchReq.responseText.length < 10) return; \n showResult(liveSearchReq.responseText);\n _cache[liveSearchLast] = liveSearchReq.responseText;\n }\n}\n\nfunction liveSearchSubmit() {\n var highlight = document.getElementById(\"LSHighlight\");\n \n if (highlight){\n target = highlight.getElementsByTagName('a')[0];\n window.location = liveSearchRoot + liveSearchRootSubDir + target;\n return false;\n } \n else {\n return true;\n }\n}\n\n\n\nif (window.addEventListener) window.addEventListener(\"load\",liveSearchInit,false);\nelse if (window.attachEvent) window.attachEvent(\"onload\", liveSearchInit);\n\n\n\n/* ----- fullscreenmode.js ----- */\nfunction toggleFullScreenMode() {\n var body = cssQuery('body')[0];\n\n if (hasClassName(body, 'fullscreen')) {\n // unset cookie\n removeClassName(body, 'fullscreen');\n createCookie('fullscreenMode', '');\n } else {\n // set cookie\n addClassName(body, 'fullscreen');\n createCookie('fullscreenMode', '1');\n }\n};\n\nfunction fullscreenModeLoad() {\n // based on cookie\n if (readCookie('fullscreenMode') == '1') {\n var body = cssQuery('body')[0];\n addClassName(body, 'fullscreen');\n }\n};\nregisterPloneFunction(fullscreenModeLoad)\n\n\n/* ----- select_all.js ----- */\n// Functions for selecting all checkboxes in folder_contents/search_form view\nfunction selectAll(id, formName) {\n // Get the elements. if formName is provided, get the elements inside the form\n if (formName==null) {\n checkboxes = document.getElementsByName(id)\n for (i = 0; i < checkboxes.length; i++){\n checkboxes[i].checked = true ;\n }\n } else {\n for (i=0; i<document.forms[formName].elements.length;i++){\n if (document.forms[formName].elements[i].name==id){\n document.forms[formName].elements[i].checked=true; \n }\n }\n }\n }\nfunction deselectAll(id, formName) {\n if (formName==null) {\n checkboxes = document.getElementsByName(id)\n for (i = 0; i < checkboxes.length; i++){\n checkboxes[i].checked = false ;}\n } else {\n for (i=0; i<document.forms[formName].elements.length;i++){\n if (document.forms[formName].elements[i].name==id){\n document.forms[formName].elements[i].checked=false;\n }\n }\n }\n }\nfunction toggleSelect(selectbutton, id, initialState, formName) {\n /* required selectbutton: you can pass any object that will function as a toggle\n * optional id: id of the the group of checkboxes that needs to be toggled (default=ids:list\n * optional initialState: initial state of the group. (default=false)\n * e.g. folder_contents is false, search_form=true because the item boxes\n * are checked initially.\n * optional formName: name of the form in which the boxes reside, use this if there are more\n * forms on the page with boxes with the same name\n */\n id=id || 'ids:list' // defaults to ids:list, this is the most common usage\n\n if (selectbutton.isSelected==null){\n initialState=initialState || false;\n selectbutton.isSelected=initialState;\n }\n /* create and use a property on the button itself so you don't have to \n * use a global variable and we can have as much groups on a page as we like.\n */\n if (selectbutton.isSelected == false) {\n selectbutton.setAttribute('src', portal_url + '/select_none_icon.gif');\n selectbutton.isSelected=true;\n return selectAll(id, formName);\n } else {\n selectbutton.setAttribute('src',portal_url + '/select_all_icon.gif');\n selectbutton.isSelected=false;\n return deselectAll(id, formName);\n }\n } \n\n/* ----- dropdown.js ----- */\n/*\n * This is the code for the dropdown menus. It uses the following markup:\n *\n * <dl class=\"actionMenu\" id=\"uniqueIdForThisMenu\">\n * <dt class=\"actionMenuHeader\">\n * <!-- The following a-tag needs to be clicked to dropdown the menu -->\n * <a href=\"some_destination\">A Title</a>\n * </dt>\n * <dd class=\"actionMenuContent\">\n * <!-- Here can be any content you want -->\n * </dd>\n * </dl>\n *\n * When the menu is toggled, then the dl with the class actionMenu will get an\n * additional class which switches between 'activated' and 'deactivated'.\n * You can use this to style it accordingly, for example:\n *\n * .actionMenu.activated {\n * display: block;\n * }\n *\n * .actionMenu.deactivated {\n * display: none;\n * }\n *\n * When you click somewhere else than the menu, then all open menus will be\n * deactivated. When you move your mouse over the a-tag of another menu, then\n * that one will be activated and all others deactivated. When you click on a\n * link inside the actionMenuContent element, then the menu will be closed and\n * the link followed.\n *\n * This file uses functions from register_function.js, cssQuery.js and\n * nodeutils.js.\n *\n */\n\nfunction isActionMenu(node) {\n if (hasClassName(node, 'actionMenu')) {\n return true;\n }\n return false;\n};\n\nfunction hideAllMenus() {\n var menus = cssQuery('dl.actionMenu');\n for (var i=0; i < menus.length; i++) {\n replaceClassName(menus[i], 'activated', 'deactivated', true);\n }\n};\n\nfunction toggleMenuHandler(event) {\n if (!event) var event = window.event; // IE compatibility\n\n // terminate if we hit a non-compliant DOM implementation\n // returning true, so the link is still followed\n if (!W3CDOM){return true;}\n\n var container = findContainer(this, isActionMenu);\n if (!container) {\n return true;\n }\n\n // check if the menu is visible\n if (hasClassName(container, 'activated')) {\n // it's visible - hide it\n replaceClassName(container, 'activated', 'deactivated', true);\n } else {\n // it's invisible - make it visible\n replaceClassName(container, 'deactivated', 'activated', true);\n }\n\n return false;\n};\n\nfunction hideMenusHandler(event) {\n if (!event) var event = window.event; // IE compatibility\n\n hideAllMenus();\n\n // we want to follow this link\n return true;\n};\n\nfunction actionMenuDocumentMouseDown(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (event.target)\n targ = event.target;\n else if (event.srcElement)\n targ = event.srcElement;\n\n var container = findContainer(targ, isActionMenu);\n if (container) {\n // targ is part of the menu, so just return and do the default\n return true;\n }\n\n hideAllMenus();\n\n return true;\n};\n\nfunction actionMenuMouseOver(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (!this.tagName && (this.tagName == 'A' || this.tagName == 'a')) {\n return true;\n }\n\n var container = findContainer(this, isActionMenu);\n if (!container) {\n return true;\n }\n var menu_id = container.id;\n\n var switch_menu = false;\n // hide all menus\n var menus = cssQuery('dl.actionMenu');\n for (var i=0; i < menus.length; i++) {\n var menu = menus[i]\n // check if the menu is visible\n if (hasClassName(menu, 'activated')) {\n switch_menu = true;\n }\n // turn off menu when it's not the current one\n if (menu.id != menu_id) {\n replaceClassName(menu, 'activated', 'deactivated', true);\n }\n }\n\n if (switch_menu) {\n var menu = cssQuery('#'+menu_id)[0];\n if (menu) {\n replaceClassName(menu, 'deactivated', 'activated', true);\n }\n }\n\n return true;\n};\n\nfunction initializeMenus() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM) {return false;}\n\n document.onmousedown = actionMenuDocumentMouseDown;\n\n hideAllMenus();\n\n // add toggle function to header links\n var menu_headers = cssQuery('dl.actionMenu > dt.actionMenuHeader > a');\n for (var i=0; i < menu_headers.length; i++) {\n var menu_header = menu_headers[i];\n\n menu_header.onclick = toggleMenuHandler;\n menu_header.onmouseover = actionMenuMouseOver;\n }\n\n // add hide function to all links in the dropdown, so the dropdown closes\n // when any link is clicked\n var menu_contents = cssQuery('dl.actionMenu > dd.actionMenuContent');\n for (var i=0; i < menu_contents.length; i++) {\n menu_contents[i].onclick = hideMenusHandler;\n }\n\n // uncomment to enable sorting of elements\n //var nodes = cssQuery('#objectMenu > dd.actionMenuContent li');\n //sortNodes(nodes, getInnerTextFast);\n};\n\nregisterPloneFunction(initializeMenus);\n\n\n/* ----- mark_special_links.js ----- */\n/* Scan all links in the document and set classes on them if\n * they point outside the site, or are special protocols\n * To disable this effect for links on a one-by-one-basis,\n * give them a class of 'link-plain'\n */\n\nfunction scanforlinks() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM) { return false; }\n\n contentarea = getContentArea();\n if (!contentarea) { return false; }\n\n links = contentarea.getElementsByTagName('a');\n for (i=0; i < links.length; i++) {\n if ( (links[i].getAttribute('href'))\n && (links[i].className.indexOf('link-plain')==-1) ) {\n var linkval = links[i].getAttribute('href');\n\n // check if the link href is a relative link, or an absolute link to\n // the current host.\n if (linkval.toLowerCase().indexOf(window.location.protocol\n + '//'\n + window.location.host)==0) {\n // absolute link internal to our host - do nothing\n } else if (linkval.indexOf('http:') != 0) {\n // not a http-link. Possibly an internal relative link, but also\n // possibly a mailto or other protocol add tests for relevant\n // protocols as you like.\n protocols = ['mailto', 'ftp', 'news', 'irc', 'h323', 'sip',\n 'callto', 'https', 'feed', 'webcal'];\n // h323, sip and callto are internet telephony VoIP protocols\n for (p=0; p < protocols.length; p++) {\n if (linkval.indexOf(protocols[p]+':') == 0) {\n // if the link matches one of the listed protocols, add\n // className = link-protocol\n wrapNode(links[i], 'span', 'link-'+protocols[p]);\n break;\n }\n }\n } else {\n // we are in here if the link points to somewhere else than our\n // site.\n if ( links[i].getElementsByTagName('img').length == 0 ) {\n // we do not want to mess with those links that already have\n // images in them\n wrapNode(links[i], 'span', 'link-external');\n // uncomment the next line if you want external links to be\n // opened in a new window.\n links[i].setAttribute('target', '_blank');\n }\n }\n }\n }\n};\n\nregisterPloneFunction(scanforlinks);\n\n\n/* ----- collapsiblesections.js ----- */\n/*\n * This is the code for the collapsibles. It uses the following markup:\n *\n * <dl class=\"collapsible\">\n * <dt class=\"collapsibleHeader\">\n * A Title\n * </dt>\n * <dd class=\"collapsibleContent\">\n * <!-- Here can be any content you want -->\n * </dd>\n * </dl>\n *\n * When the collapsible is toggled, then the dl will get an additional class\n * which switches between 'collapsedBlockCollapsible' and\n * 'expandedBlockCollapsible'. You can use this to style it accordingly, for\n * example:\n *\n * .expandedBlockCollapsible .collapsibleContent {\n * display: block;\n * }\n *\n * .collapsedBlockCollapsible .collapsibleContent {\n * display: none;\n * }\n *\n * If you add the 'collapsedOnLoad' class to the dl, then it will get\n * collapsed on page load, this is done, so the content is accessible even when\n * javascript is disabled.\n *\n * If you add the 'inline' class to the dl, then it will toggle between\n * 'collapsedInlineCollapsible' and 'expandedInlineCollapsible' instead of\n * 'collapsedBlockCollapsible' and 'expandedBlockCollapsible'.\n *\n * This file uses functions from register_function.js, cssQuery.js and\n * nodeutils.js.\n *\n */\n\nfunction isCollapsible(node) {\n if (hasClassName(node, 'collapsible')) {\n return true;\n }\n return false;\n};\n\nfunction toggleCollapsible(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (!this.tagName && (this.tagName == 'DT' || this.tagName == 'dt')) {\n return true;\n }\n\n var container = findContainer(this, isCollapsible);\n if (!container) {\n return true;\n }\n\n if (hasClassName(container, 'collapsedBlockCollapsible')) {\n replaceClassName(container, 'collapsedBlockCollapsible', 'expandedBlockCollapsible');\n } else if (hasClassName(container, 'expandedBlockCollapsible')) {\n replaceClassName(container, 'expandedBlockCollapsible', 'collapsedBlockCollapsible');\n } else if (hasClassName(container, 'collapsedInlineCollapsible')) {\n replaceClassName(container, 'collapsedInlineCollapsible', 'expandedInlineCollapsible');\n } else if (hasClassName(container, 'expandedInlineCollapsible')) {\n replaceClassName(container, 'expandedInlineCollapsible', 'collapsedInlineCollapsible');\n }\n};\n\nfunction activateCollapsibles() {\n if (!W3CDOM) {return false;}\n\n var collapsibles = cssQuery('dl.collapsible');\n for (var i=0; i < collapsibles.length; i++) {\n var collapsible = collapsibles[i];\n\n var collapsible_header = cssQuery('dt.collapsibleHeader', collapsible)[0];\n collapsible_header.onclick = toggleCollapsible;\n\n if (hasClassName(collapsible, 'inline')) {\n // the collapsible should be inline\n if (hasClassName(collapsible, 'collapsedOnLoad')) {\n replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedInlineCollapsible');\n } else {\n addClassName(collapsible, 'expandedInlineCollapsible');\n }\n } else {\n // the collapsible is a block\n if (hasClassName(collapsible, 'collapsedOnLoad')) {\n replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedBlockCollapsible');\n } else {\n addClassName(collapsible, 'expandedBlockCollapsible');\n }\n }\n }\n};\n\nregisterPloneFunction(activateCollapsibles);\n\n\n/* ----- highlightsearchterms.js ----- */\nfunction highlightTermInNode(node, word) {\n var contents = node.nodeValue;\n var index = contents.toLowerCase().indexOf(word.toLowerCase());\n if (index < 0){return false};\n\n var parent = node.parentNode;\n if (parent.className != \"highlightedSearchTerm\") {\n // make 3 shiny new nodes\n var hiword = document.createElement(\"span\");\n hiword.className = \"highlightedSearchTerm\";\n hiword.appendChild(document.createTextNode(contents.substr(index, word.length)));\n parent.insertBefore(document.createTextNode(contents.substr(0, index)), node);\n parent.insertBefore(hiword, node);\n parent.insertBefore(document.createTextNode(contents.substr(index+word.length)), node);\n parent.removeChild(node);\n }\n}\n\nfunction highlightSearchTerms(terms, startnode) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n if (!terms){return false};\n if (!startnode){return false};\n\n for (var term_index=0; term_index < terms.length; term_index++) {\n // don't highlight reserved catalog search terms\n var term = terms[term_index];\n var term_lower = term.toLowerCase();\n if (term_lower != 'not'\n && term_lower != 'and'\n && term_lower != 'or') {\n walkTextNodes(startnode, highlightTermInNode, term);\n }\n }\n}\n\nfunction getSearchTermsFromURI(uri) {\n var query;\n if (typeof decodeURI != 'undefined') {\n query = decodeURI(uri);\n } else if (typeof unescape != 'undefined') {\n // _robert_ ie 5 does not have decodeURI \n query = unescape(uri);\n } else {\n // we just try to be lucky, for single words this will still work\n }\n var result = new Array();\n if (window.decodeReferrer) {\n var referrerSearch = decodeReferrer();\n if (null != referrerSearch && referrerSearch.length > 0) {\n result = referrerSearch;\n }\n }\n var qfinder = new RegExp(\"searchterm=([^&]*)\", \"gi\");\n var qq = qfinder.exec(query);\n if (qq && qq[1]) {\n var terms = qq[1].replace(/\\+/g,' ').split(/\\s+/);\n for (var i=0; i < terms.length; i++) {\n if (terms[i] != '') {\n result.push(terms[i]);\n }\n }\n return result;\n }\n return result.length == 0 ? false : result;\n}\n\nfunction highlightSearchTermsFromURI() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n // search-term-highlighter function -- Geir B\u00c3\u00a6kholt\n var terms = getSearchTermsFromURI(window.location.search);\n // make sure we start the right place so we don't higlight menuitems or breadcrumb\n var contentarea = getContentArea();\n highlightSearchTerms(terms, contentarea);\n}\n\nregisterPloneFunction(highlightSearchTermsFromURI);\n\n\n/* ----- se-highlight.js ----- */\n/* List of search engine matchers and the referrer search\n * code where carefully borrowed from the\n * \"Search Engine Keyword Highlight\" by Scott Yang,\n * see http://fucoder.com/code/se-hilite/ for further\n * details.\n */\nvar searchEngines = [\n ['^http://(www)?\\\\.?google.*', 'q='], // Google\n ['^http://search\\\\.yahoo.*', 'p='], // Yahoo\n ['^http://search\\\\.msn.*', 'q='], // MSN\n ['^http://search\\\\.aol.*', 'userQuery='], // AOL\n ['^http://(www\\\\.)?altavista.*', 'q='], // AltaVista\n ['^http://(www\\\\.)?feedster.*', 'q='], // Feedster\n ['^http://search\\\\.lycos.*', 'query='], // Lycos\n ['^http://(www\\\\.)?alltheweb.*', 'q='] // AllTheWeb\n]\n\nfunction decodeReferrer(ref) {\n // checks if we are beeing searched by a search engine\n if (null == ref && document.referrer) {\n ref = document.referrer;\n }\n if (!ref) return null;\n\n var match = new RegExp('');\n var seQuery = '';\n for (var i = 0; i < searchEngines.length; i ++) {\n match.compile(searchEngines[i][0], 'i');\n if (ref.match(match)) {\n match.compile('^.*'+searchEngines[i][1]+'([^&]+)&?.*$');\n seQuery = ref.replace(match, '$1');\n if (seQuery) {\n seQuery = decodeURIComponent(seQuery);\n seQuery = seQuery.replace(/\\'|\"/, '');\n return seQuery.split(/[\\s,\\+\\.]+/);\n }\n\n }\n }\n return null;\n}\n\n\n/* ----- first_input_focus.js ----- */\n// Focus on error \nfunction setFocus(){\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var xre = new RegExp(/\\berror\\b/);\n // Search only forms to avoid spending time on regular text\n for (var f = 0; (formnode = document.getElementsByTagName('form').item(f)); f++){\n // Search for errors first, focus on first error if found\n for (var i = 0; (node = formnode.getElementsByTagName('div').item(i)); i++) {\n if (xre.exec(node.className)){\n for (var j = 0; (inputnode = node.getElementsByTagName('input').item(j)); j++) {\n try {\n if (inputnode.focus) { // check availability first\n inputnode.focus();\n return;\n }\n } catch(e) {\n // try next one, this can happen with a hidden or\n // invisible input field\n }\n }\n }\n }\n }\n}\nregisterPloneFunction(setFocus)\n\n\n/* ----- folder_contents_filter.js ----- */\n// Actions used in the folder_contents view\nfunction submitFolderAction(folderAction) {\n document.folderContentsForm.action = document.folderContentsForm.action+'/'+folderAction;\n document.folderContentsForm.submit();\n}\n\nfunction submitFilterAction() {\n document.folderContentsForm.action = document.folderContentsForm.action+'/folder_contents';\n filter_selection=document.getElementById('filter_selection');\n for (var i =0; i < filter_selection.length; i++){\n if (filter_selection.options[i].selected) {\n if (filter_selection.options[i].value=='#') {\n document.folderContentsForm.filter_state.value='clear_view_filter';\n }\n else {\n document.folderContentsForm.filter_state.value='set_view_filter';\n }\n }\n }\n document.folderContentsForm.submit();\n}\n\n\n\n/* ----- folder_contents_hideAddItems.js ----- */\n// function to hide the traditional add items pull down menu.\n\nfunction hideTraditionalAddItemPullDown() {\n // Get the old style Add Item pulldown. We already have\n // such a menu. This is only for system that don't have javascript\n // so we can savely remove it.\n pullDown = document.getElementById('traditional-add-item-pulldown');\n if (pullDown) { \n pullDown.style.display='none';\n }\n}\n\nregisterPloneFunction(hideTraditionalAddItemPullDown)\n\n/* ----- styleswitcher.js ----- */\n// StyleSwitcher functions written by Paul Sowden\nfunction setActiveStyleSheet(title, reset) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var i, a, main;\n for(i=0; (a = document.getElementsByTagName(\"link\")[i]); i++) {\n if (a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")) {\n a.disabled = true;\n if (a.getAttribute(\"title\") == title) {\n a.disabled = false;\n }\n }\n }\n if (reset == 1) {\n createCookie(\"wstyle\", title, 365);\n }\n};\n\nfunction setStyle() {\n var style = readCookie(\"wstyle\");\n if (style != null) {\n setActiveStyleSheet(style, 0);\n }\n};\nregisterPloneFunction(setStyle);\n\n\n\n\n/* ----- table_sorter.js ----- */\n\n/********* Table sorter script *************/\n// Table sorter script, thanks to Geir B\u00c3\u00a6kholt for this.\n// DOM table sorter originally made by Paul Sowden \n\nfunction compare(a,b)\n{\n au = new String(a);\n bu = new String(b);\n\n if (au.charAt(4) != '-' && au.charAt(7) != '-')\n {\n var an = parseFloat(au)\n var bn = parseFloat(bu)\n }\n if (isNaN(an) || isNaN(bn))\n {as = au.toLowerCase()\n bs = bu.toLowerCase()\n if (as > bs)\n {return 1;}\n else\n {return -1;}\n }\n else {\n return an - bn;\n }\n}\nfunction getConcatenedTextContent(node) {\n var _result = \"\";\n if (node == null) {\n return _result;\n }\n var childrens = node.childNodes;\n var i = 0;\n while (i < childrens.length) {\n var child = childrens.item(i);\n switch (child.nodeType) {\n case 1: // ELEMENT_NODE\n case 5: // ENTITY_REFERENCE_NODE\n _result += getConcatenedTextContent(child);\n break;\n case 3: // TEXT_NODE\n case 2: // ATTRIBUTE_NODE\n case 4: // CDATA_SECTION_NODE\n _result += child.nodeValue;\n break;\n case 6: // ENTITY_NODE\n case 7: // PROCESSING_INSTRUCTION_NODE\n case 8: // COMMENT_NODE\n case 9: // DOCUMENT_NODE\n case 10: // DOCUMENT_TYPE_NODE\n case 11: // DOCUMENT_FRAGMENT_NODE\n case 12: // NOTATION_NODE\n // skip\n break;\n }\n i ++;\n }\n return _result;\n}\n\nfunction sort(e) {\n var el = window.event ? window.event.srcElement : e.currentTarget;\n\n // a pretty ugly sort function, but it works nonetheless\n var a = new Array();\n // check if the image or the th is clicked. Proceed to parent id it is the image\n // NOTE THAT nodeName IS UPPERCASE\n if (el.nodeName == 'IMG') el = el.parentNode;\n //var name = el.firstChild.nodeValue;\n // This is not very robust, it assumes there is an image as first node then text\n var name = el.childNodes.item(1).nodeValue;\n var dad = el.parentNode;\n var node;\n \n // kill all arrows\n for (var im = 0; (node = dad.getElementsByTagName(\"th\").item(im)); im++) {\n // NOTE THAT nodeName IS IN UPPERCASE\n if (node.lastChild.nodeName == 'IMG')\n {\n lastindex = node.getElementsByTagName('img').length - 1;\n node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url + '/arrowBlank.gif');\n }\n }\n \n for (var i = 0; (node = dad.getElementsByTagName(\"th\").item(i)); i++) {\n var xre = new RegExp(/\\bnosort\\b/);\n // Make sure we are not messing with nosortable columns, then check second node.\n if (!xre.exec(node.className) && node.childNodes.item(1).nodeValue == name) \n {\n //window.alert(node.childNodes.item(1).nodeValue;\n lastindex = node.getElementsByTagName('img').length -1;\n node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url + '/arrowUp.gif');\n break;\n }\n }\n\n var tbody = dad.parentNode.parentNode.getElementsByTagName(\"tbody\").item(0);\n for (var j = 0; (node = tbody.getElementsByTagName(\"tr\").item(j)); j++) {\n\n // crude way to sort by surname and name after first choice\n a[j] = new Array();\n a[j][0] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(i));\n a[j][1] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(1));\n a[j][2] = getConcatenedTextContent(node.getElementsByTagName(\"td\").item(0)); \n a[j][3] = node;\n }\n\n if (a.length > 1) {\n \n a.sort(compare);\n\n // not a perfect way to check, but hell, it suits me fine\n if (a[0][0] == getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(0).getElementsByTagName(\"td\").item(i))\n && a[1][0] == getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(1).getElementsByTagName(\"td\").item(i))) \n {\n a.reverse();\n lastindex = el.getElementsByTagName('img').length - 1;\n el.getElementsByTagName('img').item(lastindex).setAttribute('src', portal_url + '/arrowDown.gif');\n }\n\n }\n \n for (var j = 0; j < a.length; j++) {\n tbody.appendChild(a[j][3]);\n }\n}\n \nfunction initalizeTableSort(e) {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var tbls = document.getElementsByTagName('table');\n for (var t = 0; t < tbls.length; t++)\n {\n // elements of class=\"listing\" can be sorted\n var re = new RegExp(/\\blisting\\b/)\n // elements of class=\"nosort\" should not be sorted\n var xre = new RegExp(/\\bnosort\\b/)\n if (re.exec(tbls[t].className) && !xre.exec(tbls[t].className))\n {\n try {\n var thead = tbls[t].getElementsByTagName(\"thead\").item(0);\n var node;\n // set up blank spaceholder gifs\n blankarrow = document.createElement('img');\n blankarrow.setAttribute('src', portal_url + '/arrowBlank.gif');\n blankarrow.setAttribute('height',6);\n blankarrow.setAttribute('width',9);\n // the first sortable column should get an arrow initially.\n initialsort = false;\n for (var i = 0; (node = thead.getElementsByTagName(\"th\").item(i)); i++) {\n // check that the columns does not have class=\"nosort\"\n if (!xre.exec(node.className)) {\n node.insertBefore(blankarrow.cloneNode(1), node.firstChild);\n node.style.cursor = 'pointer';\n if (!initialsort) {\n initialsort = true;\n uparrow = document.createElement('img');\n uparrow.setAttribute('src', portal_url + '/arrowUp.gif');\n uparrow.setAttribute('height',6);\n uparrow.setAttribute('width',9);\n node.appendChild(uparrow);\n } else {\n node.appendChild(blankarrow.cloneNode(1));\n }\n \n if (node.addEventListener) node.addEventListener(\"click\",sort,false);\n else if (node.attachEvent) node.attachEvent(\"onclick\",sort);\n }\n }\n } catch(er) {}\n }\n }\n} \n// **** End table sort script ***\nregisterPloneFunction(initalizeTableSort) \n\n\n\n/* ----- calendar_formfield.js ----- */\n// jscalendar glue -- Leonard Norrg\u00c3\u00a5rd <vinsci@*>\n// This function gets called when the user clicks on some date.\nfunction onJsCalendarDateUpdate(cal) {\n var year = cal.params.input_id_year;\n var month = cal.params.input_id_month;\n var day = cal.params.input_id_day;\n // var hour = cal.params.input_id_hour;\n // var minute = cal.params.input_id_minute;\n\n // cal.params.inputField.value = cal.date.print('%Y/%m/%d %H:%M'); // doesn't work in Opera, don't use time now\n //cal.params.inputField.value = cal.date.print('%Y/%m/%d'); // doesn't work in Opera\n var daystr = '' + cal.date.getDate();\n if (daystr.length == 1)\n \tdaystr = '0' + daystr;\n var monthstr = '' + (cal.date.getMonth()+1);\n if (monthstr.length == 1)\n\tmonthstr = '0' + monthstr;\n cal.params.inputField.value = '' + cal.date.getFullYear() + '/' + monthstr + '/' + daystr\n\n year.value = cal.params.inputField.value.substring(0,4);\n month.value = cal.params.inputField.value.substring(5,7);\n day.value = cal.params.inputField.value.substring(8,10);\n // hour.value = cal.params.inputField.value.substring(11,13);\n // minute.value= cal.params.inputField.value.substring(14,16);\n}\n\n\nfunction showJsCalendar(input_id_anchor, input_id, input_id_year, input_id_month, input_id_day, input_id_hour, input_id_minute, yearStart, yearEnd) {\n // do what jscalendar-x.y.z/calendar-setup.js:Calendar.setup would do\n var input_id_anchor = document.getElementById(input_id_anchor);\n var input_id = document.getElementById(input_id);\n var input_id_year = document.getElementById(input_id_year);\n var input_id_month = document.getElementById(input_id_month);\n var input_id_day = document.getElementById(input_id_day);\n // var input_id_hour = document.getElementById(input_id_hour);\n // var input_id_minute = document.getElementById(input_id_minute);\n var format = 'y/mm/dd';\n\n var dateEl = input_id;\n var mustCreate = false;\n var cal = window.calendar;\n\n var params = {\n 'range' : [yearStart, yearEnd],\n inputField : input_id,\n input_id_year : input_id_year,\n input_id_month: input_id_month,\n input_id_day : input_id_day\n // input_id_hour : input_id_hour,\n // input_id_minute: input_id_minute\n };\n\n function param_default(pname, def) { if (typeof params[pname] == \"undefined\") { params[pname] = def; } };\n\n param_default(\"inputField\", null);\n param_default(\"displayArea\", null);\n param_default(\"button\", null);\n param_default(\"eventName\", \"click\");\n param_default(\"ifFormat\", \"%Y/%m/%d\");\n param_default(\"daFormat\", \"%Y/%m/%d\");\n param_default(\"singleClick\", true);\n param_default(\"disableFunc\", null);\n param_default(\"dateStatusFunc\", params[\"disableFunc\"]); // takes precedence if both are defined\n param_default(\"dateText\", null);\n param_default(\"firstDay\", 1);\n param_default(\"align\", \"Bl\");\n param_default(\"range\", [1900, 2999]);\n param_default(\"weekNumbers\", true);\n param_default(\"flat\", null);\n param_default(\"flatCallback\", null);\n param_default(\"onSelect\", null);\n param_default(\"onClose\", null);\n param_default(\"onUpdate\", null);\n param_default(\"date\", null);\n param_default(\"showsTime\", false);\n param_default(\"timeFormat\", \"24\");\n param_default(\"electric\", true);\n param_default(\"step\", 2);\n param_default(\"position\", null);\n param_default(\"cache\", false);\n param_default(\"showOthers\", false);\n param_default(\"multiple\", null);\n\n if (!(cal && params.cache)) {\n\twindow.calendar = cal = new Calendar(params.firstDay,\n\t null,\n\t onJsCalendarDateUpdate,\n\t function(cal) { cal.hide(); });\n\tcal.time24 = true;\n\tcal.weekNumbers = true;\n\tmustCreate = true;\n } else {\n cal.hide();\n }\n cal.showsOtherMonths = false;\n cal.yearStep = 2;\n cal.setRange(yearStart,yearEnd);\n cal.params = params;\n cal.setDateStatusHandler(null);\n cal.getDateText = null;\n cal.setDateFormat(format);\n if (mustCreate)\n\tcal.create();\n cal.refresh();\n if (!params.position)\n cal.showAtElement(input_id_anchor, null);\n else\n cal.showAt(params.position[0], params.position[1]);\n return false;\n}\n\n\n// This function updates a hidden date field with the current values of the widgets\nfunction update_date_field(field, year, month, day, hour, minute, ampm)\n{\n var field = document.getElementById(field)\n var date = document.getElementById(date)\n var year = document.getElementById(year)\n var month = document.getElementById(month)\n var day = document.getElementById(day)\n var hour = document.getElementById(hour)\n var minute = document.getElementById(minute)\n var ampm = document.getElementById(ampm)\n\n if (0 < year.value)\n {\n // Return ISO date string\n // Note: This relies heavily on what date_components_support.py puts into the form.\n field.value = year.value + \"-\" + month.value + \"-\" + day.value + \" \" + hour.value + \":\" + minute.value\n // Handle optional AM/PM\n if (ampm && ampm.value)\n field.value = field.value + \" \" + ampm.value\n } \n else \n {\n // Return empty string\n field.value = ''\n // Reset widgets\n month.options[0].selected = 1\n day.options[0].selected = 1\n hour.options[0].selected = 1\n minute.options[0].selected = 1\n if (ampm && ampm.options)\n ampm.options[0].selected = 1\n }\n}\n\n\n\n\n/* ----- calendarpopup.js ----- */\n\n// The calendar popup show/hide:\n\n function showDay(date) {\n document.getElementById('day' + date).style.visibility = 'visible';\n return true;\n } \n function hideDay(date) {\n document.getElementById('day' + date).style.visibility = 'hidden';\n return true;\n }\n\n\n \n\n\n\n\n/* ----- ie5fixes.js ----- */\n/* Mike Malloch's fixes for Internet Explorer 5 - \n * We dont care too much about IE5,\n * But these stop if from spitting errormessages at the user \n */\nfunction hackPush(el){\n this[this.length] = el;\n}\n\nfunction hackPop(){\n var N = this.length - 1, el = this[N];\n this.length = N\n return el;\n}\n\nfunction hackShift(){\n var one = this[0], N = this.length;\n for (var i = 1; i < N; i++){\n this[i-1] = this[i];\n }\n this.length = N-1\n return one;\n}\n\nvar testPushPop = new Array();\nif (testPushPop.push){\n}else{\n Array.prototype.push = hackPush\n Array.prototype.pop = hackPop\n Array.prototype.shift = hackShift;\n}\n\n/* ----- formUnload.js ----- */\n/* BeforeUnload form processing */\nif (!window.beforeunload) (function() {\n var BeforeUnloadHandler = function() {\n var self = this;\n\n this.message = window.form_modified_message ||\n \"Your form has not been saved. All changes you have made will be lost.\";\n\n this.forms = [];\n this.chkId = [];\n this.chkType = new this.CheckType();\n this.handlers = [this.isAnyFormChanged];\n this.submitting = false;\n\n this.execute = function(event) {\n if (self.submitting) return;\n if (!event) event = window.event;\n\n for (var i = 0; i < self.handlers.length; i++) {\n var fn = self.handlers[i];\n var message = message || fn.apply(self);\n }\n if (message===true) message = self.message;\n if (message===false) message = undefined;\n if (event && message) { event.returnValue = message; }\n return message;\n }\n this.execute.tool = this;\n }\n var Class = BeforeUnloadHandler.prototype;\n\n // form checking code\n Class.isAnyFormChanged = function() {\n for (var i=0; i < this.forms.length; i++) {\n var form = this.forms[i];\n if (this.isElementChanged(form)) {\n return true;\n }\n }\n return false;\n }\n Class.addHandler = function(fn) {\n this.handlers.push(fn);\n }\n Class.onsubmit = function() {\n var tool = window.onbeforeunload && window.onbeforeunload.tool;\n tool.submitting = true;\n }\n Class.addForm = function(form) {\n for (var i = 0; i < this.forms.length; i++) {\n if (this.forms[i]==form) return;\n }\n this.forms.push(form);\n form.onsubmit = this.onsubmit;\n var elements = form.getElementsByTagName('input');\n for (var j = 0; j < elements.length; j++) {\n var ele = elements[j];\n if (ele.type=='hidden') {\n ele.setAttribute('originalValue', ele.defaultValue);\n }\n }\n }\n Class.addForms = function() {\n for (var i = 0; i < arguments.length; i++) {\n var element = arguments[i];\n if (!element) continue;\n if (element.tagName=='FORM') {\n this.addForm(element);\n }\n else {\n var forms = element.getElementsByTagName('form');\n for (var j = 0; j < forms.length; j++) {\n this.addForm(forms[j]);\n }\n }\n }\n }\n Class.removeForms = function() {\n for (var i = 0; i < arguments.length; i++) {\n var element = arguments[i];\n if (!element) continue;\n if (element.tagName=='FORM') {\n for (var j = 0; j < arguments.length; j++) {\n if (this.forms[j] == element) {\n this.forms.splice(j--, 1);\n element.onsubmit=null;\n }\n }\n } else {\n var forms = element.getElementsByTagName('form');\n for (var j = 0; j < forms.length; j++) {\n this.removeForms(forms[j]);\n }\n }\n }\n }\n\n Class.CheckType = function() {};\n var c = Class.CheckType.prototype;\n c.checkbox = c.radio = function(ele) {\n return ele.checked != ele.defaultChecked;\n }\n c.password = c.textarea = c.text = function(ele) {\n return ele.value != ele.defaultValue;\n }\n // hidden: cannot tell on Mozilla without special treatment\n c.hidden = function(ele) {\n var orig = ele.getAttribute(\"originalValue\");\n return orig && (ele.value != orig);\n }\n\n c['select-one'] = function(ele) {\n for (var i=0 ; i < ele.length; i++) {\n var opt = ele.options[i];\n if ( opt.selected != opt.defaultSelected) {\n if (i===0 && opt.selected) continue; /* maybe no default */\n return true;\n }\n }\n return false;\n }\n\n c['select-multiple'] = function(ele) {\n for (var i=0 ; i < ele.length; i++) {\n var opt = ele.options[i];\n if ( opt.selected != opt.defaultSelected) {\n return true;\n }\n }\n return false;\n }\n\n Class.chk_form = function(form) {\n var elements = form.elements;\n for (var i=0; i < elements.length; i++ ) {\n var element = elements[i];\n if (this.isElementChanged(element)) {\n return true;\n }\n }\n return false;\n }\n\n Class.isElementChanged = function(ele) {\n var method = ele.id && this.chkId[ele.id];\n if (!method && ele.type && ele.name)\n method = this.chkType[ele.type];\n if (!method && ele.tagName)\n method = this['chk_'+ele.tagName.toLowerCase()];\n\n return method? method.apply(this, [ele]) : false;\n };\n\n window.onbeforeunload = new BeforeUnloadHandler().execute;\n \n registerPloneFunction(function() {\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n var tool = window.onbeforeunload && window.onbeforeunload.tool;\n var content = getContentArea();\n if (tool && content) {\n var forms = cssQuery('form.enableUnloadProtection');\n for (var i=0; i < forms.length; i++) {\n tool.addForm(forms[i]);\n }\n }\n });\n})();\n\n/* ----- sarissa.js ----- */\n/*****************************************************************************\n *\n * Sarissa XML library version 0.9.6\n * Copyright (c) 2003 Manos Batsis, \n * mailto: mbatsis at users full stop sourceforge full stop net\n * This software is distributed under the Kupu License. See\n * LICENSE.txt for license text. See the Sarissa homepage at\n * http://sarissa.sourceforge.net for more information.\n *\n *****************************************************************************\n\n * ====================================================================\n * About\n * ====================================================================\n * Sarissa cross browser XML library \n * @version 0.9.6\n * @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net\n *\n * Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.\n * The library supports Gecko based browsers like Mozilla and Firefox,\n * Internet Explorer (5.5+ with MSXML3.0+) and, last but not least, KHTML based browsers like\n * Konqueror and Safari.\n *\n */\n/**\n * <p>Sarissa is a utility class. Provides static methods for DOMDocument and \n * XMLHTTP objects, DOM Node serializatrion to XML strings and other goodies.</p>\n * @constructor\n */\nfunction Sarissa(){};\n/** @private */\nSarissa.PARSED_OK = \"Document contains no parsing errors\";\n/**\n * Tells you whether transformNode and transformNodeToObject are available. This functionality\n * is contained in sarissa_ieemu_xslt.js and is deprecated. If you want to control XSLT transformations\n * use the XSLTProcessor\n * @deprecated\n * @type boolean\n */\nSarissa.IS_ENABLED_TRANSFORM_NODE = false;\n/**\n * tells you whether XMLHttpRequest (or equivalent) is available\n * @type boolean\n */\nSarissa.IS_ENABLED_XMLHTTP = false;\n/**\n * tells you whether selectNodes/selectSingleNode is available\n * @type boolean\n */\nSarissa.IS_ENABLED_SELECT_NODES = false;\nvar _sarissa_iNsCounter = 0;\nvar _SARISSA_IEPREFIX4XSLPARAM = \"\";\nvar _SARISSA_HAS_DOM_IMPLEMENTATION = document.implementation && true;\nvar _SARISSA_HAS_DOM_CREATE_DOCUMENT = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.createDocument;\nvar _SARISSA_HAS_DOM_FEATURE = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.hasFeature;\nvar _SARISSA_IS_MOZ = _SARISSA_HAS_DOM_CREATE_DOCUMENT && _SARISSA_HAS_DOM_FEATURE;\nvar _SARISSA_IS_SAFARI = navigator.userAgent.toLowerCase().indexOf(\"applewebkit\") != -1;\nvar _SARISSA_IS_IE = document.all && window.ActiveXObject && navigator.userAgent.toLowerCase().indexOf(\"msie\") > -1 && navigator.userAgent.toLowerCase().indexOf(\"opera\") == -1;\n\nif(!window.Node || !window.Node.ELEMENT_NODE){\n var Node = {ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12};\n};\n\n// IE initialization\nif(_SARISSA_IS_IE){\n // for XSLT parameter names, prefix needed by IE\n _SARISSA_IEPREFIX4XSLPARAM = \"xsl:\";\n // used to store the most recent ProgID available out of the above\n var _SARISSA_DOM_PROGID = \"\";\n var _SARISSA_XMLHTTP_PROGID = \"\";\n var _SARISSA_THREADEDDOM_PROGID = \"\";\n var _SARISSA_XSLTEMPLATE_PROGID = \"\";\n /**\n * Called when the Sarissa_xx.js file is parsed, to pick most recent\n * ProgIDs for IE, then gets destroyed.\n * @param idList an array of MSXML PROGIDs from which the most recent will be picked for a given object\n * @param enabledList an array of arrays where each array has two items; the index of the PROGID for which a certain feature is enabled\n */\n Sarissa.pickRecentProgID = function (idList, enabledList){\n // found progID flag\n var bFound = false;\n for(var i=0; i < idList.length && !bFound; i++){\n try{\n var oDoc = new ActiveXObject(idList[i]);\n o2Store = idList[i];\n bFound = true;\n for(var j=0;j<enabledList.length;j++)\n if(i <= enabledList[j][1])\n Sarissa[\"IS_ENABLED_\"+enabledList[j][0]] = true;\n }catch (objException){\n // trap; try next progID\n };\n };\n if (!bFound)\n throw \"Could not retreive a valid progID of Class: \" + idList[idList.length-1]+\". (original exception: \"+e+\")\";\n idList = null;\n return o2Store;\n };\n //============================================\n // Factory methods (IE)\n //============================================\n // see non-IE version\n Sarissa.getDomDocument = function(sUri, sName){\n if (!_SARISSA_DOM_PROGID) {\n _SARISSA_DOM_PROGID = Sarissa.pickRecentProgID([\"Msxml2.DOMDocument.4.0\", \"Msxml2.DOMDocument.3.0\", \"MSXML2.DOMDocument\", \"MSXML.DOMDocument\", \"Microsoft.XMLDOM\"], [[\"SELECT_NODES\", 2],[\"TRANSFORM_NODE\", 2]]);\n };\n var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);\n // if a root tag name was provided, we need to load it in the DOM\n // object\n if (sName){\n // if needed, create an artifical namespace prefix the way Moz\n // does\n if (sUri){\n oDoc.loadXML(\"<a\" + _sarissa_iNsCounter + \":\" + sName + \" xmlns:a\" + _sarissa_iNsCounter + \"=\\\"\" + sUri + \"\\\" />\");\n // don't use the same prefix again\n ++_sarissa_iNsCounter;\n }\n else\n oDoc.loadXML(\"<\" + sName + \"/>\");\n };\n return oDoc;\n };\n // see non-IE version \n Sarissa.getParseErrorText = function (oDoc) {\n var parseErrorText = Sarissa.PARSED_OK;\n if(oDoc.parseError != 0){\n parseErrorText = \"XML Parsing Error: \" + oDoc.parseError.reason + \n \"\\nLocation: \" + oDoc.parseError.url + \n \"\\nLine Number \" + oDoc.parseError.line + \", Column \" + \n oDoc.parseError.linepos + \n \":\\n\" + oDoc.parseError.srcText +\n \"\\n\";\n for(var i = 0; i < oDoc.parseError.linepos;i++){\n parseErrorText += \"-\";\n };\n parseErrorText += \"^\\n\";\n };\n return parseErrorText;\n };\n // see non-IE version\n Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {\n oDoc.setProperty(\"SelectionLanguage\", \"XPath\");\n oDoc.setProperty(\"SelectionNamespaces\", sNsSet);\n }; \n /**\n * Basic implementation of Mozilla's XSLTProcessor for IE. \n * Reuses the same XSLT stylesheet for multiple transforms\n * @constructor\n */\n XSLTProcessor = function(){\n if (!_SARISSA_XSLTEMPLATE_PROGID) {\n _SARISSA_XSLTEMPLATE_PROGID = Sarissa.pickRecentProgID([\"Msxml2.XSLTemplate.4.0\", \"MSXML2.XSLTemplate.3.0\"], [[\"XSLTPROC\", 2]]);\n };\n this.template = new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);\n this.processor = null;\n };\n /**\n * Impoprts the given XSLT DOM and compiles it to a reusable transform\n * @argument xslDoc The XSLT DOMDocument to import\n */\n XSLTProcessor.prototype.importStylesheet = function(xslDoc){\n // convert stylesheet to free threaded\n if (!_SARISSA_THREADEDDOM_PROGID) {\n _SARISSA_THREADEDDOM_PROGID = Sarissa.pickRecentProgID([\"MSXML2.FreeThreadedDOMDocument.4.0\", \"MSXML2.FreeThreadedDOMDocument.3.0\"]);\n }\n var converted = new ActiveXObject(_SARISSA_THREADEDDOM_PROGID); \n converted.loadXML(xslDoc.xml);\n this.template.stylesheet = converted;\n this.processor = this.template.createProcessor();\n // (re)set default param values\n this.paramsSet = new Array();\n };\n /**\n * Transform the given XML DOM\n * @argument sourceDoc The XML DOMDocument to transform\n * @return The transformation result as a DOM Document\n */\n XSLTProcessor.prototype.transformToDocument = function(sourceDoc){\n this.processor.input = sourceDoc;\n var outDoc = new ActiveXObject(_SARISSA_DOM_PROGID);\n this.processor.output = outDoc; \n this.processor.transform();\n return outDoc;\n };\n /**\n * Not sure if this works in IE. Maybe this will allow non-well-formed\n * transformation results (i.e. with no single root element)\n * @argument sourceDoc The XML DOMDocument to transform\n * @return The transformation result as a DOM Fragment\n */\n XSLTProcessor.prototype.transformToFragment = function(sourceDoc, ownerDocument){\n return this.transformToDocument(sourceDoc);\n };\n /**\n * Set global XSLT parameter of the imported stylesheet\n * @argument nsURI The parameter namespace URI\n * @argument name The parameter base name\n * @argument value The new parameter value\n */\n XSLTProcessor.prototype.setParameter = function(nsURI, name, value){\n /* nsURI is optional but cannot be null */\n if(nsURI){\n this.processor.addParameter(name, value, nsURI);\n }else{\n this.processor.addParameter(name, value);\n };\n /* update updated params for getParameter */\n if(!this.paramsSet[\"\"+nsURI]){\n this.paramsSet[\"\"+nsURI] = new Array();\n };\n this.paramsSet[\"\"+nsURI][name] = value;\n };\n /**\n * Gets a parameter if previously set by setParameter. Returns null\n * otherwise\n * @argument name The parameter base name\n * @argument value The new parameter value\n * @return The parameter value if reviously set by setParameter, null otherwise\n */\n XSLTProcessor.prototype.getParameter = function(nsURI, name){\n if(this.paramsSet[\"\"+nsURI] && this.paramsSet[\"\"+nsURI][name])\n return this.paramsSet[\"\"+nsURI][name];\n else\n return null;\n };\n}\nelse{ /* end IE initialization, try to deal with real browsers now ;-) */\n if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){\n if(window.XMLDocument){\n /**\n * <p>Emulate IE's onreadystatechange attribute</p>\n */\n XMLDocument.prototype.onreadystatechange = null;\n /**\n * <p>Emulates IE's readyState property, which always gives an integer from 0 to 4:</p>\n * <ul><li>1 == LOADING,</li>\n * <li>2 == LOADED,</li>\n * <li>3 == INTERACTIVE,</li>\n * <li>4 == COMPLETED</li></ul>\n */\n XMLDocument.prototype.readyState = 0;\n /**\n * <p>Emulate IE's parseError attribute</p>\n */\n XMLDocument.prototype.parseError = 0;\n\n // NOTE: setting async to false will only work with documents\n // called over HTTP (meaning a server), not the local file system,\n // unless you are using Moz 1.4+.\n // BTW the try>catch block is for 1.4; I haven't found a way to check if\n // the property is implemented without\n // causing an error and I dont want to use user agent stuff for that...\n var _SARISSA_SYNC_NON_IMPLEMENTED = false;\n try{\n /**\n * <p>Emulates IE's async property for Moz versions prior to 1.4.\n * It controls whether loading of remote XML files works\n * synchronously or asynchronously.</p>\n */\n XMLDocument.prototype.async = true;\n _SARISSA_SYNC_NON_IMPLEMENTED = true;\n }catch(e){/* trap */};\n /**\n * <p>Keeps a handle to the original load() method. Internal use and only\n * if Mozilla version is lower than 1.4</p>\n * @private\n */\n XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load;\n\n /**\n * <p>Overrides the original load method to provide synchronous loading for\n * Mozilla versions prior to 1.4, using an XMLHttpRequest object (if\n * async is set to false)</p>\n * @returns the DOM Object as it was before the load() call (may be empty)\n */\n XMLDocument.prototype.load = function(sURI) {\n var oDoc = document.implementation.createDocument(\"\", \"\", null);\n Sarissa.copyChildNodes(this, oDoc);\n this.parseError = 0;\n Sarissa.__setReadyState__(this, 1);\n try {\n if(this.async == false && _SARISSA_SYNC_NON_IMPLEMENTED) {\n var tmp = new XMLHttpRequest();\n tmp.open(\"GET\", sURI, false);\n tmp.send(null);\n Sarissa.__setReadyState__(this, 2);\n Sarissa.copyChildNodes(tmp.responseXML, this);\n Sarissa.__setReadyState__(this, 3);\n }\n else {\n this._sarissa_load(sURI);\n };\n }\n catch (objException) {\n this.parseError = -1;\n }\n finally {\n if(this.async == false){\n Sarissa.__handleLoad__(this);\n };\n };\n return oDoc;\n };\n };//if(window.XMLDocument)\n\n /**\n * <p>Ensures the document was loaded correctly, otherwise sets the\n * parseError to -1 to indicate something went wrong. Internal use</p>\n * @private\n */\n Sarissa.__handleLoad__ = function(oDoc){\n if (!oDoc.documentElement || oDoc.documentElement.tagName == \"parsererror\")\n oDoc.parseError = -1;\n Sarissa.__setReadyState__(oDoc, 4);\n };\n \n /**\n * <p>Attached by an event handler to the load event. Internal use.</p>\n * @private\n */\n _sarissa_XMLDocument_onload = function(){\n Sarissa.__handleLoad__(this);\n };\n \n /**\n * <p>Sets the readyState property of the given DOM Document object.\n * Internal use.</p>\n * @private\n * @argument oDoc the DOM Document object to fire the\n * readystatechange event\n * @argument iReadyState the number to change the readystate property to\n */\n Sarissa.__setReadyState__ = function(oDoc, iReadyState){\n oDoc.readyState = iReadyState;\n if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == \"function\")\n oDoc.onreadystatechange();\n };\n /**\n * <p>Factory method to obtain a new DOM Document object</p>\n * @argument sUri the namespace of the root node (if any)\n * @argument sUri the local name of the root node (if any)\n * @returns a new DOM Document\n */\n Sarissa.getDomDocument = function(sUri, sName){\n var oDoc = document.implementation.createDocument(sUri?sUri:\"\", sName?sName:\"\", null);\n oDoc.addEventListener(\"load\", _sarissa_XMLDocument_onload, false);\n return oDoc;\n }; \n };//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT)\n};\n//==========================================\n// Common stuff\n//==========================================\nif(!window.DOMParser){\n /** \n * DOMParser is a utility class, used to construct DOMDocuments from XML strings\n * @constructor\n */\n DOMParser = function() {\n };\n /** \n * Construct a new DOM Document from the given XMLstring\n * @param sXml the given XML string\n * @param contentType the content type of the document the given string represents (one of text/xml, application/xml, application/xhtml+xml). \n * @return a new DOM Document from the given XML string\n */\n DOMParser.prototype.parseFromString = function(sXml, contentType){\n var doc = Sarissa.getDomDocument();\n doc.loadXML(sXml);\n return doc;\n };\n \n};\n\nif (!window.XMLHttpRequest && window.ActiveXObject) {\n /**\n * Emulate XMLHttpRequest\n * @constructor\n */\n XMLHttpRequest = function() {\n if(!_SARISSA_XMLHTTP_PROGID){\n _SARISSA_XMLHTTP_PROGID = Sarissa.pickRecentProgID([\"Msxml2.XMLHTTP.4.0\", \"MSXML2.XMLHTTP.3.0\", \"MSXML2.XMLHTTP\", \"Microsoft.XMLHTTP\"]);\n };\n return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);\n };\n}\nif(window.XMLHttpRequest){\n Sarissa.IS_ENABLED_XMLHTTP = true;\n};\n\nif(!window.document.importNode && _SARISSA_IS_IE){\n try{\n /**\n * Implements importNode for the current window document in IE using innerHTML.\n * Testing showed that DOM was multiple times slower than innerHTML for this,\n * sorry folks. If you encounter trouble (who knows what IE does behind innerHTML)\n * please gimme a call.\n * @param oNode the Node to import\n * @param bChildren whether to include the children of oNode\n * @returns the imported node for further use\n */\n window.document.importNode = function(oNode, bChildren){\n var importNode = document.createElement(\"div\");\n if(bChildren)\n importNode.innerHTML = Sarissa.serialize(oNode);\n else\n importNode.innerHTML = Sarissa.serialize(oNode.cloneNode(false));\n return importNode.firstChild;\n };\n }catch(e){};\n};\nif(!Sarissa.getParseErrorText){\n /**\n * <p>Returns a human readable description of the parsing error. Usefull\n * for debugging. Tip: append the returned error string in a &lt;pre&gt;\n * element if you want to render it.</p>\n * <p>Many thanks to Christian Stocker for the initial patch.</p>\n * @argument oDoc The target DOM document\n * @returns The parsing error description of the target Document in\n * human readable form (preformated text)\n */\n Sarissa.getParseErrorText = function (oDoc){\n var parseErrorText = Sarissa.PARSED_OK;\n if(oDoc.parseError != 0){\n /*moz*/\n if(oDoc.documentElement.tagName == \"parsererror\"){\n parseErrorText = oDoc.documentElement.firstChild.data;\n parseErrorText += \"\\n\" + oDoc.documentElement.firstChild.nextSibling.firstChild.data;\n }/*konq*/\n else if(oDoc.documentElement.tagName == \"html\"){\n parseErrorText = Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"h1\")[0], false) + \"\\n\";\n parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"body\")[0], false) + \"\\n\";\n parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"pre\")[0], false);\n };\n };\n return parseErrorText;\n };\n};\nSarissa.getText = function(oNode, deep){\n var s = \"\";\n var nodes = oNode.childNodes;\n for(var i=0; i < nodes.length; i++){\n var node = nodes[i];\n var nodeType = node.nodeType;\n if(nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE){\n s += node.data;\n }\n else if(deep == true\n && (nodeType == Node.ELEMENT_NODE\n || nodeType == Node.DOCUMENT_NODE\n || nodeType == Node.DOCUMENT_FRAGMENT_NODE)){\n s += Sarissa.getText(node, true);\n };\n };\n return s;\n};\nif(window.XMLSerializer){\n /**\n * <p>Factory method to obtain the serialization of a DOM Node</p>\n * @returns the serialized Node as an XML string\n */\n Sarissa.serialize = function(oDoc){\n return (new XMLSerializer()).serializeToString(oDoc);\n };\n}else{\n if((Sarissa.getDomDocument(\"\",\"foo\", null)).xml){\n // see non-IE version\n Sarissa.serialize = function(oDoc) {\n // TODO: check for HTML document and return innerHTML instead\n return oDoc.xml;\n };\n /**\n * Utility class to serialize DOM Node objects to XML strings\n * @constructor\n */\n XMLSerializer = function(){};\n /**\n * Serialize the given DOM Node to an XML string\n * @param oNode the DOM Node to serialize\n */\n XMLSerializer.prototype.serializeToString = function(oNode) {\n return oNode.xml;\n };\n };\n};\n\n/**\n * strips tags from a markup string\n */\nSarissa.stripTags = function (s) {\n return s.replace(/<[^>]+>/g,\"\");\n};\n/**\n * <p>Deletes all child nodes of the given node</p>\n * @argument oNode the Node to empty\n */\nSarissa.clearChildNodes = function(oNode) {\n while(oNode.hasChildNodes()){\n oNode.removeChild(oNode.firstChild);\n };\n};\n/**\n * <p> Copies the childNodes of nodeFrom to nodeTo</p>\n * <p> <b>Note:</b> The second object's original content is deleted before \n * the copy operation, unless you supply a true third parameter</p>\n * @argument nodeFrom the Node to copy the childNodes from\n * @argument nodeTo the Node to copy the childNodes to\n * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false\n */\nSarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {\n if(!bPreserveExisting){\n Sarissa.clearChildNodes(nodeTo);\n };\n var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;\n var nodes = nodeFrom.childNodes;\n if(ownerDoc.importNode) {\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));\n };\n }\n else{\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(nodes[i].cloneNode(true));\n };\n };\n};\n\n/**\n * <p> Moves the childNodes of nodeFrom to nodeTo</p>\n * <p> <b>Note:</b> The second object's original content is deleted before \n * the move operation, unless you supply a true third parameter</p>\n * @argument nodeFrom the Node to copy the childNodes from\n * @argument nodeTo the Node to copy the childNodes to\n * @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false\n */\nSarissa.moveChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {\n if(!bPreserveExisting){\n Sarissa.clearChildNodes(nodeTo);\n };\n \n var nodes = nodeFrom.childNodes;\n // if within the same doc, just move, else copy and delete\n if(nodeFrom.ownerDocument == nodeTo.ownerDocument){\n nodeTo.appendChild(nodes[i]);\n }else{\n var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;\n if(ownerDoc.importNode && (!_SARISSA_IS_IE)) {\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));\n };\n }\n else{\n for(var i=0;i < nodes.length;i++) {\n nodeTo.appendChild(nodes[i].cloneNode(true));\n };\n };\n Sarissa.clearChildNodes(nodeFrom);\n };\n \n};\n\n/** \n * <p>Serialize any object to an XML string. All properties are serialized using the property name\n * as the XML element name. Array elements are rendered as <code>array-item</code> elements, \n * using their index/key as the value of the <code>key</code> attribute.</p>\n * @argument anyObject the object to serialize\n * @argument objectName a name for that object\n * @return the XML serializationj of the given object as a string\n */\nSarissa.xmlize = function(anyObject, objectName, indentSpace){\n indentSpace = indentSpace?indentSpace:'';\n var s = indentSpace + '<' + objectName + '>';\n var isLeaf = false;\n if(!(anyObject instanceof Object) || anyObject instanceof Number || anyObject instanceof String \n || anyObject instanceof Boolean || anyObject instanceof Date){\n s += Sarissa.escape(\"\"+anyObject);\n isLeaf = true;\n }else{\n s += \"\\n\";\n var itemKey = '';\n var isArrayItem = anyObject instanceof Array;\n for(var name in anyObject){\n s += Sarissa.xmlize(anyObject[name], (isArrayItem?\"array-item key=\\\"\"+name+\"\\\"\":name), indentSpace + \" \");\n };\n s += indentSpace;\n };\n return s += (objectName.indexOf(' ')!=-1?\"</array-item>\\n\":\"</\" + objectName + \">\\n\");\n};\n\n/** \n * Escape the given string chacters that correspond to the five predefined XML entities\n * @param sXml the string to escape\n */\nSarissa.escape = function(sXml){\n return sXml.replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&apos;\");\n};\n\n/** \n * Unescape the given string. This turns the occurences of the predefined XML \n * entities to become the characters they represent correspond to the five predefined XML entities\n * @param sXml the string to unescape\n */\nSarissa.unescape = function(sXml){\n return sXml.replace(/&apos;/g,\"'\")\n .replace(/&quot;/g,\"\\\"\")\n .replace(/&gt;/g,\">\")\n .replace(/&lt;/g,\"<\")\n .replace(/&amp;/g,\"&\");\n};\n// EOF\n\n\n/* ----- correctPREformatting.js ----- */\n\nfunction correctPREformatting(){\n // terminate if we hit a non-compliant DOM implementation\n if (!W3CDOM){return false};\n\n // small utility thing to correct formatting for PRE-elements and some others\n // thanks to Michael Zeltner for CSS-guruness and research ;) \n\t\t// currently not activated\n contentarea = getContentArea();\n if (! contentarea){return false}\n \n pres = contentarea.getElementsByTagName('pre');\n for (i=0;i<pres.length;i++){\n wrapNode(pres[i],'div','visualOverflow')\n\t\t\t}\n \n //tables = contentarea.getElementsByTagName('table');\n // for (i=0;i<tables.length;i++){\n // if (tables[i].className==\"listing\"){\n // wrapNode(tables[i],'div','visualOverflow')\n\t\t// }\n //} \n}\n//registerPloneFunction(correctPREformatting);\n\n\n/* ----- vcXMLRPC.js ----- */\n//\n// Copyright (C) 2000, 2001, 2002 Virtual Cowboys info@virtualcowboys.nl\n//\t\t\n//\t\tAuthor: Ruben Daniels <ruben@virtualcowboys.nl>\n//\t\tVersion: 0.91\n//\t\tDate: 29-08-2001\n//\t\tSite: www.vcdn.org/Public/XMLRPC/\n//\n// This program is free software; you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation; either version 2 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with this program; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\nObject.prototype.toXMLRPC = function(){\n\tvar wo = this.valueOf();\n\t\n\tif(wo.toXMLRPC == this.toXMLRPC){\n\t\tretstr = \"<struct>\";\n\t\t\n\t\tfor(prop in this){\n\t\t\tif(typeof wo[prop] != \"function\"){\n\t\t\t\tretstr += \"<member><name>\" + prop + \"</name><value>\" + XMLRPC.getXML(wo[prop]) + \"</value></member>\";\n\t\t\t}\n\t\t}\n\t\tretstr += \"</struct>\";\n\t\t\n\t\treturn retstr;\n\t}\n\telse{\n\t\treturn wo.toXMLRPC();\n\t}\n}\n\nString.prototype.toXMLRPC = function(){\n\t//<![CDATA[***your text here***]]>\n\treturn \"<string><![CDATA[\" + this.replace(/\\]\\]/g, \"] ]\") + \"]]></string>\";//.replace(/</g, \"&lt;\").replace(/&/g, \"&amp;\")\n}\n\nNumber.prototype.toXMLRPC = function(){\n\tif(this == parseInt(this)){\n\t\treturn \"<int>\" + this + \"</int>\";\n\t}\n\telse if(this == parseFloat(this)){\n\t\treturn \"<double>\" + this + \"</double>\";\n\t}\n\telse{\n\t\treturn false.toXMLRPC();\n\t}\n}\n\nBoolean.prototype.toXMLRPC = function(){\n\tif(this) return \"<boolean>1</boolean>\";\n\telse return \"<boolean>0</boolean>\";\n}\n\nDate.prototype.toXMLRPC = function(){\n\t//Could build in possibilities to express dates \n\t//in weeks or other iso8601 possibillities\n\t//hmmmm ????\n\t//19980717T14:08:55\n\treturn \"<dateTime.iso8601>\" + doYear(this.getUTCYear()) + doZero(this.getMonth()) + doZero(this.getUTCDate()) + \"T\" + doZero(this.getHours()) + \":\" + doZero(this.getMinutes()) + \":\" + doZero(this.getSeconds()) + \"</dateTime.iso8601>\";\n\t\n\tfunction doZero(nr) {\n\t\tnr = String(\"0\" + nr);\n\t\treturn nr.substr(nr.length-2, 2);\n\t}\n\t\n\tfunction doYear(year) {\n\t\tif(year > 9999 || year < 0) \n\t\t\tXMLRPC.handleError(new Error(\"Unsupported year: \" + year));\n\t\t\t\n\t\tyear = String(\"0000\" + year)\n\t\treturn year.substr(year.length-4, 4);\n\t}\n}\n\nArray.prototype.toXMLRPC = function(){\n\tvar retstr = \"<array><data>\";\n\tfor(var i=0;i<this.length;i++){\n\t\tretstr += \"<value>\" + XMLRPC.getXML(this[i]) + \"</value>\";\n\t}\n\treturn retstr + \"</data></array>\";\n}\n\nfunction VirtualService(servername, oRPC){\n\tthis.version = '0.91';\n\tthis.URL = servername;\n\tthis.multicall = false;\n\tthis.autoroute = true;\n\tthis.onerror = null;\n\t\n\tthis.rpc = oRPC;\n\tthis.receive = {};\n\t\n\tthis.purge = function(receive){\n\t\treturn this.rpc.purge(this, receive);\n\t}\n\t\n\tthis.revert = function(){\n\t\tthis.rpc.revert(this);\n\t}\n\t\n\tthis.add = function(name, alias, receive){\n\t\tthis.rpc.validateMethodName();if(this.rpc.stop){this.rpc.stop = false;return false}\n\t\tif(receive) this.receive[name] = receive;\n\t\tthis[(alias || name)] = new Function('var args = new Array(), i;for(i=0;i<arguments.length;i++){args.push(arguments[i]);};return this.call(\"' + name + '\", args);');\n\t\treturn true;\n\t}\n\t\n\t//internal function for sending data\n\tthis.call = function(name, args){\n\t\tvar info = this.rpc.send(this.URL, name, args, this.receive[name], this.multicall, this.autoroute);\n\t\t\n\t\tif(info){\n\t\t\tif(!this.multicall) this.autoroute = info[0];\n\t\t\treturn info[1];\n\t\t}\n\t\telse{\n\t\t\tif(this.onerror) this.onerror(XMLRPC.lastError);\n\t\t\treturn false;\n\t\t}\n\t}\n}\n\n\nXMLRPC = {\n\trouteServer : \"\",\n\tautoroute : false,\n\tmulticall : false,\n\n\tservices : {},\n\tstack : {},\n\tqueue : new Array(),\n\ttimers : new Array(),\n\ttimeout : 30000,\n\t\n\tontimeout : null,\n\t\n\tgetService : function(serviceName){\n\t\t//serviceNames cannot contain / or .\n\t\tif(/[\\/\\.]/.test(serviceName)){\n\t\t\treturn new VirtualService(serviceName, this);\n\t\t}\n\t\telse if(this.services[serviceName]){\n\t\t\treturn this.services[serviceName];\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tvar ct = eval(serviceName);\n\t\t\t\tthis.services[serviceName] = new ct(this);\n\t\t\t}\n\t\t\tcatch(e){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t},\n\t\n\tpurge : function(modConst, receive){\n\t\tif(this.stack[modConst.URL].length){\n\t\t\tvar info = this.send(modConst.URL, \"system.multicall\", [this.stack[modConst.URL]], receive, false, modConst.autoroute);\n\t\t\tmodConst.autoroute = info[0];\n\t\t\tthis.revert(modConst);\n\t\t\t\n\t\t\tif(info){\n\t\t\t\tmodConst.autoroute = info[0];\n\t\t\t\treturn info[1];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(modConst.onerror) modConst.onerror(this.lastError);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t},\n\t\n\trevert : function(modConst){\n\t\tthis.stack[modConst.URL] = new Array();\n\t},\n\t\n\tcall : function(){\n\t\t//[optional info || receive, servername,] functionname, args......\n\t\tvar args = new Array(), i, a = arguments;\n\t\tvar servername, methodname, receive, service, info, autoroute, multicall;\n\t\t\n\t\tif(typeof a[0] == \"object\"){\n\t\t\treceive = a[0][0];\n\t\t\tservername = a[0][1].URL;\n\t\t\tmethodname = a[1];\n\t\t\tmulticall = (a[0][1].supportsMulticall && a[0][1].multicall);\n\t\t\tautoroute = a[0][1].autoroute;\n\t\t\tservice = a[0][1];\n\t\t}\n\t\telse if(typeof a[0] == \"function\"){\n\t\t\ti = 3;\n\t\t\treceive = a[0];\n\t\t\tservername = a[1];\n\t\t\tmethodname = a[2];\n\t\t}\n\t\telse{\n\t\t\ti = 2;\n\t\t\tservername = a[0];\n\t\t\tmethodname = a[1];\n\t\t}\n\t\t\t\n\t\tfor(i=i;i<a.length;i++){\n\t\t\targs.push(a[i]);\n\t\t}\n\t\t\n\t\tinfo = this.send(servername, methodname, args, receive, multicall, autoroute);\n\t\tif(info){\n\t\t\t(service || this).autoroute = info[0];\n\t\t\treturn info[1];\n\t\t}\n\t\telse{\n\t\t\tif(service && service.onerror) service.onerror(this.lastError);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t},\n\t\n\t/***\n\t* Perform typematching on 'vDunno' and return a boolean value corresponding\n\t* to the result of the evaluation-match of the mask-value stated in the 2nd argument.\n\t* The 2nd argument is optional (none will be treated as a 0-mask) or a sum of\n\t* several masks as follows:\n\t* type/s -> mask/s\n\t* --------------------\n\t* undefined -> 0/1 [default]\n\t* number -> 2\n\t* boolean -> 4\n\t* string -> 8\n\t* function -> 16\n\t* object -> 32\n\t* --------------------\n\t* Examples:\n\t* Want [String] only: (eqv. (typeof(vDunno) == 'string') )\n\t* Soya.Common.typematch(unknown, 8)\n\t* Anything else than 'undefined' acceptable:\n\t* Soya.Common.typematch(unknown)\n\t* Want [Number], [Boolean] or [Function]:\n\t* Soya.Common.typematch(unknown, 2 + 4 + 16)\n\t* Want [Number] only:\n\t* Soya.Common.typematch(unknown, 2)\n\t**/\n\ttypematch : function (vDunno, nCase){\n\t\tvar nMask;\n\t\tswitch(typeof(vDunno)){\n\t\t\tcase 'number' : nMask = 2; break;\n\t\t\tcase 'boolean' : nMask = 4; break;\n\t\t\tcase 'string' : nMask = 8; break;\n\t\t\tcase 'function': nMask = 16; break;\n\t\t\tcase 'object' : nMask = 32; break;\n\t\t\tdefault\t : nMask = 1; break;\n\t\t}\n\t\treturn Boolean(nMask & (nCase || 62));\n\t},\n\t\n\tgetNode : function(data, tree){\n\t\tvar nc = 0;//nodeCount\n\t\t//node = 1\n\t\tif(data != null){\n\t\t\tfor(i=0;i<data.childNodes.length;i++){\n\t\t\t\tif(data.childNodes[i].nodeType == 1){\n\t\t\t\t\tif(nc == tree[0]){\n\t\t\t\t\t\tdata = data.childNodes[i];\n\t\t\t\t\t\tif(tree.length > 1){\n\t\t\t\t\t\t\ttree.shift();\n\t\t\t\t\t\t\tdata = this.getNode(data, tree);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn data;\n\t\t\t\t\t}\n\t\t\t\t\tnc++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\ttoObject : function(data){\n\t\tvar ret, i;\n\t\tswitch(data.tagName){\n\t\t\tcase \"string\":\n\t\t\t\treturn (data.firstChild) ? new String(data.firstChild.nodeValue) : \"\";\n\t\t\t\tbreak;\n\t\t\tcase \"int\":\n\t\t\tcase \"i4\":\n\t\t\tcase \"double\":\n\t\t\t\treturn (data.firstChild) ? new Number(data.firstChild.nodeValue) : 0;\n\t\t\t\tbreak;\n\t\t\tcase \"dateTime.iso8601\":\n\t\t\t\t/*\n\t\t\t\tHave to read the spec to be able to completely \n\t\t\t\tparse all the possibilities in iso8601\n\t\t\t\t07-17-1998 14:08:55\n\t\t\t\t19980717T14:08:55\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tvar sn = (isIE) ? \"-\" : \"/\";\n\t\t\t\t\n\t\t\t\tif(/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})/.test(data.firstChild.nodeValue)){;//data.text)){\n\t \t\treturn new Date(RegExp.$2 + sn + RegExp.$3 + sn + \n\t \t\t\t\t\t\t\tRegExp.$1 + \" \" + RegExp.$4 + \":\" + \n\t \t\t\t\t\t\t\tRegExp.$5 + \":\" + RegExp.$6);\n\t \t}\n\t \t\telse{\n\t \t\t\treturn new Date();\n\t \t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase \"array\":\n\t\t\t\tdata = this.getNode(data, [0]);\n\t\t\t\t\n\t\t\t\tif(data && data.tagName == \"data\"){\n\t\t\t\t\tret = new Array();\n\t\t\t\t\t\n\t\t\t\t\tvar i = 0;\n\t\t\t\t\twhile(child = this.getNode(data, [i++])){\n \t\t\t\tret.push(this.toObject(child));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.handleError(new Error(\"Malformed XMLRPC Message1\"));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"struct\":\n\t\t\t\tret = {};\n\t\t\t\t\t\n\t\t\t\tvar i = 0;\n\t\t\t\twhile(child = this.getNode(data, [i++])){\n\t\t\t\t\tif(child.tagName == \"member\"){\n\t\t\t\t\t\tret[this.getNode(child, [0]).firstChild.nodeValue] = this.toObject(this.getNode(child, [1]));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tthis.handleError(new Error(\"Malformed XMLRPC Message2\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn ret;\n\t\t\t\tbreak;\n\t\t\tcase \"boolean\":\n\t\t\t\treturn Boolean(isNaN(parseInt(data.firstChild.nodeValue)) ? (data.firstChild.nodeValue == \"true\") : parseInt(data.firstChild.nodeValue))\n\n\t\t\t\tbreak;\n\t\t\tcase \"base64\":\n\t\t\t\treturn this.decodeBase64(data.firstChild.nodeValue);\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tchild = this.getNode(data, [0]);\n\t\t\t\treturn (!child) ? ((data.firstChild) ? new String(data.firstChild.nodeValue) : \"\") : this.toObject(child);\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.handleError(new Error(\"Malformed XMLRPC Message: \" + data.tagName));\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\t\n\t/*** Decode Base64 ******\n\t* Original Idea & Code by thomas@saltstorm.net\n\t* from Soya.Encode.Base64 [http://soya.saltstorm.net]\n\t**/\n\tdecodeBase64 : function(sEncoded){\n\t\t// Input must be dividable with 4.\n\t\tif(!sEncoded || (sEncoded.length % 4) > 0)\n\t\t return sEncoded;\n\t\n\t\t/* Use NN's built-in base64 decoder if available.\n\t\t This procedure is horribly slow running under NN4,\n\t\t so the NN built-in equivalent comes in very handy. :) */\n\t\n\t\telse if(typeof(atob) != 'undefined')\n\t\t return atob(sEncoded);\n\t\n\t \tvar nBits, i, sDecoded = '';\n\t \tvar base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\t\tsEncoded = sEncoded.replace(/\\W|=/g, '');\n\t\n\t\tfor(i=0; i < sEncoded.length; i += 4){\n\t\t\tnBits =\n\t\t\t\t(base64.indexOf(sEncoded.charAt(i)) & 0xff) << 18 |\n\t\t\t\t(base64.indexOf(sEncoded.charAt(i+1)) & 0xff) << 12 |\n\t\t\t\t(base64.indexOf(sEncoded.charAt(i+2)) & 0xff) << 6 |\n\t\t\t\tbase64.indexOf(sEncoded.charAt(i+3)) & 0xff;\n\t\t\tsDecoded += String.fromCharCode(\n\t\t\t\t(nBits & 0xff0000) >> 16, (nBits & 0xff00) >> 8, nBits & 0xff);\n\t\t}\n\t\n\t\t// not sure if the following statement behaves as supposed under\n\t\t// all circumstances, but tests up til now says it does.\n\t\n\t\treturn sDecoded.substring(0, sDecoded.length -\n\t\t ((sEncoded.charCodeAt(i - 2) == 61) ? 2 :\n\t\t (sEncoded.charCodeAt(i - 1) == 61 ? 1 : 0)));\n\t},\n\t\n\tgetObject : function(type, message){\n\t\tif(type == \"HTTP\"){\n\t\t\tif(isIE)\n\t\t\t\tobj = new ActiveXObject(\"microsoft.XMLHTTP\"); \n\t\t\telse if(isNS)\n\t\t\t\tobj = new XMLHttpRequest();\n\t\t}\n\t\telse if(type == \"XMLDOM\"){\n\t\t\tif(isIE){\n\t\t\t\tobj = new ActiveXObject(\"microsoft.XMLDOM\"); \n\t\t\t\tobj.loadXML(message)\n\t\t\t}else if(isNS){\n\t\t\t\tobj = new DOMParser();\n\t\t\t\tobj = obj.parseFromString(message, \"text/xml\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tthis.handleError(new Error(\"Unknown Object\"));\n\t\t}\n\n\t\treturn obj;\n\t},\n\t\n\tvalidateMethodName : function(name){\n\t\t/*do Checking:\n\t\t\n\t\tThe string may only contain identifier characters, \n\t\tupper and lower-case A-Z, the numeric characters, 0-9, \n\t\tunderscore, dot, colon and slash. \n\t\t\n\t\t*/\n\t\tif(/^[A-Za-z0-9\\._\\/:]+$/.test(name))\n\t\t\treturn true\n\t\telse\n\t\t\tthis.handleError(new Error(\"Incorrect method name\"));\n\t},\n\t\n\tgetXML : function(obj){\n\t\tif(typeof obj == \"function\"){\n\t\t\tthis.handleError(new Error(\"Cannot Parse functions\"));\n\t\t}else if(obj == null || obj == undefined || (typeof obj == \"number\" && !isFinite(obj)))\n\t\t\treturn false.toXMLRPC();\n\t\telse\n\t\t\treturn obj.toXMLRPC();\n\t},\n\t\n\thandleError : function(e){\n\t\tif(!this.onerror || !this.onerror(e)){\n\t\t\t//alert(\"An error has occured: \" + e.message);\n\t\t\tthrow e;\n\t\t}\n\t\tthis.stop = true;\n\t\tthis.lastError = e;\n\t},\n\t\n\tcancel : function(id){\n\t\t//You can only cancel a request when it was executed async (I think)\n\t\tif(!this.queue[id]) return false;\n\t\t\n\t\tthis.queue[id][0].abort();\n\t\treturn true;\n\t},\n\t\n\tsend : function(serverAddress, functionName, args, receive, multicall, autoroute){\n\t\tvar id, http;\n\t\t//default is sync\n\t\tthis.validateMethodName();\n\t\tif(this.stop){this.stop = false; return false;}\n\t\t\n\t\t//setting up multicall\n\t\tmulticall = (multicall != null) ? multicall : this.multicall;\n\t\t\n\t\tif(multicall){\n\t\t\tif(!this.stack[serverAddress]) this.stack[serverAddress] = new Array();\n\t\t\tthis.stack[serverAddress].push({methodName : functionName, params : args});\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//creating http object\n\t\tvar http = this.getObject(\"HTTP\");\n\t\t\n\t\t//setting some things for async/sync transfers\n\t\tif(!receive || isNS){;\n\t\t\tasync = false;\n\t\t}\n\t\telse{\n\t\t\tasync = true;\n\t\t\t/* The timer functionality is implemented instead of\n\t\t\t\tthe onreadystatechange event because somehow\n\t\t\t\tthe calling of this event crashed IE5.x\n\t\t\t*/\n\t\t\tid = this.queue.push([http, receive, null, new Date()])-1;\n\t\t\t\n\t\t\tthis.queue[id][2] = new Function(\"var id='\" + id + \"';var dt = new Date(new Date().getTime() - XMLRPC.queue[id][3].getTime());diff = parseInt(dt.getSeconds()*1000 + dt.getMilliseconds());if(diff > XMLRPC.timeout){if(XMLRPC.ontimeout) XMLRPC.ontimeout(); clearInterval(XMLRPC.timers[id]);XMLRPC.cancel(id);return};if(XMLRPC.queue[id][0].readyState == 4){XMLRPC.queue[id][0].onreadystatechange = function(){};XMLRPC.receive(id);clearInterval(XMLRPC.timers[id])}\");\n\t\t\tthis.timers[id] = setInterval(\"XMLRPC.queue[\" + id + \"][2]()\", 20);\n\t\t}\n\t\t\n\t\t//setting up the routing\n\t\tautoroute = (autoroute || this.autoroute);\n\t\t\n\t\t//'active' is only set when direct sending the message has failed\n\t\tvar srv = (autoroute == \"active\") ? this.routeServer : serverAddress;\n\t\t\n\t\ttry{\n\t\t\thttp.open('POST', srv, async);\n\t\t\thttp.setRequestHeader(\"User-Agent\", \"vcXMLRPC v0.91 (\" + navigator.userAgent + \")\");\n\t\t\thttp.setRequestHeader(\"Host\", srv.replace(/^https?:\\/{2}([:\\[\\]\\-\\w\\.]+)\\/?.*/, '$1'));\n\t\t\thttp.setRequestHeader(\"Content-type\", \"text/xml\");\n\t\t\tif(autoroute == \"active\"){\n\t\t\t\thttp.setRequestHeader(\"X-Proxy-Request\", serverAddress);\n\t\t\t\thttp.setRequestHeader(\"X-Compress-Response\", \"gzip\");\n\t\t\t}\n\t\t}\n\t\tcatch(e){\n\t\t\tif(autoroute == true){\n\t\t\t\t//Access has been denied, Routing call.\n\t\t\t\tautoroute = \"active\";\n\t\t\t\tif(id){\n\t\t\t\t\tdelete this.queue[id];\n\t\t\t\t\tclearInterval(this.timers[id]);\n\t\t\t\t}\n\t\t\t\treturn this.send(serverAddress, functionName, args, receive, multicall, autoroute);\n\t\t\t}\n\t\t\t\n\t\t\t//Routing didn't work either..Throwing error\n\t\t\tthis.handleError(new Error(\"Could not sent XMLRPC Message (Reason: Access Denied on client)\"));\n\t\t\tif(this.stop){this.stop = false;return false}\n\t\t}\n\t\t\n\t\t//Construct the message\n\t\tvar message = '<?xml version=\"1.0\"?><methodCall><methodName>' + functionName + '</methodName><params>';\n \tfor(i=0;i<args.length;i++){\n \t\tmessage += '<param><value>' + this.getXML(args[i]) + '</value></param>';\n\t\t}\n\t\tmessage += '</params></methodCall>';\n\t\t\n\t\tvar xmldom = this.getObject('XMLDOM', message);\n\t\tif(self.DEBUG) alert(message);\n\t\t\n\t\ttry{\n\t\t\t//send message\n\t\t\thttp.send(xmldom);\n\t\t}\n\t\tcatch(e){\n\t\t\t//Most likely the message timed out(what happend to your internet connection?)\n\t\t\tthis.handleError(new Error(\"XMLRPC Message not Sent(Reason: \" + e.message + \")\"));\n\t\t\tif(this.stop){this.stop = false;return false}\n\t\t}\n\t\t\n\t\tif(!async && receive)\n\t\t\treturn [autoroute, receive(this.processResult(http))];\n\t\telse if(receive)\n\t\t\treturn [autoroute, id];\n\t\telse\n\t\t\treturn [autoroute, this.processResult(http)];\n\t},\n\t\n\treceive : function(id){\n\t\t//Function for handling async transfers..\n\t\tif(this.queue[id]){\n\t\t\tvar data = this.processResult(this.queue[id][0]);\n\t\t\tthis.queue[id][1](data);\n\t\t\tdelete this.queue[id];\n\t\t}\n\t\telse{\n\t\t\tthis.handleError(new Error(\"Error while processing queue\"));\n\t\t}\n\t},\n\t\n\tprocessResult : function(http){\n\t\tif(self.DEBUG) alert(http.responseText);\n\t\tif(http.status == 200){\n\t\t\t//getIncoming message\n\t\t dom = http.responseXML;\n\n\t\t if(dom){\n\t\t \tvar rpcErr, main;\n\n\t\t \t//Check for XMLRPC Errors\n\t\t \trpcErr = dom.getElementsByTagName(\"fault\");\n\t\t \tif(rpcErr.length > 0){\n\t\t \t\trpcErr = this.toObject(rpcErr[0].firstChild);\n\t\t \t\tthis.handleError(new Error(rpcErr.faultCode, rpcErr.faultString));\n\t\t \t\treturn false\n\t\t \t}\n\n\t\t \t//handle method result\n\t\t \tmain = dom.getElementsByTagName(\"param\");\n\t\t if(main.length == 0) this.handleError(new Error(\"Malformed XMLRPC Message\"));\n\t\t\t\tdata = this.toObject(this.getNode(main[0], [0]));\n\n\t\t\t\t//handle receiving\n\t\t\t\tif(this.onreceive) this.onreceive(data);\n\t\t\t\treturn data;\n\t\t }\n\t\t else{\n\t\t \t\tthis.handleError(new Error(\"Malformed XMLRPC Message\"));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tthis.handleError(new Error(\"HTTP Exception: (\" + http.status + \") \" + http.statusText + \"\\n\\n\" + http.responseText));\n\t\t}\n\t}\n}\n\n//Smell something\nver = navigator.appVersion;\napp = navigator.appName;\nisNS = Boolean(navigator.productSub)\n//moz_can_do_http = (parseInt(navigator.productSub) >= 20010308)\n\nisIE = (ver.indexOf(\"MSIE 5\") != -1 || ver.indexOf(\"MSIE 6\") != -1) ? 1 : 0;\nisIE55 = (ver.indexOf(\"MSIE 5.5\") != -1) ? 1 : 0;\n\nisOTHER = (!isNS && !isIE) ? 1 : 0;\n\n\n/* ----- login.js ----- */\n// Functions used by login pages\r\n\r\nfunction cookiesEnabled() {\r\n // Test whether cookies are enabled by attempting to set a cookie and then change its value\r\n // set test cookie\r\n var c = \"areYourCookiesEnabled=0\";\r\n document.cookie = c;\r\n var dc = document.cookie;\r\n // cookie not set? fail\r\n if (dc.indexOf(c) == -1) return 0;\r\n // change test cookie\r\n c = \"areYourCookiesEnabled=1\";\r\n document.cookie = c;\r\n dc = document.cookie;\r\n // cookie not changed? fail\r\n if (dc.indexOf(c) == -1) return 0;\r\n // delete cookie\r\n document.cookie = \"areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT\";\r\n return 1;\r\n}\r\n\r\nfunction setLoginVars(user_name_id, alt_user_name_id, password_id, empty_password_id, js_enabled_id, cookies_enabled_id) {\r\n // Indicate that javascript is enabled, set cookie status, copy username and password length info to \r\n // alternative variables since these vars are removed from the request by zope's authentication mechanism.\r\n if (js_enabled_id) {\r\n el = document.getElementById(js_enabled_id);\r\n if (el) { el.value = 1; }\r\n }\r\n if (cookies_enabled_id) {\r\n el = document.getElementById(cookies_enabled_id);\r\n // Do a fresh cookies enabled test every time we press the login button\r\n // so that we are up to date in case the user enables cookies after seeing\r\n // the cookies message.\r\n if (el) { el.value = cookiesEnabled(); } \r\n }\r\n if (user_name_id && alt_user_name_id) {\r\n user_name = document.getElementById(user_name_id)\r\n alt_user_name = document.getElementById(alt_user_name_id)\r\n if (user_name && alt_user_name) {\r\n alt_user_name.value = user_name.value;\r\n } \r\n }\r\n if (password_id && empty_password_id) {\r\n password = document.getElementById(password_id)\r\n empty_password = document.getElementById(empty_password_id)\r\n if (password && empty_password) {\r\n if (password.value.length==0) {\r\n empty_password.value = '1';\r\n } else {\r\n empty_password.value = '0';\r\n }\r\n }\r\n }\r\n return 1;\r\n}\r\n\r\nfunction showCookieMessage(msg_id) {\r\n // Show the element with the given id if cookies are not enabled\r\n msg = document.getElementById(msg_id)\r\n if (msg) {\r\n if (cookiesEnabled()) {\r\n msg.style.display = 'none';\r\n } else {\r\n msg.style.display = 'block';\r\n }\r\n }\r\n}\r\n\r\nfunction showEnableCookiesMessage() {\r\n // Show the element with the id 'enable_cookies_message' if cookies are not enabled\r\n showCookieMessage('enable_cookies_message')\r\n}\r\n// Call showEnableCookiesMessage after the page loads\r\nregisterPloneFunction(showEnableCookiesMessage);\r\n\n\n/* ----- formsubmithelpers.js ----- */\nfunction inputSubmitOnClick(event) {\n if (!event) var event = window.event; // IE compatibility\n\n if (hasClassName(this, 'submitting')) {\n return confirm(window.form_resubmit_message);\n } else {\n addClassName(this, 'submitting');\n }\n return true;\n}\n\nfunction registerSubmitHandler() {\n var nodes = cssQuery('input[type=submit]');\n for (var i=0; i<nodes.length; i++) {\n var node = nodes[i];\n if (!node.onclick) {\n node.onclick = inputSubmitOnClick;\n }\n }\n}\nregisterPloneFunction(registerSubmitHandler);\n\n\n/* XXX ERROR -- could not find 'form_popup_js'*/\n\n/* XXX ERROR -- could not find 'login_selection_lists'*/\n\n/* ----- load_institutions.js ----- */\nif (window.addEventListener) window.addEventListener(\"load\",loadInstitutionsInit,false);\n\nfunction loadInstitutionsInit ()\n{\n if (document.getElementById('owner_country')) {\n document.getElementById('owner_country').addEventListener(\"change\", loadInstitutions, false);\n }\n}\n\nfunction loadInstitutions ()\n{\n var owner_country_id = \"\";\n\n if (document.getElementById('owner_country')) {\n owner_country_id = document.getElementById('owner_country').value;\n }\n\n var absolute_url = location.href;\n var url_array = absolute_url.split(\"/\");\n var method_url = \"\";\n\n for(i=0; i < url_array.length-1; i++) {\n method_url+=url_array[i]+\"/\";\n }\n method_url+=\"getListInstitutions\"\n\n var parameters = \"owner_country_id=\"+owner_country_id;\n\n xmlhttp=getHTTPObject();\n\n if (xmlhttp==null) {\n alert (\"Browser does not support HTTP Request\");\n return;\n } \n\n xmlhttp.onreadystatechange=stateChanged;\n xmlhttp.open(\"GET\",method_url+\"?\"+parameters,true);\n xmlhttp.send(null);\n}\n\nfunction stateChanged() \n{ \n if (xmlhttp.readyState==4 || xmlhttp.readyState==\"complete\") { \n handleResponse(xmlhttp.responseText);\n } \n} \n\nfunction handleResponse(string) {\n // Parse the response\n var list_content = string.split(\"'\");\n var list_values = new Array();\n var list_uni_names = new Array();\n\n // Collect uni_codes and uni_names\n for(var i=1, j=0; i < list_content.length; i+=4,j++) {\n list_values[j] = list_content[i];\n list_uni_names[j] = decodeURIComponent(escape(list_content[i+2]));\n }\n\n selectBox=document.getElementById('institution');\n\n // Empty the list of institutions\n selectBox.innerHTML='';\n\n for (i = 0 ; i < list_uni_names.length ; i++ ) {\n opt = document.createElement(\"option\");\n opt.setAttribute('value',list_values[i]);\n\n var txt = document.createTextNode(list_uni_names[i]);\n opt.appendChild(txt);\n\n selectBox.appendChild(opt);\n }\n}\n\n\n/* ----- getHTTPObject.js ----- */\nfunction getHTTPObject()\n{\n var xmlhttp = false;\n\n /* Compilation conditionnelle d'IE */\n /*@cc_on\n @if (@_jscript_version >= 5)\n try\n {\n xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n }\n catch (e)\n {\n try\n {\n xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n catch (E)\n {\n xmlhttp = false;\n }\n }\n @else\n xmlhttp = false;\n @end @*/\n\n /* on essaie de cr\u00c3\u00a9 l'objet si ce n'est pas d\u00c3\u00a9 fait */\n if (!xmlhttp && typeof XMLHttpRequest != 'undefined')\n {\n try\n {\n xmlhttp = new XMLHttpRequest();\n }\n catch (e)\n {\n xmlhttp = false;\n }\n }\n\n return xmlhttp;\n}\n\n\n/* ----- emoticons.js ----- */\nfunction quote(blockquote, uid, title) {\n var blockquote;\n var blog_form = document.forms['edit_form'];\n var reply_to = blog_form['reply_to'];\n var current_content = blog_form['text'];\n var title_ob = blog_form['title'];\n var new_content = current_content.value + blockquote;\n\n current_content.value = new_content;\n current_content.focus();\n reply_to.value = uid;\n title_ob.value = title\n return false;\n}\n\nfunction emoticon(ecode, form_name) {\n // Inserts emoticon codes\n frm = document.forms[form_name];\n frm.text.value = frm.text.value + ecode;\n frm.text.focus();\n return false;\n}\n\nfunction wizard(wiz_type, form_name) {\n var content = document.forms[form_name].text\n var new_content;\n \n if (wiz_type == \"email\") {\n var tmp_image = prompt('Please enter Email:', '');\n if (tmp_image) {\n var pseudo_html = '[email]' + tmp_image + '[/email]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"image\") {\n var tmp_image = prompt('Please enter the URL where your image is located:', 'http://');\n if (tmp_image) {\n var pseudo_html = '[img]' + tmp_image + '[/img]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == 'link') {\n var tmp_href = prompt('Please enter the URL for your page:', 'http://');\n var tmp_title = prompt('Please enter the title for the link You just provided:', tmp_href)\n if (tmp_href && tmp_title) {\n pseudo_html = '[url href=\"' + tmp_href + '\"]' + tmp_title + '[/url]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"italic\") {\n var tmp_word = prompt('Please enter a word or sentence:', '');\n if (tmp_word) {\n var pseudo_html = '[em]' + tmp_word + '[/em]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"bold\") {\n var tmp_word = prompt('Please enter a word or sentence:', '');\n if (tmp_word) {\n var pseudo_html = '[strong]' + tmp_word + '[/strong]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"size\") {\n var tmp_word = prompt('Please enter a word or sentence:', '');\n if (tmp_word) {\n var pseudo_html = '[size]' + tmp_word + '[/size]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"big\") {\n var tmp_word = prompt('Please enter a word or sentence:', '');\n if (tmp_word) {\n var pseudo_html = '[size]' + tmp_word + '[/size]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n if (wiz_type == \"code\") {\n var tmp_word = prompt('Please enter a word or sentence:', '');\n if (tmp_word) {\n var pseudo_html = '[code]' + tmp_word + '[/code]';\n new_content = content.value + pseudo_html;\n content.value = new_content;\n }\n content.focus();\n return false;\n }\n}\n\nfunction showWizards() {\n try{\n\tdocument.getElementById('wizards').style.display = 'block';\n } catch(e) {}\n try{\n\tdocument.getElementById('iconsWizard').style.display = 'block';\n } catch(e) {}\n document.getElementById('showWL').style.display = 'none';\n document.getElementById('hideWL').style.display = 'inline';\n}\n\nfunction hideWizards() {\n try{\n\tdocument.getElementById('wizards').style.display = 'none';\n } catch(e) {}\n try{\n\tdocument.getElementById('iconsWizard').style.display = 'none';\n } catch(e) {}\n document.getElementById('showWL').style.display = 'inline';\n document.getElementById('hideWL').style.display = 'none';\n}\n\n\n/* ----- cmfboard_menu.js ----- */\n// Code to determine the browser and version.\n\nfunction CBrowser() \n{\n var ua, s, i;\n \n this.isIE = false; // Internet Explorer\n this.isNS = false; // Netscape\n this.isOP = false; // Opera\n this.version = null;\n \n ua = navigator.userAgent;\n \n s = \"Opera\";\n if ((i = ua.indexOf(s)) >= 0) {\n this.isOP = true;\n this.version = 7;\n return;\n }\n \n s = \"MSIE\";\n if ((i = ua.indexOf(s)) >= 0) {\n this.isIE = true;\n this.version = parseFloat(ua.substr(i + s.length));\n return;\n } \n s = \"Netscape6/\";\n if ((i = ua.indexOf(s)) >= 0) {\n this.isNS = true;\n this.version = parseFloat(ua.substr(i + s.length));\n return;\n }\n \n // Treat any other \"Gecko\" browser as NS 6.1.\n \n s = \"Gecko\";\n if ((i = ua.indexOf(s)) >= 0) {\n this.isNS = true;\n this.version = 6.1;\n return;\n }\n}\n\nCBrowser = new CBrowser();\n\nfunction CEvent()\n{\n\n this.init = init;\n this.initEvent = initEvent;\n this.removeListener = removeListener;\n this.eventTypes = new Array(\"abort\", \"blur\", \"change\", \"click\", \"dblclick\", \n \"error\", \"focus\", \"keydown\", \"keypress\", \"keyup\",\n \"load\", \"mousedown\", \"mousemove\", \"mouseout\",\n \"mouseover\", \"mouseup\", \"reset\", \"submit\", \"unload\")\n \n function init(obj)\n {\n // Add member vars\n obj.handledEvents = new Array(); \n \n // Add methods\n obj.addListener = addListener;\n obj.removeListenerFromId = removeListenerFromId;\n obj.removeListenersFromType = removeListenersFromType;\n obj.removeAllListeners = removeAllListeners;\n \n // Get defined events\n for (var i in this.eventTypes)\n {\n var event_type = this.eventTypes[i];\n var full_event = \"on\" + event_type;\n var event_func = obj[full_event];\n \n if (event_func)\n {\n obj.addListener(event_type, event_type, event_func);\n }\n }\n }\n \n function initEvent(event)\n {\n var mEvent = event;\n \n if (CBrowser.isIE)\n {\n mEvent = window.event;\n mEvent.layerX = mEvent.offsetX;\n mEvent.layerY = mEvent.offsetY;\n mEvent.currentTarget = mEvent.srcElement;\n }\n \n return mEvent;\n }\n \n function removeListener(obj, event_type)\n {\n var full_event = \"on\" + event_type;\n \n if (CBrowser.isIE)\n {\n obj[full_event] = null;\n }\n else\n {\n delete(obj[full_event]);\n }\n }\n \n \n function evalEvent(event)\n { \n event = CEvent.initEvent(event);\n var event_type = event.type;\n \n for (var event_id in this.handledEvents)\n {\n if (this.handledEvents[event_id][\"type\"] == event_type)\n {\n this.handledEvents[event_id][\"func\"](event);\n }\n }\n }\n \n // CEvent methods\n function addListener(event_id, event_type, event_func)\n { \n var event = new Array();\n var full_event = \"on\" + event_type;\n \n this[full_event] = evalEvent;\n \n event[\"type\"] = event_type;\n event[\"func\"] = event_func;\n this.handledEvents[event_id] = event;\n }\n \n function removeListenerFromId(event_id)\n {\n var event_type = this.handledEvents[event_id][\"type\"];\n var bExists = 0;\n \n // Delete event\n delete(this.handledEvents[event_id]);\n \n // Search if exists an event with the same type\n for (var event_id in this.handledEvents)\n {\n if (this.handledEvents[event_id][\"type\"] == event_type)\n {\n bExists = 1;\n }\n }\n \n // If not delete listener\n if (!bExists)\n {\n CEvent.removeListener(this, event_type);\n }\n }\n \n function removeListenersFromType(event_type)\n {\n var full_event = \"on\" + event_type;\n \n // Delete events from specified type\n for (var event_id in this.handledEvents)\n {\n if (this.handledEvents[event_id][\"type\"] == event_type)\n {\n delete(this.handledEvents[event_id]);\n }\n }\n \n // Delete listener\n if (this[full_event])\n {\n CEvent.removeListener(this, event_type);\n }\n }\n \n function removeAllListeners()\n {\n // Delete all events\n for (var event_id in this.handledEvents)\n {\n delete(this.handledEvents[event_id]);\n }\n \n // Delete all listeners\n for (var i in CEvent.eventTypes)\n {\n var event_type = CEvent.eventTypes[i];\n \n CEvent.removeListener(this, event_type);\n }\n }\n}\n\nCEvent = new CEvent();\n\n// CMFBoard code\nvar cmfboard_browser = CBrowser;\n\n// Code for handling the menu bar and active button.\nvar cmfboard_activeButton = null;\nvar cmfboard_eventInit = 0;\n\n \nfunction cmfboard_initEvent()\n{ \n if (!cmfboard_eventInit)\n {\n CEvent.init(document); \n document.addListener(\"cmfboard_mousedown\", \"mousedown\", cmfboard_pageMousedown);\n cmfboard_eventInit = 1;\n }\n}\n\nfunction cmfboard_pageMousedown(event) \n{ \n var el;\n \n // If there is no active button, exit.\n if (cmfboard_activeButton == null)\n {\n return;\n }\n \n // Find the element that was clicked on.\n if (CBrowser.isIE)\n {\n el = window.event.srcElement;\n }\n else\n {\n el = (event.target.tagName ? event.target : event.target.parentNode);\n }\n \n // If the active button was clicked on, exit.\n if (el == cmfboard_activeButton)\n {\n return;\n }\n \n // If the element is not part of a menu, reset and clear the active\n // button.\n if (cmfboard_getContainerWith(el, \"UL\", \"menuAction\") == null) \n {\n cmfboard_resetButton(cmfboard_activeButton);\n cmfboard_activeButton = null;\n }\n}\n\nfunction cmfboard_buttonClick(event, menuId) \n{ \n var button;\n \n cmfboard_initEvent();\n \n event = CEvent.initEvent(event);\n \n // Get the target button element.\n button = event.currentTarget;\n \n // Blur focus from the link to remove that annoying outline.\n button.blur();\n \n // Associate the named menu to this button if not already done.\n // Additionally, initialize menu display.\n if (button) \n {\n button.menu = document.getElementById(menuId);\n button.menu.style.display = \"block\";\n \n /*dropdown_menu = cmfboard_getContainerWith(button.menu, 'LI', 'dropdownMenu');\n dropdown_menu.style.padding = \"0 0 30em 0\";*/\n }\n \n // Reset the currently active button, if any.\n if (cmfboard_activeButton != null)\n {\n cmfboard_resetButton(cmfboard_activeButton);\n }\n \n // Activate this button, unless it was the currently active one.\n if (button != cmfboard_activeButton) \n {\n cmfboard_depressButton(button);\n cmfboard_activeButton = button;\n }\n else\n {\n cmfboard_activeButton = null;\n }\n \n return false;\n}\n\nfunction cmfboard_buttonMouseover(event, menuId) \n{\n var button;\n \n event = CEvent.initEvent(event);\n \n // Get the target button element.\n button = event.currentTarget;\n\n // If any other button menu is active, make this one active instead.\n if (cmfboard_activeButton != null && cmfboard_activeButton != button)\n {\n cmfboard_buttonClick(event, menuId);\n }\n}\n\nfunction cmfboard_depressButton(button) \n{\n var x, y;\n \n // Update the button's style class to make it look like it's\n // depressed.\n button.className += \" menuButtonActive\";\n \n // Make the associated drop down menu visible\n display = button.menu.style.display;\n button.menu.style.display = (display == \"none\" || display == '') ? \"none\" : \"block\";\n}\n\nfunction cmfboard_resetButton(button) \n{\n // Restore the button's style class. \n cmfboard_removeClassName(button, \"menuButtonActive\");\n \n // Hide the button's menu, first closing any sub menus.\n if (button.menu != null) \n {\n cmfboard_closeSubMenu(button.menu);\n button.menu.style.display = \"none\";\n }\n}\n\nfunction cmfboard_closeSubMenu(menu) \n{\n if (menu == null || menu.activeItem == null)\n return;\n \n // Recursively close any sub menus.\n if (menu.activeItem.subMenu != null) \n {\n cmfboard_closeSubMenu(menu.activeItem.subMenu);\n menu.activeItem.subMenu.style.display = \"none\";\n menu.activeItem.subMenu = null;\n }\n \n cmfboard_removeClassName(menu.activeItem, \"menuItemHighlight\");\n menu.activeItem = null;\n}\n\n\n// General utility functions.\nfunction cmfboard_getContainerWith(node, tagName, className) \n{\n // Starting with the given node, find the nearest containing element\n // with the specified tag name and style class. \n while (node != null) \n {\n if (node.tagName != null && node.tagName == tagName && cmfboard_hasClassName(node, className))\n {\n return node;\n }\n \n node = node.parentNode;\n }\n \n return node;\n}\n\n \nfunction cmfboard_hasClassName(el, name) \n{ \n var i, list;\n \n // Return true if the given element currently has the given class\n // name. \n list = el.className.split(\" \");\n for (i = 0; i < list.length; i++)\n if (list[i] == name)\n {\n return true;\n }\n \n return false;\n}\n\nfunction cmfboard_removeClassName(el, name) \n{ \n var i, curList, newList;\n \n if (el.className == null)\n {\n return;\n }\n \n // Remove the given class name from the element's className property.\n newList = new Array();\n curList = el.className.split(\" \");\n for (i = 0; i < curList.length; i++)\n {\n if (curList[i] != name)\n {\n newList.push(curList[i]);\n el.className = newList.join(\" \");\n }\n }\n}\n\nfunction cmfboard_getPageOffsetLeft(el) \n{\n var x;\n \n // Return the x coordinate of an element relative to the page. \n x = el.offsetLeft;\n if (el.offsetParent != null)\n x += cmfboard_getPageOffsetLeft(el.offsetParent);\n \n return x;\n}\n\nfunction cmfboard_getPageOffsetTop(el) \n{ \n var y;\n \n // Return the x coordinate of an element relative to the page. \n y = el.offsetTop;\n if (el.offsetParent != null)\n {\n y += cmfboard_getPageOffsetTop(el.offsetParent);\n }\n \n return y;\n}\n\n\n/* ----- reload_uni_details_form.js ----- */\nif (window.addEventListener) window.addEventListener(\"load\",reloadUniDetailsFormInit,false);\n\nfunction reloadUniDetailsFormInit ()\n{\n if (document.getElementById('uni_country_id')\n && (location.href.indexOf('uni_infos_form')!=-1\n || location.href.indexOf('manage_db_uni')!=-1)) {\n document.getElementById('uni_country_id').addEventListener(\"change\", reloadUniDetailsForm, false);\n }\n}\n\nfunction reloadUniDetailsForm()\n{\n var owner_country_id = \"\";\n\n if (document.getElementById('uni_country_id')) {\n uni_country_id = document.getElementById('uni_country_id').value;\n }\n\n var absolute_url = location.href;\n var url_array = absolute_url.split(\"/\");\n var method_url = \"\";\n\n for(i=0; i < url_array.length-1; i++) {\n method_url+=url_array[i]+\"/\";\n }\n method_url+=\"get_list_uni_categories\"\n\n var parameters = \"uni_country_id=\"+uni_country_id;\n\n xmlhttpRegion=getHTTPObject();\n xmlhttpUniCategory=getHTTPObject();\n\n if (xmlhttpRegion==null || xmlhttpUniCategory==null) {\n alert (\"Browser does not support HTTP Request\");\n return;\n } \n\n xmlhttpRegion.onreadystatechange=stateChanged;\n xmlhttpRegion.open(\"GET\",\"get_list_regions?\"+parameters,true);\n xmlhttpRegion.send(null);\n\n xmlhttpUniCategory.onreadystatechange=stateChanged;\n xmlhttpUniCategory.open(\"GET\",\"get_list_uni_categories?\"+parameters,true);\n xmlhttpUniCategory.send(null);\n}\n\nfunction stateChanged() \n{ \n if (xmlhttpRegion.readyState==4 || xmlhttpRegion.readyState==\"complete\") { \n handleResponseRegions(xmlhttpRegion.responseText);\n }\n if (xmlhttpUniCategory.readyState==4 || xmlhttpUniCategory.readyState==\"complete\") { \n handleResponseUniCategories(xmlhttpUniCategory.responseText);\n }\n} \n\nfunction handleResponseRegions(string) {\n // Parse the response\n var list_regions = string.split(\"\\n\");\n var list_ids = new Array();\n var list_names = new Array();\n\n // Collect region_ids and region_names\n for(var i=0; i < list_regions.length; i++) {\n region_item = list_regions[i].split('|');\n list_ids[i] = region_item[0];\n list_names[i] = region_item[1];\n }\n\n selectBox=document.getElementById('uni_region_id');\n\n // Empty the list of regions\n selectBox.innerHTML='';\n\n opt = document.createElement(\"option\");\n opt.setAttribute('value','');\n\n if (list_regions[0]) {\n var content = 'Choose a region'\n }\n else {\n var content = 'No regions available';\n }\n\n var txt = document.createTextNode(content);\n opt.appendChild(txt);\n\n selectBox.appendChild(opt);\n\n if(list_regions[0]) {\n for (i = 0 ; i < list_ids.length; i++ ) {\n opt = document.createElement(\"option\");\n opt.setAttribute('value',list_ids[i]);\n\n var txt = document.createTextNode(list_names[i]);\n opt.appendChild(txt);\n\n selectBox.appendChild(opt);\n }\n }\n}\n\nfunction handleResponseUniCategories(string) {\n // Parse the response\n var list_uni_categories = string.split(\"\\n\");\n var list_ids = new Array();\n var list_names = new Array();\n\n // Collect uni_category_ids and uni_category_names\n for(var i=0; i < list_uni_categories.length; i++) {\n uni_category_item = list_uni_categories[i].split('|');\n list_ids[i] = uni_category_item[0];\n list_names[i] = uni_category_item[1];\n }\n\n selectBox=document.getElementById('uni_category_id');\n\n // Empty the list of uni categories\n selectBox.innerHTML='';\n\n opt = document.createElement(\"option\");\n opt.setAttribute('value','');\n\n if (list_uni_categories[0]) {\n var content = 'Choose a university category'\n }\n else {\n var content = 'No university categories available';\n }\n\n var txt = document.createTextNode(content);\n opt.appendChild(txt);\n\n selectBox.appendChild(opt);\n\n if(list_uni_categories[0]) {\n for (i = 0 ; i < list_ids.length; i++ ) {\n opt = document.createElement(\"option\");\n opt.setAttribute('value',list_ids[i]);\n\n var txt = document.createTextNode(list_names[i]);\n opt.appendChild(txt);\n\n selectBox.appendChild(opt);\n }\n }\n}\n\n","truncated":"false"}
{"page":"http://www.629.cc/","url":"http://www.629.cc/i/js/common.js","body":"var ie = (navigator.appVersion.indexOf(\"MSIE\")!=-1);//IE\r\nvar ff = (navigator.userAgent.indexOf(\"Firefox\")!=-1);//Firefox\r\nvar ope = (navigator.userAgent.indexOf(\"Opera\")!=-1);//Opera\r\nvar op950 = (navigator.userAgent.indexOf(\"Opera/9.50\")!=-1);//Opera9.50\r\nvar op = ope&&!op950;\r\nvar sounds = \"1\";\r\n\r\nvar Sys = {};\r\nvar ua = navigator.userAgent.toLowerCase();\r\nvar s;\r\n(s = ua.match(/msie ([\\d.]+)/)) ? Sys.ie = s[1] :\r\n(s = ua.match(/firefox\\/([\\d.]+)/)) ? Sys.firefox = s[1] :\r\n(s = ua.match(/chrome\\/([\\d.]+)/)) ? Sys.chrome = s[1] :\r\n(s = ua.match(/opera.([\\d.]+)/)) ? Sys.opera = s[1] :\r\n(s = ua.match(/version\\/([\\d.]+).*safari/)) ? Sys.safari = s[1] : 0;\r\n(s = ua.match(/windows nt ([\\d.]+)/)) ? Sys.pfv = s[1] : 0;\r\nvar ie6 = Sys.ie ? Sys.ie==\"6.0\" : false;\r\nvar ie7 = Sys.ie ? Sys.ie==\"7.0\" : false;\r\nvar ie8 = Sys.ie ? Sys.ie==\"8.0\" : false;\r\nvar ie9 = Sys.ie ? Sys.ie==\"9.0\" : false;\r\n\r\nvar isFoundMsXml = false;\r\nfunction GetXmlObject()\r\n{\r\n\tvar ArrXmlObj=[\"MSXML4.DOMDocument\", \"MSXML3.DOMDocument\", \"MSXML2.DOMDocument\", \"MSXML.DOMDocument\", \"Microsoft.XmlDom\"];\r\n\tvar obj = null;\r\n\tfor(var i=0; i<ArrXmlObj.length; i++)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tobj = new ActiveXObject(ArrXmlObj[i]);\r\n\t\t\tisFoundMsXml = true;\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\tcatch(e){}\r\n\t}\r\n\treturn obj;\r\n}\r\n\r\nvar isFoundXmlHttp = false;\r\nfunction GetXmlHttpObject()\r\n{\r\n\tvar ArrXmlObj=['Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'];\r\n\tvar obj = null;\r\n\tif(window.ActiveXObject){\r\n\t\tfor(var i=0; i<ArrXmlObj.length; i++)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tobj = new ActiveXObject(ArrXmlObj[i]);\r\n\t\t\t\tisFoundXmlHttp = true;\r\n\t\t\t\tbreak;\r\n\t\t\t} \r\n\t\t\tcatch(e){}\r\n\t\t}\r\n\t}\r\n\telse if(window.XMLHttpRequest){\r\n\t\tobj = new XMLHttpRequest();\r\n\t}\r\n\treturn obj;\r\n}\r\n\r\nString.prototype.Trim = function()\r\n{\r\nreturn this.replace(/(^\\s*)|(\\s*$)/g, \"\");\r\n}\r\nString.prototype.LTrim = function()\r\n{\r\nreturn this.replace(/(^\\s*)/g, \"\");\r\n}\r\nString.prototype.Rtrim = function()\r\n{\r\nreturn this.replace(/(\\s*$)/g, \"\");\r\n}\r\nDate.prototype.format = function(format) //author: meizz\r\n{\r\n var o = {\r\n \"M+\" : this.getMonth()+1, //month\r\n \"d+\" : this.getDate(), //day\r\n \"h+\" : this.getHours(), //hour\r\n \"m+\" : this.getMinutes(), //minute\r\n \"s+\" : this.getSeconds(), //second\r\n \"q+\" : Math.floor((this.getMonth()+3)/3), //quarter\r\n \"S\" : this.getMilliseconds() //millisecond\r\n }\r\n if(/(y+)/.test(format)) format=format.replace(RegExp.$1,\r\n (this.getFullYear()+\"\").substr(4 - RegExp.$1.length));\r\n for(var k in o)if(new RegExp(\"(\"+ k +\")\").test(format))\r\n format = format.replace(RegExp.$1,\r\n RegExp.$1.length==1 ? o[k] : \r\n (\"00\"+ o[k]).substr((\"\"+ o[k]).length));\r\n return format;\r\n}\r\n\r\nfunction Hashtable(){\r\n\tthis._hash\t\t= new Object();\r\n\tthis.Add\t\t= function(key, value){\r\n\t\t\t\t\t\tif(typeof(key)!=\"undefined\"){\r\n\t\t\t\t\t\t\tthis._hash[key]=typeof(value)==\"undefined\"?null:value;\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\tthis.Get\t\t= function(key){return this._hash[key];}\r\n\tthis.Remove\t\t= function(key){if(this.Contains(key)==true){delete this._hash[key];}}\r\n\tthis.Count\t\t= function(){var i=0;for(var k in this._hash){if(typeof(this._hash[k])!=\"undefined\"){i++;}} return i;}\r\n\tthis.Keys\t\t= function(){var karr=[];for(var k in this._hash){karr[karr.length]=k;}return karr;}\r\n\tthis.Items\t\t= function(key){return this._hash[key];}\r\n\tthis.Contains\t= function(key){return typeof(this._hash[key])!=\"undefined\";}\r\n\tthis.Clear\t\t= function(){for(var k in this._hash){delete this._hash[k];}this._hash={};}\r\n\tthis.ToString\t= function(str){if(this.Count()==0){return \"\";}if(typeof(str)==\"undefined\"){str=\"\";}var varr=[];for(var k in this._hash){if(typeof(this._hash[k])!=\"undefined\"){varr[varr.length]=this._hash[k];}}return varr.join(str);}\r\n};\r\n\r\nvar GetNodeValue = function(obj)\r\n{\r\n var str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.text;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.childNodes[0].nodeValue;\r\n }\r\n catch(ex)\r\n {\r\n str = \"\";\r\n }\r\n }\r\n return str;\r\n}\r\n\r\nvar SetInnerText = function(obj, str){\r\n if(window.ActiveXObject) //IE\r\n {\r\n obj.innerText = str;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n obj.textContent = str;\r\n }\r\n catch(ex)\r\n {\r\n }\r\n }\r\n}\r\n\r\nvar GetInnerText = function(obj){\r\n\tvar str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.innerText;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.textContent;\r\n }\r\n catch(ex)\r\n {\r\n }\r\n }\r\n\treturn str;\r\n}\r\n\r\nif(document.implementation && document.implementation.createDocument && !window.ActiveXObject)\r\n{\r\n XMLDocument.prototype.loadXML = function(xmlString)\r\n {\r\n var childNodes = this.childNodes;\r\n for (var i = childNodes.length - 1; i >= 0; i--)\r\n this.removeChild(childNodes[i]);\r\n\r\n var dp = new DOMParser();\r\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\r\n var newElt = this.importNode(newDOM.documentElement, true);\r\n this.appendChild(newElt);\r\n };\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var oNSResolver = this.createNSResolver(this.documentElement)\r\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\r\n var aResult = [];\r\n for( var i = 0; i < aItems.snapshotLength; i++)\r\n {\r\n aResult[i] = aItems.snapshotItem(i);\r\n }\r\n return aResult;\r\n }\r\n\r\n // prototying the Element\r\n Element.prototype.selectNodes = function(cXPathString)\r\n {\r\n if(this.ownerDocument.selectNodes)\r\n {\r\n return this.ownerDocument.selectNodes(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var xItems = this.selectNodes(cXPathString, xNode);\r\n if( xItems.length > 0 )\r\n {\r\n return xItems[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n \r\n // prototying the Element\r\n Element.prototype.selectSingleNode = function(cXPathString)\r\n { \r\n if(this.ownerDocument.selectSingleNode)\r\n {\r\n return this.ownerDocument.selectSingleNode(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n\tHTMLElement.prototype.insertAdjacentHTML=function(where, html) \r\n\t{ \r\n\t\tvar e=this.ownerDocument.createRange(); \r\n\t\te.setStartBefore(this); \r\n\t\te=e.createContextualFragment(html); \r\n\t\tswitch (where) \r\n\t\t{ \r\n\t\t\tcase 'beforeBegin': this.parentNode.insertBefore(e, this);break; \r\n\t\t\tcase 'afterBegin': this.insertBefore(e, this.firstChild); break; \r\n\t\t\tcase 'beforeEnd': this.appendChild(e); break; \r\n\t\t\tcase 'afterEnd': \r\n\t\t\tif(!this.nextSibling) this.parentNode.appendChild(e); \r\n\t\t\telse this.parentNode.insertBefore(e, this.nextSibling); break; \r\n\t\t} \r\n\t}\r\n}\r\nif(typeof(HTMLElement)!=\"undefined\" && !window.opera && !window.ActiveXObject)\r\n{ \r\n\tHTMLElement.prototype.__defineGetter__(\"outerHTML\",function()\r\n\t{ \r\n\t var a=this.attributes, str=\"<\"+this.tagName, i=0;for(;i<a.length;i++)\r\n\t if(a[i].specified) str+=\" \"+a[i].name+'=\"'+a[i].value+'\"';\r\n\t if(!this.canHaveChildren) return str+\" />\";\r\n\t return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\";\r\n\t}); \r\n\tHTMLElement.prototype.__defineSetter__(\"outerHTML\",function(s)\r\n\t{ \r\n\t var d = document.createElement(\"DIV\"); d.innerHTML = s;\r\n\t for(var i=0; i<d.childNodes.length; i++)\r\n\t\t\tthis.parentNode.insertBefore(d.childNodes[i], this);\r\n\t this.parentNode.removeChild(this);\r\n\t});\r\n\tHTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function()\r\n\t{\r\n\t return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(this.tagName.toLowerCase());\r\n\t});\r\n\r\n\tHTMLElement.prototype.__defineGetter__(\"innerText\", function()\r\n\t\t{\r\n\t\t\tvar anyString = \"\";\r\n\t\t\tvar childS = this.childNodes;\r\n\t\t\tfor(var i=0; i<childS.length; i++) {\r\n\t\t\t\tif(childS[i].nodeType==1)\r\n\t\t\t\t\tanyString += childS[i].tagName==\"BR\" ? '\\n' : childS[i].innerText;\r\n\t\t\t\telse if(childS[i].nodeType==3)\r\n\t\t\t\t\tanyString += childS[i].nodeValue;\r\n\t\t\t}\r\n\t\t\treturn anyString;\r\n\t\t}\r\n\t);\r\n\tHTMLElement.prototype.__defineSetter__(\"innerText\",\tfunction(sText)\r\n\t\t{ \r\n\t\t\tthis.textContent=sText; \r\n\t\t} \r\n\t); \r\n}\r\n\r\nfunction FormatPercent(s,t,l){\r\n\tif(parseInt(s)==0 || parseInt(t)==0) return \"0%\";\r\n\tvar tmp;\r\n\ttmp = parseFloat(s) * 100 / parseFloat(t);\r\n\tif(l<1){\r\n\t\treturn Math.round(tmp) + \"%\";\r\n\t}\r\n\telse{\r\n\t\tif(tmp<1)\r\n\t\t{\r\n\t\t\treturn tmp.toPrecision(l) + \"%\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t return tmp.toPrecision(l+1) + \"%\";\r\n\t\t}\r\n\t}\t\r\n}\r\n\r\nfunction FormatNumberPercent(s,l){\r\n\tif(parseFloat(s)==0) return \"0%\";\r\n\ttmp = parseFloat(s) * 100;\r\n\tif(l<1){\r\n\t\treturn Math.round(s) + \"%\";\r\n\t}\r\n\telse{\r\n\t\tif(tmp<1)\r\n\t\t{\r\n\t\t\treturn tmp.toPrecision(l) + \"%\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t return tmp.toPrecision(l+1) + \"%\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\t \r\nfunction FormatDecimal(s,l){\r\n\tif(l<1) return s;\r\n\tvar t = parseFloat(s);\r\n\tif(t<1){\r\n\t\treturn t.toPrecision(l);\r\n\t}\r\n\telse{\r\n\t\treturn t.toPrecision(l+1);\r\n\t}\r\n\tif(s.indexOf(\".\")==-1){\r\n\t\treturn s;\r\n\t}\r\n\telse{\r\n\t\tvar int,decimal;\r\n\t\tvar tarr = s.split(\".\");\r\n\t\tint = tarr[0];\r\n\t\tdecimal = tarr[1];\r\n\t\tif(l>0){\r\n\r\n\t\t\tif(decimal.length>l)\r\n\t\t\t{\r\n\t\t\t\tif(parseInt(decimal.charAt(l))>=5){\r\n\t\t\t\t\tdecimal = parseInt(decimal.substring(0,l)) + 1;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdecimal = decimal.substring(0,l);\r\n\t\t\t\t}\r\n\t\t\t\treturn int + \".\" + decimal;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(parseInt(decimal.charAt(0))>=5){\r\n\t\t\t\tint = parseInt(int) + 1;\r\n\t\t\t}\r\n\t\t\treturn int;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction SetHtml(objID, html){\r\n\tif(document.getElementById(objID)){\r\n\t\tdocument.getElementById(objID).innerHTML = html;\r\n\t}\r\n\telse if(document.all(objID)){\r\n\t\tdocument.all(objID).innerHTML = html;\r\n\t}\r\n}\r\n\r\nfunction get_cookie(Name) { \r\n\tvar search = Name + \"=\" \r\n\tvar returnvalue = \"\"; \r\n\tif (document.cookie.length > 0) { \r\n\t\toffset = document.cookie.indexOf(search); \r\n\t\tif (offset != -1) { \r\n\t\t\toffset += search.length \r\n\t\t\tend = document.cookie.indexOf(\";\", offset); \r\n\t\t\tif (end == -1) end = document.cookie.length; \r\n\t\t\treturnvalue=unescape(document.cookie.substring(offset, end))\r\n\t\t} \r\n\t} \r\n\treturn returnvalue; \r\n}\r\n\r\nfunction set_cookie(Name,value){ \r\n\tdocument.cookie=Name+\"=\"+value;\r\n}\r\n\r\nfunction setCookie(name,value)\r\n{\r\n var Days = 30;\r\n var exp = new Date(); //new Date(\"December 31, 9998\");\r\n exp.setTime(exp.getTime() + Days*24*60*60*1000);\r\n document.cookie = name + \"=\"+ escape (value) + \";expires=\" + exp.toGMTString();\r\n}\r\nfunction getCookie(name)\r\n{\r\n var arr,reg=new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\");\r\n if(arr=document.cookie.match(reg)) return unescape(arr[2]);\r\n else return \"\";\r\n}\r\nfunction delCookie(name)\r\n{\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() - 1);\r\n var cval=getCookie(name);\r\n if(cval!=null) document.cookie= name + \"=\"+cval+\";expires=\"+exp.toGMTString();\r\n}\r\n\r\nvar PassPortApi = {\r\n\tdomain:\"629.cc\",\r\n\tgetDomain:function(){\r\n\t\tvar hostname = document.domain.split('.');\r\n\t\tvar l = hostname.length;\r\n\t\tif(l<=2) return document.domain;\r\n\t\treturn hostname[l-2] + '.' + hostname[l-1];\r\n\t},\r\n\taddCookie:function(name,value,expireHours){\r\n\t\tif(this.domain==\"\")this.domain = this.getDomain();\r\n\t\tvar cookieString = name + \"=\" + escape(value) + \"; path=/; domain=.\" + this.domain + \";\";\r\n\t\tif(expireHours>0){\r\n\t\t\tvar date=new Date();\r\n\t\t\tdate.setTime(date.getTime() + expireHours*3600*1000);\r\n\t\t\tcookieString = cookieString + \"expires=\" + date.toGMTString() + \";\";\r\n\t\t}\r\n\t\tdocument.cookie = cookieString;\r\n\t},\r\n\tgetCookie:function(name){\r\n\t\ttry{\r\n\t\t\tvar arr,reg=new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\");\r\n\t\t\tif(arr=document.cookie.match(reg)) return unescape(arr[2]);\r\n\t\t\telse return \"\";\r\n\t\t}\r\n\t\tcatch(e){return \"\";}\r\n\t},\r\n\tdeleteCookie:function(name){\r\n\t\tif(this.domain==\"\") this.domain=this.getDomain();\r\n\t\tvar exp = new Date();\r\n\t\texp.setTime(exp.getTime()-100000);\r\n\t\tvar cval = this.getCookie(name);\r\n\t\tdocument.cookie = name + \"=\" + cval + \"; expires=\" + exp.toGMTString() + \"; path=/; domain=.\" + this.domain + \";\";\r\n\t}\r\n};\r\n\r\nvar PosTyle = { \r\n\t//Page \r\n\tgetBodyWidth : function() \r\n\t{ \r\n\t\treturn document.documentElement.clientWidth || document.body.clientWidth || 0; \r\n\t},\r\n\tgetBodyHeight : function() \r\n\t{ \r\n\t\treturn document.documentElement.clientHeight || document.body.clientHeight || 0; \r\n\t},\r\n\tgetBodyLeft : function() \r\n\t{ \r\n\t\treturn document.documentElement.scrollLeft || document.body.scrollLeft || 0; \r\n\t},\r\n\tgetBodyTop : function() \r\n\t{ \r\n\t\treturn document.documentElement.scrollTop || document.body.scrollTop || 0; \r\n\t},\r\n\tgetBody : function() \r\n\t{ \r\n\t\treturn { \r\n\t\t\twidth : this.getBodyWidth(), \r\n\t\t\theight : this.getBodyHeight(), \r\n\t\t\tleft : this.getBodyLeft(), \r\n\t\t\ttop : this.getBodyTop() \r\n\t\t}; \r\n\t},\r\n\tgetScreenWidth : function() \r\n\t{ \r\n\t\treturn window.screen.width; \r\n\t},\r\n\tgetScreenHeight : function() \r\n\t{ \r\n\t\treturn window.screen.height; \r\n\t},\r\n\r\n\t//Element \r\n\tgetElementWidth : function(o) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn o.offsetWidth; \r\n\t},\r\n\tgetElementHeight : function(o) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn o.offsetHeight; \r\n\t},\r\n\tgetElementLeft : function(o) \r\n\t{ \r\n\t\tif (o == null) \r\n\t\t{ \r\n\t\treturn 0; \r\n\t\t} \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn (o.offsetLeft + this.getElementLeft(o.offsetParent)); \r\n\t},\r\n\tgetElementTop : function(o) \r\n\t{ \r\n\t\tif (o == null) \r\n\t\t{ \r\n\t\t\treturn 0; \r\n\t\t} \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn (o.offsetTop + this.getElementTop(o.offsetParent)); \r\n\t},\r\n\tgetElement : function(o) \r\n\t{ \r\n\t\treturn { \r\n\t\t\twidth : this.getElementWidth(o), \r\n\t\t\theight : this.getElementHeight(o), \r\n\t\t\tleft : this.getElementLeft(o), \r\n\t\t\ttop : this.getElementTop(o) \r\n\t\t}; \r\n\t},\r\n\tgetBorderLeft : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderLeftWidth\")); \r\n\t},\r\n\tgetBorderTop : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderTopWidth\")); \r\n\t},\r\n\tgetBorderRight : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderRightWidth\")); \r\n\t}, \r\n\tgetBorderBottom : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderBottomWidth\")); \r\n\t}, \r\n\tgetBorder : function(o) \r\n\t{ \r\n\t\treturn { \r\n\t\t\tleft : this.getBorderLeft(o), \r\n\t\t\ttop : this.getBorderTop(o), \r\n\t\t\tright : this.getBorderRight(o), \r\n\t\t\tbottom : this.getBorderBottom(o) \r\n\t\t}; \r\n\t}, \r\n\r\n\t//Style \r\n\tgetCurrentStyle : function(o, s) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\tif (o.currentStyle) \r\n\t\t{ \r\n\t\t\treturn o.currentStyle[s]; \r\n\t\t} \r\n\t\telse if (document.defaultView.getComputedStyle) \r\n\t\t{ \r\n\t\t\treturn document.defaultView.getComputedStyle(o, '').getPropertyValue(s.replace(/([A-Z])/g, '-$1').toLowerCase()); \r\n\t\t} \r\n\t\telse \r\n\t\t{ \r\n\t\t\treturn o.style[s]; \r\n\t\t} \r\n\t},\r\n\tsetStyle : function(o, s, v) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\";\r\n\t\tif (Browser.moz && s == \"cursor\" && v == \"hand\") \r\n\t\t{ \r\n\t\t\tv = \"pointer\"; \r\n\t\t}\r\n\t\to.style[s] = v; \r\n\t} \r\n};\r\n\r\nfunction langSelect(){\r\n\tvar tmp = \"\";\r\n\ttmp += \"<select onchange=\\\"setLang(this.value);\\\" name='langselect' id='langselect'>\";\r\n\tif(lang==1) {\r\n\t\ttmp += \"<option value=\\\"1\\\" selected>\u00d6\u00d0\u00ce\u00c4(\u00b7\u00b1\u00cc\u00e5)</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"1\\\">\u00d6\u00d0\u00ce\u00c4(\u00b7\u00b1\u00cc\u00e5)</option>\";\r\n\t}\r\n\tif(lang==2){\r\n\t\ttmp += \"<option value=\\\"2\\\" selected>\u00d6\u00d0\u00ce\u00c4(\u00bc\u00f2\u00cc\u00e5)</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"2\\\">\u00d6\u00d0\u00ce\u00c4(\u00bc\u00f2\u00cc\u00e5)</option>\";\r\n\t}\r\n\tif(lang==3){\r\n\t\ttmp += \"<option value=\\\"3\\\" selected>English</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"3\\\">English</option>\";\r\n\t}\r\n\ttmp += \"</select>\";\r\n\treturn tmp;\r\n}\r\n\r\nfunction soundSelect(){\r\n\tvar tmp = \"\";\r\n\ttmp += '<select name=\"tsounds\" onchange=\"setSounds(this.value);\" id=\"tsounds\">';\r\n\tif(sounds==1){\r\n\t\ttmp += '<option value=\"1\" selected>\u00c9\u00f9\u00d2\u00f4\u00bf\u00aa</option>';\r\n\t}\r\n\telse{\r\n\t\ttmp += '<option value=\"1\">\u00c9\u00f9\u00d2\u00f4\u00bf\u00aa</option>';\r\n\t}\r\n\tif(sounds==0){\r\n\t\ttmp += '<option value=\"0\" selected>\u00c9\u00f9\u00d2\u00f4\u00b9\u00d8</option>';\r\n\t}\r\n\telse{\r\n\t\ttmp += '<option value=\"0\">\u00c9\u00f9\u00d2\u00f4\u00b9\u00d8</option>';\r\n\t}\r\n\ttmp += '</select>';\r\n\treturn tmp;\r\n}\r\n\r\nfunction noData(){\r\n\tvar tmp = \"\";\r\n\ttmp += \"<table width='100%' height='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='#696969'><tr><td align='center' bgcolor='#ffffff' style='padding-top:10px; padding-bottom:10px;'><span style='font-size:16px; color:#f00; font-weight:bold;'>\u00d4\u00dd\u00ca\u00b1\u00c3\u00bb\u00d3\u00d0\u00ca\u00fd\u00be\u00dd\u00a1\u00a3 www.629.cc</span></td></tr></table>\"\r\n\treturn tmp;\r\n}\r\n\r\nfunction loadData(){\r\n\tvar tmp = \"\";\r\n\ttmp += '<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#696969\"><tr><td align=\"center\" bgcolor=\"#ffffff\" style=\"padding-top:10px; padding-bottom:10px;\"><span style=\"font-size:12px; color:#000;\"><img src=\"/i/loading.gif\" width=\"16\" height=\"16\" border=\"0\" align=\"absmiddle\">\u00ca\u00fd\u00be\u00dd\u00bc\u00d3\u00d4\u00d8\u00d6\u00d0\u00a3\u00ac\u00c7\u00eb\u00c9\u00d4\u00ba\u00f2\u00a1\u00a3\u00a1\u00a3\u00a1\u00a3<br>score loading, please wait!!!</span></td></tr></table>';\r\n\treturn tmp;\r\n}\r\n\r\nfunction htmldecode(str){\r\n\tvar tmp = str;\r\n\ttmp = tmp.replace(/&amp;/ig, \"&\").replace(/&lt;/ig, \"<\").replace(/&gt;/ig, \">\").replace(/&quot;/ig, \"\\\"\");\r\n\treturn tmp;\r\n}\r\n\r\nfunction htmlencode(str){\r\n\tvar tmp = str;\r\n\ttmp = tmp.replace(\"<\", \"&lt;\").replace(\">\", \"&gt;\").replace(\"\\\"\", \"&quot;\").replace(\"&\", \"&amp;\");\r\n\treturn tmp;\r\n}\r\n\r\nfunction getExplore(){\r\n\tvar ie = (navigator.appVersion.indexOf(\"MSIE\")!=-1);\r\n\tvar ff = (navigator.userAgent.indexOf(\"Firefox\")!=-1);\r\n\tif(ie){\r\n\t\treturn \"ie\";\r\n\t}\r\n\tif(ff){\r\n\t\treturn \"ff\";\r\n\t}\r\n\treturn \"\";\r\n}\r\n\r\nfunction getScrollTop(){\r\n\tvar obj_top = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;\r\n\treturn obj_top;\r\n}\r\n\r\nfunction getScrollLeft(){\r\n\tvar obj_left = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;\r\n\treturn obj_left;\r\n}\r\n\r\nfunction getClientWidth(){\r\n\tvar obj_width = (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.clientWidth;\r\n\treturn obj_width;\r\n}\r\n\r\nfunction getClientHeight(){\r\n\tvar obj_height = (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;\t\r\n\treturn obj_height;\r\n}\r\n\r\nfunction $(id){\r\n\treturn document.getElementById(id);\r\n}\r\n\r\nfunction getDomainName(){\r\n\tvar host = window.location.hostname;\r\n\tvar port = window.location.port;\r\n\tvar domainName = \"http://\" + host;\r\n\tif(port != \"\"){\r\n\t\tdomainName += \":\" + port;\r\n\t}\r\n\treturn domainName;\r\n}\r\n\r\nfunction selectServer(){\r\n\tvar tmp = \"\";\r\n\tvar host = window.location.hostname;\r\n\tvar hostArray = host.split(\".\");\r\n\tif(hostArray[0]==\"wwww\"){\r\n\t\ttmp += \"<li><span onclick=\\\"gotoServer('tel');\\\" class='btnblue2' style='width:40px;height:16px;cursor:pointer;' title='\u00d7\u00aa\u00b5\u00bd\u00b5\u00e7\u00d0\u00c5\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00b5\u00e7\u00d0\u00c5</span></li>\";\r\n\t\ttmp += \"<li><span class='btnblue2' title='\u00b5\u00b1\u00c7\u00b0\u00cd\u00f8\u00cd\u00a8\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00cd\u00f8\u00cd\u00a8</span></li>\";\r\n\t}else{\r\n\t\ttmp += \"<li><span class='btnblue2' title='\u00b5\u00b1\u00c7\u00b0\u00b5\u00e7\u00d0\u00c5\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00b5\u00e7\u00d0\u00c5</span></li>\";\r\n\t\ttmp += \"<li><span onclick=\\\"gotoServer('cnc');\\\" class='btnblue2' style='width:40px;height:16px;cursor:pointer;' title='\u00d7\u00aa\u00b5\u00bd\u00cd\u00f8\u00cd\u00a8\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00cd\u00f8\u00cd\u00a8</span></li>\";\r\n\t}\r\n\treturn tmp;\r\n}\r\n\r\nfunction gotoServer(server){\r\n\tvar tmp = server;\r\n\tvar url = \"http://www.629.cc\" + getURL();\r\n\tswitch(tmp){\r\n\t\tcase \"tel\":\r\n\t\t\turl = \"http://www.629.cc\" + getURL();\r\n\t\tbreak;\r\n\t\tcase \"cnc\":\r\n\t\t\turl = \"http://wwww.629.cc\" + getURL();\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\turl = \"http://www.629.cc\" + getURL();\r\n\t\tbreak;\r\n\t}\r\n\tlocation.replace(url);\r\n}\r\n\r\nfunction getURL(){\r\n\tvar tmp = location.href;\r\n\ttmp = tmp.replace(\"//\", \"\");\r\n\tvar index = tmp.indexOf(\"/\");\r\n\tvar temp = tmp.substring(index, tmp.length);\r\n\treturn temp;\r\n}\r\n\r\nvar checkdt = function(dt){\r\n\tvar re = /^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-9]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/gi;\r\n\treturn re.test(dt);\r\n};\r\n\r\nvar ParseDateTime = function(dtstr){\r\n\tdtstr = dtstr.replace(/\\//ig, \"-\");\r\n\tvar dt = dtstr.replace(/\\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\\d+/g);\r\n\tvar d = eval('new Date(' + dt + ')'); \r\n\treturn d;\r\n};\r\n","truncated":"false"}
{"page":"http://www.grantsonline.ie/","url":"https://www.grantsonline.ie/staticcontent/scripts/global/cross_browser.js","body":"\nvar strStatusMessage = \"Copyright Capita Integrated Business Solutions \" + new Date().getFullYear();\t\nvar COPYRIGHT_MESSAGE = \"Copyright Capita Integrated Business Solutions \" + new Date().getFullYear();\t\n/** \n * BROWSER detection / OS detection Object\n * example of use within the eSeries Framework is as follows:-\n * RAW:(Direct - no framework assistence): if (BrowserDetect.browser == \"Explorer\" && BrowserDetect.version > ...) {\n * CORE:(via Framework Support): if (BROWSER_MSIE_SUPPORT && BrowserDetect.version > BROWSER_MSIE_VERSION) {\n * Note: The eSeries framework only supports certain browsers configs for lookups, masks, ec.\n * See eseries.properties for a full list of supported browsers and versions (Basically replace '.' with '_' to be able\n * to resolve a browser property in your scripts. i.e. in the .property file it is specified as \n * config.logon.browser.chrome.support=false which equals var BROWSER_CHROME_SUPPORT as a javascript boolean value\n * @NOTE: Modified script based on script From http://www.quirksmode.org/js/detect.html \t \n */\nvar BrowserDetect = {\n\tinit: function () {\n\t\tthis.browser = this.searchString(this.dataBrowser) || \"An unknown browser\";\n\t\tthis.version = this.searchVersion(navigator.userAgent)\n\t\t\t|| this.searchVersion(navigator.appVersion)\n\t\t\t|| \"an unknown version\";\n\t\tthis.OS = this.searchString(this.dataOS) || \"an unknown OS\";\n\t},\n\tsearchString: function (data) {\n\t\tfor (var i=0;i<data.length;i++)\t{\n\t\t\tvar dataString = data[i].string;\n\t\t\tvar dataProp = data[i].prop;\n\t\t\tthis.versionSearchString = data[i].versionSearch || data[i].identity;\n\t\t\tif (dataString) {\n\t\t\t\tif (dataString.indexOf(data[i].subString) != -1)\n\t\t\t\t\treturn data[i].identity;\n\t\t\t}\n\t\t\telse if (dataProp)\n\t\t\t\treturn data[i].identity;\n\t\t}\n\t},\n\tsearchVersion: function (dataString) {\n\t\tvar index = dataString.indexOf(this.versionSearchString);\n\t\tif (index == -1) return;\n\t\treturn parseFloat(dataString.substring(index+this.versionSearchString.length+1));\n\t},\n\tdataBrowser: [\n\t\t{\tstring: navigator.userAgent,subString: \"Chrome\",identity: \"Chrome\" \t},\n\t\t{ \tstring: navigator.userAgent,subString: \"OmniWeb\",versionSearch: \"OmniWeb/\",identity: \"OmniWeb\"\t},\n\t\t{\tstring: navigator.vendor,subString: \"Apple\",identity: \"Safari\",versionSearch: \"Version\"\t},\n\t\t{\tprop: window.opera,identity: \"Opera\" },\n\t\t{\tstring: navigator.vendor,subString: \"iCab\",identity: \"iCab\" },\n\t\t{\tstring: navigator.vendor,subString: \"KDE\",identity: \"Konqueror\"\t},\n\t\t{\tstring: navigator.userAgent,subString: \"Firefox\",identity: \"Firefox\"},\n\t\t{\tstring: navigator.vendor,subString: \"Camino\",identity: \"Camino\"\t},\n\t\t{\tstring: navigator.userAgent,subString: \"Netscape\",identity: \"Netscape\" \t}, /* for newer Netscapes (6+) */\n\t\t{\tstring: navigator.userAgent,subString: \"MSIE\",identity: \"Explorer\",versionSearch: \"MSIE\" },\n\t\t{ string: navigator.userAgent,subString: \"Trident/\",identity: \"Explorer\",versionSearch: \"rv:\" },\n\t\t{\tstring: navigator.userAgent,subString: \"Gecko\",\tidentity: \"Mozilla\",versionSearch: \"rv\"\t},\n\t\t{ \tstring: navigator.userAgent,subString: \"Mozilla\",identity: \"Netscape\",versionSearch: \"Mozilla\"\t} /* for older Netscapes (4-) */\n\t],\n\tdataOS : [\n\t\t{ string: navigator.platform,subString: \"Win\",identity: \"Windows\"\t},\n\t\t{ string: navigator.platform,subString: \"Mac\",identity: \"Mac\"\t},\n\t\t{ string: navigator.userAgent,subString: \"iPhone\",identity: \"iPhone/iPod\" },\n\t\t{ string: navigator.platform,subString: \"Linux\",identity: \"Linux\" }\n\t]\t\n};\nBrowserDetect.init();\t\n\n\n/** Cross browser setTimeout() that accepts objects as 3rd argument \n * https://developer.mozilla.org/en/docs/Web/API/window.setTimeout */ \n if (document.all && !window.setTimeout.isPolyfill) {\n var __nativeST__ = window.setTimeout;\n window.setTimeout = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {\n var aArgs = Array.prototype.slice.call(arguments, 2);\n return __nativeST__(vCallback instanceof Function ? function () {\n vCallback.apply(null, aArgs);\n } : vCallback, nDelay);\n };\n window.setTimeout.isPolyfill = true;\n }\n\n if (document.all && !window.setInterval.isPolyfill) {\n var __nativeSI__ = window.setInterval;\n window.setInterval = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {\n var aArgs = Array.prototype.slice.call(arguments, 2);\n return __nativeSI__(vCallback instanceof Function ? function () {\n vCallback.apply(null, aArgs);\n } : vCallback, nDelay);\n };\n window.setInterval.isPolyfill = true;\n }\n\n\n\nfunction eSeriesSocketWrapper() {\n\t\n\tthis._socket = getNewXmlHttp();\n\t\n\tthis.async = true;\t\t\n\tthis.method = \"GET\";\n\tthis.documentElement = null;\n\tthis.parseError = null;\n\tthis.responseXML = null;\n\tthis.xml = null;\n\t\t\t\n\tthis._url = \"\";\n\tthis._xml = \"\";\n\t\n\teSeriesSocketWrapper.prototype.createElement = function (element) {\n\t\tif (this.documentElement == null) {\n\t\t\tthis.loadXML(\"\");\n\t\t}\n\t\treturn this.documentElement.createElement(element);\n\t}; \n\t\n\t\n\teSeriesSocketWrapper.prototype.load = function (url) {\t \n\t\tthis._url = url;\n\t\tthis._reset();\n\t\tthis._socket.open(this.method, this._url, this.async);\n\t\tif (this.method == \"GET\") {\n\t\t\tthis._socket.send(null);\n\t\t} else if (this.method == \"POST\") {\n\t\t\tthis._socket.send(this._xml);\n\t\t}\n\t\tthis._init();\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.selectSingleNode = function (xpath) {\n\t\treturn this.documentElement.selectSingleNode(xpath);\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.selectNodes = function (xpath) {\n\t\treturn this.documentElement.selectNodes(xpath);\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.getAllResponseHeaders = function () {\t\n\t\ttry {\n\t\t\treturn this._socket._object.getAllResponseHeaders();\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.getResponseHeader = function (sName) {\t\n\t\ttry {\n\t\t\treturn this._socket._object.getResponseHeader(sName);\n\t\t} catch (e) {\n\t\t\treturn null;\n\t\t}\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.abort = function () {\t\n\t\treturn this._socket._object.abort();\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.addEventListener = function (sName, fHandler, bUseCapture) {\t\n\t\treturn this._socket._object.addEventListener(sName, fHandler, bUseCapture);\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.dispatchEvent = function (oEvent) {\t\n\t\treturn this._socket._object.dispatchEvent(oEvent);\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.removeEventListener = function (sName, fHandler, bUseCapture) {\t\n\t\treturn this._socket._object.removeEventListener(sName, fHandler, bUseCapture);\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.setRequestHeader = function (sName, sValue) {\t\n\t\treturn this._socket._object.setRequestHeader(sName, sValue);\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.send = function (vData) {\t\n\t\treturn this._socket._object.send(vData);\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.open = function (sMethod, sUrl, bAsync, sUser, sPassword) {\t\n\t\treturn this._socket._object.open(sMethod, sUrl, bAsync, sUser, sPassword);\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.loadXML = function (xmlText) {\n\t\tthis._reset();\n\t\tvar xmlDoc = null; \t\t\n \t\ttry { \n \t\t\txmlDoc = new ActiveXObject('Microsoft.XMLDOM');\n \t\t\txmlDoc.async = 'false';\n \t\t\txmlDoc.loadXML(xmlText);\n \t\t} catch(e) { \t\t\t\n \t\t\ttry { \n \t\t\t\tvar domParser = new DOMParser();\n \t\t\t\txmlDoc = domParser.parseFromString(xmlText, 'text/xml');\n \t\t\t} catch(e) {\n \t\t\t\tmessageShow(\"Failed to prototype.loadXML: \" + e.message);\n \t\t\t}\n\t\t}\n\t\tthis.documentElement = xmlDoc;\t\t\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype.cloneNode = function (deepCopy) {\n\t\treturn this._socket.cloneNode(deepCopy);\n\t};\n\t\n\t\n\n\teSeriesSocketWrapper.prototype._reset = function () {\n\t\tthis.documentElement = null;\t\n\t\tthis._xml = \"\";\n\t\tthis.parseError = null;\n\t\tthis.responseXML = null;\n\t\tthis.xml = null;\n\t};\n\t\n\t\n\teSeriesSocketWrapper.prototype._init = function () {\n\t\tthis._reset();\n\t\t\n\t\t/* I.E. Provides content sent with headers of html/text within the responseXML\n\t\t where as FireFox and Safari leave this attribute undefined.\n\t\t Attempt to populate so we don't need to change headers for existing applications \t\n\t\tif (this._socket._object.responseXML == null && this._socket._object.responseText != null) {\n \t\t\ttry { // Firefox, Mozilla, Opera, etc...\n \t\t\t\tvar domParser = new DOMParser();\n \t\t\t\tthis.documentElement = domParser.parseFromString(this._socket._object.responseText, 'text/xml');\n \t\t\t} catch(e) {\n \t\t\t\tmessageShow(\"Failed to parse responseText \" + e.message);\n \t\t\t}\n\t\t} else {\n\t\t\tthis.documentElement = this._socket._object.responseXML.documentElement;\t\t\n\t\t}\n\t\t*/\n\t\t\t\t\n\t\ttry { this.documentElement = this._socket._object.responseXML.documentElement; } catch (e) { /* ignore */ }\n\t\ttry { this.parseError = this._socket._object.responseXML.parseError; } catch (e) { /* ignore */ }\n\t\ttry { this.responseXML = this._socket._object.responseXML; } catch (e) { /* ignore */ }\n\t\ttry { this.xml = this._socket._object.responseXML.xml; } catch (e) { /* ignore */ }\n\t\t\n\t};\n\t\n}\n\n\n\nif (BrowserDetect.browser != \"Explorer\") {\n\n\tif (typeof KeyboardEvent != \"undefined\" && typeof KeyboardEvent.prototype.__defineGetter__ != \"undefined\") {\n\t \tKeyboardEvent.prototype.__defineSetter__(\"keyCode\", function(code) {\n\t\t\tthis.intKeyCode = code; \n\t\t\treturn code;\n\t\t});\n\t\tKeyboardEvent.prototype.__defineGetter__(\"keyCode\", function() {\n\t\t\tif (this.intKeyCode != undefined) { \n\t\t\t\treturn this.intKeyCode; \n\t\t\t} else { \n\t\t\t\treturn this.which;\n\t\t\t}\n\t\t});\t\n\t}\n\tif (!Document.prototype.loadXML) {\n\t\tDocument.prototype.loadXML = function (s) {\n\t\t\n\t\t var doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\n\t\t\n\t\t while (this.hasChildNodes())\n\t\t this.removeChild(this.lastChild);\n\t\t\n\t\t for (var i = 0; i < doc2.childNodes.length; i++) {\n\t\t this.appendChild(this.importNode(doc2.childNodes[i], true));\n\t\t }\n\t\t};\n\t}\n\n\tXMLDocument.prototype.__load__ = XMLDocument.prototype.load; \n\tXMLDocument.prototype.load = function (url) {\n\t\tif (url.indexOf(\"?\") > -1) {\n\t\t\turl += \"&XML_HTTP_REQUEST=true\";\n\t\t} else {\n\t\t\turl += \"?XML_HTTP_REQUEST=true\";\n\t\t}\n\t\tthis.__load__(url);\n\t};\n\t\n\n\tNode.prototype.swapNode = function (node) {\n \t\tvar nextSibling = this.nextSibling;\n \t\tvar parentNode = this.parentNode;\n \t\tnode.parentNode.replaceChild(this, node);\n \t\tparentNode.insertBefore(node, nextSibling); \n\t}\n\n\n Node.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n\tXMLDocument.prototype.__defineSetter__(\"xml\", function () {\n\t\tthrow \"Invalid assignment on read-only property 'xml'. Hint: Use the 'loadXML(String xml)' method instead. (original exception: \"+e+\")\";\n\t});\t\n\n\tHTMLElement.prototype.__defineGetter__(\"XMLDocument\", function () { \n\t return ((new DOMParser()).parseFromString(this.innerHTML, \"text/xml\"));\n\t});\n \n\tvar _mozHasParseError = function(oDoc) { \n \t\treturn !oDoc.documentElement || oDoc.documentElement.localName==\"parsererror\" \n \t\t\t\t&& oDoc.documentElement.getAttribute(\"xmlns\")==\"http://www.mozilla.org/newlayout/xml/parsererror.xml\"; \n \t}; \n \tXMLDocument.prototype.__defineGetter__(\"parseError\", function() { \n \t\tvar hasError = _mozHasParseError(this); \n \n \t\tvar res = { \n \t\t\terrorCode : 0, \n \t\t\tfilepos : 0, \n \t\t\tline : 0, \n \t\t\tlinepos : 0, \n \t\t\treason : \"\", \n \t\t\tsrcText : \"\", \n \t\t\turl : \"\" \n \t\t}; \n \n \t\tif (hasError) { \n \t\t\tres.errorCode = -1; \n \n \t\t\ttry { \n \t\t\t\tres.srcText = this.getElementsByTagName(\"sourcetext\")[0].firstChild.data; \n \t\t\t\tres.srcText = res.srcText.replace(/\\n\\-\\^$/, \"\"); \n \t\t\t} catch(ex) { \n \t\t\t\tres.srcText = \"\"; \n \t\t\t} \n \n \t\t\ttry { \n \t\t\t\tvar s = this.documentElement.firstChild.data; \n \t\t\t\tvar re = /XML Parsing Error\\:(.+)\\nLocation\\:(.+)\\nLine Number(\\d+)\\,Column(\\d+)/; \n \t\t\t\tvar a = re.exec(s); \n \t\t\t\tres.reason = a[1]; \n \t\t\t\tres.url = a[2]; \n \t\t\t\tres.line = a[3]; \n \t\t\t\tres.linepos = a[4]; \n \t\t\t} catch(ex) { \n \t\t\t\tres.reason=\"Unknown\"; \n \t\t\t} \n \t\t} \n \n \t\treturn res; \n }); \n \n\t\n\tXMLDocument.prototype.__defineGetter__(\"text\", function () {\n\t\treturn this.textContent;\n\t});\t\n\tNode.prototype.__defineGetter__(\"text\", function () {\n\t\treturn this.textContent;\n\t});\t\n\tNode.prototype.__defineSetter__(\"text\", function (value) {\n\t\tthis.textContent = value;\n\t});\t\n\n}\n\nif (typeof HTMLElement != 'undefined' && Object.defineProperty({},\"x\",{get: function(){return true}}).x) {\n\t\tObject.defineProperty(HTMLElement.prototype, 'image', {\n\t\t\tget: function() { return this.getAttribute('image'); },\n\t\t set: function(what) { this.setAttribute('image', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLElement.prototype, 'dis', {\n\t\t\tget: function() { return this.getAttribute('dis'); },\n\t\t set: function(what) { this.setAttribute('dis', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'downmenu', {\n\t\t\tget: function() { return this.getAttribute('downmenu'); },\n\t\t set: function(what) { this.setAttribute('downmenu', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'originalClassName', {\n\t\t\tget: function() { return this.getAttribute('originalClassName'); },\n\t\t set: function(what) { this.setAttribute('originalClassName', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'datatype', {\n\t\t\tget: function() { return this.getAttribute('datatype'); },\n\t\t set: function(what) { this.setAttribute('datatype', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'sign', {\n\t\t\tget: function() { return this.getAttribute('sign'); },\n\t\t set: function(what) { this.setAttribute('sign', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTableElement.prototype, 'div', {\n\t\t\tget: function() { return this.getAttribute('div'); },\n\t\t set: function(what) { this.setAttribute('div', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'control', {\n\t\t\tget: function() { return this.getAttribute('control'); },\n\t\t set: function(what) { this.setAttribute('control', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'control', {\n\t\t\tget: function() { return this.getAttribute('control'); },\n\t\t set: function(what) { this.setAttribute('control', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTableCellElement.prototype, 'description', {\n\t\t\tget: function() { return this.getAttribute('description'); },\n\t\t set: function(what) { this.setAttribute('description', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTableElement.prototype, 'totalRecs', {\n\t\t\tget: function() { return this.getAttribute('totalRecs'); },\n\t\t set: function(what) { this.setAttribute('totalRecs', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTableElement.prototype, 'sortOrder', {\n\t\t\tget: function() { return this.getAttribute('sortOrder'); },\n\t\t set: function(what) { this.setAttribute('sortOrder', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'index', {\n\t\t\tget: function() { return this.getAttribute('index'); },\n\t\t set: function(what) { this.setAttribute('index', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTableRowElement.prototype, 'colLineNo', {\n\t\t\tget: function() { return this.getAttribute('colLineNo'); },\n\t\t set: function(what) { this.setAttribute('colLineNo', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLTableRowElement.prototype, 'lineno', {\n\t\t get: function() { return this.getAttribute('lineno'); },\n\t\t set: function(what) { this.setAttribute('lineno', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLTableCellElement.prototype, 'first_return', {\n\t\t\tget: function() { return this.getAttribute('first_return'); },\n\t\t set: function(what) { this.setAttribute('first_return', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLTableCellElement.prototype, 'control', {\n\t\t\tget: function() { return this.getAttribute('control'); },\n\t\t set: function(what) { this.setAttribute('control', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLTableCellElement.prototype, 'loggerline', {\n\t\t\tget: function() { return this.getAttribute('loggerline'); },\n\t\t set: function(what) { this.setAttribute('loggerline', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'validationerror', {\n\t\t\tget: function() { return this.getAttribute('validationerror'); },\n\t\t set: function(what) { this.setAttribute('validationerror', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'validationerror', {\n\t\t\tget: function() { return this.getAttribute('validationerror'); },\n\t\t set: function(what) { this.setAttribute('validationerror', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'mandatory_error', {\n\t\t\tget: function() { return this.getAttribute('mandatory_error'); },\n\t\t set: function(what) { this.setAttribute('mandatory_error', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'mandatory_error', {\n\t\t\tget: function() { return this.getAttribute('mandatory_error'); },\n\t\t set: function(what) { this.setAttribute('mandatory_error', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'valid', {\n\t\t\tget: function() { return this.getAttribute('valid'); },\n\t\t set: function(what) { this.setAttribute('valid', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'valid', {\n\t\t\tget: function() { return this.getAttribute('valid'); },\n\t\t set: function(what) { this.setAttribute('valid', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'selStart', {\n\t\t\tget: function() { return this.getAttribute('selStart'); },\n\t\t set: function(what) { this.setAttribute('selStart', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'selStart', {\n\t\t\tget: function() { return this.getAttribute('selStart'); },\n\t\t set: function(what) { this.setAttribute('selStart', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'selLength', {\n\t\t\tget: function() { return this.getAttribute('selLength'); },\n\t\t set: function(what) { this.setAttribute('selLength', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'selLength', {\n\t\t\tget: function() { return this.getAttribute('selLength'); },\n\t\t set: function(what) { this.setAttribute('selLength', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'mask', {\n\t\t\tget: function() { return this.getAttribute('mask'); },\n\t\t set: function(what) { this.setAttribute('mask', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'mask', {\n\t\t\tget: function() { return this.getAttribute('mask'); },\n\t\t set: function(what) { this.setAttribute('mask', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'originalvalue', {\n\t\t\tget: function() { return this.getAttribute('originalvalue'); },\n\t\t set: function(what) { this.setAttribute('originalvalue', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'originalvalue', {\n\t\t\tget: function() { return this.getAttribute('originalvalue'); },\n\t\t set: function(what) { this.setAttribute('originalvalue', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'hasChanged', {\n\t\t\tget: function() { return this.getAttribute('hasChanged'); },\n\t\t set: function(what) { this.setAttribute('hasChanged', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'hasChanged', {\n\t\t\tget: function() { return this.getAttribute('hasChanged'); },\n\t\t set: function(what) { this.setAttribute('hasChanged', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'precision', {\n\t\t\tget: function() { return this.getAttribute('precision'); },\n\t\t set: function(what) { this.setAttribute('precision', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'precision', {\n\t\t\tget: function() { return this.getAttribute('precision'); },\n\t\t set: function(what) { this.setAttribute('precision', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'defaultvalue', {\n\t\t\tget: function() { return this.getAttribute('defaultvalue'); },\n\t\t set: function(what) { this.setAttribute('defaultvalue', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'defaultvalue', {\n\t\t\tget: function() { return this.getAttribute('defaultvalue'); },\n\t\t set: function(what) { this.setAttribute('defaultvalue', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'extendedchars', {\n\t\t\tget: function() { return this.getAttribute('extendedchars'); },\n\t\t set: function(what) { this.setAttribute('extendedchars', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'extendedchars', {\n\t\t\tget: function() { return this.getAttribute('extendedchars'); },\n\t\t set: function(what) { this.setAttribute('extendedchars', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'wildcards', {\n\t\t\tget: function() { return this.getAttribute('wildcards'); },\n\t\t set: function(what) { this.setAttribute('wildcards', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'wildcards', {\n\t\t\tget: function() { return this.getAttribute('wildcards'); },\n\t\t set: function(what) { this.setAttribute('wildcards', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'lookup', {\n\t\t\tget: function() { return this.getAttribute('lookup'); },\n\t\t set: function(what) { this.setAttribute('lookup', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'lookup', {\n\t\t\tget: function() { return this.getAttribute('lookup'); },\n\t\t set: function(what) { this.setAttribute('lookup', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'numberformat', {\n\t\t\tget: function() { return this.getAttribute('numberformat'); },\n\t\t set: function(what) { this.setAttribute('numberformat', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'numberformat', {\n\t\t\tget: function() { return this.getAttribute('numberformat'); },\n\t\t set: function(what) { this.setAttribute('numberformat', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'maskPad', {\n\t\t\tget: function() { return this.getAttribute('maskPad'); },\n\t\t set: function(what) { this.setAttribute('maskPad', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'maskPad', {\n\t\t\tget: function() { return this.getAttribute('maskPad'); },\n\t\t set: function(what) { this.setAttribute('maskPad', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'maxval', {\n\t\t\tget: function() { return this.getAttribute('maxval'); },\n\t\t set: function(what) { this.setAttribute('maxval', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'maxval', {\n\t\t\tget: function() { return this.getAttribute('maxval'); },\n\t\t set: function(what) { this.setAttribute('maxval', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'minval', {\n\t\t\tget: function() { return this.getAttribute('minval'); },\n\t\t set: function(what) { this.setAttribute('minval', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'minval', {\n\t\t\tget: function() { return this.getAttribute('minval'); },\n\t\t set: function(what) { this.setAttribute('minval', what); }\n\t\t});\n\t\ttry {\t\t \n \t\t\tObject.defineProperty(HTMLInputElement.prototype, 'maxlength', {\n \t\t\t get: function() { return this.getAttribute('maxlength'); },\n \t\t\t set: function(what) { \n \t\t\t\tthis.setAttribute('maxlength', what); \n \t\t\t\tthis.setAttribute('maxLength', what); \n \t\t\t }\n \t\t\t});\t\n\t\t} catch (e) {}\n\t\ttry {\n \t\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'maxlength', {\n \t\t\t get: function() { return this.getAttribute('maxlength'); },\n \t\t\t set: function(what) { \n \t\t\t\tthis.setAttribute('maxlength', what); \n \t\t\t\tthis.setAttribute('maxLength', what); \n \t\t\t }\n \t\t\t});\n\t\t} catch (e) {}\n\t\ttry {\n\t\t Object.defineProperty(HTMLInputElement.prototype, 'maxLength', {\n\t\t\tget: function() { return this.getAttribute('maxlength'); },\n\t\t\tset: function(what) { \n\t\t\t this.setAttribute('maxLength', what); \n\t\t\t this.setAttribute('maxlength', what); \n\t\t\t}\n\t\t });\n\t \t} catch (e) {}\n\t \ttry {\n\t \t Object.defineProperty(HTMLTextAreaElement.prototype, 'maxLength', {\n\t \t\tget: function() { return this.getAttribute('maxlength'); },\n\t \t\tset: function(what) { \n\t \t\t this.setAttribute('maxLength', what); \n\t \t\t this.setAttribute('maxlength', what); \n\t \t\t}\n\t \t });\n\t \t} catch (e) {}\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'format', {\n\t\t\tget: function() { return this.getAttribute('format'); },\n\t\t set: function(what) { this.setAttribute('format', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'format', {\n\t\t\tget: function() { return this.getAttribute('format'); },\n\t\t set: function(what) { this.setAttribute('format', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLLabelElement.prototype, 'type', {\n\t\t\tget: function() { return this.getAttribute('type'); },\n\t\t set: function(what) { this.setAttribute('type', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'tag', {\n\t\t\tget: function() { return this.getAttribute('tag'); },\n\t\t set: function(what) { this.setAttribute('tag', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'tag', {\n\t\t\tget: function() { return this.getAttribute('tag'); },\n\t\t set: function(what) { this.setAttribute('tag', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLElement.prototype, 'control_index', {\n\t\t\tget: function() { return this.getAttribute('control_index'); },\n\t\t set: function(what) { this.setAttribute('control_index', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'control_index', {\n\t\t\tget: function() { return this.getAttribute('control_index'); },\n\t\t set: function(what) { this.setAttribute('control_index', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLElement.prototype, 'attrib', {\n\t\t\tget: function() { return this.getAttribute('attrib'); },\n\t\t set: function(what) { this.setAttribute('attrib', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'attrib', {\n\t\t\tget: function() { return this.getAttribute('attrib'); },\n\t\t set: function(what) { this.setAttribute('attrib', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'attrib', {\n\t\t\tget: function() { return this.getAttribute('attrib'); },\n\t\t set: function(what) { this.setAttribute('attrib', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'securitytype', {\n\t\t\tget: function() { return this.getAttribute('securitytype'); },\n\t\t set: function(what) { this.setAttribute('securitytype', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'securitytype', {\n\t\t\tget: function() { return this.getAttribute('securitytype'); },\n\t\t set: function(what) { this.setAttribute('securitytype', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'security', {\n\t\t\tget: function() { return this.getAttribute('security'); },\n\t\t set: function(what) { this.setAttribute('security', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'security', {\n\t\t\tget: function() { return this.getAttribute('security'); },\n\t\t set: function(what) { this.setAttribute('security', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'stickyvalue', {\n\t\t\tget: function() { return this.getAttribute('stickyvalue'); },\n\t\t set: function(what) { this.setAttribute('stickyvalue', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'stickyvalue', {\n\t\t\tget: function() { return this.getAttribute('stickyvalue'); },\n\t\t set: function(what) { this.setAttribute('stickyvalue', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'htmlhelp', {\n\t\t\tget: function() { return this.getAttribute('htmlhelp'); },\n\t\t set: function(what) { this.setAttribute('htmlhelp', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'htmlhelp', {\n\t\t\tget: function() { return this.getAttribute('htmlhelp'); },\n\t\t set: function(what) { this.setAttribute('htmlhelp', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'spellchecker', {\n\t\t\tget: function() { return this.getAttribute('spellchecker'); },\n\t\t set: function(what) { this.setAttribute('spellchecker', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'spellchecker', {\n\t\t\tget: function() { return this.getAttribute('spellchecker'); },\n\t\t set: function(what) { this.setAttribute('spellchecker', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'spellchecked', {\n\t\t\tget: function() { return this.getAttribute('spellchecked'); },\n\t\t set: function(what) { this.setAttribute('spellchecked', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'spellchecked', {\n\t\t\tget: function() { return this.getAttribute('spellchecked'); },\n\t\t set: function(what) { this.setAttribute('spellchecked', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'referential', {\n\t\t\tget: function() { return this.getAttribute('referential'); },\n\t\t set: function(what) { this.setAttribute('referential', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'referential', {\n\t\t\tget: function() { return this.getAttribute('referential'); },\n\t\t set: function(what) { this.setAttribute('referential', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'referential', {\n\t\t\tget: function() { return this.getAttribute('referential'); },\n\t\t set: function(what) { this.setAttribute('referential', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLElement.prototype, 'field', {\n\t\t\tget: function() { return this.getAttribute('field'); },\n\t\t set: function(what) { this.setAttribute('field', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'changecase', {\n\t\t\tget: function() { return this.getAttribute('changecase'); },\n\t\t set: function(what) { this.setAttribute('changecase', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'changecase', {\n\t\t\tget: function() { return this.getAttribute('changecase'); },\n\t\t set: function(what) { this.setAttribute('changecase', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'alias', {\n\t\t\tget: function() { return this.getAttribute('alias'); },\n\t\t set: function(what) { this.setAttribute('alias', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'alias', {\n\t\t\tget: function() { return this.getAttribute('alias'); },\n\t\t set: function(what) { this.setAttribute('alias', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'alias', {\n\t\t\tget: function() { return this.getAttribute('alias'); },\n\t\t set: function(what) { this.setAttribute('alias', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'text', {\n\t\t\tget: function() { return this.getAttribute('text'); },\n\t\t set: function(what) { this.setAttribute('text', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'text', {\n\t\t\tget: function() { return this.getAttribute('text'); },\n\t\t set: function(what) { this.setAttribute('text', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'text', {\n\t\t\tget: function() { return this.getAttribute('text'); },\n\t\t set: function(what) { this.setAttribute('text', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'accesskey', {\n\t\t\tget: function() { return this.getAttribute('accesskey'); },\n\t\t set: function(what) { this.setAttribute('accesskey', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'accesskey', {\n\t\t\tget: function() { return this.getAttribute('accesskey'); },\n\t\t set: function(what) { this.setAttribute('accesskey', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'desc', {\n\t\t\tget: function() { return this.getAttribute('desc'); },\n\t\t set: function(what) { this.setAttribute('desc', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'desc', {\n\t\t\tget: function() { return this.getAttribute('desc'); },\n\t\t set: function(what) { this.setAttribute('desc', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_type', {\n\t\t\tget: function() { return this.getAttribute('elink_type'); },\n\t\t set: function(what) { this.setAttribute('elink_type', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_type', {\n\t\t\tget: function() { return this.getAttribute('elink_type'); },\n\t\t set: function(what) { this.setAttribute('elink_type', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_entity', {\n\t\t\tget: function() { return this.getAttribute('elink_entity'); },\n\t\t set: function(what) { this.setAttribute('elink_entity', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_entity', {\n\t\t\tget: function() { return this.getAttribute('elink_entity'); },\n\t\t set: function(what) { this.setAttribute('elink_entity', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_1', {\n\t\t\tget: function() { return this.getAttribute('elink_key_1'); },\n\t\t set: function(what) { this.setAttribute('elink_key_1', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_1', {\n\t\t\tget: function() { return this.getAttribute('elink_key_1'); },\n\t\t set: function(what) { this.setAttribute('elink_key_1', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_2', {\n\t\t\tget: function() { return this.getAttribute('elink_key_2'); },\n\t\t set: function(what) { this.setAttribute('elink_key_2', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_2', {\n\t\t\tget: function() { return this.getAttribute('elink_key_2'); },\n\t\t set: function(what) { this.setAttribute('elink_key_2', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_3', {\n\t\t\tget: function() { return this.getAttribute('elink_key_3'); },\n\t\t set: function(what) { this.setAttribute('elink_key_3', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_3', {\n\t\t\tget: function() { return this.getAttribute('elink_key_3'); },\n\t\t set: function(what) { this.setAttribute('elink_key_3', what); }\n\t\t});\t\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_4', {\n\t\t\tget: function() { return this.getAttribute('elink_key_4'); },\n\t\t set: function(what) { this.setAttribute('elink_key_4', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_4', {\n\t\t\tget: function() { return this.getAttribute('elink_key_4'); },\n\t\t set: function(what) { this.setAttribute('elink_key_4', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_5', {\n\t\t\tget: function() { return this.getAttribute('elink_key_5'); },\n\t\t set: function(what) { this.setAttribute('elink_key_5', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_5', {\n\t\t\tget: function() { return this.getAttribute('elink_key_5'); },\n\t\t set: function(what) { this.setAttribute('elink_key_5', what); }\n\t\t});\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_6', {\n\t\t\tget: function() { return this.getAttribute('elink_key_6'); },\n\t\t set: function(what) { this.setAttribute('elink_key_6', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_6', {\n\t\t\tget: function() { return this.getAttribute('elink_key_6'); },\n\t\t set: function(what) { this.setAttribute('elink_key_6', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_7', {\n\t\t\tget: function() { return this.getAttribute('elink_key_7'); },\n\t\t set: function(what) { this.setAttribute('elink_key_7', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_7', {\n\t\t\tget: function() { return this.getAttribute('elink_key_7'); },\n\t\t set: function(what) { this.setAttribute('elink_key_7', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'elink_key_8', {\n\t\t\tget: function() { return this.getAttribute('elink_key_8'); },\n\t\t set: function(what) { this.setAttribute('elink_key_8', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'elink_key_8', {\n\t\t\tget: function() { return this.getAttribute('elink_key_8'); },\n\t\t set: function(what) { this.setAttribute('elink_key_8', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLImageElement.prototype, 'entity', {\n\t\t\tget: function() { return this.getAttribute('entity'); },\n\t\t set: function(what) { this.setAttribute('entity', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'list', {\n\t\t\tget: function() { return this.getAttribute('list'); },\n\t\t set: function(what) { this.setAttribute('list', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLSelectElement.prototype, 'sql', {\n\t\t\tget: function() { return this.getAttribute('sql'); },\n\t\t set: function(what) { this.setAttribute('sql', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'mandatory', {\n\t\t\tget: function() { return this.getAttribute('mandatory'); },\n\t\t set: function(what) { this.setAttribute('mandatory', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'mandatory', {\n\t\t\tget: function() { return this.getAttribute('mandatory'); },\n\t\t set: function(what) { this.setAttribute('mandatory', what); }\n\t\t});\t\t\n\t\tObject.defineProperty(HTMLInputElement.prototype, 'label', {\n\t\t\tget: function() { return this.getAttribute('label'); },\n\t\t set: function(what) { this.setAttribute('label', what); }\n\t\t});\n\t\tObject.defineProperty(HTMLTextAreaElement.prototype, 'label', {\n\t\t\tget: function() { return this.getAttribute('label'); },\n\t\t set: function(what) { this.setAttribute('label', what); }\n\t\t});\t\t\t\n} else \tif (typeof HTMLElement != \"undefined\" && typeof HTMLElement.prototype.__defineGetter__ != \"undefined\") {\n\n\tHTMLElement.prototype.__defineGetter__(\"image\", function () { return this.getAttribute(\"image\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"image\", function (value) { this.setAttribute(\"image\", value); });\t\n\tHTMLElement.prototype.__defineGetter__(\"dis\", function () { return this.getAttribute(\"dis\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"dis\", function (value) { this.setAttribute(\"dis\", value); });\t\n\n\tHTMLElement.prototype.__defineGetter__(\"downmenu\", function () { return this.getAttribute(\"downmenu\"); });\t\t\n\tHTMLElement.prototype.__defineSetter__(\"downmenu\", function (value) { this.setAttribute(\"downmenu\", value);\t});\t\t\n\tHTMLElement.prototype.__defineGetter__(\"originalClassName\", function () { return this.getAttribute(\"originalClassName\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"originalClassName\", function (value) { this.setAttribute(\"originalClassName\", value); });\t\t\t\t\n\t\t\t\t\n\tHTMLElement.prototype.__defineGetter__(\"datatype\", function () { return this.getAttribute(\"datatype\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"datatype\", function (value) { this.setAttribute(\"datatype\", value);\t});\t\n\n\tHTMLElement.prototype.__defineGetter__(\"sign\", function () { return this.getAttribute(\"sign\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"sign\", function (value) { this.setAttribute(\"sign\", value);\t});\t\n\t\n\tHTMLTableElement.prototype.__defineGetter__(\"div\", function () { return this.getAttribute(\"type\"); });\t\t\t\n\tHTMLTableElement.prototype.__defineSetter__(\"div\", function (value) { this.setAttribute(\"type\", value);\t});\t\t\t\n\t\t\t\t\n\tHTMLInputElement.prototype.__defineGetter__(\"control\", function () { return this.getAttribute(\"control\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"control\", function (value) { this.setAttribute(\"control\", value); });\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"control\", function () { return this.getAttribute(\"control\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"control\", function (value) { this.setAttribute(\"control\", value); });\n\t\t\n\tHTMLTableCellElement.prototype.__defineGetter__(\"description\", function () { return this.getAttribute(\"description\"); });\t\t\t\n\tHTMLTableCellElement.prototype.__defineSetter__(\"description\", function (value) { this.setAttribute(\"description\", value); });\t\n\tHTMLTableElement.prototype.__defineGetter__(\"totalRecs\", function () { return this.getAttribute(\"totalRecs\"); });\t\t\t\n\tHTMLTableElement.prototype.__defineSetter__(\"totalRecs\", function (value) { this.setAttribute(\"totalRecs\", value); });\t\n\tHTMLTableElement.prototype.__defineGetter__(\"sortOrder\", function () { return this.getAttribute(\"sortOrder\"); });\t\t\t\n\tHTMLTableElement.prototype.__defineSetter__(\"sortOrder\", function (value) { this.setAttribute(\"sortOrder\", value); });\n\tHTMLInputElement.prototype.__defineGetter__(\"index\", function () { return this.getAttribute(\"index\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"index\", function (value) { this.setAttribute(\"index\", value); });\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"index\", function () { return this.getAttribute(\"index\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"index\", function (value) { this.setAttribute(\"index\", value); });\n\t\n\tHTMLTableRowElement.prototype.__defineGetter__(\"colLineNo\", function () { return this.getAttribute(\"colLineNo\"); });\t\t\t\n\tHTMLTableRowElement.prototype.__defineSetter__(\"colLineNo\", function (value) { this.setAttribute(\"colLineNo\", value); });\t\n\tHTMLTableRowElement.prototype.__defineGetter__(\"lineno\", function () { return this.getAttribute(\"lineno\"); });\t\t\t\n\tHTMLTableRowElement.prototype.__defineSetter__(\"lineno\", function (value) { this.setAttribute(\"lineno\", value); });\t\n\tHTMLTableCellElement.prototype.__defineGetter__(\"first_return\", function () { return this.getAttribute(\"first_return\"); });\t\t\t\n\tHTMLTableCellElement.prototype.__defineSetter__(\"first_return\", function (value) { this.setAttribute(\"first_return\", value); });\t\n\tHTMLTableCellElement.prototype.__defineGetter__(\"control\", function () { return this.getAttribute(\"control\"); });\t\t\t\n\tHTMLTableCellElement.prototype.__defineSetter__(\"control\", function (value) { this.setAttribute(\"control\", value); });\t\n\tHTMLTableCellElement.prototype.__defineGetter__(\"loggerline\", function () { return this.getAttribute(\"loggerline\"); });\t\t\t\n\tHTMLTableCellElement.prototype.__defineSetter__(\"loggerline\", function (value) { this.setAttribute(\"loggerline\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"validationerror\", function () { return this.objValErr; });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"validationerror\", function (value) { this.objValErr = value;\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"validationerror\", function () { return this.objValErr; });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"validationerror\", function (value) { this.objValErr = value;\t});\t\n\t\n\tHTMLInputElement.prototype.__defineGetter__(\"mandatory_error\", function () { return this.getAttribute(\"mandatory_error\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"mandatory_error\", function (value) { this.setAttribute(\"mandatory_error\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"mandatory_error\", function () { return this.getAttribute(\"mandatory_error\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"mandatory_error\", function (value) { this.setAttribute(\"mandatory_error\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"valid\", function () { return this.getAttribute(\"valid\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"valid\", function (value) { this.setAttribute(\"valid\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"valid\", function () { return this.getAttribute(\"valid\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"valid\", function (value) { this.setAttribute(\"valid\", value);\t});\t\n\t\t\n\tHTMLInputElement.prototype.__defineGetter__(\"selStart\", function () { return (this.getAttribute(\"selStart\") * 1); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"selStart\", function (value) { this.setAttribute(\"selStart\", value);\t});\t\n\tHTMLInputElement.prototype.__defineGetter__(\"selLength\", function () { return (this.getAttribute(\"selLength\") * 1); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"selLength\", function (value) { this.setAttribute(\"selLength\", value); });\t\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"selStart\", function () { return (this.getAttribute(\"selStart\") * 1); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"selStart\", function (value) { this.setAttribute(\"selStart\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"selLength\", function () { return (this.getAttribute(\"selLength\") * 1); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"selLength\", function (value) { this.setAttribute(\"selLength\", value); });\t\t\t\t\n\t\n\tHTMLInputElement.prototype.__defineGetter__(\"mask\", function () { return this.getAttribute(\"mask\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"mask\", function (value) { this.setAttribute(\"mask\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"mask\", function () { return this.getAttribute(\"mask\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"mask\", function (value) { this.setAttribute(\"mask\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"originalvalue\", function () { return this.getAttribute(\"originalvalue\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"originalvalue\", function (value) { this.setAttribute(\"originalvalue\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"originalvalue\", function () { return this.getAttribute(\"originalvalue\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"originalvalue\", function (value) { this.setAttribute(\"originalvalue\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"hasChanged\", function () { return this.getAttribute(\"hasChanged\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"hasChanged\", function (value) { this.setAttribute(\"hasChanged\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"hasChanged\", function () { return this.getAttribute(\"hasChanged\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"hasChanged\", function (value) { this.setAttribute(\"hasChanged\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"precision\", function () { return this.getAttribute(\"precision\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"precision\", function (value) { this.setAttribute(\"precision\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"precision\", function () { return this.getAttribute(\"precision\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"precision\", function (value) { this.setAttribute(\"precision\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"defaultvalue\", function () { return this.getAttribute(\"defaultvalue\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"defaultvalue\", function (value) { this.setAttribute(\"defaultvalue\", value);\t});\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"defaultvalue\", function () { return this.getAttribute(\"defaultvalue\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"defaultvalue\", function (value) { this.setAttribute(\"defaultvalue\", value);\t});\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"extendedchars\", function () { return this.getAttribute(\"extendedchars\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"extendedchars\", function (value) { this.setAttribute(\"extendedchars\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"extendedchars\", function () { return this.getAttribute(\"extendedchars\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"extendedchars\", function (value) { this.setAttribute(\"extendedchars\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"wildcards\", function () { return this.getAttribute(\"wildcards\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"wildcards\", function (value) { this.setAttribute(\"wildcards\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"wildcards\", function () { return this.getAttribute(\"wildcards\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"wildcards\", function (value) { this.setAttribute(\"wildcards\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"lookup\", function () { return this.getAttribute(\"lookup\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"lookup\", function (value) { this.setAttribute(\"lookup\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"lookup\", function () { return this.getAttribute(\"lookup\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"lookup\", function (value) { this.setAttribute(\"lookup\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"numberformat\", function () { return this.getAttribute(\"numberformat\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"numberformat\", function (value) { this.setAttribute(\"numberformat\", value);\t});\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"numberformat\", function () { return this.getAttribute(\"numberformat\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"numberformat\", function (value) { this.setAttribute(\"numberformat\", value);\t});\t\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"maskPad\", function () {\treturn this.getAttribute(\"maskPad\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"maskPad\", function (value) { this.setAttribute(\"maskPad\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"maskPad\", function () {\treturn this.getAttribute(\"maskPad\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"maskPad\", function (value) { this.setAttribute(\"maskPad\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"maxval\", function () { \treturn this.getAttribute(\"maxval\");\t});\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"maxval\", function (value) {\tthis.setAttribute(\"maxval\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"maxval\", function () { \treturn this.getAttribute(\"maxval\");\t});\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"maxval\", function (value) {\tthis.setAttribute(\"maxval\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"minval\", function () { return this.getAttribute(\"minval\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"minval\", function (value) { this.setAttribute(\"minval\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"minval\", function () { return this.getAttribute(\"minval\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"minval\", function (value) { this.setAttribute(\"minval\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"maxlength\", function () { return this.getAttribute(\"maxlength\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"maxlength\", function (value) { this.setAttribute(\"maxlength\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"maxlength\", function () { return this.getAttribute(\"maxlength\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"maxlength\", function (value) { this.setAttribute(\"maxlength\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"format\", function () { return this.getAttribute(\"format\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"format\", function (value) {\tthis.setAttribute(\"format\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"format\", function () { return this.getAttribute(\"format\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"format\", function (value) {\tthis.setAttribute(\"format\", value);\t});\t\n\n\tHTMLLabelElement.prototype.__defineGetter__(\"type\", function () { return this.getAttribute(\"type\"); });\t\t\t\n\tHTMLLabelElement.prototype.__defineSetter__(\"type\", function (value) { this.setAttribute(\"type\", value);\t});\t\t\t\n\tHTMLElement.prototype.__defineGetter__(\"tag\", function () { return this.getAttribute(\"tag\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"tag\", function (value) { this.setAttribute(\"tag\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"tag\", function () { return this.getAttribute(\"tag\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"tag\", function (value) { this.setAttribute(\"tag\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"control_index\", function () { return this.getAttribute(\"control_index\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"control_index\", function (value) { this.setAttribute(\"control_index\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"control_index\", function () { return this.getAttribute(\"control_index\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"control_index\", function (value) { this.setAttribute(\"control_index\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"attrib\", function () { return this.getAttribute(\"attrib\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"attrib\", function (value) {\tthis.setAttribute(\"attrib\", value);\t});\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"attrib\", function () { return this.getAttribute(\"attrib\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"attrib\", function (value) {\tthis.setAttribute(\"attrib\", value);\t});\t\t\n HTMLSelectElement.prototype.__defineGetter__(\"attrib\", function () { return this.getAttribute(\"attrib\"); });\n HTMLSelectElement.prototype.__defineSetter__(\"attrib\", function (value) { this.setAttribute(\"attrib\", value); });\n\n\tHTMLInputElement.prototype.__defineGetter__(\"securitytype\", function () { return this.getAttribute(\"securitytype\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"securitytype\", function (value) { this.setAttribute(\"securitytype\", value);\t});\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"securitytype\", function () { return this.getAttribute(\"securitytype\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"securitytype\", function (value) { this.setAttribute(\"securitytype\", value);\t});\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"security\", function () { return this.getAttribute(\"security\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"security\", function (value) { this.setAttribute(\"security\", value);\t});\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"security\", function () { return this.getAttribute(\"security\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"security\", function (value) { this.setAttribute(\"security\", value);\t});\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"stickyvalue\", function () {\treturn this.getAttribute(\"stickyvalue\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"stickyvalue\", function (value) { this.setAttribute(\"stickyvalue\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"stickyvalue\", function () {\treturn this.getAttribute(\"stickyvalue\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"stickyvalue\", function (value) { this.setAttribute(\"stickyvalue\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"htmlhelp\", function () { return this.getAttribute(\"htmlhelp\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"htmlhelp\", function (value) { this.setAttribute(\"htmlhelp\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"htmlhelp\", function () { return this.getAttribute(\"htmlhelp\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"htmlhelp\", function (value) { this.setAttribute(\"htmlhelp\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"spellchecker\", function () { return this.getAttribute(\"spellchecker\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"spellchecker\", function (value) { this.setAttribute(\"spellchecker\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"spellchecker\", function () { return this.getAttribute(\"spellchecker\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"spellchecker\", function (value) { this.setAttribute(\"spellchecker\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"spellchecked\", function () { return this.getAttribute(\"spellchecked\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"spellchecked\", function (value) { this.setAttribute(\"spellchecked\", value);\t});\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"spellchecked\", function () { return this.getAttribute(\"spellchecked\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"spellchecked\", function (value) { this.setAttribute(\"spellchecked\", value);\t});\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"referential\", function () {\treturn this.getAttribute(\"referential\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"referential\", function (value) { this.setAttribute(\"referential\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"referential\", function () {\treturn this.getAttribute(\"referential\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"referential\", function (value) { this.setAttribute(\"referential\", value); });\t\t\n HTMLSelectElement.prototype.__defineGetter__(\"referential\", function () { return this.getAttribute(\"referential\"); });\n HTMLSelectElement.prototype.__defineSetter__(\"referential\", function (value) { this.setAttribute(\"referential\", value); });\n\t\n\tHTMLElement.prototype.__defineGetter__(\"field\", function () { return this.getAttribute(\"field\"); });\t\t\t\n\tHTMLElement.prototype.__defineSetter__(\"field\", function (value) { this.setAttribute(\"field\", value); });\t\n\t\n\tHTMLInputElement.prototype.__defineGetter__(\"changecase\", function () { return this.getAttribute(\"changecase\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"changecase\", function (value) { this.setAttribute(\"changecase\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"changecase\", function () { return this.getAttribute(\"changecase\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"changecase\", function (value) { this.setAttribute(\"changecase\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"alias\", function () { return this.getAttribute(\"alias\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"alias\", function (value) { this.setAttribute(\"alias\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"alias\", function () { return this.getAttribute(\"alias\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"alias\", function (value) { this.setAttribute(\"alias\", value); });\t\n\tHTMLSelectElement.prototype.__defineGetter__(\"alias\", function () { return this.getAttribute(\"alias\"); });\t\t\t\n\tHTMLSelectElement.prototype.__defineSetter__(\"alias\", function (value) { this.setAttribute(\"alias\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"text\", function () { return this.getAttribute(\"text\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"text\", function (value) { this.setAttribute(\"text\", value);\t});\t\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"text\", function () { return this.getAttribute(\"text\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"text\", function (value) { this.setAttribute(\"text\", value);\t});\t\t\t\t\n\n\tHTMLSelectElement.prototype.__defineGetter__(\"text\", function () { return this.getAttribute(\"text\"); });\t\t\t\n\tHTMLSelectElement.prototype.__defineSetter__(\"text\", function (value) { this.setAttribute(\"text\", value);\t});\n\n\tHTMLInputElement.prototype.__defineGetter__(\"accesskey\", function () { return this.getAttribute(\"accesskey\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"accesskey\", function (value) { this.setAttribute(\"accesskey\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"accesskey\", function () { return this.getAttribute(\"accesskey\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"accesskey\", function (value) { this.setAttribute(\"accesskey\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"desc\", function () { return this.getAttribute(\"desc\");\t});\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"desc\", function (value) { this.setAttribute(\"desc\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"desc\", function () { return this.getAttribute(\"desc\");\t});\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"desc\", function (value) { this.setAttribute(\"desc\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_type\", function () { return this.getAttribute(\"elink_type\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_type\", function (value) { this.setAttribute(\"elink_type\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_type\", function () { return this.getAttribute(\"elink_type\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_type\", function (value) { this.setAttribute(\"elink_type\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_entity\", function () { return this.getAttribute(\"elink_entity\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_entity\", function (value) { this.setAttribute(\"elink_entity\", value);\t});\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_entity\", function () { return this.getAttribute(\"elink_entity\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_entity\", function (value) { this.setAttribute(\"elink_entity\", value);\t});\t\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_1\", function () {\treturn this.getAttribute(\"elink_key_1\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_1\", function (value) { this.setAttribute(\"elink_key_1\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_1\", function () {\treturn this.getAttribute(\"elink_key_1\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_1\", function (value) { this.setAttribute(\"elink_key_1\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_2\", function () { return this.getAttribute(\"elink_key_2\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_2\", function (value) { this.setAttribute(\"elink_key_2\", value); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_2\", function () { return this.getAttribute(\"elink_key_2\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_2\", function (value) { this.setAttribute(\"elink_key_2\", value); });\t\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_3\", function () {\treturn this.getAttribute(\"elink_key_3\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_3\", function (value) { this.setAttribute(\"elink_key_3\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_3\", function () {\treturn this.getAttribute(\"elink_key_3\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_3\", function (value) { this.setAttribute(\"elink_key_3\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_4\", function () {\treturn this.getAttribute(\"elink_key_4\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_4\", function (value) { this.setAttribute(\"elink_key_4\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_4\", function () {\treturn this.getAttribute(\"elink_key_4\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_4\", function (value) { this.setAttribute(\"elink_key_4\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_5\", function () {\treturn this.getAttribute(\"elink_key_5\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_5\", function (value) { this.setAttribute(\"elink_key_5\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_5\", function () {\treturn this.getAttribute(\"elink_key_5\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_5\", function (value) { this.setAttribute(\"elink_key_5\", value); });\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_6\", function () {\treturn this.getAttribute(\"elink_key_6\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_6\", function (value) { this.setAttribute(\"elink_key_6\", value); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_6\", function () {\treturn this.getAttribute(\"elink_key_6\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_6\", function (value) { this.setAttribute(\"elink_key_6\", value); });\t\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_7\", function () {\treturn this.getAttribute(\"elink_key_7\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_7\", function (value) { this.setAttribute(\"elink_key_7\", value); });\t\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_7\", function () {\treturn this.getAttribute(\"elink_key_7\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_7\", function (value) { this.setAttribute(\"elink_key_7\", value); });\t\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"elink_key_8\", function () {\treturn this.getAttribute(\"elink_key_8\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"elink_key_8\", function (value) { this.setAttribute(\"elink_key_8\", value); });\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"elink_key_8\", function () {\treturn this.getAttribute(\"elink_key_8\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"elink_key_8\", function (value) { this.setAttribute(\"elink_key_8\", value); });\t\n\n\tHTMLImageElement.prototype.__defineGetter__(\"entity\", function () {\treturn this.getAttribute(\"entity\"); });\t\t\t\n\tHTMLImageElement.prototype.__defineSetter__(\"entity\", function (value) { this.setAttribute(\"entity\", value); });\t\n\n HTMLSelectElement.prototype.__defineGetter__(\"list\", function () { return this.getAttribute(\"list\"); });\n HTMLSelectElement.prototype.__defineSetter__(\"list\", function (value) { this.setAttribute(\"list\", value); }); \n HTMLSelectElement.prototype.__defineGetter__(\"sql\", function () { return this.getAttribute(\"sql\"); });\n HTMLSelectElement.prototype.__defineSetter__(\"sql\", function (value) { this.setAttribute(\"sql\", value); });\n\t\n\tHTMLInputElement.prototype.__defineGetter__(\"mandatory\", function () { return this.getAttribute(\"mandatory\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"mandatory\", function (value) { this.setAttribute(\"mandatory\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"mandatory\", function () { return this.getAttribute(\"mandatory\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"mandatory\", function (value) { this.setAttribute(\"mandatory\", value);\t});\t\n\n\tHTMLInputElement.prototype.__defineGetter__(\"label\", function () { return this.getAttribute(\"label\"); });\t\t\t\n\tHTMLInputElement.prototype.__defineSetter__(\"label\", function (value) { this.setAttribute(\"label\", value);\t});\t\n\tHTMLTextAreaElement.prototype.__defineGetter__(\"label\", function () { return this.getAttribute(\"label\"); });\t\t\t\n\tHTMLTextAreaElement.prototype.__defineSetter__(\"label\", function (value) { this.setAttribute(\"label\", value);\t});\t\n\t\t\t\t\n\tCSSStyleDeclaration.prototype.__defineGetter__(\"styleFloat\", function() { return this.cssFloat;});\n\tCSSStyleDeclaration.prototype.__defineSetter__(\"styleFloat\", function($value) { this.cssFloat = $value;});\n\tCSSStyleDeclaration.prototype.__defineGetter__(\"pixelLeft\", function() { return parseInt(this.left) || 0;});\n\tCSSStyleDeclaration.prototype.__defineSetter__(\"pixelLeft\", function($value) { this.left = $value + \"px\";});\n\tCSSStyleDeclaration.prototype.__defineGetter__(\"pixelHeight\", function() { return parseInt(this.height) || 0;});\n\tCSSStyleDeclaration.prototype.__defineSetter__(\"pixelHeight\", function($value) { this.height = $value + \"px\";});\n\tCSSStyleDeclaration.prototype.__defineGetter__(\"pixelTop\", function() { return parseInt(this.top) || 0;});\n\tCSSStyleDeclaration.prototype.__defineSetter__(\"pixelTop\", function($value) { this.top = $value + \"px\";});\n\tCSSStyleDeclaration.prototype.__defineGetter__(\"pixelWidth\", function() { return parseInt(this.width) || 0;});\n\tCSSStyleDeclaration.prototype.__defineSetter__(\"pixelWidth\", function($value) { this.width = $value + \"px\";});\n\n CSSStyleSheet.prototype.__defineGetter__(\"rules\", function() { return this.cssRules; }); \n CSSStyleSheet.prototype.getRuleByName = function(name) { \n var rules = this.cssRules; \n name = name.toLowerCase(); \n for (var i=0; i < rules.length; i++){ \n if(rules[i].selectorText == name) \n return rules[i]; \n } \n return null; \n } \n\t\n}\n\n\nfunction createElement(nodeName, name) {\n\tvar node; \n\ttry { \n\t\tnode = createElementMsie(nodeName, name);\n\t\tcreateElement = createElementMsie; \n\t} catch (e) { \n\t\tnode = createElementStandard(nodeName, name); \n\t\tcreateElement = createElementStandard; \n\t} \n\treturn node;\t\t\n}\n\nfunction createElementMsie(nodeName, name) { \n\treturn document.createElement(\"<\"+nodeName+\" name=\"+name+\">\");\n}\n\n function createElementStandard(nodeName, name) { \n \tvar node = document.createElement(nodeName); \n \tnode.name = name; \n \treturn node;\n }\n\n\n/**\n * Cross browser getElementsByClassName taken from:-\n * http://crisp.tweakblogs.net/blog/121/getelementsbyclassname-re-re-re-visited.htm\n */\nvar getElementsByClassName = function() { \n // native \n if (document.getElementsByClassName) { \n return function(className, nodeName, parentElement) { \n var s = (parentElement || document).getElementsByClassName(className); \n\n if (nodeName && nodeName != '*') { \n nodeName = nodeName.toUpperCase(); \n return Array.filter(s, function(el) { return el.nodeName == nodeName; }); \n } else \n return [].slice.call(s, 0); \n } \n } \n\n if (document.evaluate) { \n return function(className, nodeName, parentElement) { \n if (!nodeName) nodeName = '*'; \n if (!parentElement) parentElement = document; \n\n var results = [], s, i = 0, element; \n\n s = document.evaluate( \n \".//\" + nodeName + \"[contains(concat(' ', @class, ' '), ' \" + className + \" ')]\", \n parentElement, \n null, \n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, \n null \n ); \n\n while ((element = s.snapshotItem(i++))) \n results.push(element); \n\n return results; \n } \n } \n\n return function(className, nodeName, parentElement) { \n if (!nodeName) nodeName = '*'; \n if (!parentElement) parentElement = document; \n\n var results = [], s, i = 0, element; \n var re = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)'), elementClassName; \n\n s = parentElement.getElementsByTagName(nodeName); \n\n while ((element = s[i++])) { \n if ( (elementClassName = element.className) && \n (elementClassName == className || re.test(elementClassName)) \n ) \n results.push(element); \n } \n\n return results; \n } \n}();\n\n\n/**\n * selectSingleNode, selectNodes implementations for Firefox support\n *\n * mozXPath [http://km0ti0n.blunted.co.uk/mozxpath/] \n * Code licensed under Creative Commons Attribution-ShareAlike License \n * http://creativecommons.org/licenses/by-sa/2.5/\n */\nif( document.implementation.hasFeature(\"XPath\", \"3.0\") ){\n\n\tif( typeof XMLDocument == \"undefined\" ){ XMLDocument = Document; }\n\t\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode){\n\t if( !xNode ) { \n\t \txNode = this; \n\t } \n\t\tvar oNSResolver = this.createNSResolver(this.documentElement);\n\t\tvar aItems = this.evaluate(cXPathString, xNode, oNSResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n\t\tvar aResult = [];\n\t\tfor( var i = 0; i < aItems.snapshotLength; i++) {\n\t\t\taResult[i] = aItems.snapshotItem(i);\t\n\t\t}\n\t\treturn aResult;\n\t}\n\tXMLDocument.prototype.selectSingleNode = function(cXPathString, xNode){\n\t\tif( !xNode ) { \n\t\t\txNode = this; \n\t\t} \n\t\tvar xItems = this.selectNodes(cXPathString, xNode);\n\t\tif( xItems.length > 0 ){\n\t\t\treturn xItems[0];\n\t\t} else{\n\t\t\treturn null;\t\n\t\t}\n\t}\n\tElement.prototype.selectNodes = function(cXPathString){\n\t\tif(this.ownerDocument.selectNodes){\t\n\t\t\treturn this.ownerDocument.selectNodes(cXPathString, this);\n \t\t} else if (this.ownerDocument.evaluate) { // Chrome Bug build Version 34.0.1847.116 m\n \t\t \treturn this.ownerDocument.evaluate(cXPathString, this).iterateNext();\t\t\t\n\t\t} else {\n\t\t\tthrow \"For XML Elements Only [selectNodes]\";\n\t\t}\n\t}\n\tElement.prototype.selectSingleNode = function(cXPathString){\t\n\t\tif(this.ownerDocument.selectSingleNode){\n\t\t\treturn this.ownerDocument.selectSingleNode(cXPathString, this);\t\n \t\t} else if (this.ownerDocument.evaluate) { // Chrome Bug build Version 34.0.1847.116 m\n \t\t \treturn this.ownerDocument.evaluate(cXPathString, this).iterateNext();\t\t\t\t\n\t\t} else { \n\t\t\tthrow \"For XML Elements Only [selectSingleNode]\";\n\t\t}\n\t}\n}\n \n \n/** NOTE THE Following code has been re-licensed under Apache Software License 2.0\n\tSEE http://webfx.eae.net/license.html for more details */ \nvar ie = (BrowserDetect.browser == \"Explorer\");\nvar moz = !ie && navigator.product == \"Gecko\";\n\nif (moz) {\t\n\textendEventObject();\n\temulateAttachEvent();\n\temulateEventHandlers([\"click\", \"dblclick\", \"mouseover\", \"mouseout\",\n\t\t\t\t\t\t\t\"mousedown\", \"mouseup\", \"mousemove\",\n\t\t\t\t\t\t\t\"keydown\", \"keypress\", \"keyup\"]);\n\tvar emulateDocumentAll = false;\n\ttry {\n\t emulateDocumentAll = PROTOTYPE_DOCUMENT_ALL; \n\t} catch (e) { /* Ignore */ }\n\tif (emulateDocumentAll) {\n\t emulateAllModel();\n\t}\n\t\n\temulateHTMLModel();\n\temulateCurrentStyle();\n\textendElementModel();\n\t\n\tEvent.LEFT = 0;\n\tEvent.MIDDLE = 1;\n\tEvent.RIGHT = 2;\n} else {\n\tEvent = {};\n\tEvent.LEFT = 1;\n\tEvent.MIDDLE = 4;\n\tEvent.RIGHT = 2;\n}\n\n\nfunction extendEventObject() {\n\n\tEvent.prototype.__defineGetter__(\"button\", function () {\t\t\n\t\treturn this.which; //@todo test this!!!\n\t});\n\n\tEvent.prototype.__defineSetter__(\"returnValue\", function (b) {\n\t\tif (!b) this.preventDefault();\n\t\treturn b;\n\t});\n\n\tEvent.prototype.__defineSetter__(\"cancelBubble\", function (b) {\n\t\tif (b) this.stopPropagation();\n\t\treturn b;\n\t});\n\n\tEvent.prototype.__defineGetter__(\"srcElement\", function () {\n\t return (this.target.nodeType == Node.ELEMENT_NODE) ? this.target : this.target.parentNode;\n\t});\n\n\tEvent.prototype.__defineGetter__(\"fromElement\", function () {\n\t\tvar node;\n\t\tif (this.type == \"mouseover\")\n\t\t\tnode = this.relatedTarget;\n\t\telse if (this.type == \"mouseout\")\n\t\t\tnode = this.target;\n\t\tif (!node) return;\n\t\twhile (node.nodeType != 1) node = node.parentNode;\n\t\treturn node;\n\t});\n\n\tEvent.prototype.__defineGetter__(\"toElement\", function () {\n\t\tvar node;\n\t\tif (this.type == \"mouseout\")\n\t\t\tnode = this.relatedTarget;\n\t\telse if (this.type == \"mouseover\")\n\t\t\tnode = this.target;\n\t\tif (!node) return;\n\t\twhile (node.nodeType != 1) node = node.parentNode;\n\t\treturn node;\n\t});\n\n\tEvent.prototype.__defineGetter__(\"offsetX\", function () {\n\t\treturn this.layerX;\n\t});\n\tEvent.prototype.__defineGetter__(\"offsetY\", function () {\n\t\treturn this.layerY;\n\t});\n}\n\nfunction emulateAttachEvent() {\n \n HTMLDocument.prototype.attachEvent =\n HTMLElement.prototype.attachEvent = function (sType, fHandler) {\n\t\tvar shortTypeName = sType.replace(/on/, \"\");\n\t\tfHandler._ieEmuEventHandler = function (e) {\n\t\t\twindow.event = e;\n\t\t\treturn fHandler();\n\t\t};\n\t\tthis.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false);\n\t};\n\n\tHTMLDocument.prototype.detachEvent =\n\tHTMLElement.prototype.detachEvent = function (sType, fHandler) {\n\t\tvar shortTypeName = sType.replace(/on/, \"\");\n\t\tif (typeof fHandler._ieEmuEventHandler == \"function\")\n\t\t\tthis.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false);\n\t\telse\n\t\t\tthis.removeEventListener(shortTypeName, fHandler, true);\n\t};\n}\n\nfunction emulateEventHandlers(eventNames) {\n\tfor (var i = 0; i < eventNames.length; i++) {\n\t\tdocument.addEventListener(eventNames[i], function (e) {\n\t\t\twindow.event = e;\n\t\t}, true);\t\n\t}\n}\n\nfunction emulateAllModel() {\n\tvar allGetter = function () {\n\t\tvar a = this.getElementsByTagName(\"*\");\n\t\tvar node = this;\n\t\ta.tags = function (sTagName) {\n\t\t\treturn node.getElementsByTagName(sTagName);\n\t\t};\n\t\treturn a;\n\t};\n\tHTMLDocument.prototype.__defineGetter__(\"all\", allGetter);\n\tHTMLElement.prototype.__defineGetter__(\"all\", allGetter);\n}\n\nfunction extendElementModel() {\n\tHTMLElement.prototype.__defineGetter__(\"parentElement\", function () {\n\t\tif (this.parentNode == this.ownerDocument) return null;\n\t\treturn this.parentNode;\n\t});\n\n\tHTMLElement.prototype.__defineGetter__(\"children\", function () {\n\t\tvar tmp = [];\n\t\tvar j = 0;\n\t\tvar n;\n\t\tfor (var i = 0; i < this.childNodes.length; i++) {\n\t\t\tn = this.childNodes[i];\n\t\t\tif (n.nodeType == 1) {\n\t\t\t\ttmp[j++] = n;\n\t\t\t\tif (n.name) {\t\n\t\t\t\t\tif (!tmp[n.name])\n\t\t\t\t\t\ttmp[n.name] = [];\n\t\t\t\t\ttmp[n.name][tmp[n.name].length] = n;\n\t\t\t\t}\n\t\t\t\tif (n.id)\t\n\t\t\t\t\ttmp[n.id] = n\n\t\t\t}\n\t\t}\n\t\treturn tmp;\n\t});\n\n\tHTMLElement.prototype.contains = function (oEl) {\n\t\tif (oEl == this) return true;\n\t\tif (oEl == null) return false;\n\t\treturn this.contains(oEl.parentNode);\n\t};\n}\n\nfunction emulateCurrentStyle() {\n\tHTMLElement.prototype.__defineGetter__(\"currentStyle\", function () {\n\t\treturn this.ownerDocument.defaultView.getComputedStyle(this, null);\n\t\t\n\t});\n}\n\nfunction emulateHTMLModel() {\n\n\t\n\tfunction convertTextToHTML(s) {\n\t\tif (s == undefined) return null;\n\t\ts = s.replace(/\\&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\n/g, \"<BR>\");\n\t\twhile (/\\s\\s/.test(s))\n\t\t\ts = s.replace(/\\s\\s/, \"&nbsp; \");\n\t\treturn s.replace(/\\s/g, \" \");\n\t}\n\n\tHTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) {\n\t\tvar df;\t\n\t\tvar r = this.ownerDocument.createRange();\n\t\tswitch (String(sWhere).toLowerCase()) {\n\t\t\tcase \"beforebegin\":\n\t\t\t\tr.setStartBefore(this);\n\t\t\t\tdf = r.createContextualFragment(sHTML);\n\t\t\t\tthis.parentNode.insertBefore(df, this);\n\t\t\t\tbreak;\n\n\t\t\tcase \"afterbegin\":\n\t\t\t\tr.selectNodeContents(this);\n\t\t\t\tr.collapse(true);\n\t\t\t\tdf = r.createContextualFragment(sHTML);\n\t\t\t\tthis.insertBefore(df, this.firstChild);\n\t\t\t\tbreak;\n\n\t\t\tcase \"beforeend\":\n\t\t\t\tr.selectNodeContents(this);\n\t\t\t\tr.collapse(false);\n\t\t\t\tdf = r.createContextualFragment(sHTML);\n\t\t\t\tthis.appendChild(df);\n\t\t\t\tbreak;\n\n\t\t\tcase \"afterend\":\n\t\t\t\tr.setStartAfter(this);\n\t\t\t\tdf = r.createContextualFragment(sHTML);\n\t\t\t\tthis.parentNode.insertBefore(df, this.nextSibling);\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tHTMLElement.prototype.__defineSetter__(\"outerHTML\", function (sHTML) {\n\t var r = this.ownerDocument.createRange();\n\t r.setStartBefore(this);\n\t var df = r.createContextualFragment(sHTML);\n\t this.parentNode.replaceChild(df, this);\n\n\t return sHTML;\n\t});\n\n\tHTMLElement.prototype.__defineGetter__(\"canHaveChildren\", function () {\n\t\tswitch (this.tagName) {\n\t\t\tcase \"AREA\":\n\t\t\tcase \"BASE\":\n\t\t\tcase \"BASEFONT\":\n\t\t\tcase \"COL\":\n\t\t\tcase \"FRAME\":\n\t\t\tcase \"HR\":\n\t\t\tcase \"IMG\":\n\t\t\tcase \"BR\":\n\t\t\tcase \"INPUT\":\n\t\t\tcase \"ISINDEX\":\n\t\t\tcase \"LINK\":\n\t\t\tcase \"META\":\n\t\t\tcase \"PARAM\":\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\tHTMLElement.prototype.__defineGetter__(\"outerHTML\", function () {\n\t\tvar attr, attrs = this.attributes;\n\t\tvar str = \"<\" + this.tagName;\n\t\tfor (var i = 0; i < attrs.length; i++) {\n\t\t\tattr = attrs[i];\n\t\t\tif (attr.specified)\n\t\t\t\tstr += \" \" + attr.name + '=\"' + attr.value + '\"';\n\t\t}\n\t\tif (!this.canHaveChildren)\n\t\t\treturn str + \">\";\n\n\t\treturn str + \">\" + this.innerHTML + \"</\" + this.tagName + \">\";\n\t});\n\n\n\tHTMLElement.prototype.__defineSetter__(\"innerText\", function (sText) {\n\t\tthis.innerHTML = convertTextToHTML(sText);\n\t\treturn sText;\n\t});\n\n\tvar tmpGet;\n\tHTMLElement.prototype.__defineGetter__(\"innerText\", tmpGet = function () {\n\t\tvar r = this.ownerDocument.createRange();\n\t\tr.selectNodeContents(this);\n\t\treturn r.toString();\n\t});\n\n\tHTMLElement.prototype.__defineSetter__(\"outerText\", function (sText) {\n\t\tthis.outerHTML = convertTextToHTML(sText);\n\t\treturn sText;\n\t});\n\tHTMLElement.prototype.__defineGetter__(\"outerText\", tmpGet);\n\n\tHTMLElement.prototype.insertAdjacentText = function (sWhere, sText) {\n\t\tthis.insertAdjacentHTML(sWhere, convertTextToHTML(sText));\n\t};\n}\n\n\n\n\n$(document).keydown(function(e) {\n var nodeName = e.target.nodeName.toLowerCase();\n var $target = $(e.target);\n if (e.which === 8) {\n\t\tvar readonly = $target.attr(\"readonly\");\n\t\tvar is_readonly = readonly != 'undefined' && readonly=='readonly';\n\t\tvar disabled_or_readonly = $target.is(':disabled') || is_readonly;\n\t\tif (disabled_or_readonly) {\n e.preventDefault();\n return false;\n \t}\n\t\t\n if ((nodeName === 'input' && e.target.type === 'text' ) ||\n \t(nodeName === 'input' && e.target.type === 'password' ) ||\t\n nodeName === 'textarea') {\n } else {\n e.preventDefault();\n return false;\n }\n }\n});\n\n","truncated":"false"}
{"page":"http://www.bccr.fi.cr/","url":"http://www.bccr.fi.cr/js_srv/xmlextras.js","body":"//<script>\r\n//////////////////\r\n// Helper Stuff //\r\n//////////////////\r\n\r\n// used to find the Automation server name\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\t\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\n//////////////////////////\r\n// Start the Real stuff //\r\n//////////////////////////\r\n\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1; \r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// fell through\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\r\n\t\t// DOM2\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\t\t\t\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\r\n\t\t\treturn doc;\r\n\t\t}\r\n\r\n\t\tif (window.ActiveXObject) \r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t/*\r\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\t*/\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\r\n}","truncated":"false"}
{"page":"http://www.gdhed.edu.cn/","url":"http://www.gdhed.edu.cn/business/htmlfiles/js/ie-ff.js","body":"if(window.Event){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Event\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n event yes yes yes yes yes \n event.returnValue yes yes no no no \n event.cancelBubble yes yes no no no \n event.srcElement yes yes no no no \n event.fromElement yes yes no no no \n \n */ \n Event.prototype.__defineSetter__(\"returnValue\",function(b){// \n if(!b)this.preventDefault(); \n return b; \n }); \n Event.prototype.__defineSetter__(\"cancelBubble\",function(b){// \u00e8\u00ae\u00be\u00e7\u00bd\u00ae\u00e6\u0088\u0096\u00e8\u0080\u0085\u00e6\u00a3\u0080\u00e7\u00b4\u00a2\u00e5\u00bd\u0093\u00e5\u0089\u008d\u00e4\u00ba\u008b\u00e4\u00bb\u00b6\u00e5\u008f\u00a5\u00e6\u009f\u0084\u00e7\u009a\u0084\u00e5\u00b1\u0082\u00e6\u00ac\u00a1\u00e5\u0086\u0092\u00e6\u00b3\u00a1 \n if(b)this.stopPropagation(); \n return b; \n }); \n Event.prototype.__defineGetter__(\"srcElement\",function(){ \n var node=this.target; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"fromElement\",function(){// \u00e8\u00bf\u0094\u00e5\u009b\u009e\u00e9\u00bc\u00a0\u00e6\u00a0\u0087\u00e7\u00a7\u00bb\u00e5\u0087\u00ba\u00e7\u009a\u0084\u00e6\u00ba\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var node; \n if(this.type==\"mouseover\") \n node=this.relatedTarget; \n else if(this.type==\"mouseout\") \n node=this.target; \n if(!node)return; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"toElement\",function(){// \u00e8\u00bf\u0094\u00e5\u009b\u009e\u00e9\u00bc\u00a0\u00e6\u00a0\u0087\u00e7\u00a7\u00bb\u00e5\u0085\u00a5\u00e7\u009a\u0084\u00e6\u00ba\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var node; \n if(this.type==\"mouseout\") \n node=this.relatedTarget; \n else if(this.type==\"mouseover\") \n node=this.target; \n if(!node)return; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"offsetX\",function(){ \n return this.layerX; \n }); \n Event.prototype.__defineGetter__(\"offsetY\",function(){ \n return this.layerY; \n }); \n } \nif(window.Document){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Document\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n document.documentElement yes yes yes yes no \n document.activeElement yes null no no no \n \n */ \n } \nif(window.Node){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Node\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n Node.contains yes yes no no yes \n Node.replaceNode yes no no no no \n Node.removeNode yes no no no no \n Node.children yes yes no no no \n Node.hasChildNodes yes yes yes yes no \n Node.childNodes yes yes yes yes no \n Node.swapNode yes no no no no \n Node.currentStyle yes yes no no no \n \n */ \n Node.prototype.replaceNode=function(Node){// \u00e6\u009b\u00bf\u00e6\u008d\u00a2\u00e6\u008c\u0087\u00e5\u00ae\u009a\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n this.parentNode.replaceChild(Node,this); \n } \n Node.prototype.removeNode=function(removeChildren){// \u00e5\u0088\u00a0\u00e9\u0099\u00a4\u00e6\u008c\u0087\u00e5\u00ae\u009a\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n if(removeChildren) \n return this.parentNode.removeChild(this); \n else{ \n var range=document.createRange(); \n range.selectNodeContents(this); \n return this.parentNode.replaceChild(range.extractContents(),this); \n } \n } \n Node.prototype.swapNode=function(Node){// \u00e4\u00ba\u00a4\u00e6\u008d\u00a2\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var nextSibling=this.nextSibling; \n var parentNode=this.parentNode; \n node.parentNode.replaceChild(this,Node); \n parentNode.insertBefore(node,nextSibling); \n } \n } \nif(window.HTMLElement){ \n HTMLElement.prototype.__defineGetter__(\"all\",function(){ \n var a=this.getElementsByTagName(\"*\"); \n var node=this; \n a.tags=function(sTagName){ \n return node.getElementsByTagName(sTagName); \n } \n return a; \n }); \n HTMLElement.prototype.__defineGetter__(\"parentElement\",function(){ \n if(this.parentNode==this.ownerDocument)return null; \n return this.parentNode; \n }); \n HTMLElement.prototype.__defineGetter__(\"children\",function(){ \n var tmp=[]; \n var j=0; \n var n; \n for(var i=0;i<this.childNodes.length;i++){ \n n=this.childNodes[i]; \n if(n.nodeType==1){ \n tmp[j++]=n; \n if(n.name){ \n if(!tmp[n.name]) \n tmp[n.name]=[]; \n tmp[n.name][tmp[n.name].length]=n; \n } \n if(n.id) \n tmp[n.id]=n; \n } \n } \n return tmp; \n }); \n HTMLElement.prototype.__defineGetter__(\"currentStyle\", function(){ \n return this.ownerDocument.defaultView.getComputedStyle(this,null); \n }); \n HTMLElement.prototype.__defineSetter__(\"outerHTML\",function(sHTML){ \n var r=this.ownerDocument.createRange(); \n r.setStartBefore(this); \n var df=r.createContextualFragment(sHTML); \n this.parentNode.replaceChild(df,this); \n return sHTML; \n }); \n HTMLElement.prototype.__defineGetter__(\"outerHTML\",function(){ \n var attr; \n var attrs=this.attributes; \n var str=\"<\"+this.tagName; \n for(var i=0;i<attrs.length;i++){ \n attr=attrs[i]; \n if(attr.specified) \n str+=\" \"+attr.name+'=\"'+attr.value+'\"'; \n } \n if(!this.canHaveChildren) \n return str+\">\"; \n return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\"; \n }); \n HTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function(){ \n switch(this.tagName.toLowerCase()){ \n case \"area\": \n case \"base\": \n case \"basefont\": \n case \"col\": \n case \"frame\": \n case \"hr\": \n case \"img\": \n case \"br\": \n case \"input\": \n case \"isindex\": \n case \"link\": \n case \"meta\": \n case \"param\": \n return false; \n } \n return true; \n }); \n\n HTMLElement.prototype.__defineSetter__(\"innerText\",function(sText){ \n var parsedText=document.createTextNode(sText); \n this.innerHTML=parsedText; \n return parsedText; \n }); \n HTMLElement.prototype.__defineGetter__(\"innerText\",function(){ \n var r=this.ownerDocument.createRange(); \n r.selectNodeContents(this); \n return r.toString(); \n }); \n HTMLElement.prototype.__defineSetter__(\"outerText\",function(sText){ \n var parsedText=document.createTextNode(sText); \n this.outerHTML=parsedText; \n return parsedText; \n }); \n HTMLElement.prototype.__defineGetter__(\"outerText\",function(){ \n var r=this.ownerDocument.createRange(); \n r.selectNodeContents(this); \n return r.toString(); \n }); \n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n fHandler._ieEmuEventHandler=function(e){ \n window.event=e; \n return fHandler(); \n } \n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n } \n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n else \n this.removeEventListener(shortTypeName,fHandler,true); \n } \n HTMLElement.prototype.contains=function(Node){// \u00e6\u0098\u00af\u00e5\u0090\u00a6\u00e5\u008c\u0085\u00e5\u0090\u00ab\u00e6\u009f\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n do if(Node==this)return true; \n while(Node=Node.parentNode); \n return false; \n } \n HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){ \n switch(where){ \n case \"beforeBegin\": \n this.parentNode.insertBefore(parsedNode,this); \n break; \n case \"afterBegin\": \n this.insertBefore(parsedNode,this.firstChild); \n break; \n case \"beforeEnd\": \n this.appendChild(parsedNode); \n break; \n case \"afterEnd\": \n if(this.nextSibling) \n this.parentNode.insertBefore(parsedNode,this.nextSibling); \n else \n this.parentNode.appendChild(parsedNode); \n break; \n } \n } \n HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){ \n var r=this.ownerDocument.createRange(); \n r.setStartBefore(this); \n var parsedHTML=r.createContextualFragment(htmlStr); \n this.insertAdjacentElement(where,parsedHTML); \n } \n HTMLElement.prototype.insertAdjacentText=function(where,txtStr){ \n var parsedText=document.createTextNode(txtStr); \n this.insertAdjacentElement(where,parsedText); \n } \n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n fHandler._ieEmuEventHandler=function(e){ \n window.event=e; \n return fHandler(); \n } \n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n } \n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n else \n this.removeEventListener(shortTypeName,fHandler,true); \n } \n } \n///////////////////////////////////////////\t\nvar GetNodeValue = function(obj)\n{\n var str = \"\";\n if(window.ActiveXObject) //IE\n {\n str = obj.text;\n }\n else //Mozilla\n {\n try\n {\n str = obj.childNodes[0].nodeValue;\n }\n catch(ex)\n {\n str = \"\";\n }\n }\n return str;\n}\n\nif(document.implementation && document.implementation.createDocument)\n{\n XMLDocument.prototype.loadXML = function(xmlString)\n {\n var childNodes = this.childNodes;\n for (var i = childNodes.length - 1; i >= 0; i--)\n this.removeChild(childNodes[i]);\n\n var dp = new DOMParser();\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\n var newElt = this.importNode(newDOM.documentElement, true);\n this.appendChild(newElt);\n };\n\n // check for XPath implementation\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\n {\n // prototying the XMLDocument\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\n {\n if( !xNode ) { xNode = this; } \n var oNSResolver = this.createNSResolver(this.documentElement)\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\n var aResult = [];\n for( var i = 0; i < aItems.snapshotLength; i++)\n {\n aResult[i] = aItems.snapshotItem(i);\n }\n return aResult;\n }\n\n // prototying the Element\n Element.prototype.selectNodes = function(cXPathString)\n {\n if(this.ownerDocument.selectNodes)\n {\n return this.ownerDocument.selectNodes(cXPathString, this);\n }\n else{throw \"For XML Elements Only\";}\n }\n }\n\n // check for XPath implementation\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\n {\n // prototying the XMLDocument\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\n {\n if( !xNode ) { xNode = this; } \n var xItems = this.selectNodes(cXPathString, xNode);\n if( xItems.length > 0 )\n {\n return xItems[0];\n }\n else\n {\n return null;\n }\n }\n \n // prototying the Element\n Element.prototype.selectSingleNode = function(cXPathString)\n { \n if(this.ownerDocument.selectSingleNode)\n {\n return this.ownerDocument.selectSingleNode(cXPathString, this);\n }\n else{throw \"For XML Elements Only\";}\n }\n }\n}","truncated":"false"}
{"page":"http://www.zcw.cn/","url":"http://www.zcw.cn/i/js/common.js","body":"var ie = (navigator.appVersion.indexOf(\"MSIE\")!=-1);//IE\r\nvar ff = (navigator.userAgent.indexOf(\"Firefox\")!=-1);//Firefox\r\nvar ope = (navigator.userAgent.indexOf(\"Opera\")!=-1);//Opera\r\nvar op950 = (navigator.userAgent.indexOf(\"Opera/9.50\")!=-1);//Opera9.50\r\nvar op = ope&&!op950;\r\nvar sounds = \"1\";\r\n\r\nvar Sys = {};\r\nvar ua = navigator.userAgent.toLowerCase();\r\nvar s;\r\n(s = ua.match(/msie ([\\d.]+)/)) ? Sys.ie = s[1] :\r\n(s = ua.match(/firefox\\/([\\d.]+)/)) ? Sys.firefox = s[1] :\r\n(s = ua.match(/chrome\\/([\\d.]+)/)) ? Sys.chrome = s[1] :\r\n(s = ua.match(/opera.([\\d.]+)/)) ? Sys.opera = s[1] :\r\n(s = ua.match(/version\\/([\\d.]+).*safari/)) ? Sys.safari = s[1] : 0;\r\n(s = ua.match(/windows nt ([\\d.]+)/)) ? Sys.pfv = s[1] : 0;\r\nvar ie6 = Sys.ie ? Sys.ie==\"6.0\" : false;\r\nvar ie7 = Sys.ie ? Sys.ie==\"7.0\" : false;\r\nvar ie8 = Sys.ie ? Sys.ie==\"8.0\" : false;\r\nvar ie9 = Sys.ie ? Sys.ie==\"9.0\" : false;\r\n\r\nvar isFoundMsXml = false;\r\nfunction GetXmlObject()\r\n{\r\n\tvar ArrXmlObj=[\"MSXML4.DOMDocument\", \"MSXML3.DOMDocument\", \"MSXML2.DOMDocument\", \"MSXML.DOMDocument\", \"Microsoft.XmlDom\"];\r\n\tvar obj = null;\r\n\tfor(var i=0; i<ArrXmlObj.length; i++)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tobj = new ActiveXObject(ArrXmlObj[i]);\r\n\t\t\tisFoundMsXml = true;\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\tcatch(e){}\r\n\t}\r\n\treturn obj;\r\n}\r\n\r\nvar isFoundXmlHttp = false;\r\nfunction GetXmlHttpObject()\r\n{\r\n\tvar ArrXmlObj=['Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'];\r\n\tvar obj = null;\r\n\tif(window.ActiveXObject){\r\n\t\tfor(var i=0; i<ArrXmlObj.length; i++)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tobj = new ActiveXObject(ArrXmlObj[i]);\r\n\t\t\t\tisFoundXmlHttp = true;\r\n\t\t\t\tbreak;\r\n\t\t\t} \r\n\t\t\tcatch(e){}\r\n\t\t}\r\n\t}\r\n\telse if(window.XMLHttpRequest){\r\n\t\tobj = new XMLHttpRequest();\r\n\t}\r\n\treturn obj;\r\n}\r\n\r\nString.prototype.Trim = function()\r\n{\r\nreturn this.replace(/(^\\s*)|(\\s*$)/g, \"\");\r\n}\r\nString.prototype.LTrim = function()\r\n{\r\nreturn this.replace(/(^\\s*)/g, \"\");\r\n}\r\nString.prototype.Rtrim = function()\r\n{\r\nreturn this.replace(/(\\s*$)/g, \"\");\r\n}\r\nDate.prototype.format = function(format) //author: meizz\r\n{\r\n var o = {\r\n \"M+\" : this.getMonth()+1, //month\r\n \"d+\" : this.getDate(), //day\r\n \"h+\" : this.getHours(), //hour\r\n \"m+\" : this.getMinutes(), //minute\r\n \"s+\" : this.getSeconds(), //second\r\n \"q+\" : Math.floor((this.getMonth()+3)/3), //quarter\r\n \"S\" : this.getMilliseconds() //millisecond\r\n }\r\n if(/(y+)/.test(format)) format=format.replace(RegExp.$1,\r\n (this.getFullYear()+\"\").substr(4 - RegExp.$1.length));\r\n for(var k in o)if(new RegExp(\"(\"+ k +\")\").test(format))\r\n format = format.replace(RegExp.$1,\r\n RegExp.$1.length==1 ? o[k] : \r\n (\"00\"+ o[k]).substr((\"\"+ o[k]).length));\r\n return format;\r\n}\r\n\r\nfunction Hashtable(){\r\n\tthis._hash\t\t= new Object();\r\n\tthis.Add\t\t= function(key, value){\r\n\t\t\t\t\t\tif(typeof(key)!=\"undefined\"){\r\n\t\t\t\t\t\t\tthis._hash[key]=typeof(value)==\"undefined\"?null:value;\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\tthis.Get\t\t= function(key){return this._hash[key];}\r\n\tthis.Remove\t\t= function(key){if(this.Contains(key)==true){delete this._hash[key];}}\r\n\tthis.Count\t\t= function(){var i=0;for(var k in this._hash){if(typeof(this._hash[k])!=\"undefined\"){i++;}} return i;}\r\n\tthis.Keys\t\t= function(){var karr=[];for(var k in this._hash){karr[karr.length]=k;}return karr;}\r\n\tthis.Items\t\t= function(key){return this._hash[key];}\r\n\tthis.Contains\t= function(key){return typeof(this._hash[key])!=\"undefined\";}\r\n\tthis.Clear\t\t= function(){for(var k in this._hash){delete this._hash[k];}this._hash={};}\r\n\tthis.ToString\t= function(str){if(this.Count()==0){return \"\";}if(typeof(str)==\"undefined\"){str=\"\";}var varr=[];for(var k in this._hash){if(typeof(this._hash[k])!=\"undefined\"){varr[varr.length]=this._hash[k];}}return varr.join(str);}\r\n};\r\n\r\nvar GetNodeValue = function(obj)\r\n{\r\n var str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.text;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.childNodes[0].nodeValue;\r\n }\r\n catch(ex)\r\n {\r\n str = \"\";\r\n }\r\n }\r\n return str;\r\n}\r\n\r\nvar SetInnerText = function(obj, str){\r\n if(window.ActiveXObject) //IE\r\n {\r\n obj.innerText = str;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n obj.textContent = str;\r\n }\r\n catch(ex)\r\n {\r\n }\r\n }\r\n}\r\n\r\nvar GetInnerText = function(obj){\r\n\tvar str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.innerText;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.textContent;\r\n }\r\n catch(ex)\r\n {\r\n }\r\n }\r\n\treturn str;\r\n}\r\n\r\nif(document.implementation && document.implementation.createDocument && !window.ActiveXObject)\r\n{\r\n XMLDocument.prototype.loadXML = function(xmlString)\r\n {\r\n var childNodes = this.childNodes;\r\n for (var i = childNodes.length - 1; i >= 0; i--)\r\n this.removeChild(childNodes[i]);\r\n\r\n var dp = new DOMParser();\r\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\r\n var newElt = this.importNode(newDOM.documentElement, true);\r\n this.appendChild(newElt);\r\n };\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var oNSResolver = this.createNSResolver(this.documentElement)\r\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\r\n var aResult = [];\r\n for( var i = 0; i < aItems.snapshotLength; i++)\r\n {\r\n aResult[i] = aItems.snapshotItem(i);\r\n }\r\n return aResult;\r\n }\r\n\r\n // prototying the Element\r\n Element.prototype.selectNodes = function(cXPathString)\r\n {\r\n if(this.ownerDocument.selectNodes)\r\n {\r\n return this.ownerDocument.selectNodes(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var xItems = this.selectNodes(cXPathString, xNode);\r\n if( xItems.length > 0 )\r\n {\r\n return xItems[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n \r\n // prototying the Element\r\n Element.prototype.selectSingleNode = function(cXPathString)\r\n { \r\n if(this.ownerDocument.selectSingleNode)\r\n {\r\n return this.ownerDocument.selectSingleNode(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n\tHTMLElement.prototype.insertAdjacentHTML=function(where, html) \r\n\t{ \r\n\t\tvar e=this.ownerDocument.createRange(); \r\n\t\te.setStartBefore(this); \r\n\t\te=e.createContextualFragment(html); \r\n\t\tswitch (where) \r\n\t\t{ \r\n\t\t\tcase 'beforeBegin': this.parentNode.insertBefore(e, this);break; \r\n\t\t\tcase 'afterBegin': this.insertBefore(e, this.firstChild); break; \r\n\t\t\tcase 'beforeEnd': this.appendChild(e); break; \r\n\t\t\tcase 'afterEnd': \r\n\t\t\tif(!this.nextSibling) this.parentNode.appendChild(e); \r\n\t\t\telse this.parentNode.insertBefore(e, this.nextSibling); break; \r\n\t\t} \r\n\t}\r\n}\r\nif(typeof(HTMLElement)!=\"undefined\" && !window.opera && !window.ActiveXObject)\r\n{ \r\n\tHTMLElement.prototype.__defineGetter__(\"outerHTML\",function()\r\n\t{ \r\n\t var a=this.attributes, str=\"<\"+this.tagName, i=0;for(;i<a.length;i++)\r\n\t if(a[i].specified) str+=\" \"+a[i].name+'=\"'+a[i].value+'\"';\r\n\t if(!this.canHaveChildren) return str+\" />\";\r\n\t return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\";\r\n\t}); \r\n\tHTMLElement.prototype.__defineSetter__(\"outerHTML\",function(s)\r\n\t{ \r\n\t var d = document.createElement(\"DIV\"); d.innerHTML = s;\r\n\t for(var i=0; i<d.childNodes.length; i++)\r\n\t\t\tthis.parentNode.insertBefore(d.childNodes[i], this);\r\n\t this.parentNode.removeChild(this);\r\n\t});\r\n\tHTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function()\r\n\t{\r\n\t return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(this.tagName.toLowerCase());\r\n\t});\r\n\r\n\tHTMLElement.prototype.__defineGetter__(\"innerText\", function()\r\n\t\t{\r\n\t\t\tvar anyString = \"\";\r\n\t\t\tvar childS = this.childNodes;\r\n\t\t\tfor(var i=0; i<childS.length; i++) {\r\n\t\t\t\tif(childS[i].nodeType==1)\r\n\t\t\t\t\tanyString += childS[i].tagName==\"BR\" ? '\\n' : childS[i].innerText;\r\n\t\t\t\telse if(childS[i].nodeType==3)\r\n\t\t\t\t\tanyString += childS[i].nodeValue;\r\n\t\t\t}\r\n\t\t\treturn anyString;\r\n\t\t}\r\n\t);\r\n\tHTMLElement.prototype.__defineSetter__(\"innerText\",\tfunction(sText)\r\n\t\t{ \r\n\t\t\tthis.textContent=sText; \r\n\t\t} \r\n\t); \r\n}\r\n\r\nfunction FormatPercent(s,t,l){\r\n\tif(parseInt(s)==0 || parseInt(t)==0) return \"0%\";\r\n\tvar tmp;\r\n\ttmp = parseFloat(s) * 100 / parseFloat(t);\r\n\tif(l<1){\r\n\t\treturn Math.round(tmp) + \"%\";\r\n\t}\r\n\telse{\r\n\t\tif(tmp<1)\r\n\t\t{\r\n\t\t\treturn tmp.toPrecision(l) + \"%\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t return tmp.toPrecision(l+1) + \"%\";\r\n\t\t}\r\n\t}\t\r\n}\r\n\r\nfunction FormatNumberPercent(s,l){\r\n\tif(parseFloat(s)==0) return \"0%\";\r\n\ttmp = parseFloat(s) * 100;\r\n\tif(l<1){\r\n\t\treturn Math.round(s) + \"%\";\r\n\t}\r\n\telse{\r\n\t\tif(tmp<1)\r\n\t\t{\r\n\t\t\treturn tmp.toPrecision(l) + \"%\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t return tmp.toPrecision(l+1) + \"%\";\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\t \r\nfunction FormatDecimal(s,l){\r\n\tif(l<1) return s;\r\n\tvar t = parseFloat(s);\r\n\tif(t<1){\r\n\t\treturn t.toPrecision(l);\r\n\t}\r\n\telse{\r\n\t\treturn t.toPrecision(l+1);\r\n\t}\r\n\tif(s.indexOf(\".\")==-1){\r\n\t\treturn s;\r\n\t}\r\n\telse{\r\n\t\tvar int,decimal;\r\n\t\tvar tarr = s.split(\".\");\r\n\t\tint = tarr[0];\r\n\t\tdecimal = tarr[1];\r\n\t\tif(l>0){\r\n\r\n\t\t\tif(decimal.length>l)\r\n\t\t\t{\r\n\t\t\t\tif(parseInt(decimal.charAt(l))>=5){\r\n\t\t\t\t\tdecimal = parseInt(decimal.substring(0,l)) + 1;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdecimal = decimal.substring(0,l);\r\n\t\t\t\t}\r\n\t\t\t\treturn int + \".\" + decimal;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(parseInt(decimal.charAt(0))>=5){\r\n\t\t\t\tint = parseInt(int) + 1;\r\n\t\t\t}\r\n\t\t\treturn int;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction SetHtml(objID, html){\r\n\tif(document.getElementById(objID)){\r\n\t\tdocument.getElementById(objID).innerHTML = html;\r\n\t}\r\n\telse if(document.all(objID)){\r\n\t\tdocument.all(objID).innerHTML = html;\r\n\t}\r\n}\r\n\r\nfunction get_cookie(Name) { \r\n\tvar search = Name + \"=\" \r\n\tvar returnvalue = \"\"; \r\n\tif (document.cookie.length > 0) { \r\n\t\toffset = document.cookie.indexOf(search); \r\n\t\tif (offset != -1) { \r\n\t\t\toffset += search.length \r\n\t\t\tend = document.cookie.indexOf(\";\", offset); \r\n\t\t\tif (end == -1) end = document.cookie.length; \r\n\t\t\treturnvalue=unescape(document.cookie.substring(offset, end))\r\n\t\t} \r\n\t} \r\n\treturn returnvalue; \r\n}\r\n\r\nfunction set_cookie(Name,value){ \r\n\tdocument.cookie=Name+\"=\"+value;\r\n}\r\n\r\nfunction setCookie(name,value)\r\n{\r\n var Days = 30;\r\n var exp = new Date(); //new Date(\"December 31, 9998\");\r\n exp.setTime(exp.getTime() + Days*24*60*60*1000);\r\n document.cookie = name + \"=\"+ escape (value) + \";expires=\" + exp.toGMTString();\r\n}\r\nfunction getCookie(name)\r\n{\r\n var arr,reg=new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\");\r\n if(arr=document.cookie.match(reg)) return unescape(arr[2]);\r\n else return \"\";\r\n}\r\nfunction delCookie(name)\r\n{\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() - 1);\r\n var cval=getCookie(name);\r\n if(cval!=null) document.cookie= name + \"=\"+cval+\";expires=\"+exp.toGMTString();\r\n}\r\n\r\nvar PassPortApi = {\r\n\tdomain:\"zcw.cn\",\r\n\tgetDomain:function(){\r\n\t\tvar hostname = document.domain.split('.');\r\n\t\tvar l = hostname.length;\r\n\t\tif(l<=2) return document.domain;\r\n\t\treturn hostname[l-2] + '.' + hostname[l-1];\r\n\t},\r\n\taddCookie:function(name,value,expireHours){\r\n\t\tif(this.domain==\"\")this.domain = this.getDomain();\r\n\t\tvar cookieString = name + \"=\" + escape(value) + \"; path=/; domain=.\" + this.domain + \";\";\r\n\t\tif(expireHours>0){\r\n\t\t\tvar date=new Date();\r\n\t\t\tdate.setTime(date.getTime() + expireHours*3600*1000);\r\n\t\t\tcookieString = cookieString + \"expires=\" + date.toGMTString() + \";\";\r\n\t\t}\r\n\t\tdocument.cookie = cookieString;\r\n\t},\r\n\tgetCookie:function(name){\r\n\t\ttry{\r\n\t\t\tvar arr,reg=new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\");\r\n\t\t\tif(arr=document.cookie.match(reg)) return unescape(arr[2]);\r\n\t\t\telse return \"\";\r\n\t\t}\r\n\t\tcatch(e){return \"\";}\r\n\t},\r\n\tdeleteCookie:function(name){\r\n\t\tif(this.domain==\"\") this.domain=this.getDomain();\r\n\t\tvar exp = new Date();\r\n\t\texp.setTime(exp.getTime()-100000);\r\n\t\tvar cval = this.getCookie(name);\r\n\t\tdocument.cookie = name + \"=\" + cval + \"; expires=\" + exp.toGMTString() + \"; path=/; domain=.\" + this.domain + \";\";\r\n\t}\r\n};\r\n\r\nvar PosTyle = { \r\n\t//Page \r\n\tgetBodyWidth : function() \r\n\t{ \r\n\t\treturn document.documentElement.clientWidth || document.body.clientWidth || 0; \r\n\t},\r\n\tgetBodyHeight : function() \r\n\t{ \r\n\t\treturn document.documentElement.clientHeight || document.body.clientHeight || 0; \r\n\t},\r\n\tgetBodyLeft : function() \r\n\t{ \r\n\t\treturn document.documentElement.scrollLeft || document.body.scrollLeft || 0; \r\n\t},\r\n\tgetBodyTop : function() \r\n\t{ \r\n\t\treturn document.documentElement.scrollTop || document.body.scrollTop || 0; \r\n\t},\r\n\tgetBody : function() \r\n\t{ \r\n\t\treturn { \r\n\t\t\twidth : this.getBodyWidth(), \r\n\t\t\theight : this.getBodyHeight(), \r\n\t\t\tleft : this.getBodyLeft(), \r\n\t\t\ttop : this.getBodyTop() \r\n\t\t}; \r\n\t},\r\n\tgetScreenWidth : function() \r\n\t{ \r\n\t\treturn window.screen.width; \r\n\t},\r\n\tgetScreenHeight : function() \r\n\t{ \r\n\t\treturn window.screen.height; \r\n\t},\r\n\r\n\t//Element \r\n\tgetElementWidth : function(o) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn o.offsetWidth; \r\n\t},\r\n\tgetElementHeight : function(o) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn o.offsetHeight; \r\n\t},\r\n\tgetElementLeft : function(o) \r\n\t{ \r\n\t\tif (o == null) \r\n\t\t{ \r\n\t\treturn 0; \r\n\t\t} \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn (o.offsetLeft + this.getElementLeft(o.offsetParent)); \r\n\t},\r\n\tgetElementTop : function(o) \r\n\t{ \r\n\t\tif (o == null) \r\n\t\t{ \r\n\t\t\treturn 0; \r\n\t\t} \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\treturn (o.offsetTop + this.getElementTop(o.offsetParent)); \r\n\t},\r\n\tgetElement : function(o) \r\n\t{ \r\n\t\treturn { \r\n\t\t\twidth : this.getElementWidth(o), \r\n\t\t\theight : this.getElementHeight(o), \r\n\t\t\tleft : this.getElementLeft(o), \r\n\t\t\ttop : this.getElementTop(o) \r\n\t\t}; \r\n\t},\r\n\tgetBorderLeft : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderLeftWidth\")); \r\n\t},\r\n\tgetBorderTop : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderTopWidth\")); \r\n\t},\r\n\tgetBorderRight : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderRightWidth\")); \r\n\t}, \r\n\tgetBorderBottom : function(o) \r\n\t{ \r\n\t\treturn parseInt(this.getCurrentStyle(o, \"borderBottomWidth\")); \r\n\t}, \r\n\tgetBorder : function(o) \r\n\t{ \r\n\t\treturn { \r\n\t\t\tleft : this.getBorderLeft(o), \r\n\t\t\ttop : this.getBorderTop(o), \r\n\t\t\tright : this.getBorderRight(o), \r\n\t\t\tbottom : this.getBorderBottom(o) \r\n\t\t}; \r\n\t}, \r\n\r\n\t//Style \r\n\tgetCurrentStyle : function(o, s) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\"; \r\n\t\tif (o.currentStyle) \r\n\t\t{ \r\n\t\t\treturn o.currentStyle[s]; \r\n\t\t} \r\n\t\telse if (document.defaultView.getComputedStyle) \r\n\t\t{ \r\n\t\t\treturn document.defaultView.getComputedStyle(o, '').getPropertyValue(s.replace(/([A-Z])/g, '-$1').toLowerCase()); \r\n\t\t} \r\n\t\telse \r\n\t\t{ \r\n\t\t\treturn o.style[s]; \r\n\t\t} \r\n\t},\r\n\tsetStyle : function(o, s, v) \r\n\t{ \r\n\t\t(typeof o == \"string\") ? o = $(o) : \"\";\r\n\t\tif (Browser.moz && s == \"cursor\" && v == \"hand\") \r\n\t\t{ \r\n\t\t\tv = \"pointer\"; \r\n\t\t}\r\n\t\to.style[s] = v; \r\n\t} \r\n};\r\n\r\nfunction langSelect(){\r\n\tvar tmp = \"\";\r\n\ttmp += \"<select onchange=\\\"setLang(this.value);\\\" name='langselect' id='langselect'>\";\r\n\tif(lang==1) {\r\n\t\ttmp += \"<option value=\\\"1\\\" selected>\u00d6\u00d0\u00ce\u00c4(\u00b7\u00b1\u00cc\u00e5)</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"1\\\">\u00d6\u00d0\u00ce\u00c4(\u00b7\u00b1\u00cc\u00e5)</option>\";\r\n\t}\r\n\tif(lang==2){\r\n\t\ttmp += \"<option value=\\\"2\\\" selected>\u00d6\u00d0\u00ce\u00c4(\u00bc\u00f2\u00cc\u00e5)</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"2\\\">\u00d6\u00d0\u00ce\u00c4(\u00bc\u00f2\u00cc\u00e5)</option>\";\r\n\t}\r\n\tif(lang==3){\r\n\t\ttmp += \"<option value=\\\"3\\\" selected>English</option>\";\r\n\t}\r\n\telse{\r\n\t\ttmp += \"<option value=\\\"3\\\">English</option>\";\r\n\t}\r\n\ttmp += \"</select>\";\r\n\treturn tmp;\r\n}\r\n\r\nfunction soundSelect(){\r\n\tvar tmp = \"\";\r\n\ttmp += '<select name=\"tsounds\" onchange=\"setSounds(this.value);\" id=\"tsounds\">';\r\n\tif(sounds==1){\r\n\t\ttmp += '<option value=\"1\" selected>\u00c9\u00f9\u00d2\u00f4\u00bf\u00aa</option>';\r\n\t}\r\n\telse{\r\n\t\ttmp += '<option value=\"1\">\u00c9\u00f9\u00d2\u00f4\u00bf\u00aa</option>';\r\n\t}\r\n\tif(sounds==0){\r\n\t\ttmp += '<option value=\"0\" selected>\u00c9\u00f9\u00d2\u00f4\u00b9\u00d8</option>';\r\n\t}\r\n\telse{\r\n\t\ttmp += '<option value=\"0\">\u00c9\u00f9\u00d2\u00f4\u00b9\u00d8</option>';\r\n\t}\r\n\ttmp += '</select>';\r\n\treturn tmp;\r\n}\r\n\r\nfunction noData(){\r\n\tvar tmp = \"\";\r\n\ttmp += \"<table width='100%' height='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='#696969'><tr><td align='center' bgcolor='#ffffff' style='padding-top:10px; padding-bottom:10px;'><span style='font-size:16px; color:#f00; font-weight:bold;'>\u00d4\u00dd\u00ca\u00b1\u00c3\u00bb\u00d3\u00d0\u00ca\u00fd\u00be\u00dd\u00a1\u00a3 www.zcw.cn</span></td></tr></table>\"\r\n\treturn tmp;\r\n}\r\n\r\nfunction loadData(){\r\n\tvar tmp = \"\";\r\n\ttmp += '<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#696969\"><tr><td align=\"center\" bgcolor=\"#ffffff\" style=\"padding-top:10px; padding-bottom:10px;\"><span style=\"font-size:12px; color:#000;\"><img src=\"/i/loading.gif\" width=\"16\" height=\"16\" border=\"0\" align=\"absmiddle\">\u00ca\u00fd\u00be\u00dd\u00bc\u00d3\u00d4\u00d8\u00d6\u00d0\u00a3\u00ac\u00c7\u00eb\u00c9\u00d4\u00ba\u00f2\u00a1\u00a3\u00a1\u00a3\u00a1\u00a3<br>score loading, please wait!!!</span></td></tr></table>';\r\n\treturn tmp;\r\n}\r\n\r\nfunction htmldecode(str){\r\n\tvar tmp = str;\r\n\ttmp = tmp.replace(/&amp;/ig, \"&\").replace(/&lt;/ig, \"<\").replace(/&gt;/ig, \">\").replace(/&quot;/ig, \"\\\"\");\r\n\treturn tmp;\r\n}\r\n\r\nfunction htmlencode(str){\r\n\tvar tmp = str;\r\n\ttmp = tmp.replace(\"<\", \"&lt;\").replace(\">\", \"&gt;\").replace(\"\\\"\", \"&quot;\").replace(\"&\", \"&amp;\");\r\n\treturn tmp;\r\n}\r\n\r\nfunction getExplore(){\r\n\tvar ie = (navigator.appVersion.indexOf(\"MSIE\")!=-1);\r\n\tvar ff = (navigator.userAgent.indexOf(\"Firefox\")!=-1);\r\n\tif(ie){\r\n\t\treturn \"ie\";\r\n\t}\r\n\tif(ff){\r\n\t\treturn \"ff\";\r\n\t}\r\n\treturn \"\";\r\n}\r\n\r\nfunction getScrollTop(){\r\n\tvar obj_top = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;\r\n\treturn obj_top;\r\n}\r\n\r\nfunction getScrollLeft(){\r\n\tvar obj_left = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;\r\n\treturn obj_left;\r\n}\r\n\r\nfunction getClientWidth(){\r\n\tvar obj_width = (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.clientWidth;\r\n\treturn obj_width;\r\n}\r\n\r\nfunction getClientHeight(){\r\n\tvar obj_height = (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;\t\r\n\treturn obj_height;\r\n}\r\n\r\nfunction $(id){\r\n\treturn document.getElementById(id);\r\n}\r\n\r\nfunction getDomainName(){\r\n\tvar host = window.location.hostname;\r\n\tvar port = window.location.port;\r\n\tvar domainName = \"http://\" + host;\r\n\tif(port != \"\"){\r\n\t\tdomainName += \":\" + port;\r\n\t}\r\n\treturn domainName;\r\n}\r\n\r\nfunction selectServer(){\r\n\tvar tmp = \"\";\r\n\tvar host = window.location.hostname;\r\n\tvar hostArray = host.split(\".\");\r\n\tif(hostArray[0]==\"wwww\"){\r\n\t\ttmp += \"<li><span onclick=\\\"gotoServer('tel');\\\" class='btnblue2' style='width:40px;height:16px;cursor:pointer;' title='\u00d7\u00aa\u00b5\u00bd\u00b5\u00e7\u00d0\u00c5\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00b5\u00e7\u00d0\u00c5</span></li>\";\r\n\t\ttmp += \"<li><span class='btnblue2' title='\u00b5\u00b1\u00c7\u00b0\u00cd\u00f8\u00cd\u00a8\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00cd\u00f8\u00cd\u00a8</span></li>\";\r\n\t}else{\r\n\t\ttmp += \"<li><span class='btnblue2' title='\u00b5\u00b1\u00c7\u00b0\u00b5\u00e7\u00d0\u00c5\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00b5\u00e7\u00d0\u00c5</span></li>\";\r\n\t\ttmp += \"<li><span onclick=\\\"gotoServer('cnc');\\\" class='btnblue2' style='width:40px;height:16px;cursor:pointer;' title='\u00d7\u00aa\u00b5\u00bd\u00cd\u00f8\u00cd\u00a8\u00b7\u00fe\u00ce\u00f1\u00c6\u00f7'>\u00cd\u00f8\u00cd\u00a8</span></li>\";\r\n\t}\r\n\treturn tmp;\r\n}\r\n\r\nfunction gotoServer(server){\r\n\tvar tmp = server;\r\n\tvar url = \"http://www.zcw.cn\" + getURL();\r\n\tswitch(tmp){\r\n\t\tcase \"tel\":\r\n\t\t\turl = \"http://www.zcw.cn\" + getURL();\r\n\t\tbreak;\r\n\t\tcase \"cnc\":\r\n\t\t\turl = \"http://wwww.zcw.cn\" + getURL();\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\turl = \"http://www.zcw.cn\" + getURL();\r\n\t\tbreak;\r\n\t}\r\n\tlocation.replace(url);\r\n}\r\n\r\nfunction getURL(){\r\n\tvar tmp = location.href;\r\n\ttmp = tmp.replace(\"//\", \"\");\r\n\tvar index = tmp.indexOf(\"/\");\r\n\tvar temp = tmp.substring(index, tmp.length);\r\n\treturn temp;\r\n}\r\n\r\nvar checkdt = function(dt){\r\n\tvar re = /^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-9]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/gi;\r\n\treturn re.test(dt);\r\n};\r\n\r\nvar ParseDateTime = function(dtstr){\r\n\tdtstr = dtstr.replace(/\\//ig, \"-\");\r\n\tvar dt = dtstr.replace(/\\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\\d+/g);\r\n\tvar d = eval('new Date(' + dt + ')'); \r\n\treturn d;\r\n};\r\n","truncated":"false"}
{"page":"http://www.dgboftec.gov.cn/","url":"http://www.dgboftec.gov.cn/publicfiles//business/htmlfiles/js/ie-ff.js","body":"if(window.Event){\r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n event yes yes yes yes yes \r\n event.returnValue yes yes no no no \r\n event.cancelBubble yes yes no no no \r\n event.srcElement yes yes no no no \r\n event.fromElement yes yes no no no \r\n \r\n */ \r\n Event.prototype.__defineSetter__(\"returnValue\",function(b){// \r\n if(!b)this.preventDefault(); \r\n return b; \r\n }); \r\n Event.prototype.__defineSetter__(\"cancelBubble\",function(b){ \r\n if(b)this.stopPropagation(); \r\n return b; \r\n }); \r\n Event.prototype.__defineGetter__(\"srcElement\",function(){ \r\n var node=this.target; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"fromElement\",function(){ \r\n var node; \r\n if(this.type==\"mouseover\") \r\n node=this.relatedTarget; \r\n else if(this.type==\"mouseout\") \r\n node=this.target; \r\n if(!node)return; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"toElement\",function(){ \r\n var node; \r\n if(this.type==\"mouseout\") \r\n node=this.relatedTarget; \r\n else if(this.type==\"mouseover\") \r\n node=this.target; \r\n if(!node)return; \r\n while(node.nodeType!=1)node=node.parentNode; \r\n return node; \r\n }); \r\n Event.prototype.__defineGetter__(\"offsetX\",function(){ \r\n return this.layerX; \r\n }); \r\n Event.prototype.__defineGetter__(\"offsetY\",function(){ \r\n return this.layerY; \r\n }); \r\n } \r\nif(window.Document){ \r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n document.documentElement yes yes yes yes no \r\n document.activeElement yes null no no no \r\n \r\n */ \r\n } \r\nif(window.Node){ \r\n /* \r\n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \r\n Node.contains yes yes no no yes \r\n Node.replaceNode yes no no no no \r\n Node.removeNode yes no no no no \r\n Node.children yes yes no no no \r\n Node.hasChildNodes yes yes yes yes no \r\n Node.childNodes yes yes yes yes no \r\n Node.swapNode yes no no no no \r\n Node.currentStyle yes yes no no no \r\n \r\n */ \r\n Node.prototype.replaceNode=function(Node){\r\n this.parentNode.replaceChild(Node,this); \r\n } \r\n Node.prototype.removeNode=function(removeChildren){ \r\n if(removeChildren) \r\n return this.parentNode.removeChild(this); \r\n else{ \r\n var range=document.createRange(); \r\n range.selectNodeContents(this); \r\n return this.parentNode.replaceChild(range.extractContents(),this); \r\n } \r\n } \r\n Node.prototype.swapNode=function(Node){ \r\n var nextSibling=this.nextSibling; \r\n var parentNode=this.parentNode; \r\n node.parentNode.replaceChild(this,Node); \r\n parentNode.insertBefore(node,nextSibling); \r\n } \r\n } \r\nif(window.HTMLElement){ \r\n HTMLElement.prototype.__defineGetter__(\"all\",function(){ \r\n var a=this.getElementsByTagName(\"*\"); \r\n var node=this; \r\n a.tags=function(sTagName){ \r\n return node.getElementsByTagName(sTagName); \r\n } \r\n return a; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"parentElement\",function(){ \r\n if(this.parentNode==this.ownerDocument)return null; \r\n return this.parentNode; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"children\",function(){ \r\n var tmp=[]; \r\n var j=0; \r\n var n; \r\n for(var i=0;i<this.childNodes.length;i++){ \r\n n=this.childNodes[i]; \r\n if(n.nodeType==1){ \r\n tmp[j++]=n; \r\n if(n.name){ \r\n if(!tmp[n.name]) \r\n tmp[n.name]=[]; \r\n tmp[n.name][tmp[n.name].length]=n; \r\n } \r\n if(n.id) \r\n tmp[n.id]=n; \r\n } \r\n } \r\n return tmp; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"currentStyle\", function(){ \r\n return this.ownerDocument.defaultView.getComputedStyle(this,null); \r\n }); \r\n HTMLElement.prototype.__defineSetter__(\"outerHTML\",function(sHTML){ \r\n var r=this.ownerDocument.createRange(); \r\n r.setStartBefore(this); \r\n var df=r.createContextualFragment(sHTML); \r\n this.parentNode.replaceChild(df,this); \r\n return sHTML; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"outerHTML\",function(){ \r\n var attr; \r\n var attrs=this.attributes; \r\n var str=\"<\"+this.tagName; \r\n for(var i=0;i<attrs.length;i++){ \r\n attr=attrs[i]; \r\n if(attr.specified) \r\n str+=\" \"+attr.name+'=\"'+attr.value+'\"'; \r\n } \r\n if(!this.canHaveChildren) \r\n return str+\">\"; \r\n return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\"; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function(){ \r\n switch(this.tagName.toLowerCase()){ \r\n case \"area\": \r\n case \"base\": \r\n case \"basefont\": \r\n case \"col\": \r\n case \"frame\": \r\n case \"hr\": \r\n case \"img\": \r\n case \"br\": \r\n case \"input\": \r\n case \"isindex\": \r\n case \"link\": \r\n case \"meta\": \r\n case \"param\": \r\n return false; \r\n } \r\n return true; \r\n }); \r\n\r\n HTMLElement.prototype.__defineSetter__(\"innerText\",function(sText){ \r\n var parsedText=document.createTextNode(sText); \r\n this.innerHTML=parsedText; \r\n return parsedText; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"innerText\",function(){ \r\n var r=this.ownerDocument.createRange(); \r\n r.selectNodeContents(this); \r\n return r.toString(); \r\n }); \r\n HTMLElement.prototype.__defineSetter__(\"outerText\",function(sText){ \r\n var parsedText=document.createTextNode(sText); \r\n this.outerHTML=parsedText; \r\n return parsedText; \r\n }); \r\n HTMLElement.prototype.__defineGetter__(\"outerText\",function(){ \r\n var r=this.ownerDocument.createRange(); \r\n r.selectNodeContents(this); \r\n return r.toString(); \r\n }); \r\n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n fHandler._ieEmuEventHandler=function(e){ \r\n window.event=e; \r\n return fHandler(); \r\n } \r\n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n } \r\n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \r\n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n else \r\n this.removeEventListener(shortTypeName,fHandler,true); \r\n } \r\n HTMLElement.prototype.contains=function(Node){ \r\n do if(Node==this)return true; \r\n while(Node=Node.parentNode); \r\n return false; \r\n } \r\n HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){ \r\n switch(where){ \r\n case \"beforeBegin\": \r\n this.parentNode.insertBefore(parsedNode,this); \r\n break; \r\n case \"afterBegin\": \r\n this.insertBefore(parsedNode,this.firstChild); \r\n break; \r\n case \"beforeEnd\": \r\n this.appendChild(parsedNode); \r\n break; \r\n case \"afterEnd\": \r\n if(this.nextSibling) \r\n this.parentNode.insertBefore(parsedNode,this.nextSibling); \r\n else \r\n this.parentNode.appendChild(parsedNode); \r\n break; \r\n } \r\n } \r\n HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){ \r\n var r=this.ownerDocument.createRange(); \r\n r.setStartBefore(this); \r\n var parsedHTML=r.createContextualFragment(htmlStr); \r\n this.insertAdjacentElement(where,parsedHTML); \r\n } \r\n HTMLElement.prototype.insertAdjacentText=function(where,txtStr){ \r\n var parsedText=document.createTextNode(txtStr); \r\n this.insertAdjacentElement(where,parsedText); \r\n } \r\n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n fHandler._ieEmuEventHandler=function(e){ \r\n window.event=e; \r\n return fHandler(); \r\n } \r\n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n } \r\n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \r\n var shortTypeName=sType.replace(/on/,\"\"); \r\n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \r\n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \r\n else \r\n this.removeEventListener(shortTypeName,fHandler,true); \r\n } \r\n } \r\n///////////////////////////////////////////\t\r\nvar GetNodeValue = function(obj)\r\n{\r\n var str = \"\";\r\n if(window.ActiveXObject) //IE\r\n {\r\n str = obj.text;\r\n }\r\n else //Mozilla\r\n {\r\n try\r\n {\r\n str = obj.childNodes[0].nodeValue;\r\n }\r\n catch(ex)\r\n {\r\n str = \"\";\r\n }\r\n }\r\n return str;\r\n}\r\n\r\nif(document.implementation && document.implementation.createDocument)\r\n{\r\n XMLDocument.prototype.loadXML = function(xmlString)\r\n {\r\n var childNodes = this.childNodes;\r\n for (var i = childNodes.length - 1; i >= 0; i--)\r\n this.removeChild(childNodes[i]);\r\n\r\n var dp = new DOMParser();\r\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\r\n var newElt = this.importNode(newDOM.documentElement, true);\r\n this.appendChild(newElt);\r\n };\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var oNSResolver = this.createNSResolver(this.documentElement)\r\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\r\n var aResult = [];\r\n for( var i = 0; i < aItems.snapshotLength; i++)\r\n {\r\n aResult[i] = aItems.snapshotItem(i);\r\n }\r\n return aResult;\r\n }\r\n\r\n // prototying the Element\r\n Element.prototype.selectNodes = function(cXPathString)\r\n {\r\n if(this.ownerDocument.selectNodes)\r\n {\r\n return this.ownerDocument.selectNodes(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n\r\n // check for XPath implementation\r\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\r\n {\r\n // prototying the XMLDocument\r\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\r\n {\r\n if( !xNode ) { xNode = this; } \r\n var xItems = this.selectNodes(cXPathString, xNode);\r\n if( xItems.length > 0 )\r\n {\r\n return xItems[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n \r\n // prototying the Element\r\n Element.prototype.selectSingleNode = function(cXPathString)\r\n { \r\n if(this.ownerDocument.selectSingleNode)\r\n {\r\n return this.ownerDocument.selectSingleNode(cXPathString, this);\r\n }\r\n else{throw \"For XML Elements Only\";}\r\n }\r\n }\r\n}","truncated":"false"}
{"page":"http://www.tuke.sk/","url":"http://www.tuke.sk/tuke/portal_javascripts/TukeSkin/ploneScripts6722.js","body":"\n/* Merged Plone Javascript file\n * This file is dynamically assembled from separate parts.\n * Some of these parts have 3rd party licenses or copyright information attached\n * Such information is valid for that section,\n * not for the entire composite file\n * originating files are separated by - filename.js -\n */\n\n/* - event-registration.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/event-registration.js?original=1\nwindow.onDOMLoadEvents=new Array();window.DOMContentLoadedInitDone=false;\nfunction addDOMLoadEvent(listener){window.onDOMLoadEvents[window.onDOMLoadEvents.length]=listener}\nfunction DOMContentLoadedInit(){if(window.DOMContentLoadedInitDone) return;window.DOMContentLoadedInitDone=true;var exceptions=new Array();for(var i=0;i<window.onDOMLoadEvents.length;i++){var func=window.onDOMLoadEvents[i];try{func()} catch(e){exceptions[exceptions.length]=e}}\nfor(var i=0;i<exceptions.length;i++){throw exceptions[i]}}\nfunction DOMContentLoadedScheduler(){if(window.DOMContentLoadedInitDone) return true;if(/KHTML|WebKit/i.test(navigator.userAgent)){if(/loaded|complete/.test(document.readyState)){DOMContentLoadedInit()} else{setTimeout(\"DOMContentLoadedScheduler()\",250)}} else{setTimeout(\"DOMContentLoadedScheduler()\",250)}\nreturn true}\nsetTimeout(\"DOMContentLoadedScheduler()\",250);if(window.addEventListener){window.addEventListener(\"load\",DOMContentLoadedInit,false);document.addEventListener(\"DOMContentLoaded\",DOMContentLoadedInit,false)} else if(window.attachEvent){window.attachEvent(\"onload\",DOMContentLoadedInit)} else{var _dummy=function(){var $old_onload=window.onload;window.onload=function(e){DOMContentLoadedInit();$old_onload()}}}\n/*@cc_on @*/\n/*@if (@_win32)\r\n{var proto=\"src='javascript:void(0)'\";if(location.protocol==\"https:\") proto=\"src=//0\";document.write(\"<scr\"+\"ipt id=__ie_onload defer \"+proto+\"><\\/scr\"+\"ipt>\");var script=document.getElementById(\"__ie_onload\");script.onreadystatechange=function(){if(this.readyState==\"complete\"){DOMContentLoadedInit()}}};/*@end @*/\n\n\n/* - register_function.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/register_function.js?original=1\nvar bugRiddenCrashPronePieceOfJunk=(navigator.userAgent.indexOf('MSIE 5')!=-1&&navigator.userAgent.indexOf('Mac')!=-1)\nvar W3CDOM=(!bugRiddenCrashPronePieceOfJunk&&typeof document.getElementsByTagName!='undefined'&&typeof document.createElement!='undefined');var registerEventListener=null;if(typeof addEvent!='undefined'){registerEventListener=function(elem,event,func){addEvent(elem,event,func);return true}} else if(window.addEventListener){registerEventListener=function(elem,event,func){elem.addEventListener(event,func,false);return true}} else if(window.attachEvent){registerEventListener=function(elem,event,func){var result=elem.attachEvent(\"on\"+event,func);return result}} else{registerEventListener=function(elem,event,func){return false}}\nvar unRegisterEventListener=null;if(typeof removeEvent!='undefined'){unRegisterEventListener=function(elem,event,func){removeEvent(element,event,func);return true}} else if(window.removeEventListener){unRegisterEventListener=function(elem,event,func){elem.removeEventListener(event,func,false);return true}} else if(window.detachEvent){unRegisterEventListener=function(elem,event,func){var result=elem.detachEvent(\"on\"+event,func);return result}} else{unRegisterEventListener=function(elem,event,func){return false}}\nvar registerPloneFunction=null;if(typeof addDOMLoadEvent!='undefined'){registerPloneFunction=function(func){addDOMLoadEvent(func)}} else{registerPloneFunction=function(func){registerEventListener(window,\"load\",func)}}\nfunction getContentArea(){if(W3CDOM){var node=document.getElementById('region-content');if(!node){node=document.getElementById('content')}\nreturn node}}\n\n\n/* - cssQuery.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/cssQuery.js?original=1\nvar cssQuery=function(){var version=\"2.0.2\";var $COMMA=/\\s*,\\s*/;var cssQuery=function($selector,$$from){try{var $match=[];var $useCache=arguments.callee.caching&&!$$from;var $base=($$from)?($$from.constructor==Array)?$$from:[$$from]:[document];var $$selectors=parseSelector($selector).split($COMMA),i;for(i=0;i<$$selectors.length;i++){$selector=_toStream($$selectors[i]);if(isMSIE&&$selector.slice(0,3).join(\"\")==\" *#\"){$selector=$selector.slice(2);$$from=_msie_selectById([],$base,$selector[1])} else $$from=$base;var j=0,$token,$filter,$arguments,$cacheSelector=\"\";while(j<$selector.length){$token=$selector[j++];$filter=$selector[j++];$cacheSelector+=$token+$filter;$arguments=\"\";if($selector[j]==\"(\"){while($selector[j++]!=\")\"&&j<$selector.length){$arguments+=$selector[j]}\n$arguments=$arguments.slice(0,-1);$cacheSelector+=\"(\"+$arguments+\")\"}\n$$from=($useCache&&cache[$cacheSelector])?cache[$cacheSelector]:select($$from,$token,$filter,$arguments);if($useCache) cache[$cacheSelector]=$$from}\n$match=$match.concat($$from)}\ndelete cssQuery.error;return $match} catch($error){cssQuery.error=$error;return []}};cssQuery.toString=function(){return \"function cssQuery() {\\n [version \"+version+\"]\\n}\"};var cache={};cssQuery.caching=false;cssQuery.clearCache=function($selector){if($selector){$selector=_toStream($selector).join(\"\");delete cache[$selector]} else cache={}};var modules={};var loaded=false;cssQuery.addModule=function($name,$script){if(loaded) eval(\"$script=\"+String($script));modules[$name]=new $script()};cssQuery.valueOf=function($code){return $code?eval($code):this};var selectors={};var pseudoClasses={};var AttributeSelector={match:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};var attributeSelectors=[];selectors[\" \"]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=getElementsByTagName($from[i],$tagName,$namespace);for(j=0;($element=$subset[j]);j++){if(thisElement($element)&&compareNamespace($element,$namespace))\n$results.push($element)}}};selectors[\"#\"]=function($results,$from,$id){var $element,j;for(j=0;($element=$from[j]);j++) if($element.id==$id) $results.push($element)};selectors[\".\"]=function($results,$from,$className){$className=new RegExp(\"(^|\\\\s)\"+$className+\"(\\\\s|$)\");var $element,i;for(i=0;($element=$from[i]);i++)\nif($className.test($element.className)) $results.push($element)};selectors[\":\"]=function($results,$from,$pseudoClass,$arguments){var $test=pseudoClasses[$pseudoClass],$element,i;if($test) for(i=0;($element=$from[i]);i++)\nif($test($element,$arguments)) $results.push($element)};pseudoClasses[\"link\"]=function($element){var $document=getDocument($element);if($document.links) for(var i=0;i<$document.links.length;i++){if($document.links[i]==$element) return true}};pseudoClasses[\"visited\"]=function($element){};var thisElement=function($element){return($element&&$element.nodeType==1&&$element.tagName!=\"!\")?$element:null};var previousElementSibling=function($element){while($element&&($element=$element.previousSibling)&&!thisElement($element)) continue;return $element};var nextElementSibling=function($element){while($element&&($element=$element.nextSibling)&&!thisElement($element)) continue;return $element};var firstElementChild=function($element){return thisElement($element.firstChild)||nextElementSibling($element.firstChild)};var lastElementChild=function($element){return thisElement($element.lastChild)||previousElementSibling($element.lastChild)};var childElements=function($element){var $childElements=[];$element=firstElementChild($element);while($element){$childElements.push($element);$element=nextElementSibling($element)}\nreturn $childElements};var isMSIE=true;var isXML=function($element){var $document=getDocument($element);return(typeof $document.mimeType==\"unknown\")?/\\.xml$/i.test($document.URL):Boolean($document.mimeType==\"XML Document\")};var getDocument=function($element){return $element.ownerDocument||$element.document};var getElementsByTagName=function($element,$tagName){return($tagName==\"*\"&&$element.all)?$element.all:$element.getElementsByTagName($tagName)};var compareTagName=function($element,$tagName,$namespace){if($tagName==\"*\") return thisElement($element);if(!compareNamespace($element,$namespace)) return false;if(!isXML($element)) $tagName=$tagName.toUpperCase();return $element.tagName==$tagName};var compareNamespace=function($element,$namespace){return!$namespace||($namespace==\"*\")||($element.scopeName==$namespace)};var getTextContent=function($element){return $element.innerText};\nfunction _msie_selectById($results,$from,id){var $match,i,j;for(i=0;i<$from.length;i++){if($match=$from[i].all.item(id)){if($match.id==id) $results.push($match);else if($match.length!=null){for(j=0;j<$match.length;j++){if($match[j].id==id) $results.push($match[j])}}}}\nreturn $results};if(![].push) Array.prototype.push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i]}\nreturn this.length};var $NAMESPACE=/\\|/;\nfunction select($$from,$token,$filter,$arguments){if($NAMESPACE.test($filter)){$filter=$filter.split($NAMESPACE);$arguments=$filter[0];$filter=$filter[1]}\nvar $results=[];if(selectors[$token]){selectors[$token]($results,$$from,$filter,$arguments)}\nreturn $results};var $STANDARD_SELECT=/^[^\\s>+~]/;var $$STREAM=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;\nfunction _toStream($selector){if($STANDARD_SELECT.test($selector)) $selector=\" \"+$selector;return $selector.match($$STREAM)||[]};var $WHITESPACE=/\\s*([\\s>+~(),]|^|$)\\s*/g;var $IMPLIED_ALL=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;var parseSelector=function($selector){return $selector.replace($WHITESPACE,\"$1\").replace($IMPLIED_ALL,\"$1*$2\")};var Quote={toString: function(){return \"'\"},match:/^('[^']*')|(\"[^\"]*\")$/,test: function($string){return this.match.test($string)},add: function($string){return this.test($string)?$string:this+$string+this},remove: function($string){return this.test($string)?$string.slice(1,-1):$string}};var getText=function($text){return Quote.remove($text)};var $ESCAPE=/([\\/()[\\]?{}|*+-])/g;\nfunction regEscape($string){return $string.replace($ESCAPE,\"\\\\$1\")};cssQuery.addModule(\"css-standard\", function(){isMSIE=eval(\"false;/*@cc_on@if(@\\x5fwin32)isMSIE=true@end@*/\");if(!isMSIE){getElementsByTagName=function($element,$tagName,$namespace){return $namespace?$element.getElementsByTagNameNS(\"*\",$tagName):$element.getElementsByTagName($tagName)};compareNamespace=function($element,$namespace){return!$namespace||($namespace==\"*\")||($element.prefix==$namespace)};isXML=document.contentType? function($element){return/xml/i.test(getDocument($element).contentType)}: function($element){return getDocument($element).documentElement.tagName!=\"HTML\"};getTextContent=function($element){return $element.textContent||$element.innerText||_getTextContent($element)};\nfunction _getTextContent($element){var $textContent=\"\",$node,i;for(i=0;($node=$element.childNodes[i]);i++){switch($node.nodeType){case 11:case 1:$textContent+=_getTextContent($node);break;case 3:$textContent+=$node.nodeValue;break}}\nreturn $textContent}}});cssQuery.addModule(\"css-level2\", function(){selectors[\">\"]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=childElements($from[i]);for(j=0;($element=$subset[j]);j++)\nif(compareTagName($element,$tagName,$namespace))\n$results.push($element)}};selectors[\"+\"]=function($results,$from,$tagName,$namespace){for(var i=0;i<$from.length;i++){var $element=nextElementSibling($from[i]);if($element&&compareTagName($element,$tagName,$namespace))\n$results.push($element)}};selectors[\"@\"]=function($results,$from,$attributeSelectorID){var $test=attributeSelectors[$attributeSelectorID].test;var $element,i;for(i=0;($element=$from[i]);i++)\nif($test($element)) $results.push($element)};pseudoClasses[\"first-child\"]=function($element){return!previousElementSibling($element)};pseudoClasses[\"lang\"]=function($element,$code){$code=new RegExp(\"^\"+$code,\"i\");while($element&&!$element.getAttribute(\"lang\")) $element=$element.parentNode;return $element&&$code.test($element.getAttribute(\"lang\"))};AttributeSelector.NS_IE=/\\\\:/g;AttributeSelector.PREFIX=\"@\";AttributeSelector.tests={};AttributeSelector.replace=function($match,$attribute,$namespace,$compare,$value){var $key=this.PREFIX+$match;if(!attributeSelectors[$key]){$attribute=this.create($attribute,$compare||\"\",$value||\"\");attributeSelectors[$key]=$attribute;attributeSelectors.push($attribute)}\nreturn attributeSelectors[$key].id};AttributeSelector.parse=function($selector){$selector=$selector.replace(this.NS_IE,\"|\");var $match;while($match=$selector.match(this.match)){var $replace=this.replace($match[0],$match[1],$match[2],$match[3],$match[4]);$selector=$selector.replace(this.match,$replace)}\nreturn $selector};AttributeSelector.create=function($propertyName,$test,$value){var $attributeSelector={};$attributeSelector.id=this.PREFIX+attributeSelectors.length;$attributeSelector.name=$propertyName;$test=this.tests[$test];$test=$test?$test(this.getAttribute($propertyName),getText($value)):false;$attributeSelector.test=new Function(\"e\",\"return \"+$test);return $attributeSelector};AttributeSelector.getAttribute=function($name){switch($name.toLowerCase()){case \"id\":return \"e.id\";case \"class\":return \"e.className\";case \"for\":return \"e.htmlFor\";case \"href\":if(isMSIE){return \"String((e.outerHTML.match(/href=\\\\x22?([^\\\\s\\\\x22]*)\\\\x22?/)||[])[1]||'')\"}}\nreturn \"e.getAttribute('\" + $name.replace($NAMESPACE, \":\") + \"')\"};AttributeSelector.tests[\"\"]=function($attribute){return $attribute};AttributeSelector.tests[\"=\"]=function($attribute,$value){return $attribute+\"==\"+Quote.add($value)};AttributeSelector.tests[\"~=\"]=function($attribute,$value){return \"/(^| )\"+regEscape($value)+\"( |$)/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"|=\"]=function($attribute,$value){return \"/^\"+regEscape($value)+\"(-|$)/.test(\"+$attribute+\")\"};var _parseSelector=parseSelector;parseSelector=function($selector){return _parseSelector(AttributeSelector.parse($selector))}});cssQuery.addModule(\"css-level3\", function(){selectors[\"~\"]=function($results,$from,$tagName,$namespace){var $element,i;for(i=0;($element=$from[i]);i++){while($element=nextElementSibling($element)){if(compareTagName($element,$tagName,$namespace))\n$results.push($element)}}};pseudoClasses[\"contains\"]=function($element,$text){$text=new RegExp(regEscape(getText($text)));return $text.test(getTextContent($element))};pseudoClasses[\"root\"]=function($element){return $element==getDocument($element).documentElement};pseudoClasses[\"empty\"]=function($element){var $node,i;for(i=0;($node=$element.childNodes[i]);i++){if(thisElement($node)||$node.nodeType==3) return false}\nreturn true};pseudoClasses[\"last-child\"]=function($element){return!nextElementSibling($element)};pseudoClasses[\"only-child\"]=function($element){$element=$element.parentNode;return firstElementChild($element)==lastElementChild($element)};pseudoClasses[\"not\"]=function($element,$selector){var $negated=cssQuery($selector,getDocument($element));for(var i=0;i<$negated.length;i++){if($negated[i]==$element) return false}\nreturn true};pseudoClasses[\"nth-child\"]=function($element,$arguments){return nthChild($element,$arguments,previousElementSibling)};pseudoClasses[\"nth-last-child\"]=function($element,$arguments){return nthChild($element,$arguments,nextElementSibling)};pseudoClasses[\"target\"]=function($element){return $element.id==location.hash.slice(1)};pseudoClasses[\"checked\"]=function($element){return $element.checked};pseudoClasses[\"enabled\"]=function($element){return $element.disabled===false};pseudoClasses[\"disabled\"]=function($element){return $element.disabled};pseudoClasses[\"indeterminate\"]=function($element){return $element.indeterminate};AttributeSelector.tests[\"^=\"]=function($attribute,$value){return \"/^\"+regEscape($value)+\"/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"$=\"]=function($attribute,$value){return \"/\"+regEscape($value)+\"$/.test(\"+$attribute+\")\"};AttributeSelector.tests[\"*=\"]=function($attribute,$value){return \"/\"+regEscape($value)+\"/.test(\"+$attribute+\")\"};\nfunction nthChild($element,$arguments,$traverse){switch($arguments){case \"n\":return true;case \"even\":$arguments=\"2n\";break;case \"odd\":$arguments=\"2n+1\"}\nvar $$children=childElements($element.parentNode);\nfunction _checkIndex($index){var $index=($traverse==nextElementSibling)?$$children.length-$index:$index-1;return $$children[$index]==$element};if(!isNaN($arguments)) return _checkIndex($arguments);$arguments=$arguments.split(\"n\");var $multiplier=parseInt($arguments[0]);var $step=parseInt($arguments[1]);if((isNaN($multiplier)||$multiplier==1)&&$step==0) return true;if($multiplier==0&&!isNaN($step)) return _checkIndex($step);if(isNaN($step)) $step=0;var $count=1;while($element=$traverse($element)) $count++;if(isNaN($multiplier)||$multiplier==1)\nreturn($traverse==nextElementSibling)?($count<=$step):($step>=$count);return($count%$multiplier)==$step}});loaded=true;return cssQuery}();\n\n/* - plone_javascript_variables.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/plone_javascript_variables.js?original=1\nvar portal_url='http://www.tuke.sk/tuke';var form_modified_message='\u00c3\u009adaje z formul\u00c3\u00a1ra neboli ulo\u00c5\u00been\u00c3\u00a9. V\u00c5\u00a1etky zmeny bud\u00c3\u00ba straten\u00c3\u00a9.';var form_resubmit_message='Na tla\u00c4\u008d\u00c3\u00adtko odosla\u00c5\u00a5 ste u\u00c5\u00be klikli predt\u00c3\u00bdm. Skuto\u00c4\u008dne chcete tento formul\u00c3\u00a1r posla\u00c5\u00a5 znovu?';var external_links_open_new_window=false;var external_links_in_content_only=true;\n\n/* - nodeutilities.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/nodeutilities.js?original=1\nfunction wrapNode(node,wrappertype,wrapperclass){var wrapper=document.createElement(wrappertype)\nwrapper.className=wrapperclass;var innerNode=node.parentNode.replaceChild(wrapper,node);wrapper.appendChild(innerNode)};\nfunction nodeContained(innernode,outernode){var node=innernode.parentNode;while(node!=document){if(node==outernode){return true}\nnode=node.parentNode}\nreturn false};\nfunction findContainer(node,func){while(node!=null){if(func(node)){return node}\nnode=node.parentNode}\nreturn false};\nfunction hasClassName(node,class_name){return new RegExp('\\\\b'+class_name+'\\\\b').test(node.className)};\nfunction addClassName(node,class_name){if(!node.className){node.className=class_name} else if(!hasClassName(node,class_name)){var className=node.className+\" \"+class_name;node.className=className.split(/\\s+/).join(' ')}};\nfunction removeClassName(node,class_name){var className=node.className;if(className){className=className.replace(new RegExp('\\\\b'+class_name+'\\\\b'),'');className=className.replace(/\\s+/g,' ');node.className=className.replace(/\\s+$/g,'')}};\nfunction replaceClassName(node,old_class,new_class,ignore_missing){if(ignore_missing&&!hasClassName(node,old_class)){addClassName(node,new_class)} else{var className=node.className;if(className){className=className.replace(new RegExp('\\\\b'+old_class+'\\\\b'),new_class);className=className.replace(/\\s+/g,' ');node.className=className.replace(/\\s+$/g,'')}}};\nfunction walkTextNodes(node,func,data){if(!node){return false}\nif(node.hasChildNodes){for(var i=0;i<node.childNodes.length;i++){walkTextNodes(node.childNodes[i],func,data)}\nif(node.nodeType==3){func(node,data)}}};\nfunction getInnerTextCompatible(node){var result=new Array();walkTextNodes(node,\nfunction(n,d){d.push(n.nodeValue)},result);return result.join(\"\")};\nfunction getInnerTextFast(node){if(node.innerText){return node.innerText} else{return getInnerTextCompatible(node)}};\nfunction sortNodes(nodes,fetch_func,cmp_func){if(!W3CDOM){return false};var SortNodeWrapper=function(node){this.value=fetch_func(node);this.cloned_node=node.cloneNode(true);this.toString=function(){if(this.value.toString){return this.value.toString()} else{return this.value}}}\nvar items=new Array();for(var i=0;i<nodes.length;i++){items.push(new SortNodeWrapper(nodes[i]))}\nif(cmp_func){items.sort(cmp_func)} else{items.sort()}\nfor(var i=0;i<items.length;i++){var dest=nodes[i];dest.parentNode.replaceChild(items[i].cloned_node,dest)}};\n\n/* - cookie_functions.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/cookie_functions.js?original=1\nfunction createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires=\"; expires=\"+date.toGMTString()} else{expires=\"\"}\ndocument.cookie=name+\"=\"+escape(value)+expires+\"; path=/;\"};\nfunction readCookie(name){var nameEQ=name+\"=\";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length)}\nif(c.indexOf(nameEQ)==0){return unescape(c.substring(nameEQ.length,c.length))}}\nreturn null};\n\n/* - livesearch.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/livesearch.js?original=1\nvar liveSearchReq=false;var t=null;var liveSearchLast=\"\";var queryTarget=\"livesearch_reply?q=\";var searchForm=null;var searchInput=null;var isIE=false;var _cache=new Object();var widthOffset=1;\nfunction calculateWidth(){}\nfunction getElementDimensions(elemID){var base=document.getElementById(elemID);var offsetTrail=base;var offsetLeft=0;var offsetTop=0;var width=0;while(offsetTrail){offsetLeft+=offsetTrail.offsetLeft;offsetTop+=offsetTrail.offsetTop;offsetTrail=offsetTrail.offsetParent}\nif(navigator.userAgent.indexOf(\"Mac\")!=-1&&typeof document.body.leftMargin!=\"undefined\"){offsetLeft+=document.body.leftMargin;offsetTop+=document.body.topMargin}\nif(!isIE)\nwidth=searchInput.offsetWidth-widthOffset*2;else\nwidth=searchInput.offsetWidth;return{left:offsetLeft,top:offsetTop,width:width,height:base.offsetHeight,bottom:offsetTop+base.offsetHeight,right:offsetLeft+width}}\nfunction liveSearchInit(){searchInput=document.getElementById('searchGadget');if(searchInput==null||searchInput==undefined)\nreturn\nif(navigator.userAgent.indexOf(\"KHTML\")>0){searchInput.addEventListener(\"keydown\",liveSearchKeyPress,false);searchInput.addEventListener(\"focus\",liveSearchDoSearch,false);searchInput.addEventListener(\"keydown\",liveSearchStart,false);searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false)} else if(searchInput.addEventListener){searchInput.addEventListener(\"keypress\",liveSearchKeyPress,false);searchInput.addEventListener(\"blur\",liveSearchHideDelayed,false);searchInput.addEventListener(\"keypress\",liveSearchStart,false)} else{searchInput.attachEvent(\"onkeydown\",liveSearchKeyPress);searchInput.attachEvent(\"onkeydown\",liveSearchStart);searchInput.attachEvent(\"onblur\",liveSearchHideDelayed);isIE=true}\nsearchInput.setAttribute(\"autocomplete\",\"off\");var pos=getElementDimensions('searchGadget');result=document.getElementById('LSResult');if((typeof result.offsetParent!='undefined')&&(result.offsetParent!=null)){pos.left=pos.left-result.offsetParent.offsetLeft+pos.width} else{pos.left=pos.left+pos.width}\nresult.style.display='none'}\nfunction liveSearchHideDelayed(){window.setTimeout(\"liveSearchHide()\",400)}\nfunction liveSearchHide(){document.getElementById(\"LSResult\").style.display=\"none\";var highlight=document.getElementById(\"LSHighlight\");if(highlight)\nhighlight.removeAttribute(\"id\")}\nfunction getFirstHighlight(){var set=getHits();return set[0]}\nfunction getLastHighlight(){var set=getHits();return set[set.length-1]}\nfunction getHits(){var res=document.getElementById(\"LSShadow\");var set=res.getElementsByTagName('li');return set}\nfunction findChild(object,specifier){var cur=object.firstChild;try{while(cur!=undefined){cur=cur.nextSibling;if(specifier(cur)==true)\nreturn cur}} catch(e){};return null}\nfunction findNext(object,specifier){var cur=object;try{while(cur!=undefined){cur=cur.nextSibling;if(cur.nodeType==3)\ncur=cur.nextSibling;if(cur!=undefined){if(specifier(cur)==true)\nreturn cur} else{break}}} catch(e){};return null}\nfunction findPrev(object,specifier){var cur=object;try{cur=cur.previousSibling;if(cur.nodeType==3)\ncur=cur.previousSibling;if(cur!=undefined){if(specifier(cur)==true)\nreturn cur}} catch(e){};return null}\nfunction liveSearchKeyPress(event){var highlight=document.getElementById(\"LSHighlight\");if(event.keyCode==40){if(!highlight){highlight=getFirstHighlight()} else{highlight.removeAttribute(\"id\");highlight=findNext(highlight, function(o){return o.className==\"LSRow\"})}\nif(highlight)\nhighlight.setAttribute(\"id\",\"LSHighlight\");if(!isIE)\nevent.preventDefault()}\nelse if(event.keyCode==38){if(!highlight){highlight=getLastHighlight()}\nelse{highlight.removeAttribute(\"id\");highlight=findPrev(highlight, function(o){return o.className=='LSRow'})}\nif(highlight)\nhighlight.setAttribute(\"id\",\"LSHighlight\");if(!isIE)\nevent.preventDefault()}\nelse if(event.keyCode==27){if(highlight)\nhighlight.removeAttribute(\"id\");document.getElementById(\"LSResult\").style.display=\"none\"}}\nfunction liveSearchStart(event){if(t){window.clearTimeout(t)}\nvar code=event.keyCode;if(code!=40&&code!=38&&code!=27&&code!=37&&code!=39){t=window.setTimeout(\"liveSearchDoSearch()\",200)}}\nfunction liveSearchDoSearch(){if(typeof liveSearchRoot==\"undefined\"){if(typeof portal_url==\"undefined\"){liveSearchRoot=\"\"} else{if(portal_url[portal_url.length-1]=='/'){liveSearchRoot=portal_url} else{liveSearchRoot=portal_url+'/'}}}\nif(typeof liveSearchRootSubDir==\"undefined\"){liveSearchRootSubDir=\"\"}\nif(liveSearchLast!=searchInput.value){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort()}\nif(searchInput.value==\"\"){liveSearchHide();return false}\nif(searchInput.value.length<2){liveSearchHide();return false}\nvar result=_cache[searchInput.value];if(result){showResult(result);return}\nliveSearchReq=new XMLHttpRequest();liveSearchReq.onreadystatechange=liveSearchProcessReqChange;liveSearchReq.open(\"GET\",liveSearchRoot+queryTarget+encodeURIComponent(searchInput.value));liveSearchLast=searchInput.value;liveSearchReq.send(null)}}\nfunction showResult(result){var res=document.getElementById(\"LSResult\");res.style.display=\"block\";var sh=document.getElementById(\"LSShadow\");sh.innerHTML=result}\nfunction liveSearchProcessReqChange(){if(liveSearchReq.readyState==4){try{if(liveSearchReq.status>299||liveSearchReq.status<200||liveSearchReq.responseText.length<10)\nreturn} catch(e){return}\nshowResult(liveSearchReq.responseText);_cache[liveSearchLast]=liveSearchReq.responseText}}\nfunction liveSearchSubmit(){var highlight=document.getElementById(\"LSHighlight\");if(highlight){var targets=highlight.getElementsByTagName('a');if(targets.length==0)\nreturn true;var target=targets[0].href;if(!target)\nreturn true;if((liveSearchRoot.length>0)&&(target.substring(0,liveSearchRoot.length)!=liveSearchRoot)){window.location=liveSearchRoot+liveSearchRootSubDir+target} else{window.location=target}\nreturn false} else{return true}}\nif(window.addEventListener)\nwindow.addEventListener(\"load\",liveSearchInit,false);else if(window.attachEvent)\nwindow.attachEvent(\"onload\",liveSearchInit);\n\n/* - fullscreenmode.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/fullscreenmode.js?original=1\nfunction toggleFullScreenMode(){var body=cssQuery('body')[0];if(document.getElementById('icon-full_screen')){var fsicon=document.getElementById('icon-full_screen')}\nif(hasClassName(body,'fullscreen')){removeClassName(body,'fullscreen');createCookie('fullscreenMode','');if(fsicon){fsicon.src='fullscreenexpand_icon.gif'}} else{addClassName(body,'fullscreen');createCookie('fullscreenMode','1');if(fsicon){fsicon.src='fullscreencollapse_icon.gif'}}};\nfunction fullscreenModeLoad(){if(document.getElementById('icon-full_screen')){var fsicon=document.getElementById('icon-full_screen')}\nif(readCookie('fullscreenMode')=='1'){var body=cssQuery('body')[0];addClassName(body,'fullscreen');if(fsicon){fsicon.src='fullscreencollapse_icon.gif'}}};registerPloneFunction(fullscreenModeLoad)\n\n\n/* - select_all.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/select_all.js?original=1\nfunction selectAll(id,formName){if(formName==null){checkboxes=document.getElementsByName(id)\nfor(i=0;i<checkboxes.length;i++){checkboxes[i].checked=true }} else{for(i=0;i<document.forms[formName].elements.length;i++){if(document.forms[formName].elements[i].name==id){document.forms[formName].elements[i].checked=true}}}}\nfunction deselectAll(id,formName){if(formName==null){checkboxes=document.getElementsByName(id)\nfor(i=0;i<checkboxes.length;i++){checkboxes[i].checked=false }} else{for(i=0;i<document.forms[formName].elements.length;i++){if(document.forms[formName].elements[i].name==id){document.forms[formName].elements[i].checked=false}}}}\nfunction toggleSelect(selectbutton,id,initialState,formName){id=id||'ids:list'\nif(selectbutton.isSelected==null){initialState=initialState||false;selectbutton.isSelected=initialState}\nif(selectbutton.isSelected==false){selectbutton.setAttribute('src',portal_url+'/select_none_icon.gif');selectbutton.isSelected=true;return selectAll(id,formName)} else{selectbutton.setAttribute('src',portal_url+'/select_all_icon.gif');selectbutton.isSelected=false;return deselectAll(id,formName)}}\n\n\n/* - dropdown.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/dropdown.js?original=1\nfunction isActionMenu(node){if(hasClassName(node,'actionMenu')){return true}\nreturn false};\nfunction hideAllMenus(){var menus=cssQuery('dl.actionMenu');for(var i=0;i<menus.length;i++){replaceClassName(menus[i],'activated','deactivated',true)}};\nfunction toggleMenuHandler(event){if(!event) var event=window.event;if(!W3CDOM){return true}\nvar container=findContainer(this,isActionMenu);if(!container){return true}\nif(hasClassName(container,'activated')){replaceClassName(container,'activated','deactivated',true)} else{replaceClassName(container,'deactivated','activated',true)}\nreturn false};\nfunction hideMenusHandler(event){if(!event) var event=window.event;hideAllMenus();return true};\nfunction actionMenuDocumentMouseDown(event){if(!event) var event=window.event;if(event.target)\ntarg=event.target;else if(event.srcElement)\ntarg=event.srcElement;var container=findContainer(targ,isActionMenu);if(container){return true}\nhideAllMenus();return true};\nfunction actionMenuMouseOver(event){if(!event) var event=window.event;if(!this.tagName&&(this.tagName=='A'||this.tagName=='a')){return true}\nvar container=findContainer(this,isActionMenu);if(!container){return true}\nvar menu_id=container.id;var switch_menu=false;var menus=cssQuery('dl.actionMenu');for(var i=0;i<menus.length;i++){var menu=menus[i]\nif(hasClassName(menu,'activated')){switch_menu=true}\nif(menu.id!=menu_id){replaceClassName(menu,'activated','deactivated',true)}}\nif(switch_menu){var menu=cssQuery('#'+menu_id)[0];if(menu){replaceClassName(menu,'deactivated','activated',true)}}\nreturn true};\nfunction initializeMenus(){if(!W3CDOM){return false}\ndocument.onmousedown=actionMenuDocumentMouseDown;hideAllMenus();var menu_headers=cssQuery('dl.actionMenu > dt.actionMenuHeader > a');for(var i=0;i<menu_headers.length;i++){var menu_header=menu_headers[i];menu_header.onclick=toggleMenuHandler;menu_header.onmouseover=actionMenuMouseOver}\nvar menu_contents=cssQuery('dl.actionMenu > dd.actionMenuContent');for(var i=0;i<menu_contents.length;i++){menu_contents[i].onclick=hideMenusHandler}};registerPloneFunction(initializeMenus);\n\n/* - dragdropreorder.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/dragdropreorder.js?original=1\nvar ploneDnDReorder={}\nploneDnDReorder.dragging=null;ploneDnDReorder.table=null;ploneDnDReorder.rows=null;ploneDnDReorder.isDraggable=function(node){return hasClassName(node,'draggable')};ploneDnDReorder.doDown=function(e){if(!e) var e=window.event;var target=findContainer(this,ploneDnDReorder.isDraggable);if(target==null)\nreturn;for(var i=0;i<ploneDnDReorder.rows.length;i++)\nploneDnDReorder.rows[i].onmousemove=ploneDnDReorder.doDrag;ploneDnDReorder.dragging=target;ploneDnDReorder.dragging._position=ploneDnDReorder.getPos(ploneDnDReorder.dragging);addClassName(ploneDnDReorder.dragging,\"dragging\");return false}\nploneDnDReorder.getPos=function(node){var children=node.parentNode.childNodes;var pos=0;for(var i=0;i<children.length;i++){if(node==children[i])\nreturn pos;if(hasClassName(children[i],\"draggable\"))\npos++}\nreturn null}\nploneDnDReorder.doDrag=function(e){if(!e) var e=window.event;if(!ploneDnDReorder.dragging)\nreturn;var target=this;if(!target)\nreturn;if(target.id!=ploneDnDReorder.dragging.id){ploneDnDReorder.swapElements(target,ploneDnDReorder.dragging)}\nreturn false}\nploneDnDReorder.swapElements=function(child1,child2){var parent=child1.parentNode;var children=parent.childNodes;var items=new Array();for(var i=0;i<children.length;i++){var node=children[i];items[i]=node;if(node.id){removeClassName(node,\"even\");removeClassName(node,\"odd\");if(node.id==child1.id)\nitems[i]=child2;if(node.id==child2.id)\nitems[i]=child1}}\nSarissa.clearChildNodes(parent);var pos=0;for(var i=0;i<items.length;i++){var node=parent.appendChild(items[i]);if(node.id){if(pos%2)\naddClassName(node,\"even\");else\naddClassName(node,\"odd\");pos++}}}\nploneDnDReorder.doUp=function(e){if(!e) var e=window.event;if(!ploneDnDReorder.dragging)\nreturn;removeClassName(ploneDnDReorder.dragging,\"dragging\");ploneDnDReorder.updatePositionOnServer();ploneDnDReorder.dragging._position=null;try{delete ploneDnDReorder.dragging._position} catch(e){}\nploneDnDReorder.dragging=null;for(var i=0;i<ploneDnDReorder.rows.length;i++)\nploneDnDReorder.rows[i].onmousemove=null;return false}\nploneDnDReorder.updatePositionOnServer=function(){var delta=ploneDnDReorder.getPos(ploneDnDReorder.dragging)-ploneDnDReorder.dragging._position;if(delta==0)\nreturn;var req=new XMLHttpRequest();req.open(\"POST\",\"folder_moveitem\",true);req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");var item_id=ploneDnDReorder.dragging.id.substr('folder-contents-item-'.length);req.send(\"item_id=\"+item_id+\"&delta:int=\"+delta)}\nploneDnDReorder.initializeDragDrop=function(){ploneDnDReorder.table=cssQuery(\"table#sortable\")[0];if(!ploneDnDReorder.table)\nreturn;ploneDnDReorder.rows=cssQuery(\"table#sortable > tr,\"+\"table#sortable > tbody > tr\");var targets=cssQuery(\"table#sortable > tr > td,\"+\"table#sortable > tbody > tr > td\");for(var i=0;i<targets.length;i++){if(hasClassName(targets[i],'notDraggable'))\ncontinue;targets[i].onmousedown=ploneDnDReorder.doDown;targets[i].onmouseup=ploneDnDReorder.doUp;addClassName(targets[i],\"draggingHook\")}}\nregisterPloneFunction(ploneDnDReorder.initializeDragDrop);\n\n/* - mark_special_links.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/mark_special_links.js?original=1\nfunction scanforlinks(){if(!W3CDOM){return false}\nif((typeof external_links_in_content_only!='undefined')&&(external_links_in_content_only==false)){links=document.getElementsByTagName('a');for(i=0;i<links.length;i++){if((links[i].getAttribute('href'))&&(links[i].className.indexOf('link-plain')==-1)){var linkval=links[i].getAttribute('href');if(linkval.toLowerCase().indexOf(window.location.protocol+'//'+window.location.host)==0){} else if(linkval.indexOf('http:')!=0){} else{links[i].setAttribute('target','_blank')}}}}\ncontentarea=getContentArea();if(!contentarea)\nreturn false;links=contentarea.getElementsByTagName('a');for(i=0;i<links.length;i++){if((links[i].getAttribute('href'))&&(links[i].className.indexOf('link-plain')==-1)){var linkval=links[i].getAttribute('href');if(linkval.toLowerCase().indexOf(window.location.protocol+'//'+window.location.host)==0){} else if(linkval.indexOf('http:')!=0){protocols=['mailto','ftp','news','irc','h323','sip','callto','https','feed','webcal'];for(p=0;p<protocols.length;p++){if(linkval.indexOf(protocols[p]+':')==0){wrapNode(links[i],'span','link-'+protocols[p]);break}}} else{if(links[i].getElementsByTagName('img').length==0){wrapNode(links[i],'span','link-external')}\nif((typeof external_links_open_new_window!='undefined')&&(external_links_open_new_window==true)){links[i].setAttribute('target','_blank')}}}}};registerPloneFunction(scanforlinks);\n\n/* - collapsiblesections.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/collapsiblesections.js?original=1\nfunction isCollapsible(node){if(hasClassName(node,'collapsible')){return true}\nreturn false};\nfunction toggleCollapsible(event){if(!event) var event=window.event;if(!this.tagName&&(this.tagName=='DT'||this.tagName=='dt')){return true}\nvar container=findContainer(this,isCollapsible);if(!container){return true}\nif(hasClassName(container,'collapsedBlockCollapsible')){replaceClassName(container,'collapsedBlockCollapsible','expandedBlockCollapsible')} else if(hasClassName(container,'expandedBlockCollapsible')){replaceClassName(container,'expandedBlockCollapsible','collapsedBlockCollapsible')} else if(hasClassName(container,'collapsedInlineCollapsible')){replaceClassName(container,'collapsedInlineCollapsible','expandedInlineCollapsible')} else if(hasClassName(container,'expandedInlineCollapsible')){replaceClassName(container,'expandedInlineCollapsible','collapsedInlineCollapsible')}};\nfunction activateCollapsibles(){if(!W3CDOM){return false}\nvar collapsibles=cssQuery('dl.collapsible');for(var i=0;i<collapsibles.length;i++){var collapsible=collapsibles[i];var collapsible_header=cssQuery('dt.collapsibleHeader',collapsible)[0];collapsible_header.onclick=toggleCollapsible;if(hasClassName(collapsible,'inline')){if(hasClassName(collapsible,'collapsedOnLoad')){replaceClassName(collapsible,'collapsedOnLoad','collapsedInlineCollapsible')} else{addClassName(collapsible,'expandedInlineCollapsible')}} else{if(hasClassName(collapsible,'collapsedOnLoad')){replaceClassName(collapsible,'collapsedOnLoad','collapsedBlockCollapsible')} else{addClassName(collapsible,'expandedBlockCollapsible')}}}};registerPloneFunction(activateCollapsibles);\n\n/* - highlightsearchterms.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/highlightsearchterms.js?original=1\nfunction highlightTermInNode(node,word){var contents=node.nodeValue;var index=contents.toLowerCase().indexOf(word.toLowerCase());if(index<0){return false};var parent=node.parentNode;if(parent.className!=\"highlightedSearchTerm\"){var hiword=document.createElement(\"span\");hiword.className=\"highlightedSearchTerm\";hiword.appendChild(document.createTextNode(contents.substr(index,word.length)));parent.insertBefore(document.createTextNode(contents.substr(0,index)),node);parent.insertBefore(hiword,node);parent.insertBefore(document.createTextNode(contents.substr(index+word.length)),node);parent.removeChild(node)}}\nfunction highlightSearchTerms(terms,startnode){if(!W3CDOM){return false};if(!terms){return false};if(!startnode){return false};for(var term_index=0;term_index<terms.length;term_index++){var term=terms[term_index];if(term.length<1)\ncontinue;var term_lower=term.toLowerCase();if(term_lower!='not'&&term_lower!='and'&&term_lower!='or'){walkTextNodes(startnode,highlightTermInNode,term)}}}\nfunction getSearchTermsFromURI(uri){var query;if(typeof decodeURI!='undefined'){query=decodeURI(uri)} else if(typeof unescape!='undefined'){query=unescape(uri)} else{}\nvar result=new Array();if(window.decodeReferrer){var referrerSearch=decodeReferrer();if(null!=referrerSearch&&referrerSearch.length>0){result=referrerSearch}}\nvar qfinder=new RegExp(\"searchterm=([^&]*)\",\"gi\");var qq=qfinder.exec(query);if(qq&&qq[1]){var terms=qq[1].replace(/\\+/g,' ').split(/\\s+/);for(var i=0;i<terms.length;i++){if(terms[i]!=''){result.push(terms[i])}}\nreturn result}\nreturn result.length==0?false:result}\nfunction highlightSearchTermsFromURI(){if(!W3CDOM){return false};var terms=getSearchTermsFromURI(window.location.search);var contentarea=getContentArea();highlightSearchTerms(terms,contentarea)}\nregisterPloneFunction(highlightSearchTermsFromURI);\n\n/* - se-highlight.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/se-highlight.js?original=1\nvar searchEngines=[['^http://([^.]+\\\\.)?google.*','q='],['^http://search\\\\.yahoo.*','p='],['^http://search\\\\.msn.*','q='],['^http://search\\\\.aol.*','userQuery='],['^http://(www\\\\.)?altavista.*','q='],['^http://(www\\\\.)?feedster.*','q='],['^http://search\\\\.lycos.*','query='],['^http://(www\\\\.)?alltheweb.*','q='],['^http://(www\\\\.)?ask\\\\.com.*','q=']]\nfunction decodeReferrer(ref){if(null==ref&&document.referrer){ref=document.referrer}\nif(!ref) return null;var match=new RegExp('');var seQuery='';for(var i=0;i<searchEngines.length;i++){if(!match.compile){match=new RegExp(searchEngines[i][0],'i')} else{match.compile(searchEngines[i][0],'i')}\nif(ref.match(match)){if(!match.compile){match=new RegExp('^.*[?&]'+searchEngines[i][1]+'([^&]+)&?.*$','i')} else{match.compile('^.*[?&]'+searchEngines[i][1]+'([^&]+)&?.*$')}\nseQuery=ref.replace(match,'$1');if(seQuery){seQuery=decodeURIComponent(seQuery);seQuery=seQuery.replace(/\\'|\"/, '');return seQuery.split(/[\\s,\\+\\.]+/)}}}\nreturn null}\n\n\n/* - first_input_focus.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/first_input_focus.js?original=1\nfunction setFocus(){if(!W3CDOM){return false};var xre=new RegExp(/\\berror\\b/);for(var f=0;(formnode=document.getElementsByTagName('form').item(f));f++){for(var i=0;(node=formnode.getElementsByTagName('div').item(i));i++){if(xre.exec(node.className)){for(var j=0;(inputnode=node.getElementsByTagName('input').item(j));j++){try{if(inputnode.focus){inputnode.focus();return}} catch(e){}}}}}}\nregisterPloneFunction(setFocus)\n\n\n/* - folder_contents_filter.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/folder_contents_filter.js?original=1\nfunction submitFolderAction(folderAction){document.folderContentsForm.action=document.folderContentsForm.action+'/'+folderAction;document.folderContentsForm.submit()}\nfunction submitFilterAction(){document.folderContentsForm.action=document.folderContentsForm.action+'/folder_contents';filter_selection=document.getElementById('filter_selection');for(var i=0;i<filter_selection.length;i++){if(filter_selection.options[i].selected){if(filter_selection.options[i].value=='#'){document.folderContentsForm.filter_state.value='clear_view_filter'}\nelse{document.folderContentsForm.filter_state.value='set_view_filter'}}}\ndocument.folderContentsForm.submit()}\n\n\n/* - folder_contents_hideAddItems.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/folder_contents_hideAddItems.js?original=1\nfunction hideTraditionalAddItemPullDown(){pullDown=document.getElementById('traditional-add-item-pulldown');if(pullDown){pullDown.style.display='none'}}\nregisterPloneFunction(hideTraditionalAddItemPullDown)\n\n\n/* - styleswitcher.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/styleswitcher.js?original=1\nfunction setActiveStyleSheet(title,reset){if(!W3CDOM){return false};var i,a,main;for(i=0;(a=document.getElementsByTagName(\"link\")[i]);i++){if(a.getAttribute(\"rel\").indexOf(\"style\")!=-1&&a.getAttribute(\"title\")){a.disabled=true;if(a.getAttribute(\"title\")==title){a.disabled=false}}}\nif(reset==1){createCookie(\"wstyle\",title,365)}};\nfunction setStyle(){var style=readCookie(\"wstyle\");if(style!=null){setActiveStyleSheet(style,0)}};registerPloneFunction(setStyle);\n\n/* - table_sorter.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/table_sorter.js?original=1\nfunction compare(a,b){au=new String(a);bu=new String(b);if(au.charAt(4)!='-'&&au.charAt(7)!='-'){var an=parseFloat(au)\nvar bn=parseFloat(bu)}\nif(isNaN(an)||isNaN(bn)){as=au.toLowerCase()\nbs=bu.toLowerCase()\nif(as>bs){return 1}\nelse{return-1}}\nelse{return an-bn}}\nfunction getConcatenedTextContent(node){var _result=\"\";if(node==null){return _result}\nvar childrens=node.childNodes;var i=0;while(i<childrens.length){var child=childrens.item(i);switch(child.nodeType){case 1:case 5:_result+=getConcatenedTextContent(child);break;case 3:case 2:case 4:_result+=child.nodeValue;break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:break}\ni++}\nreturn _result}\nfunction sort(e){var el=window.event?window.event.srcElement:e.currentTarget;var a=new Array();if(el.nodeName=='IMG') el=el.parentNode;var name=el.childNodes.item(1).nodeValue;var dad=el.parentNode;var node;for(var im=0;(node=dad.getElementsByTagName(\"th\").item(im));im++){if(node.lastChild.nodeName=='IMG'){lastindex=node.getElementsByTagName('img').length-1;node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowBlank.gif')}}\nfor(var i=0;(node=dad.getElementsByTagName(\"th\").item(i));i++){var xre=new RegExp(/\\bnosort\\b/);if(!xre.exec(node.className)&&node.childNodes.item(1).nodeValue==name){lastindex=node.getElementsByTagName('img').length-1;node.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowUp.gif');break}}\nvar tbody=dad.parentNode.parentNode.getElementsByTagName(\"tbody\").item(0);for(var j=0;(node=tbody.getElementsByTagName(\"tr\").item(j));j++){a[j]=new Array();a[j][0]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(i));a[j][1]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(1));a[j][2]=getConcatenedTextContent(node.getElementsByTagName(\"td\").item(0));a[j][3]=node}\nif(a.length>1){a.sort(compare);if(a[0][0]==getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(0).getElementsByTagName(\"td\").item(i))&&a[1][0]==getConcatenedTextContent(tbody.getElementsByTagName(\"tr\").item(1).getElementsByTagName(\"td\").item(i))){a.reverse();lastindex=el.getElementsByTagName('img').length-1;el.getElementsByTagName('img').item(lastindex).setAttribute('src',portal_url+'/arrowDown.gif')}}\nfor(var j=0;j<a.length;j++){a[j][3].className=((j%2)==0)?'odd':'even';tbody.appendChild(a[j][3])}}\nfunction initalizeTableSort(e){if(!W3CDOM){return false};var tbls=document.getElementsByTagName('table');for(var t=0;t<tbls.length;t++){var re=new RegExp(/\\blisting\\b/)\nvar xre=new RegExp(/\\bnosort\\b/)\nif(re.exec(tbls[t].className)&&!xre.exec(tbls[t].className)){try{var thead=tbls[t].getElementsByTagName(\"thead\").item(0);var node;blankarrow=document.createElement('img');blankarrow.setAttribute('src',portal_url+'/arrowBlank.gif');blankarrow.setAttribute('height',6);blankarrow.setAttribute('width',9);initialsort=false;for(var i=0;(node=thead.getElementsByTagName(\"th\").item(i));i++){if(!xre.exec(node.className)){node.insertBefore(blankarrow.cloneNode(1),node.firstChild);node.style.cursor='pointer';if(!initialsort){initialsort=true;uparrow=document.createElement('img');uparrow.setAttribute('src',portal_url+'/arrowUp.gif');uparrow.setAttribute('height',6);uparrow.setAttribute('width',9);node.appendChild(uparrow)} else{node.appendChild(blankarrow.cloneNode(1))}\nif(node.addEventListener) node.addEventListener(\"click\",sort,false);else if(node.attachEvent) node.attachEvent(\"onclick\",sort)}}} catch(er){}}}}\nregisterPloneFunction(initalizeTableSort)\n\n\n/* - calendar_formfield.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/calendar_formfield.js?original=1\nfunction onJsCalendarDateUpdate(cal){var year=cal.params.input_id_year;var month=cal.params.input_id_month;var day=cal.params.input_id_day;var daystr=''+cal.date.getDate();if(daystr.length==1)\ndaystr='0'+daystr;var monthstr=''+(cal.date.getMonth()+1);if(monthstr.length==1)\nmonthstr='0'+monthstr;cal.params.inputField.value=''+cal.date.getFullYear()+'/'+monthstr+'/'+daystr\nyear.value=cal.params.inputField.value.substring(0,4);month.value=cal.params.inputField.value.substring(5,7);day.value=cal.params.inputField.value.substring(8,10)}\nfunction showJsCalendar(input_id_anchor,input_id,input_id_year,input_id_month,input_id_day,input_id_hour,input_id_minute,yearStart,yearEnd){var input_id_anchor=document.getElementById(input_id_anchor);var input_id=document.getElementById(input_id);var input_id_year=document.getElementById(input_id_year);var input_id_month=document.getElementById(input_id_month);var input_id_day=document.getElementById(input_id_day);var format='y/mm/dd';var dateEl=input_id;var mustCreate=false;var cal=window.calendar;var params={'range':[yearStart,yearEnd],inputField:input_id,input_id_year:input_id_year,input_id_month:input_id_month,input_id_day:input_id_day};\nfunction param_default(pname,def){if(typeof params[pname]==\"undefined\"){params[pname]=def}};param_default(\"inputField\",null);param_default(\"displayArea\",null);param_default(\"button\",null);param_default(\"eventName\",\"click\");param_default(\"ifFormat\",\"%Y/%m/%d\");param_default(\"daFormat\",\"%Y/%m/%d\");param_default(\"singleClick\",true);param_default(\"disableFunc\",null);param_default(\"dateStatusFunc\",params[\"disableFunc\"]);param_default(\"dateText\",null);param_default(\"firstDay\",1);param_default(\"align\",\"Bl\");param_default(\"range\",[1900,2999]);param_default(\"weekNumbers\",true);param_default(\"flat\",null);param_default(\"flatCallback\",null);param_default(\"onSelect\",null);param_default(\"onClose\",null);param_default(\"onUpdate\",null);param_default(\"date\",null);param_default(\"showsTime\",false);param_default(\"timeFormat\",\"24\");param_default(\"electric\",true);param_default(\"step\",2);param_default(\"position\",null);param_default(\"cache\",false);param_default(\"showOthers\",false);param_default(\"multiple\",null);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,null,onJsCalendarDateUpdate,\nfunction(cal){cal.hide()});cal.time24=true;cal.weekNumbers=true;mustCreate=true} else{cal.hide()}\ncal.showsOtherMonths=false;cal.yearStep=2;cal.setRange(yearStart,yearEnd);cal.params=params;cal.setDateStatusHandler(null);cal.getDateText=null;cal.setDateFormat(format);if(mustCreate)\ncal.create();cal.refresh();if(!params.position)\ncal.showAtElement(input_id_anchor,null);else\ncal.showAt(params.position[0],params.position[1]);return false}\nfunction update_date_field(field,year,month,day,hour,minute,ampm){var field=document.getElementById(field)\nvar date=document.getElementById(date)\nvar year=document.getElementById(year)\nvar month=document.getElementById(month)\nvar day=document.getElementById(day)\nvar hour=document.getElementById(hour)\nvar minute=document.getElementById(minute)\nvar ampm=document.getElementById(ampm)\nif(0<year.value){field.value=year.value+\"-\"+month.value+\"-\"+day.value+\" \"+hour.value+\":\"+minute.value\nif(ampm&&ampm.value)\nfield.value=field.value+\" \"+ampm.value}\nelse{field.value=''\nmonth.options[0].selected=1\nday.options[0].selected=1\nhour.options[0].selected=1\nminute.options[0].selected=1\nif(ampm&&ampm.options)\nampm.options[0].selected=1}}\n\n\n/* - calendarpopup.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/calendarpopup.js?original=1\nfunction showDay(date){document.getElementById('day'+date).style.visibility='visible';return true}\nfunction hideDay(date){document.getElementById('day'+date).style.visibility='hidden';return true}\n\n\n/* - ie5fixes.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/ie5fixes.js?original=1\nfunction hackPush(el){this[this.length]=el}\nfunction hackPop(){var N=this.length-1,el=this[N];this.length=N\nreturn el}\nfunction hackShift(){var one=this[0],N=this.length;for(var i=1;i<N;i++){this[i-1]=this[i]}\nthis.length=N-1\nreturn one}\nvar testPushPop=new Array();if(testPushPop.push){}else{Array.prototype.push=hackPush\nArray.prototype.pop=hackPop\nArray.prototype.shift=hackShift}\n\n\n/* - formUnload.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/formUnload.js?original=1\nif(!window.beforeunload)(function(){var BeforeUnloadHandler=function(){var self=this;this.message=window.form_modified_message||\"Your form has not been saved. All changes you have made will be lost.\";this.forms=[];this.chkId=[];this.chkType=new this.CheckType();this.handlers=[this.isAnyFormChanged];this.submitting=false;this.execute=function(event){if(self.submitting) return;if(!event) event=window.event;for(var i=0;i<self.handlers.length;i++){var fn=self.handlers[i];var message=message||fn.apply(self)}\nif(message===true) message=self.message;if(message===false) message=undefined;if(event&&message){event.returnValue=message}\nreturn message}\nthis.execute.tool=this}\nvar Class=BeforeUnloadHandler.prototype;Class.isAnyFormChanged=function(){for(var i=0;i<this.forms.length;i++){var form=this.forms[i];if(this.isElementChanged(form)){return true}}\nreturn false}\nClass.addHandler=function(fn){this.handlers.push(fn)}\nClass.onsubmit=function(){var tool=window.onbeforeunload&&window.onbeforeunload.tool;tool.submitting=true}\nClass.addForm=function(form){for(var i=0;i<this.forms.length;i++){if(this.forms[i]==form) return}\nthis.forms.push(form);form.onsubmit=this.onsubmit;var elements=form.getElementsByTagName('input');for(var j=0;j<elements.length;j++){var ele=elements[j];if(ele.type=='hidden'){ele.setAttribute('originalValue',ele.defaultValue)}}}\nClass.addForms=function(){for(var i=0;i<arguments.length;i++){var element=arguments[i];if(!element) continue;if(element.tagName=='FORM'){this.addForm(element)}\nelse{var forms=element.getElementsByTagName('form');for(var j=0;j<forms.length;j++){this.addForm(forms[j])}}}}\nClass.removeForms=function(){for(var i=0;i<arguments.length;i++){var element=arguments[i];if(!element) continue;if(element.tagName=='FORM'){for(var j=0;j<arguments.length;j++){if(this.forms[j]==element){this.forms.splice(j--,1);element.onsubmit=null}}} else{var forms=element.getElementsByTagName('form');for(var j=0;j<forms.length;j++){this.removeForms(forms[j])}}}}\nClass.CheckType=function(){};var c=Class.CheckType.prototype;c.checkbox=c.radio=function(ele){return ele.checked!=ele.defaultChecked}\nc.password=c.textarea=c.text=function(ele){return ele.value!=ele.defaultValue}\nc.hidden=function(ele){var orig=ele.getAttribute(\"originalValue\");return orig&&(ele.value!=orig)}\nc['select-one']=function(ele){for(var i=0 ;i<ele.length;i++){var opt=ele.options[i];if(opt.selected!=opt.defaultSelected){if(i===0&&opt.selected) continue;return true}}\nreturn false}\nc['select-multiple']=function(ele){for(var i=0 ;i<ele.length;i++){var opt=ele.options[i];if(opt.selected!=opt.defaultSelected){return true}}\nreturn false}\nClass.chk_form=function(form){var elements=form.elements;for(var i=0;i<elements.length;i++){var element=elements[i];if(this.isElementChanged(element)){return true}}\nreturn false}\nClass.isElementChanged=function(ele){var method=ele.id&&this.chkId[ele.id];if(!method&&ele.type&&ele.name)\nmethod=this.chkType[ele.type];if(!method&&ele.tagName)\nmethod=this['chk_'+ele.tagName.toLowerCase()];return method?method.apply(this,[ele]):false};window.onbeforeunload=new BeforeUnloadHandler().execute;registerPloneFunction(function(){if(!W3CDOM){return false};var tool=window.onbeforeunload&&window.onbeforeunload.tool;var content=getContentArea();if(tool&&content){var forms=cssQuery('form.enableUnloadProtection');for(var i=0;i<forms.length;i++){tool.addForm(forms[i])}}})})();\n\n/* - sarissa.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/sarissa.js?original=1\nfunction Sarissa(){};Sarissa.PARSED_OK=\"Document contains no parsing errors\";Sarissa.IS_ENABLED_TRANSFORM_NODE=false;Sarissa.IS_ENABLED_XMLHTTP=false;Sarissa.IS_ENABLED_SELECT_NODES=false;var _sarissa_iNsCounter=0;var _SARISSA_IEPREFIX4XSLPARAM=\"\";var _SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;var _SARISSA_HAS_DOM_CREATE_DOCUMENT=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;var _SARISSA_HAS_DOM_FEATURE=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;var _SARISSA_IS_MOZ=_SARISSA_HAS_DOM_CREATE_DOCUMENT&&_SARISSA_HAS_DOM_FEATURE;var _SARISSA_IS_SAFARI=navigator.userAgent.toLowerCase().indexOf(\"applewebkit\")!=-1;var _SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf(\"msie\")>-1&&navigator.userAgent.toLowerCase().indexOf(\"opera\")==-1;if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}};if(_SARISSA_IS_IE){_SARISSA_IEPREFIX4XSLPARAM=\"xsl:\";var _SARISSA_DOM_PROGID=\"\";var _SARISSA_XMLHTTP_PROGID=\"\";var _SARISSA_THREADEDDOM_PROGID=\"\";var _SARISSA_XSLTEMPLATE_PROGID=\"\";Sarissa.pickRecentProgID=function(idList,enabledList){var bFound=false;for(var i=0;i<idList.length&&!bFound;i++){try{var oDoc=new ActiveXObject(idList[i]);o2Store=idList[i];bFound=true;for(var j=0;j<enabledList.length;j++)\nif(i<=enabledList[j][1])\nSarissa[\"IS_ENABLED_\"+enabledList[j][0]]=true}catch(objException){}};if(!bFound)\nthrow \"Could not retreive a valid progID of Class: \"+idList[idList.length-1]+\". (original exception: \"+e+\")\";idList=null;return o2Store};Sarissa.getDomDocument=function(sUri,sName){if(!_SARISSA_DOM_PROGID){_SARISSA_DOM_PROGID=Sarissa.pickRecentProgID([\"Msxml2.DOMDocument.4.0\",\"Msxml2.DOMDocument.3.0\",\"MSXML2.DOMDocument\",\"MSXML.DOMDocument\",\"Microsoft.XMLDOM\"],[[\"SELECT_NODES\",2],[\"TRANSFORM_NODE\",2]])};var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);if(sName){if(sUri){oDoc.loadXML(\"<a\"+_sarissa_iNsCounter+\":\"+sName+\" xmlns:a\"+_sarissa_iNsCounter+\"=\\\"\"+sUri+\"\\\" />\");++_sarissa_iNsCounter}\nelse\noDoc.loadXML(\"<\"+sName+\"/>\")};return oDoc};Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc.parseError!=0){parseErrorText=\"XML Parsing Error: \"+oDoc.parseError.reason+\"\\nLocation: \"+oDoc.parseError.url+\"\\nLine Number \"+oDoc.parseError.line+\", Column \"+oDoc.parseError.linepos+\":\\n\"+oDoc.parseError.srcText+\"\\n\";for(var i=0;i<oDoc.parseError.linepos;i++){parseErrorText+=\"-\"};parseErrorText+=\"^\\n\"};return parseErrorText};Sarissa.setXpathNamespaces=function(oDoc,sNsSet){oDoc.setProperty(\"SelectionLanguage\",\"XPath\");oDoc.setProperty(\"SelectionNamespaces\",sNsSet)};XSLTProcessor=function(){if(!_SARISSA_XSLTEMPLATE_PROGID){_SARISSA_XSLTEMPLATE_PROGID=Sarissa.pickRecentProgID([\"Msxml2.XSLTemplate.4.0\",\"MSXML2.XSLTemplate.3.0\"],[[\"XSLTPROC\",2]])};this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);this.processor=null};XSLTProcessor.prototype.importStylesheet=function(xslDoc){if(!_SARISSA_THREADEDDOM_PROGID){_SARISSA_THREADEDDOM_PROGID=Sarissa.pickRecentProgID([\"MSXML2.FreeThreadedDOMDocument.4.0\",\"MSXML2.FreeThreadedDOMDocument.3.0\"])}\nvar converted=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);converted.loadXML(xslDoc.xml);this.template.stylesheet=converted;this.processor=this.template.createProcessor();this.paramsSet=new Array()};XSLTProcessor.prototype.transformToDocument=function(sourceDoc){this.processor.input=sourceDoc;var outDoc=new ActiveXObject(_SARISSA_DOM_PROGID);this.processor.output=outDoc;this.processor.transform();return outDoc};XSLTProcessor.prototype.transformToFragment=function(sourceDoc,ownerDocument){return this.transformToDocument(sourceDoc)};XSLTProcessor.prototype.setParameter=function(nsURI,name,value){if(nsURI){this.processor.addParameter(name,value,nsURI)}else{this.processor.addParameter(name,value)};if(!this.paramsSet[\"\"+nsURI]){this.paramsSet[\"\"+nsURI]=new Array()};this.paramsSet[\"\"+nsURI][name]=value};XSLTProcessor.prototype.getParameter=function(nsURI,name){if(this.paramsSet[\"\"+nsURI]&&this.paramsSet[\"\"+nsURI][name])\nreturn this.paramsSet[\"\"+nsURI][name];else\nreturn null}}\nelse{if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){if(window.XMLDocument){XMLDocument.prototype.onreadystatechange=null;try{XMLDocument.prototype.readyState=0} catch(e){};XMLDocument.prototype.parseError=0;var _SARISSA_SYNC_NON_IMPLEMENTED=false;try{XMLDocument.prototype.async=true;_SARISSA_SYNC_NON_IMPLEMENTED=true}catch(e){};XMLDocument.prototype._sarissa_load=XMLDocument.prototype.load;XMLDocument.prototype.load=function(sURI){var oDoc=document.implementation.createDocument(\"\",\"\",null);Sarissa.copyChildNodes(this,oDoc);this.parseError=0;Sarissa.__setReadyState__(this,1);try{if(this.async==false&&_SARISSA_SYNC_NON_IMPLEMENTED){var tmp=new XMLHttpRequest();tmp.open(\"GET\",sURI,false);tmp.send(null);Sarissa.__setReadyState__(this,2);Sarissa.copyChildNodes(tmp.responseXML,this);Sarissa.__setReadyState__(this,3)}\nelse{this._sarissa_load(sURI)}}\ncatch(objException){this.parseError=-1}\nfinally{if(this.async==false){Sarissa.__handleLoad__(this)}};return oDoc}};Sarissa.__handleLoad__=function(oDoc){if(!oDoc.documentElement||oDoc.documentElement.tagName==\"parsererror\")\noDoc.parseError=-1;Sarissa.__setReadyState__(oDoc,4)};_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this)};Sarissa.__setReadyState__=function(oDoc,iReadyState){oDoc.readyState=iReadyState;if(oDoc.onreadystatechange!=null&&typeof oDoc.onreadystatechange==\"function\")\noDoc.onreadystatechange()};Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:\"\",sName?sName:\"\",null);oDoc.addEventListener(\"load\",_sarissa_XMLDocument_onload,false);return oDoc}}};if(!window.DOMParser){DOMParser=function(){};DOMParser.prototype.parseFromString=function(sXml,contentType){var doc=Sarissa.getDomDocument();doc.loadXML(sXml);return doc}};if(!window.XMLHttpRequest&&window.ActiveXObject){XMLHttpRequest=function(){if(!_SARISSA_XMLHTTP_PROGID){_SARISSA_XMLHTTP_PROGID=Sarissa.pickRecentProgID([\"Msxml2.XMLHTTP.4.0\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\",\"Microsoft.XMLHTTP\"])};return new ActiveXObject(_SARISSA_XMLHTTP_PROGID)}}\nif(window.XMLHttpRequest){Sarissa.IS_ENABLED_XMLHTTP=true};if(!window.document.importNode&&_SARISSA_IS_IE){try{window.document.importNode=function(oNode,bChildren){var importNode=document.createElement(\"div\");if(bChildren)\nimportNode.innerHTML=Sarissa.serialize(oNode);else\nimportNode.innerHTML=Sarissa.serialize(oNode.cloneNode(false));return importNode.firstChild}}catch(e){}};if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc.parseError!=0){if(oDoc.documentElement.tagName==\"parsererror\"){parseErrorText=oDoc.documentElement.firstChild.data;parseErrorText+=\"\\n\"+oDoc.documentElement.firstChild.nextSibling.firstChild.data}\nelse if(oDoc.documentElement.tagName==\"html\"){parseErrorText=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"h1\")[0],false)+\"\\n\";parseErrorText+=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"body\")[0],false)+\"\\n\";parseErrorText+=Sarissa.getText(oDoc.documentElement.getElementsByTagName(\"pre\")[0],false)}};return parseErrorText}};Sarissa.getText=function(oNode,deep){var s=\"\";var nodes=oNode.childNodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];var nodeType=node.nodeType;if(nodeType==Node.TEXT_NODE||nodeType==Node.CDATA_SECTION_NODE){s+=node.data}\nelse if(deep==true&&(nodeType==Node.ELEMENT_NODE||nodeType==Node.DOCUMENT_NODE||nodeType==Node.DOCUMENT_FRAGMENT_NODE)){s+=Sarissa.getText(node,true)}};return s};if(window.XMLSerializer){Sarissa.serialize=function(oDoc){return(new XMLSerializer()).serializeToString(oDoc)}}else{if((Sarissa.getDomDocument(\"\",\"foo\",null)).xml){Sarissa.serialize=function(oDoc){return oDoc.xml};XMLSerializer=function(){};XMLSerializer.prototype.serializeToString=function(oNode){return oNode.xml}}};Sarissa.stripTags=function(s){return s.replace(/<[^>]+>/g,\"\")};Sarissa.clearChildNodes=function(oNode){while(oNode.hasChildNodes()){oNode.removeChild(oNode.firstChild)}};Sarissa.copyChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo)};var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;var nodes=nodeFrom.childNodes;if(ownerDoc.importNode){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true))}}\nelse{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true))}}};Sarissa.moveChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo)};var nodes=nodeFrom.childNodes;if(nodeFrom.ownerDocument==nodeTo.ownerDocument){nodeTo.appendChild(nodes[i])}else{var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;if(ownerDoc.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true))}}\nelse{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true))}};Sarissa.clearChildNodes(nodeFrom)}};Sarissa.xmlize=function(anyObject,objectName,indentSpace){indentSpace=indentSpace?indentSpace:'';var s=indentSpace+'<'+objectName+'>';var isLeaf=false;if(!(anyObject instanceof Object)||anyObject instanceof Number||anyObject instanceof String||anyObject instanceof Boolean||anyObject instanceof Date){s+=Sarissa.escape(\"\"+anyObject);isLeaf=true}else{s+=\"\\n\";var itemKey='';var isArrayItem=anyObject instanceof Array;for(var name in anyObject){s+=Sarissa.xmlize(anyObject[name],(isArrayItem?\"array-item key=\\\"\"+name+\"\\\"\":name),indentSpace+\" \")};s+=indentSpace};return s+=(objectName.indexOf(' ')!=-1?\"</array-item>\\n\":\"</\"+objectName+\">\\n\")};Sarissa.escape=function(sXml){return sXml.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g,\"&apos;\")};Sarissa.unescape=function(sXml){return sXml.replace(/&apos;/g,\"'\").replace(/&quot;/g,\"\\\"\").replace(/&gt;/g,\">\").replace(/&lt;/g,\"<\").replace(/&amp;/g,\"&\")};\n\n/* - login.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/login.js?original=1\nfunction cookiesEnabled(){var c=\"areYourCookiesEnabled=0\";document.cookie=c;var dc=document.cookie;if(dc.indexOf(c)==-1) return 0;c=\"areYourCookiesEnabled=1\";document.cookie=c;dc=document.cookie;if(dc.indexOf(c)==-1) return 0;document.cookie=\"areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT\";return 1}\nfunction setLoginVars(user_name_id,alt_user_name_id,password_id,empty_password_id,js_enabled_id,cookies_enabled_id){if(js_enabled_id){el=document.getElementById(js_enabled_id);if(el){el.value=1}}\nif(cookies_enabled_id){el=document.getElementById(cookies_enabled_id);if(el){el.value=cookiesEnabled()}}\nif(user_name_id&&alt_user_name_id){user_name=document.getElementById(user_name_id)\nalt_user_name=document.getElementById(alt_user_name_id)\nif(user_name&&alt_user_name){alt_user_name.value=user_name.value}}\nif(password_id&&empty_password_id){password=document.getElementById(password_id)\nempty_password=document.getElementById(empty_password_id)\nif(password&&empty_password){if(password.value.length==0){empty_password.value='1'} else{empty_password.value='0'}}}\nreturn 1}\nfunction showCookieMessage(msg_id){msg=document.getElementById(msg_id)\nif(msg){if(cookiesEnabled()){msg.style.display='none'} else{msg.style.display='block'}}}\nfunction showEnableCookiesMessage(){showCookieMessage('enable_cookies_message')}\nregisterPloneFunction(showEnableCookiesMessage);\n\n/* - formsubmithelpers.js - */\n// http://www.tuke.sk/tuke/portal_javascripts/formsubmithelpers.js?original=1\nfunction inputSubmitOnClick(event){if(!event) var event=window.event;if(hasClassName(this,'submitting')){return confirm(window.form_resubmit_message)} else{addClassName(this,'submitting')}\nreturn true}\nfunction registerSubmitHandler(){var nodes=cssQuery('input[type=submit]');for(var i=0;i<nodes.length;i++){var node=nodes[i];if(!node.onclick){node.onclick=inputSubmitOnClick}}}\nregisterPloneFunction(registerSubmitHandler);\n","truncated":"false"}
{"page":"http://www.migracion.go.cr/","url":"http://www.migracion.go.cr/js_srv/xmlextras.js","body":"//<script>\r\n//////////////////\r\n// Helper Stuff //\r\n//////////////////\r\n\r\n// used to find the Automation server name\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\t\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\n//////////////////////////\r\n// Start the Real stuff //\r\n//////////////////////////\r\n\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1; \r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// fell through\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\r\n\t\t// DOM2\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\t\t\t\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\r\n\t\t\treturn doc;\r\n\t\t}\r\n\r\n\t\tif (window.ActiveXObject) \r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t/*\r\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\t*/\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n\r\n}","truncated":"false"}
{"page":"http://www.pds.gov.cn/","url":"http://www.pds.gov.cn/publicfiles/business/htmlfiles/js/ie-ff.js","body":"if(window.Event){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Event\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n event yes yes yes yes yes \n event.returnValue yes yes no no no \n event.cancelBubble yes yes no no no \n event.srcElement yes yes no no no \n event.fromElement yes yes no no no \n \n */ \n Event.prototype.__defineSetter__(\"returnValue\",function(b){// \n if(!b)this.preventDefault(); \n return b; \n }); \n Event.prototype.__defineSetter__(\"cancelBubble\",function(b){// \u00e8\u00ae\u00be\u00e7\u00bd\u00ae\u00e6\u0088\u0096\u00e8\u0080\u0085\u00e6\u00a3\u0080\u00e7\u00b4\u00a2\u00e5\u00bd\u0093\u00e5\u0089\u008d\u00e4\u00ba\u008b\u00e4\u00bb\u00b6\u00e5\u008f\u00a5\u00e6\u009f\u0084\u00e7\u009a\u0084\u00e5\u00b1\u0082\u00e6\u00ac\u00a1\u00e5\u0086\u0092\u00e6\u00b3\u00a1 \n if(b)this.stopPropagation(); \n return b; \n }); \n Event.prototype.__defineGetter__(\"srcElement\",function(){ \n var node=this.target; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"fromElement\",function(){// \u00e8\u00bf\u0094\u00e5\u009b\u009e\u00e9\u00bc\u00a0\u00e6\u00a0\u0087\u00e7\u00a7\u00bb\u00e5\u0087\u00ba\u00e7\u009a\u0084\u00e6\u00ba\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var node; \n if(this.type==\"mouseover\") \n node=this.relatedTarget; \n else if(this.type==\"mouseout\") \n node=this.target; \n if(!node)return; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"toElement\",function(){// \u00e8\u00bf\u0094\u00e5\u009b\u009e\u00e9\u00bc\u00a0\u00e6\u00a0\u0087\u00e7\u00a7\u00bb\u00e5\u0085\u00a5\u00e7\u009a\u0084\u00e6\u00ba\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var node; \n if(this.type==\"mouseout\") \n node=this.relatedTarget; \n else if(this.type==\"mouseover\") \n node=this.target; \n if(!node)return; \n while(node.nodeType!=1)node=node.parentNode; \n return node; \n }); \n Event.prototype.__defineGetter__(\"offsetX\",function(){ \n return this.layerX; \n }); \n Event.prototype.__defineGetter__(\"offsetY\",function(){ \n return this.layerY; \n }); \n } \nif(window.Document){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Document\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n document.documentElement yes yes yes yes no \n document.activeElement yes null no no no \n \n */ \n } \nif(window.Node){// \u00e4\u00bf\u00ae\u00e6\u00ad\u00a3Node\u00e7\u009a\u0084DOM \n /* \n IE5 MacIE5 Mozilla Konqueror2.2 Opera5 \n Node.contains yes yes no no yes \n Node.replaceNode yes no no no no \n Node.removeNode yes no no no no \n Node.children yes yes no no no \n Node.hasChildNodes yes yes yes yes no \n Node.childNodes yes yes yes yes no \n Node.swapNode yes no no no no \n Node.currentStyle yes yes no no no \n \n */ \n Node.prototype.replaceNode=function(Node){// \u00e6\u009b\u00bf\u00e6\u008d\u00a2\u00e6\u008c\u0087\u00e5\u00ae\u009a\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n this.parentNode.replaceChild(Node,this); \n } \n Node.prototype.removeNode=function(removeChildren){// \u00e5\u0088\u00a0\u00e9\u0099\u00a4\u00e6\u008c\u0087\u00e5\u00ae\u009a\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n if(removeChildren) \n return this.parentNode.removeChild(this); \n else{ \n var range=document.createRange(); \n range.selectNodeContents(this); \n return this.parentNode.replaceChild(range.extractContents(),this); \n } \n } \n Node.prototype.swapNode=function(Node){// \u00e4\u00ba\u00a4\u00e6\u008d\u00a2\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n var nextSibling=this.nextSibling; \n var parentNode=this.parentNode; \n node.parentNode.replaceChild(this,Node); \n parentNode.insertBefore(node,nextSibling); \n } \n } \nif(window.HTMLElement){ \n HTMLElement.prototype.__defineGetter__(\"all\",function(){ \n var a=this.getElementsByTagName(\"*\"); \n var node=this; \n a.tags=function(sTagName){ \n return node.getElementsByTagName(sTagName); \n } \n return a; \n }); \n HTMLElement.prototype.__defineGetter__(\"parentElement\",function(){ \n if(this.parentNode==this.ownerDocument)return null; \n return this.parentNode; \n }); \n HTMLElement.prototype.__defineGetter__(\"children\",function(){ \n var tmp=[]; \n var j=0; \n var n; \n for(var i=0;i<this.childNodes.length;i++){ \n n=this.childNodes[i]; \n if(n.nodeType==1){ \n tmp[j++]=n; \n if(n.name){ \n if(!tmp[n.name]) \n tmp[n.name]=[]; \n tmp[n.name][tmp[n.name].length]=n; \n } \n if(n.id) \n tmp[n.id]=n; \n } \n } \n return tmp; \n }); \n HTMLElement.prototype.__defineGetter__(\"currentStyle\", function(){ \n return this.ownerDocument.defaultView.getComputedStyle(this,null); \n }); \n HTMLElement.prototype.__defineSetter__(\"outerHTML\",function(sHTML){ \n var r=this.ownerDocument.createRange(); \n r.setStartBefore(this); \n var df=r.createContextualFragment(sHTML); \n this.parentNode.replaceChild(df,this); \n return sHTML; \n }); \n HTMLElement.prototype.__defineGetter__(\"outerHTML\",function(){ \n var attr; \n var attrs=this.attributes; \n var str=\"<\"+this.tagName; \n for(var i=0;i<attrs.length;i++){ \n attr=attrs[i]; \n if(attr.specified) \n str+=\" \"+attr.name+'=\"'+attr.value+'\"'; \n } \n if(!this.canHaveChildren) \n return str+\">\"; \n return str+\">\"+this.innerHTML+\"</\"+this.tagName+\">\"; \n }); \n HTMLElement.prototype.__defineGetter__(\"canHaveChildren\",function(){ \n switch(this.tagName.toLowerCase()){ \n case \"area\": \n case \"base\": \n case \"basefont\": \n case \"col\": \n case \"frame\": \n case \"hr\": \n case \"img\": \n case \"br\": \n case \"input\": \n case \"isindex\": \n case \"link\": \n case \"meta\": \n case \"param\": \n return false; \n } \n return true; \n }); \n\n HTMLElement.prototype.__defineSetter__(\"innerText\",function(sText){ \n var parsedText=document.createTextNode(sText); \n this.innerHTML=parsedText; \n return parsedText; \n }); \n HTMLElement.prototype.__defineGetter__(\"innerText\",function(){ \n var r=this.ownerDocument.createRange(); \n r.selectNodeContents(this); \n return r.toString(); \n }); \n HTMLElement.prototype.__defineSetter__(\"outerText\",function(sText){ \n var parsedText=document.createTextNode(sText); \n this.outerHTML=parsedText; \n return parsedText; \n }); \n HTMLElement.prototype.__defineGetter__(\"outerText\",function(){ \n var r=this.ownerDocument.createRange(); \n r.selectNodeContents(this); \n return r.toString(); \n }); \n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n fHandler._ieEmuEventHandler=function(e){ \n window.event=e; \n return fHandler(); \n } \n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n } \n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n else \n this.removeEventListener(shortTypeName,fHandler,true); \n } \n HTMLElement.prototype.contains=function(Node){// \u00e6\u0098\u00af\u00e5\u0090\u00a6\u00e5\u008c\u0085\u00e5\u0090\u00ab\u00e6\u009f\u0090\u00e8\u008a\u0082\u00e7\u0082\u00b9 \n do if(Node==this)return true; \n while(Node=Node.parentNode); \n return false; \n } \n HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){ \n switch(where){ \n case \"beforeBegin\": \n this.parentNode.insertBefore(parsedNode,this); \n break; \n case \"afterBegin\": \n this.insertBefore(parsedNode,this.firstChild); \n break; \n case \"beforeEnd\": \n this.appendChild(parsedNode); \n break; \n case \"afterEnd\": \n if(this.nextSibling) \n this.parentNode.insertBefore(parsedNode,this.nextSibling); \n else \n this.parentNode.appendChild(parsedNode); \n break; \n } \n } \n HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){ \n var r=this.ownerDocument.createRange(); \n r.setStartBefore(this); \n var parsedHTML=r.createContextualFragment(htmlStr); \n this.insertAdjacentElement(where,parsedHTML); \n } \n HTMLElement.prototype.insertAdjacentText=function(where,txtStr){ \n var parsedText=document.createTextNode(txtStr); \n this.insertAdjacentElement(where,parsedText); \n } \n HTMLElement.prototype.attachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n fHandler._ieEmuEventHandler=function(e){ \n window.event=e; \n return fHandler(); \n } \n this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n } \n HTMLElement.prototype.detachEvent=function(sType,fHandler){ \n var shortTypeName=sType.replace(/on/,\"\"); \n if(typeof(fHandler._ieEmuEventHandler)==\"function\") \n this.removeEventListener(shortTypeName,fHandler._ieEmuEventHandler,false); \n else \n this.removeEventListener(shortTypeName,fHandler,true); \n } \n } \n///////////////////////////////////////////\t\nvar GetNodeValue = function(obj)\n{\n var str = \"\";\n if(window.ActiveXObject) //IE\n {\n str = obj.text;\n }\n else //Mozilla\n {\n try\n {\n str = obj.childNodes[0].nodeValue;\n }\n catch(ex)\n {\n str = \"\";\n }\n }\n return str;\n}\n\nif(document.implementation && document.implementation.createDocument)\n{\n XMLDocument.prototype.loadXML = function(xmlString)\n {\n var childNodes = this.childNodes;\n for (var i = childNodes.length - 1; i >= 0; i--)\n this.removeChild(childNodes[i]);\n\n var dp = new DOMParser();\n var newDOM = dp.parseFromString(xmlString, \"text/xml\");\n var newElt = this.importNode(newDOM.documentElement, true);\n this.appendChild(newElt);\n };\n\n // check for XPath implementation\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\n {\n // prototying the XMLDocument\n XMLDocument.prototype.selectNodes = function(cXPathString, xNode)\n {\n if( !xNode ) { xNode = this; } \n var oNSResolver = this.createNSResolver(this.documentElement)\n var aItems = this.evaluate(cXPathString, xNode, oNSResolver, \n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)\n var aResult = [];\n for( var i = 0; i < aItems.snapshotLength; i++)\n {\n aResult[i] = aItems.snapshotItem(i);\n }\n return aResult;\n }\n\n // prototying the Element\n Element.prototype.selectNodes = function(cXPathString)\n {\n if(this.ownerDocument.selectNodes)\n {\n return this.ownerDocument.selectNodes(cXPathString, this);\n }\n else{throw \"For XML Elements Only\";}\n }\n }\n\n // check for XPath implementation\n if( document.implementation.hasFeature(\"XPath\", \"3.0\") )\n {\n // prototying the XMLDocument\n XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)\n {\n if( !xNode ) { xNode = this; } \n var xItems = this.selectNodes(cXPathString, xNode);\n if( xItems.length > 0 )\n {\n return xItems[0];\n }\n else\n {\n return null;\n }\n }\n \n // prototying the Element\n Element.prototype.selectSingleNode = function(cXPathString)\n { \n if(this.ownerDocument.selectSingleNode)\n {\n return this.ownerDocument.selectSingleNode(cXPathString, this);\n }\n else{throw \"For XML Elements Only\";}\n }\n }\n}","truncated":"false"}
{"page":"http://www.ulsankyocharo.com/","url":"http://www.ulsankyocharo.com/sem/combine/combine.php?type=javascript&files=include/js/base.js,include/js/form.js,include/js/popupMenu.js,include/js/textcut.js,include/js/selectbox.js,include/js/XMLhttpRequest.js,include/js/search/search.js,include/js/rolling.js,include/js/lightbox.js,include/js/popupWindow.js&packed=yes&mv=20160816","body":"\nvar _SEM_QDN_=new Object();function getQDN(url,icross){if((typeof(url)=='undefined')||(!url))url=String(document.location.href);if((!icross)&&(_SEM_QDN_[url]))return _SEM_QDN_[url];var qdn='';var tmp=String(url).split(\"/\")[2].split(\".\");for(var i=1,cnt=tmp.length;i<cnt;i++)qdn+=tmp[i]+(((i+1)<cnt)?'.':'');if(!icross){return _SEM_QDN_[url]=qdn}else{if((qdn=='infocross.co.kr')||(qdn=='albabee.co.kr')||(qdn=='townc.co.kr'))return'infocross.co.kr';else return'icross.co.kr'}};function addEvent(target,en,func){if(target==null)return false;if(window.addEventListener){if((target==window)&&(en.toLowerCase()==\"load\")&&!window.opera&&!(!document.all&&document.childNodes&&!navigator.taintEnabled))document.addEventListener(\"DOMContentLoaded\",func,false);else target.addEventListener(en,func,false)}else if(target.attachEvent){if((target==window)&&(en.toLowerCase()==\"load\"))document.attachEvent(\"onreadystatechange\",function(e){if(document.readyState==\"complete\")func()});else target.attachEvent(\"on\"+en,func)}else{var __func=eval(\"target.on\"+en);eval(\"target.on\"+en)=function(){func();__func()}}return true};function removeEvent(target,en,func){if(window.removeEventListener){if((target==window)&&(en.toLowerCase()==\"load\")&&!window.opera&&!(!document.all&&document.childNodes&&!navigator.taintEnabled))document.removeEventListener(\"DOMContentLoaded\",func,false);else target.removeEventListener(en,func,false)}else if(target.detachEvent){if((target==window)&&(en.toLowerCase()==\"load\"))document.detachEvent(\"onreadystatechange\",function(e){if(document.readyState==\"complete\")func()});else target.detachEvent(\"on\"+en,func)}};function wopen(url,id,option,w,h,dir){if(typeof(dir)==\"undefined\")dir=\"c\";if(typeof(w)!=\"undefined\")option+=\",width=\"+w;if(typeof(h)!=\"undefined\")option+=\",height=\"+h;switch(dir){case\"tl\":option+=\",top=0\";option+=\",left=0\";break;case\"tr\":option+=\",top=0\";if(typeof(w)!=\"undefined\")option+=\",left=\"+(screen.width-w);break;case\"c\":if((typeof(w)!=\"undefined\")&&(typeof(h)!=\"undefined\")){option+=\",top=\"+((screen.height-h)/2);option+=\",left=\"+((screen.width-w)/2)}break;case\"bl\":if(typeof(h)!=\"undefined\")option+=\",top=\"+(screen.height-h);option+=\",left=0\";break;case\"br\":if(typeof(h)!=\"undefined\")option+=\",top=\"+(screen.height-h);if(typeof(w)!=\"undefined\")option+=\",left=\"+(screen.width-w);break}var win=window.open(url,id,option);if(win!=null)win.focus();else alert(\"\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c1\u00a6\u00c7\u00d1\u00c7\u00cf\u00bf\u00a9 \u00c3\u00a2\u00c0\u00bb \u00bf\u00ad \u00bc\u00f6 \u00be\u00f8\u00bd\u00c0\u00b4\u00cf\u00b4\u00d9.\\n\\n\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c7\u00e3\u00bf\u00eb \u00c7\u00d8 \u00c1\u00d6\u00bd\u00ca\u00bd\u00c3\u00bf\u00c0.\")};function resizeImage(i,max,hmax,reset,useMargin){var w=parseInt(i.width);var h=parseInt(i.height);if((w==0)&&(h==0)){reset=true}if((typeof(reset)!=\"undefined\")&&(reset==true)){try{var imgsrc=i.src;var newimg=new Image();newimg.src=imgsrc;i.width=newimg.width;i.height=newimg.height;i.style.width=newimg.width+'px';i.style.height=newimg.height+'px';w=parseInt(newimg.width);h=parseInt(newimg.height)}catch(e){}}if(!max){if(i.parentNode){max=i.parentNode.offsetWidth;hmax=i.parentNode.offsetHeight}if(max<=0)max=100;if(hmax<=0)hmax=100}if(w>max){h=h*(max/w);i.style.height=parseInt(h)+'px';w=max;i.style.width=max+'px'}if(h>hmax){w=w*(hmax/h);i.style.width=parseInt(w)+'px';h=hmax;i.style.height=hmax+'px'}if((useMargin)&&(h<hmax)){i.style.marginTop=parseInt((hmax-h)/2)+'px'}};var userPopup=function(){};userPopup.prototype.open=function(event,uid){if(uid!=\"\"){var win=window.open(_LOCATION_BASE_URL+\"/user/index.php?uid=\"+uid,\"__USER_INFO\",\"scrollbars=no,status=no,resizable=no,location=no, width=400,height=500,top=\"+(screen.height-500)/2+\",left=\"+(screen.width-400)/2);if(win!=null)win.focus();else alert(\"\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c1\u00a6\u00c7\u00d1\u00c7\u00cf\u00bf\u00a9 \u00c3\u00a2\u00c0\u00bb \u00bf\u00ad \u00bc\u00f6 \u00be\u00f8\u00bd\u00c0\u00b4\u00cf\u00b4\u00d9.\\\\n\\\\n\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c7\u00e3\u00bf\u00eb \u00c7\u00d8 \u00c1\u00d6\u00bd\u00ca\u00bd\u00c3\u00bf\u00c0.\")}};var userPopupMenu=null;function onloadUserPopup(){if(typeof(userPopup)!=\"undefined\"){userPopupMenu=new userPopup()}};addEvent(window,\"load\",onloadUserPopup);function getCookie(Name){var cookiestr=\"; \"+document.cookie;var search=\"; \"+Name+\"=\";if(document.cookie.length>0){offset=cookiestr.indexOf(search);if(offset==-1){cookiestr=\";\"+document.cookie;search=\";\"+Name+\"=\";offset=cookiestr.indexOf(search)}if(offset!=-1){offset+=search.length;end=cookiestr.indexOf(\";\",offset);if(end==-1)end=cookiestr.length;return unescape(cookiestr.substring(offset,end))}else return false}else return false};getRealOffsetTop=function(obj){return obj?obj.offsetTop+getRealOffsetTop(obj.offsetParent):0};getRealOffsetLeft=function(obj){return obj?obj.offsetLeft+getRealOffsetLeft(obj.offsetParent):0};function purge(d){if(d==null)return false;var a=d.attributes,i,l,n;if(a){l=a.length;for(i=0;i<l;i+=1){if(a[i]){n=a[i].name;if(typeof d[n]==='function')d[n]=null}}}a=d.childNodes;if(a){l=a.length;for(i=0;i<l;i+=1)purge(d.childNodes[i])}};function removeObject(obj){if(obj==null)return false;purge(obj);if(obj.removeNode)obj.removeNode(true);else obj.parentNode.removeChild(obj)};function mGET(arrayKey,arrayValue,Value){count=arrayKey.length;for(i=0;i<count;i++){if(arrayKey[i]==Value){return arrayValue[i];break}}};function mEmbed(){var key=new Array();var value=new Array();var contents;var embed_type;var error_check=0;var i,j;var count;var data;var temp;if(mEmbed.arguments.length==1){contents=mEmbed.arguments[0]}else{for(i=0;i<mEmbed.arguments.length;i++){temp=mEmbed.arguments[i].replace(/\\\"|'/g,\"\");data=temp.split('=');key[i]=data[0];value[i]=data[1];count=data.length;for(j=2;j<count;j++)value[i]+='='+data[j]}contents='';srcdata=mGET(key,value,'src');if(/\\.(swf)$/.test(srcdata)){embed_type=1}else if(/\\.(mov|avi|wma|wmv)$/.test(srcdata)){embed_type=2}var classid=mGET(key,value,'classid');var codebase=mGET(key,value,'codebase');if(embed_type==1){classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c-ab#version=6,0,29,0'}else if(embed_type==2){classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95';codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.c-ab#Version=6,4,5,715'}if(classid&&codebase){contents+='<object';if(classid)contents+=' classid=\"'+classid+'\"';if(codebase){contents+=' codebase=\"'+codebase+'\"'}count=key.length;for(i=0;i<count;i++){if(value[i]!=''){if(key[i]!='src'){contents+=' '+key[i]+'=\"'+value[i]+'\"'}}}contents+='>';for(i=0;i<count;i++){if(value[i]!=''){if(embed_type==1&&key[i]=='src')contents+='<param name=\"movie\" value=\"'+value[i]+'\" />';else contents+='<param name=\"'+key[i]+'\" value=\"'+value[i]+'\" />'}}contents+='<param name=\"allowScriptAccess\" value=\"always\" />'}count=key.length;contents+='<embed';for(i=0;i<count;i++)if(value[i]!='')contents+=' '+key[i]+'=\"'+value[i]+'\"';contents+='allowScriptAccess=\"always\"';contents+='>';contents+='</embed>';if(classid&&codebase)contents+='</object>'}document.write(contents)};function catchTab(e,item){if(navigator.userAgent.match(\"Gecko\"))c=e.which;else c=e.keyCode;if(c==9){replaceSelection(item,String.fromCharCode(9));setTimeout(\"document.getElementById('\"+item.id+\"').focus();\",0);return false}};function replaceSelection(input,replaceString){if(input.setSelectionRange){var selectionStart=input.selectionStart;var selectionEnd=input.selectionEnd;input.value=input.value.substring(0,selectionStart)+replaceString+input.value.substring(selectionEnd);if(selectionStart!=selectionEnd)setSelectionRange(input,selectionStart,selectionStart+replaceString.length);else setSelectionRange(input,selectionStart+replaceString.length,selectionStart+replaceString.length)}else if(document.selection){var range=document.selection.createRange();if(range.parentElement()==input){var isCollapsed=range.text=='';range.text=replaceString;if(!isCollapsed){range.moveStart('character',-replaceString.length);range.select()}}}};function setSelectionRange(input,selectionStart,selectionEnd){if(input.setSelectionRange){input.focus();input.setSelectionRange(selectionStart,selectionEnd)}else if(input.createTextRange){var range=input.createTextRange();range.collapse(true);range.moveEnd('character',selectionEnd);range.moveStart('character',selectionStart);range.select()}};try{document.execCommand('BackgroundImageCache',false,true)}catch(e){};function imageResize(obj,width,height){if((width<=0)&&(height<=0)){obj.style.visibility=\"visible\";return false}width=parseInt(width);height=parseInt(height);var i_width=(obj.style.pixelWidth>0)?(obj.style.pixelWidth):(obj.width);var i_height=(obj.style.pixelHeight>0)?(obj.style.pixelHeight):(obj.height);if((width>0)&&(parseInt(i_width)>width)){i_height=i_height*(width/i_width);i_width=width}if((height>0)&&(parseInt(i_height)>height)){i_width=i_width*(width/i_width);i_height=height}if(width>0)obj.style.width=parseInt(i_width)+\"px\";if(height>0)obj.style.height=parseInt(i_height)+\"px\";obj.style.visibility=\"visible\"};if(!Array.prototype.pop){Array.prototype.pop=function(){var last;if(this.length){last=this[this.length-1];this.length-=1}return last}};if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0;i<arguments.length;++i){this[this.length]=arguments[i]}return this.length}};if(!Array.prototype.shift){Array.prototype.shift=function(){var first;if(this.length){first=this[0];for(var i=0;i<this.length-1;++i){this[i]=this[i+1]}this.length-=1}return first}};if(!Array.prototype.unshift){Array.prototype.unshift=function(){if(arguments.length){var i,len=arguments.length;for(i=this.length+len-1;i>=len;--i){this[i]=this[i-len]}for(i=0;i<len;++i){this[i]=arguments[i]}}return this.length}};if(!Array.prototype.splice){Array.prototype.splice=function(index,howMany){var elements=[],removed=[],i;for(i=2;i<arguments.length;++i){elements.push(arguments[i])}for(i=index;(i<index+howMany)&&(i<this.length);++i){removed.push(this[i])}for(i=index+howMany;i<this.length;++i){this[i-howMany]=this[i]}this.length-=removed.length;for(i=this.length+elements.length-1;i>=index+elements.length;--i){this[i]=this[i-elements.length]}for(i=0;i<elements.length;++i){this[index+i]=elements[i]}return removed}};function utf8(wide){var c,s;var enc=\"\";var i=0;while(i<wide.length){c=wide.charCodeAt(i++);if(c>=0xDC00&&c<0xE000)continue;if(c>=0xD800&&c<0xDC00){if(i>=wide.length)continue;s=wide.charCodeAt(i++);if(s<0xDC00||c>=0xDE00)continue;c=((c-0xD800)<<10)+(s-0xDC00)+0x10000}if(c<0x80)enc+=String.fromCharCode(c);else if(c<0x800)enc+=String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));else if(c<0x10000)enc+=String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));else enc+=String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F))}return enc};var hexchars=\"0123456789ABCDEF\";function toHex(n){return hexchars.charAt(n>>4)+hexchars.charAt(n&0xF)};var okURIchars=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-\";if(typeof(encodeURIComponent)!=\"function\"){eval(\"\\'function encodeURIComponent(s)\\+{\\var s=utf8(s);\\var c;\\var enc='';\\for(var i=0;i<s.length;i++)\\{\\if(okURIchars.indexOf(s.charAt(i))==-1)\\enc+='%'+toHex(s.charCodeAt(i));\\else\\enc+=s.charAt(i);\\}\\return enc;\\}\")};function rFalse(event){if(typeof window.event!=\"undefined\")event=window.event;if(event){if(typeof event.preventDefault!='undefined')event.preventDefault();else event.returnValue=false;if(event.stopPropagation)event.stopPropagation();else event.cancelBubble=true}return false};function selectInnerText(obj){if(window.getSelection){window.getSelection().selectAllChildren(obj)}else if(document.body.createTextRange){var r=document.body.createTextRange();r.moveToElementText(obj);r.select()}};function urlencode(q){q=String(q);if(q==\"\")return\"\";var len=q.length;var temp=null;var encode=\"\";for(var i=0;i<len;i++){temp=escape(q.charAt(i));if(temp==\"+\"){temp=\"%2B\"}else if(temp=='\"'){temp=\"%22\"}else if(temp==\"'\"){temp=\"%27\"}else if((temp.substring(0,1)==\"%\")&&(temp.substring(0,2)!=\"%u\")&&(temp.length==3)){temp=\"%u00\"+temp.substring(1)}encode+=temp}return encode};function htmlspecialchars(p_string){p_string=p_string.replace(/&/g,'&amp;');p_string=p_string.replace(/</g,'&lt;');p_string=p_string.replace(/>/g,'&gt;');p_string=p_string.replace(/\"/g,'&quot;');return p_string};function htmlspecialchars_decode(string,quote_style){string=string.toString();string=string.replace(/&amp;/g,'&');string=string.replace(/&lt;/g,'<');string=string.replace(/&gt;/g,'>');if(quote_style=='ENT_QUOTES'){string=string.replace(/&quot;/g,'\"');string=string.replace(/&#039;/g,\"'\")}else if(quote_style!='ENT_NOQUOTES'){string=string.replace(/&quot;/g,'\"')}return string};function print_r(theObj){var txt=\"\";if(theObj.constructor==Array||theObj.constructor==Object){txt+=\"<ul>\";for(var p in theObj){if(theObj[p].constructor==Array||theObj[p].constructor==Object){txt+=\"<li>[\"+p+\"] => \"+typeof(theObj)+\"</li>\";txt+=\"<ul>\";txt+=print_r(theObj[p]);txt+=\"</ul>\"}else{txt+=\"<li>[\"+p+\"] => \"+theObj[p].cpname+\"-\"+theObj[p].id+\"</li>\"}}txt+=\"</ul>\"}return txt};function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)elements.push($(arguments[i]));return elements}if(typeof element=='string')element=document.getElementById(element);return element};function insertAfter(newElement,targetElement){var parent=targetElement.parentNode;if(parent.lastChild==targetElement)parent.appendChild(newElement);else parent.insertBefore(newElement,targetElement.nextSibling)};var icrossLogger=function(){this.ikey=getCookie('i_key');this.uid=getCookie('id');this.kcrid=getCookie('c_kcrid');this.url=document.location.href;this.referrer=document.referrer};icrossLogger.prototype.send=function(target,args){var log=\"?logtarget=\"+target;log+=\"&ikey=\"+this.ikey;log+=\"&id=\"+this.uid;log+=\"&kcrid=\"+this.kcrid;log+=\"&url=\"+escape(this.url);log+=\"&referrer=\"+escape(this.referrer);if((typeof(args)!='undefined')&&(args instanceof Object))for(var varname in args)log+='&'+varname+'='+encodeURIComponent(args[varname]);log+=\"&rndnum=\"+Math.random();var send=new Image(1,1);send.id=send.name='__log'+(new Date().getTime()%31536000000)*100+parseInt(Math.random()*100)+'__';eval('window.'+send.id+' = send;');send.src='http://logs.'+getQDN(null,true)+'/log.php'+log};var ILogger=new icrossLogger();\nformObject=function(id,name){this.id=id;this.name=name;this.checkPassById=null;this.checkName=new Array();this.checkAttr=new Array();this.errMessage=new Array();this.setFocus=new Array();this.checkPassByIds=new Array();this.fireEvent=new Array();this.eventList={keydown:\"\",keyup:\"\",keypress:\"\",focus:\"\",blur:\"\",select:\"\",change:\"\",click:\"\",mouseover:\"\",mouseout:\"\",mouseup:\"\",mousedown:\"\",paste:\"\"};var sAgent=navigator.userAgent.toLowerCase();this.isIE=sAgent.indexOf(\"msie\")!=-1;this.isGecko=!this.IsIE;this.isNetscape=sAgent.indexOf(\"netscape\")!=-1};formObject.prototype.setCheckPassId=function(id){this.checkPassById=id};formObject.prototype.addCheck=function(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById){var idx=this.checkName.length;this.checkName[idx]=checkName;this.checkAttr[idx]=checkAttr;this.errMessage[idx]=errMessage;this.setFocus[idx]=setFocus;if((fireEvent!=null)&&(typeof(fireEvent)!=\"undefined\"))this.fireEvent[idx]=fireEvent;else this.fireEvent[idx]=null;if((checkPassById!=null)&&(typeof(checkPassById)!=\"undefined\"))this.checkPassByIds[idx]=checkPassById;else this.checkPassByIds[idx]=null};formObject.prototype.modifyCheck=function(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById){var idx=-1;for(var i=0,cnt=this.checkName.length;i<cnt;i++){if(this.checkName[i]==checkName){idx=i;break}}if(idx<0)idx=this.checkName.length;this.checkName[idx]=checkName;this.checkAttr[idx]=checkAttr;this.errMessage[idx]=errMessage;this.setFocus[idx]=setFocus;if((fireEvent!=null)&&(typeof(fireEvent)!=\"undefined\"))this.fireEvent[idx]=fireEvent;else this.fireEvent[idx]=null;if((checkPassById!=null)&&(typeof(checkPassById)!=\"undefined\"))this.checkPassByIds[idx]=checkPassById;else this.checkPassByIds[idx]=null};formObject.prototype.addEvent=function(attrName,attr,clear){var temp;if((typeof(clear)==\"undefined\")||(clear==null))clear=false;switch(attrName){case\"onClick\":if(clear)this.eventList[\"click\"]=\"\";this.eventList[\"click\"]+=attr;break;case\"onFocus\":if(clear)this.eventList[\"focus\"]=\"\";this.eventList[\"focus\"]+=attr;break;case\"onBlur\":if(clear)this.eventList[\"blur\"]=\"\";this.eventList[\"blur\"]+=attr;break;case\"onEnterNext\":if(clear)this.eventList[\"keydown\"]=\"\";this.eventList[\"keydown\"]+=\" onEnterKeyPress(event, \\\"next\\\", \\\"\"+attr+\"\\\"); \";break;case\"onEnterRun\":if(clear)this.eventList[\"keydown\"]=\"\";this.eventList[\"keydown\"]+=\" onEnterKeyPress(event, \\\"run\\\", \\\"\"+attr+\"\\\"); \";break;case\"checkValidate\":if(clear)this.eventList[(this.isGecko?\"keypress\":\"keydown\")]=\"\";this.eventList[(this.isGecko?\"keypress\":\"keydown\")]+=\" isKeyValidate(event, '\"+attr+\"');\";break;case\"checkLimit\":if(clear)this.eventList[\"blur\"]=\"\";temp=attr.split(\"|\");this.eventList[\"blur\"]+=\" checkLimit(event, \\\"\"+temp[0]+\"\\\", \\\"\"+temp[1]+\"\\\"); \";break;case\"checkMaxLength\":if(clear)this.eventList[\"keyup\"]=\"\";this.eventList[\"keyup\"]+=\" checkMaxLength(event, \\\"\"+attr+\"\\\"); \";break;case\"checkMinLength\":if(clear)this.eventList[\"blur\"]=\"\";this.eventList[\"blur\"]+=\" checkMinLength(event, \\\"\"+attr+\"\\\"); \";break;case\"textClear\":if(clear)this.eventList[\"focus\"]=\"\";this.eventList[\"focus\"]+=\" textClear(event, \\\"\"+attr+\"\\\"); \";break;case\"setTextDefault\":if(clear)this.eventList[\"blur\"]=\"\";this.eventList[\"blur\"]+=\" setTextDefault(event, \\\"\"+attr+\"\\\"); \";break;case\"commaFormat\":if(clear)this.eventList[\"keyup\"]=\"\";this.eventList[\"keyup\"]+=\" setCommaFormat(event); \";break;case\"dontPaste\":if(clear)this.eventList[\"paste\"]=\"\";this.eventList[\"paste\"]+=\" return false; \";break}};formObject.prototype.attachEvent=function(){if(this.id!=\"\"){var obj=document.getElementById(this.id);if((obj==null)||(typeof(obj)==\"undefined\"))return false;if(obj.attachEvent){for(var key in this.eventList)if(this.eventList[key]!=\"\")eval(\"obj.attachEvent('on\"+key+\"', function(event) {\"+this.eventList[key]+\"});\")}else{for(var key in this.eventList)if(this.eventList[key]!=\"\")eval(\"obj.addEventListener('\"+key+\"', function(event) {\"+this.eventList[key]+\"}, false);\")}}};formObject.prototype.getCheckCount=function(name){if(name==null)name=this.name;var objs=document.getElementsByName(name);var cnt=0;for(var j=0;j<objs.length;j++)if(objs[j].checked)cnt++;return cnt};formObject.prototype.getValue=function(id){if(id==null)id=this.id;var obj=document.getElementById(id);if(obj==null)return false;return obj.value};formObject.prototype.getRadioValue=function(name){if(name==null)name=this.name;var objs=document.getElementsByName(name);var cnt=0;for(var j=0;j<objs.length;j++)if(objs[j].checked)return objs[j].value;return false};formObject.prototype.runCheck=function(){var cpo=document.getElementById(this.checkPassById);if(cpo!=null)if(cpo.checked)return true;var len=this.checkName.length;var check=true;var passObj=null;for(var i=0;i<len;i++){if(this.checkPassByIds[i]!=null){passObj=document.getElementById(this.checkPassByIds[i]);if((passObj!=null)&&(passObj.checked))continue}switch(this.checkName[i]){case\"isEmpty\":if(!document.getElementById(this.id))check=false;else{check=(document.getElementById(this.id).value!=\"\")?true:false}break;case\"checkMinLength\":check=((document.getElementById(this.id).value).length>=this.checkAttr[i])?true:false;break;case\"isEqual\":check=(document.getElementById(this.id).value==document.getElementById(this.checkAttr[i]).value)?true:false;break;case\"isChecked\":check=document.getElementById(this.id).checked;break;case\"isMinChecked\":case\"isRadioChecked\":check=(this.getCheckCount(this.name)>0)?true:false;break;case\"isSelected\":check=(document.getElementById(this.id).selectedIndex>-1)?true:false;break;case\"isValidate\":check=isValidate(this.checkAttr[i],document.getElementById(this.id).value);break;case\"isValidateUnion\":var temp=this.checkAttr[i].split(\"|\");var value=\"\";for(var j=2;j<temp.length;j++)value+=document.getElementById(temp[j]).value+temp[1];check=isValidate(temp[0],value.substring(0,value.length-temp[1].length));break}if(!check){alert(this.errMessage[i]);if(this.fireEvent[i]!=null)this.fireEvent[i]();if(this.setFocus[i])document.getElementById(this.id).focus();return false}}return true};function isValidate(mode,value){var numOnly=/^[0-9]+$/;var floatOnly=/^[-]{0,1}[0-9]+[.]{0,1}[0-9]+$/;var keyFloatOnly=/[-.0-9]/;var hanOnly=/^[\u00b0\u00a1-\u00c6R]*$/;var engOnly=/^[a-zA-Z]+$/;var hanAndEng=/^[\u00b0\u00a1-\u00c6Ra-zA-Z]*$/;var hanAndNum=/^[\u00b0\u00a1-\u00c6R0-9]*$/;var engAndNum=/^[0-9a-zA-Z]*$/;var hanAndEngAndNum=/^[\u00b0\u00a1-\u00c6Ra-zA-Z0-9 ]*$/;var domain=/^[\\.a-zA-Z0-9-]+\\.[a-zA-Z]+$/;var email=/^[\\._a-zA-Z0-9-]+@[\\._a-zA-Z0-9-]+\\.[a-zA-Z]+$/;var userId=/^[a-zA-Z]{1}[a-zA-Z0-9_-]{4,15}$/;var phone=/^[0-9]{2,4}-[0-9]{3,4}-[0-9]{4}$/;var image=/(.jpg|.jpeg|.png|.gif)$/i;switch(mode){case\"numOnly\":return numOnly.test(value);case\"floatOnly\":return floatOnly.test(value);case\"keyFloatOnly\":return keyFloatOnly.test(value);case\"hanOnly\":return hanOnly.test(value);case\"engOnly\":return engOnly.test(value);case\"hanAndEng\":return hanAndEng.test(value);case\"hanAndNum\":return hanAndNum.test(value);case\"engAndNum\":return engAndNum.test(value);case\"hanAndEngAndNum\":return hanAndEngAndNum.test(value);case\"domain\":return domain.test(value);case\"email\":return email.test(value);case\"userId\":return userId.test(value);case\"phone\":return phone.test(value);case\"image\":return image.test(value);case\"secunum\":return isValidSecuNum(value)}};function isValidSecuNum(secunum){var reg=/^[0-9]{13}$/;var year=parseInt(secunum.substr(0,2),10);var month=parseInt(secunum.substr(2,2),10);var day=parseInt(secunum.substr(4,2),10);var gender=parseInt(secunum.charAt(6),10);var tempDate=new Date(year,month,0);var lastDateOfMonth=tempDate.getDate();var tmp=0;if(reg.test(secunum)){if((month>=1)&&(month<=12)){if((day>=1)&&(day<=lastDateOfMonth)){for(var i=0;i<12;i++)tmp+=((i%8)+2)*parseInt(secunum.charAt(i),10);if(((11-(tmp%11))%10)==secunum.charAt(12))return true}}}return false};form=function(){this.objs=new Array();this.objsById=new Array();this.idx=0};form.prototype.addObject=function(id,name){this.idx=this.objs.length;this.objs[this.idx]=new formObject(id,name);this.objsById[id]=this.objs[this.idx]};form.prototype.selectObject=function(id,name){for(var i=0,cnt=this.objs.length;i<cnt;i++){if(((id!=\"\")&&(this.objs[i].id==id))||((name!=\"\")&&(this.objs[i].name==name))){this.idx=i;return true}}return false};form.prototype.setCheckPassId=function(id){this.objs[this.idx].setCheckPassId(id)};form.prototype.addCheck=function(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById){this.objs[this.idx].addCheck(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById)};form.prototype.modifyCheck=function(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById){this.objs[this.idx].modifyCheck(checkName,checkAttr,errMessage,setFocus,fireEvent,checkPassById)};form.prototype.addEvent=function(attrName,attr,clear){this.objs[this.idx].addEvent(attrName,attr,clear)};form.prototype.attachEvent=function(){for(var i=0;i<this.objs.length;i++)this.objs[i].attachEvent()};form.prototype.runCheck=function(){for(var i=0;i<this.objs.length;i++)if(!this.objs[i].runCheck())return false;return true};form.prototype.runCheckOne=function(id){for(var i=0;i<this.objs.length;i++){if(this.objs[i].id==id){if(!this.objs[i].runCheck())return false}}return true};function keyPrevent(event){if(event.preventDefault)event.preventDefault();else event.returnValue=false};function onEnterKeyPress(event,mode,attr){var focus=false;if(typeof window.event!=\"undefined\")event=window.event;var keyCode=(event.keyCode)?event.keyCode:((event.which)?event.which:event.charCode);if(keyCode==13){keyPrevent(event);if(mode==\"next\"){if(attr==\"\"){var i;var field=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;for(i=0;i<field.form.elements.length;i++)if(field==field.form.elements[i])break;while(!focus){i=++i%field.form.elements.length;try{field.form.elements[i].focus();focus=true}catch(e){}}return false}else{document.getElementById(attr).focus();return false}}else if(mode==\"run\"){eval(attr);event.returnValue=false}}return true};function isKeyValidate(event,mode){if(typeof window.event!=\"undefined\")event=window.event;var keyCode=event.keyCode?event.keyCode:(event.which?event.which:event.charCode);var reg=/^[a-zA-Z]$/;var inputChar=String.fromCharCode(keyCode);if(inputChar=='\u00a8\u00fa')inputChar='.';var check=((keyCode==8)||(keyCode==9)||(45==keyCode)||(keyCode==46)||(isValidate(mode,inputChar)))?true:false;if(!check)keyPrevent(event);return check};function onlyHanAlpNumSpc(event){if(typeof window.event!=\"undefined\")event=window.event;var keyCode=(event.keyCode)?event.keyCode:((event.which)?event.which:event.charCode);if((keyCode==8)||(keyCode==46)||(keyCode==9)||(keyCode==144)||((33<=keyCode)&&(keyCode<=40))||(12==keyCode)||(45==keyCode)||(keyCode==46)||(keyCode==27)||(keyCode==109)||(keyCode==189)||(keyCode==255))return;var inputChar=String.fromCharCode(keyCode);if(inputChar=='\u00a8\u00fa')inputChar='.';if(!isValidate('hanAndEngAndNum',inputChar)){event.returnValue=false;return}};function onlyNumber(event,useDot){if(typeof window.event!=\"undefined\")event=window.event;var keyCode=event.keyCode?event.keyCode:event.which?event.which:event.charCode;if((!event.shiftKey)&&(((48<=keyCode)&&(keyCode<=57))||((96<=keyCode)&&(keyCode<=105))||(keyCode==8)||(keyCode==46)||(keyCode==9)||(keyCode==144)||((33<=keyCode)&&(keyCode<=40))||(12==keyCode)||(45==keyCode)||(keyCode==46)||(keyCode==27)||(keyCode==109)||(keyCode==189)||(keyCode==255))){event.returnValue=true;return}else if((keyCode==110)||(keyCode==190)){if(useDot)event.returnValue=true;else event.returnValue=false;return}else if(keyCode==13){return}else{event.returnValue=false;return}return true};function checkLimit(event,min,max){min=parseFloat(min);max=parseFloat(max);if(typeof window.event!=\"undefined\")event=window.event;try{var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;if(String(obj.value)==\"\")return;if(!isNaN(obj.value)){obj.value=parseFloat(obj.value);if((obj.value==\"Infinity\")||((obj.value<min)&&(String(min)!=\"\"))||((obj.value>max)&&(String(max)!=\"\"))){alert(min+\" ~ \"+max+\" \u00bb\u00e7\u00c0\u00cc\u00c0\u00c7 \u00bc\u00fd\u00c0\u00da\u00b8\u00a6 \u00c0\u00d4\u00b7\u00c2\u00c7\u00cf\u00bc\u00bc\u00bf\u00e4.\");obj.value=\"\";obj.focus()}}else{alert(\"\u00bc\u00fd\u00c0\u00da\u00b8\u00b8 \u00c0\u00d4\u00b7\u00c2\u00b0\u00a1\u00b4\u00c9 \u00c7\u00d5\u00b4\u00cf\u00b4\u00d9.\");obj.value=\"\";obj.focus()}}catch(e){alert(\"\u00bc\u00fd\u00c0\u00da\u00b8\u00b8 \u00c0\u00d4\u00b7\u00c2\u00b0\u00a1\u00b4\u00c9 \u00c7\u00d5\u00b4\u00cf\u00b4\u00d9.\");obj.focus()}};function checkMaxLength(event,to){if(typeof window.event!=\"undefined\")event=window.event;var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;if(obj.maxLength<=(obj.value).length)document.getElementById(to).focus()};function checkMinLength(event,min){if(typeof window.event!=\"undefined\")event=window.event;var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;if((obj.value).length<min){alert(min+\"\u00c0\u00da\u00b8\u00ae \u00c0\u00cc\u00bb\u00f3 \u00c0\u00d4\u00b7\u00c2\u00c7\u00cf\u00bc\u00bc\u00bf\u00e4.\")}};function textClear(event,value){if(typeof window.event!=\"undefined\")event=window.event;var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;if(obj.value==value)obj.value=\"\"};function setTextDefault(event,value){if(typeof window.event!=\"undefined\")event=window.event;var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;if(obj.value==\"\")obj.value=value};function setCommaFormat(event){if(typeof window.event!=\"undefined\")event=window.event;var obj=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;obj.value=addComma(obj.value);if(obj.value==\"undefined\")obj.value=\"\"};function selectIt(obj_name,idx){var obj=document.getElementById(obj_name);if((obj==null)||(typeof(obj)==\"undefined\"))return false;for(var i=0;i<obj.length;i++){if(obj[i].value==idx){obj[i].selected=true;return true}}return false};function addSelect(obj_name,value,title){var obj=document.getElementById(obj_name);obj.options[obj.options.length]=new Option(title,value)};function clearSelect(obj_name,value,title){var obj=document.getElementById(obj_name);if(obj.options.length>0)for(i=obj.options.length-1;i>-1;i--){try{obj.options.remove(i)}catch(e){obj.removeChild(obj.options[i])}}if((typeof(value)!='undefined')&&(typeof(title)!='undefined'))addSelect(obj_name,value,title)};function checkIt(obj_name,idx){var obj=document.getElementsByName(obj_name);for(var i=0;i<obj.length;i++)obj[i].checked=(obj[i].value==idx)};function checkAll(obj,objsName){var objs=document.getElementsByName(objsName);for(var i=0;i<objs.length;i++)objs[i].checked=obj.checked};String.prototype.numberToHangul=function(add,unit,us,ue){var dan1=Array('','\u00b8\u00b8','\u00be\u00ef','\u00c1\u00b6','\u00b0\u00e6','\u00c7\u00d8','\u00bd\u00c3','\u00be\u00e7','\u00b1\u00b8','\u00b0\u00a3','\u00c1\u00a4');var dan2=Array('','\u00bd\u00ca','\u00b9\u00e9','\u00c3\u00b5');var han=Array('','\u00c0\u00cf','\u00c0\u00cc','\u00bb\u00ef','\u00bb\u00e7','\u00bf\u00c0','\u00c0\u00b0','\u00c4\u00a5','\u00c6\u00c8','\u00b1\u00b8');var str=this.toString();var temp,result='',chk;var len=str.length;if(typeof(us)=='undefined')us='';if(typeof(ue)=='undefined')ue=' ';if(unit){for(var i=4;i<len+4;i=i+4){chk=parseInt(parseFloat(str.substring(len-i,len-i+4)));if(chk>0)result=chk+(((i/4)>1)?us+dan1[i/4-1]+ue:'')+result}}else{for(var i=len-1,i2=0;i>=0;i--,i2++){temp=parseInt(str.charAt(i));chk=((i2%4)==0)?i2/4:0;result=((temp==1&&i2>0&&chk==0)?'':han[temp])+((temp==0)?'':dan2[i2%4])+us+dan1[chk]+ue+result}}if(typeof(add)=='undefined')add='';result=result.trim();if(result!='')return result+add;else return''};String.prototype.trim=function(){return this.replace(/(^\\s*)|(\\s*$)/g,\"\")};String.prototype.cut=function(len,koLen){if(typeof(koLen)==\"undefined\")koLen=2;var str=this;var l=0;for(var i=0;i<str.length;i++){l+=(str.charCodeAt(i)>128)?koLen:1;if(l>len)return str.substring(0,i)}return str};String.prototype.bytes=function(koLen){var str=this;var l=0;if(typeof(koLen)==\"undefined\")koLen=2;for(var i=0;i<str.length;i++)l+=(str.charCodeAt(i)>128)?koLen:1;return l};function addComma(number){number=String(number);number=clearComma(number);if(isNaN(number))return;var b='';if(number<0){b='-';number=Math.abs(number)}number=String(number);if(number.length>3){var mod=number.length%3;var output=(mod>0?(number.substring(0,mod)):'');for(i=0;i<Math.floor(number.length/3);i++){if((mod==0)&&(i==0))output+=number.substring(mod+3*i,mod+3*i+3);else output+=','+number.substring(mod+3*i,mod+3*i+3)}return(b+output)}else return b+number};function clearComma(x){do{x=x.replace(\",\",\"\")}while(x.indexOf(\",\")>0);return x};\nvar popupMenu=function(id,baseUrl){this.id=id;this.baseUrl=baseUrl;this.overPopup=false;this.docBody=(typeof document.body!=\"undefined\")?document.body:document.documentElement;this.divPopupBase=document.createElement(\"div\");this.divPopupBase.style.display=\"none\";this.divPopupBase.style.position=\"absolute\";this.divPopupBase.style.overflow=\"visible\";this.docBody.appendChild(this.divPopupBase);this.divPopup=document.createElement(\"table\");this.divPopup.style.position=\"absolute\";this.divPopup.style.top=\"0px\";this.divPopup.style.left=\"0px\";this.divPopup.style.width=\"80px\";this.divPopup.style.height=\"100%\";this.divPopup.style.overflow=\"visible\";this.divPopup.style.border=\"#c1c1c1 solid 1px\";this.divPopup.style.backgroundColor=\"#f7f7f7\";this.tableBody=document.createElement(\"tbody\");this.tableTr=document.createElement(\"tr\");this.tableTd=document.createElement(\"td\");this.divPopup.appendChild(this.tableBody);this.tableBody.appendChild(this.tableTr);this.tableTr.appendChild(this.tableTd);this.background=document.createElement(\"iframe\");this.background.frameBorder=\"0px\";this.background.style.position=\"absolute\";this.background.style.top=\"0px\";this.background.style.left=\"0px\";this.background.scrolling=\"no\";this.divPopupBase.appendChild(this.background);this.divPopupBase.appendChild(this.divPopup)};popupMenu.prototype.open=function(event,uid){if(uid==\"\")return false;this.onMypage(uid);return false;if(typeof window.event!=\"undefined\")event=window.event;var element=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;var html=\"<div style=\\\"margin-bottom:5px; border-bottom:1px dashed #000000; font-weight:bold; text-align:center;\\\">\"+uid+\"</div>\"+\"<div><a href=\\\"#\\\" onclick=\\\"\"+this.id+\".onMypage('\"+uid+\"');\\\">\u00b8\u00b6\u00c0\u00cc\u00c6\u00e4\u00c0\u00cc\u00c1\u00f6</a></div>\"+\"<div><a href=\\\"javascript:onMessageWrite('\"+uid+\"');\\\">\u00c2\u00ca\u00c1\u00f6\u00ba\u00b8\u00b3\u00bb\u00b1\u00e2</a></div>\";this.tableTd.innerHTML=html;var curX=event.clientX+this.docBody.scrollLeft;var curY=event.clientY+this.docBody.scrollTop;var leftedge=0;var rightedge=this.docBody.clientWidth-event.clientX;var bottomedge=this.docBody.clientHeight-event.clientY;var obj=this.divPopupBase;obj.style.top=(bottomedge<obj.offsetHeight)?curY-obj.offsetHeight+\"px\":curY+\"px\";obj.style.left=((rightedge<obj.offsetWidth)?curX-obj.offsetWidth+\"px\":((curX<leftedge)?\"5px\":curX+15)+\"px\");obj.style.display=\"\";this.background.style.width=(this.tableTd.offsetWidth+3)+\"px\";this.background.style.height=(this.tableTd.offsetHeight+3)+\"px\";this.attachEventWithThis(this.docBody,\"mousedown\",\"close\");this.attachEventWithThis(this.divPopup,\"mouseover\",\"over\");this.attachEventWithThis(this.divPopup,\"mouseout\",\"out\")};popupMenu.prototype.close=function(event,thisObj){if(!thisObj.overPopup){thisObj.divPopupBase.style.display=\"none\";thisObj.detachEventWithThis(thisObj.docBody,\"mousedown\",\"close\");thisObj.detachEventWithThis(thisObj.divPopup,\"mouseover\",\"over\");thisObj.detachEventWithThis(thisObj.divPopup,\"mouseout\",\"out\")}};popupMenu.prototype.over=function(event,thisObj){thisObj.overPopup=true};popupMenu.prototype.out=function(event,thisObj){thisObj.overPopup=false};popupMenu.prototype.attachEventWithThis=function(target,eventName,handlerName){var thisObj=this;eval(\"target.\"+handlerName+\"= this.\"+handlerName);if(target.addEventListener){target.addEventListener(eventName,function(event,e){target[handlerName](event,thisObj)},false)}else if(target.attachEvent){target.attachEvent(\"on\"+eventName,function(event,e){target[handlerName](event,thisObj)})}else{var originalHandler=target[\"on\"+eventName];if(originalHandler)target[\"on\"+eventName]=function(event,e){originalHandler(event,thisObj);target[handlerName](event,thisObj)};else target[\"on\"+eventName]=target[handlerName]}};popupMenu.prototype.detachEventWithThis=function(target,eventName,handlerName){var thisObj=this;eval(\"target.\"+handlerName+\"= this.\"+handlerName);if(target.removeEventListener){target.removeEventListener(eventName,target[handlerName],false)}else if(target.attachEvent){target.detachEvent(\"on\"+eventName,target[handlerName])}else{target[\"on\"+eventName]=null}};popupMenu.prototype.onMypage=function(uid){this.overPopup=false;this.close(null,this);var win=window.open(this.baseUrl+\"/user/index.php?uid=\"+uid,\"__USER_INFO\",\"scrollbars=no,status=no,resizable=no,location=no, width=400,height=500,top=\"+(screen.height-500)/2+\",left=\"+(screen.width-400)/2);if(win!=null)win.focus();else alert(\"\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c1\u00a6\u00c7\u00d1\u00c7\u00cf\u00bf\u00a9 \u00c3\u00a2\u00c0\u00bb \u00bf\u00ad \u00bc\u00f6 \u00be\u00f8\u00bd\u00c0\u00b4\u00cf\u00b4\u00d9.\\\\n\\\\n\u00c6\u00cb\u00be\u00f7\u00c0\u00bb \u00c7\u00e3\u00bf\u00eb \u00c7\u00d8 \u00c1\u00d6\u00bd\u00ca\u00bd\u00c3\u00bf\u00c0.\")};\nvar textcut=function(){var agent=navigator.userAgent.toLowerCase();var ns=((agent.indexOf('mozilla')!=-1)&&((agent.indexOf('spoofer')==-1)&&(agent.indexOf('compatible')==-1)));this.moz=(ns&&(agent.indexOf(\"netscape/\")==-1));this.underIE55=(agent.indexOf(\"msie 5\")!=-1)};textcut.prototype.setEllipsis=function(target){if((target==null)||(typeof(target)==\"undefined\"))var anchors=(document.all)?document.all:document.getElementsByTagName(\"*\");else var anchors=target.getElementsByTagName(\"*\");var obj,clsList,cl=null;var cnt=anchors.length;for(var i=0;i<cnt;i++){obj=anchors.item(i);if(obj.className==\"\")continue;clsList=String(obj.className).split(\" \");cl=clsList.length;for(j=0;j<cl;j++){if(clsList[j]==\"textcut\"){this.cutString(obj);break}}}};textcut.prototype.cutString=function(obj){if((obj.offsetHeight>0)&&(obj.scrollHeight>=obj.offsetHeight*1.5)){obj.title=String(this.replaceTags(obj.innerHTML)).trim();if((this.moz)||(this.underIE55)){obj.ins=document.createElement(\"ins\");obj.ins.style.cssText=obj.style.cssText;obj.ins.innerHTML=\"...\";obj.insertBefore(obj.ins,obj.firstChild)}else{if(obj.offsetWidth>0){obj.style.width=obj.offsetWidth+\"px\";obj.style.whiteSpace=\"nowrap\"}}}};textcut.prototype.replaceTags=function(xStr){var regExp=/<\\/?[^>]+>/gi;return xStr.replace(regExp,\"\")};\nvar selectbox=function(varId,mainId,listboxId,dir){this.attachEventWithThis(document,\"mousedown\",\"setSelectBox\");this.varId=varId;this.selectedValue=null;this.list=new Array();this.ObjList=new Array();this.valList=new Array();this.dir=(typeof(dir)==\"undefined\")?\"down\":dir;this.mainBox=document.getElementById(mainId);this.listBox=document.getElementById(listboxId);this.onSelectFunc=null;document.body.appendChild(this.listBox);this.attachEventWithThis(window,\"resize\",\"setListLocation\")};selectbox.prototype.setListLocation=function(event,thisObj){var x=getRealOffsetLeft(thisObj.mainBox);var y=getRealOffsetTop(thisObj.mainBox);var w=thisObj.mainBox.offsetWidth;var h=thisObj.mainBox.offsetHeight;if(thisObj.dir==\"up\"){var lh=thisObj.listBox.offsetHeight;thisObj.listBox.style.top=(y-lh)+\"px\"}else{thisObj.listBox.style.top=(y+h)+\"px\"}thisObj.listBox.style.left=x+\"px\"};selectbox.prototype.setSelectBox=function(event,thisObj){if(typeof window.event!=\"undefined\")event=window.event;var target=(typeof event.srcElement!=\"undefined\")?event.srcElement:event.target;var clsName=\"None\";if((target!=null)&&(target.className!=\"\"))clsName=target.className;if((clsName!=\"dselbox\")&&(clsName!=\"sw_val\")&&(clsName!=\"swbtnimg\")){try{thisObj.listBox.style.display=\"none\"}catch(e){}}};selectbox.prototype.addChild=function(objId,id,title,value,selected){if(document.getElementById(objId)==null)return false;this.list[id]=title;this.valList[id]=value;this.ObjList[id]=document.getElementById(objId);eval(\"addEvent(this.ObjList[id], 'click', function() { \"+this.varId+\".onSelect(id); })\");eval(\"addEvent(this.ObjList[id], 'mouseover', function() { \"+this.varId+\".onOver(id); })\");if(selected)this.onSelect(id)};selectbox.prototype.onView=function(idx){if(this.listBox.style.display==\"none\"){this.listBox.style.display=\"\";this.setListLocation(event,this);this.onOver(idx)}else{this.listBox.style.display=\"none\"}};selectbox.prototype.onOver=function(idx){for(var id in this.list){if(id==idx){this.ObjList[id].style.backgroundColor=\"#316ac5\";this.ObjList[id].style.color=\"#fff\"}else{this.ObjList[id].style.backgroundColor=\"\";this.ObjList[id].style.color=\"\"}}};selectbox.prototype.onSelect=function(idx){this.selectedValue=idx;this.mainBox.value=this.list[idx];this.listBox.style.display=\"none\";if(this.onSelectFunc!=null)this.onSelectFunc(idx,this.mainBox.value)};selectbox.prototype.attachEventWithThis=function(target,eventName,handlerName){var thisObj=this;eval(\"target.\"+handlerName+\"= this.\"+handlerName);if(target.addEventListener){target.addEventListener(eventName,function(event,e){target[handlerName](event,thisObj)},false)}else if(target.attachEvent){target.attachEvent(\"on\"+eventName,function(event,e){target[handlerName](event,thisObj)})}else{var originalHandler=target[\"on\"+eventName];if(originalHandler)target[\"on\"+eventName]=function(event,e){originalHandler(event,thisObj);target[handlerName](event,thisObj)};else target[\"on\"+eventName]=target[handlerName]}};\nXMLhttpReq=function(method,action,formName){try{this.formName=formName;this.method=method;this.action=action;this.type=0;this.run=false;this.showLoadingMsg=true;this.showErrorMsg=true;this.xmlHttpReq=false;this.cache=false;this.hideMessage=false;if(window.XMLHttpRequest){this.type=1;this.xmlHttpReq=new XMLHttpRequest();this.xmlHttpReq.overrideMimeType('text/xml')}else if(window.ActiveXObject){this.type=2;this.xmlHttpReq=new ActiveXObject(getXmlHttpPrefix()+\".XmlHttp\")}}catch(e){}};XMLhttpReq.prototype.fireHttp=function(strSubmit,strResultFunc,dataTtype){var type=this.type;var thisObj=this;if(!this.run){this.xmlHttpReq.open(this.method,this.action,true);this.xmlHttpReq.setRequestHeader(\"Content-type\",(this.method.toUpperCase()==\"POST\")?\"application/x-www-form-urlencoded;\":\"text/xml\");if(!this.cache){this.xmlHttpReq.setRequestHeader(\"Cache-Control\",\"no-cache\");this.xmlHttpReq.setRequestHeader(\"Pragma\",\"no-cache\")}this.xmlHttpReq.setRequestHeader(\"Referer\",this.action);this.xmlHttpReq.onreadystatechange=function(){if(thisObj.xmlHttpReq.readyState==4){thisObj.run=false;if(thisObj.xmlHttpReq.status==200){switch(String(dataTtype).toUpperCase()){case\"JSON\":try{eval(\"var data = \"+thisObj.xmlHttpReq.responseText+\";\")}catch(e){var data=false};break;case\"XML\":var data=(type==1)?thisObj.xmlHttpReq.responseXML:thisObj.xmlHttpReq.responseXML.documentElement;break;case\"TEXT\":default:var data=thisObj.xmlHttpReq.responseText;break}if(typeof(strResultFunc)==\"function\")strResultFunc(data);else eval(strResultFunc+\"(data);\")}else{if((!thisObj.hideMessage)&&(thisObj.showErrorMsg))alert(\"AJAX Error : \u00c1\u00a4\u00bb\u00f3\u00c0\u00fb\u00c0\u00b8\u00b7\u00ce \u00b5\u00a5\u00c0\u00cc\u00c5\u00cd\u00b8\u00a6 \u00bc\u00f6\u00bd\u00c5\u00c7\u00cf\u00c1\u00f6 \u00b8\u00f8\u00c7\u00df\u00bd\u00c0\u00b4\u00cf\u00b4\u00d9.\")}}};this.xmlHttpReq.send(strSubmit);this.run=true;return true}else{if(this.showLoadingMsg==true)alert(\"\u00b5\u00a5\u00c0\u00cc\u00c5\u00cd\u00b8\u00a6 \u00b0\u00a1\u00c1\u00ae\u00bf\u00c0\u00b4\u00c2 \u00c1\u00df\u00c0\u00d4\u00b4\u00cf\u00b4\u00d9.\");return false}};XMLhttpReq.prototype.abort=function(){try{this.xmlHttpReq.abort()}catch(e){}};XMLhttpReq.prototype.formToQuery=function(){var docForm=document.getElementById(this.formName);var strSubmitContent=\"\";var formElem;var strLastElemName=\"\";var elLen=docForm.elements.length;for(var i=0;i<elLen;i++){formElem=docForm.elements[i];switch(formElem.type){case\"text\":case\"hidden\":case\"password\":case\"textarea\":case\"select-one\":strSubmitContent+=formElem.name+\"=\"+encodeURIComponent(formElem.value)+\"&\";break;case\"radio\":if(formElem.checked)strSubmitContent+=formElem.name+\"=\"+encodeURIComponent(formElem.value)+\"&\";break;case\"checkbox\":if(formElem.checked){if(formElem.name==strLastElemName){if(strSubmitContent.lastIndexOf(\"&\")==strSubmitContent.length-1)strSubmitContent=strSubmitContent.substr(0,strSubmitContent.length-1);strSubmitContent+=\",\"+encodeURIComponent(formElem.value)}else{strSubmitContent+=formElem.name+\"=\"+encodeURIComponent(formElem.value)}strSubmitContent+=\"&\";strLastElemName=formElem.name}break}}strSubmitContent=strSubmitContent.substr(0,strSubmitContent.length-1);return strSubmitContent};function getDomDocumentPrefix(){if(getDomDocumentPrefix.prefix)return getDomDocumentPrefix.prefix;var prefixes=[\"MSXML2\",\"Microsoft\",\"MSXML\",\"MSXML3\"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+\".DomDocument\");return getDomDocumentPrefix.prefix=prefixes[i]}catch(e){}}throw new Error(\"Could not find an installed XML parser\")};function getXmlHttpPrefix(){if(getXmlHttpPrefix.prefix)return getXmlHttpPrefix.prefix;var prefixes=[\"MSXML2\",\"Microsoft\",\"MSXML\",\"MSXML3\"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+\".XmlHttp\");return getXmlHttpPrefix.prefix=prefixes[i]}catch(ex){}}throw new Error(\"Could not find an installed XML parser\")};function XmlDocument(){};XmlDocument.create=function(){try{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}if(window.ActiveXObject)return new ActiveXObject(getDomDocumentPrefix()+\".DomDocument\")}catch(ex){};throw new Error(\"Your browser does not support XmlDocument objects\")};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.importNode(doc2.childNodes[i],true))}};XMLDocument.prototype.__defineGetter__(\"xml\",function(){return(new XMLSerializer()).serializeToString(this)});Document.prototype.__defineGetter__(\"xml\",function(){return(new XMLSerializer()).serializeToString(this)})}\nfunction onSearchByURL(url){var obj=$(\"kwd\");var temp=url.split(\":\");if(temp.length>1){var qtemp=String(document.location.href).split(\"/\");var sqtemp=String(qtemp[2]).split(\".\");var qdn=\"\";for(var i=1,cnt=sqtemp.length;i<cnt;i++){qdn+=sqtemp[i];if((i+1)<cnt)qdn+=\".\"}url=\"http://\"+temp[0]+\".\"+qdn+temp[1];wopen(url+urlencode(obj.value),temp[0],\"toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes\");return true}url+=urlencode(obj.value);document.location.href=url;return false};function implode(glue,pieces){if(pieces instanceof Array){return pieces.join(glue)}else if(pieces instanceof Object){var s='';for(var i in pieces)s+=pieces[i]+' ';return s.trim()}else{return pieces}};function extractDetailKeyword(cond){var k=null;var tmp=String(cond).split('|');var tmp2=null;var tmp3=null;var kwd=new Object();for(var i in tmp){if(!tmp[i])continue;tmp2=tmp[i].split(':');tmp3=tmp2[1].split('=');k=String(tmp3[0]).substring(tmp3[0].length-1,tmp3[0].length);if(k=='+')tmp3[1]+=' \u00c0\u00cc\u00bb\u00f3';else if(k=='-')tmp3[1]+=' \u00c0\u00cc\u00c7\u00cf';if(tmp2[0].indexOf('areaid')!=-1)kwd[tmp2[0]]=tmp3[0];else kwd[tmp2[0]]=tmp3[1]}return kwd};function implodeKwyword(cond,keys){var kwds=new Array();var kwd='';for(var i in cond)if((!keys)||(keys[i])){if(i.indexOf('areaid')==-1)kwds[kwds.length]=cond[i]+' '}return String(implode(' ',kwds)).trim()};function implodeareaid(cond,keys){var kwds=new Array();var kwd='';for(var i in cond)if((!keys)||(keys[i])){if(i.indexOf('areaid')==0)kwds[kwds.length]=cond[i]+''}return String(implode('-',kwds)).trim()};function onSearchDetail(target,cond){var url=$(\"sc_form\").action;if(url.substring(url.length-5,url.length)!='?kwd=')url+='?kwd=';var kwd=extractDetailKeyword(cond);var kwds=implodeKwyword(kwd);var ais=implodeareaid(kwd);url+=urlencode(kwds)+'&tc='+target+'&cond='+urlencode(cond)+'&ai='+ais;try{document.location.href=url}catch(e){}};function popupApartMap(x,y){var win=window.open(\"http://sem.icross.co.kr/include/lib/mapView.php?popup=yes&x=\"+x+\"&y=\"+y+\"&z=3\",\"mapView\",\"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=500,height=500,top=\"+((screen.height-500)/2)+\",left=\"+((screen.width-500)/2));if(win==null)alert(\"\u00c6\u00cb\u00be\u00f7\u00c0\u00cc \u00c1\u00a6\u00c7\u00d1\u00b5\u00c7\u00be\u00ee \u00c0\u00d6\u00bd\u00c0\u00b4\u00cf\u00b4\u00d9.\");else win.focus()};var SEOXMLHttp=new Array();function getSEOAttribute(collection,attribute,target,callbackRun){if((typeof(SEOXMLHttp[collection+'-'+target])=='undefined')||(SEOXMLHttp[collection+'-'+target]==null)){SEOXMLHttp[collection+'-'+target]=new XMLhttpReq(\"POST\",'/sem/search/getAttribute.ajax.php');SEOXMLHttp[collection+'-'+target].showLoadingMsg=false}var url='collection='+collection+'&attribute='+attribute+'&target='+target;if(typeof(callbackRun)!='undefined')url+='&callbackRun='+encodeURIComponent(callbackRun);SEOXMLHttp[collection+'-'+target].fireHttp(url,\"setSEOAttribute\",\"JSON\")};function setSEOAttribute(res){if(!res)return;switch(String(res['req']['attribute']).toLowerCase()){case'aptidx':if(res['req']['collection']=='bds')changeSelectForm(res['data'],'_bdsareaid4','\u00b4\u00dc\u00c1\u00f6\u00b8\u00ed');break;case'areaid2':if(res['req']['collection']=='bds')changeSelectForm(res['data'],'_bdsareaid3','\u00b5\u00bf/\u00c0\u00be/\u00b8\u00e9');else if(res['req']['collection']=='life114')changeSelectForm(res['data'],'_life114areaid3','\u00b5\u00bf/\u00c0\u00be/\u00b8\u00e9');break;case'cartypedetail':_SD_AUTO_MODEL=res['data'];var html='';var cnt=0;for(var i in res['data']){html+='<li id=\"_automodel_'+i+'\"><a href=\"#\" onclick=\"sdAutoSelectModel(\\''+i+'\\'); rFalse(event);\" class=\"invert\" id=\"_automodel_a_'+i+'\">'+res['data'][i]+'</a></li>';cnt++}if(cnt<=1)html='<li>\u00c2\u00f7\u00c1\u00be\u00c0\u00bb \u00b8\u00d5\u00c0\u00fa \u00bc\u00b1\u00c5\u00c3\u00c7\u00cf\u00bc\u00bc\u00bf\u00e4.</li>';$('cartypedetail').innerHTML=html;break;case'jobcates2':_SD_JOBS_CATES2=res['data'];changeSelectForm(res['data'],'_jobscates2');break;case'jobcates3':_SD_JOBS_CATES3=res['data'];changeSelectForm(res['data'],'_jobscates3');break}if((typeof(res['req']['callbackRun'])!='undefined')&&(res['req']['callbackRun']))eval(res['req']['callbackRun']);return};function selectSEOAttribute(base,list,target){for(var i in list){if($(base+i)==null)continue;if(i==target){$(base+i).className='on';if($(base+'a_'+i)!=null)$(base+'a_'+i).className=''}else{$(base+i).className='';if($(base+'a_'+i)!=null)$(base+'a_'+i).className='invert'}}};function clearAndSet(target,value,title){clearSelect(target,'',title)};function changeSelectForm(list,target,title){clearAndSet(target,'',title);if(list){for(var i in list){addSelect(target,i,list[i])}}if(target=='_bdsareaid2'){clearSelect('_bdsareaid3','','\u00b5\u00bf/\u00c0\u00be/\u00b8\u00e9');clearSelect('_bdsareaid4','','\u00b4\u00dc\u00c1\u00f6\u00b8\u00ed')}else if(target=='_bdsareaid3'){clearSelect('_bdsareaid4','','\u00b4\u00dc\u00c1\u00f6\u00b8\u00ed')}};function sdSelectAreaid0(areaid,target1,target2,callfunc){$(target1).value=areaid;changeSelectForm(_SD_AREAID[areaid],target2,'\u00bd\u00c3/\u00b1\u00ba/\u00b1\u00b8');if(typeof(callfunc)!='undefined')eval(callfunc)};function sdSelectAreaid1(collection,areaid,target,callbackRun,callfunc){$(target).value=areaid;if((typeof(callbackRun)!='undefined')&&(callbackRun)&&(callbackRun!=''))getSEOAttribute(collection,'areaid2',areaid,callbackRun);else getSEOAttribute(collection,'areaid2',areaid);if(typeof(callfunc)!='undefined')eval(callfunc)};function sdSelectAreaid2(collection,cateid,areaid,target1,target2,callbackRun,callfunc){$(target2).value=areaid;if((typeof(callbackRun)!='undefined')&&(callbackRun)&&(callbackRun!=''))getSEOAttribute(collection,'aptidx',cateid+'|'+($(target1).value)+'|'+areaid,callbackRun);else getSEOAttribute(collection,'aptidx',cateid+'|'+($(target1).value)+'|'+areaid);if(typeof(callfunc)!='undefined')eval(callfunc)};function sdSelectAptcode(aptidx,target,callfunc){$(target).value=aptidx;if(typeof(callfunc)!='undefined')eval(callfunc)};function toolWinControl(tagId,cName,abso){var tagIdv=$(tagId);if(tagIdv.style.display==\"none\")tagIdv.style.display=\"block\";else if(tagIdv.style.display==\"block\"||tagIdv.style.display==\"\")tagIdv.style.display=\"none\"};var akc=null;function onloadAKC(){try{akc=new autoKeywordComplete(\"akc\",\"sc_form\",\"kwd\",\"akcarrow\",\"akcbox\",\"akcidiv\",\"akconoff\",\"akcleft\",\"akcright\",\"/sem/autoKeywordComplete.ajax.php\",\"/akc/img/icokeyup.gif\",\"/akc/img/icokeydown.gif\",\"/akc/img/btn_turn_on.gif\",\"/akc/img/btn_turn_off.gif\",\"/akc/img/btn_left_on.gif\",\"/akc/img/btn_left_off.gif\",\"/akc/img/btn_right_on.gif\",\"/akc/img/btn_right_off.gif\")}catch(e){}};addEvent(window,\"load\",onloadAKC);var ISearchManager=function(){this.keyword='';this.autoSpaceKeyword='';this.keywordWithoutLocal='';var tmp=String(document.location.href).split('?');this.nowURI=tmp[0];this.defaultURI=null};ISearchManager.prototype.showDetailTab=function(target,on){var os=$(target);if(os){os.inValue=((typeof(on)!='undefined')&&(on!=false));os.className=(os.inValue)?'on':'off'}};ISearchManager.prototype.setDetailPanel=function(target,defaultTitle,value,noneValue){var os=$(target);if(os){if((typeof(value)!='undefined')&&(value!=noneValue)){os.innerHTML=value;os.inValue=true}else{os.innerHTML=defaultTitle;os.inValue=false}}};ISearchManager.prototype.viewDetailPanel=function(collection,target,clickEvent){if((typeof(clickEvent)!='undefined')&&(target=='')){var tmp=clickEvent.target||clickEvent.srcElement;while(tmp){if(String(tmp.className).indexOf('adv_select_form')>=0)return false;tmp=tmp.parentNode}}var panels=new Array();panels['bds']={'advs_bds_item1':'advanced_bds_cate','advs_bds_item2':'advanced_bds_trans','advs_bds_item3':'advanced_bds_area','advs_bds_item4':'advanced_bds_space','advs_bds_item5':'advanced_bds_price'};panels['auto']={'advs_auto_item1':'advanced_auto_type','advs_auto_item2':'advanced_auto_model','advs_auto_item3':'advanced_auto_fuel','advs_auto_item4':'advanced_auto_year','advs_auto_item5':'advanced_auto_price','advs_auto_item6':'advanced_auto_area'};panels['jobs']={'advs_jobs_item1':'advanced_jobs_cate1','advs_jobs_item3':'advanced_jobs_type','advs_jobs_item4':'advanced_jobs_area'};panels['life114']={'advs_life114_item1':'advanced_life114_cate','advs_life114_item2':'advanced_life114_area'};if(panels[collection]){var os=null;var ot=null;for(var s in panels[collection]){os=$(s);ot=$(panels[collection][s]);if((!os)||(!ot))continue;if((panels[collection][s]==target)&&(os.className!='select')){os.className='select';ot.style.display='block';if(this.bodyClickFunc==null){this.bodyClickFunc=function(thisObj,coll){return function(event){if(thisObj.viewDetailPanel(coll,'',event)){removeEvent(document.body,'click',thisObj.bodyClickFunc);thisObj.bodyClickFunc=null}}}(this,collection);addEvent(document.body,'click',this.bodyClickFunc)}}else{os.className=(os.inValue)?'on':'off';ot.style.display='none'}}}return true};ISearchManager.prototype.fireClickLog=function(collection,target){var keyword=(this.autoSpaceKeyword||this.keyword);ILogger.send('SEclick',{'keyword':keyword,'keywordWithoutLocal':this.keywordWithoutLocal,'collection':collection,'target':target})};ISearchManager.prototype.onSearch=function(kwd,attr){var tmp=((typeof(attr)!='undefined')&&(attr['url']))?attr['url']:((this.defaultURI!=null)?this.defaultURI:this.nowURI);tmp=tmp.replace('?kwd=','');tmp+=((String(tmp).indexOf('?')>=0)?'&':'?')+'kwd='+kwd;if(typeof(attr)!='undefined'){for(var id in attr)if(id!='url')tmp+='&'+id+'='+attr[id]}document.location.href=tmp;return false};ISearchManager.prototype.onDanjiView=function(tobj,data){var html=\"<div class='danji_link_inwrap'><ul class='clearlist clearfix'>\";for(var i=0,icnt=data.length;i<icnt;i++)html+=\"<li><a href='\"+data[i]['link']+\"' onclick=\\\"ISMR.fireClickLog('paper', 'danji_view');\\\" target='_blank'>\"+data[i]['name']+\"</a></li>\";html+=\"</ul></div><input type='button' class='danji_btn_close' value='\u00b4\u00dd\u00b1\u00e2' onclick='ISMR.onDanjiHide();' />\";var obj=$('djb_base');if(obj){if(document.body)document.body.appendChild(obj);obj.innerHTML=html;obj.style.top=(getRealOffsetTop(tobj))+'px';obj.style.left=(getRealOffsetLeft(tobj)+60)+'px';obj.style.display=\"block\"}};ISearchManager.prototype.onDanjiHide=function(){var obj=$('djb_base');if(obj)obj.style.display=\"none\"};ISearchManager.prototype.onBoxView=function(target,changeTarget){var tagIdv=$(target);var targetObj=(changeTarget)?$(changeTarget):null;if(tagIdv){if(tagIdv.style.display==\"none\"){tagIdv.style.display=\"block\";if(targetObj)targetObj.className='shw'}else{tagIdv.style.display=\"none\";if(targetObj)targetObj.className='hid'}}};var ISMR=new ISearchManager();\nvar rolling=function(thisName,objid,max,delay,func){this.name=thisName;this.objBaseId=objid;this.max=max;this.nowIdx=0;this.delay=delay;this.sto=null;this.rollPause=false;this.func=null;if((typeof(delay)==\"undefined\")||(delay==\"\"))this.delay=0;if(typeof(func)!=\"undefined\")this.func=func};rolling.prototype.start=function(){var objid=null;var s=typeof this.objBaseId;var max=-1;if(s==='object')if(this.objBaseId)if(this.objBaseId instanceof Array)s='array';if(s==\"array\"){for(var x=0,cnt=this.objBaseId.length;x<cnt;x++){objid=this.objBaseId[x];for(var i=0;i<this.max;i++){if(document.getElementById(objid+i)==null){if(max<i)max=i;break}}}}else{objid=this.objBaseId;for(var i=0;i<this.max;i++){if(document.getElementById(objid+i)==null){max=i;break}}}if(max>=0)this.max=max;if(this.delay>0)this.sto=setTimeout(this.name+\".showByDir()\",this.delay)};rolling.prototype.show=function(idx){var obj=null;var objid=null;var s=typeof this.objBaseId;if(s==='object')if(this.objBaseId)if(this.objBaseId instanceof Array)s='array';if(s==\"array\"){for(var x=0,cnt=this.objBaseId.length;x<cnt;x++){objid=this.objBaseId[x];for(var i=0;i<this.max;i++){obj=document.getElementById(objid+i);if(obj==null)continue;obj.style.display=(i!=idx)?\"none\":\"block\"}}}else{objid=this.objBaseId;for(var i=0;i<this.max;i++){obj=document.getElementById(objid+i);if(obj==null)continue;obj.style.display=(i!=idx)?\"none\":\"block\"}}if(this.func!=null){eval(this.func+\"('\"+idx+\"', '\"+this.max+\"');\")}return true};rolling.prototype.pause=function(){this.rollPause=true;if(this.sto!=null)clearTimeout(this.sto)};rolling.prototype.play=function(){this.rollPause=false;if(this.sto!=null)clearTimeout(this.sto);if(this.delay>0)this.sto=setTimeout(this.name+\".showByDir()\",this.delay)};rolling.prototype.showByDir=function(dir){if(this.max<=1){if(this.sto!=null)clearTimeout(this.sto);return false}if(!this.rollPause){if((dir==null)||(typeof(dir)==\"undefined\")){dir=1}if(this.sto!=null)clearTimeout(this.sto);this.nowIdx=(this.nowIdx+dir)%this.max;if(this.nowIdx<0)this.nowIdx=parseInt(this.max)+parseInt(this.nowIdx);this.show(this.nowIdx)}if(this.delay>0)this.sto=setTimeout(this.name+\".showByDir()\",this.delay)};\nvar lightbox=function(option){if(option==null)option=new Object();if(typeof(option[\"title\"])==\"undefined\")option[\"title\"]=\"test\";if(typeof(option[\"id\"])==\"undefined\")option[\"id\"]=\"test\";if(typeof(option[\"width\"])==\"undefined\")option[\"width\"]=\"300px\";if(typeof(option[\"height\"])==\"undefined\")option[\"height\"]=\"200px\";if(typeof(option[\"opacity\"])==\"undefined\")option[\"opacity\"]=50;if(typeof(option[\"bgcolor\"])==\"undefined\")option[\"bgcolor\"]=\"#000000\";if(typeof(option[\"boxcolor\"])==\"undefined\")option[\"boxcolor\"]=\"#ffffff\";if(typeof(option[\"border\"])==\"undefined\")option[\"border\"]=\"#026AFE solid 2px\";if(typeof(option[\"titlebg\"])==\"undefined\")option[\"titlebg\"]=\"#026AFE\";if(typeof(option[\"titlecolor\"])==\"undefined\")option[\"titlecolor\"]=\"#ffffff\";if(typeof(option[\"buttonText\"])==\"undefined\")option[\"buttonText\"]=\"X\";if(typeof(option[\"parent\"])==\"undefined\")option[\"parent\"]=null;if(typeof(option[\"closeFunc\"])==\"undefined\")option[\"closeFunc\"]=null;if(typeof(option[\"onClickClose\"])==\"undefined\")option[\"onClickClose\"]=true;if(typeof(option[\"useDrag\"])==\"undefined\")option[\"useDrag\"]=true;this.option=option;this.doc=this.getDocument(window);this.docBody=this.doc.body||this.doc.documentElement;this.lbBaseObj=null;this.lbBase=document.createElement(\"div\");this.lbBase.id=this.option[\"id\"]+\"base\";this.lbBase.style.cssText=\"display:none; position:absolute; border:none 0px; width:100%; height:100%; top:0px; left:0px; z-index:99998; background-color:\"+this.option[\"bgcolor\"]+\"; opacity:\"+(this.option[\"opacity\"]/ 100)+\"; -moz-opacity:\"+(this.option[\"opacity\"] /100)+\"; filter:Alpha(opacity=\"+this.option[\"opacity\"]+\");\";this.docBody.appendChild(this.lbBase);var agent=navigator.userAgent.toLowerCase();var major=parseInt(navigator.appVersion);var minor=parseFloat(navigator.appVersion);var ie=((agent.indexOf(\"msie\")!=-1)&&(agent.indexOf(\"opera\")==-1));this.isIe=ie;this.ieUnder6=(ie&&(major==4)&&((agent.indexOf(\"msie 5.\")!=-1)||(agent.indexOf(\"msie 6.\")!=-1))&&(agent.indexOf(\"msie 7.\")==-1)&&(agent.indexOf(\"mac\")==-1));this.ieUnder55=(ie&&(major==4)&&(agent.indexOf(\"msie 5.\")!=-1)&&(agent.indexOf(\"mac\")==-1));this.ieVer10=(ie&&(major==5)&&(agent.indexOf(\"msie 10.\")!=-1));this.isScroll=false;this.valueScroll=\"\";this.useDrag=option[\"useDrag\"];this.dragApproved=false;this.posX=0;this.posY=0;this.chrome42=(agent.indexOf(\"chrome/42\")!=-1||agent.indexOf(\"chrome/43\")!=-1||agent.indexOf(\"chrome/44\")!=-1||agent.indexOf(\"chrome/45\")!=-1);var rgl=/chrome[/][0-9]*[.]/;var chrome_temp=rgl.exec(agent);this.chrome42=false;if(chrome_temp!=undefined&&chrome_temp!=null){var chrome_version=chrome_temp[0].replace('chrome/','').replace('.','');this.chrome42=(parseInt(chrome_version)>=42)?true:false}if(this.ieUnder6){this.background=document.createElement(\"iframe\");this.background.frameBorder=\"0px\";with(this.background.style){position=\"absolute\";filter=\"Alpha(opacity=\"+this.option[\"opacity\"]+\")\";border=\"none 0px\";top=\"0px\";left=\"0px\";width=\"100%\";height=\"100%\"}this.lbBase.appendChild(this.background)}this.box=document.createElement(\"div\");this.box.id=this.option[\"id\"]+\"box\";this.box.style.cssText=\"display:none; position:absolute; border:\"+this.option[\"border\"]+\"; width:100%; height:100%; z-index:99999; background-color:\"+this.option[\"boxcolor\"]+\";\";this.docBody.appendChild(this.box);var id=this.option[\"id\"];var boxHtml=\"\";boxHtml+=\"<div id='\"+id+\"ttl' style='height:20px; background:\"+this.option[\"titlebg\"]+\"; color:#fff; font-weight:bold; padding:2px 2px 0px 5px;'>\";boxHtml+=\"\t<div id='\"+id+\"t' style='float:left; color:\"+this.option[\"titlecolor\"]+\"; line-height:17px;'><\"+\"/div>\";boxHtml+=\"\t<input type='button' id='\"+id+\"_close' onclick='\"+id+\".onClose(event, \"+id+\"); return false;' value='\u00b4\u00dd\u00b1\u00e2' style='float:right;width:14px;height:13px;border:0;background:url(http://img.icross.co.kr/board/ico_close.gif) no-repeat;overflow:hidden;text-indent:-1000px;cursor:pointer;' title='\u00b4\u00dd\u00b1\u00e2' /\"+\">\";boxHtml+=\"\t<input type='button' id='\"+id+\"_reload' onclick='\"+id+\".onIframeReload(event, \"+id+\"); return false;' value='\u00bb\u00f5\u00b7\u00ce\u00b0\u00ed\u00c4\u00a7' style='float:right;width:14px;height:13px;border:0;background:url(http://img.icross.co.kr/board/ico_reload.gif) no-repeat;overflow:hidden;text-indent:-1000px;cursor:pointer;margin-right:2px;' title='\u00bb\u00f5\u00b7\u00ce\u00b0\u00ed\u00c4\u00a7' /\"+\">\";boxHtml+=\"<\"+\"/div>\";boxHtml+=\"<div id='\"+id+\"c' style='clear:both; overflow:hidden; background-color:#fff;'>\";boxHtml+=\"<\"+\"/div>\";this.box.innerHTML=boxHtml;this.title=document.getElementById(id+\"ttl\");this.titleText=document.getElementById(id+\"t\");this.contents=document.getElementById(id+\"c\");if(this.useDrag){try{this.title.style.cursor=\"move\"}catch(e){};this.attachEventWithThis(this.title,\"mousedown\",\"onMouseDown\");this.attachEventWithThis(this.title,\"mouseup\",\"onMouseUp\");this.attachEventWithThis(this.title,\"mouseMove\",\"onMouseMove\");this.attachEventWithThis(this.box,\"mouseup\",\"onMouseUp\");this.attachEventWithThis(this.box,\"mousemove\",\"onMouseMove\");this.attachEventWithThis(this.lbBase,\"mouseup\",\"onMouseUp\");this.attachEventWithThis(this.lbBase,\"mousemove\",\"onMouseMove\");if(this.option[\"onClickClose\"])this.attachEventWithThis(this.lbBase,\"click\",\"onClose\");if(this.ieUnder6){try{this.attachEventWithThis(this.background.contentWindow.document,\"mouseup\",\"onMouseUp\");this.attachEventWithThis(this.background.contentWindow.document,\"mousemove\",\"onMouseMove\");if(this.option[\"onClickClose\"])this.attachEventWithThis(this.background.contentWindow.document,\"click\",\"onClose\")}catch(e){}}this.attachEventWithThis(this.docBody,\"mouseup\",\"onMouseUp\");this.attachEventWithThis(this.docBody,\"mousemove\",\"onMouseMove\")}this.boxWidth=0;this.boxHeight=0};lightbox.prototype.onMouseDown=function(event,thisObj){document.body.onselectstart=function(){return false};if((typeof event==\"undefined\")||(event==null))event=window.event;thisObj.dragApproved=true;thisObj.posX=event.screenX;thisObj.posY=event.screenY;thisObj.contents.style.display=\"none\";thisObj.onMouseMove(event,thisObj)};lightbox.prototype.onMouseUp=function(event,thisObj){if(thisObj.dragApproved==true){thisObj.dragApproved=false;thisObj.contents.style.display=\"block\";document.body.onselectstart=null}};lightbox.prototype.onMouseMove=function(event,thisObj){if((typeof event==\"undefined\")||(event==null))event=window.event;var x=0;var y=0;if(thisObj.dragApproved==true){x=parseInt(thisObj.box.style.left);if(isNaN(x))x=thisObj.box.offsetLeft;x-=(thisObj.posX-event.screenX);y=parseInt(thisObj.box.style.top);if(isNaN(y))y=thisObj.box.offsetTop;y-=(thisObj.posY-event.screenY);thisObj.posX=event.screenX;thisObj.posY=event.screenY;thisObj.box.style.left=x+\"px\";thisObj.box.style.top=y+\"px\";return true}};lightbox.prototype.setSize=function(w,h){this.boxWidth=w;this.boxHeight=h;var bw=0,bh=0;if(typeof(window.innerWidth)=='number'){bw=window.innerWidth||self.innerWidth;bh=window.innerHeight||self.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){bw=document.documentElement.clientWidth;bh=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){bw=document.body.clientWidth;bh=document.body.clientHeight}var x=0,y=0,sw=0,sh=0;if(typeof(window.pageYOffset)=='number'){y=window.pageYOffset;x=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){y=document.body.scrollTop;x=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){y=document.documentElement.scrollTop;x=document.documentElement.scrollLeft}if(this.ieUnder55){if(this.docBody.offsetHeight>this.docBody.scrollHeight)sh=this.docBody.offsetHeight||this.docBody.scrollHeight;else sh=this.docBody.scrollHeight||this.docBody.offsetHeight;if(this.docBody.offsetWidth>this.docBody.scrollWidth)sw=this.docBody.offsetWidth||this.docBody.scrollWidth;else sw=this.docBody.scrollWidth||this.docBody.offsetWidth}else{sw=parseInt((this.docBody.scrollWidth>this.doc.documentElement.scrollWidth)?this.docBody.scrollWidth:this.doc.documentElement.scrollWidth);sh=parseInt((this.docBody.scrollHeight>this.doc.documentElement.scrollHeight)?this.docBody.scrollHeight:this.doc.documentElement.scrollHeight)}var obj=this.docBody;if(this.option[\"parent\"]==null){x+=parseInt((bw-parseInt(w))/2);y+=parseInt((bh-parseInt(h))/2);with(this.lbBase.style){top=\"0px\";left=\"0px\";width=sw+\"px\";height=sh+\"px\"}}else{var pTop=this.getRealOffsetTop(this.option[\"parent\"]);var pLeft=this.getRealOffsetLeft(this.option[\"parent\"]);var pWidth=this.option[\"parent\"].offsetWidth;var pHeight=this.option[\"parent\"].offsetHeight;x=parseInt(((pWidth-parseInt(w))/2)+pLeft);y=parseInt(((pHeight-parseInt(h))/2)+pTop);with(this.lbBase.style){top=pTop+\"px\";left=pLeft+\"px\";width=pWidth+\"px\";height=pHeight+\"px\"}var obj=this.option[\"parent\"]}if(x<0)x=0;if(y<0)y=0;if(this.chrome42){var tmp_x=parseInt(x);var tmp_y=parseInt(y)}with(this.box.style){if(this.chrome42){x=tmp_x;y=tmp_y}if(w!=null){left=parseInt(x)+\"px\";width=w+\"px\";this.contents.style.width=w+\"px\"}if(h!=null){top=parseInt(y)+\"px\";height=h+\"px\";this.contents.style.height=(h-22)+\"px\"}}return new Array(x,y)};lightbox.prototype.open=function(mode,attr,w,h,box_display){var p=this.setSize(w,h);var x=p[0];var y=p[1];if((typeof(box_display)!=\"undefined\")&&(box_display==\"none\"))box_display=\"none\";else box_display=\"block\";this.titleText.innerHTML=this.option[\"title\"];switch(mode){case\"iframe\":this.contents.innerHTML=\"<iframe src='\"+attr+\"' id='\"+this.option[\"id\"]+\"ifr' name='\"+this.option[\"id\"]+\"ifr' frameborder='0' scrolling='auto' style='border:none 0px; padding:0px; margin:0px; width:100%; height:100%;' /\"+\">\";this.box.style.display=box_display;break;case\"iframenoscroll\":this.contents.innerHTML=\"<iframe src='\"+attr+\"' id='\"+this.option[\"id\"]+\"ifr' frameborder='0' scrolling='no' style='border:none 0px; padding:0px; margin:0px; width:100%; height:100%;' /\"+\">\";this.box.style.display=box_display;break;case\"html\":this.contents.innerHTML=attr;this.box.style.display=box_display;break;case\"object\":this.box.style.display=\"none\";var obj=document.getElementById(attr);if((this.lbBaseObj!=null)&&(this.lbBaseObj!=obj))this.lbBaseObj.style.display=\"none\";if(obj.parentNode!=this.docBody)this.docBody.appendChild(obj);obj.style.position=\"absolute\";obj.style.zIndex=this.lbBase.style.zIndex+1;obj.style.left=x+\"px\";obj.style.top=y+\"px\";obj.style.display=\"block\";this.lbBaseObj=obj;break;case\"blank\":this.box.style.display=\"none\";break}this.lbBase.style.display=\"block\";if(this.ieVer10){var ifr=document.getElementById(this.option['id']+'ifr');if(ifr==undefined||ifr==''||ifr==null){}else{ifr.style.display='none';setTimeout(function(){ifr.style.display='block'},500)}}};lightbox.prototype.onIframeReload=function(event,thisObj){document.getElementById(thisObj.option[\"id\"]+\"ifr\").contentWindow.document.location.reload()};lightbox.prototype.onZoomIn=function(width,height,force){if(typeof(width)=='undefined')width=200;if(typeof(height)=='undefined')height=100;if((typeof(force)=='undefined')||(force==false)){width=parseInt(this.boxWidth)+parseInt(width);height=parseInt(this.boxHeight)+parseInt(height)}this.setSize(width,height)};lightbox.prototype.onZoomOut=function(width,height,force){if(typeof(width)=='undefined')width=200;if(typeof(height)=='undefined')height=100;if((typeof(force)=='undefined')||(force==false)){width=parseInt(this.boxWidth)-parseInt(width);height=parseInt(this.boxHeight)-parseInt(height)}this.setSize(width,height)};lightbox.prototype.onClose=function(event,thisObj){try{if(thisObj.option[\"closeFunc\"]!=null){thisObj.option[\"closeFunc\"]()}}catch(e){};thisObj.lbBase.style.display=\"none\";thisObj.box.style.display=\"none\";if(this.lbBaseObj!=null)this.lbBaseObj.style.display=\"none\"};lightbox.prototype.close=function(){this.onClose(null,this)};lightbox.prototype.getRealOffsetLeft=function(obj){return obj?obj.offsetLeft+this.getRealOffsetLeft(obj.offsetParent):0};lightbox.prototype.getRealOffsetTop=function(obj){return obj?obj.offsetTop+this.getRealOffsetTop(obj.offsetParent):0};lightbox.prototype.getDocument=function(obj){if(obj.contentDocument)return obj.contentDocument;else if(obj.contentWindow)return obj.contentWindow.document;else if(obj.document)return obj.document;return false};lightbox.prototype.attachEventWithThis=function(target,eventName,handlerName){var thisObj=this;eval(\"target.\"+handlerName+\"= this.\"+handlerName);if(target.addEventListener){target.addEventListener(eventName,function(event,e){target[handlerName](event,thisObj)},false)}else if(target.attachEvent){target.attachEvent(\"on\"+eventName,function(event,e){target[handlerName](event,thisObj)})}else{var originalHandler=target[\"on\"+eventName];if(originalHandler)target[\"on\"+eventName]=function(event,e){originalHandler(event,thisObj);target[handlerName](event,thisObj)};else target[\"on\"+eventName]=target[handlerName]}};\nvar popupWindow=function(varId,overflowType){this._AGENT=navigator.userAgent.toLowerCase();this._IS_IE=((this._AGENT.indexOf(\"msie\")!=-1)&&(this._AGENT.indexOf(\"opera\")==-1));this._IS_OPERA=(this._AGENT.indexOf(\"opera\")!=-1);this._IS_MAC=(this._AGENT.indexOf(\"mac\")!=-1);this._IS_MAC_IE=(this._IS_IE&&this._IS_MAC);this._IS_WIN_IE=(this._IS_IE&&!this._IS_MAC);this._IS_GECKO=(navigator.product==\"Gecko\");var major=parseInt(navigator.appVersion);var minor=parseFloat(navigator.appVersion);this.ieUnder6=(this._IS_IE&&(major==4)&&((this._AGENT.indexOf(\"msie 5.\")!=-1)||(this._AGENT.indexOf(\"msie 6.\")!=-1))&&(this._AGENT.indexOf(\"mac\")==-1));this.ieUnder55=(this._IS_IE&&(major==4)&&(this._AGENT.indexOf(\"msie 5.\")!=-1)&&(this._AGENT.indexOf(\"mac\")==-1));this.varId=varId;this.layerOverflow=(typeof(overflowType)==\"undefined\")?\"auto\":overflowType;this.cookieId=\"\";this.dragapproved=false;this.posX=0;this.posY=0;var doc=this.getDocument(window);this.docBody=(typeof doc.body!=\"undefined\")?doc.body:doc.documentElement;this.obj=null;this.sto=null;this.dragObj=null;this.zindexVarname=null;this.onOpenFunc=null;this.onCloseFunc=null;this.setCenter=false;this.w=0;this.h=0;this.x=0;this.y=0};popupWindow.prototype.setZindexVarName=function(varname){this.zindexVarname=varname;eval(this.zindexVarname+\"= 9999\")};popupWindow.prototype.simpleCreate=function(title,content,w,h,x,y,targetId){if(typeof(x)==\"undefined\")x=0;if(typeof(y)==\"undefined\")y=0;if(typeof(targetId)==\"undefined\")targetId=null;this.create(this.varId,title,content,0,0,\"all\",w,h,x,y,targetId,true)};popupWindow.prototype.create=function(id,title,content,delay,time,openCheck,w,h,x,y,targetId,dontAutoOpen,closeTerm){if((typeof(closeTerm)=='undefined')||(closeTerm==\"\")){if((id!=\"\")&&(getCookie(id)==\"yes\"))return false}if(typeof(dontAutoOpen)==\"undefined\")dontAutoOpen=false;this.cookieId=id;this.dragObj=document.createElement(\"DIV\");this.dragObj.id=id+\"_base\";this.dragObj.style.backgroundColor=\"#ffffff\";document.body.appendChild(this.dragObj);if(this.ieUnder6){this.background=document.createElement(\"iframe\");this.background.frameBorder=\"0px\";with(this.background.style){position=\"absolute\";filter=\"Alpha(opacity=10)\";border=\"none 0px\";top=\"0px\";left=\"0px\";width=\"100%\";height=\"100%\";zIndex=1999}document.body.appendChild(this.background)}else{this.background=null}if((delay>0)||(dontAutoOpen)){this.dragObj.style.display=\"none\";if(this.background!=null)this.background.style.display='none'}this.w=w;this.h=h;this.dragObj.style.zIndex=9999;this.dragObj.style.position=\"absolute\";this.dragObj.style.width=w+\"px\";this.dragObj.style.height=h+\"px\";if(this.background!=null){this.background.style.width=w+\"px\";this.background.style.height=h+\"px\"}if(x==\"\")x=\"0\";if(y==\"\")y=\"0\";if((typeof(targetId)!=\"undefined\")&&(targetId!=null)&&(targetId!=\"\")){var target=document.getElementById(targetId);if(target!=null){x=parseInt(x)+getRealOffsetLeft(target);y=parseInt(y)+getRealOffsetTop(target)}}this.x=x;this.y=y;if(this.setCenter){this.y=((screen.height-this.h)/2);this.x=((screen.width-this.w)/2)}this.dragObj.style.top=this.y+\"px\";this.dragObj.style.left=this.x+\"px\";if(this.background!=null){this.background.style.top=this.y+\"px\";this.background.style.left=this.x+\"px\"}var boxHtml=\"\";boxHtml+=\"<div class='notice_tl' style='\"+((this.ieUnder6)?\"margin-right:-3px;\":\"\")+\"height:23px; float:left; width:5px; background:url(http://img.icross.co.kr/icross/nt_rdbg.gif) no-repeat;'><\"+\"/div>\";boxHtml+=\"<div class='notice_tr' style='\"+((this.ieUnder6)?\"margin-left:-3px;\":\"\")+\"height:23px; float:right; width:5px; background:url(http://img.icross.co.kr/icross/nt_rdbg.gif) -5px 0px no-repeat;'><\"+\"/div>\";boxHtml+=\"<div class='notice_tc' style='border-top:1 solid #026AFE; overflow:hidden; height:\"+((this.ieUnder55)?\"23\":\"18\")+\"px; padding-top:4px; background-color:#026AFE;'>\";boxHtml+=\"<div id='\"+id+\"ttl' style='height:18px; background:#026AFE url(http://img.icross.co.kr/icross/nt_tbg.gif) repeat-x; color:#fff; font:bold 12px \u00b1\u00bc\u00b8\u00b2; cursor:pointer;'>\";boxHtml+=\" <div id='\"+id+\"t' style='float:left; color:#fff;'>\"+title+\"<\"+\"/div>\";boxHtml+=\" <input type='button' onclick='\"+this.varId+\".onClose();' value='\u00b4\u00dd\u00b1\u00e2' style='float:right;width:14px;height:13px;border:0;background:url(http://img.icross.co.kr/icross/ico_close.gif) no-repeat;overflow:hidden;text-indent:-1000px;cursor:pointer;' title='\u00b4\u00dd\u00b1\u00e2' /\"+\">\";boxHtml+=\"<\"+\"/div>\";boxHtml+=\"<\"+\"/div>\";boxHtml+=\"<div style='border:0 solid #026AFE; border-width:0 1px;'>\";boxHtml+=\"<div class='#popup_bg' style='background-color:#fff;border:0 solid #3787FF; overflow:hidden; clear:both; border-width:0 2px; word-break:break-all;' >\";boxHtml+=\"<div id='\"+id+\"c' class='clearfix' style='text-align:left; clear:both; overflow:\"+this.layerOverflow+\"; width:\"+(w)+\"px; height:\"+(h)+\"px;\"+((this.ieUnder55)?\"float:left;\":\"\")+\"'>\"+content+\"<\"+\"/div>\";if(openCheck==\"dont\"){boxHtml+=\"<div id='\"+id+\"b' style='text-align:right; clear:both; height:16px; padding-top:3px'>\";boxHtml+=\"<input type='checkbox' id='\"+id+\"chk' onclick='\"+this.varId+\".setCookie(true);' style='margin-top:-3px;' /><label for='\"+id+\"chk' style='color:#444;font:normal 11px \u00b5\u00b8\u00bf\u00f2;'>\u00b4\u00d9\u00bd\u00c3 \u00bf\u00ad\u00c1\u00f6\u00be\u00ca\u00b1\u00e2<\"+\"/label>\";boxHtml+=\"<\"+\"/div>\"}else if(openCheck==\"all\"){boxHtml+=\"\"}else if(openCheck==\"term\"){boxHtml+=\"<div id='\"+id+\"b' style='text-align:right; clear:both; height:16px; padding-top:3px'>\";boxHtml+=\"<input type='checkbox' id='\"+id+\"chk' onclick='\"+this.varId+\".setCookie(false, \"+closeTerm+\");' style='margin-top:-3px;' /><label for='\"+id+\"chk' style='color:#444;font:normal 11px \u00b5\u00b8\u00bf\u00f2;'>\"+closeTerm+\"\u00c0\u00cf\u00b5\u00bf\u00be\u00c8 \u00bf\u00ad\u00c1\u00f6\u00be\u00ca\u00b1\u00e2<\"+\"/label>\";boxHtml+=\"<\"+\"/div>\"}else{boxHtml+=\"<div id='\"+id+\"b' style='text-align:right; clear:both; height:16px; padding-top:3px; padding-right:8px;'>\";boxHtml+=\"<input type='checkbox' id='\"+id+\"chk' onclick='\"+this.varId+\".setCookie(false);' style='margin-top:-3px;' /><label for='\"+id+\"chk' style='color:#444;font:normal 11px \u00b5\u00b8\u00bf\u00f2;'>\u00c7\u00cf\u00b7\u00e7\u00b5\u00bf\u00be\u00c8 \u00bf\u00ad\u00c1\u00f6\u00be\u00ca\u00b1\u00e2<\"+\"/label>\";boxHtml+=\"<\"+\"/div>\"}boxHtml+=\"<\"+\"/div>\";boxHtml+=\"<\"+\"/div>\";boxHtml+=\"<div class='notice_bl' style='\"+((this.ieUnder6)?\"margin-right:-3px;\":\"\")+\"height:5px; float:left; width:5px; background:url(http://img.icross.co.kr/icross/nt_rdbg.gif) 0px -23px no-repeat;'><\"+\"/div>\";boxHtml+=\"<div class='notice_br' style='\"+((this.ieUnder6)?\"margin-left:-3px;\":\"\")+\"height:5px; float:right; width:5px; background:url(http://img.icross.co.kr/icross/nt_rdbg.gif) -5px -23px no-repeat;'><\"+\"/div>\";boxHtml+=\"<div class='notice_bc' style='border-bottom:1 solid #026AFE; overflow:hidden; height:\"+((this.ieUnder55)?\"5\":\"4\")+\"px; background:#fff url(http://img.icross.co.kr/icross/nt_tbbg.gif) repeat-x;'><\"+\"/div>\";this.dragObj.innerHTML=boxHtml;this.title=document.getElementById(id+\"ttl\");this.titleText=document.getElementById(id+\"t\");this.attachEventWithThis(this.title,\"mousedown\",\"onMouseDownF\");this.attachEventWithThis(this.title,\"mouseup\",\"onMouseUpF\");this.attachEventWithThis(this.title,\"mousemove\",\"onMouseMoveF\");this.attachEventWithThis(this.docBody,\"mouseup\",\"onMouseUpF\");this.attachEventWithThis(this.docBody,\"mousemove\",\"onMouseMoveF\");if(time>0)this.sto=setTimeout(this.varId+\".onClose()\",time*1000);if(delay>0)setTimeout(this.varId+\".view()\",delay*1000)};popupWindow.prototype.view=function(){if(this.setCenter){this.y=((screen.height-this.h)/2);this.x=((screen.width-this.w)/2);this.dragObj.style.top=this.y+\"px\";this.dragObj.style.left=this.x+\"px\";if(this.background!=null){this.background.style.top=this.y+\"px\";this.background.style.left=this.x+\"px\"}}this.dragObj.style.display=\"block\";if(this.background!=null)this.background.style.display=\"block\"};popupWindow.prototype.onOpen=function(){this.view();try{if(this.onOpenFunc!=null)this.onOpenFunc()}catch(e){}};popupWindow.prototype.onClose=function(){try{if(this.onCloseFunc!=null)this.onCloseFunc()}catch(e){};this.dragObj.style.display=\"none\";if(this.background!=null)this.background.style.display=\"none\"};popupWindow.prototype.setCookie=function(neveropen,closeTerm){var exp=new Date();if(neveropen)exp.setTime(exp.getTime()+(1000*60*60*24*3650));else{if(closeTerm>0)exp.setTime(exp.getTime()+(1000*60*60*24*closeTerm));else exp.setTime(exp.getTime()+(1000*60*60*24))}document.cookie=this.cookieId+\"=yes; domain=\"+document.domain+\"; path=/; expires=\"+exp.toGMTString();this.onClose()};popupWindow.prototype.onMouseDownF=function(event,thisObj){thisObj.docBody.ondragstart=function(){return false};thisObj.docBody.onselectstart=function(){return false};if((typeof event==\"undefined\")||(event==null))event=window.event;thisObj.dragapproved=true;thisObj.posX=event.screenX;thisObj.posY=event.screenY;if(thisObj.zindexVarname!=null){eval(thisObj.zindexVarname+\"++\");thisObj.dragObj.style.zIndex=eval(thisObj.zindexVarname);if(thisObj.background!=null)thisObj.background.style.zIndex=thisObj.dragObj.style.zIndex-1}thisObj.onMouseMoveF(event,thisObj)};popupWindow.prototype.onMouseUpF=function(event,thisObj){thisObj.docBody.ondragstart=null;thisObj.docBody.onselectstart=null;if(thisObj.dragapproved==true)thisObj.dragapproved=false};popupWindow.prototype.onMouseMoveF=function(event,thisObj){if((typeof event==\"undefined\")||(event==null))event=window.event;var x=0;var y=0;if(thisObj.dragapproved==true){x=parseInt(thisObj.dragObj.style.left);if(isNaN(x))x=thisObj.dragObj.offsetLeft;x-=(thisObj.posX-event.screenX);y=parseInt(thisObj.dragObj.style.top);if(isNaN(y))y=thisObj.dragObj.offsetTop;y-=(thisObj.posY-event.screenY);thisObj.dragObj.style.left=x+\"px\";thisObj.dragObj.style.top=y+\"px\";if(thisObj.background!=null){thisObj.background.style.left=x+\"px\";thisObj.background.style.top=y+\"px\"}try{thisObj.dragObj.style.right=\"auto\";thisObj.dragObj.style.bottom=\"auto\"}catch(e){};thisObj.posX=event.screenX;thisObj.posY=event.screenY;return false}};popupWindow.prototype.getDocument=function(obj){if(obj.contentDocument)return obj.contentDocument;else if(obj.contentWindow)return obj.contentWindow.document;else if(obj.document)return obj.document;return false};popupWindow.prototype.attachEventWithThis=function(target,eventName,handlerName){var thisObj=this;eval(\"target.\"+handlerName+\"= this.\"+handlerName);if(target.addEventListener){target.addEventListener(eventName,function(event,e){target[handlerName](event,thisObj)},false)}else if(target.attachEvent){target.attachEvent(\"on\"+eventName,function(event,e){target[handlerName](event,thisObj)})}else{var originalHandler=target[\"on\"+eventName];if(originalHandler)target[\"on\"+eventName]=function(event,e){originalHandler(event,thisObj);target[handlerName](event,thisObj)};else target[\"on\"+eventName]=target[handlerName]}};","truncated":"false"}
{"page":"http://www.6comic.com/","url":"http://www.sixcomic.com/js/xml.js","body":"//////////////////\r\n// Helper Funcs //\r\n//////////////////\r\n// used to find the Automation object name\r\n\r\nfunction LoadHtml(url,ele){ \r\nvar xh=window.Event?new XMLHttpRequest():new ActiveXObject(\"Microsoft.XMLHTTP\") ;\r\nxh.open(\"GET\",url,true) ;\r\nif(window.Event) \r\n{xh.overrideMimeType(\"text/xml;charset=gb2312\");}\r\n\r\nwindow.gb2utf8=function(data){ \r\nvar glbEncode=[],t,i,j,len ;gb2utf8_data=data;execScript(\"gb2utf8_data = MidB(gb2utf8_data, 1)+' '\", \"vbscript\");\r\nt=escape(gb2utf8_data).replace(/%u/g,\"\").replace(/(.{2})(.{2})/g,\"%$2%$1\").replace(/%([A-Z].)%(.{2})/g,\"@$1$2\");t=t.split(\"@\");i=0;len=t.length ;\r\nwhile(++i<len){j=t[i].substring(0,4);if(!glbEncode[j]){gb2utf8_char = eval(\"0x\"+j);execScript(\"gb2utf8_char=Chr(gb2utf8_char)\",\"vbscript\");glbEncode[j]=escape(gb2utf8_char).substring(1,6);} \r\nt[i]=glbEncode[j]+t[i].substring(4);} \r\ngb2utf8_data=gb2utf8_char=null;return unescape(t.join(\"%\")).slice(0,-1);\r\n} \r\nxh.onreadystatechange=function(){if(xh.readyState!=4) return;document.getElementById(ele).innerHTML=window.Event?xh.responseText:window.gb2utf8(xh.responseBody);} \r\n\r\nxh.send(null) \r\n} \r\n\r\n\r\nfunction GetHtml(url,ele)\r\n{\r\nvar xmlHttp = XmlHttpPool.pick();\t\r\nif(url.indexOf(\"?\")>=0) url+=\"&ran=\"+Math.random();else url+=\"?ran=\"+Math.random();\r\nxmlHttp.open(\"GET\", url, true); \r\nxmlHttp.send(null);\r\nxmlHttp.onreadystatechange = function(){if (xmlHttp.readyState == 4) \r\n{\r\n\tvar htm=typeof(xmlHttp.responseText)==\"undefined\"?\"&nbsp;\":xmlHttp.responseText;\r\n\tif(htm.indexOf(\"404\")>0 && htm.indexOf(\"javascript:history.back(1)\")>0) htm=\"\";\r\n\tif(ele==null) document.write(htm);else document.getElementById(ele).innerHTML= htm;\r\n\t//if(xmlHttp.responseText.indexOf(\"404\")>0 && xmlHttp.responseText.indexOf(\"javascript:history.back(1)\")>0) return \"\";\r\n\t//if(ele==null) document.write(xmlHttp.responseText);else document.getElementById(ele).innerHTML= typeof(xmlHttp.responseText)==\"undefined\"?\"&nbsp;\":xmlHttp.responseText;\r\n}\r\n}\r\n}\r\n\r\nfunction GetJS(url)\r\n{\r\nvar xmlHttp = XmlHttpPool.pick();\t\r\nif(url.indexOf(\"?\")>=0) url+=\"&ran=\"+Math.random();else url+=\"?ran=\"+Math.random();\r\nxmlHttp.open(\"GET\", url, true); \r\nxmlHttp.send(null);\r\nxmlHttp.onreadystatechange = function(){if (xmlHttp.readyState == 4)try{eval(xmlHttp.responseText);}catch(e){}}\r\n}\r\n\r\n\r\nfunction getDomDocumentPrefix() {\r\n\tif (getDomDocumentPrefix.prefix)\r\n\t\treturn getDomDocumentPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\r\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XML parser\");\r\n}\r\n\r\nfunction getXmlHttpPrefix() {\r\n\tif (getXmlHttpPrefix.prefix)\r\n\t\treturn getXmlHttpPrefix.prefix;\r\n\t\r\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\r\n\tvar o;\r\n\tfor (var i = 0; i < prefixes.length; i++) {\r\n\t\ttry {\r\n\t\t\t// try to create the objects\r\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\r\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\r\n\t\t}\r\n\t\tcatch (ex) {};\r\n\t}\r\n\t\r\n\tthrow new Error(\"Could not find an installed XMLHttp object\");\r\n}\r\n\r\n\r\n//////////////////////////\r\n// Start the Real Funcs //\r\n//////////////////////////\r\n\r\n// XmlHttp factory\r\nfunction XmlHttp() {}\r\n\r\nXmlHttp.create = function () {\r\n\ttry {\r\n\t\t// NS & MOZ\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\tvar req = new XMLHttpRequest();\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (req.readyState == null) {\r\n\t\t\t\treq.readyState = 1;\r\n\t\t\t\treq.addEventListener(\"load\", function () {\r\n\t\t\t\t\treq.readyState = 4;\r\n\t\t\t\t\tif (typeof req.onreadystatechange == \"function\")\r\n\t\t\t\t\t\treq.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn req;\r\n\t\t}\r\n\t\t// IE\r\n\t\tif (window.ActiveXObject) {\r\n\t\t\treturn new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\r\n\t\t}\r\n\t}\r\n\tcatch (ex) {}\r\n\t// Fail\r\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\r\n};\r\n\r\n// XmlDocument factory\r\nfunction XmlDocument() {}\r\n\r\nXmlDocument.create = function () {\r\n\ttry {\r\n\t\t// DOM2, MOZ & NS\r\n\t\tif (document.implementation && document.implementation.createDocument) {\r\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\r\n\t\t\t\r\n\t\t\t// some versions of Moz do not support the readyState property\r\n\t\t\t// and the onreadystate event so we patch it!\r\n\t\t\tif (doc.readyState == null) {\r\n\t\t\t\tdoc.readyState = 1;\r\n\t\t\t\tdoc.addEventListener(\"load\", function () {\r\n\t\t\t\t\tdoc.readyState = 4;\r\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\r\n\t\t\t\t\t\tdoc.onreadystatechange();\r\n\t\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn doc;\r\n\t\t}\r\n\t\tif (window.ActiveXObject)\r\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\r\n\t}\r\n\tcatch (ex) {}\r\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\r\n};\r\n\r\n// Create the loadXML method and xml getter for Mozilla\r\nif (window.DOMParser &&\r\n\twindow.XMLSerializer &&\r\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\r\n\r\n\t// XMLDocument did not extend the Document interface in some versions\r\n\t// of Mozilla. Extend both!\r\n\t//XMLDocument.prototype.loadXML = \r\n\tDocument.prototype.loadXML = function (s) {\r\n\t\t\r\n\t\t// parse the string to a new doc\t\r\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\r\n\t\t\r\n\t\t// remove all initial children\r\n\t\twhile (this.hasChildNodes())\r\n\t\t\tthis.removeChild(this.lastChild);\r\n\t\t\t\r\n\t\t// insert and import nodes\r\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\r\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\r\n\t\t}\r\n\t};\r\n\t\r\n\t\r\n\t/*\r\n\t * xml getter\r\n\t *\r\n\t * This serializes the DOM tree to an XML String\r\n\t *\r\n\t * Usage: var sXml = oNode.xml\r\n\t *\r\n\t */\r\n\tDocument.prototype.__defineGetter__(\"xml\", function () {\r\n\t\treturn (new XMLSerializer()).serializeToString(this);\r\n\t});\r\n}\r\n\r\n/*\r\n * xmlHttp Pool\r\n * \r\n * userage: var xmlhttpObj = XmlHttpPool.pick()\r\n */\r\nvar XmlHttpPoolArr = new Array();\r\nvar XmlHttpPoolSize = 100;\r\nvar XHPCurrentAvailableID = 0;\r\n\r\nfunction XmlHttpPool() {}\r\n\r\nXmlHttpPool.pick = function() {\r\n\tvar pos = XHPCurrentAvailableID;\r\n\tXmlHttpPoolArr[pos] = XmlHttp.create();\r\n\t\r\n\tXHPCurrentAvailableID >= (XmlHttpPoolSize-1) ? 0 : XHPCurrentAvailableID++\r\n\t\r\n\treturn XmlHttpPoolArr[pos];\r\n}\r\n\r\n\r\n\r\n\r\nvar selectrow=-1;\r\nvar totalrow=0;\r\nfunction startsearch(obj){\r\n\r\nif(totalrow>0 && (event.keyCode==37 ||event.keyCode==39) ) {stopsearch();return;}\r\nif(totalrow>0 && (event.keyCode==38 || event.keyCode==40))\r\n{\r\nfor(i=0;i<totalrow;i++)document.getElementById('qtr'+i).style.backgroundColor='';\r\nif(event.keyCode==38) {if(selectrow>0) selectrow--;if(selectrow==-1) selectrow=totalrow-1;\r\n\tdocument.getElementById('qtr'+selectrow).style.backgroundColor='#E0F4FF'; \r\n\tdocument.getElementById('k').value=document.getElementById('qtd'+selectrow).innerHTML.replace(\"<FONT color=red>\",\"\").replace(\"</FONT>\",\"\");;\r\n\t}\r\nif(event.keyCode==40) {if(selectrow<totalrow-1) selectrow++;\r\n\tdocument.getElementById('qtr'+selectrow).style.backgroundColor='#E0F4FF';\r\n\tdocument.getElementById('k').value=document.getElementById('qtd'+selectrow).innerHTML.replace(\"<FONT color=red>\",\"\").replace(\"</FONT>\",\"\");;\r\n\t}\r\nreturn;\r\n}\t\r\n\t\r\n\t\r\n\t\r\n\t\r\nvar k=obj.value;\r\nvar w=obj.style.width;\r\nif(w.indexOf(\"px\")>0) w=(w.substring(0,w.length-2))*1-1;\r\nif(k==\"\") {stopsearch();return;}\r\nvar u=\"/data/quicksearchjs.aspx?r=\"+Math.random()+\"&t=item&o=id&k=\"+k;\r\n\r\nvar xx = XmlHttpPool.pick();\t\r\nvar tx=\"\";\r\nxx.open(\"GET\", u, true); \r\nxx.send(null);\r\nxx.onreadystatechange = function(){if (xx.readyState == 4){\r\nif(xx.responseText==\"\") {stopsearch();return;}\r\nvar tt=xx.responseText.split('|');\r\n\r\ntotalrow=tt.length;\r\nvar html=\"<table width=\"+w+\" id=searchtb bgcolor=#FFFFFF style='border:solid 1px #aaaaaa;'>\";\r\nfor(i=0;i<tt.length;i++){html+=\"<tr id=\\\"qtr\"+i+\"\\\" onmouseover=\\\"this.style.backgroundColor='#E0F4FF';selectrow=\"+i+\";document.getElementById('\"+obj.id+\"').value='\"+tt[i].split(\" \")[0]+\"'\\\" onmouseout=this.style.backgroundColor='' onclick=\\\"document.getElementById('k').value='\"+tt[i].split(\" \")[0]+\"'\\\"><td id=\\\"qtd\"+i+\"\\\">\"+tt[i].split(\" \")[0].replace(eval(\"/^\"+k+\"/gi\"),\"<font color=red>\"+k+\"</font>\")+\"</td></tr>\";}\r\nhtml+=\"</table>\";\r\ndocument.getElementById('quicksearch').innerHTML=html;\r\ndocument.getElementById('quicksearch').style.display='';\r\ndocument.getElementById('quicksearch').style.top=gety(obj)+20;\r\ndocument.getElementById(\"quicksearch\").style.left=getx(obj);\r\n//document.getElementById('searchtb').width=obj.style.width;\r\n\r\n}}\r\n\r\n}\r\n\r\nfunction stopsearch(){\r\ntotalrow=0;\r\ndocument.getElementById('quicksearch').innerHTML='';\r\ndocument.getElementById('quicksearch').style.display='none';\r\nselectrow=-1;\r\n\t}","truncated":"false"}
{"page":"http://www.newsexpressngr.com/","url":"http://www.newsexpressngr.com/includes/common/js/utility.js","body":"/*\n * ADOBE SYSTEMS INCORPORATED\n * Copyright 2007 Adobe Systems Incorporated\n * All Rights Reserved\n * \n * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the \n * terms of the Adobe license agreement accompanying it. If you have received this file from a \n * source other than Adobe, then your use, modification, or distribution of it requires the prior \n * written permission of Adobe.\n */\n\n// Copyright 2001-2005 Interakt Online. All rights reserved.\nvar is = new BrowserCheck();\n\nif (typeof utility == 'undefined') utility = {};\n/*\nutility = {\n\t'math': {},\n\t'string': {}, \n\t'js': {}, \n\t'debug': {}, \n\t'url': {},\n\t'dom': {},\n\t'window': {}, \n\t'cookie': {}, \n\t'date': {}, \n\t'req': {}, \n\t'xml': {}\n};\n*/\n\nObject_weave_safe(utility, {math: {}});\n\nutility.math.intbgr2hexrgb = function(a) {\n\td2h = utility.math.dec2hex;\n\tpad = utility.math.zeroPad;\n\t// on mozilla will report rgb(a, b, c) - so the following is not good\n\treturn \"#\" + pad(d2h(a % 256), 2) + pad(d2h((a / 256) % 256), 2) + pad(d2h((a / 65536) % 256), 2);\n}\n\nutility.math.mozcolor2rgb = function(color) {\n\treturn color;\n}\n\nutility.math.dec2hex = function(x) {\n\treturn Number(parseInt(x)).toString(16);\n}\n\nutility.math.hex2dec = function(x) {\n\treturn parseInt(x, 16);\n}\n\nutility.math.zeroPad = function (str, length) {\n\tif (!str) str = \"\";\n\tstr = str.toString();\n\twhile (str.length < length) {\n\t\tstr = \"0\" + str;\n\t}\n\treturn str;\n}\nutility.math.rgb2hexcolor = function(color) {\n\tvar arr = [];\n\tif (arr = color.match(/^rgb\\(([0-9]+),\\s*([0-9]+),\\s*([0-9]+)\\)/i)) {\n\t\tvar ret = '';\n\t\tfor (var i = 1; i < 4; i++) {\n\t\t\tvar tmp = utility.math.dec2hex(arr[i]);\n\t\t\twhile (tmp.length < 2) {\n\t\t\t\ttmp = \"0\" + tmp;\n\t\t\t}\n\t\t\tret += tmp;\n\t\t}\n\t\treturn \"#\" + ret;\n\t} else {\n\t\treturn color;\n\t}\n}\n\nObject_weave_safe(utility, {js: {}});\n\nutility.js.build = function(fun1, fun2) {\n\tvar me = function() {\n\t\tif (fun2) { fun2(); }\n\t\tif (fun1) { fun1(); }\n\t}\n\treturn me;\n}\nutility.js.empty_func = function() {};\n\nObject_weave_safe(utility, {debug: {}});\n\nutility.debug.dump = function (obj, sep) {\n\tif (sep == undefined) {\n\t\tsep = '';\n\t}\n\ttm = \"\";\n\tif (typeof (obj) == \"object\") {\n\t\tfor (var i in obj) {\n\t\t\ttm += sep + i + \":{\\n\" + utility.debug.dump(obj[i], sep + ' ') + \"}\\n\";\n\t\t}\n\t\treturn tm;\n\t}\n\tif (typeof (obj) == \"function\") return sep + typeof (obj) + \"\\n\";\n\treturn sep + obj + \"\\n\";\n}\nfunction al(obj, rx) {\n\talert(utility.debug.dumpone(obj, rx));\n}\n\nutility.debug.dumpone = function (obj, rx, sep) {\n\tif (rx == undefined) {\n\t\trx = new RegExp(\"\", \"\");\n\t}\n\tif (sep == undefined) {\n\t\tsep = '';\n\t}\n\ttm = \"\";\n\tif (typeof (obj) == \"object\" && obj!=null) {\n\t\tif (typeof(obj.push) != \"undefined\" && obj.push.toString().indexOf(\"[native code]\")>0) {\n\t\t\ttm = sep + \"Array[\" + obj.length + \"]\\n\";\n\t\t} else {\n\t\t\tfor (i in obj) {\n\t\t\t\tif (i.toUpperCase() == i) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!rx.test(i)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif (typeof obj[i] != 'function') {\n\t\t\t\t\t\ttm += sep + i + \":{\" + obj[i] + \"}\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//tm += sep + i + \":{\\n js function }\\n\";\n\t\t\t\t\t}\n\t\t\t\t} catch(err){\n\t\t\t\t\ttm += sep + i + \":ERROR{\" + err.message + \"}\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tm;\n\t}\n\tif (typeof (obj) == \"function\") return sep + typeof (obj) + \"\\n\";\n\treturn sep + obj + \"\\n\";\n}\n\nutility.debug.breakpoint = function(evalFunc, msg, initialExprStr) { \n\tif (evalFunc == null) \n\t\tevalFunc = function(e){return eval(e)};\n if (msg == null)\n msg = \"\";\n var result = initialExprStr || \"1+2\";\n while (true) {\n var expr = prompt(\"BREAKPOINT: \" + msg + \"\\nEnter an expression to evaluate, or Cancel to continue.\", result); \n if (expr == null || expr == \"\")\n return;\n try {\n result = evalFunc(expr);\n } catch (e) {\n result = e;\n }\n }\n}\n\nObject_weave_safe(utility, {string: {}});\n\nutility.string.htmlspecialchars = function(str) {\n\tArray_each([\t['>', '&gt;'],\n\t\t['<', '&lt;'],\n\t\t['\\xA0', '&nbsp;'],\n\t\t['\"', '&quot;']\n\t], function(repl, idx) {\n\t\tstr = str.replace(new RegExp('['+repl[0]+']', \"g\"), repl[1]);\n\t});\n\treturn str;\n}\n\nutility.string.getInnerText = function(str) {\n\tif (typeof getInnerText_tmpDiv == 'undefined') {\n\t\tgetInnerText_tmpDiv = document.createElement('div');\n\t}\n\tvar oldstr = str;\n\ttry {\n\t\tgetInnerText_tmpDiv.innerHTML = str;\n\t\tif (is.safari) {\n\t\t\tstr = getInnerText_tmpDiv.innerHTML;\n\t\t\tgetInnerText_tmpDiv.innerHTML = \"\";\n\t\t} else {\n\t\t\tstr = getInnerText_tmpDiv.innerText;\n\t\t\tgetInnerText_tmpDiv.innerHTML = \"\";\n\t\t}\n\t} catch(e) { return oldstr; } \n\tif ( typeof str == 'undefined') {\n\t\treturn oldstr;\n\t}\n\treturn str;\n}\n\nutility.string.sprintf = function() {\n\tif (!arguments || arguments.length < 1 || !RegExp) {\n\t\treturn;\n\t}\n\tvar str = arguments[0];\n\tvar oldstr = arguments[0];\n\tvar re = /([^%]*)%('.|0|\\x20)?(-)?(\\d+)?(\\.\\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;\n\tvar a = b = [], numSubstitutions = 0, numMatches = 0;\n\twhile (a = re.exec(str)) {\n\t\tvar leftpart = a[1], pPad = a[2], pJustify = a[3], pMinLength = a[4];\n\t\tvar pPrecision = a[5], pType = a[6], rightPart = a[7];\n\t\tnumMatches++;\n\n\t\tif (pType == '%') {\n\t\t\tsubst = '%';\n\t\t} else {\n\t\t\tnumSubstitutions++;\n\t\t\tif (numSubstitutions >= arguments.length) {\n\t\t\t\treturn oldstr;\n\t\t\t}\n\t\t\tvar param = arguments[numSubstitutions];\n\t\t\tvar subst = param;\n\n\t\t\tif (pType == 'c') subst = String.fromCharCode(parseInt(param));\n\t\t\telse if (pType == 'd') subst = parseInt(param) ? parseInt(param) : 0;\n\t\t\telse if (pType == 's') subst = param;\n\t\t}\n\t\tstr = leftpart + subst + rightPart;\n\t}\n\treturn str;\n}\n\nObject_weave_safe(utility, {dom: {}});\n\nutility.dom.setUnselectable = function(el) {\n\tif (is.ie) {\n\t\tfor(var i=0; i<el.all.length; i++){\n\t\t\tif(el.all[i].tagName != \"INPUT\" && el.all[i].tagName != \"TEXTAREA\"){\n\t\t\t\tvar oldCurr = utility.dom.getStyleProperty(el.all[i], \"cursor\");\n\t\t\t\tel.all[i].unselectable = \"On\";\n\t\t\t\tif(oldCurr == \"auto\"){\n\t\t\t\t\tel.all[i].style.cursor = \"default\";\n\t\t\t\t}\n\t\t\t} else if(el.all[i].type == \"text\" || el.all[i].tagName == \"TEXTAREA\"){\n\t\t\t\tel.all[i].style.cursor = \"text\";\n\t\t\t}\n\t\t}\n\t} else {\n\t\tvar allChilds = utility.dom.getElementsByTagName(el,'*');\n\t\tArray_each(allChilds, function(child){\n\t\t\tvar oldCurr = utility.dom.getStyleProperty(child, \"cursor\");\n\t\t\tvar isHtmlEl = (child.nodeType == 1)? true: false;\n\t\t\tif(/*isHtmlEl*/true){\n\t\t\t\tvar isInput = ((child.nodeName.toLowerCase()==\"input\") && \n\t\t\t\t (child.getAttribute('type') && child.getAttribute('type').toLowerCase()=='text') ||\n\t\t\t\t (child.getAttribute('type') && child.getAttribute('type').toLowerCase()=='password'))? true: false;\n\t\t\t\tvar isTxtArea = (child.nodeName.toLowerCase()==\"textarea\")? true: false;\n\t\t\t\tif(!isInput && !isTxtArea ){\n\t\t\t\t\tif(oldCurr == \"auto\"){\n\t\t\t\t\t\tchild.style.cursor = \"default\";\n\t\t\t\t\t}\n\t\t\t\t\tvar hasHTMLChilds = utility.dom.getElementsByTagName(child, '*').length? true: false;\n\t\t\t\t\tif(!hasHTMLChilds){\n\t\t\t\t\t\tchild.style.MozUserSelect = 'none';\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tchild.style.cursor = \"text !important\";\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n};\n\n/**\n * utility.dom.getPixels\n * \treturns the value of a CSS property as Int, converting medium to 2\n * @param {DOMElement} m - elements\n * @param {String} s - \n */\nutility.dom.getPixels = function (m, s) {\n\tvar v = utility.dom.getStyleProperty(m, s);\n\tif (v == \"medium\") {\n\t\tv = 2;\n\t} else {\n\t\tv = parseInt(v, 10);\n\t}\n\tv = isNaN(v)?0:v;\n\treturn v;\n};\n\n\n/**\n * utility.dom.getBorderBox\n * \treturns a border box object (x,y,width,height) which perfectly covers the el element and its borders\n * \tthe x, y are absolute coordinates measured from from the window viewport\n * \tuse the box as the second parameter in utility.dom.setBorderBox\n * @param {DOMElement or String} el - \n * @param {DOMDocument,optional} doc - \n */\nutility.dom.getBorderBox = function (el, doc) {\n\tdoc = doc || document;\n\tif (typeof(el) == 'string') {\n\t\tel = doc.getElementById(el);\n\t}\n\n\tif (!el) {\n\t\treturn false;\n\t}\n\n\tif (el.parentNode === null || utility.dom.getStyleProperty(el, 'display') == 'none') {\n\t\t//element must be visible to have a box\n\t\treturn false;\n\t}\n\n\tvar ret = {x:0, y:0, width:0, height:0};\n\tvar parent = null;\n\tvar box;\n\n\tif (el.getBoundingClientRect) { // IE\n\t\tbox = el.getBoundingClientRect();\n\t\tvar scrollTop = doc.documentElement.scrollTop || doc.body.scrollTop;\n\t\tvar scrollLeft = doc.documentElement.scrollLeft || doc.body.scrollLeft;\n\t\tret.x = box.left + scrollLeft;\n\t\tret.y = box.top + scrollTop;\n\t\tret.width = box.right - box.left;\n\t\tret.height = box.bottom - box.top;\n\t} else if (doc.getBoxObjectFor) { // gecko\n\t\tbox = doc.getBoxObjectFor(el);\n\t\tret.x = box.x;\n\t\tret.y = box.y;\n\t\tret.width = box.width;\n\t\tret.height = box.height;\n\t\tvar btw = utility.dom.getPixels(el, \"border-top-width\");\n\t\tvar blw = utility.dom.getPixels(el, \"border-left-width\");\n\t\tret.x -= blw;\n\t\tret.y -= btw;\n\t} else { // safari/opera\n\t\tret.x = el.offsetLeft;\n\t\tret.y = el.offsetTop;\n\t\tret.width = el.offsetWidth;\n\t\tret.height = el.offsetHeight;\n\t\tparent = el.offsetParent;\n\t\tif (parent != el) {\n\t\t\twhile (parent) {\n\t\t\t\tret.x += parent.offsetLeft;\n\t\t\t\tret.y += parent.offsetTop;\n\t\t\t\tparent = parent.offsetParent;\n\t\t\t}\n\t\t}\n\t\tvar blw = utility.dom.getPixels(el, \"border-left-width\");\n\t\tvar btw = utility.dom.getPixels(el, \"border-top-width\");\n\t\tret.x -= blw;\n\t\tret.y -= btw;\n\t\t// opera & (safari absolute) incorrectly account for body offsetTop\n\t\tvar ua = navigator.userAgent.toLowerCase();\n\t\tif (is.opera || is.safari && utility.dom.getStyleProperty(el, 'position') == 'absolute') {\n\t\t\tret.y -= doc.body.offsetTop;\n\t\t}\n\t}\n\tif (el.parentNode) {\n\t\t\tparent = el.parentNode;\n\t} else {\n\t\tparent = null;\n\t}\n\twhile (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') {\n\t\tret.x -= parent.scrollLeft;\n\t\tret.y -= parent.scrollTop;\n\t\tif (parent.parentNode) {\n\t\t\tparent = parent.parentNode;\n\t\t}\telse {\n\t\t\tparent = null;\n\t\t}\n\t}\n\treturn ret;\n};\n\n/**\n * utility.dom.setBorderBox\n * \tputs the element el to the location specified by box\n * @param {DOMElement} el - the element to be placed\n * @param {Object} box - hash containing the x and y coordinates where to put el\n *\n */\nutility.dom.setBorderBox = function (el, box) {\n\tvar pos = utility.dom.getBorderBox(el, el.ownerDocument);\n\tif (pos === false) {\n\t\treturn false;\n\t}\n\n\tvar delta = {\n\t\tx:utility.dom.getPixels(el, 'left'),\n\t \ty:utility.dom.getPixels(el, 'top')\n\t};\n\n\tvar new_pos = {x:0, y:0};\n\tif (box.x !== null) {\n\t\tnew_pos.x = box.x - pos.x + delta.x;\n\t}\n\tif (box.y !== null) {\n\t\tnew_pos.y = box.y - pos.y + delta.y;\n\t}\n\n\tif (box.x !== null) {\n\t\tel.style.left = new_pos.x + 'px';\n\t}\n\tif (box.y !== null) {\n\t\tel.style.top = new_pos.y + 'px';\n\t}\n\treturn true;\n};\n\n/**\n * utility.dom.bringIntoView\n * \tset the position of the source element so it is completely visible in the window\n * @param {DOMElemenet} source - the element to be \n */\nutility.dom.bringIntoView = function (source) {\n\tvar box = utility.dom.getBorderBox(source, source.ownerDocument);\n\tif (box === false) {\n\t\treturn false;\n\t}\n\n\tvar current = {\n\t\tx:utility.dom.getPixels(source, 'left'),\n\t \ty:utility.dom.getPixels(source, 'top')\n\t};\n\n\tvar delta = {x:0, y:0};\n\tvar offset_fix = {x:0, y:0};\n\tvar strictm = source.ownerDocument.compatMode == \"CSS1Compat\";\n\tvar doc = (is.ie && strictm || is.mozilla)?source.ownerDocument.documentElement:source.ownerDocument.body;\n\n \toffset_fix.x = utility.dom.getPixels(doc, 'border-left-width');\n \toffset_fix.y = utility.dom.getPixels(doc, 'border-top-width');\n\n\tvar st = doc.scrollTop;\n\tvar ch = doc.clientHeight;\n\tvar t = box.y + (is.ie?-offset_fix.y:offset_fix.y);\n\tvar b = box.y + box.height + (is.ie?-offset_fix.y:offset_fix.y);\n\n\tif ( b - st > ch) {\n\t\tdelta.y = ch - (b - st);\n\t\tif (t + delta.y < st) {\n\t\t\tdelta.y = st-t;\n\t\t}\n\t} else if (t < st) {\n\t\tdelta.y = st - t;\n\t}\n\n\tif (delta.y != 0) {\n\t\tsource.style.top = (current.y + delta.y) + 'px';\n\t}\n\t\n\tvar sl = doc.scrollLeft;\n\tvar cw = doc.clientWidth;\n\tvar l = box.x + (is.ie?-offset_fix.x:offset_fix.x);\n\tvar r = box.x + box.width + (is.ie?-offset_fix.x:offset_fix.x);\n\n\tif ( r - sl > cw) {\n\t\tdelta.x = cw - (r - sl);\n\t\tif (l + delta.x < sl) {\n\t\t\tdelta.x = sl-l;\n\t\t}\n\t} else if (l < sl) {\n\t\tdelta.x = sl - l;\n\t}\n\n\tif (delta.x != 0) {\n\t\tsource.style.left = (current.x + delta.x) + 'px';\n\t}\n};\n\n/**\n * utility.dom.putElementAt\n * \tplace an element over another element, at a specified special location (corner over corner)\n * @param {DOMElement} source \n * @param {DOMElement} target \n * @param {String} relative - string specifiing the position of source relative to target [0-4]{2}\n * \t'03' - means put source corner 0 over target corner 3, ie:dropdown menu opens below opener button\n * \t0-NW, 1-NE, 2-SE, 3-SW, 4-N (top-center), 5-E (middle-right), 6-S, 7-W, 8-center :)\n * @param {Object} offset - optional, offset.x and offset.y specifies additional amount \n * @param {Object} biv - optional, offset.x and offset.y specifies additional amount \n */\n\nutility.dom.putElementAt = function (source, target, relative, offset, biv) {\n\toffset = util_defaultValue(offset, {x:0, y:0});\n\tbiv = util_defaultValue(biv, true);\n\tvar si = parseInt(relative.charAt(0), 10);\n\tvar ti = parseInt(relative.charAt(1), 10);\n\n\tvar source_box = utility.dom.getBorderBox(source, source.ownerDocument);\n\tvar target_box = utility.dom.getBorderBox(target, target.ownerDocument);\n\n\tvar sx = ['0', '-source_box.width', '-source_box.width', '0','-source_box.width/2', '-source_box.width','-source_box.width/2', '0','-source_box.width/2'];\n\tvar tx = ['target_box.x', 'target_box.x+target_box.width', 'target_box.x+target_box.width', 'target_box.x', 'target_box.x+target_box.width/2', 'target_box.x+target_box.width', 'target_box.x+target_box.width/2', 'target_box.x', 'target_box.x+target_box.width/2'];\n\n\tvar sy = ['0', '0', '-source_box.height', '-source_box.height', '0', '-source_box.height/2', '-source_box.height', '-source_box.height/2', '-source_box.height/2'];\n\tvar ty = ['target_box.y', 'target_box.y', 'target_box.y+target_box.height', 'target_box.y+target_box.height', 'target_box.y', 'target_box.y+target_box.height/2', 'target_box.y+target_box.height', 'target_box.y+target_box.height/2', 'target_box.y+target_box.height/2'];\n\n\tvar box = {x:0, y:0};\n\tbox.x = eval(sx[si] + ' + ' + tx[ti]) + offset.x;\n\tbox.y = eval(sy[si] + ' + ' + ty[ti]) + offset.y;\n\n\tutility.dom.setBorderBox(source, box);\n\tif (biv) {\n\t\tutility.dom.bringIntoView(source);\n\t}\n\treturn true;\n};\n\n\nutility.dom.put = function(el, left, top) {\n\tel.style.left = left + 'px';\n\tel.style.top = top + 'px';\n}\n\nutility.dom.resize = function(el, width, height) {\n\tel.style.width = width + 'px';\n\tel.style.height = height + 'px';\n}\n\nutility.dom.focusElem =function(elem) {\n\tvar d;\n\td = this.getElem(elem);\n\tif (!d) return;\n\tif (d.focus) d.focus();\n}\n\nutility.dom.hideElem = function(elem) {\n\tthis.setCssProperty(elem, \"display\", \"none\");\n}\n\nutility.dom.showElem = function(elem, force) {\n\tvar tag_display = {\n\t\ttable: 'table',\n\t\ttr: 'table-row',\n\t\ttd: 'table-cell'\n\t}\n\telem = utility.dom.getElem(elem);\n\tvar tn = elem.tagName.toLowerCase();\n\tvar t;\n\tif (!force) {\n\t\tif (typeof tag_display[tn] != 'undefined') {\n\t\t\tt = tag_display[tn];\n\t\t} else {\n\t\t\tt = \"block\";\n\t\t}\n\t} else {\n\t\tt = 'force';\n\t}\n\ttry {\n\t\tthis.setCssProperty(elem, \"display\", t);\n\t} catch(e) {\n\t\t// default to block if first try doesn't work\n\t\t// this happens on explorer when trying to set table-row and friends\n\t\tthis.setCssProperty(elem, \"display\", \"block\");\n\t}\n}\n\n// because we can't find out on the first call the real state, we assume the element is hidden\nutility.dom.toggleElem = function(elem, force) {\n\telem = utility.dom.getElem(elem);\n\ttry {\n\t\tif (!elem.style.display || elem.style.display == 'none') {\n\t\t\tutility.dom.showElem(elem, force);\n\t\t} else {\n\t\t\tutility.dom.hideElem(elem);\n\t\t}\n\t} catch(e) { }\n}\n\n// select the option that has the given value\nutility.dom.selectOption = function(sel, val) {\n\tvar i;\n\tif (!sel) return;\n\tfor (i=0; i<sel.options.length; i++) {\n\t\tsel.options[i].removeAttribute('selected');\n\t}\n\tfor (i=0; i<sel.options.length; i++) {\n\t\tif (sel.options[i].value == val) {\n\t\t\tsel.options[i].setAttribute('selected','selected');\n\t\t\tsel.options[i].selected = true;\n\t\t\treturn;\n\t\t} else {\n\t\t\tsel.options[i].removeAttribute('selected');\n\t\t}\n\t}\n}\n\n// get value of the selected option\nutility.dom.getSelected = function(sel) {\n\treturn sel.options[sel.selectedIndex].value;\n}\n\n\n\nutility.dom.getPositionRelativeTo00 = function(x, y, w, h) {\n\tvar bw, bh, sw, sh, d;\n\tif (is.mozilla) {\n\t\tbw = document.width;\n\t\tbh = document.height;\n\t\tsw = window.pageXOffset;\n\t\tsh = window.pageYOffset;\n\t} else {\n\t\tvar strictm = document.compatMode == \"CSS1Compat\";\n\t\n\t\td = strictm?document.documentElement:document.body;\n\t\tbw = d.offsetWidth - 20;\n\t\tbh = d.offsetHeight;\n\t\tsw = d.scrollLeft;\n\t\tsh = d.scrollTop;\n\t}\n\tif (x + w > bw + sw) {\n\t\tx = bw + sw - w;\n\t}\n\tif (y + h > bh + sh) {\n\t\ty = bh + sh - h;\n\t}\n\tif (x < 0) x = 0;\n\tif (y < 0) y = 0;\n\treturn { x: x, y: y };\n}\nutility.dom.setCssProperty = function(elem, name, value) {\n\tvar d;\n\t// sanity\n\tif (!elem || !name || !value) return;\n\td = this.getElem(elem);\n\tif (!d) return;\n\td.style[name] = value;\n}\n\nutility.dom.getElem = function(elem) {\n\tvar d;\n\tif (typeof(elem) == \"string\") {\n\t\td = document.getElementById(elem);\n\t} else {\n\t\td = elem;\n\t}\n\treturn d;\n}\n\n// return \nutility.dom.getClassNames = function(o) {\n\to = utility.dom.getElem(o);\n\tif (!o) return false;\n\tvar className = typeof(o.className) == 'undefined'?'':o.className;\n\tvar cn = String_trim(String_normalize_space(className));\n\tif (cn == '') {\n\t\treturn [];\n\t}\n\treturn cn.split(\" \");\n}\n\nutility.dom.classNameAdd = function(obj, toadd) {\n\tvar cls = utility.dom.getClassNames(obj);\n\tif (typeof toadd == 'string') {\n\t\ttoadd = toadd.split(',');\n\t}\n\tArray_each(toadd, function(item, i){\n\t\tif (Array_indexOf(cls, item) == -1) {\n\t\t\tArray_push(cls, item);\n\t\t}\n\t});\n\tcls = String_trim(cls.join(' '));\n\tvar className = typeof(obj.className) == 'undefined'?'':obj.className;\n\tif (String_trim(className) != cls) {\n\t\tobj.className = cls;\n\t}\n}\n\nutility.dom.classNameRemove = function(obj, toremove) {\n\tvar cls = utility.dom.getClassNames(obj);\n\tvar result = [];\n\t/* can't use ruby.js and all those nice things yet \n\t * since ie5 doesn't have .hasOwnProperty\n\tcls = cls.reject(function(item, i) {\n\t\treturn (item == str);\n\t});\n\t*/\n\tif (typeof toremove == 'string') {\n\t\ttoremove = toremove.split(',');\n\t}\n\tArray_each(cls, function(item, i){\n\t\tif (Array_indexOf(toremove, item) == -1) {\n\t\t\tArray_push(result, item);\n\t\t}\n\t});\n\t\n\tcls = String_trim(result.join(' '));\n\tvar className = typeof(obj.className) == 'undefined'?'':obj.className;\n\tif (String_trim(className) != cls) {\n\t\tobj.className = cls;\n\t}\n}\n\nutility.dom.insertAfter = function(newElement, targetElement) {\n\tvar sibling = targetElement.nextSibling\n\tvar parent = targetElement.parentNode;\n\tif (sibling == null) {\n\t\tvar toret = parent.appendChild(newElement);\n\t} else {\n\t\tvar toret = parent.insertBefore(newElement, sibling);\n\t}\n\treturn toret;\n}\n\nutility.dom.getPreviousSiblingByTagName = function(t, siblingName, allowSameTag) {\n\tif ((t.nodeName.toLowerCase()==siblingName.toLowerCase()) && !allowSameTag) {\n\t\treturn t;\n\t}\n\n\twhile (t.previousSibling\n\t\t\t&& t.previousSibling.nodeName.toLowerCase() != siblingName.toLowerCase()\n\t\t\t) {\n\t\tt = t.previousSibling;\n\t}\n\n\tif (t.previousSibling && t.previousSibling.nodeName.toLowerCase() == siblingName.toLowerCase()) {\n\t\treturn t.previousSibling;\n\t} else {\n\t\treturn null;\n\t}\n}\n\nutility.dom.getNextSiblingByTagName = function(t, siblingName, allowSameTag) {\n\tif ((t.nodeName.toLowerCase()==siblingName.toLowerCase()) && !allowSameTag) {\n\t\treturn t;\n\t}\n\n\twhile (t.nextSibling\n\t\t\t&& t.nextSibling.nodeName.toLowerCase() != siblingName.toLowerCase()\n\t\t\t) {\n\t\tt = t.nextSibling;\n\t}\n\n\tif (t.nextSibling && t.nextSibling.nodeName.toLowerCase() == siblingName.toLowerCase()) {\n\t\treturn t.nextSibling;\n\t} else {\n\t\treturn null;\n\t}\n}\n\n\nutility.dom.getParentByTagName = function(t, parentName) {\n\tif (t.nodeName.toLowerCase() == parentName.toLowerCase()) {\n\t\treturn t;\n\t}\n\n\twhile (t.parentNode\n\t\t\t&& t.parentNode.nodeName.toLowerCase() != parentName.toLowerCase()\n\t\t\t&& t.parentNode.nodeName != 'BODY') {\n\t\tt = t.parentNode;\n\t}\n\n\tif (t.parentNode && t.parentNode.nodeName.toLowerCase() == parentName.toLowerCase()) {\n\t\treturn t.parentNode;\n\t} else {\n\t\treturn null;\n\t}\n}\n\n// should refactor this to take the tagname as a list or array of tagnames\n// TODO : parameter order\nutility.dom.getElementsByTagName = function(o, sTagName) {\n\tvar el;\n\tif (typeof o == 'undefined') {\n\t\to = document;\n\t} else {\n\t\to = utility.dom.getElem(o);\n\t}\n\n\tif (sTagName == '*' || typeof sTagName == 'undefined') {\n\t\tel = utility.dom.getAllChildren(o);\n\t} else {\n\t\tel = o.getElementsByTagName(sTagName.toLowerCase());\n\t}\n\treturn el;\n}\n\n// actually, this should be a front for a more generic method that gets elements filtered by an attribute\n// or, we should try to use more of ruby.js to make this things easier to do (include Enumerable)\nutility.dom.getElementsByClassName = function(o, sClassName, sTagName) {\n\tvar elements = [];\n\tArray_each(utility.dom.getElementsByTagName(o, sTagName), function(elem, i) {\n\t\tif (Array_indexOf(utility.dom.getClassNames(elem), sClassName) != -1) { \n\t\t\tArray_push(elements, elem);\n\t\t}\n\t});\n\treturn elements;\n}\n\nutility.dom.getElementById = function(o, sId, sTagName) {\n\tvar elements = [];\n\tArray_each(utility.dom.getElementsByTagName(o, sTagName), function(elem, i) {\n\t\tif (typeof elem.id != \"undefined\" && elem.id != null && elem.id.toString() == sId) { \n\t\t\tArray_push(elements, elem);\n\t\t}\n\t});\n\treturn elements;\n}\n\nutility.dom.getElementsByProps = function(start, props_hash) {\n\tvar unfiltered, toret = [];\n\tif (typeof(start) == 'undefined') {\n\t\tstart = document;\n\t} else {\n\t\tstart = utility.dom.getElem(o);\n\t}\n\tif (o.all) {\n\t\tunfiltered = o.all;\n\t} else {\n\t\tunfiltered = o.getElementsByTagName('*');\n\t}\n\t//unfiltered.each = Array.prototype.each;\n\tArray_each(unfiltered, function(item) {\n\t\tvar cond = true;\n\t\tfor (i in props_hash) {\n\t\t\ttry {\n\t\t\t\tvar value = item[i];\n\t\t\t} catch(e) { value = null; }\n\t\t\tcond = cond && (value == props_hash[i]);\n\t\t}\n\t\tif (cond) {\n\t\t\tArray_push(toret, item);\n\t\t}\n\t});\n\treturn toret;\n}\n\n// get all children of elem that have the \"tag\" tagName\nutility.dom.getChildrenByTagName = function(elem, tag) {\n\tvar result = [];\n\tvar x;\n\tif (typeof(tag) == 'undefined') tag = '*';\n\ttag = tag.toLowerCase();\n\tif (!elem.childNodes) return result;\n\tfor (var i=0; i<elem.childNodes.length; i++) {\n\t\tx = elem.childNodes[i];\n\t\ttry {\n\t\t\tif (\n\t\t\t\t(typeof(x) != 'undefined' && \n\t\t\t\ttypeof(x.tagName) != 'undefined' && \n\t\t\t\tx.tagName.toLowerCase() == tag) || tag == '*'\n\t\t\t\t\n\t\t\t) {\n\t\t\t\tArray_push(result, x);\n\t\t\t}\n\t\t} catch(e) { \n\t\t\t// nick the error \n\t\t}\n\t}\n\treturn result;\n}\n\n// get all children of elem that have the class \"sClassName\"\n// sTagName is optional, defaults to *\nutility.dom.getChildrenByClassName = function(elem, sClassName, sTagName) {\n\tvar result = [];\n\tresult = Array_each(utility.dom.getChildrenByTagName(sTagName), function(elem, i) {\n\t\tif (Array_indexOf(utility.dom.getClassNames(item), sClassName) != -1) { \n\t\t\tArray_push(result, elem);\n\t\t}\n\t});\n}\n\nutility.dom.getAllChildren = function(e) {\n\t// Returns all children of element. Workaround required for IE5/Windows. Ugh.\n\treturn e.all ? e.all : e.getElementsByTagName('*');\n}\n\nutility.dom.getElementsBySelector = function(selector, startfrom) {\n\tif (typeof startfrom == 'undefined') {\n\t\tstartfrom = document;\n\t}\n\n\tif (!document.getElementsByTagName) {\n\t\treturn [];\n\t}\n\t// Split selector in to tokens\n\tvar tokens = selector.split(' ');\n\tvar currentContext = new Array(startfrom);\n\tfor (var i = 0; i < tokens.length; i++) {\n\t\ttoken = tokens[i].replace(/^\\s+/,'').replace(/\\s+$/,'');\n\t\tif (token.indexOf('#') > -1) {\n\t\t\t// Token is an ID selector\n\t\t\tvar bits = token.split('#');\n\t\t\tvar tagName = bits[0];\n\t\t\tvar id = bits[1];\n\t\t\tvar element = document.getElementById(id);\n\t\t\tif (element && tagName && element.nodeName.toLowerCase() != tagName) {\n\t\t\t\t// tag with that ID not found, return false\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\t// Set currentContext to contain just this element\n\t\t\tcurrentContext = new Array(element);\n\t\t\tcontinue; // Skip to next token\n\t\t}\n\t\tif (token.indexOf('.') > -1) {\n\t\t\t// Token contains a class selector\n\t\t\tvar bits = token.split('.');\n\t\t\tvar tagName = bits[0];\n\t\t\tvar className = bits[1];\n\t\t\tif (!tagName) {\n\t\t\t\ttagName = '*';\n\t\t\t}\n\t\t\t// Get elements matching tag, filter them for class selector\n\t\t\tvar found = new Array;\n\t\t\tvar foundCount = 0;\n\t\t\tfor (var h = 0; h < currentContext.length; h++) {\n\t\t\t\tvar elements;\n\t\t\t\tif (tagName == '*') {\n\t\t\t\t\telements = utility.dom.getAllChildren(currentContext[h]);\n\t\t\t\t} else {\n\t\t\t\t\telements = currentContext[h].getElementsByTagName(tagName);\n\t\t\t\t}\n\t\t\t\tfor (var j = 0; j < elements.length; j++) {\n\t\t\t\t found[foundCount++] = elements[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentContext = new Array;\n\t\t\tvar currentContextIndex = 0;\n\t\t\tfor (var k = 0; k < found.length; k++) {\n\t\t\t\tvar cclassName = typeof(found[k].className) == 'undefined'?'':found[k].className;\n\t\t\t\tif (cclassName && cclassName.match(new RegExp('\\\\b'+className+'\\\\b'))) {\n\t\t\t\t currentContext[currentContextIndex++] = found[k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue; // Skip to next token\n\t\t}\n\t\t// Code to deal with attribute selectors\n\t\tif (token.match(/^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?\"?([^\\]\"]*)\"?\\]$/)) {\n\t\t\tvar tagName = RegExp.$1;\n\t\t\tvar attrName = RegExp.$2;\n\t\t\tvar attrOperator = RegExp.$3;\n\t\t\tvar attrValue = RegExp.$4;\n\t\t\tif (!tagName) {\n\t\t\t\ttagName = '*';\n\t\t\t}\n\t\t\t// Grab all of the tagName elements within current context\n\t\t\tvar found = new Array;\n\t\t\tvar foundCount = 0;\n\t\t\tfor (var h = 0; h < currentContext.length; h++) {\n\t\t\t\tvar elements;\n\t\t\t\tif (tagName == '*') {\n\t\t\t\t\telements = utility.dom.getAllChildren(currentContext[h]);\n\t\t\t\t} else {\n\t\t\t\t\telements = currentContext[h].getElementsByTagName(tagName);\n\t\t\t\t}\n\t\t\t\tfor (var j = 0; j < elements.length; j++) {\n\t\t\t\t\tfound[foundCount++] = elements[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentContext = new Array;\n\t\t\tvar currentContextIndex = 0;\n\t\t\tvar checkFunction; // This function will be used to filter the elements\n\t\t\tswitch (attrOperator) {\n\t\t\t\tcase '=': // Equality\n\t\t\t\t\tcheckFunction = function(e) { try {return (e.getAttribute(attrName).toString() == attrValue);} catch(ex) { } };\n\t\t\t\tbreak;\n\t\t\t\tcase '~': // Match one of space seperated words \n\t\t\t\t\tcheckFunction = function(e) { try {return (e.getAttribute(attrName).toString().match(new RegExp(attrValue)));} catch(ex) { return false; } };\n\t\t\t\tbreak;\n\t\t\t\tcase '|': // Match start with value followed by optional hyphen\n\t\t\t\t\tcheckFunction = function(e) { return (e.getAttribute(attrName).toString().match(new RegExp('^'+attrValue+'-?'))); };\n\t\t\t\tbreak;\n\t\t\t\tcase '^': // Match starts with value\n\t\t\t\t\tcheckFunction = function(e) { return (e.getAttribute(attrName).toString().indexOf(attrValue) == 0); };\n\t\t\t\tbreak;\n\t\t\t\tcase '$': // Match ends with value - fails with \"Warning\" in Opera 7\n\t\t\t\t\tcheckFunction = function(e) { return (e.getAttribute(attrName).toString().lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); };\n\t\t\t\tbreak;\n\t\t\t\tcase '*': // Match ends with value\n\t\t\t\t\tcheckFunction = function(e) { return (e.getAttribute(attrName).toString().indexOf(attrValue) > -1); };\n\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t// Just test for existence of attribute\n\t\t\t\t\tcheckFunction = function(e) { return e.getAttribute(attrName); };\n\t\t\t}\n\t\t\tcurrentContext = new Array;\n\t\t\tvar currentContextIndex = 0;\n\t\t\tfor (var k = 0; k < found.length; k++) {\n\t\t\t\tif (checkFunction(found[k])) {\n\t\t\t\t\tcurrentContext[currentContextIndex++] = found[k];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);\n\t\t\tcontinue; // Skip to next token\n\t\t}\n\t\t// If we get here, token is JUST an element (not a class or ID selector)\n\t\ttagName = token;\n\t\tvar found = new Array;\n\t\tvar foundCount = 0;\n\t\tfor (var h = 0; h < currentContext.length; h++) {\n\t\t\tif (currentContext[h] != null) {\n\t\t\t\tvar elements = currentContext[h].getElementsByTagName(tagName);\n\t\t\t\tfor (var j = 0; j < elements.length; j++) {\n\t\t\t\t\tfound[foundCount++] = elements[j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentContext = found;\n\t}\n\treturn currentContext;\n}\n\nutility.dom.createForm = function(options, inputs, doc) {\n\tif (typeof options == 'undefined') options = {};\n\tif (typeof inputs == 'undefined') inputs = [];\n\tif (typeof doc == 'undefined') doc = document;\n\n\tvar default_options = {\n\t\tname: '', \n\t\tid: '', \n\t\taction: '',\n\t\tmethod: 'POST', // form method\n\t\ttarget: ''\n\t}\n\n\toptions = Object_weave_safe(options, default_options);\n\n\tvar frm = utility.dom.createElement( \"FORM\", {\n\t\tname: options.name, \n\t\tid: options.id, \n\t\taction: options.action, \n\t\tmethod: options.method, \n\t\tstyle: \"display: none\"\n\t});\n\n\tArray_each(inputs, function(input, i) {\n\t\tfrm.appendChild(utility.dom.createElement('INPUT', {\n\t\t\t'type': 'hidden', \n\t\t\t'id': input[0], \n\t\t\t'name': input[0], \n\t\t\t'value': input[1]\n\t\t}));\n\t});\n\n\tfrm = doc.body.appendChild(frm);\n\tfrm.target = options.target;\n\treturn frm;\n}\n\nutility.dom.createIframe = function(options, doc) {\n\tif (typeof options == 'undefined') options = {};\n\tif (typeof doc == 'undefined') doc = document;\n\n\tvar default_options = {\n\t\tname: '', \n\t\tid: '', \n\t\tsrc: options.src\n\t}\n\n\toptions = Object_weave_safe(options, default_options);\n\n\tif (is.mozilla) {\n\t\tvar ifr = utility.dom.createElement('iframe', {\n\t\t\t'id': options.id, \n\t\t\t'name': options.name, \n\t\t\t'style': 'display: none;'\n\t\t});\n\t\tifr.src = options.src;\n\t\tifr = doc.body.appendChild(ifr);\n\t\tifr.name = options.name;\n\t\tifr.id = options.id;\n\t} else if (is.ie) {\n\t\tvar str = '<iframe name=\"'+options.name+'\" src=\"' + options.src + '\" id=\"'+options.id+'\" style=\"display: none;\"></iframe>';\n\t\tvar dv = doc.createElement('div');\n\t\tdoc.body.appendChild(dv);\n\t\tdv.innerHTML = str;\n\t}\n\tvar ifr = doc.getElementById(options.id);\n\treturn ifr;\n}\n\nutility.dom.addIframeLoad = function(ifr, functor) {\n\tif (is.mozilla) {\n\t\tifr.onload = function() {\n\t\t\tfunctor();\n\t\t}\n\t} else {\n\t\tifr.onreadystatechange = function() {\n\t\t\tif (ifr.readyState == 'complete') {\n\t\t\t\tfunctor();\n\t\t\t}\n\t\t}\n\t}\n}\n\nutility.dom.removeIframeLoad = function(ifr) {\n\tif (is.ie) { ifr.onreadystatechange = function() { }; }\n\tif (is.mozilla) {ifr.onload = function() { }; }\n}\n\nutility.dom.buildUrl = function() {\n}\n\nutility.dom.stripAttributes = function(el, additional_arr) {\n\tvar cearElementProps = [\n\t\t'onload', 'data', 'onmouseover', 'onmouseout', 'onmousedown', \n\t\t'onmouseup', 'ondblclick', 'onclick', 'onselectstart', \n\t\t'oncontextmenu', 'onkeydown', 'onkeypress', 'onkeyup',\n\t\t'onblur', 'onfocus', 'onbeforedeactivate', 'onchange'];\n\tif (typeof el == 'undefined' || el == null) {\n\t\treturn true;\n\t}\n\tfor (var c = cearElementProps.length; c--; ) {\n\t\tel[cearElementProps[c]] = null;\n\t}\n\tif (typeof additional_arr != 'undefined') {\n\t\tfor (var c = additional_arr.length; c--; ) {\n\t\t\tel[additional_arr[c]] = null;\n\t\t}\n\t}\n}\n// use attachEvent for ie\nutility.dom.attachEvent2 = function(where, type, what, when) {\n\tutility.dom.attachEvent_base(where, type, what, when, 1);\n}\n// use on. for ie\nutility.dom.attachEvent = function(where, type, what, when) {\n\tutility.dom.attachEvent_base(where, type, what, when, 0);\n}\n\n// don't use attachEvent for ie since we can't get \n// to the element where the handler is added from the handler\nutility.dom.attachEvent_base = function(where, type, what, when, add_first) {\n\tif (typeof(when) == 'undefined') when = 1;\n\tvar doNotAdd = type.match(/unload$/i);\n\tvar real_type = type.match(/^on/) ? type : 'on' + type ;\n\tvar logical_type = type.replace(/^on/, '');\n\n\tif (typeof where.__eventHandlers == 'undefined') {\n\t\twhere.__eventHandlers = {};\n\t}\n\tvar place = null;\n\tif (typeof where.__eventHandlers[logical_type] == 'undefined') {\n\t\twhere.__eventHandlers[logical_type] = [];\n\t\tplace = where.__eventHandlers[logical_type];\n\n\t\tvar raiseEvent = function(e) {\n\t\t\tif (!e && window.event) {\n\t\t\t\te = window.event;\n\t\t\t}\n\t\t\tfor (var i=0;i < where.__eventHandlers[logical_type].length; i++) {\n\t\t\t\tvar f = where.__eventHandlers[logical_type][i];\n\t\t\t\tif (typeof f == 'function') {\n\t\t\t\t\tf.apply(where, [e]);\n\t\t\t\t\tf = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\tvar oldHandler = function() { };\n\t\tif (where[real_type] != null && \n\t\t\ttypeof where[real_type] != \"undefined\") {\n\t\t\toldHandler = where[real_type];\n\t\t\tplace[place.length] = oldHandler;\n\t\t\toldHandler = null;\n\t\t}\n\t\twhere[real_type] = null;\n\t\t*/\n\t\tif (where.addEventListener) {\n\t\t\twhere.addEventListener(logical_type, raiseEvent, false);\n\t\t}\n\t\telse if (where.attachEvent) {\n\t\t\twhere.attachEvent(\"on\" + logical_type, raiseEvent);\n\t\t}\n\t\telse {\n\t\t\twhere[\"on\" + logical_type] = raiseEvent;\n\t\t}\n\t\tif ( (! (is.ie && is.mac)) && !doNotAdd) {\n\t\t\tEventCache.add(where, logical_type, raiseEvent, 1);\n\t\t}\n\t} else {\n\t\tplace = where.__eventHandlers[logical_type];\n\t}\n\n\n\tfor (var i=0;i<place.length;i++) {\n\t\tif (place[i] == what) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t if (place[i] && what && place[i].toString() == what.toString()) {\n\t\t\t \treturn;\n\t\t\t }\n\t\t} catch(err) { }\n\t}\n\tplace[place.length] = what;\n\n\t// add the event\n}\n\nvar EventCache = function(){\n\tvar listEvents = [];\n\t\n\treturn {\n\t\tlistEvents : listEvents,\n\t\n\t\tadd : function(node, sEventName, fHandler, bCapture){\n\t\t\tArray_push(listEvents, arguments);\n\t\t},\n\t\n\t\tflush : function(){\n\t\t\tvar i, item;\n\t\t\tfor(i = listEvents.length - 1; i >= 0; i = i - 1){\n\t\t\t\titem = listEvents[i];\n\t\t\t\tif(!item) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(item[0].removeEventListener){\n\t\t\t\t\titem[0].removeEventListener(item[1], item[2], item[3]);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t/* From this point on we need the event names to be prefixed with 'on\" */\n\t\t\t\tvar logical_type = '';\n\t\t\t\tif(item[1].substring(0, 2) != \"on\") {\n\t\t\t\t\tlogical_type = item[1];\n\t\t\t\t\titem[1] = \"on\" + item[1];\n\t\t\t\t} else {\n\t\t\t\t\tlogical_type = item[1].substring(2, event_name_without_on.length);\n\t\t\t\t};\n\t\t\t\t//delete from __eventHandlers\n\t\t\t\tif (typeof item[0].__eventHandlers != 'undefined' && typeof item[0].__eventHandlers[logical_type] != 'undefined') {\n\t\t\t\t\titem[0].__eventHandlers[logical_type] = null;\n\t\t\t\t}\n\t\t\t\tif(item[0].detachEvent){\n\t\t\t\t\titem[0].detachEvent(item[1], item[2]);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\titem[0][item[1]] = null;\n\t\t\t};\n\t\t\tlistEvents = null;\n\t\t}\n\t};\n}();\n\n\nutility.dom.getStyleProperty = function(el, property) {\n\ttry{\n\t\tvar value = el.style[property];\n\t}catch(e) {\n\t\treturn \"\";\n\t}\n\tif (!value) {\n\t\tif (el.ownerDocument.defaultView && \n\t\t\ttypeof (el.ownerDocument.defaultView.getComputedStyle) == \"function\") { \n\t\t\t// moz, opera\n\t\t\tvalue = el.ownerDocument.defaultView.getComputedStyle(el, \"\").getPropertyValue(property);\n\t\t} else if (el.currentStyle) {\n\t\t\t// IE\n\t\t\tvar m = property.split(/-/);\n\t\t\tif (m.length>0) {\n\t\t\t\tproperty = m[0];\n\t\t\t\tfor(var i=1;i<m.length;i++) {\n\t\t\t\t\tproperty += m[i].charAt(0).toUpperCase() + m[i].substring(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = el.currentStyle[property];\n\t\t} else if (el.style) {\n\t\t\tvalue = el.style[property];\n\t\t}\n\t}\n\n\treturn value;\n}\n\nutility.dom.getLink = function(link) {\n\tif (!is.ie) {\n\t\thref = link.getAttribute('href');\n\t} else {\n\t\tif (!is.mac) {\n\t\t\thref = link.outerHTML.toString().replace(/.*href=\"([^\"]*)\".*/, \"$1\");\n\t\t} else {\n\t\t\thref = link.getAttribute('href');\n\t\t}\n\t}\n\treturn href;\n}\n\nutility.dom.getDisplay = function(el) {\n\treturn utility.dom.getStyleProperty(el, 'display');\n}\n\nutility.dom.getVisibility = function(el) {\n\treturn utility.dom.getStyleProperty(el, 'visibility');\n}\nvar first_getAbsolutePos_caller_element = null;\nutility.dom.getAbsolutePos = function(el) {\n\tvar scrollleft = 0, scrolltop = 0, tn = el.tagName.toUpperCase();\n\tif (utility.dom.getAbsolutePos.caller!=utility.dom.getAbsolutePos) {\n\t\t//do not substract the scrollLeft of the target element if you want to find it's left...\n\t\tfirst_getAbsolutePos_caller_element = el;\n\t}\n\tif (Array_indexOf(['BODY', 'HTML'], tn) == -1 && first_getAbsolutePos_caller_element!=el) { // ?\n\t\tif (el.scrollLeft) {\n\t\t\tscrollleft = el.scrollLeft;\n\t\t}\n\n\t\tif (el.scrollTop) {\n\t\t\tscrolltop = el.scrollTop;\n\t\t}\n\t}\n\n\tvar r = { x: el.offsetLeft - scrollleft, y: el.offsetTop - scrolltop };\n\n\tif (el.offsetParent && tn != 'BODY') {\n\t\tvar tmp = utility.dom.getAbsolutePos(el.offsetParent);\n\t\tr.x += tmp.x;\n\t\tr.y += tmp.y;\n\t}\n\n\treturn r;\n}\n\n/**\n*\tFF : stopping the onsubmit event seems to alter the event.type (accessing the property after stopping the event raise an error)\n*/\nutility.dom.setEventVars = function(e) {\n\tvar targ; var relTarg; var posx=0; var posy=0;\n\tif (!e){\n\t\te = window.event;\n\t}\n\tif (!e){\n\t\treturn {'e':null,'relTarg':null,'targ':null,'posx':0,'posy':0,'leftclick':false,'middleclick':false,'rightclick':false,'type':''};\n\t}\n\tif(e.relatedTarget) {\n\t\trelTarg = e.relatedTarget;\n\t} else if(e.fromElement) {\n\t\trelTarg = e.fromElement;\n\t}\n\n\tif(e.target) { \n\t\ttarg = e.target;\n\t} else if(e.srcElement) { \n\t\ttarg = e.srcElement;\n\t}\n\n\tvar st = utility.dom.getPageScroll();\n\tif (e.pageX || e.pageY) {\n\t\tposx = e.pageX;\n\t\tposy = e.pageY;\n\t} else if (e.clientX || e.clientY) {\n\t\tposx = e.clientX + st.x;\n\t\tposy = e.clientY + st.y;\n\t}\n\n\tif (window.event) {\n\t\tvar leftclick = (e.button == 1);\n\t\tvar middleclick = (e.button == 4);\n\t\tvar rightclick = (e.button == 2);\n\t} else {\n\t\tvar leftclick = (e.button == 0);\n\t\tvar middleclick = (e.button == 1);\n\t\tvar rightclick = (e.button == 2 || e.button == 0 && is.mac && e.ctrlKey);\n\t}\n\n\tvar o = {\n\t\t'e':e,'relTarg':relTarg,'targ':targ,'posx':posx,'posy':posy,'leftclick':leftclick,'middleclick':middleclick,'rightclick':rightclick\n\t}\n\ttry {\n\t\to.type = e.type;\n\t} catch (err) {\n\t\to.type = '';\n\t}\n\treturn o;\n}\n\nutility.dom.stopEvent = function(e) {\n\tif (typeof is == 'undefined') {\n\t\tis = new BrowserCheck();\n\t}\n\tif (typeof e != \"undefined\" && e!=null) {\n\t\tif(is.ie) {\n\t\t\te.cancelBubble = true;\n\t\t} \n\t\tif (e.stopPropagation) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif(is.ie) {\n\t\t\te.returnValue = false;\n\t\t}\n\t\tif (e.preventDefault) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\treturn false;\n}\n\nutility.dom.toggleSpecialTags = function(el, exclude, mode, documentObject, boxRecipient) {\n\t//var t1 = new Date();\n\tvar hide_tags = ['select'];\n\tif (mode==1) {\n\t\tvar boxObject = utility.dom.getBox(el);\n\t}\n\tfor (var i = 0; i < hide_tags.length; i++) {\n\t\tvar _document = null;\n\t\tif( documentObject && documentObject.nodeType && (documentObject.nodeType==9) ) {\n\t\t\t_document = documentObject;\n\t\t\tutility.dom.toggleSpecialTags._saved_DOC = documentObject;\n\t\t} else if ( documentObject && utility.dom.toggleSpecialTags._saved_DOC &&\n\t\t utility.dom.toggleSpecialTags._saved_DOC.nodeType &&\n\t\t (utility.dom.toggleSpecialTags._saved_DOC.nodeType==9) ) {\n\t\t\t_document = utility.dom.toggleSpecialTags._saved_DOC;\n\t\t} else {\n\t\t\t_document = document;\t\n\t\t};\n\t\tvar arr = _document.getElementsByTagName(hide_tags[i]);\n\t\tfor (var j = 0; j < arr.length; j++) {\n\t\t\tif (exclude == arr[j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (mode == 1) {\n\t\t\t\tvar cVisibility = utility.dom.getVisibility(arr[j]);\n\t\t\t\tvar cDisplay = utility.dom.getDisplay(arr[j]);\n\t\t\t\tif (cDisplay==\"none\" || cVisibility==\"hidden\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tvar boxSelect =\tutility.dom.getBox(arr[j]);\n\t\t\t\tif(boxRecipient){\n\t\t\t\t\tvar parentBox = utility.dom.getBox(boxRecipient);\n\t\t\t\t\tboxSelect.x += parentBox.x;\n\t\t\t\t\tboxSelect.y += parentBox.y;\n\t\t\t\t}\n\t\t\t\tvar overlap = utility.dom.boxOverlap(boxObject, boxSelect);\n\t\t\t\tif (overlap) {\n\t\t\t\t\tif(documentObject && boxRecipient){\n\t\t\t\t\t\tif(!arr[j].oldPosition){\n\t\t\t\t\t\t\tvar cPosition = utility.dom.getStyleProperty(arr[j], \"position\");\n\t\t\t\t\t\t\tarr[j].oldPosition = cPosition;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!arr[j].oldLeft){\n\t\t\t\t\t\t\tvar cLeft = utility.dom.getStyleProperty(arr[j], \"left\");\n\t\t\t\t\t\t\tarr[j].oldLeft = cLeft;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tarr[j].style.position = \"relative\";\n\t\t\t\t\t\tarr[j].style.left = \"-1000px\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(!arr[j].oldvisibility) {\n\t\t\t\t\t\t\tarr[j].oldvisibility = cVisibility;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarr[j].style.visibility = 'hidden';\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(documentObject && boxRecipient){\n\t\t\t\t\tif(arr[j].oldPosition){\n\t\t\t\t\t\tarr[j].style.position = arr[j].oldPosition;\n\t\t\t\t\t\tarr[j].removeAttribute(\"oldPosition\");\n\t\t\t\t\t\t}\n\t\t\t\t\tif(arr[j].oldLeft){\n\t\t\t\t\t\tarr[j].style.left = arr[j].oldLeft;\n\t\t\t\t\t\tarr[j].removeAttribute(\"oldLeft\");\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (arr[j].oldvisibility) {\n\t\t\t\t\t\tarr[j].style.visibility = arr[j].oldvisibility;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nutility.dom.boxOverlap = function(b1, b2) {\n\t//boxes do not overlap when b1:\n\t//is in the left of b2\n\t//or in the right of b2\n\t//or above b2\n\t//or below b2\n\n\tif( (b1.x+b1.width) < b2.x || b1.x > (b2.x+b2.width) ||\n\t\t(b1.y+b1.height) < b2.y || b1.y > (b2.y+b2.height) || false) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nutility.dom.getBox = function(el) {\n\tvar box = { \n\t\t\"x\": 0, \"y\": 0, \n\t\t\"width\": 0, \"height\": 0, \n\t\t\"scrollTop\": 0, \"scrollLeft\": 0 \n\t};\n\tvar strictm = el.ownerDocument.compatMode == \"CSS1Compat\";\n\tif (el.ownerDocument.getBoxObjectFor) {\n\t\tvar rect = el.ownerDocument.getBoxObjectFor(el);\n\t\tbox.x = rect.x - el.parentNode.scrollLeft;\n\t\tbox.y = rect.y - el.parentNode.scrollTop;\n\t\tbox.width = rect.width;\n\t\tbox.height = rect.height;\n\t\tbox.scrollLeft = (strictm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollLeft;\n\t\tbox.scrollTop = (strictm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollTop;\n\t} else if (el.getBoundingClientRect) {\n\t\tvar rect = el.getBoundingClientRect();\n\t\tbox.x = rect.left;\n\t\tbox.y = rect.top;\n\t\tbox.width = rect.right - rect.left;\n\t\tbox.height = rect.bottom - rect.top;\n\t\tbox.scrollLeft = 0; //el.document.body.scrollLeft;\n\t\tbox.scrollTop = 0; //el.document.body.scrollTop;\n\t} else {\n\t\tvar tmp = utility.dom.getAbsolutePos(el);\n\t\tbox.x = tmp.x - el.parentNode.scrollLeft;\n\t\tbox.y = tmp.y - el.parentNode.scrollTop;\n\t\tbox.width = parsetInt(utility.dom.getStyleProperty(el, 'width'), 10);\n\t\tbox.height = parsetInt(utility.dom.getStyleProperty(el, 'height'), 10);\n\t\tbox.scrollLeft = el.ownerDocument.body.scrollLeft;\n\t\tbox.scrollTop = el.ownerDocument.body.scrollTop;\n\t}\n\treturn box;\n}\n\nutility.dom.getBBox = function(el) {\n\tvar box = { \n\t\t\"x\": 0, \"y\": 0, \n\t\t\"width\": 0, \"height\": 0, \n\t\t\"scrollTop\": 0, \"scrollLeft\": 0 \n\t};\n\tvar strictm = el.ownerDocument.compatMode == \"CSS1Compat\";\n\tif (el.ownerDocument.getBoxObjectFor) {\n\t\tvar doc = strictm?el.ownerDocument.documentElement:document;\n\t\tvar bt = parseInt(utility.dom.getStyleProperty(el, \"border-top-width\"));\n\t\tvar bl = parseInt(utility.dom.getStyleProperty(el, \"border-left-width\"));\n\t\tvar br = parseInt(utility.dom.getStyleProperty(el, \"border-right-width\"));\n\t\tvar bb = parseInt(utility.dom.getStyleProperty(el, \"border-bottom-width\"));\n\n\t\tvar rect = el.ownerDocument.getBoxObjectFor(el);\n\t\tvar sl = 0;\n\t\tvar st = 0;\n\t\twhile(el.parentNode) {\n\t\t\tif (el.scrollTop) {\n\t\t\t\tst += el.scrollTop;\n\t\t\t}\n\t\t\tif (el.scrollLeft) {\n\t\t\t\tsl += el.scrollLeft;\n\t\t\t}\n\t\t\tel = el.parentNode;\n\t\t}\n\t\tbox.scrollLeft = sl;\n\t\tbox.scrollTop = st;\n\t\tbox.x = rect.x - bl - sl;\n\t\tbox.y = rect.y - bt - st;\n\t\tbox.width = rect.width;\n\t\tbox.height = rect.height;\n\t} else if (el.getBoundingClientRect) {\n//\tvar ss = '';\n//\tvar zel = el;\n//\tvar b = null;\n//\twhile(zel) {\n//\t\tb = zel.getBoundingClientRect()\n//\t\tss += zel.tagName+\"\\t\" + b.top + \"\\t\" + zel.scrollTop + \"\\r\\n\";\n//\t\tzel = zel.offsetParent;\n//\t}\n//\tal(ss);\n\t\tvar pel = strictm?el.ownerDocument.documentElement:document.body;//el.offsetParent;\n\t\tvar bt = parseInt(utility.dom.getStyleProperty(el, \"border-top-width\")) || 0;\n//\t\tvar br = parseInt(utility.dom.getStyleProperty(el, \"border-right-width\")) || 0;\n//\t\tvar bb = parseInt(utility.dom.getStyleProperty(el, \"border-bottom-width\")) || 0;\n\t\tvar bl = parseInt(utility.dom.getStyleProperty(el, \"border-left-width\")) || 0;\n\n//\t\tvar pbt = parseInt(utility.dom.getStyleProperty(pel, \"border-top-width\")) || 0;\n//\t\tvar pbr = parseInt(utility.dom.getStyleProperty(pel, \"border-right-width\")) || 0;\n//\t\tvar pbb = parseInt(utility.dom.getStyleProperty(pel, \"border-bottom-width\")) || 0;\n//\t\tvar pbl = parseInt(utility.dom.getStyleProperty(pel, \"border-left-width\")) || 0;\n\n\t\tvar rect = el.getBoundingClientRect();\n\t\t//al(rect);\n\t\tbox.x = rect.left - bl;\n\t\tbox.y = rect.top - bt;\n//\t\tbox.y = rect.top - pbt;\n//\t\tbox.x = rect.left - pbl;\n\t\tbox.width = rect.right - rect.left;\n\t\tbox.height = rect.bottom - rect.top;\n\t\tbox.scrollLeft = 0; //el.document.body.scrollLeft;\n\t\tbox.scrollTop = 0; //el.document.body.scrollTop;\n\t} else {\n\t\tvar pel = el.ownerDocument.documentElement;//el.offsetParent;\n\t\tvar mt = parseInt(utility.dom.getStyleProperty(pel, \"margin-top\"));\n\t\tvar ml = parseInt(utility.dom.getStyleProperty(pel, \"margin-left\"));\n\t\tvar bt = parseInt(utility.dom.getStyleProperty(pel, \"border-top-width\"));\n\t\tvar bl = parseInt(utility.dom.getStyleProperty(pel, \"border-left-width\"));\n\t\tvar pt = parseInt(utility.dom.getStyleProperty(pel, \"padding-top\"));\n\t\tvar pl = parseInt(utility.dom.getStyleProperty(pel, \"padding-left\"));\n\n\t\tpel = el.offsetParent;\n\t\tvar mt2 = parseInt(utility.dom.getStyleProperty(pel, \"margin-top\"));\n\t\tvar ml2 = parseInt(utility.dom.getStyleProperty(pel, \"margin-left\"));\n\t\tvar bt2 = 0;//parseInt(utility.dom.getStyleProperty(pel, \"border-top-width\"));\n\t\tvar bl2 = 0;//parseInt(utility.dom.getStyleProperty(pel, \"border-left-width\"));\n\t\tvar pt2 = 0;//parseInt(utility.dom.getStyleProperty(pel, \"padding-top\"));\n\t\tvar pl2 = 0;//parseInt(utility.dom.getStyleProperty(pel, \"padding-left\"));\n\n\t\tvar tmp = utility.dom.getAbsolutePos(el);\n\t\tbox.x = tmp.x;\n\t\tbox.y = tmp.y;\n\t\tbox.width = parseInt(utility.dom.getStyleProperty(el, 'width'));\n\t\tbox.height = parseInt(utility.dom.getStyleProperty(el, 'height'));\n\t\tbox.scrollLeft = el.ownerDocument.body.scrollLeft;\n\t\tbox.scrollTop = el.ownerDocument.body.scrollTop;\n\t\tif (is.opera) {\n\t\t\tbox.x -= (ml + bl + pl + ml2);\n\t\t\tbox.y -= mt + bt + pt + mt2;\n\t\t}\n\t}\n\treturn box;\n}\n\n// from quirksmode, fixed to properly differentiate between IE versions\nutility.dom.getPageInnerSize = function() {\n\tvar x, y;\n\tif (typeof self.innerHeight != \"undefined\") {\n\t\tx = self.innerWidth;\n\t\ty = self.innerHeight;\n\t} else if (typeof document.compatMode != 'undefined' && document.compatMode == 'CSS1Compat') {\n\t\tx = document.documentElement.clientWidth;\n\t\ty = document.documentElement.clientHeight;\n\t} else if (document.body) {\n\t\tx = document.body.clientWidth;\n\t\ty = document.body.clientHeight;\n\t}\n\treturn {x: x, y: y};\n}\n// from quirksmode, fixed to properly differentiate between IE versions\nutility.dom.getPageScroll = function() {\n\tvar x, y;\n\tif (typeof self.pageYOffset != 'undefined') {\n\t\tx = self.pageXOffset;\n\t\ty = self.pageYOffset;\n\t} else if (typeof document.compatMode != 'undefined' && document.compatMode == 'CSS1Compat') {\n\t\tx = document.documentElement.scrollLeft;\n\t\ty = document.documentElement.scrollTop;\n\t}\n\telse if (document.body) {\n\t\tx = document.body.scrollLeft;\n\t\ty = document.body.scrollTop;\n\t}\n\treturn {x: x, y: y};\n}\n\nutility.dom.createElement = function(type, attribs, wnd) {\n\tif (typeof is == 'undefined') {\n\t\tis = new BrowserCheck();\n\t}\n\tif (typeof wnd != 'undefined') {\n\t\tvar elem = wnd.document.createElement( type );\n\t} else {\n\t\tvar elem = document.createElement( type );\n\t}\n\tif ( typeof attribs != 'undefined' ) {\n\t\tfor (var i in attribs) {\n\t\t\tswitch ( true ) {\n\t\t\t\tcase ( i == 'text' ) : \n\t\t\t\t\telem.appendChild( document.createTextNode( attribs[i] ) ); \n\t\t\t\t\tbreak;\n\t\t\t\tcase ( i == 'class' ) : \n\t\t\t\t\telem.className = attribs[i]; \n\t\t\t\t\tbreak;\n\t\t\t\tcase ( i == 'id' ) : \n\t\t\t\t\telem.id = attribs[i]; \n\t\t\t\t\tbreak;\n\t\t\t\tcase ( i == 'type' ) : \n\t\t\t\t\tif (type.toLowerCase()==\"input\" && is.ie && is.mac) {\n\t\t\t\t\t\t//IE MAC cant set the type\n\t\t\t\t\t\tvar tspn = document.createElement(\"SPAN\");\n\t\t\t\t\t\tdocument.body.appendChild(tspn);\n\t\t\t\t\t\ttspn.style.display= \"none\";\n\t\t\t\t\t\ttspn.innerHTML = elem.outerHTML.replace(/<input/i, \"<input type=\\\"\"+attribs[i]+\"\\\"\");\n\t\t\t\t\t\telem = tspn.firstChild;\n\t\t\t\t\t\tdocument.body.removeChild(tspn);\n\t\t\t\t\t} else if (type.toLowerCase()==\"input\" && is.mac && is.safari) {\n\t\t\t\t\t\telem.setAttribute('type', attribs[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.type = attribs[i]; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ( i == 'style' ) : \n\t\t\t\t\telem.style.cssText = attribs[i]; \n\t\t\t\t\tbreak;\n\t\t\t\tdefault : \n\t\t\t\t\ttry{\n\t\t\t\t\t\telem.setAttribute(i, attribs[i] );\n\t\t\t\t\t\telem[i] = attribs[i];\n\t\t\t\t\t}catch(e) {}\n\t\t\t}\n\t\t}\n\t}\n\tif (attribs['value']) {\n\t\telem.value = attribs['value'];\n\t}\n\treturn elem;\t\n};\n\n\nutility.dom.getImports = function(s) {\n\t//var ss = document.styleSheets;\n\ttry {\n\t\tif (is.ie) {\n\t\t\treturn s.imports;\n\t\t} else {\n\t\t\tvar toret = [];\n\t\t\tfor (var i = 0; i < s.cssRules.length; i++) {\n\t\t\t\tif (is.safari) {\n\t\t\t\t\tif (typeof s.cssRules[i].href != 'undefined') {\n\t\t\t\t\t\tArray_push(toret, s.cssRules[i].styleSheet);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (s.cssRules[i].toString().match('CSSImportRule')) {\n\t\t\t\t\t\tArray_push(toret, s.cssRules[i].styleSheet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn toret;\n\t\t}\n\t} catch(e) { return []; }\n}\n\nutility.dom.getRuleBySelector = function(s, rx) {\n\ttry {\n\t\tvar koll = [];\n\t\tif (is.ie) {\n\t\t\tkoll = s.rules;\n\t\t} else {\n\t\t\tkoll = s.cssRules;\n\t\t}\n\t\tvar toret = [];\n\t\tfor (var i = 0; i < koll.length; i++) {\n\t\t\tvar rule = koll[i];\n\t\t\tif (rule.selectorText.toString().match(rx)) {\n\t\t\t\tArray_push(toret, rule);\n\t\t\t}\n\t\t}\n\t\treturn toret;\n\t} catch(e) { return []; }\n}\n\nutility.dom.createStyleSheet = function(doc, path) {\n\tif (is.ie) {\n\t\treturn doc.createStyleSheet(path);\n\t} else if (is.mozilla) {\n\t // load the xml\n\t\tvar theHeadNode = doc.getElementsByTagName(\"head\")[0];\n\n\t\tvar theStyleNode = doc.createElement('style');\n\t\ttheStyleNode.type =\"text/css\"\n\t\ttheStyleNode.rules = new Array();\n\n\t\ttheHeadNode.appendChild(theStyleNode);\n\n\t\tif (path != \"\") {\n\t\t\tvar xmlHttp = new XMLHttpRequest();\n\t\t\ttry {\n\t\t\t\txmlHttp.open(\"GET\", path, false);\n\t\t\t\txmlHttp.send(null);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\talert('Cannot load a stylesheet from a server other than the current server.\\r\\nThe current server is \"'+doc.location.hostname+'\".\\r\\nThe requested stylesheet URL is \"'+path+'\".');\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif(xmlHttp.status==404){\n\t\t\t\tprompt('Stylesheet was not found:', path);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tvar theTextNode = doc.createTextNode(xmlHttp.responseText);\n\t\t\ttheStyleNode.appendChild(theTextNode);\n\n\t\t\tvar re = /\\s*\\{([^\\}]*)\\}\\s*/;\n\t\t\tnameList = xmlHttp.responseText.split (re);\n\t\t\tfor(var i=0; i<nameList.length; i=i+2) {\n\t\t\t\tvar rul = new Object();\n\t\t\t\trul.selectorText = nameList[i];\n\t\t\t\trul.cssText = nameList[i+1]\n\t\t\t\ttheStyleNode.rules.push(rul);\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar theTextNode = doc.createTextNode('u');\n\t\t\ttheStyleNode.appendChild(theTextNode);\n\t\t}\n\t\treturn theStyleNode;\n\t}\n}\n\nObject_weave_safe(utility, {date: {}});\n\n$UNI_DATETIME_MASK_SEPARATORS = ['-', '/', '[', ']', '(', ')', '*', '+', '.', '\\s', ':'];\n$UNI_DATETIME_MASK_REGEXP = '[';\nfor(var zi=0;zi<$UNI_DATETIME_MASK_SEPARATORS.length; zi++) {\n\t$UNI_DATETIME_MASK_REGEXP += \"\\\\\"+$UNI_DATETIME_MASK_SEPARATORS[zi]+'|';\n}\n$UNI_DATETIME_MASK_REGEXP += ']';\n$UNI_DATETIME_MASK_REGEXP = new RegExp($UNI_DATETIME_MASK_REGEXP,\"g\");\n\nutility.date.date2regexp = function(txt) {\n\ttxt = txt.replace(/[\\/\\-\\.]/g, 'DATESEPARATOR');\n\ttxt = txt.replace(/([-\\/\\[\\]\\(\\)\\*\\+\\.\\:])/g, '\\\\$1');\n\ttxt = txt.replace(/DATESEPARATOR/g, '[\\\\/\\\\-\\\\.]');\n\ttxt = txt.replace(/(\\\\s)/g, '\\s');\n\ttxt = txt.replace(/yyyy/gi, '([0-9]{1,4})');\n\ttxt = txt.replace(/yy/gi, '([0-9]{1,4})');\n\ttxt = txt.replace(/y/gi, '([0-9]{1,4})');\n\n\ttxt = txt.replace(/mm/g, '([0-9]{1,2})');\n\ttxt = txt.replace(/m/g, '([0-9]{1,2})');\n\n\ttxt = txt.replace(/dd/g, '([0-9]{1,2})');\n\ttxt = txt.replace(/d/g, '([0-9]{1,2})');\n\n\ttxt = txt.replace(/HH/g, '([0-9]{1,2})*');\n\ttxt = txt.replace(/H/g, '([0-9]{1,2})*');\n\n\ttxt = txt.replace(/hh/g, '([0-9]{1,2})*');\n\ttxt = txt.replace(/h/g, '([0-9]{1,2})*');\n\n\ttxt = txt.replace(/ii/g, '([0-9]{1,2})*');\n\ttxt = txt.replace(/i/g, '([0-9]{1,2})*');\n\n\ttxt = txt.replace(/ss/g, '([0-9]{1,2})*');\n\ttxt = txt.replace(/s/g, '([0-9]{1,2})*');\n\n\ttxt = txt.replace(/tt/g, '(AM|PM|am|pm|A|P|a|p)*');\n\ttxt = txt.replace(/t/g, '(AM|PM|am|pm|A|P|a|p)*');\n\n\ttxt = txt.replace(/ /g, ' *');\n\ttxt = txt.replace(/:/g, ':*');\n\n\tvar re = new RegExp('^' + txt + '$');\n\treturn re;\n}\n\nutility.date.parse_date = function(arr, dateMask) {\n\tvar vYear = vMonth = vDay = null;\n\tvar vHour = vHour12h = vHour24H = vMinutes = vSeconds = vTimeMarker1C = vTimeMarker2C = null;\n\n\tvar groups = dateMask.split($UNI_DATETIME_MASK_REGEXP);\n\tvar groupIdx = 0;\n\n\tvar vTimeMarkerUpdate = 0;\n\t\n\tfor (var i = 0; i< groups.length; i++) {\n\t\tvar currentGroupMask = groups[i];\n\t\tgroupIdx++;\n\t\tvar groupValue = arr[groupIdx];\n\n\t\tif (Array_indexOf('HH,H,ii,i,ss,s'.split(','), currentGroupMask) >= 0) {\n\t\t\tif (groupValue == '' || typeof groupValue == 'undefined') {\n\t\t\t\tgroupValue = '0';\n\t\t\t}\n\t\t}\n\t\tif (Array_indexOf('hh,h'.split(','), currentGroupMask) >= 0) {\n\t\t\tvar tmpValue = parseInt(groupValue, 10);\n\t\t\tif (groupValue == '' || typeof groupValue == 'undefined') {\n\t\t\t\tgroupValue = '12';\n\t\t\t} else if (tmpValue > 12 && tmpValue < 24) {\n\t\t\t\tvar index = (Array_indexOf(groups, 't') >= 0 ? Array_indexOf(groups, 't')+1 : Array_indexOf(groups, 'tt')+1);\n\t\t\t\tif (arr[index] == '') {\n\t\t\t\t\tgroupValue = tmpValue - 12;\n\t\t\t\t\tvTimeMarkerUpdate = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (Array_indexOf('tt,t'.split(','), currentGroupMask) >= 0) {\n\t\t\tif (groupValue == '') {\n\t\t\t\tgroupValue = [['A', 'AM'], ['P', 'PM']][vTimeMarkerUpdate][currentGroupMask.length - 1];\n\t\t\t}\n\t\t}\n\n\t\tswitch(currentGroupMask) {\n\t\tcase 'yyyy':\n\t\tcase 'YYYY':\n\t\t\tvYear = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 'yy': \n\t\tcase 'YY': \n\t\tcase 'y':\n\t\t\tvYear = parseInt(groupValue, 10);\n\t\t\tif (vYear < 1000) {\n\t\t\t\tif (vYear < 10) {\n\t\t\t\t\tvYear = 2000 + vYear;\n\t\t\t\t} else {\n\t\t\t\t\tif (vYear < 70) {\n\t\t\t\t\t\tvYear = 2000 + vYear;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvYear = 1900 + vYear;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'mm':\n\t\tcase 'm':\n\t\t\tvMonth = parseInt(groupValue, 10);\n\t\t\t//vMonth;\n\t\t\tbreak;\n\t\tcase 'dd': \n\t\tcase 'd':\n\t\t\tvDay = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 'HH': \n\t\tcase 'H':\n\t\t\tvHour24H = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 'hh': \n\t\tcase 'h':\n\t\t\tvHour12h = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 'ii':\n\t\tcase 'i':\n\t\t\tvMinutes = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 'ss':\n\t\tcase 's':\n\t\t\tvSeconds = parseInt(groupValue, 10);\n\t\t\tbreak;\n\t\tcase 't':\n\t\t\tvTimeMarker1C = groupValue;\n\t\t\tbreak;\n\t\tcase 'tt':\n\t\t\tvTimeMarker2C = groupValue;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\n\tvYear = vYear == null?1900:vYear;\n\tvMonth = vMonth == null?0:vMonth;\n\tvDay = vDay == null?1:vDay;\n\n\tvMinutes = vMinutes == null?0:vMinutes;\n\tvSeconds = vSeconds == null?0:vSeconds;\n\tvar vHourOffset = 0;\n\n\tif (vHour12h != null) {\n\t\tif (vHour12h >= 1 && vHour12h <= 12) {\n\t\t\tvHour = vHour12h;\n\t\t\tif ((vTimeMarker1C || vTimeMarker2C || \"\").charAt(0)==\"P\") {\n\t\t\t\tif (vHour12h < 12) {\n\t\t\t\t\tvHour = vHour12h + 12;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (vHour12h == 12) {\n\t\t\t\t\tvHour = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//must add 12 to hour if time is PM\n\t\t\t//also, must add 12 if vHour12h in 12h format is greater than 11, which is invalid\n\t\t\t//vHourOffset = ( (vTimeMarker1C || vTimeMarker2C || \"\").charAt(0)==\"P\" || vHour12h>11)?12:0;\n\t\t\t//vHour = vHour12h + vHourOffset;\n\t\t} else {\n\t\t\tvHour = -1000;\n\t\t}\n\t} else if(vHour24H != null) {\n\t\tvHour = vHour24H;\n\t} else {\n\t\tvHour = 0;\n\t}\n\n\tvar o = {\n\t\t'year': vYear, \n\t\t'month': vMonth, \n\t\t'day': vDay,\n\t\t'hour': vHour, \n\t\t'minutes': vMinutes, \n\t\t'seconds': vSeconds\n\t};\n\n\tif (dateMask.indexOf('y') < 0\n\t\t&& dateMask.indexOf('m') < 0 \n\t\t&& dateMask.indexOf('d') < 0 ) {\n\t\to['year'] = '1900';\n\t\to['month'] = '1';\n\t\to['day'] = 1;\n\t}\n\treturn o;\n}\n\nObject_weave_safe(utility, {window: {}});\n\nutility.window.openWindow = function(target, url, width, height) {\n\tvar wndHandler;\n\tvar left = (screen.width - width) / 2;\n\tvar top = (screen.height - height) / 2;\n\tvar winargs = \"width=\" + width + \",height=\" + height + \",resizable=No,scrollbars=No,status=Yes,modal=yes,dependent=yes,dialog=yes,left=\" + left + \",top=\" + top;\n\n\twndHandler = window.open(url, target, winargs);\n\tif (wndHandler) {\n\t\tutility.window.reference = wndHandler;\n\t\tvar ctrlModalBlocker = document.getElementById('modalBlocker');\n\t\tif (!ctrlModalBlocker) {\n\t\t\tvar ctrlModalBlocker = utility.dom.createElement(\"DIV\", {\n\t\t\t\t'id' : 'modalBlocker',\n\t\t\t\t'style' : 'display: block'\n\t\t\t});\n\t\t\tvar pos = utility.dom.getPageInnerSize();\n\t\t\tctrlModalBlocker.style.zIndex = 999;\n\t\t\tctrlModalBlocker.style.width = (pos.x) + 'px';\n\t\t\tctrlModalBlocker.style.height = (pos.y) + 'px';\n\t\t\tprepfixieinsertnodescrollup();\n\t\t\tctrlModalBlocker = document.body.insertBefore(ctrlModalBlocker, document.body.firstChild);\n\t\t\tutility.dom.attachEvent(ctrlModalBlocker, 'onmousedown', function() {\n\t\t\t\treturn utility.window.focusmodal();\n\t\t\t});\n\t\t\tutility.dom.attachEvent(ctrlModalBlocker, 'ondblclick', function() {\n\t\t\t\treturn utility.window.focusmodal();\n\t\t\t});\n\t\t\tutility.dom.attachEvent(ctrlModalBlocker, is.ie?'onbeforeactivate':'onfocus', function() {\n\t\t\t\treturn utility.window.focusmodal();\n\t\t\t});\n\t\t\tutility.dom.attachEvent(is.mozilla?window.document.body:window, is.ie?'onbeforeactivate':'focus', function() {\n\t\t\t\treturn utility.window.focusmodal();\n\t\t\t});\n\t\t\tfixieinsertnodescrollup();\n\t\t} else {\n\t\t\tctrlModalBlocker.style.display = 'block';\n\t\t}\n\t\twndHandler.focus();\n\t}\n\n\tif (!wndHandler) {\n\t\talert(translate('Cannot open dialog. Please allow site popups.'));\n\t}\n\n\treturn wndHandler;\n};\nfunction prepfixieinsertnodescrollup() {\n\t//IE will scrollup inside all iframes after a DOM node insert\n\tif (is.ie && typeof(ktmls)!=\"undefined\") {\n\t\tprepfixieinsertnodescrollup.scrolls = [];\n\t\tfor (var i=0;i<ktmls.length; i++) {\n\t\t\tif (ktmls[i].destroyed) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tprepfixieinsertnodescrollup.scrolls[i] = ktmls[i].edit.body.scrollTop;\n\t\t}\n\t}\n}\nfunction fixieinsertnodescrollup() {\n\t//it doesn't work without an timeout (IE needs some \n\twindow.setTimeout(\"fixieinsertnodescrollup_late()\", 1);\n};\n\nfunction fixieinsertnodescrollup_late() {\n\tif (is.ie && typeof(ktmls)!=\"undefined\") {\n\t\tfor (var i=ktmls.length-1;i>=0; i--) {\n\t\t\tif (ktmls[i].destroyed) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tktmls[i].edit.body.scrollTop = prepfixieinsertnodescrollup.scrolls[i];\n\t\t}\n\t}\n};\n\nutility.window.focusmodal = function() {\n\tif (utility.window.reference && !utility.window.reference.closed) {\n\t\tutility.window.reference.focus();\n\t\treturn;\n\t}\n\tutility.window.hideModalBlocker();\n};\n\nutility.window.hideModalBlocker = function (wnd) {\n\tif (!wnd) {\n\t\twnd = window;\n\t}\n\tutility.window.reference = null;\n\tif (wnd.closed) {\n\t\treturn;\n\t}\n\tvar ctrlModalBlocker = wnd.document.getElementById('modalBlocker');\n\tif (ctrlModalBlocker) {\n\t\tctrlModalBlocker.style.display = 'none';\n\t}\n};\n\nutility.window.close = function() {\n\twindow.close();\n};\n\nutility.popup = {};\nutility.popup.stiva = [];\n//one may need the keyboard events while having the popup open\n//so instruct utility.popup to not block keyboard while popup is open\n//but then he must treat the ESC key himself\nutility.popup.makeModal = function(clickCallBack, elementOnTop, stopEvents) {\n\tif(typeof(stopEvents) == \"undefined\") {\n\t\tstopEvents = true;\n\t}\n\tutility.popup.stiva.push({'element' : elementOnTop, 'callback': clickCallBack, 'stopEvents':stopEvents});\n};\n\nutility.popup.removeModal = function(e) {\n\tif (utility.popup.stiva.length == 0) {\n\t\treturn;\n\t}\n\tif (utility.popup.force || e) {\n\t\tvar tmp = utility.popup.stiva[utility.popup.stiva.length-1];\n\t\tif (e) {\n\t\t\tvar o = utility.dom.setEventVars(e);\n\t\t\tvar clickedElement = o.targ;\n\t\t\twhile (clickedElement) {\n\t\t\t\tif (tmp.element && clickedElement == tmp.element) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (clickedElement.mi && clickedElement.mi['action_event'] != 'mousedown') {\n\t\t\t\t\t//must not close the open context menu if mousedown on an open submenu\n\t\t\t\t\t//modals should be closed inside the close menu function call\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tclickedElement = clickedElement.parentNode;\n\t\t\t}\n\t\t\tif (clickedElement) {\n\t\t\t\t// the user clicked on the elementOnTop\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (tmp.callback) {\n\t\t\ttmp.callback();\n\t\t}\n\t\tutility.popup.stiva.pop();\n\t\tutility.popup.removeModal(e);\n\t}\n\tutility.dom.toggleSpecialTags(null, false, 0, true, true);\n};\n\nutility.popup.escapeModal = function(e) {\n\tif (utility.popup.stiva.length > 0) {\n\t\tif (!utility.popup.stiva[utility.popup.stiva.length-1].stopEvents) {\n\t\t\treturn true;\n\t\t}\n\t\tvar o = utility.dom.setEventVars(e);\n\t\tif (e.keyCode == 27) {\n\t\t\tutility.popup.force = true;\n\t\t\tutility.popup.removeModal(o.e);\n\t\t\tutility.popup.force = false;\n\t\t}\n\t\tif (is.ie && !o.e.ctrlKey) {\n\t\t\ttry{o.e.keyCode = 90909090;}catch(e){};\n\t\t}\n\t\tutility.dom.stopEvent(o.e);\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nutility.window.blockInterface = function(cursor, el, customId) {\n\tif (typeof(cursor) == \"undefined\") {\n\t\tcursor = \"wait\";\n\t}\n\tvar ctrlInterfaceBlocker = utility.dom.createElement('div', {});\n\tctrlInterfaceBlocker.className = 'interfaceBlocker';\n\tctrlInterfaceBlocker.id = customId || 'interfaceBlocker';\n\tprepfixieinsertnodescrollup();\n\tctrlInterfaceBlocker = document.body.appendChild(ctrlInterfaceBlocker);\n\tfixieinsertnodescrollup();\n\tctrlInterfaceBlocker.style.cursor = cursor;\n\tvar pos;\n\tif(!el)\t{\n\t\tpos = utility.dom.getPageInnerSize();\n\t\tctrlInterfaceBlocker.style.width = pos.x + 'px';\n\t\tctrlInterfaceBlocker.style.height = pos.y + 'px';\n\t}\n\telse{\n\t\tpos = utility.dom.getBox(el);\n\t\tctrlInterfaceBlocker.style.top = pos.y + 'px';\n\t\tctrlInterfaceBlocker.style.left = pos.x + 'px';\n\t\tctrlInterfaceBlocker.style.width = pos.width + 'px';\n\t\tctrlInterfaceBlocker.style.height = pos.height + 'px';\n\t}\n};\n\nutility.window.unblockInterface = function() {\n\tvar ctrlInterfaceBlocker = document.getElementById('interfaceBlocker');\n\tif (ctrlInterfaceBlocker) {\n\t\tdocument.body.removeChild(ctrlInterfaceBlocker);\n\t}\n};\n\nutility.window.setModal = function(set_unselectable) {\n\tif (typeof set_unselectable == \"undefined\") {\n\t\tset_unselectable = true;\n\t}\n\twindow.isloading = false;\n\twindow.focus();\n\tif (!window.dialogArguments) {\n\t\twindow.onbeforeunload = function() {\n\t\t\tif (!window.opener.closed) {\n\t\t\t\tutility.window.hideModalBlocker(window.opener);\n\t\t\t}\n\t\t}\n\t\tif (set_unselectable) {\n\t\t\tutility.dom.setUnselectable(window.document.body);\n\t\t}\n\t} else {\n\t\twindow.opener = dialogArguments;\n\t}\n\tif (!window.opener) {\n\t\tdocument.body.innerHTML = \"<center>Invalid context! No opener.</center>\" + '<div style=\"display:none !important\">' + document.body.innerHTML + '</div>';\n\t\treturn;\n\t}\n\tif (window.opener.topOpener) {\n\t\twindow.topOpener = window.opener.topOpener;\n\t} else {\n\t\twindow.topOpener = window.opener;\n\t}\n\tutility.dom.attachEvent(is.ie?window.document.body:window, 'keydown', function(e) {\n\t\tvar ret = utility.popup.escapeModal(e);\n\t\tif (ret && e.keyCode == 27) {\n\t\t\tutility.window.close();\n\t\t}\n\t});\n\tutility.dom.attachEvent2(window.document.body, 'mousedown', utility.popup.removeModal);\n};\n\nObject_weave_safe(utility, {cookie: {}});\n\nutility.cookie.set = function(name, value, lifespan, access_path) {\n\tvar cookietext = name + \"=\" + escape(value);\n\tif (lifespan != null) {\n\t\tvar date = new Date();\n\t\tdate.setTime(date.getTime() + (1000*60*60*24*lifespan));\n\t\tcookietext += \"; expires=\" + date.toGMTString();\n\t}\n\tif (access_path != null) {\n\t\tcookietext += \"; path=\" + access_path;\n\t}\n\tdocument.cookie = cookietext;\n\treturn null;\n}\n\nutility.cookie.get = function(name) {\n\tvar nameeq = name + \"=\";\n\tvar ca = document.cookie.split(';');\n\tfor(var i=0;i < ca.length;i++) {\n\t\tvar c = ca[i];\n\t\twhile (c.charAt(0)==' ') {\n\t\t\tc = c.substring(1,c.length);\n\t\t}\n\t\tif (c.indexOf(nameeq) == 0) {\n\t\t\treturn unescape(c.substring(nameeq.length,c.length));\n\t\t}\n\t}\n\treturn null;\n}\n\nutility.cookie.del = function(name, path) {\n\tutility.cookie.set(name, \"\", -1, path);\n}\n\n// simple UID generator\nUIDGenerator = function(name) {\n\tif (typeof(name) == 'undefined') {\n\t\tname = 'iaktuid_' + Math.random().toString().substring(2, 6) + '_';\n\t}\n\tthis.name = name;\n\tthis.counter = 1;\n}\nUIDGenerator.prototype.generate = function(detail) {\n\tif (typeof(detail) == 'undefined') {\n\t\tdetail = '';\n\t}\n\treturn (this.name + detail + this.counter++ + '_');\n}\n\nObjectStorage = function (name) {\n\tthis.storage = {};\n\tthis.gen = new UIDGenerator(name + \"_reference_by_id_\");\n}\n\nObjectStorage.prototype.add = ObjectStorage.prototype.storeObject = function (obj) {\n\tvar type = obj.constructor.toString().match(/^\\s*function\\s*([^\\s\\(]*)\\s*\\(/i);\n\tif (!type) {\n\t\ttype = \"unknown_contructor\";\n\t} else {\n\t\ttype = type[1];\n\t}\n\tvar newId = this.gen.generate(type);\n\tobj.id = newId;\n\tthis.storage[newId] = obj;\n}\n\nObjectStorage.prototype.get = ObjectStorage.prototype.getObject = function (id) {\n\treturn this.storage[id];\n}\n\nObjectStorage.prototype.deleteObject = function (id) {\n\tdelete this.storage[id];\n}\n\nObjectStorage.prototype.dispose = function () {\n\tthis.storage = null;\n}\n\nQueryString = function(str) {\n\tif (typeof str == 'undefined') {\n\t\tvar str = window.location.search.toString();\n\t}\n\tthis.keys = new Array();\n\tthis.values = new Array();\n\tvar query = str;\n\tif (str.indexOf('?') == 0) {\n\t\tquery = str.substring(1);\n\t}\n\tquery = query.replace(/&amp;/g, '&');\n\tvar pairs = query.split(\"&\");\n\n\tfor (var i = 0; i < pairs.length; i++) {\n\t\tvar pos = pairs[i].indexOf('=');\n\n\t\tif (pos >= 0) {\n\t\t\tvar argname = pairs[i].substring(0, pos);\n\t\t\tvar value = pairs[i].substring(pos + 1);\n\t\t\tthis.keys[this.keys.length] = argname;\n\t\t\tthis.values[this.values.length] = value;\n\t\t}\n\t}\n}\n\nQueryString.prototype.find = function(key) {\n\tvar value = null;\n\tfor (var i = 0; i < this.keys.length; i++) {\n\t\tif (this.keys[i] == key) {\n\t\t\tvalue = this.values[i];\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn value;\n}\n\nKT_Tooltips = {\n\tcname: 'kt_add_tooltips', \n\tworked: [], \n\tcancel:false,\n\tgen: new UIDGenerator(), \n\tshow: function (id, x, y) {\n\t\tvar div = document.getElementById(id);\n\t\tif (!div) {\n\t\t\treturn;\n\t\t}\n\t\t//show it somewhere out of sight, so it gets a box\n\t\tdiv.style.left = '-1000px';\n\t\tdiv.style.top = '-1000px';\n\t\tdiv.style.display = 'block';\n\t\tvar pos = utility.dom.getBBox(div);\n\n\t\tvar pos2 = utility.dom.getPositionRelativeTo00(x, y, pos.width + 2, pos.height + 2);\n\n\t\tdiv.style.left = pos2.x + 'px';\n\t\tdiv.style.top = pos2.y + 'px';\n\t\t//KT_Tooltips.set_timeout(id, \"hide\", 3250);\n\t}, \n\thide: function (id) {\n\t\tvar div = document.getElementById(id);\n\t\tif (!div) {\n\t\t\treturn;\n\t\t}\n\t\tdiv.style.display = 'none';\n\t}, \n\tclear_timeout: function(id, mode) {\n\t\tvar to = id + mode + \"timeout\";\n\t\tif (typeof window[to] != 'undefined') {\n\t\t\tclearTimeout(window[to]);\n\t\t}\n\t}, \n\tclear_showtimeout: function(id) {\n\t\tKT_Tooltips.clear_timeout(id, 'show');\n\t}, \n\tclear_hidetimeout: function(id) {\n\t\tKT_Tooltips.clear_timeout(id, 'hide');\n\t}, \n\tset_timeout: function(id, mode, time) {\n\t\tvar params_str = '', params_arr = [];\n\t\tif (arguments.length > 3) {\n\t\t\tfor (var i = 3; i < arguments.length; i++) {\n\t\t\t\tArray_push(params_arr, arguments[i]);\n\t\t\t}\n\t\t}\n\t\tparams_str = params_arr.join(', ');\n\t\tif (params_str != '') {\n\t\t\tparams_str = ', ' + params_str;\n\t\t}\n\t\tvar str = \"KT_Tooltips.\" + mode + \"('\" + id + \"'\"+ params_str+\")\";\n\t\tvar to = id + mode + \"timeout\";\n\t\twindow[to] = setTimeout(str, time);\n\t}, \n\tset_showtimeout: function(id, vars) {\n\t\tKT_Tooltips.set_timeout(id, \"show\", 1000, vars.x, vars.y);\n\t}, \n\tset_hidetimeout: function(id) {\n\t\tKT_Tooltips.set_timeout(id, \"hide\", 250);\n\t}, \n\tattach_single: function(link) {\n\t\tif (is.ie || is.safari) {\n\t\t\treturn;\n\t\t}\n\t\tvar title = link.title;\n\t\tvar mytip = null;\n\t\tif (link.getAttribute('divid')) {\n\t\t\tmytip = document.getElementById(link.getAttribute('divid'));\n\t\t\tif (mytip) {\n\t\t\t\tdocument.body.removeChild(mytip);\n\t\t\t}\n\t\t\tlink.removeAttribute('divid');\n\t\t}\n\t\tif (/[\\r\\n]/.test(title)) {\n\t\t\tvar divid = KT_Tooltips.gen.generate(\"tooltip\");\n\t\t\tvar div = utility.dom.createElement(\"div\", {\n\t\t\t\t'class': 'tooltip_div', \n\t\t\t\t'id': divid\n\t\t\t});\n\t\t\tdiv.innerHTML = link.getAttribute(\"title\").toString().replace(/\\r\\n/g, \"<br />\").replace(/[\\r|\\n]/g, \"<br />\");\n\t\t\tlink.divid = divid;\n\t\t\tdiv = document.body.appendChild(div);\n\t\t\tlink.removeAttribute(\"title\");\n\t\t\tlink.setAttribute(\"divid\", divid);\n\t\t\tif (!mytip) {//attach events only once\n\t\t\t\tutility.dom.attachEvent(link, 'mouseover', function(e) {\t\t\n\t\t\t\t\tvar id = link.getAttribute(\"divid\");\n\t\t\t\t\tvar pos = utility.dom.getBBox(link);\n\t\t\t\t\tvar vars = utility.dom.setEventVars(e);\n\t\t\t\t\tKT_Tooltips.clear_hidetimeout(id);\n\t\t\t\t\tvar obj = {x: pos.x + Math.round(pos.width / 2), y: pos.y + Math.round(pos.height / 2) + 10};\n\t\t\t\t\tKT_Tooltips.set_showtimeout(id, obj);\n\t\t\t\t\tutility.dom.stopEvent(e);\n\t\t\t\t});\n\t\t\t\tutility.dom.attachEvent(link, 'mouseout', function(e) {\n\t\t\t\t\tvar id = link.getAttribute(\"divid\");\n\t\t\t\t\tKT_Tooltips.clear_showtimeout(id);\n\t\t\t\t\tKT_Tooltips.set_hidetimeout(id);\n\t\t\t\t\tutility.dom.stopEvent(e);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, \n\tattach: function () {\n\t\tKT_Tooltips.worked = [];\n\t\tif (is.ie || is.safari) {\n\t\t\treturn;\n\t\t}\n\t\tArray_each(utility.dom.getElementsByClassName(document.body, KT_Tooltips.cname), function(el) {\n\t\t\tArray_each(el.getElementsByTagName('a'), KT_Tooltips.attach_single);\n\t\t}) \n\t}\n};\nutility.dom.attachEvent(window, 'load', KT_Tooltips.attach);\n\n/*\n * class XmlHttp\n*/\n//MsXML on Mozilla\nfunction getDomDocumentPrefix() {\n\tif (getDomDocumentPrefix.prefix) return getDomDocumentPrefix.prefix;\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\to = new ActiveXObject(prefixes[i] + \".DomDocument\");\n\t\t\treturn getDomDocumentPrefix.prefix = prefixes[i];\n\t\t} catch (ex) { }\n\t}\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\nfunction getXmlHttpPrefix() {\n\tif (getXmlHttpPrefix.prefix) return getXmlHttpPrefix.prefix;\n\n\tvar prefixes = [\"MSXML2\", \"Microsoft\", \"MSXML\", \"MSXML3\"];\n\tvar o;\n\n\tfor (var i = 0; i < prefixes.length; i++) {\n\t\ttry {\n\t\t\t// try to create the objects\n\t\t\to = new ActiveXObject(prefixes[i] + \".XmlHttp\");\n\t\t\treturn getXmlHttpPrefix.prefix = prefixes[i];\n\t\t} catch (ex) { }\n\t}\n\n\tthrow new Error(\"Could not find an installed XML parser\");\n}\n\n// XmlHttp factory\nfunction XmlHttp() { }\nXmlHttp.create = function() {\n\ttry {\n\t\tif (window.XMLHttpRequest) {\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\tif (req.readyState == null) {\n\t\t\t\treq.readyState = 1;\n\t\t\t\treq.addEventListener(\"load\", \n\t\t\t\t\tfunction() {\n\t\t\t\t\t\treq.readyState = 4;\n\t\t\t\t\t\tif (typeof req.onreadystatechange == \"function\") \n\t\t\t\t\t\t\treq.onreadystatechange();\n\t\t\t\t\t}, false);\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\t\tif (window.ActiveXObject) {\n\t\t\tvar ax = new ActiveXObject(getXmlHttpPrefix() + \".XmlHttp\");\n\t\t\treturn ax;\n\t\t}\n\t} catch (ex) { }\n\n\t// fell through\n\tthrow new Error(\"Your browser does not support XmlHttp objects\");\n}\nXmlHttp.post = function(rpc, url, postStr) {\n\ttry {\n\t\trpc.open(\"POST\", url, false);\n\t\trpc.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\trpc.send(postStr);\n\t} catch(e) {\n\t\treturn false;\n\t}\n\treturn rpc;\n}\nXmlHttp.get = function(rpc, url, getStr) {\n\ttry {\n\t\trpc.open(\"GET\", getStr, false);\n\t\trpc.send(null);\n\t} catch(e) {\n\t\treturn false;\n\t}\n\treturn rpc;\n}\n\n// XmlDocument factory\nfunction XmlDocument() {}\n\nXmlDocument.create = function () {\n\ttry {\n\t\t// DOM2\n\t\tif (document.implementation && document.implementation.createDocument) {\n\t\t\tvar doc = document.implementation.createDocument(\"\", \"\", null);\n\t\t\t\n\t\t\t// some versions of Moz do not support the readyState property\n\t\t\t// and the onreadystate event so we patch it!\n\t\t\tif (doc.readyState == null) {\n\t\t\t\tdoc.readyState = 1;\n\t\t\t\tdoc.addEventListener(\"load\", function () {\n\t\t\t\t\tdoc.readyState = 4;\n\t\t\t\t\tif (typeof doc.onreadystatechange == \"function\")\n\t\t\t\t\t\tdoc.onreadystatechange();\n\t\t\t\t}, false);\n\t\t\t}\n\t\t\t\n\t\t\treturn doc;\n\t\t}\n\t\tif (window.ActiveXObject)\n\t\t\treturn new ActiveXObject(getDomDocumentPrefix() + \".DomDocument\");\n\t}\n\tcatch (ex) {}\n\tthrow new Error(\"Your browser does not support XmlDocument objects\");\n};\n\n// Create the loadXML method and xml getter for Mozilla\nif (window.DOMParser &&\n\twindow.XMLSerializer &&\n\twindow.Node && Node.prototype && Node.prototype.__defineGetter__) {\n\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\t//XMLDocument.prototype.loadXML = \n\tDocument.prototype.loadXML = function (s) {\n\t\t\n\t\t// parse the string to a new doc\t\n\t\tvar doc2 = (new DOMParser()).parseFromString(s, \"text/xml\");\n\t\t\n\t\t// remove all initial children\n\t\twhile (this.hasChildNodes())\n\t\t\tthis.removeChild(this.lastChild);\n\t\t\t\n\t\t// insert and import nodes\n\t\tvar ret = false;\n\t\tfor (var i = 0; i < doc2.childNodes.length; i++) {\n\t\t\tthis.appendChild(this.importNode(doc2.childNodes[i], true));\n\t\t\tret = true;\n\t\t}\n\t\treturn ret;\n\t};\n\t\n\t\n\t/*\n\t * xml getter\n\t *\n\t * This serializes the DOM tree to an XML String\n\t *\n\t * Usage: var sXml = oNode.xml\n\t *\n\t */\n\t// XMLDocument did not extend the Document interface in some versions\n\t// of Mozilla. Extend both!\n\t/*\n\tXMLDocument.prototype.__defineGetter__(\"xml\", function () {\n\t\treturn (new XMLSerializer()).serializeToString(this);\n\t});\n\t*/\n/*@cc_on @*/\n/*@if (@_jscript_version >= 3)\n\t//hide the next block of code from the IE compiler ;)\n@else @*/\n\tvar documentProto = Document.prototype;\n\tvar documentGrandProto = documentProto.__proto__ = {\n\t\t__proto__: documentProto.__proto__\n\t};\n\t\n\tif (documentGrandProto) {\n\t\tdocumentGrandProto.__defineGetter__('xml',\n\t\t\tfunction () { return (new XMLSerializer()).serializeToString(this); }\n\t\t);\n\t}\n\n\tvar elementProto = Element.prototype;\n\tvar elementGrandProto = elementProto.__proto__ = {\n\t\t__proto__: elementProto.__proto__\n\t};\n\tif (elementGrandProto) {\n\t\telementGrandProto.__defineGetter__('text',\n\t\t\tfunction () { return this.textContent; }\n\t\t);\n\t\telementGrandProto.__defineGetter__('innerText',\n\t\t\tfunction () { return this.textContent; }\n\t\t);\n\t\telementGrandProto.__defineSetter__('innerText',\n\t\t\tfunction (new_value) { \n\t\t\t\tvar tn = this.ownerDocument.createTextNode(new_value);\n\t\t\t\tthis.innerHTML = \"\";\n\t\t\t\tthis.appendChild(tn);\n\t\t\t}\n\t\t);\n\t}\n\n/*@end @*/\n}\n\nfunction evaluateXPath(aNode, aExpr) {\n\tvar found = [];\n\tif (is.mozilla) {\n\t\tif (typeof evaluateXPath.xpe == \"undefined\") {\n\t\t\tevaluateXPath.xpe = new XPathEvaluator();\n\t\t}\n\t\t//var nsResolver = xpe.createNSResolver(aNode.ownerDocument == null ? aNode.documentElement : aNode.ownerDocument.documentElement);\n\t\t//var result = xpe.evaluate(aExpr, aNode, nsResolver, XPathResult.ANY_TYPE, null);\n\t\tvar result = evaluateXPath.xpe.evaluate(aExpr, aNode, null, XPathResult.ANY_TYPE, null);\n\t\twhile (res = result.iterateNext()) {\n\t\t\tfound.push(res);\n\t\t}\n\t} else if (is.ie) {\n\t\tvar result = aNode.selectNodes(aExpr);\n\t\tfor(var i=0; i<result.length; i++) {\n\t\t\tfound.push(result[i]);\n\t\t}\n\t}\n\tif (found.length == 0) {\n\t\tfound = false;\n\t}\n\treturn found;\n};\n\nfunction BrowserCheck() {\n\tvar b = navigator.appName.toString();\n\tvar up = navigator.platform.toString();\n\tvar ua = navigator.userAgent.toString();\n\n\tthis.mozilla = this.ie = this.opera = r = false;\n\tvar re_opera = /Opera.([0-9\\.]*)/i;\n\tvar re_msie = /MSIE.([0-9\\.]*)/i;\n\tvar re_gecko = /gecko/i;\n\tvar re_safari = /safari\\/([\\d\\.]*)/i;\n\t\n\tif (ua.match(re_opera)) {\n\t\tr = ua.match(re_opera);\n\t\tthis.opera = true;\n\t\tthis.version = parseFloat(r[1]);\n\t} else if (ua.match(re_msie)) {\n\t\tr = ua.match(re_msie);\n\t\tthis.ie = true;\n\t\tthis.version = parseFloat(r[1]);\n\t} else if (ua.match(re_safari)) {\n\t\tthis.mozilla = true;\n\t\tthis.safari = true;\n\t\tthis.version = 1.4;\n\t} else if (ua.match(re_gecko)) {\n\t\tvar re_gecko_version = /rv:\\s*([0-9\\.]+)/i;\n\t\tr = ua.match(re_gecko_version);\n\t\tthis.mozilla = true;\n\t\tthis.version = parseFloat(r[1]);\n\t}\n\tthis.windows = this.mac = this.linux = false;\n\n\tthis.Platform = ua.match(/windows/i) ? \"windows\" :\n\t\t\t\t\t(ua.match(/linux/i) ? \"linux\" :\n\t\t\t\t\t(ua.match(/mac/i) ? \"mac\" :\n\t\t\t\t\tua.match(/unix/i)? \"unix\" : \"unknown\"));\n\tthis[this.Platform] = true;\n\tthis.v = this.version;\n\tthis.valid = this.ie && this.v >= 6 || this.mozilla && this.v >= 1.4;\n\tif (this.safari && this.mac && this.mozilla) {\n\t\tthis.mozilla = false;\n\t}\n};\n\nfunction sortFormHandlers(arr) {\n\tfor(var i=0; i<arr.length; i++) {\n\t\tvar fh1 = arr[i];\n\t\tfor(var j=i+1;j<arr.length;j++) {\n\t\t\tvar fh2 = arr[j];\n\t\t\tif (fh2[0]<fh1[0]) {\n\t\t\t\tvar tmp = fh1;\n\t\t\t\tarr[i] = fh2;\n\t\t\t\tarr[j] = tmp;\n\t\t\t}\n\t\t}\n\t}\n};\n\nfunction GLOBAL_registerFormSubmitEventHandler(function_name, priority) {\n\tvar frms = document.getElementsByTagName('form');\n\tfor (var i = 0; i < frms.length; i++) {\n\t\tvar frm = frms[i];\n\t\tif (typeof frm.onsubmit != 'undefined' && frm.onsubmit != null) {\n\t\t\tvar form_handlers = frm.form_handlers;\n\t\t\tif (form_handlers) {\n\t\t\t\tform_handlers[form_handlers.length] = [priority, function_name];\n\t\t\t\tsortFormHandlers(form_handlers);\n\t\t\t} else {\n\t\t\t\t//user defined onsubmit handler\n\t\t\t\tfrm.__kt_onsubmit = frm.onsubmit;\n\t\t\t\tfrm.onsubmit = new Function('e', 'if (!KT_formSubmittalHandler(e)) return false;');\n\t\t\t\tform_handlers = [];\n\t\t\t\tform_han
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment