//http://www.aradon.ro/SysRes/aradonSkin/SkinGzip.aspx?packagetype=js&package=ZopeTemplate //START1 /* SkinGzip V 1.0.3035.20081, PackageDate: 9/10/2010 1:26:11 AM */ // Creates arrays of strings that will be evaluated as Javascript commands. // This allows for the execution of many JavaScript commands to be added to the body elements onload as one method call. var onLoadStack = new Array(); // Internal array where commands are stored as strings; var onLoadLastStack = new Array(); // Internal array where commands are stored to be done last addToOnLoad = function(commandStr){ if(typeof(commandStr) == "string"){ onLoadStack[onLoadStack.length] = commandStr; return true; } return false; } addToOnLoadLast = function(commandStr){ if(typeof(commandStr) == "string"){ onLoadLastStack[onLoadLastStack.length] = commandStr; return true; } return false; } var onLoadExecuted = 0; executeOnLoadStack = function() { if(onLoadExecuted) return; for (var x=0; x < onLoadStack.length; x++) { eval(onLoadStack[x]); } for (var x=0; x < onLoadLastStack.length; x++) { eval(onLoadLastStack[x]); } onLoadExecuted = 1; } document.onload = executeOnLoadStack; if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; //prototype object:Tab function Tab(strTabID, strTabName, nodeContent) { //properties & defaults this.strTabName = "New Tab"; this.nodeContent = null; this.strTabID = null; //set properties if (nodeContent) this.nodeContent = nodeContent; if (strTabName) this.strTabName = strTabName; if (strTabID) this.strTabID = strTabID; } //prototype object: TabBox function PortalTabBox(strContainerNodeID, iBoxHeight, boolCycle, iCyclePeriod) { //properties & defaults this.nodeContainer = null; this.nodeContent = document.createElement("div"); this.strID = "TabBox"; this.arrTabs = new Array(); this.strActiveTabID = null; this.iBoxHeight = 200; this.boolCycle = false; this.iCyclePeriod = 5000; this.strHeadlineMarkup = null; this.boolAdminMode = false; //set properties this.iBoxHeight = iBoxHeight; this.boolCycle = boolCycle; this.iCyclePeriod = iCyclePeriod; if (document.getElementById(strContainerNodeID)) this.nodeContainer = document.getElementById(strContainerNodeID); } //method for TabBox: add a tab PortalTabBox.prototype.AddTab = function(strTabID, strTabName, ContentNode) { //alert(ContentNode.innerHTML); var newtab = new Tab (strTabID, strTabName, ContentNode); this.arrTabs.push(newtab); }; //method for TabBox: set the active tab PortalTabBox.prototype.SetActiveTab = function(strTabID) { //alert(strTabID); this.strActiveTabID = strTabID; }; //method for TabBox: change active tab PortalTabBox.prototype.ChangeTab = function(strTabID) { //alert (strTabID); this.SetActiveTab(strTabID); this.Render(); return false; }; //method for TabBox: toggle cycling through active tabs PortalTabBox.prototype.ToggleCycleTabs = function (boolActive) { this.boolCycle = boolActive; }; //method for TabBox: go to next Tab PortalTabBox.prototype.GoToNextTab = function () { if (this.boolCycle) { //find next tab var strNextTabID; for (var t=0; t 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox1Col115TopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox1Col115BottomLinks"; var nodeContentProvider; this.nodeContent.className = "TabBox1Col115Content"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height //36 iContentHeight = this.iBoxHeight - ( (this.arrTabs.length * 30) + 17 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if (boolActiverow) { iNextElement = t + 1; break; } } PaneBottom.appendChild(ULTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////1 COLUMN////////////////// //inherits TabBox function TabBox1Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox1Col.prototype = new PortalTabBox(); //method for TabBox1Col: render the box TabBox1Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var TabBox = this; var Box1Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); //assign css classes; Box1Col.className = "TabBox1Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox1ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox1ColBottomLinks"; var nodeContentProvider; this.nodeContent.className = "TabBox1ColContent"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height //36 iContentHeight = this.iBoxHeight - ( (this.arrTabs.length * 30) + 17 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if (boolActiverow) { iNextElement = t + 1; break; } } PaneBottom.appendChild(ULTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////2 COLUMNS////////////////// //inherits TabBox function TabBox2Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox2Col.prototype = new PortalTabBox(); //method for TabBox2Col: render the box TabBox2Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var Box2Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); var ClearFloat = document.createElement("br"); //assign css classes Box2Col.className = "TabBox2Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; ClearFloat.className = "Clear"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var TabBox = this; var col = 0; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox2ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox2ColBottomLinks"; var nodeContentProvider; var ClearFloatTop = ClearFloat.cloneNode(false); var ClearFloatBottom = ClearFloat.cloneNode(false); this.nodeContent.className = "TabBox2ColContent"; var nodeContentFooter = document.createElement("div"); nodeContentFooter.className = "TabBox2ColContentFooter"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height // iContentHeight = this.iBoxHeight - ( (Math.ceil(this.arrTabs.length/2) * 30) + 20 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 1) li.className = "Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) this.nodeContent.className += " LeftTab"; else this.nodeContent.className += " RightTab"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if ((col==1 && boolActiverow) || (t==(this.arrTabs.length-1) && boolActiverow)) { iNextElement = t + 1; break; } col = col + 1; if (col>1) col = 0; } PaneBottom.appendChild(ULTop); PaneBottom.appendChild(ClearFloatTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); PaneBottom.appendChild(nodeContentFooter); //bottom tabs col = 0; for (t = iNextElement; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 1) li.className = "Right"; a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULBottom.appendChild(li); col = col + 1; if (col>1) col = 0; } if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////3 COLUMNS////////////////// //inherits TabBox function TabBox3Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox3Col.prototype = new PortalTabBox(); //method for TabBox3Col: render the box TabBox3Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var Box3Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); var ClearFloat = document.createElement("br"); //assign css classes; Box3Col.className = "TabBox3Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; ClearFloat.className = "Clear"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var TabBox = this; var col = 0; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox3ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox3ColBottomLinks"; var nodeContentProvider; var ClearFloatTop = ClearFloat.cloneNode(false); var ClearFloatBottom = ClearFloat.cloneNode(false); this.nodeContent.className = "TabBox3ColContent"; var nodeContentHeader = document.createElement("div"); nodeContentHeader.className = "TabBox3ColContentTop"; var nodeContentFooter = document.createElement("div"); nodeContentFooter.className = "TabBox3ColContentBot"; var iContentHeight = this.iBoxHeight //calculate content height //36 var rows; if (this.arrTabs.length>3) rows = 2; else rows = 1; iContentHeight = this.iBoxHeight - ( (rows * 30) + 20 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; //PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; (t< this.arrTabs.length && t<3); t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 2) li.className += " Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) nodeContentHeader.className += "Left"; if (col == 1) nodeContentHeader.className += "Mid"; if (col == 2) nodeContentHeader.className += "Right"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); col = col + 1; if (col>2) col = 0; } PaneBottom.appendChild(ULTop); PaneBottom.appendChild(ClearFloatTop); PaneBottom.appendChild(nodeContentHeader); PaneBottom.appendChild(this.nodeContent); PaneBottom.appendChild(nodeContentFooter); //bottom tabs col = 0; for(var t = 3; (t< this.arrTabs.length && t<6); t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 2) li.className += " Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) nodeContentFooter.className += "Left"; if (col == 1) nodeContentFooter.className += "Mid"; if (col == 2) nodeContentFooter.className += "Right"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULBottom.appendChild(li); col = col + 1; if (col>2) col = 0; } if (boolActiverow) this.DrawContent(this.nodeContent, nodeContentProvider); if (this.arrTabs.length > 3) { PaneBottom.appendChild(ULBottom); PaneBottom.appendChild(ClearFloatBottom); } } //append pane to box node Box3Col.appendChild(PaneTop); Box3Col.appendChild(PaneBottom); //put everything in the container node this.nodeContainer.appendChild(Box3Col); //set timeout for cycling through tabs if (this.boolCycle && this.arrTabs.length>0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /*****************************************************************************\ Javascript "SOAP Client" library @version: 1.4 - 2005.12.10 @author: Matteo Casati, Ihar Voitka - http://www.guru4.net/ @description: (1) SOAPClientParameters.add() method returns 'this' pointer. (2) "_getElementsByTagName" method added for xpath queries. (3) "_getXmlHttpPrefix" refactored to "_getXmlHttpProgID" (full ActiveX ProgID). @version: 1.3 - 2005.12.06 @author: Matteo Casati - http://www.guru4.net/ @description: callback function now receives (as second - optional - parameter) the SOAP response too. Thanks to Ihar Voitka. @version: 1.2 - 2005.12.02 @author: Matteo Casati - http://www.guru4.net/ @description: (1) fixed update in v. 1.1 for no string params. (2) the "_loadWsdl" method has been updated to fix a bug when the wsdl is cached and the call is sync. Thanks to Linh Hoang. @version: 1.1 - 2005.11.11 @author: Matteo Casati - http://www.guru4.net/ @description: the SOAPClientParameters.toXML method has been updated to allow special characters ("<", ">" and "&"). Thanks to Linh Hoang. @version: 1.0 - 2005.09.08 @author: Matteo Casati - http://www.guru4.net/ @notes: first release. \*****************************************************************************/ if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; function SOAPClientParameters() { var _pl = new Array(); this.add = function(name, value) { _pl[name] = value; return this; } this.toXml = function() { var xml = ""; for(var p in _pl) { if(typeof(_pl[p]) != "function") xml += "<" + p + ">" + _pl[p].toString().replace(/&/g, "&").replace(//g, ">") + ""; } return xml; } this.toQueryString = function() { var querystring = ""; var c = 0; for(var p in _pl) { if(typeof(_pl[p]) != "function") { if (c==0) querystring += "?" + p.toString() + "=" + escape(_pl[p].toString()); else querystring += "&" + p.toString() + "=" + escape(_pl[p].toString()); } c++; } return querystring; } } function SOAPClient() {} SOAPClient.invoke = function(soap, url, method, parameters, async, callback) { if (soap) { if(async) SOAPClient._loadWsdl(url, method, parameters, async, callback); else return SOAPClient._loadWsdl(url, method, parameters, async, callback); } else { if(async) SOAPClient._sendGetRequest(url, method, parameters, async, callback); else return SOAPClient._sendGetRequest(url, method, parameters, async, callback); } } // private: wsdl cache SOAPClient_cacheWsdl = new Array(); // private: invoke async SOAPClient._loadWsdl = function(url, method, parameters, async, callback) { // load from cache? var wsdl = SOAPClient_cacheWsdl[url]; if(wsdl + "" != "" && wsdl + "" != "undefined") return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl); // get wsdl var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("GET", url + "?wsdl", async); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } } xmlHttp.send(null); if (!async) return SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } SOAPClient._onLoadWsdl = function(url, method, parameters, async, callback, req) { var wsdl = req.responseXML; SOAPClient_cacheWsdl[url] = wsdl; // save a copy in cache return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl); } SOAPClient._sendGetRequest = function(url, method, parameters, async, callback) { var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("GET", url + "/" + method + parameters.toQueryString(), async); xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onSendGetRequest(method, async, callback, xmlHttp); } } xmlHttp.send(null); if (!async) return SOAPClient._onSendGetRequest(method, async, callback, xmlHttp); } SOAPClient._onSendGetRequest = function(method, async, callback, req) { var returnXml; var doc = document.createElement("div"); try { doc.innerHTML = req.responseText; returnXml = doc; } catch(e) { //alert("Fehler Fox-Zweig: " + e.description); } try { if (typeof(req.responseXML.firstChild) != "undefined") returnXml = req.responseXML; } catch(e) { //alert("Fehler IE-Zweig: " + e.description); } if (callback) callback(returnXml); if (!async) return returnXml; } SOAPClient._sendSoapRequest = function(url, method, parameters, async, callback, wsdl) { // get namespace var ns = (wsdl.documentElement.attributes["targetNamespace"] + "" == "undefined") ? wsdl.documentElement.attributes.getNamedItem("targetNamespace").nodeValue : wsdl.documentElement.attributes["targetNamespace"].value; // build SOAP request var sr = "" + "" + "" + "<" + method + " xmlns=\"" + ns + "\">" + parameters.toXml() + ""; // send request var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("POST", url, async); var soapaction = ((ns.lastIndexOf("/") != ns.length - 1) ? ns + "/" : ns) + method; xmlHttp.setRequestHeader("SOAPAction", soapaction); xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onSendSoapRequest(method, async, callback, wsdl, xmlHttp); } } xmlHttp.send(sr); if (!async) return SOAPClient._onSendSoapRequest(method, async, callback, wsdl, xmlHttp); } SOAPClient._onSendSoapRequest = function(method, async, callback, wsdl, req) { var o = null; var nd = SOAPClient._getElementsByTagName(req.responseXML, method + "Result"); if(nd.length == 0) { if(req.responseXML.getElementsByTagName("faultcode").length > 0) throw new Error(500, req.responseXML.getElementsByTagName("faultstring")[0].childNodes[0].nodeValue); } else o = SOAPClient._soapresult2object(nd[0], wsdl); if(callback) callback(o, req.responseXML); if(!async) return o; } // private: utils SOAPClient._getElementsByTagName = function(document, tagName) { try { // trying to get node omitting any namespaces (latest versions of MSXML.XMLDocument) return document.selectNodes(".//*[local-name()=\""+ tagName +"\"]"); } catch (ex) {} // old XML parser support return document.getElementsByTagName(tagName); } SOAPClient._soapresult2object = function(node, wsdl) { return SOAPClient._node2object(node, wsdl); } SOAPClient._node2object = function(node, wsdl) { // null node if(node == null) return null; // text node if(node.nodeType == 3 || node.nodeType == 4) return SOAPClient._extractValue(node, wsdl); // leaf node if (node.childNodes.length == 1 && (node.childNodes[0].nodeType == 3 || node.childNodes[0].nodeType == 4)) return SOAPClient._node2object(node.childNodes[0], wsdl); var isarray = SOAPClient._getTypeFromWsdl(node.nodeName, wsdl).toLowerCase().indexOf("arrayof") != -1; // object node if(!isarray) { var obj = null; if(node.hasChildNodes()) obj = new Object(); for(var i = 0; i < node.childNodes.length; i++) { var p = SOAPClient._node2object(node.childNodes[i], wsdl); obj[node.childNodes[i].nodeName] = p; } return obj; } // list node else { // create node ref var l = new Array(); for(var i = 0; i < node.childNodes.length; i++) l[l.length] = SOAPClient._node2object(node.childNodes[i], wsdl); return l; } return null; } SOAPClient._extractValue = function(node, wsdl) { var value = node.nodeValue; switch(SOAPClient._getTypeFromWsdl(node.parentNode.nodeName, wsdl).toLowerCase()) { default: case "s:string": return (value != null) ? value + "" : ""; case "s:boolean": return value+"" == "true"; case "s:int": case "s:long": return (value != null) ? parseInt(value + "", 10) : 0; case "s:double": return (value != null) ? parseFloat(value + "") : 0; case "s:datetime": if(value == null) return null; else { value = value + ""; value = value.substring(0, value.lastIndexOf(".")); value = value.replace(/T/gi," "); value = value.replace(/-/gi,"/"); var d = new Date(); d.setTime(Date.parse(value)); return d; } } } SOAPClient._getTypeFromWsdl = function(elementname, wsdl) { var ell = wsdl.getElementsByTagName("s:element"); // IE if(ell.length == 0) ell = wsdl.getElementsByTagName("element"); // MOZ for(var i = 0; i < ell.length; i++) { if(ell[i].attributes["name"] + "" == "undefined") // IE { if(ell[i].attributes.getNamedItem("name") != null && ell[i].attributes.getNamedItem("name").nodeValue == elementname && ell[i].attributes.getNamedItem("type") != null) return ell[i].attributes.getNamedItem("type").nodeValue; } else // MOZ { if(ell[i].attributes["name"] != null && ell[i].attributes["name"].value == elementname && ell[i].attributes["type"] != null) return ell[i].attributes["type"].value; } } return ""; } // private: xmlhttp factory SOAPClient._getXmlHttp = function() { try { if(window.XMLHttpRequest) { var req = new XMLHttpRequest(); // some versions of Moz do not support the readyState property and the onreadystate event so we patch it! if(req.readyState == null) { req.readyState = 1; req.addEventListener("load", function() { req.readyState = 4; if(typeof req.onreadystatechange == "function") req.onreadystatechange(); }, false); } return req; } if(window.ActiveXObject) return new ActiveXObject(SOAPClient._getXmlHttpProgID()); } catch (ex) {} throw new Error("Your browser does not support XmlHttp objects"); } SOAPClient._getXmlHttpProgID = function() { if(SOAPClient._getXmlHttpProgID.progid) return SOAPClient._getXmlHttpProgID.progid; var progids = ["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; var o; for(var i = 0; i < progids.length; i++) { try { o = new ActiveXObject(progids[i]); return SOAPClient._getXmlHttpProgID.progid = progids[i]; } catch (ex) {}; } throw new Error("Could not find an installed XML parser"); } //SwitchDomain(); if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; MainNavigationCommon = new Object(); MainNavigationCommon.strSSOErrorMessage = "Nume de utilizator sau parola nu sunt ok "; MainNavigationCommon.strAsHomepage1 = "Aradon pagina"; MainNavigationCommon.strAsHomepage2 = "de start"; MainNavigationCommon.strLogin = "Autentificare"; MainNavigationCommon.strLogout = "Ieşire"; MainNavigationCommon.strRegister = "Înregistrare"; MainNavigationCommon.strOr = ""; MainNavigationCommon.strRegisterUrl = "http://www.aradon.ro/RegisterUser/CreateUser.aspx"; MainNavigationCommon.strLoginUrl = "http://www.aradon.ro/RegisterUser/CreateUser.aspx"; MainNavigationCommon.strUNameFieldName = "SSOUserName"; MainNavigationCommon.strPWFieldName = "SSOPassword"; MainNavigationCommon.strUNameValue = "E-mail"; MainNavigationCommon.strPWValue = "Parola"; MainNavigationCommon.strProfileUrl = "http://www.aradon.ro/RegisterUser/edituser.aspx"; MainNavigationCommon.Delay = 100; function PortalUser(strUserName, strPasswordHash) { //properties this.strUserName = null; this.strPasswordHash = null; //set given values if (strUserName && strUserName != "") this.strUserName = strUserName; if (strPasswordHash && strPasswordHash != "") this.strPasswordHash = strPasswordHash; } function MainNavigationBar () { //properties this.ULNavigation = null; this.strActiveNodeID1 = null; this.nodeActive = null; this.nodeHover = null; this.Switch = null; this.strActiveNodeID2 = null; this.User = null; this.strRegisterUrl = MainNavigationCommon.strRegisterUrl; this.strLoginUrl = MainNavigationCommon.strLoginUrl; this.strLogoutUrl = null; this.strOverrideLoginUrl = null; //this is an extra property so we can see if there is an override this.strFormAction = null; this.strUNameFieldName = MainNavigationCommon.strUNameFieldName; this.strPWFieldName = MainNavigationCommon.strPWFieldName; this.strProfileUrl = MainNavigationCommon.strProfileUrl; this.boolShowLogin = true; //sets wether the login-stuff is visible or not this.evolverAccess = new EvolverSSOHandle(); this.imgPreload = new ImagePreloading(); //try to fetch user info this.User = this._ReadUserCookie(); } //"Private" methods //internal method for deactivating all top navigation elements MainNavigationBar.prototype._DeactivateTrees = function() { if (this.nodeActive != null) { if (this.nodeActive.className.match(/Double/)) this.nodeActive.className = "Double"; else this.nodeActive.className = ""; } }; //internal method for reading cookie MainNavigationBar.prototype._GetCookie = function (name){ var i=0; //Suchposition im Cookie var suche = name+"="; var cook = null; while (i-1) ? ende : document.cookie.length; cook = unescape(document.cookie.substring(i+suche.length, ende)); } i++; } return cook; }; MainNavigationBar.prototype._OpenTree = function(LIActive, thisNavigationBar) { if (LIActive == thisNavigationBar.nodeHover) { //set all other elements passive thisNavigationBar._DeactivateTrees(); LIActive.className += " Active"; thisNavigationBar.nodeActive = LIActive; } } //internal method: mouseoverevent for the list elements MainNavigationBar.prototype._Hover = function(LIActive) { var thisNavigationBar = this; window.clearTimeout(thisNavigationBar.Switch); thisNavigationBar.nodeHover = LIActive; thisNavigationBar.Switch = window.setTimeout(function () {MainNavigationBar.prototype._OpenTree(LIActive, thisNavigationBar); }, 500); }; //internal method: mouseoutevent for the list elements MainNavigationBar.prototype._HoverOut = function() { var thisNavigationBar = this; window.clearTimeout(thisNavigationBar.Switch); }; //internal method: find active list nodes for a given navigation level MainNavigationBar.prototype._FindActiveListNode = function (nodeParent, iLevel, strActiveNodeID, boolStandard) { var thisNavigationBar = this; var LI = nodeParent.firstChild; var nodeFound = null; var iNum = 0; do { if (LI && LI.nodeName == "LI") { //things todo on first level nav... if (iLevel == 0) { LI.onmouseover = function () { thisNavigationBar._Hover(this); }; LI.onmouseout = function () { thisNavigationBar._HoverOut(); }; //set this treenode active (if set) if (boolStandard) { if (iNum == 0) { this._Hover(LI); nodeFound = LI; } } else { if (LI.id == strActiveNodeID) { this._Hover(LI); nodeFound = LI; } } } //things todo on second level nav... else { if (boolStandard) { if (iNum == 0) { if (LI.className.match(/Last/)) LI.className = "Last Active"; else LI.className = "Active"; nodeFound = LI; } else { if (LI.className.match(/Last/)) LI.className = "Last"; else LI.className = ""; } } else { if (LI.id == strActiveNodeID) { if (LI.className.match(/Last/)) LI.className = "Last Active"; else LI.className = "Active"; nodeFound = LI; } else { if (LI.className.match(/Last/)) LI.className = "Last"; else LI.className = ""; } } } iNum++; } LI = LI.nextSibling; } while (LI); return nodeFound; } //opens the login form overlay MainNavigationBar.prototype._OpenLoginForm = function () { //clean up a bit... var nodeSSOMessages = document.getElementById("SSOMessages"); while (nodeSSOMessages.firstChild) nodeSSOMessages.removeChild(nodeSSOMessages.firstChild); var formLogin = document.forms["SSOLoginForm"]; var inputUserName = formLogin["SSOUser"]; var inputPassword = formLogin["SSOPassword"]; inputUserName.value = MainNavigationCommon.strUNameValue; inputPassword.value = MainNavigationCommon.strPWValue; var nodeLoginForm = document.getElementById("SSOLogin"); nodeLoginForm.style.visibility = "visible"; }; //closes the login form overlay MainNavigationBar.prototype._CloseLoginForm = function () { var nodeLoginForm = document.getElementById("SSOLogin"); nodeLoginForm.style.visibility = "hidden"; }; //reads user info from cookie and returns a PortalUser object MainNavigationBar.prototype._ReadUserCookie = function () { var NavBar = this; var strUserName; var strPasswordHash; var strActive; var User = null; var SSOCookie = null; //get the cookie SSOCookie = NavBar._GetCookie("EvoSSO"); //if (!SSOCookie) alert("No Cookie..."); if (SSOCookie == null) return null; var r = this.evolverAccess.getUserInformation(SSOCookie); if(r.Success==true){ User = new PortalUser(r.ReturnValue[0],r.ReturnValue[4]); } return User; } //"Public" methods //method for setting the active navigation node(s) MainNavigationBar.prototype.SetActiveNodes = function(strActiveNodeID1, strActiveNodeID2) { this.strActiveNodeID1 = strActiveNodeID1; this.strActiveNodeID2 = strActiveNodeID2; }; //method to authenticate user MainNavigationBar.prototype.SSOAuthenticateUser = function(strUserName, strPassword, boolKeepLoggedIn) { var nodeSSOMessages = document.getElementById("SSOMessages"); while (nodeSSOMessages.firstChild) nodeSSOMessages.removeChild(nodeSSOMessages.firstChild); var NavBar = this; var r = this.evolverAccess.authentificateUser(strUserName, strPassword, boolKeepLoggedIn); if(r[0]==true) { this.imgPreload.loadImages(r[3]); } else { nodeSSOMessages.className = "error"; nodeSSOMessages.appendChild(document.createTextNode(r[2])); nodeSSOMessages.style.display = "block"; } } MainNavigationBar.prototype.SSOLogoutUser = function() { var NavBar = this; var r = this.evolverAccess.logoutUser(); if(r[0]==true){ this.imgPreload.loadImages(r[3]); } } //method to set the SSO state display (user logged-in or not etc..) MainNavigationBar.prototype.SetSSOFragment = function () { var NavBar = this; var nodeSSOFragment = document.getElementById("SSOFragment"); var spanUserName = document.createElement("span"); var aUserName = document.createElement("a"); var spanFade = document.createElement("span"); var spanLoginRegister = document.createElement("span"); var spanEmptyPane = document.createElement("span"); var aLogin = document.createElement("a"); var aLogout = document.createElement("a"); var aRegister = document.createElement("a"); var aSetAsHomepage = document.createElement("a"); spanUserName.className = "UserName"; spanEmptyPane.className = "EmptyPane"; spanFade.className = "Fade"; spanLoginRegister.className = "LoginRegister"; aSetAsHomepage.className = "SetAsHomepage"; //clear the Fragment first... while (nodeSSOFragment.firstChild) nodeSSOFragment.removeChild(nodeSSOFragment.firstChild); aSetAsHomepage.appendChild(document.createTextNode(MainNavigationCommon.strAsHomepage1)); aSetAsHomepage.appendChild(document.createElement("br")); aSetAsHomepage.appendChild(document.createTextNode(MainNavigationCommon.strAsHomepage2)); aSetAsHomepage.href = "http://www.aradon.ro/engine.aspx/page/special-setstartpage"; //do only if login-stuff should be visible if (this.boolShowLogin) { //check if user is logged in... if (this.User) { //do something... aUserName.appendChild(document.createTextNode(this.User.strUserName)); //link to user profile aUserName.href= this.strProfileUrl.replace(/###username###/, this.User.strUserName); //mandatory - if not set here and email is user name the link to portal will be displayed(ie) aUserName.childNodes[0].nodeValue = this.User.strUserName; spanUserName.appendChild(aUserName); spanUserName.appendChild(spanFade); spanUserName.appendChild(document.createElement("br")); aLogout.appendChild(document.createTextNode(MainNavigationCommon.strLogout)); aLogout.title = MainNavigationCommon.strLogout; if (this.strLogoutUrl) { aLogout.href = this.strLogoutUrl; } else { aLogout.href = "#"; aLogout.onclick = function () {NavBar.SSOLogoutUser(); return false; } } spanUserName.appendChild(aLogout); nodeSSOFragment.appendChild(spanUserName); } else { //do something else :) ... aLogin.appendChild(document.createTextNode(MainNavigationCommon.strLogin)); aLogin.href = this.strLoginUrl; //only append the onclick event if there is no override for the loginurl if (!this.strOverrideLoginUrl) { aLogin.onclick = function () { NavBar._OpenLoginForm(); return false }; aLogin.href = this.strLoginUrl; } else { aLogin.href = this.strOverrideLoginUrl; aLogin.onclick = function (){}; } aRegister.appendChild(document.createTextNode(MainNavigationCommon.strRegister)); aRegister.href = this.strRegisterUrl; spanLoginRegister.appendChild(aLogin); spanLoginRegister.appendChild(document.createTextNode(" " + MainNavigationCommon.strOr + " ")); spanLoginRegister.appendChild(document.createElement("br")); spanLoginRegister.appendChild(aRegister); nodeSSOFragment.appendChild(spanLoginRegister); //set stuff in login pane var aRegisterLP = document.getElementById("SSOLinkRegister"); var formLogin = document.forms["SSOLoginForm"]; var inputUserName = formLogin["SSOUser"]; var inputPassword = formLogin["SSOPassword"]; var aSubmitButton = document.getElementById("SSOLinkSubmit"); aRegisterLP.href = aRegister.href; //only use the formaction if there is one defined via the override method // - otherwise we use a onclickevent which tries to login the user via a call // to the SNPEWebservice. if (this.strFormAction) { formLogin.action = this.strFormAction; aSubmitButton.onclick = function () { document.forms['SSOLoginForm'].submit(); return false; }; formLogin.onsubmit = function () {}; } else { formLogin.onsubmit = function () { NavBar.SSOAuthenticateUser(document.forms['SSOLoginForm']["SSOUser"].value, document.forms['SSOLoginForm']["SSOPassword"].value, document.forms['SSOLoginForm']["SSOKeepLoggedIn"].checked); return false; }; aSubmitButton.onclick = function () { NavBar.SSOAuthenticateUser(document.forms['SSOLoginForm']["SSOUser"].value, document.forms['SSOLoginForm']["SSOPassword"].value, document.forms['SSOLoginForm']["SSOKeepLoggedIn"].checked); return false; }; } inputUserName.name = this.strUNameFieldName; inputPassword.name = this.strPWFieldName; } } //do only if login-stuff should not be visible else { nodeSSOFragment.appendChild(spanEmptyPane); } nodeSSOFragment.appendChild(aSetAsHomepage); }; //method: override settings of the navigation bar MainNavigationBar.prototype.OverrideSettings = function(strLoginUrl, strLogoutUrl, strRegisterUrl, strFormAction, strUNameFieldName, strPWFieldName, strProfileUrl, boolShowLogin) { if (strLoginUrl) this.strOverrideLoginUrl = strLoginUrl; if (strLogoutUrl) this.strLogoutUrl = strLogoutUrl; if (strRegisterUrl) this.strRegisterUrl = strRegisterUrl; if (strFormAction) this.strFormAction = strFormAction; if (strUNameFieldName) this.strUNameFieldName = strUNameFieldName; if (strPWFieldName) this.strPWFieldName = strPWFieldName; if (strProfileUrl) this.strProfileUrl = strProfileUrl; if (boolShowLogin != null) this.boolShowLogin = boolShowLogin; } //method: override the user data MainNavigationBar.prototype.OverrideUser = function(strUsername, strPasswordHash) { if (strUsername) this.User = new PortalUser (strUsername, strPasswordHash); else this.User = null; } //initialize the navigation MainNavigationBar.prototype.Init = function() { this.ULNavigation = document.getElementById("MainNavigationBar"); var boolFoundFirst = false; var boolFoundSecond = false; //walk through tree var thisNavigationBar = this; var ActiveNode1 = this._FindActiveListNode(this.ULNavigation, 0, this.strActiveNodeID1, false); //if active first level node was found, try to get active second level node if (ActiveNode1) { var UL = ActiveNode1.firstChild; do { if (UL && UL.nodeName == "UL") this._FindActiveListNode(UL, 1, this.strActiveNodeID2, false); UL = UL.nextSibling; } while (UL); } //use standard tab(s) if first level node not found else { var ActiveNode1 = this._FindActiveListNode(this.ULNavigation, 0, "", true); if (ActiveNode1) { var UL = ActiveNode1.firstChild; do { if (UL && UL.nodeName == "UL") this._FindActiveListNode(UL, 1, "", true); UL = UL.nextSibling; } while (UL); } } this.SetSSOFragment(); } // javascripts.js // Author: Alexander Aberer // Date: 27.7.2000 // Last modified: 8.6.2001 (Andreas Ritter) // Last modified: 2.7.2003 (Alexander Aberer) // Last modified: 19.2.2004 (Stephan Schwärzler) - Opera // Last modified: 10.12.2004 (Norbert Kujbus) - Google callback function // Last modified: 15.01.2005 (Norbert Kujbus) - Remove Google callback function // Last modified: 14.04.2005 (Csaba Mezo) - Introduce CountIt function // !!!Wichtig!!! Die folgende Variable mu gesetzt werden wenn ber open_window() // Seiten auf externen/fremden Webservern geffnet werden sollen. if (document.domain.indexOf("aradon.ro") > -1) document.domain = "aradon.ro"; var blank_page = "about:blank"; function SwitchWebservice(switchform,formelement) { var fe, dummy; if(typeof formelement != "undefined") { fe = formelement; } else { fe = switchform.elements[0]; } if (fe.selectedIndex != 0) { var pulldownindex = fe.selectedIndex; var url = fe.options[pulldownindex].value; locarray = url.split("|"); if ( locarray.length > 1 ) { windata = locarray[0].split(","); dummy = open_window(locarray[1],windata[0],windata[1],windata[2],0,0,"scrollbars=" + windata[3] + ",location=no,toolbar=no,status=no,menubar=no,resizable=yes,dependent=yes"); } else { dummy = open_window(url,"",700,480,10,10,"location=yes,toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,dependent=no"); } } } function realmedia(path,name,content) { var datestr = new Date(); url = 'http://apps.vol.at/tools/realaudio/embed.asp?cont=' + content + '&title=' + escape(name) + '&file=' + escape(path) + "&" + escape(datestr.toLocaleString()); if (content=='video') { var rc_video=window.open(url,'rc_video','width=230,height=310,resizable=yes'); rc_video.focus(); } else { var rc_audio=window.open(url,'rc_audio','width=400,height=40'); rc_audio.focus(); } } function open_window(targetX,name,width,height,posx,posy,windowoptions,init_target) { var it, wo, px, py, host,target; it = targetX; wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes"; px = py = 0; target = targetX; if(typeof new_window != "undefined") { if(new_window.closed != true) { new_window.close(); } } if (typeof posx != "undefined") px = posx; if (typeof posy != "undefined") py = posy; if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions; if (typeof init_target != "undefined") { it = init_target; } else { if (targetX.indexOf("http://") != -1) { host = "http://" + window.location.hostname; if (navigator.appName != "Opera") { if (targetX.indexOf(host) == -1) it = blank_page; } } } new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo); //new_window.moveTo(px,py); new_window.location.replace(targetX); new_window.focus(); return false; } function setUrlForPrint() { sUrl = document.location.href; if ((document.all) || (document.layers)){ sUrl = sUrl.replace(/\?/, "\\/"); sUrl = sUrl.replace(/\&/, "//"); } document.printform.url.value = sUrl; } //Script to invoke OEWA measurement on page events (click) function CountIt(what) { var OEWA1="http://austria.oewabox.at/cgi-bin/ivw/CP/"+what; var OEWA2="http://a-vol.oewabox.at/cgi-bin/ivw/CP/"+what; var counter1 = new Image; var counter2 = new Image; counter1.src = OEWA1+"?r="+escape(document.referrer); counter2.src = OEWA2+"?r="+escape(document.referrer); } // Function for URL (GET) Parameter function getURLParam(name) { var q = document.location.search; var i = q.indexOf(name + '='); if (i == -1) { return false; } var r = q.substr(i + name.length + 1, q.length - i - name.length - 1); i = r.indexOf('&'); if (i != -1) { r = r.substr(0, i); } return r.replace(/\+/g, ' '); } // resizes a window depending on its content and a given width to the optimal size function resizeWindowToOptimalSize(oW,divId) { if( !document.getElementById ) return false; var oH = document.getElementById(divId); if( !oH ) { return false; } var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; } window.resizeTo( oW, oH ); var myW = 0, myH = 0, d = document.documentElement, b = document.body; if( window.innerWidth ) { myW = window.innerWidth; myH = window.innerHeight; } else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; } else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; } if( window.opera && !document.childNodes ) { myW += 16; } window.resizeTo( oW + ( oW - myW ), oH + ( oH - myH ) ); } function open_window_astitle(target,name,width,height) { void(open_window(target,name,width,height)); } // google.js - for managing additional content on the right side // Author: Norbert Kujbus // Date: 2004.09.01 function _GetElement(id) { var Opera = window.opera ? true : false; if (document.layers) { fixedElement = document[id]; } else if (document.getElementById && !Opera) { fixedElement = document.getElementById(id); } else if (document.all && !Opera) { fixedElement = document.all[id]; } else if (Opera) { fixedElement = document.getElementById(id); } return fixedElement; } function HideSourcePane() { source = _GetElement("SpecialNarrowSource"); isAdmin = document.forms[0].q; if (source && isAdmin) { source.visibility = "hidden"; source.display = "none"; } } function TransferPane() { //move narrow ads to the right position source = _GetElement("SpecialNarrowSource"); target = _GetElement("SpecialNarrowTarget"); if (source && target) { target.innerHTML = source.innerHTML; source.innerHTML = ""; source.visibility = "hidden"; source.display = "none"; } } function DisableFilter() { document.location += "&filter=0"; } //google javascript solution for clickable table cells function ss(w) { window.status=w;return true; } function cs() { window.status=''; } function ga(o,e) { if (document.getElementById) { a=o.id.substring(1); p = ""; r = ""; g = e.target; if (g) { t = g.id; f = g.parentNode; if (f) { p = f.id; h = f.parentNode; if (h) r = h.id; } } else { h = e.srcElement; f = h.parentNode; if (f) p = f.id; t = h.id; } if (t==a || p==a || r==a) return true; lnk = document.getElementById(a); if (lnk.target != "") { window.open(lnk.href, lnk.target); } else { location.href=document.getElementById(a).href; } } } function google_ad_request_done(google_ads) { // Proceed only if we have ads to display! if (google_ads.length < 1 ) return; // Display ads in a table document.write("
"); // Print "Ads By Google" -- include link to Google feedback page if available document.write("
"); if (google_info.feedback_url) { document.write("Ads by Google"); } else { document.write("Google Anzeigen"); } document.write("
"); document.write(""); } // Finish up anything that needs finishing up document.write ("
"); // For text ads, display each ad in turn. // In this example, each ad goes in a new row in the table. if (google_ads[0].type == 'text') { for(i = 0; i < google_ads.length; ++i) { document.write("
" + "
"+ "" + google_ads[i].line1 + "
" + google_ads[i].line2 + " " + google_ads[i].line3 + "
" + ""+ google_ads[i].visible_url + "
"); } } // For an image ad, display the image; there will be only one . if (google_ads[0].type == 'image') { document.write("
" + "" + "
"); } //***SearchBox*** //prototype object: SearchBox function SearchBox(sContainerNodeID) { this.ContainerNodeID = sContainerNodeID; this.nodeContainer = null; this.horTabs = null; this.verTabs = null; this.arrTabs = new Array(); this.searchWord = ""; //use this if you want to fill the searchbox with any search word on startup this.lastActiveTab = 1; var SearchBox = this; //CSS definitions this.ActiveClass = "Active"; this.LastClass = "Last"; this.HorTabsID = "horTabs"; this.VerTabsID = "morelist"; this.NoSearchTabID = "NoSearchTab"; this.HiddenDivID = "shadow_gray"; this.ArrowName = "arrow"; this.ArrowUp = "http://www.roon.ro/SysRes/SNPESkin/SearchBox/Buttons/arrowUp.png"; this.ArrowDown = "http://www.roon.ro/SysRes/SNPESkin/SearchBox/Buttons/arrowDown.png"; this.VerTabsItemID = "listitem"; this.VerTabsSpaceholderItemID = "spaceholder"; this.SearchFormID = "searchbox"; this.PageBodyID = "RO_Body"; // poate trebuie modificat if (document.getElementById(sContainerNodeID)) this.nodeContainer = document.getElementById(sContainerNodeID); if (this.nodeContainer != null) { this.horTabs = document.getElementById(this.HorTabsID); this.verTabs = document.getElementById(this.VerTabsID); this.horLIs = this.horTabs.getElementsByTagName("li"); this.verLIs = this.verTabs.getElementsByTagName("li"); // Traverse through horizontal li elements for (var i = 0; i < this.horLIs.length; ++i) { this.horLIs[i].className = ''; var TabTitle = this.FindFirstChild(this.horLIs[i], "H3"); var Content = this.FindFirstChild(this.horLIs[i], "FORM"); this.CleanUp(this.horLIs[i]); if (TabTitle != null && Content != null) { this.AddTab("HorTab" + i, TabTitle.innerHTML, TabTitle.className, Content); var a = document.createElement("a"); if (this.horLIs[i].id != this.NoSearchTabID) { var OnClickEvent = function () { SearchBox.CopySearchWord(); SearchBox.Activate(this.id, true); SearchBox.Visibility("off"); }; } else { var OnClickEvent = function () { SearchBox.Activate(this.id, false); if ("none" == document.getElementById(SearchBox.HiddenDivID).style.display || document.getElementById(SearchBox.HiddenDivID).style.display == "") { SearchBox.Visibility("on"); } else { SearchBox.Visibility("off"); } }; } a.href = "javascript:void(0);"; a.onclick = OnClickEvent; a.id = "HorTab" + i; a.style.cursor = "pointer"; a.innerHTML = TabTitle.innerHTML; this.horLIs[i].appendChild(a); } } // Traverse through vertical li elements for (var i = 0; i < this.verLIs.length; ++i) { this.verLIs[i].className = ''; var Tab = this.FindFirstChild(this.verLIs[i], "A"); this.CleanUp(this.verLIs[i]); if (Tab != null) { this.verLIs[i].appendChild(Tab); if (this.verLIs[i].innerHTML != "") { this.verLIs[i].className = this.VerTabsItemID; } else { //blank LI is used as spaceholder for seperating list this.verLIs[i].className = this.VerTabsSpaceholderItemID; } } } //define MouseEvents for Morelist var MoreListON = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); SearchBox.Visibility("on"); }; var MoreListOFF = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); SearchBox.reactivateLastActiveTab(); SearchBox.Visibility("off"); }; var delayedMoreListOFF = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); moreListTimeout = setTimeout(function(){SearchBox.Visibility("off");SearchBox.reactivateLastActiveTab();},1500); }; //event for click on SearchBox (either textBox or button) var searchFormular = document.getElementById(this.SearchFormID); searchFormular.onmouseup = MoreListOFF; //close list immediately if there was a click on the searchbox //events for LIs in morelist var ULMorelist = document.getElementById(this.VerTabsID); ULMorelist.onmouseover = MoreListON; //if mouse is over Morelist, fire this event to prevent closing the list ULMorelist.onmouseout = delayedMoreListOFF; //do not close list immediately, give the user a second, perhaps he slipped out ULMorelist.onclick = MoreListOFF; //close list, although the page will be left... //events for the whole page var pageBody = document.getElementById(this.PageBodyID); pageBody.onmouseup = delayedMoreListOFF; //prevent, that the H3s and FORMs on load of page are visible -> set visibility to visible in order to make the A elements visible this.horTabs.style.visibility = 'visible'; } } //activate this tab including form an background onload SearchBox.prototype.ActivateOnLoad = function (iNumber) { if (this.nodeContainer != null) { TabIdByNumber = this.arrTabs[iNumber-1].sTabID; this.Activate(TabIdByNumber,true); } } //method for finding the first child node with a certain node name SearchBox.prototype.FindFirstChild = function (nodeParent, sNodeName) { var nodeChild = nodeParent.firstChild; do { if (nodeChild && nodeChild.nodeName == sNodeName) return nodeChild; nodeChild = nodeChild.nextSibling; } while (nodeChild); return null; } //method for adding a Tab to Array SearchBox.prototype.AddTab = function(sTabID, sTabName, sBackgroundClass, ContentNode) { var newtab = new SearchBoxTab (sTabID, sTabName, sBackgroundClass, ContentNode); this.arrTabs.push(newtab); } //method for assigning a tab to class "Active" SearchBox.prototype.SetActiveTab = function(iNumber) { //active tab is in class "Active" for (var i = 0; i <= this.horLIs.length-1; i++) { this.horLIs[i].className = ""; if (i == iNumber-1) { this.horLIs[iNumber-1].className = this.ActiveClass; } } //last tab is in class "Last" this.horLIs[this.horLIs.length-1].className += " " + this.LastClass; } //method for reactivating the last active tab SearchBox.prototype.reactivateLastActiveTab = function() { TabIdByNumber = this.arrTabs[this.lastActiveTab-1].sTabID; this.Activate(TabIdByNumber,false); } //method for activating or deactivating the morelist SearchBox.prototype.Visibility = function(sOption) { var SearchBox = this; divChanger = document.getElementById(this.HiddenDivID); arrowPicture = document.getElementsByName(this.ArrowName); if (sOption == "on") { divChanger.style.display = 'block'; arrowPicture[0].src = this.ArrowUp; } if (sOption == "off") { divChanger.style.display = 'none'; arrowPicture[0].src = this.ArrowDown; } } //method for cleaning up the H3 and FORM elements which are replaced by an A element SearchBox.prototype.CleanUp = function(nodeContainer) { //clean up and remove all childs in container while (nodeContainer.firstChild) nodeContainer.removeChild(nodeContainer.firstChild) } //if user clicks on a Tab, this method looks in array which tab has been clicked and sets the active tab and changes the background SearchBox.prototype.Activate = function(id, bDrawContent) { this.id = id; this.bDrawContent = bDrawContent; var iIndex = this.GetIndexOfTabID(this.id); this.SetActiveTab(iIndex+1); //change background image var searchBackground = document.getElementById(this.ContainerNodeID); bgClass = this.arrTabs[iIndex].sBackgroundClass; searchBackground.className = bgClass; if (this.bDrawContent) { this.lastActiveTab = iIndex+1; this.DrawContent(iIndex); } } //this method puts the content of the FORM in an DIV (searchbox) SearchBox.prototype.DrawContent = function(iIndex) { if (iIndex != null) { //includes the html elements for the new search newSearch = this.arrTabs[iIndex].nodeContent; var eSearchForm = document.getElementById(this.SearchFormID); this.CleanUp(eSearchForm); //repleace the current search form eSearchForm.appendChild(newSearch); //pastes the copy of the last active search to the new search this.PasteSearchWord(); } } //this method finds the index of a Tab by TabID SearchBox.prototype.GetIndexOfTabID = function (sTabID) { for (var i = 0; i <= this.arrTabs.length-1; i++) { var iIndex = this.arrTabs[i].sTabID == sTabID ? i : null; if(iIndex != null) return iIndex; } } //this method creates a copy of the last active search SearchBox.prototype.CopySearchWord = function () { for (var i = 0; i < document.searchForm.length; ++i) { if (document.searchForm.elements[i].type == "text") { this.searchWord = document.searchForm.elements[i].value; } } } //this method pastes the copy of the last active search to the new search SearchBox.prototype.PasteSearchWord = function () { for (var i = 0; i < document.searchForm.length; ++i) { if (document.searchForm.elements[i].type == "text") { document.searchForm.elements[i].value = this.searchWord; } } } //object: SearchBoxTab function SearchBoxTab(sTabID, sTabName, sBackgroundClass, nodeContent) { //properties & defaults this.sTabName = "New Tab"; this.nodeContent = null; this.sTabID = null; this.sBackgroundClass = null; //set properties if (nodeContent) this.nodeContent = nodeContent; if (sTabName) this.sTabName = sTabName; if (sTabID) this.sTabID = sTabID; if (sBackgroundClass) this.sBackgroundClass = sBackgroundClass; } //teleport custom: move ads to target containers function moveAdverserveAds() { var PortalAdPositions = OAS_listpos.split(','); var ContainerPrefix = 'AdContainer_'; var ProviderPrefix = 'AdProvider_'; //cycle through all ad positions, try to move them for (var i = 0; i < PortalAdPositions.length; ++i) { if (document.getElementById(ContainerPrefix + PortalAdPositions[i]) && document.getElementById(ProviderPrefix + PortalAdPositions[i])) { try { document.getElementById(ContainerPrefix + PortalAdPositions[i]).appendChild(document.getElementById(ProviderPrefix + PortalAdPositions[i])); } catch(e){ //alert('error: ' + e); } } } } //new move ads function - moving adverts one by one function moveAds(PortalAdPosition) { var Ad_Container = document.getElementById('AdContainer_'+PortalAdPosition); var Ad_Provider = document.getElementById('AdProvider_'+PortalAdPosition); if (Ad_Container && Ad_Provider) { try { while (Ad_Container.firstChild) Ad_Container.removeChild(Ad_Container.firstChild) Ad_Provider.removeAttribute('style') Ad_Container.appendChild(Ad_Provider); } catch(e){ //alert('error: ' + e); } } } /*** CAMAO Adsense Klasse zum verwalten von Google Werbung (c) CAMAO 2009 V0.1 - v2.2.3 Matthias Friedrich Beschreibung : Dieses Script verarbeitet und verwaltet die komplette Adsense Ausgabe auf der Webseite. Durch Angaben von Benutzer definierten Keywords ist es moeglich gezielt Werbung anzufragen. Liefert Google mit einem Keyword keine Werbung kann man ein 'Fallback' Keyword angeben, sollte auch hier keine Werbung kommen, ist es auch moeglich den Container, mit HTML Code zu fuellen bzw falls kein HTML Code hinterlegt wurde, den Container zu entfernen. Unterschiedliche Zonen durch unterschiedlichen Channel IDs und Keywords mit Werbung zu fuellen ist auch moeglich. Generelle Info : Es wird ein Adsense Premium Pub-ID benoetigt! Changelog : 17.08.2009 Recode des Codes 19.08.2009 Code Cleanup (debug ausgaben in funktion zusammen gefasst) Template auswahl variable gestaltet AFC als Fallback eingestellt Dokumentation erweitert 26.08.2009 Korrektur der Sprach ueberpruefung AFS Fallback Fix (Google antwort wurde nicht richtig interpretiert) 27.08.2009 getErrorLog eingebaut 28.08.2009 Google Test im debug mode aktiviert 31.08.2009 Single Adsense fallback eingebaut 07.09.2009 Single Adsense remove bugfixes 08.09.2009 Single Box Adsense remove bugfix IE8 append Template bugfix 09.09.2009 Content regex camelcase problem fix Fallback wahlweise aktivier / deaktivier bar gemacht Fallback remove container bug behoben 10.09.2009 Google-Anzeigen text mit target blank versehn 11.09.2009 New Template number 5 @Todos : - Pruefen ob der onload Event schneller sein kann als die Antworten von Google Class Instruktionen ############################ Initialisierung (bool) camaoAdsenseObj.init(options); Note : Es ist von vorteil wenn dieses Init-Script so frueh wie moeglich ausgefuehrt wird! Pflicht Optionen pubid Google Adsense PUB-ID (string) *keyword Beliebiges Keyword (Auto, Haus, Liebe ....) (string) part1 Einstellungen fuer Zone 1 (object) *keyword Beliebiges Keyword (Auto, Haus, Liebe ....) (string) type Ausgaben Type, afs oder afc (for search / for content) (string) container Container fur die Ausgaben Einstellungen (array[object]) [elementID] Bestimmt das Element an dem Werbung erscheinen soll (object) Note : der [elementID] Teil sowie part1 kann beliebig oft wiederholt werden. * Gibt man das Keyword in der obersten Ebene an , bezieht sich das auf alle Zonen Gibt man das Keyword in der Zonen Ebene an, bezieht sich das nur auf diese Zone Moegliche Optionen language Gibt die Sprache der Werbung an (de,hu,ro,...) (string) *template Legt fest welches Template verwendet werden soll (integer) part1 Siehe Pflicht Optionen fallback_keyword Falls Google mit dem Primaeren Keyword keine Werbung liefert, wird versucht mit diesem Keyword Werbung zu holen. Note : das fallback_keyword verursacht ein nachladen der Werbung von Google hints Gibt Google hilfe stellung bei der findung von Werbung, hier wird perkomma getrennt die keywords uebergeben (string) channel Google Adsense Channel ID (string) *template Legt fest welches Template verwendet werden soll (integer) container Siehe Pflicht Optionen *template Legt fest welches Template verwendet werden soll (integer) kann hier ein ersatz keyword angegeben werden. [elementID] Siehe Pflicht Optionen fallback_html Falls Google mit dem Primaeren und Secondary (falls angegeben) Keyword keine Werbung liefert, kann hier eine HTML Alternative angegeben werden (string) * Gibt man das template in der obersten Ebene an , bezieht sich das auf alle Zonen Gibt man das template in der Zonen Ebene an, bezieht sich das nur auf diese Zone Sonstiges adsenseItemOver Ist eine CSS Class die bei onmouseover geadded wird und bei onmouseout entfernt wird ############################ Aufruf Beispiel : ############################ camaoAdsenseObj.init({ 'pubid' : 'pub-4753185361919986', 'keyword' : 'adsense', 'part1' : { 'type' : 'afc', 'container' : [{ 'template' : 1, 'adsense1' : {} }] }, 'part2' : { 'type' : 'afc', 'keyword' : 'kleidung', 'container' : [{ 'template' : 2, 'adsense2' : {} },{ 'template' : 2, 'adsense3' : {} }] } }); ############################ ***/ var alreadyrunflag; function camaoAdsense(){ var ads = { 'callcount' : 0, 'recived' : [], 'noAds' : {'container':[], 'element' : [] }, 'futureCalls' : [] }; var fallbacks = { 'language' : 'ro' }; var settings = { 'codierung' : 'utf8', 'usedTemplates' : [false, false, false,false,false], 'lastdoubleclicksurl' : '', 'domReady' : false, 'defaultTemplate' : 1, 'hoverclass' : "adsenseItemOver"}; var blockedAdsense = false; var singleAdRequest = false; var activeAdsenseLoop = 1; var errorLog = ""; this.init = function(options){ try{ useddoc = this.getDocumentHandler(); ads.options = options; if (ads.options.allow_fallback == false){ ads.options.allow_fallback = false; }else{ this.debug("Activating Fallback"); ads.options.allow_fallback = true; } //Falls keine Sprache festgelegt wurde, wird die sprache anhand der Domain festgelegt if (!ads.options.language){ if(window.location.host){ hostname = window.location.host.split("."); switch(hostname[hostname.length - 1]){ case 'com': hostname = fallbacks.language; this.debug("Warning, com domain detected , use language " + fallbacks.language + "!"); break; case 'org': hostname = fallbacks.language; this.debug("Warning, org domain detected , use language " + fallbacks.language + "!"); break; case 'net': hostname = fallbacks.language; this.debug("Warning, net domain detected , use language " + fallbacks.language + "!"); break; default : hostname = fallbacks.language; } ads.options.language = hostname || fallbacks.language; }else{ ads.options.language = fallbacks.language; } this.debug("init : Set Language to " + ads.options.language); } //Wir vordern die erste Werbung an this.getNextAdsense(); //Wir warten mit dem Onload Event bis der Dom unsere elemente fertig geladen hat this.createOnloadEvent(); return true; }catch(e){ return false;} } //Wir erstellen den Onload Event this.createOnloadEvent = function(){ if (document.addEventListener) document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; camaoAdsenseObj.domReadyEvent()}, false) else if (document.all && !window.opera){ document.write('"; } //Erstellt die Zonen Variablen fuer die Werbung this.createCallScript = function(part){ adtype = part.type || "afc"; if (part.fallback == false) ads.output += "\n"; if (adtype == "afc"){ ads.output += '\n'; }else{ ads.output += '\n'; } } //Erstellt die benoetigten Templates this.createUsedTemplates = function(){ for (i = 0; i < 10; i++){ eval("part = ads.options.part" + i + " || false;"); if (part != false){ if (ads.options.template){ settings.usedTemplates[ads.options.template] = true; } for (x = 0; x < part.container.length; x++){ element = part.container[x]; for (var template in element){ if(template == "template") settings.usedTemplates[eval("element." + template)] = true; } if (part.template){ settings.usedTemplates[part.template] = true; } } } } foundActiveTemplate = false; for (i = 0; i < settings.usedTemplates.length; i++){ if (settings.usedTemplates[i] != false) foundActiveTemplate = true; } if (foundActiveTemplate == false) settings.usedTemplates[settings.defaultTemplate] = true; for (i = 0; i < settings.usedTemplates.length; i++){ if (settings.usedTemplates[i] != false){ code = this.getTemplate(i); this.debug("createUsedTemplates : Write Template Code (" + i + ")"); useddoc = this.getDocumentHandler(); newdiv = document.createElement("DIV"); newdiv.innerHTML = code; try{ useddoc.appendChild(newdiv); }catch(e){ useddoc.firstChild.appendChild(newdiv); } } } } //Gibt die gesammelten Variablen und JS Calls aus this.getAdsense = function(){ document.write(ads.output); } //Google Adsense Antwort this.reciveAdsense = function(google_ads){ blockedAdsense = false; this.debug("reciveAdsense : Reciving Adsense for Part" + ads.callcount + ""); this.debug("######"); this.debug(google_ads); this.debug("######"); partLength = 1; eval("part = ads.options.part" + (ads.callcount + 1) + " || false;"); if (part){ partLength = part.container.length; } if (singleAdRequest == false){ //Wir haben garkeine werbung erhalten if (google_ads.length == 0){ this.debug("reciveAdsense : No Ads recived for Part" + ads.callcount + ""); if (ads.noAds.container.indexOf(ads.callcount) == -1){ ads.noAds.container.push(ads.callcount); } //Wir haben werbung erhalten aber nicht fuer alle in diesem part }else if (google_ads.length != partLength ){ this.debug("reciveAdsense : Not all Adsense recived for Part" + ads.callcount + ", missed " + (partLength - google_ads.length) + " ads"); if (ads.noAds.container) if (ads.noAds.container.indexOf(ads.callcount) !== -1) ads.noAds.container[ads.noAds.container.indexOf(ads.callcount)] = -1; if (ads.noAds.element.indexOf(ads.callcount) == -1){ info = { 'callcount' : ads.callcount, 'missing' : partLength - google_ads.length, 'targets' : [], 'ads' : [] }; ads.noAds.element.push(info); } ads.recived.push({ 'ads' : google_ads, 'callcount' : ads.callcount }); }else{ this.debug("reciveAdsense : All Adsense recived for Part" + ads.callcount + "):"); //Im falle des Fallbacks, muessen wir das noAds array cleanen da wir ja jetzt doch werbung haben if (ads.noAds.container) if (ads.noAds.container.indexOf(ads.callcount) !== -1) ads.noAds.container[ads.noAds.container.indexOf(ads.callcount)] = -1; ads.recived.push({ 'ads' : google_ads, 'callcount' : ads.callcount }); } ads.callcount = ads.callcount + 1; }else{ if (google_ads.length == 0){ this.debug("reciveAdsense : No Ads recived for Part" + ads.callcount + ""); // if (ads.noAds.container.indexOf(ads.callcount) == -1){ // ads.noAds.container.push(ads.callcount); // } }else if (google_ads.length != singleAdRequest ){ this.debug("reciveAdsense : Not all Adsense recived for Part" + ads.callcount + ", missed " + (singleAdRequest - google_ads.length) + " ads"); for (var i = 0; i < ads.noAds.element.length; i++){ node = ads.noAds.element[i]; if (node.callcount == ads.callcount){ node.ads.push(google_ads); } } }else{ this.debug("reciveAdsense : All missed Adsense recived for Part" + ads.callcount + "):"); //Im falle des Fallbacks, muessen wir das noAds array cleanen da wir ja jetzt doch werbung haben if (ads.noAds.element) if (ads.noAds.element.indexOf(ads.callcount) !== -1) ads.noAds.container[ads.noAds.container.indexOf(ads.callcount)] = -1; for (var i = 0; i < ads.noAds.element.length; i++){ node = ads.noAds.element[i]; if (node.callcount == ads.callcount){ node.ads.push(google_ads); } } ads.recived.push({ 'ads' : google_ads, 'callcount' : ads.callcount }); } //Hmm darf ich das hier machen ?! ads.callcount = ads.callcount + 1; } if (settings.domReady == true){ this.insertAdsense(); } } this.insertAdsense = function(){ //Da das document fertig geladen wurde, kann man diese funktion nicht mehr verwenden, also ueberlagern wir sie //Sonst kann google nicht weiter arbeiten ;) if (ads.options.allow_fallback == true) { document.write = function(param){ camaoAdsenseObj.document_write_overload(param); } } this.debug("insertAdsense : Inserting Adsense..."); readyForClean = []; ads.useTemplateNumber = ""; if (ads.recived.length > 0){ for(var i = 0; i < ads.recived.length; i++){ recived = ads.recived[i]; eval("part = ads.options.part" + (recived.callcount + 1) + " || false;"); //(recived.callcount + 1) weil unsere Parts bei 1 anfangen nicht bei 0 if (part != false){ if (ads.options.template){ ads.useTemplateNumber = ads.options.template; } for (var x = 0; x < part.container.length; x++){ element = part.container[x]; if (part.template) ads.useTemplateNumber = part.template; for (var target in element){ if(target == "template"){ ads.useTemplateNumber = eval("element." + target); }else{ if (ads.useTemplateNumber == "") ads.useTemplateNumber = settings.defaultTemplate; if (singleAdRequest == false){ node = document.getElementById(target); if (recived.ads.length != 0){ if (node){ if (recived.ads[x]){ this.createAdsenseContext(node, recived.ads[x], ads.useTemplateNumber); }else{ this.debug("insertAdsense : Missing ad for : " + target); for (var z = 0; z < ads.noAds.element.length; z++){ noadelement = ads.noAds.element[z]; if(noadelement.callcount == recived.callcount){ noadelement.targets.push(target); } } } }else{ this.debug("insertAdsense : Unknown Target ID : " + target); } } useTemplateNumber = ""; }else{ for (var m = 0; m < ads.noAds.element.length; m++){ singleAd = ads.noAds.element[m]; if (singleAd.callcount == recived.callcount){ for (var n = 0; n < singleAd.targets.length; n++){ singleTarget = singleAd.targets[n]; if (singleTarget == target){ this.debug("insertAdsense : Single Target found : " + target); if (singleAd.ads[0][n]){ this.createAdsenseContext(document.getElementById(target), singleAd.ads[0][n], ads.useTemplateNumber); if (readyForClean.indexOf(m) == -1) { readyForClean.push(m); } }else{ this.debug("insertAdsense : No Adsense found for Single Target : " + target + ", bug?!"); } } } } } } } } } } } }else{ this.debug("insertAdsense : No normal ads found, looking for missed ads : "); for (var m = 0; m < ads.noAds.element.length; m++){ singleAd = ads.noAds.element[m]; //if (singleAd.callcount == recived.callcount){ for (var n = 0; n < singleAd.targets.length; n++){ singleTarget = singleAd.targets[n]; node = document.getElementById(singleTarget); // if (singleTarget == target){ this.debug("insertAdsense : Single Target found : " + singleTarget); if (singleAd.ads[0][n]){ this.createAdsenseContext(node, singleAd.ads[0][n], this.getTemplateIDByPart(singleAd.callcount)); if (readyForClean.indexOf(m) == -1) { readyForClean.push(m); } }else{ this.debug("insertAdsense : No Adsense found for Single Target : " + singleTarget + ", bug?!"); if (node.innerHTML == ""){ node.parentNode.removeChild(node); } } // } } //} } } for (var m = 0; m < readyForClean.length; m++){ ads.noAds.element[readyForClean[m]] = -1; } //Wir reseten das array weil wir alles verarbeitet haben was wir zurzeit haben ads.recived = new Array(); // wir sind beim letzten part, jetzt koennen wir schaun ob werbung fehlt if (this.countParts() == ads.callcount ){ for (var i = 0; i < ads.noAds.container.length; i++){ noAd = ads.noAds.container[i]; if (noAd != -1){ //(noAd + 1) weil unsere Parts bei 1 anfangen nicht bei 0 eval("part = ads.options.part" + (noAd + 1) + " || false;"); if (part != false){ this.debug("insertAdsense : No Adsense recived for Part" + (noAd)); if ( (part.fallback_keyword) && (ads.options.allow_fallback == true) ){ this.debug("insertAdsense : Using fallback keyword " + part.fallback_keyword); ads.callcount = 0; part.keyword = part.fallback_keyword; part.fallback_keyword = ""; part.fallback = true; ads.futureCalls.push(part); if (blockedAdsense == false) this.getNextAdsense(); }else{ //Wir haben kein fallback keyword gefunden also schaun wir nach //dem HTML Fallback oder entfernen den container for (var x = 0; x < part.container.length; x++){ element = part.container[x]; for (var target in element){ if(target != "template"){ node = document.getElementById(target); fallback_html = eval("part.container[x]." + target + ".fallback_html"); if (fallback_html){ this.debug("insertAdsense : Using fallback HTML"); node.innerHTML = fallback_html; }else{ this.debug("insertAdsense : No Fallback found, remove element (" + target + ")"); mainContainer = this.up(node, "adsenseContainer"); if (mainContainer){ found = false; //Existiert im Container Werbung ? if (/(adsense([0-9]+))\">(.*){1,}[^\s]<\/div>/.test(mainContainer.innerHTML.toLowerCase()) == true) { this.debug("insertAdsense : Remove only Element"); node.parentNode.removeChild(node); }else{ this.debug("insertAdsense : Remove complete container"); mainContainer.parentNode.removeChild(mainContainer); } }else{ this.debug("insertAdsense : Cant remove element, doesnt find the main class adsenseContainer"); } } } } } } } } } for (var i = 0; i < ads.noAds.element.length; i++){ noAd = ads.noAds.element[i]; eval("part = ads.options.part" + (noAd.callcount + 1) + " || false;"); if (part != false){ this.debug("insertAdsense : Missing " + noAd.missing + " adsense for Part" + (noAd.callcount)); if ( (part.fallback_keyword) && (ads.options.allow_fallback == true) ){ this.debug("insertAdsense : Using fallback keyword " + part.fallback_keyword); ads.callcount = 0; part.keyword = part.fallback_keyword; part.fallback_keyword = ""; part.fallback = true; part.howmany = noAd.missing; singleAdRequest = noAd.missing; ads.futureCalls.push(part); if (blockedAdsense == false) this.getNextAdsense(); }else{ for (var y=0; y < noAd.targets.length; y++){ target = noAd.targets[y]; for (var x = 0; x < part.container.length; x++){ element = part.container[x]; for (var singleTarget in element){ if (singleTarget == target){ fallback_html = eval("part.container[x]." + target + ".fallback_html"); node = document.getElementById(target); if (fallback_html){ this.debug("insertAdsense : Using fallback HTML for " + " + target + "); node.innerHTML = fallback_html; }else{ mainContainer = this.up(node, "adsenseContainer"); if (mainContainer){ this.debug("insertAdsense : No Fallback found, remove element (" + target + ")"); found = false; //Existiert im Container Werbung ? if (/(adsense([0-9]+))\">(.*){1,}[^\s]<\/div>/.test(mainContainer.innerHTML.toLowerCase()) == true) { this.debug("insertAdsense : Remove only Element"); node.parentNode.removeChild(node); }else{ this.debug("insertAdsense : Remove complete container"); mainContainer.parentNode.removeChild(mainContainer); } }else{ this.debug("insertAdsense : Cant remove element, doesnt find the main class adsenseContainer"); } } } } } } } } } } } //Wird bei verwendung von document.write aufgerufen (after dom ready!) this.document_write_overload = function(param){ quelle = false; useddoc = this.getDocumentHandler(); this.debug("document_write_overload : Recive Code : "); this.debug(param); if (param.indexOf("google_ad_output") !== -1){ parts_tmp1 = param.split(""); parts_tmp2 = parts_tmp1[1].split("" + "" + ""; }else if (part == 2){ return "" + "
" + "" + "
"; }else if (part == 3){ return "" + "
" + "" + "
"; }else if (part == 4){ return "" + "
" + "" + "
"; }else if (part == 5){ return "" + ""; }else if (part == 6){ return "" + "
" + "" + "
"; }else if (part == 91){ return "" + "
" + "" + "
"; } } //Helper Functions this.getDocumentHandler = function(){ return document.body || document.documentElement; } this.$ = function(id){ return document.getElementById(id); } this.select = function(element, str){ var Rx= RegExp('\\b'+str+'\\b'); var who, i= 0, A= [], tem, temp; var G= element.getElementsByTagName('*'); while(G[i]){ tem= G[i++]; temp=tem.className|| ''; if(Rx.test(temp)) A.push(tem); } return A; } this.up = function(element, classname){ if (element){ if (element.className.indexOf(classname) != -1){ return element; }else{ stop = false; do{ if (!element.parentNode) stop = true; element = element.parentNode; try{ if (element.className.indexOf(classname) != -1) return element; }catch(e){} } while(stop == false); } }else{ false; } } this.debug = function(msg){ if (ads.options.debug){ console.log(msg); }else{ errorLog = errorLog + "\n" + msg; } } this.getErrorLog = function(){ return errorLog; } } //Falls wir im IE sind dann kennt er indexOF nicht, also nachbaun ;) if(!Array.indexOf){ Array.prototype.indexOf = function(obj){ for(var i=0; i= this.preImages.length) { this.initImages(); if(callback) callback(); else window.location.reload(); return; } for (this.i = 0; this.i < this.preImages.length; this.i++) { if (this.loaded[this.i] === false && this.preImages[this.i].complete) { this.loaded[this.i] = true; this.currCount++; } } if(this.currImage < this.currCount){ this.currImage = this.currCount; this.currTimeout = this.passTimeout; }else{ this.currTimeout = this.currTimeout + this.passTimeout; } if( (this.currTimeout - this.passTimeout) >= this.maxTimeout){ this.loaded[this.currCount] = true; this.currCount++; } var self = this; this.timerID = window.setTimeout(function(){self.checkLoad(callback);},this.passTimeout); }; /***********************************************************/ /* End image preloading class */ /***********************************************************/ EvolverSSOHandle.strSSOWebServiceUrl = "http://www.roon.ro/SSOWebservice/Service.asmx"; EvolverSSOHandle.strSSOWebServiceAuthMethod = "EVOSSOLoginUser"; EvolverSSOHandle.strSSOWebServiceLogoutMethod = "EVOSSOLogout"; EvolverSSOHandle.strSSOWebServiceGetDataMethod = "EVOSSOGetAllUserDataSpecCookie"; function EvolverSSOHandle(){ } EvolverSSOHandle.prototype.getUserInformation = function(cookieVal){ var UseSoap = true; var Params = new SOAPClientParameters(); Params.add('cookieVal',cookieVal); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceGetDataMethod, Params, false, null ); return r; } EvolverSSOHandle.prototype.authentificateUser = function(user, pass, boolKeepLoggedIn){ var UseSoap = true; var Params = new SOAPClientParameters(); Params.add("login", user); Params.add("pass", pass); if(boolKeepLoggedIn==true) Params.add("permLogin","1"); else Params.add("permLogin","0"); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceAuthMethod, Params, false, null ); return r; } EvolverSSOHandle.prototype.logoutUser = function(){ var UseSoap = true; var Params = new SOAPClientParameters(); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceLogoutMethod, Params, false, null ); return r; } var UseEvolverSSOSwitch = tru//END1 //START2 // Creates arrays of strings that will be evaluated as Javascript commands. // This allows for the execution of many JavaScript commands to be added to the body elements onload as one method call. var onLoadStack = new Array(); // Internal array where commands are stored as strings; var onLoadLastStack = new Array(); // Internal array where commands are stored to be done last addToOnLoad = function(commandStr){ if(typeof(commandStr) == "string"){ onLoadStack[onLoadStack.length] = commandStr; return true; } return false; } addToOnLoadLast = function(commandStr){ if(typeof(commandStr) == "string"){ onLoadLastStack[onLoadLastStack.length] = commandStr; return true; } return false; } var onLoadExecuted = 0; executeOnLoadStack = function() { if(onLoadExecuted) return; for (var x=0; x < onLoadStack.length; x++) { eval(onLoadStack[x]); } for (var x=0; x < onLoadLastStack.length; x++) { eval(onLoadLastStack[x]); } onLoadExecuted = 1; } document.onload = executeOnLoadStack; //END2  if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; //prototype object:Tab function Tab(strTabID, strTabName, nodeContent) { //properties & defaults this.strTabName = "New Tab"; this.nodeContent = null; this.strTabID = null; //set properties if (nodeContent) this.nodeContent = nodeContent; if (strTabName) this.strTabName = strTabName; if (strTabID) this.strTabID = strTabID; } //prototype object: TabBox function PortalTabBox(strContainerNodeID, iBoxHeight, boolCycle, iCyclePeriod) { //properties & defaults this.nodeContainer = null; this.nodeContent = document.createElement("div"); this.strID = "TabBox"; this.arrTabs = new Array(); this.strActiveTabID = null; this.iBoxHeight = 200; this.boolCycle = false; this.iCyclePeriod = 5000; this.strHeadlineMarkup = null; this.boolAdminMode = false; //set properties this.iBoxHeight = iBoxHeight; this.boolCycle = boolCycle; this.iCyclePeriod = iCyclePeriod; if (document.getElementById(strContainerNodeID)) this.nodeContainer = document.getElementById(strContainerNodeID); } //method for TabBox: add a tab PortalTabBox.prototype.AddTab = function(strTabID, strTabName, ContentNode) { //alert(ContentNode.innerHTML); var newtab = new Tab (strTabID, strTabName, ContentNode); this.arrTabs.push(newtab); }; //method for TabBox: set the active tab PortalTabBox.prototype.SetActiveTab = function(strTabID) { //alert(strTabID); this.strActiveTabID = strTabID; }; //method for TabBox: change active tab PortalTabBox.prototype.ChangeTab = function(strTabID) { //alert (strTabID); this.SetActiveTab(strTabID); this.Render(); return false; }; //method for TabBox: toggle cycling through active tabs PortalTabBox.prototype.ToggleCycleTabs = function (boolActive) { this.boolCycle = boolActive; }; //method for TabBox: go to next Tab PortalTabBox.prototype.GoToNextTab = function () { if (this.boolCycle) { //find next tab var strNextTabID; for (var t=0; t 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox1Col115TopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox1Col115BottomLinks"; var nodeContentProvider; this.nodeContent.className = "TabBox1Col115Content"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height //36 iContentHeight = this.iBoxHeight - ( (this.arrTabs.length * 30) + 17 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if (boolActiverow) { iNextElement = t + 1; break; } } PaneBottom.appendChild(ULTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////1 COLUMN////////////////// //inherits TabBox function TabBox1Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox1Col.prototype = new PortalTabBox(); //method for TabBox1Col: render the box TabBox1Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var TabBox = this; var Box1Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); //assign css classes; Box1Col.className = "TabBox1Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox1ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox1ColBottomLinks"; var nodeContentProvider; this.nodeContent.className = "TabBox1ColContent"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height //36 iContentHeight = this.iBoxHeight - ( (this.arrTabs.length * 30) + 17 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if (boolActiverow) { iNextElement = t + 1; break; } } PaneBottom.appendChild(ULTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////2 COLUMNS////////////////// //inherits TabBox function TabBox2Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox2Col.prototype = new PortalTabBox(); //method for TabBox2Col: render the box TabBox2Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var Box2Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); var ClearFloat = document.createElement("br"); //assign css classes Box2Col.className = "TabBox2Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; ClearFloat.className = "Clear"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var TabBox = this; var col = 0; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox2ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox2ColBottomLinks"; var nodeContentProvider; var ClearFloatTop = ClearFloat.cloneNode(false); var ClearFloatBottom = ClearFloat.cloneNode(false); this.nodeContent.className = "TabBox2ColContent"; var nodeContentFooter = document.createElement("div"); nodeContentFooter.className = "TabBox2ColContentFooter"; var iNextElement = 0; var iContentHeight = this.iBoxHeight //calculate content height // iContentHeight = this.iBoxHeight - ( (Math.ceil(this.arrTabs.length/2) * 30) + 20 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 1) li.className = "Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) this.nodeContent.className += " LeftTab"; else this.nodeContent.className += " RightTab"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); //leave iteration if active tab is in this row if ((col==1 && boolActiverow) || (t==(this.arrTabs.length-1) && boolActiverow)) { iNextElement = t + 1; break; } col = col + 1; if (col>1) col = 0; } PaneBottom.appendChild(ULTop); PaneBottom.appendChild(ClearFloatTop); //do only if there is a active tab if (boolActiverow) { this.DrawContent(this.nodeContent, nodeContentProvider); PaneBottom.appendChild(this.nodeContent); PaneBottom.appendChild(nodeContentFooter); //bottom tabs col = 0; for (t = iNextElement; t< this.arrTabs.length; t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 1) li.className = "Right"; a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULBottom.appendChild(li); col = col + 1; if (col>1) col = 0; } if (iNextElement0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /////////3 COLUMNS////////////////// //inherits TabBox function TabBox3Col(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod) { //pass the parameters to the ancestors constructor this.constructor(strContainerNodeID, iContentHeight, boolCycle, iCyclePeriod); //fetch the content this.GetContent(); } //do the inheritance TabBox3Col.prototype = new PortalTabBox(); //method for TabBox3Col: render the box TabBox3Col.prototype.Render = function() { if (this.nodeContainer && !this.boolAdminMode) { //create main elements var Box3Col = document.createElement("div"); var PaneTop = document.createElement("div"); var PaneBottom = document.createElement("div"); var ClearFloat = document.createElement("br"); //assign css classes; Box3Col.className = "TabBox3Col"; PaneTop.className = "PaneTop"; PaneBottom.className = "PaneBottom"; ClearFloat.className = "Clear"; //clean up and remove all childs in container while (this.nodeContainer.firstChild) this.nodeContainer.removeChild(this.nodeContainer.firstChild) //iterate over tabs... if (this.arrTabs.length > 0) { if (this.strActiveTabID == null) this.strActiveTabID = this.arrTabs[0].strTabID; var TabBox = this; var col = 0; var boolActiverow = false; var Headline = document.createElement("h4"); Headline.className = "TabBox"; var ULTop = document.createElement("ul"); ULTop.className = "TabBox TabBox3ColTopLinks"; var ULBottom = document.createElement("ul"); ULBottom.className = "TabBox TabBox3ColBottomLinks"; var nodeContentProvider; var ClearFloatTop = ClearFloat.cloneNode(false); var ClearFloatBottom = ClearFloat.cloneNode(false); this.nodeContent.className = "TabBox3ColContent"; var nodeContentHeader = document.createElement("div"); nodeContentHeader.className = "TabBox3ColContentTop"; var nodeContentFooter = document.createElement("div"); nodeContentFooter.className = "TabBox3ColContentBot"; var iContentHeight = this.iBoxHeight //calculate content height //36 var rows; if (this.arrTabs.length>3) rows = 2; else rows = 1; iContentHeight = this.iBoxHeight - ( (rows * 30) + 20 ); //headline, if set... if (this.strHeadlineMarkup && this.strHeadlineMarkup != "") { iContentHeight -= 19; Headline.innerHTML = this.strHeadlineMarkup; PaneBottom.appendChild(Headline); } if (iContentHeight>0) this.nodeContent.style.height = iContentHeight + "px"; //PaneBottom.style.height = (this.iBoxHeight - 4) + "px"; //top tabs for(var t = 0; (t< this.arrTabs.length && t<3); t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 2) li.className += " Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) nodeContentHeader.className += "Left"; if (col == 1) nodeContentHeader.className += "Mid"; if (col == 2) nodeContentHeader.className += "Right"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULTop.appendChild(li); col = col + 1; if (col>2) col = 0; } PaneBottom.appendChild(ULTop); PaneBottom.appendChild(ClearFloatTop); PaneBottom.appendChild(nodeContentHeader); PaneBottom.appendChild(this.nodeContent); PaneBottom.appendChild(nodeContentFooter); //bottom tabs col = 0; for(var t = 3; (t< this.arrTabs.length && t<6); t++) { var li = document.createElement("li"); var a = document.createElement("a"); var strTabName = TabBox.arrTabs[t].strTabName; var strTabID = TabBox.arrTabs[t].strTabID; var OnClickEvent = function () { TabBox.ToggleCycleTabs(false); TabBox.ChangeTab(this.id); return false; }; if (col == 2) li.className += " Right"; if (strTabID == this.strActiveTabID) { boolActiverow = true; nodeContentProvider = this.arrTabs[t].nodeContent; li.className += " Active"; if (col == 0) nodeContentFooter.className += "Left"; if (col == 1) nodeContentFooter.className += "Mid"; if (col == 2) nodeContentFooter.className += "Right"; } a.href = "#"; a.id = strTabID; a.onclick = OnClickEvent; a.appendChild(document.createTextNode(strTabName)); li.appendChild(a); ULBottom.appendChild(li); col = col + 1; if (col>2) col = 0; } if (boolActiverow) this.DrawContent(this.nodeContent, nodeContentProvider); if (this.arrTabs.length > 3) { PaneBottom.appendChild(ULBottom); PaneBottom.appendChild(ClearFloatBottom); } } //append pane to box node Box3Col.appendChild(PaneTop); Box3Col.appendChild(PaneBottom); //put everything in the container node this.nodeContainer.appendChild(Box3Col); //set timeout for cycling through tabs if (this.boolCycle && this.arrTabs.length>0) window.setTimeout(function () {TabBox.GoToNextTab() }, TabBox.iCyclePeriod); } } /*****************************************************************************\ Javascript "SOAP Client" library @version: 1.4 - 2005.12.10 @author: Matteo Casati, Ihar Voitka - http://www.guru4.net/ @description: (1) SOAPClientParameters.add() method returns 'this' pointer. (2) "_getElementsByTagName" method added for xpath queries. (3) "_getXmlHttpPrefix" refactored to "_getXmlHttpProgID" (full ActiveX ProgID). @version: 1.3 - 2005.12.06 @author: Matteo Casati - http://www.guru4.net/ @description: callback function now receives (as second - optional - parameter) the SOAP response too. Thanks to Ihar Voitka. @version: 1.2 - 2005.12.02 @author: Matteo Casati - http://www.guru4.net/ @description: (1) fixed update in v. 1.1 for no string params. (2) the "_loadWsdl" method has been updated to fix a bug when the wsdl is cached and the call is sync. Thanks to Linh Hoang. @version: 1.1 - 2005.11.11 @author: Matteo Casati - http://www.guru4.net/ @description: the SOAPClientParameters.toXML method has been updated to allow special characters ("<", ">" and "&"). Thanks to Linh Hoang. @version: 1.0 - 2005.09.08 @author: Matteo Casati - http://www.guru4.net/ @notes: first release. \*****************************************************************************/ if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; function SOAPClientParameters() { var _pl = new Array(); this.add = function(name, value) { _pl[name] = value; return this; } this.toXml = function() { var xml = ""; for(var p in _pl) { if(typeof(_pl[p]) != "function") xml += "<" + p + ">" + _pl[p].toString().replace(/&/g, "&").replace(//g, ">") + ""; } return xml; } this.toQueryString = function() { var querystring = ""; var c = 0; for(var p in _pl) { if(typeof(_pl[p]) != "function") { if (c==0) querystring += "?" + p.toString() + "=" + escape(_pl[p].toString()); else querystring += "&" + p.toString() + "=" + escape(_pl[p].toString()); } c++; } return querystring; } } function SOAPClient() {} SOAPClient.invoke = function(soap, url, method, parameters, async, callback) { if (soap) { if(async) SOAPClient._loadWsdl(url, method, parameters, async, callback); else return SOAPClient._loadWsdl(url, method, parameters, async, callback); } else { if(async) SOAPClient._sendGetRequest(url, method, parameters, async, callback); else return SOAPClient._sendGetRequest(url, method, parameters, async, callback); } } // private: wsdl cache SOAPClient_cacheWsdl = new Array(); // private: invoke async SOAPClient._loadWsdl = function(url, method, parameters, async, callback) { // load from cache? var wsdl = SOAPClient_cacheWsdl[url]; if(wsdl + "" != "" && wsdl + "" != "undefined") return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl); // get wsdl var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("GET", url + "?wsdl", async); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } } xmlHttp.send(null); if (!async) return SOAPClient._onLoadWsdl(url, method, parameters, async, callback, xmlHttp); } SOAPClient._onLoadWsdl = function(url, method, parameters, async, callback, req) { var wsdl = req.responseXML; SOAPClient_cacheWsdl[url] = wsdl; // save a copy in cache return SOAPClient._sendSoapRequest(url, method, parameters, async, callback, wsdl); } SOAPClient._sendGetRequest = function(url, method, parameters, async, callback) { var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("GET", url + "/" + method + parameters.toQueryString(), async); xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onSendGetRequest(method, async, callback, xmlHttp); } } xmlHttp.send(null); if (!async) return SOAPClient._onSendGetRequest(method, async, callback, xmlHttp); } SOAPClient._onSendGetRequest = function(method, async, callback, req) { var returnXml; var doc = document.createElement("div"); try { doc.innerHTML = req.responseText; returnXml = doc; } catch(e) { //alert("Fehler Fox-Zweig: " + e.description); } try { if (typeof(req.responseXML.firstChild) != "undefined") returnXml = req.responseXML; } catch(e) { //alert("Fehler IE-Zweig: " + e.description); } if (callback) callback(returnXml); if (!async) return returnXml; } SOAPClient._sendSoapRequest = function(url, method, parameters, async, callback, wsdl) { // get namespace var ns = (wsdl.documentElement.attributes["targetNamespace"] + "" == "undefined") ? wsdl.documentElement.attributes.getNamedItem("targetNamespace").nodeValue : wsdl.documentElement.attributes["targetNamespace"].value; // build SOAP request var sr = "" + "" + "" + "<" + method + " xmlns=\"" + ns + "\">" + parameters.toXml() + ""; // send request var xmlHttp = SOAPClient._getXmlHttp(); xmlHttp.open("POST", url, async); var soapaction = ((ns.lastIndexOf("/") != ns.length - 1) ? ns + "/" : ns) + method; xmlHttp.setRequestHeader("SOAPAction", soapaction); xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); if(async) { xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) SOAPClient._onSendSoapRequest(method, async, callback, wsdl, xmlHttp); } } xmlHttp.send(sr); if (!async) return SOAPClient._onSendSoapRequest(method, async, callback, wsdl, xmlHttp); } SOAPClient._onSendSoapRequest = function(method, async, callback, wsdl, req) { var o = null; var nd = SOAPClient._getElementsByTagName(req.responseXML, method + "Result"); if(nd.length == 0) { if(req.responseXML.getElementsByTagName("faultcode").length > 0) throw new Error(500, req.responseXML.getElementsByTagName("faultstring")[0].childNodes[0].nodeValue); } else o = SOAPClient._soapresult2object(nd[0], wsdl); if(callback) callback(o, req.responseXML); if(!async) return o; } // private: utils SOAPClient._getElementsByTagName = function(document, tagName) { try { // trying to get node omitting any namespaces (latest versions of MSXML.XMLDocument) return document.selectNodes(".//*[local-name()=\""+ tagName +"\"]"); } catch (ex) {} // old XML parser support return document.getElementsByTagName(tagName); } SOAPClient._soapresult2object = function(node, wsdl) { return SOAPClient._node2object(node, wsdl); } SOAPClient._node2object = function(node, wsdl) { // null node if(node == null) return null; // text node if(node.nodeType == 3 || node.nodeType == 4) return SOAPClient._extractValue(node, wsdl); // leaf node if (node.childNodes.length == 1 && (node.childNodes[0].nodeType == 3 || node.childNodes[0].nodeType == 4)) return SOAPClient._node2object(node.childNodes[0], wsdl); var isarray = SOAPClient._getTypeFromWsdl(node.nodeName, wsdl).toLowerCase().indexOf("arrayof") != -1; // object node if(!isarray) { var obj = null; if(node.hasChildNodes()) obj = new Object(); for(var i = 0; i < node.childNodes.length; i++) { var p = SOAPClient._node2object(node.childNodes[i], wsdl); obj[node.childNodes[i].nodeName] = p; } return obj; } // list node else { // create node ref var l = new Array(); for(var i = 0; i < node.childNodes.length; i++) l[l.length] = SOAPClient._node2object(node.childNodes[i], wsdl); return l; } return null; } SOAPClient._extractValue = function(node, wsdl) { var value = node.nodeValue; switch(SOAPClient._getTypeFromWsdl(node.parentNode.nodeName, wsdl).toLowerCase()) { default: case "s:string": return (value != null) ? value + "" : ""; case "s:boolean": return value+"" == "true"; case "s:int": case "s:long": return (value != null) ? parseInt(value + "", 10) : 0; case "s:double": return (value != null) ? parseFloat(value + "") : 0; case "s:datetime": if(value == null) return null; else { value = value + ""; value = value.substring(0, value.lastIndexOf(".")); value = value.replace(/T/gi," "); value = value.replace(/-/gi,"/"); var d = new Date(); d.setTime(Date.parse(value)); return d; } } } SOAPClient._getTypeFromWsdl = function(elementname, wsdl) { var ell = wsdl.getElementsByTagName("s:element"); // IE if(ell.length == 0) ell = wsdl.getElementsByTagName("element"); // MOZ for(var i = 0; i < ell.length; i++) { if(ell[i].attributes["name"] + "" == "undefined") // IE { if(ell[i].attributes.getNamedItem("name") != null && ell[i].attributes.getNamedItem("name").nodeValue == elementname && ell[i].attributes.getNamedItem("type") != null) return ell[i].attributes.getNamedItem("type").nodeValue; } else // MOZ { if(ell[i].attributes["name"] != null && ell[i].attributes["name"].value == elementname && ell[i].attributes["type"] != null) return ell[i].attributes["type"].value; } } return ""; } // private: xmlhttp factory SOAPClient._getXmlHttp = function() { try { if(window.XMLHttpRequest) { var req = new XMLHttpRequest(); // some versions of Moz do not support the readyState property and the onreadystate event so we patch it! if(req.readyState == null) { req.readyState = 1; req.addEventListener("load", function() { req.readyState = 4; if(typeof req.onreadystatechange == "function") req.onreadystatechange(); }, false); } return req; } if(window.ActiveXObject) return new ActiveXObject(SOAPClient._getXmlHttpProgID()); } catch (ex) {} throw new Error("Your browser does not support XmlHttp objects"); } SOAPClient._getXmlHttpProgID = function() { if(SOAPClient._getXmlHttpProgID.progid) return SOAPClient._getXmlHttpProgID.progid; var progids = ["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; var o; for(var i = 0; i < progids.length; i++) { try { o = new ActiveXObject(progids[i]); return SOAPClient._getXmlHttpProgID.progid = progids[i]; } catch (ex) {}; } throw new Error("Could not find an installed XML parser"); }//SwitchDomain(); if (document.domain.indexOf("aradon.ro") > 0) document.domain = "aradon.ro"; MainNavigationCommon = new Object(); MainNavigationCommon.strSSOErrorMessage = "Nume de utilizator sau parola nu sunt ok "; MainNavigationCommon.strAsHomepage1 = "Aradon pagina"; MainNavigationCommon.strAsHomepage2 = "de start"; MainNavigationCommon.strLogin = "Autentificare"; MainNavigationCommon.strLogout = "Ieşire"; MainNavigationCommon.strRegister = "Înregistrare"; MainNavigationCommon.strOr = ""; MainNavigationCommon.strRegisterUrl = "http://www.aradon.ro/RegisterUser/CreateUser.aspx"; MainNavigationCommon.strLoginUrl = "http://www.aradon.ro/RegisterUser/CreateUser.aspx"; MainNavigationCommon.strUNameFieldName = "SSOUserName"; MainNavigationCommon.strPWFieldName = "SSOPassword"; MainNavigationCommon.strUNameValue = "E-mail"; MainNavigationCommon.strPWValue = "Parola"; MainNavigationCommon.strProfileUrl = "http://www.aradon.ro/RegisterUser/edituser.aspx"; MainNavigationCommon.Delay = 100; function PortalUser(strUserName, strPasswordHash) { //properties this.strUserName = null; this.strPasswordHash = null; //set given values if (strUserName && strUserName != "") this.strUserName = strUserName; if (strPasswordHash && strPasswordHash != "") this.strPasswordHash = strPasswordHash; } function MainNavigationBar () { //properties this.ULNavigation = null; this.strActiveNodeID1 = null; this.nodeActive = null; this.nodeHover = null; this.Switch = null; this.strActiveNodeID2 = null; this.User = null; this.strRegisterUrl = MainNavigationCommon.strRegisterUrl; this.strLoginUrl = MainNavigationCommon.strLoginUrl; this.strLogoutUrl = null; this.strOverrideLoginUrl = null; //this is an extra property so we can see if there is an override this.strFormAction = null; this.strUNameFieldName = MainNavigationCommon.strUNameFieldName; this.strPWFieldName = MainNavigationCommon.strPWFieldName; this.strProfileUrl = MainNavigationCommon.strProfileUrl; this.boolShowLogin = true; //sets wether the login-stuff is visible or not this.evolverAccess = new EvolverSSOHandle(); this.imgPreload = new ImagePreloading(); //try to fetch user info this.User = this._ReadUserCookie(); } //"Private" methods //internal method for deactivating all top navigation elements MainNavigationBar.prototype._DeactivateTrees = function() { if (this.nodeActive != null) { if (this.nodeActive.className.match(/Double/)) this.nodeActive.className = "Double"; else this.nodeActive.className = ""; } }; //internal method for reading cookie MainNavigationBar.prototype._GetCookie = function (name){ var i=0; //Suchposition im Cookie var suche = name+"="; var cook = null; while (i-1) ? ende : document.cookie.length; cook = unescape(document.cookie.substring(i+suche.length, ende)); } i++; } return cook; }; MainNavigationBar.prototype._OpenTree = function(LIActive, thisNavigationBar) { if (LIActive == thisNavigationBar.nodeHover) { //set all other elements passive thisNavigationBar._DeactivateTrees(); LIActive.className += " Active"; thisNavigationBar.nodeActive = LIActive; } } //internal method: mouseoverevent for the list elements MainNavigationBar.prototype._Hover = function(LIActive) { var thisNavigationBar = this; window.clearTimeout(thisNavigationBar.Switch); thisNavigationBar.nodeHover = LIActive; thisNavigationBar.Switch = window.setTimeout(function () {MainNavigationBar.prototype._OpenTree(LIActive, thisNavigationBar); }, 500); }; //internal method: mouseoutevent for the list elements MainNavigationBar.prototype._HoverOut = function() { var thisNavigationBar = this; window.clearTimeout(thisNavigationBar.Switch); }; //internal method: find active list nodes for a given navigation level MainNavigationBar.prototype._FindActiveListNode = function (nodeParent, iLevel, strActiveNodeID, boolStandard) { var thisNavigationBar = this; var LI = nodeParent.firstChild; var nodeFound = null; var iNum = 0; do { if (LI && LI.nodeName == "LI") { //things todo on first level nav... if (iLevel == 0) { LI.onmouseover = function () { thisNavigationBar._Hover(this); }; LI.onmouseout = function () { thisNavigationBar._HoverOut(); }; //set this treenode active (if set) if (boolStandard) { if (iNum == 0) { this._Hover(LI); nodeFound = LI; } } else { if (LI.id == strActiveNodeID) { this._Hover(LI); nodeFound = LI; } } } //things todo on second level nav... else { if (boolStandard) { if (iNum == 0) { if (LI.className.match(/Last/)) LI.className = "Last Active"; else LI.className = "Active"; nodeFound = LI; } else { if (LI.className.match(/Last/)) LI.className = "Last"; else LI.className = ""; } } else { if (LI.id == strActiveNodeID) { if (LI.className.match(/Last/)) LI.className = "Last Active"; else LI.className = "Active"; nodeFound = LI; } else { if (LI.className.match(/Last/)) LI.className = "Last"; else LI.className = ""; } } } iNum++; } LI = LI.nextSibling; } while (LI); return nodeFound; } //opens the login form overlay MainNavigationBar.prototype._OpenLoginForm = function () { //clean up a bit... var nodeSSOMessages = document.getElementById("SSOMessages"); while (nodeSSOMessages.firstChild) nodeSSOMessages.removeChild(nodeSSOMessages.firstChild); var formLogin = document.forms["SSOLoginForm"]; var inputUserName = formLogin["SSOUser"]; var inputPassword = formLogin["SSOPassword"]; inputUserName.value = MainNavigationCommon.strUNameValue; inputPassword.value = MainNavigationCommon.strPWValue; var nodeLoginForm = document.getElementById("SSOLogin"); nodeLoginForm.style.visibility = "visible"; }; //closes the login form overlay MainNavigationBar.prototype._CloseLoginForm = function () { var nodeLoginForm = document.getElementById("SSOLogin"); nodeLoginForm.style.visibility = "hidden"; }; //reads user info from cookie and returns a PortalUser object MainNavigationBar.prototype._ReadUserCookie = function () { var NavBar = this; var strUserName; var strPasswordHash; var strActive; var User = null; var SSOCookie = null; //get the cookie SSOCookie = NavBar._GetCookie("EvoSSO"); //if (!SSOCookie) alert("No Cookie..."); if (SSOCookie == null) return null; var r = this.evolverAccess.getUserInformation(SSOCookie); if(r.Success==true){ User = new PortalUser(r.ReturnValue[0],r.ReturnValue[4]); } return User; } //"Public" methods //method for setting the active navigation node(s) MainNavigationBar.prototype.SetActiveNodes = function(strActiveNodeID1, strActiveNodeID2) { this.strActiveNodeID1 = strActiveNodeID1; this.strActiveNodeID2 = strActiveNodeID2; }; //method to authenticate user MainNavigationBar.prototype.SSOAuthenticateUser = function(strUserName, strPassword, boolKeepLoggedIn) { var nodeSSOMessages = document.getElementById("SSOMessages"); while (nodeSSOMessages.firstChild) nodeSSOMessages.removeChild(nodeSSOMessages.firstChild); var NavBar = this; var r = this.evolverAccess.authentificateUser(strUserName, strPassword, boolKeepLoggedIn); if(r[0]==true) { this.imgPreload.loadImages(r[3]); } else { nodeSSOMessages.className = "error"; nodeSSOMessages.appendChild(document.createTextNode(r[2])); nodeSSOMessages.style.display = "block"; } } MainNavigationBar.prototype.SSOLogoutUser = function() { var NavBar = this; var r = this.evolverAccess.logoutUser(); if(r[0]==true){ this.imgPreload.loadImages(r[3]); } } //method to set the SSO state display (user logged-in or not etc..) MainNavigationBar.prototype.SetSSOFragment = function () { var NavBar = this; var nodeSSOFragment = document.getElementById("SSOFragment"); var spanUserName = document.createElement("span"); var aUserName = document.createElement("a"); var spanFade = document.createElement("span"); var spanLoginRegister = document.createElement("span"); var spanEmptyPane = document.createElement("span"); var aLogin = document.createElement("a"); var aLogout = document.createElement("a"); var aRegister = document.createElement("a"); var aSetAsHomepage = document.createElement("a"); spanUserName.className = "UserName"; spanEmptyPane.className = "EmptyPane"; spanFade.className = "Fade"; spanLoginRegister.className = "LoginRegister"; aSetAsHomepage.className = "SetAsHomepage"; //clear the Fragment first... while (nodeSSOFragment.firstChild) nodeSSOFragment.removeChild(nodeSSOFragment.firstChild); aSetAsHomepage.appendChild(document.createTextNode(MainNavigationCommon.strAsHomepage1)); aSetAsHomepage.appendChild(document.createElement("br")); aSetAsHomepage.appendChild(document.createTextNode(MainNavigationCommon.strAsHomepage2)); aSetAsHomepage.href = "http://www.aradon.ro/engine.aspx/page/special-setstartpage"; //do only if login-stuff should be visible if (this.boolShowLogin) { //check if user is logged in... if (this.User) { //do something... aUserName.appendChild(document.createTextNode(this.User.strUserName)); //link to user profile aUserName.href= this.strProfileUrl.replace(/###username###/, this.User.strUserName); //mandatory - if not set here and email is user name the link to portal will be displayed(ie) aUserName.childNodes[0].nodeValue = this.User.strUserName; spanUserName.appendChild(aUserName); spanUserName.appendChild(spanFade); spanUserName.appendChild(document.createElement("br")); aLogout.appendChild(document.createTextNode(MainNavigationCommon.strLogout)); aLogout.title = MainNavigationCommon.strLogout; if (this.strLogoutUrl) { aLogout.href = this.strLogoutUrl; } else { aLogout.href = "#"; aLogout.onclick = function () {NavBar.SSOLogoutUser(); return false; } } spanUserName.appendChild(aLogout); nodeSSOFragment.appendChild(spanUserName); } else { //do something else :) ... aLogin.appendChild(document.createTextNode(MainNavigationCommon.strLogin)); aLogin.href = this.strLoginUrl; //only append the onclick event if there is no override for the loginurl if (!this.strOverrideLoginUrl) { aLogin.onclick = function () { NavBar._OpenLoginForm(); return false }; aLogin.href = this.strLoginUrl; } else { aLogin.href = this.strOverrideLoginUrl; aLogin.onclick = function (){}; } aRegister.appendChild(document.createTextNode(MainNavigationCommon.strRegister)); aRegister.href = this.strRegisterUrl; spanLoginRegister.appendChild(aLogin); spanLoginRegister.appendChild(document.createTextNode(" " + MainNavigationCommon.strOr + " ")); spanLoginRegister.appendChild(document.createElement("br")); spanLoginRegister.appendChild(aRegister); nodeSSOFragment.appendChild(spanLoginRegister); //set stuff in login pane var aRegisterLP = document.getElementById("SSOLinkRegister"); var formLogin = document.forms["SSOLoginForm"]; var inputUserName = formLogin["SSOUser"]; var inputPassword = formLogin["SSOPassword"]; var aSubmitButton = document.getElementById("SSOLinkSubmit"); aRegisterLP.href = aRegister.href; //only use the formaction if there is one defined via the override method // - otherwise we use a onclickevent which tries to login the user via a call // to the SNPEWebservice. if (this.strFormAction) { formLogin.action = this.strFormAction; aSubmitButton.onclick = function () { document.forms['SSOLoginForm'].submit(); return false; }; formLogin.onsubmit = function () {}; } else { formLogin.onsubmit = function () { NavBar.SSOAuthenticateUser(document.forms['SSOLoginForm']["SSOUser"].value, document.forms['SSOLoginForm']["SSOPassword"].value, document.forms['SSOLoginForm']["SSOKeepLoggedIn"].checked); return false; }; aSubmitButton.onclick = function () { NavBar.SSOAuthenticateUser(document.forms['SSOLoginForm']["SSOUser"].value, document.forms['SSOLoginForm']["SSOPassword"].value, document.forms['SSOLoginForm']["SSOKeepLoggedIn"].checked); return false; }; } inputUserName.name = this.strUNameFieldName; inputPassword.name = this.strPWFieldName; } } //do only if login-stuff should not be visible else { nodeSSOFragment.appendChild(spanEmptyPane); } nodeSSOFragment.appendChild(aSetAsHomepage); }; //method: override settings of the navigation bar MainNavigationBar.prototype.OverrideSettings = function(strLoginUrl, strLogoutUrl, strRegisterUrl, strFormAction, strUNameFieldName, strPWFieldName, strProfileUrl, boolShowLogin) { if (strLoginUrl) this.strOverrideLoginUrl = strLoginUrl; if (strLogoutUrl) this.strLogoutUrl = strLogoutUrl; if (strRegisterUrl) this.strRegisterUrl = strRegisterUrl; if (strFormAction) this.strFormAction = strFormAction; if (strUNameFieldName) this.strUNameFieldName = strUNameFieldName; if (strPWFieldName) this.strPWFieldName = strPWFieldName; if (strProfileUrl) this.strProfileUrl = strProfileUrl; if (boolShowLogin != null) this.boolShowLogin = boolShowLogin; } //method: override the user data MainNavigationBar.prototype.OverrideUser = function(strUsername, strPasswordHash) { if (strUsername) this.User = new PortalUser (strUsername, strPasswordHash); else this.User = null; } //initialize the navigation MainNavigationBar.prototype.Init = function() { this.ULNavigation = document.getElementById("MainNavigationBar"); var boolFoundFirst = false; var boolFoundSecond = false; //walk through tree var thisNavigationBar = this; var ActiveNode1 = this._FindActiveListNode(this.ULNavigation, 0, this.strActiveNodeID1, false); //if active first level node was found, try to get active second level node if (ActiveNode1) { var UL = ActiveNode1.firstChild; do { if (UL && UL.nodeName == "UL") this._FindActiveListNode(UL, 1, this.strActiveNodeID2, false); UL = UL.nextSibling; } while (UL); } //use standard tab(s) if first level node not found else { var ActiveNode1 = this._FindActiveListNode(this.ULNavigation, 0, "", true); if (ActiveNode1) { var UL = ActiveNode1.firstChild; do { if (UL && UL.nodeName == "UL") this._FindActiveListNode(UL, 1, "", true); UL = UL.nextSibling; } while (UL); } } this.SetSSOFragment(); } // javascripts.js // Author: Alexander Aberer // Date: 27.7.2000 // Last modified: 8.6.2001 (Andreas Ritter) // Last modified: 2.7.2003 (Alexander Aberer) // Last modified: 19.2.2004 (Stephan Schwärzler) - Opera // Last modified: 10.12.2004 (Norbert Kujbus) - Google callback function // Last modified: 15.01.2005 (Norbert Kujbus) - Remove Google callback function // Last modified: 14.04.2005 (Csaba Mezo) - Introduce CountIt function // !!!Wichtig!!! Die folgende Variable mu gesetzt werden wenn ber open_window() // Seiten auf externen/fremden Webservern geffnet werden sollen. if (document.domain.indexOf("aradon.ro") > -1) document.domain = "aradon.ro"; var blank_page = "about:blank"; function SwitchWebservice(switchform,formelement) { var fe, dummy; if(typeof formelement != "undefined") { fe = formelement; } else { fe = switchform.elements[0]; } if (fe.selectedIndex != 0) { var pulldownindex = fe.selectedIndex; var url = fe.options[pulldownindex].value; locarray = url.split("|"); if ( locarray.length > 1 ) { windata = locarray[0].split(","); dummy = open_window(locarray[1],windata[0],windata[1],windata[2],0,0,"scrollbars=" + windata[3] + ",location=no,toolbar=no,status=no,menubar=no,resizable=yes,dependent=yes"); } else { dummy = open_window(url,"",700,480,10,10,"location=yes,toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,dependent=no"); } } } function realmedia(path,name,content) { var datestr = new Date(); url = 'http://apps.vol.at/tools/realaudio/embed.asp?cont=' + content + '&title=' + escape(name) + '&file=' + escape(path) + "&" + escape(datestr.toLocaleString()); if (content=='video') { var rc_video=window.open(url,'rc_video','width=230,height=310,resizable=yes'); rc_video.focus(); } else { var rc_audio=window.open(url,'rc_audio','width=400,height=40'); rc_audio.focus(); } } function open_window(targetX,name,width,height,posx,posy,windowoptions,init_target) { var it, wo, px, py, host,target; it = targetX; wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes"; px = py = 0; target = targetX; if(typeof new_window != "undefined") { if(new_window.closed != true) { new_window.close(); } } if (typeof posx != "undefined") px = posx; if (typeof posy != "undefined") py = posy; if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions; if (typeof init_target != "undefined") { it = init_target; } else { if (targetX.indexOf("http://") != -1) { host = "http://" + window.location.hostname; if (navigator.appName != "Opera") { if (targetX.indexOf(host) == -1) it = blank_page; } } } new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo); //new_window.moveTo(px,py); new_window.location.replace(targetX); new_window.focus(); return false; } function setUrlForPrint() { sUrl = document.location.href; if ((document.all) || (document.layers)){ sUrl = sUrl.replace(/\?/, "\\/"); sUrl = sUrl.replace(/\&/, "//"); } document.printform.url.value = sUrl; } //Script to invoke OEWA measurement on page events (click) function CountIt(what) { var OEWA1="http://austria.oewabox.at/cgi-bin/ivw/CP/"+what; var OEWA2="http://a-vol.oewabox.at/cgi-bin/ivw/CP/"+what; var counter1 = new Image; var counter2 = new Image; counter1.src = OEWA1+"?r="+escape(document.referrer); counter2.src = OEWA2+"?r="+escape(document.referrer); } // Function for URL (GET) Parameter function getURLParam(name) { var q = document.location.search; var i = q.indexOf(name + '='); if (i == -1) { return false; } var r = q.substr(i + name.length + 1, q.length - i - name.length - 1); i = r.indexOf('&'); if (i != -1) { r = r.substr(0, i); } return r.replace(/\+/g, ' '); } // resizes a window depending on its content and a given width to the optimal size function resizeWindowToOptimalSize(oW,divId) { if( !document.getElementById ) return false; var oH = document.getElementById(divId); if( !oH ) { return false; } var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; } window.resizeTo( oW, oH ); var myW = 0, myH = 0, d = document.documentElement, b = document.body; if( window.innerWidth ) { myW = window.innerWidth; myH = window.innerHeight; } else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; } else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; } if( window.opera && !document.childNodes ) { myW += 16; } window.resizeTo( oW + ( oW - myW ), oH + ( oH - myH ) ); } function open_window_astitle(target,name,width,height) { void(open_window(target,name,width,height)); } // google.js - for managing additional content on the right side // Author: Norbert Kujbus // Date: 2004.09.01 function _GetElement(id) { var Opera = window.opera ? true : false; if (document.layers) { fixedElement = document[id]; } else if (document.getElementById && !Opera) { fixedElement = document.getElementById(id); } else if (document.all && !Opera) { fixedElement = document.all[id]; } else if (Opera) { fixedElement = document.getElementById(id); } return fixedElement; } function HideSourcePane() { source = _GetElement("SpecialNarrowSource"); isAdmin = document.forms[0].q; if (source && isAdmin) { source.visibility = "hidden"; source.display = "none"; } } function TransferPane() { //move narrow ads to the right position source = _GetElement("SpecialNarrowSource"); target = _GetElement("SpecialNarrowTarget"); if (source && target) { target.innerHTML = source.innerHTML; source.innerHTML = ""; source.visibility = "hidden"; source.display = "none"; } } function DisableFilter() { document.location += "&filter=0"; } //google javascript solution for clickable table cells function ss(w) { window.status=w;return true; } function cs() { window.status=''; } function ga(o,e) { if (document.getElementById) { a=o.id.substring(1); p = ""; r = ""; g = e.target; if (g) { t = g.id; f = g.parentNode; if (f) { p = f.id; h = f.parentNode; if (h) r = h.id; } } else { h = e.srcElement; f = h.parentNode; if (f) p = f.id; t = h.id; } if (t==a || p==a || r==a) return true; lnk = document.getElementById(a); if (lnk.target != "") { window.open(lnk.href, lnk.target); } else { location.href=document.getElementById(a).href; } } } function google_ad_request_done(google_ads) { // Proceed only if we have ads to display! if (google_ads.length < 1 ) return; // Display ads in a table document.write("
"); // Print "Ads By Google" -- include link to Google feedback page if available document.write("
"); if (google_info.feedback_url) { document.write("Ads by Google"); } else { document.write("Google Anzeigen"); } document.write("
"); document.write(""); } // Finish up anything that needs finishing up document.write ("
"); // For text ads, display each ad in turn. // In this example, each ad goes in a new row in the table. if (google_ads[0].type == 'text') { for(i = 0; i < google_ads.length; ++i) { document.write("
" + "
"+ "" + google_ads[i].line1 + "
" + google_ads[i].line2 + " " + google_ads[i].line3 + "
" + ""+ google_ads[i].visible_url + "
"); } } // For an image ad, display the image; there will be only one . if (google_ads[0].type == 'image') { document.write("
" + "" + "
"); }/***********************************************************/ /* Begin image preloading class */ /***********************************************************/ //used to preload images //reload the page after all images are loaded or the timeout expires function ImagePreloading(){ this.initImages(); } ImagePreloading.prototype.initImages = function(){ this.yourImages = new Array(); this.maxTimeout = 1001; //timpul dupa care daca una dintre poze daca nu se incarca sa treaca la urmatoarea this.passTimeout = 150; //timpul de timeout la fiecare pass de verificare //if (document.images) { this.preImages = new Array(); this.loaded = new Array(); this.i; this.timerID; this.currCount = 0; this.currImage = 0; this.currTimeout = 0; } ImagePreloading.prototype.loadImagesAsync = function(images_names, callback){ window.yourImages = images_names; var dt=new Date().getTime(); for (this.i = 0; this.i < window.yourImages.length; this.i++) { this.preImages[this.i] = new Image(); this.preImages[this.i].src = window.yourImages[this.i]+"&d="+dt; } for (this.i = 0; this.i < this.preImages.length; this.i++) { this.loaded[this.i] = false; } this.checkLoad(callback); }; ImagePreloading.prototype.loadImages = function(images_names){ this.loadImagesAsync(images_names, null); } ImagePreloading.prototype.checkLoad = function(callback) { if (this.currCount >= this.preImages.length) { this.initImages(); if(callback) callback(); else window.location.reload(); return; } for (this.i = 0; this.i < this.preImages.length; this.i++) { if (this.loaded[this.i] === false && this.preImages[this.i].complete) { this.loaded[this.i] = true; this.currCount++; } } if(this.currImage < this.currCount){ this.currImage = this.currCount; this.currTimeout = this.passTimeout; }else{ this.currTimeout = this.currTimeout + this.passTimeout; } if( (this.currTimeout - this.passTimeout) >= this.maxTimeout){ this.loaded[this.currCount] = true; this.currCount++; } var self = this; this.timerID = window.setTimeout(function(){self.checkLoad(callback);},this.passTimeout); }; /***********************************************************/ /* End image preloading class */ /***********************************************************/ EvolverSSOHandle.strSSOWebServiceUrl = "http://www.roon.ro/SSOWebservice/Service.asmx"; EvolverSSOHandle.strSSOWebServiceAuthMethod = "EVOSSOLoginUser"; EvolverSSOHandle.strSSOWebServiceLogoutMethod = "EVOSSOLogout"; EvolverSSOHandle.strSSOWebServiceGetDataMethod = "EVOSSOGetAllUserDataSpecCookie"; function EvolverSSOHandle(){ } EvolverSSOHandle.prototype.getUserInformation = function(cookieVal){ var UseSoap = true; var Params = new SOAPClientParameters(); Params.add('cookieVal',cookieVal); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceGetDataMethod, Params, false, null ); return r; } EvolverSSOHandle.prototype.authentificateUser = function(user, pass, boolKeepLoggedIn){ var UseSoap = true; var Params = new SOAPClientParameters(); Params.add("login", user); Params.add("pass", pass); if(boolKeepLoggedIn==true) Params.add("permLogin","1"); else Params.add("permLogin","0"); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceAuthMethod, Params, false, null ); return r; } EvolverSSOHandle.prototype.logoutUser = function(){ var UseSoap = true; var Params = new SOAPClientParameters(); var r = SOAPClient.invoke (UseSoap, EvolverSSOHandle.strSSOWebServiceUrl, EvolverSSOHandle.strSSOWebServiceLogoutMethod, Params, false, null ); return r; } var UseEvolverSSOSwitch = true; //var gFpcDom=".webtrends.com"; // first party cookie domain var gConvert=true; var gFpc="WT_FPC"; var gDomain="sdc.tele.net"; var gDcsId="dcszbbojkwnd92qsehlfzinpn_1n7g"; var gHref=""; var gService = false; var gTimeZone = 1; var gI18n=false; if ((typeof(gConvert)!="undefined")&&gConvert&&(document.cookie.indexOf(gFpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){ document.write("<\/SCR"+"IPT>"); } /* * v2 last edit: 22.2.07 * modified webtrends library *** removed dcsSaveHref (seems to makes troubles with firefox) *** removed dcsBind("click", "dcsHandler"); (double tracking) */ var gHref=""; var gService = false; /* tracking adverts */ function dcsAdvert(name) { if (name) { dcsMultiTrack('DCS.dcsuri', '/Ads', 'WT.svl', "svl_ad_"+name, 'WT.ac', name); } DCS.dcssip=DCS.dcsuri=DCS.dcsqry=WT.ti=WT.svl=WT.ac=""; } // the old aufmacher function /*function dcsAfm(id,mydate,msg) { var date_value; // Dyyyy-mm-ddThh:mm:ss if (mydate && typeof(mydate) != "undefined" && mydate.length >= 19) { date_value = mydate.substring(0,19); } else { // some very special date calculation just in case nothing has been given var dn = new Date(); var mon = (dn.getMonth()+1)<10?"0"+(dn.getMonth()+1):(dn.getMonth()+1); var day = dn.getDay()<10?"0"+dn.getDay():dn.getDay(); var hrs = dn.getHours()<10?"0"+dn.getHours():dn.getHours(); var mins = dn.getMinutes()<10?"0"+dn.getMinutes():dn.getMinutes(); var secs = dn.getSeconds()<10?"0"+dn.getSeconds():dn.getSeconds(); date_value = dn.getFullYear()+"-"+mon+"-"+day+"T"+hrs+':'+mins+":"+secs; } if (id && typeof(id)!="undefined") { var svl = "svl_"+id; var afm_param = 'DCSext.afm'; // parse the old syntax if (id.length > 2) { var fields = id.split('_'); if (fields.length == 4) { id = fields[2] + '' + fields[3]; } else if (fields.length == 2) { id = fields[1] + '' + 0; } else { id = "00"; // not detected, use an invalid number } } var afm_value = id + "D" + date_value + " " + msg; dcsMultiTrack('DCS.dcsuri', '/Afm', 'WT.svl', svl, afm_param, afm_value); DCS.dcssip=DCS.dcsuri=DCS.dcsqry=WT.ti=WT.svl=afm_param=""; } } */ // tracking aufmacher function dcsAfm(id,mydate,msg) { var date_value; // Dyyyy-mm-ddThh:mm:ss if (mydate && typeof(mydate) != "undefined" && mydate.length >= 19) { date_value = mydate.substring(0,19); } else { // some very special date calculation just in case nothing has been given var dn = new Date(); var mon = (dn.getMonth()+1)<10?"0"+(dn.getMonth()+1):(dn.getMonth()+1); var day = dn.getDay()<10?"0"+dn.getDay():dn.getDay(); var hrs = dn.getHours()<10?"0"+dn.getHours():dn.getHours(); var mins = dn.getMinutes()<10?"0"+dn.getMinutes():dn.getMinutes(); var secs = dn.getSeconds()<10?"0"+dn.getSeconds():dn.getSeconds(); date_value = dn.getFullYear()+"-"+mon+"-"+day+"T"+hrs+':'+mins+":"+secs; } if (id && typeof(id)!="undefined") { var svl = "svl_"+id; var afm_param = 'DCSext.afm'; // version 2 if (id.length > 2) { var fields = id.split('_'); if (fields.length == 3) { if (fields[2] > 9) { fields[2] = 0; } id = fields[1] + '' + fields[2]; } } else if (id.length == 2) { // noop } else { id = "00"; // not detected, use an invalid number } // call the pixel var afm_value = id + "D" + date_value + " " + msg; dcsMultiTrack('DCS.dcsuri', '/Afm', 'WT.svl', svl, afm_param, afm_value); DCS.dcssip=DCS.dcsuri=DCS.dcsqry=WT.ti=WT.svl=afm_param=""; } } // START OF Advanced SmartSource Data Collector TAG // Copyright (c) 1996-2006 WebTrends Inc. All rights reserved. // $DateTime: 2006/03/09 14:15:22 $ // Code section for Enable First-Party Cookie Tracking // Code section for Enable SmartView Transition Page tracking function dcsTP(){ if (document.cookie.indexOf("WTLOPTOUT=")!=-1){ return; } var name="WT_DC"; var expiry="; expires=Thu, 31-Dec-2020 08:00:00 GMT"; var path="; path=/"; var domain=""; if ((document.cookie.indexOf(name+"=")!=-1)&&(dcsGetCrumb(name,"tsp")=="1")){ WT.ttp="1"; } if (dcsGetMeta("SmartView_Page")=="1"){ WT.tsp="1"; document.cookie=name+"=tsp=1"+expiry+path+domain; } else{ document.cookie=name+"=; expires=Sun, 1-Jan-1995 00:00:00 GMT;"+path+domain; } } function dcsGetMeta(name){ var elems; if (document.all){ elems=document.all.tags("meta"); } else if (document.documentElement){ elems=document.getElementsByTagName("meta"); } if (typeof(elems)!="undefined"){ for (var i=1;i<=elems.length;i++){ var meta=elems.item(i-1); if (meta.name&&(meta.name.indexOf(name)==0)){ return meta.content; break; } } } return null; } function dcsCookie(){ if (typeof(dcsOther)=="function"){ dcsOther(); } else if (typeof(dcsPlugin)=="function"){ dcsPlugin(); } else if (typeof(dcsFPC)=="function"){ dcsFPC(gTimeZone); } } function dcsGetCookie(name){ var pos=document.cookie.indexOf(name+"="); if (pos!=-1){ var start=pos+name.length+1; var end=document.cookie.indexOf(";",start); if (end==-1){ end=document.cookie.length; } return unescape(document.cookie.substring(start,end)); } return null; } function dcsGetCrumb(name,crumb){ var aCookie=dcsGetCookie(name).split(":"); for (var i=0;i(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){ WT.vt_f_tlv=Math.floor((dSes.getTime()-adj)/1000); dSes.setTime(dCur.getTime()); WT.vt_f_s="1"; } if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){ WT.vt_f_d="1"; } } WT.co_f=escape(WT.co_f); WT.vt_sid=WT.co_f+"."+(dSes.getTime()-adj); var expiry="; expires="+dExp.toGMTString(); document.cookie=name+"="+"id="+WT.co_f+":lv="+dCur.getTime().toString()+":ss="+dSes.getTime().toString()+expiry+"; path=/"+(((typeof(gFpcDom)!="undefined")&&(gFpcDom!=""))?("; domain="+gFpcDom):("")); if (!dcsIsFpcSet(name,WT.co_f,dCur.getTime().toString(),dSes.getTime().toString())){ WT.co_f=WT.vt_sid=WT.vt_f_s=WT.vt_f_d=WT.vt_f_tlh=WT.vt_f_tlv=""; WT.vt_f=WT.vt_f_a="2"; } } // Add dcsOther() here if using existing first-party cookie, or dcsPlugin() here if using WT Cookie Plugin // Code section for Set the First-Party Cookie domain // Code section for Enable Event Tracking function dcsParseSvl(sv){ sv=sv.split(" ").join(""); sv=sv.split("\t").join(""); sv=sv.split("\n").join(""); var pos=sv.toUpperCase().indexOf("WT.SVL="); if (pos!=-1){ var start=pos+8; var end=sv.indexOf('"',start); if (end==-1){ end=sv.indexOf("'",start); if (end==-1){ end=sv.length; } } return sv.substring(start,end); } return ""; } function dcsIsOnsite(host){ var aDoms=doms.split(','); for (var i=0;i0){ window.location=gHref; gHref=""; } } function dcsEvt(evt,tag){ var e=evt.target||evt.srcElement; while (e.tagName&&(e.tagName!=tag)){ e=e.parentElement||e.parentNode; } return e; } function dcsBind(event,func){ if ((typeof(window[func])=="function")&&document.body){ if (document.body.addEventListener){ document.body.addEventListener(event, window[func], true); } else if(document.body.attachEvent){ document.body.attachEvent("on"+event, window[func]); } } } function dcsET(){ dcsBind("click","dcsDownload"); dcsBind("click","dcsDynamic"); dcsBind("click","dcsFormButton"); dcsBind("click","dcsOffsite"); dcsBind("click","dcsAnchor"); dcsBind("mousedown","dcsRightClick"); } function dcsMultiTrack(){ if (arguments.length%2==0){ for (var i=0;i3){ if ((navigator.appName=="Microsoft Internet Explorer")&&document.body){ WT.bs=document.body.offsetWidth+"x"+document.body.offsetHeight; } else if (navigator.appName=="Netscape"){ WT.bs=window.innerWidth+"x"+window.innerHeight; } } WT.fi="No"; if (window.ActiveXObject){ for(var i=10;i>0;i--){ try{ var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); WT.fi="Yes"; WT.fv=i+".0"; break; } catch(e){ } } } else if (navigator.plugins&&navigator.plugins.length){ for (var i=0;i0){ for (var i=0;i'); } } function dcsMeta(){ var elems; if (document.all){ elems=document.all.tags("meta"); } else if (document.documentElement){ elems=document.getElementsByTagName("meta"); } if (typeof(elems)!="undefined"){ for (var i=1;i<=elems.length;i++){ var meta=elems.item(i-1); if (meta.name){ if (meta.name.indexOf('WT.')==0){ WT[meta.name.substring(3)]=(gI18n&&(meta.name.indexOf('WT.ti')==0))?dcsEscape(dcsEncode(meta.content),I18NRE):meta.content; } else if (meta.name.indexOf('DCSext.')==0){ DCSext[meta.name.substring(7)]=meta.content; } else if (meta.name.indexOf('DCS.')==0){ DCS[meta.name.substring(4)]=(gI18n&&(meta.name.indexOf('DCS.dcsref')==0))?dcsEscape(meta.content,I18NRE):meta.content; } } } } } function dcsTag(){ if (document.cookie.indexOf("WTLOPTOUT=")!=-1){ return; } var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?"; for (var N in DCS){ if (DCS[N]) { P+=dcsA(N,DCS[N]); } } for (N in WT){ if (WT[N]) { P+=dcsA("WT."+N,WT[N]); } } for (N in DCSext){ if (DCSext[N]) { P+=dcsA(N,DCSext[N]); } } if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){ P=P.substring(0,2040)+"&WT.tu=1"; } dcsCreateImage(P); } function dcsJV(){ var agt=navigator.userAgent.toLowerCase(); var major=parseInt(navigator.appVersion); var mac=(agt.indexOf("mac")!=-1); var ff=(agt.indexOf("firefox")!=-1); var ff0=(agt.indexOf("firefox/0.")!=-1); var ff10=(agt.indexOf("firefox/1.0")!=-1); var ff15=(agt.indexOf("firefox/1.5")!=-1); var ff2up=(ff&&!ff0&&!ff10&!ff15); var nn=(!ff&&(agt.indexOf("mozilla")!=-1)&&(agt.indexOf("compatible")==-1)); var nn4=(nn&&(major==4)); var nn6up=(nn&&(major>=5)); var ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1)); var ie4=(ie&&(major==4)&&(agt.indexOf("msie 4")!=-1)); var ie5up=(ie&&!ie4); var op=(agt.indexOf("opera")!=-1); var op5=(agt.indexOf("opera 5")!=-1||agt.indexOf("opera/5")!=-1); var op6=(agt.indexOf("opera 6")!=-1||agt.indexOf("opera/6")!=-1); var op7up=(op&&!op5&&!op6); var jv="1.1"; if (ff2up){ jv="1.7"; } else if (ff15){ jv="1.6"; } else if (ff0||ff10||nn6up||op7up){ jv="1.5"; } else if ((mac&&ie5up)||op6){ jv="1.4"; } else if (ie5up||nn4||op5){ jv="1.3"; } else if (ie4){ jv="1.2"; } return jv; } function dcsFunc(func){ if (typeof(window[func])=="function"){ window[func](); } } dcsVar(); dcsMeta(); dcsFunc("dcsAdv"); dcsTag(); // END OF Basic SmartSource Data Collector TAG// WebTrends SmartSource Data Collector // Copyright (c) 1996-2006 WebTrends Inc. All rights reserved. // $DateTime: 2006/03/01 12:51:54 $ // Code section for Track clicks to links leading offsite. // special smartview detection by daniel rudigier @ 13.september 2006 function dcsOffsite(evt){ evt=evt||(window.event||""); if (evt){ var e=dcsEvt(evt,"A"); if (e.hostname&&!dcsIsOnsite(e.hostname)){ var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):""; var path=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/"; if (path.indexOf("?")) path = path.substring(0,path.indexOf("?")); var trim=true; dcsSaveHref(evt); myfetch = qry.toUpperCase(); mylength = myfetch.indexOf("&")!=-1?myfetch.indexOf("&"):myfetch.length; if (qry.toUpperCase().substring("WT.SVL=") != -1) WT.svl = qry.substring(myfetch.indexOf("WT.SVL=")+7,mylength); else WT.svl = ""; dcsMultiTrack("DCS.dcssip",window.location.hostname,"DCS.dcsuri",path,"DCS.dcsqry",trim?"":qry,"WT.ti","Offsite:"+e.hostname+path,"WT.os","1","WT.svl",WT.svl); DCS.dcssip=DCS.dcsuri=DCS.dcsqry=WT.ti=WT.svl=WT.os=""; } } } // WebTrends SmartSource Data Collector // Copyright (c) 1996-2006 WebTrends Inc. All rights reserved. // $DateTime: 2006/03/01 12:51:54 $ // Code section for Track clicks to download links. function dcsDownload(evt){ evt=evt||(window.event||""); if (evt){ var e=dcsEvt(evt,"A"); if (e.hostname&&dcsIsOnsite(e.hostname)){ var types="xls,doc,pdf,txt,csv,zip"; if (types.indexOf(e.pathname.substring(e.pathname.lastIndexOf(".")+1,e.pathname.length))!=-1){ var qry=e.search?e.search.substring(e.search.indexOf("?")+1,e.search.length):""; if (qry.toUpperCase().indexOf("WT.SVL=")==-1){ WT.svl=dcsParseSvl(e.name?e.name.toString():(e.onclick?e.onclick.toString():"")); } var path=e.pathname?((e.pathname.indexOf("/")!=0)?"/"+e.pathname:e.pathname):"/"; dcsSaveHref(evt); dcsMultiTrack("DCS.dcssip",e.hostname,"DCS.dcsuri",path,"DCS.dcsqry",e.search||"","WT.ti","Download:"+(e.innerHTML||""),"WT.dl","1"); DCS.dcssip=DCS.dcsuri=DCS.dcsqry=WT.ti=WT.svl=WT.dl=""; } } } } //***SearchBox*** //prototype object: SearchBox function SearchBox(sContainerNodeID) { this.ContainerNodeID = sContainerNodeID; this.nodeContainer = null; this.horTabs = null; this.verTabs = null; this.arrTabs = new Array(); this.searchWord = ""; //use this if you want to fill the searchbox with any search word on startup this.lastActiveTab = 1; var SearchBox = this; //CSS definitions this.ActiveClass = "Active"; this.LastClass = "Last"; this.HorTabsID = "horTabs"; this.VerTabsID = "morelist"; this.NoSearchTabID = "NoSearchTab"; this.HiddenDivID = "shadow_gray"; this.ArrowName = "arrow"; this.ArrowUp = "http://www.roon.ro/SysRes/SNPESkin/SearchBox/Buttons/arrowUp.png"; this.ArrowDown = "http://www.roon.ro/SysRes/SNPESkin/SearchBox/Buttons/arrowDown.png"; this.VerTabsItemID = "listitem"; this.VerTabsSpaceholderItemID = "spaceholder"; this.SearchFormID = "searchbox"; this.PageBodyID = "RO_Body"; // poate trebuie modificat if (document.getElementById(sContainerNodeID)) this.nodeContainer = document.getElementById(sContainerNodeID); if (this.nodeContainer != null) { this.horTabs = document.getElementById(this.HorTabsID); this.verTabs = document.getElementById(this.VerTabsID); this.horLIs = this.horTabs.getElementsByTagName("li"); this.verLIs = this.verTabs.getElementsByTagName("li"); // Traverse through horizontal li elements for (var i = 0; i < this.horLIs.length; ++i) { this.horLIs[i].className = ''; var TabTitle = this.FindFirstChild(this.horLIs[i], "H3"); var Content = this.FindFirstChild(this.horLIs[i], "FORM"); this.CleanUp(this.horLIs[i]); if (TabTitle != null && Content != null) { this.AddTab("HorTab" + i, TabTitle.innerHTML, TabTitle.className, Content); var a = document.createElement("a"); if (this.horLIs[i].id != this.NoSearchTabID) { var OnClickEvent = function () { SearchBox.CopySearchWord(); SearchBox.Activate(this.id, true); SearchBox.Visibility("off"); }; } else { var OnClickEvent = function () { SearchBox.Activate(this.id, false); if ("none" == document.getElementById(SearchBox.HiddenDivID).style.display || document.getElementById(SearchBox.HiddenDivID).style.display == "") { SearchBox.Visibility("on"); } else { SearchBox.Visibility("off"); } }; } a.href = "javascript:void(0);"; a.onclick = OnClickEvent; a.id = "HorTab" + i; a.style.cursor = "pointer"; a.innerHTML = TabTitle.innerHTML; this.horLIs[i].appendChild(a); } } // Traverse through vertical li elements for (var i = 0; i < this.verLIs.length; ++i) { this.verLIs[i].className = ''; var Tab = this.FindFirstChild(this.verLIs[i], "A"); this.CleanUp(this.verLIs[i]); if (Tab != null) { this.verLIs[i].appendChild(Tab); if (this.verLIs[i].innerHTML != "") { this.verLIs[i].className = this.VerTabsItemID; } else { //blank LI is used as spaceholder for seperating list this.verLIs[i].className = this.VerTabsSpaceholderItemID; } } } //define MouseEvents for Morelist var MoreListON = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); SearchBox.Visibility("on"); }; var MoreListOFF = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); SearchBox.reactivateLastActiveTab(); SearchBox.Visibility("off"); }; var delayedMoreListOFF = function () { if (typeof moreListTimeout != "undefined") clearTimeout(moreListTimeout); moreListTimeout = setTimeout(function(){SearchBox.Visibility("off");SearchBox.reactivateLastActiveTab();},1500); }; //event for click on SearchBox (either textBox or button) var searchFormular = document.getElementById(this.SearchFormID); searchFormular.onmouseup = MoreListOFF; //close list immediately if there was a click on the searchbox //events for LIs in morelist var ULMorelist = document.getElementById(this.VerTabsID); ULMorelist.onmouseover = MoreListON; //if mouse is over Morelist, fire this event to prevent closing the list ULMorelist.onmouseout = delayedMoreListOFF; //do not close list immediately, give the user a second, perhaps he slipped out ULMorelist.onclick = MoreListOFF; //close list, although the page will be left... //events for the whole page var pageBody = document.getElementById(this.PageBodyID); pageBody.onmouseup = delayedMoreListOFF; //prevent, that the H3s and FORMs on load of page are visible -> set visibility to visible in order to make the A elements visible this.horTabs.style.visibility = 'visible'; } } //activate this tab including form an background onload SearchBox.prototype.ActivateOnLoad = function (iNumber) { if (this.nodeContainer != null) { TabIdByNumber = this.arrTabs[iNumber-1].sTabID; this.Activate(TabIdByNumber,true); } } //method for finding the first child node with a certain node name SearchBox.prototype.FindFirstChild = function (nodeParent, sNodeName) { var nodeChild = nodeParent.firstChild; do { if (nodeChild && nodeChild.nodeName == sNodeName) return nodeChild; nodeChild = nodeChild.nextSibling; } while (nodeChild); return null; } //method for adding a Tab to Array SearchBox.prototype.AddTab = function(sTabID, sTabName, sBackgroundClass, ContentNode) { var newtab = new SearchBoxTab (sTabID, sTabName, sBackgroundClass, ContentNode); this.arrTabs.push(newtab); } //method for assigning a tab to class "Active" SearchBox.prototype.SetActiveTab = function(iNumber) { //active tab is in class "Active" for (var i = 0; i <= this.horLIs.length-1; i++) { this.horLIs[i].className = ""; if (i == iNumber-1) { this.horLIs[iNumber-1].className = this.ActiveClass; } } //last tab is in class "Last" this.horLIs[this.horLIs.length-1].className += " " + this.LastClass; } //method for reactivating the last active tab SearchBox.prototype.reactivateLastActiveTab = function() { TabIdByNumber = this.arrTabs[this.lastActiveTab-1].sTabID; this.Activate(TabIdByNumber,false); } //method for activating or deactivating the morelist SearchBox.prototype.Visibility = function(sOption) { var SearchBox = this; divChanger = document.getElementById(this.HiddenDivID); arrowPicture = document.getElementsByName(this.ArrowName); if (sOption == "on") { divChanger.style.display = 'block'; arrowPicture[0].src = this.ArrowUp; } if (sOption == "off") { divChanger.style.display = 'none'; arrowPicture[0].src = this.ArrowDown; } } //method for cleaning up the H3 and FORM elements which are replaced by an A element SearchBox.prototype.CleanUp = function(nodeContainer) { //clean up and remove all childs in container while (nodeContainer.firstChild) nodeContainer.removeChild(nodeContainer.firstChild) } //if user clicks on a Tab, this method looks in array which tab has been clicked and sets the active tab and changes the background SearchBox.prototype.Activate = function(id, bDrawContent) { this.id = id; this.bDrawContent = bDrawContent; var iIndex = this.GetIndexOfTabID(this.id); this.SetActiveTab(iIndex+1); //change background image var searchBackground = document.getElementById(this.ContainerNodeID); bgClass = this.arrTabs[iIndex].sBackgroundClass; searchBackground.className = bgClass; if (this.bDrawContent) { this.lastActiveTab = iIndex+1; this.DrawContent(iIndex); } } //this method puts the content of the FORM in an DIV (searchbox) SearchBox.prototype.DrawContent = function(iIndex) { if (iIndex != null) { //includes the html elements for the new search newSearch = this.arrTabs[iIndex].nodeContent; var eSearchForm = document.getElementById(this.SearchFormID); this.CleanUp(eSearchForm); //repleace the current search form eSearchForm.appendChild(newSearch); //pastes the copy of the last active search to the new search this.PasteSearchWord(); } } //this method finds the index of a Tab by TabID SearchBox.prototype.GetIndexOfTabID = function (sTabID) { for (var i = 0; i <= this.arrTabs.length-1; i++) { var iIndex = this.arrTabs[i].sTabID == sTabID ? i : null; if(iIndex != null) return iIndex; } } //this method creates a copy of the last active search SearchBox.prototype.CopySearchWord = function () { for (var i = 0; i < document.searchForm.length; ++i) { if (document.searchForm.elements[i].type == "text") { this.searchWord = document.searchForm.elements[i].value; } } } //this method pastes the copy of the last active search to the new search SearchBox.prototype.PasteSearchWord = function () { for (var i = 0; i < document.searchForm.length; ++i) { if (document.searchForm.elements[i].type == "text") { document.searchForm.elements[i].value = this.searchWord; } } } //object: SearchBoxTab function SearchBoxTab(sTabID, sTabName, sBackgroundClass, nodeContent) { //properties & defaults this.sTabName = "New Tab"; this.nodeContent = null; this.sTabID = null; this.sBackgroundClass = null; //set properties if (nodeContent) this.nodeContent = nodeContent; if (sTabName) this.sTabName = sTabName; if (sTabID) this.sTabID = sTabID; if (sBackgroundClass) this.sBackgroundClass = sBackgroundClass; }