var iPointData=new PointData();var iBubble=null;var iToolTipTimer=null;function PointData(){var i=[];var X="visible";var Y="hidden";var bh=null;var N=null;var Z=null;var ba=400;var x=null;var v="vector";var u=-1;var B="vectorLayer";var C=false;var O=0;iGlobalZoomListener.addListener(this);iGlobalPanListener.addListener(this);this.setDoNotShowParam=function(a){C=a};this.onPan=function(){this.onZoomAndPan(PAN)};this.onZoom=function(){this.onZoomAndPan(ZOOM)};this.checkForVectorLayer=function(a){var b=false;if(u!==-1){b=true}return b};this.showDataOnMap=function(a){D(a,"icon",false);bb(a);var b=iArrayTools.findInObjectArray(i,"iShortName",a);z(i[b].iLayer)};this.removeVectors=function(a){P(a)};function P(a){if(u!==-1){var b=i[u].iLayer.firstChild;if(b){var d=b.firstChild;while(d){var c=d.nextSibling;var f=d.getAttribute("id");if(f.indexOf(a)!==-1){b.removeChild(d)}d=c}}}}function bb(a){iXmlTools.removeChilds(i[iInx].iLayer);P(a);var b=iArrayTools.findInObjectArray(iServices,"name",a);var d=iServices[b].data.length;if(d>0){var c=iArrayTools.findInObjectArray(iServicesArr,"shortName",a);var f=iArrayTools.findInObjectArray(iServices[b].data[0],"name",iServicesArr[c].icon);var j=iThisAppPath+iServicesArr[c].imgDir;var h=iArrayTools.findInObjectArray(i,"iShortName",a);var g=0;for(g=0;g=q)&&(t<=y)){if((s>=o)&&(s<=r)){j.push(p)}}}}}}return j}function bc(a,b,d,c,f,j){clearTimeout(iToolTipTimer);var h=[];h=R(b,d,c,j,f,h);if(h.length>1){var g=b.parentNode;var l=g.parentNode;if(g){b.onmouseover=null;g.appendChild(b)}if(i.length>1){var m=iArrayTools.findInObjectArray(i,"iShortName",a);if(i[m].iLayer.getAttribute("layerType")==="icon"){if(l){l.appendChild(g)}}}}try{eval(a+".mouseOver(\""+b.getAttribute("id").split(iSeparatorSign)[1]+"\",\""+d+"\",\""+c+"\",\""+j+"\",\""+f+"\",\""+b.getAttribute("id")+"\");")}catch(e){iHandleService.mouseOver(a,b.getAttribute("id").split(iSeparatorSign)[1],d,c,j,f,null,b)}}function F(a){var b=null;var d=null;var c=null;var f=null;if(a){d=a.target;c=a.layerX;f=a.layerY}else{a=window.event;d=a.srcElement;c=a.clientX;f=a.clientY}if(d.getAttribute("parentIcon")){d=d.parentNode}var j=parseInt(d.style.left.split("px")[0],10);var h=parseInt(d.style.top.split("px")[0],10);var g=d.id;var l=g.split(iSeparatorSign)[0];var m=iArrayTools.findInObjectArray(iServicesArr,"shortName",l);if(m!==-1){iToolTipTimer=setTimeout(function(){bc(l,d,j,h,d.getAttribute("width"),d.getAttribute("height"))},200);if((iServicesArr[m].bigIcon)&&(Number(iServicesArr[m].bigIcon)!==0)){var k=Math.ceil(0.33*d.width);var p=Math.ceil(0.33*d.height);N=setTimeout(function(){bd(d,k,p,m)},200)}}}function be(a,b,d,c,f){var j=a.getAttribute("scale");if(j==="true"){var h=Math.ceil(parseInt(a.width,10)-parseInt(b,10));var g=Math.ceil(parseInt(a.height,10)-parseInt(d,10));a.setAttribute("width",h);a.setAttribute("height",g);a.setAttribute("scale","false");if(iServicesArr[c].bigIcon===1){var l=a.getAttribute("src");var m=l.split("_big."+iServicesArr[c].iconType)[0]+"."+iServicesArr[c].iconType;a.setAttribute("src",m)}S(null,a,b,d)}}function bd(a,b,d,c){var f=a.getAttribute("scale");if(f==="false"){a.setAttribute("scale","true");var j=Math.ceil(parseInt(a.width,10)+parseInt(b,10));var h=Math.ceil(parseInt(a.height,10)+parseInt(d,10));a.setAttribute("width",j);a.setAttribute("height",h);if(iServicesArr[c].bigIcon===1){var g=a.getAttribute("src");var l=g.split("."+iServicesArr[c].iconType)[0]+"_big."+iServicesArr[c].iconType;a.setAttribute("src",l)}S(true,a,b,d)}}function S(a,b,d,c){var f=b.style.left.split("px")[0];var j=b.style.top.split("px")[0];var h=Math.ceil(d/2);var g=Math.ceil(c/2);if(a){b.style.left=parseInt(f,10)-h+"px";b.style.top=parseInt(j,10)-g+"px"}else{b.style.left=parseInt(f,10)+h+"px";b.style.top=parseInt(j,10)+g+"px"}}function Q(a){clearTimeout(iToolTipTimer);clearTimeout(N);clearTimeout(Z);if(iBubble){iBubble.close()}var b=null;var d=null;if(a){b=a.target}else{a=window.event;b=a.srcElement}if(b.getAttribute("parentIcon")){b=b.parentNode}var c=b.getAttribute("id");if(!c){var f=b.parentNode;c=f.getAttribute("id");b=f}b.onmouseover=F;var j=c.split(iSeparatorSign)[0];var h=iArrayTools.findInObjectArray(iServicesArr,"shortName",j);if((h!==-1)&&(iServicesArr[h].bigIcon)&&(iServicesArr[h].bigIcon!==0)){var g=Math.ceil(0.25*b.width);var l=Math.ceil(0.25*b.height);be(b,g,l,h)}try{eval(j+".mouseOut(\""+b.getAttribute("id").split(iSeparatorSign)[1]+"\");")}catch(e){try{iHandleService.mouseOut(j,b.getAttribute("id").split(iSeparatorSign)[1])}catch(e1){}}}this.clickOnObj=function(a){E(null,a)};function E(a,b){if(iBubble){iBubble.close()}var d=[];var c=null;var f=b;if(!f){if(a){f=a.target}else{a=window.event;f=a.srcElement}}if(f.getAttribute("parentIcon")){f=f.parentNode}var j=parseInt(f.style.left.split("px")[0],10);var h=parseInt(f.style.top.split("px")[0],10);if(a){c=a.button}var g=f.id;var l=g.split(iSeparatorSign)[0];var m=g.split(iSeparatorSign)[1];if(c===2){iHandleService.mouseRightClick(l,m,f)}else{d=R(f,j,h,f.getAttribute("width"),f.getAttribute("height"),d);var k=d.length;var p=new Date();var n=p.getTime();var s=null;var t="";var o=0;for(o=0;o";var w=iArrayTools.findInObjectArray(iServicesArr,"shortName",q);if((w!==-1)&&(iServicesArr[w].xslRowUrl)&&(iServicesArr[w].xslRowUrl!=="")){try{eval(q+'.clickOnObj("'+q+'","'+m+'","'+y+'","'+iServicesArr[w].xslRowUrl+'",'+n+')')}catch(e){try{eval(q+'.clickOnObj("'+q+'","'+m+'","'+encodeURIComponent(y)+'","'+iServicesArr[w].xslRowUrl+'",'+n+')')}catch(er1){try{iHandleService.clickOnObj(y,iServicesArr[w].xslRowUrl,p.getTime(),m)}catch(er2){}}}}}}}iPan.destroyChoiceMenuPublic()}}this.formXML=function(a,b){return T(a,b)};function T(a,b){var d=iArrayTools.findInObjectArray(iServices,"name",a);var c="";if(d!==-1){c="";c+=""+a+"";c+=""+b+"";if(iServices[d].data[b]){var f=0;for(f=0;f"+h+""}}c+=""}c=c.replace(/\s/g,' ');return c}function bi(a,b){var d=iThisAppPath+"xsl/"+a+"_row.xsl";var c=iXmlTools.XMLToXSL(b,d)}this.insertDataLayer=function(a,b,d){D(a,b,d)};function D(a,b,d){iInx=iArrayTools.findInObjectArray(i,"iShortName",a);if(iInx===-1){var c=null;c=iDoc.createElement("div");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.setAttribute("layerName",a);c.setAttribute("layerType",b);var f=iDoc.getElementById("data");if(f){if(b===v){f.insertBefore(c,f.firstChild);u=i.length}else if(b==="map"){f.insertBefore(c,f.firstChild)}else if(b==="staticLayer"){var j=null;var h=0;for(h=0;h0){var a=0;var b=i.length;for(a=0;ao){r=o}var q=Math.ceil(n-(d/2))+f;if(q<-o){q=-o}else if(q>o){q=o}a.style.left=r+"px";a.style.top=q+"px"}this.recalculateIconsXY=function(a){z(a)};function z(a){if(a){var b=a.getAttribute("layerType");if((b==="icon")||(b==="map")||(b==="staticLayer")){var d=a.childNodes;var c=0;for(c=0;c