function LoadingWnd(o,g){var k=o;var m=g;var e=null;this.getLoadWnd=function(a,d,b,c,i){e=k.createElement("div");e.setAttribute("id","choiceMenu");if(i==="absolute"){e.style.position="absolute";e.style.left=a+"px";e.style.top=d+"px"}var f=k.createElement("img");f.src=iPath+"img/loading.gif";f.width=b;f.height=c;f.style.position=i;e.appendChild(f);return e};this.close=function(){var a=e.parentNode;if(a){a.removeChild(e)}}}function Bubble(){var u=null;var s=null;var p=0;var h=0;var q=0;var w=0;var C=0;var z=0;this.getBubble=function(a,d,b,c,i,f,o){if(!i){i=0;a+=5}else{a+=Math.round(i/2)+5}if(!f){f=0}d-=10;u=iDoc.createElement("div");u.style.position="absolute";var g=20;var k=0;var m=a;var e=d;if(c<40){c=40}var j=iDrawingTools.createGroup("bubbleG",1000,1000);var n=null;var r='#808080';if(!o){if(((a+b+25)>=iWidth)&&((d+c)<=iHeight)&&((d+c)>0)&&(d>0)){n=0;g=0;k=0;m=a-b-22-i+10;p=g+b-1;h=12;q=p+15;w=h;C=p;z=h+22}else if(((d+c)>=iHeight)&&((a+b)<=iWidth)&&((a+b)>0)){n=1;g=0;k=0;if(a>(b-12)){m=a-b-5;e=d-c-f-7;p=b-12;h=c-1;q=p;w=h+15;C=p-22;z=h}else{m=a-i;e=d-c-f-7;p=12;h=c-1;q=p;w=h+15;C=p+22;z=h}}else if(((d+c)>=iHeight)&&((a+b)>=iWidth)){n=2;g=0;k=0;m=iWidth-b-20-(iWidth-a);e=iHeight-c-20-(iHeight-d);p=b-32;h=c-1;q=p;w=h+15;C=p-22;z=h}else if(d<0){n=3;g=0;k=20;m=a-b-5;e=d+10+Math.round(f/2);p=b-12;h=21;q=p;w=h-15;C=p-22;z=h}else{m+=10;n=4;p=21;h=12;q=p-15;w=h;C=p;z=h+22}var x=iDrawingTools.createElement("polyline");x.setAttribute("points",(p+6)+","+(h+6)+" "+(q+6)+","+(w+6)+" "+(C+6)+","+(z+6));if(!Browser.SVG){x.setAttribute("strokecolor",r);x.setAttribute("fillcolor",r);var D=iDrawingTools.createElement("fill");D.setAttribute("opacity",0.8);x.appendChild(D)}else{x.setAttribute("fill",r);x.setAttribute("stroke",r);x.setAttribute("fill-opacity",0.8)}j.appendChild(x)}u.style.left=m+"px";u.style.top=e+"px";var t=iDrawingTools.createRectangle(g+6,k+6,b,c,r,r,null,0.8,0.02,6,6);j.appendChild(t);if(Browser.type===1){g+=1}var E=iDrawingTools.createRectangle(g,k,b,c,"white","black",null,null,0.02,6,6,"crispEdges");j.appendChild(E);if(!o){arrow=iDrawingTools.createElement("polyline");arrow.setAttribute("points",p+","+h+" "+q+","+w+" "+C+","+z);if(!Browser.SVG){arrow.setAttribute("strokecolor","black");arrow.setAttribute("fillcolor","white")}else{arrow.setAttribute("fill","white");arrow.setAttribute("stroke","black");arrow.setAttribute("shape-rendering","crispEdges")}j.appendChild(arrow)}var B=iDrawingTools.createRectangle(g+1,k+1,b-2,c-2,"white","white",null,null,0.1,6,6,"crispEdges");j.appendChild(B);if(Browser.SVG){var y=b+30;var l=c+15;if(n===0||n===1||n===2){y=b+15}var v=iDrawingTools.createElement("svg");v.setAttribute("width",(y)+"px");v.setAttribute("height",(l)+"px");v.appendChild(j);u.appendChild(v)}else{u.appendChild(j)}s=iDoc.createElement("div");s.style.position="absolute";s.style.width=(b-6)+"px";s.style.height=(c-6)+"px";s.style.left=(g+2)+"px";s.style.top=(k+3)+"px";u.appendChild(s);return u};this.addContext=function(a){s.appendChild(a)};this.addTxtContent=function(a){s.innerHTML=a};this.close=function(){if(u){var a=u.parentNode;if(a){a.removeChild(u)}}}}function AdvancedToolTip(t,E){var B=t;var y=E;var l=null;var v=null;this.getAdvancedToolTip=function(a,d,b,c,i,f,o,g,k){if(!g){g=0}if(!k){k=0}if(!f){f="white"}if(!o){o=3}else{o=parseInt(o,10)}d-=10;l=B.createElement("div");l.style.position="absolute";var m=0;var e=0;if(c<40){c=40}var j=iDrawingTools.createGroup("toolTipG",1000,1000);l.style.left=a+"px";l.style.top=d+"px";var n=null;var r=null;var x=null;if(i){n=iDrawingTools.createRectangle(m+o,e+o,b,c,"#808080","#808080",null,0.8,0.05,6,6)}else{n=iDrawingTools.createRectangle(m+o,e+o,b,c,"#808080","#808080")}j.appendChild(n);if(y===1){m+=1}if(i){r=iDrawingTools.createRectangle(m,e,b,c,f,"black",null,null,0.05,6,6,"crispEdges")}else{r=iDrawingTools.createRectangle(m,e,b,c,f,"black",null,null,null,null,null,"crispEdges")}j.appendChild(r);if(i){x=iDrawingTools.createRectangle(m+1,e+1,b-2,c-2,f,f,null,null,0.1,6,6,"crispEdges")}else{x=iDrawingTools.createRectangle(m+1,e+1,b-2,c-2,f,f,null,null,null,null,null,"crispEdges")}j.appendChild(x);if(y===1){var D=iDrawingTools.createElement("svg");D.setAttribute("width",(b+30)+"px");D.setAttribute("height",(c+30)+"px");D.appendChild(j);l.appendChild(D)}else{l.appendChild(j)}v=B.createElement("div");v.style.position="absolute";v.style.width=(b-6)+"px";v.style.height=(c-6)+"px";v.style.left=(m+2)+"px";v.style.top=(e+3)+"px";l.appendChild(v);return l};this.addContext=function(a){v.appendChild(a)};this.close=function(){if(l){var a=l.parentNode;if(a){a.removeChild(l)}}}}function ListMenuWnd(x,D){var t=x;var E=D;var B=null;var y=null;var l=null;var v=null;var u=null;var s=100;var p=30;var h=null;var q=null;var w=0;var C=null;var z="";var I=0;var A=null;var F=0;var G=false;var H=0;function J(a){a.style.opacity=70;a.style.filter='alpha(opacity=70)'}this.getMenuWnd=function(a,d,b,c,i){if(c){F=1}if(i){s=i}B=a;y=d;z=b;I=a;q=t.createElement("div");q.setAttribute("id",z);q.style.position="absolute";q.style.left="0px";q.style.top="0px";q.style.height="0px";q.style.width=s+"px";q.style.zIndex="10";if((B+s)>iWidth){B=iWidth-s-4}h=t.createElement("table");h.style.position="absolute";h.style.top=y+"px";h.style.left=B+"px";h.style.width=s+"px";h.setAttribute("border","0");h.setAttribute("cellspacing","1");u=t.createElement("tbody");h.appendChild(u);h.style.cursor="pointer";if(F===0){A=t.createElement("div");A.style.position="absolute";A.style.left=B+4+"px";A.style.top=y+3+"px";A.style.height="0px";A.style.width=s-2+"px";if(E===1){A.style.opacity="0.7"}else{J(A)}A.style.backgroundColor="#808080";q.appendChild(A)}q.appendChild(h);H=33;return q};this.addDefaultLine=function(a,d,b,c,i){G=true;if(E===0){H=17}else{H=28}var f=iPath+"img/";var o=t.createElement("tr");var g=t.createElement("td");g.style.width=s+"px";g.className="contextMenuTd";g.style.height="15px";g.align="right";g.style.cursor="pointer";var k=t.createElement("img");k.src=f+"close.gif";k.style.cursor="pointer";k.title=d;g.appendChild(k);k.onclick=function(){a.handleCommand("close")};o.appendChild(g);u.appendChild(o);var m=t.createElement("tr");var e=t.createElement("td");e.style.width=s+"px";e.className="contextMenuTd";e.style.cursor="pointer";var j=t.createElement("img");j.src=f+"zoomin.jpg";j.width=32;j.height=40;j.style.cursor="pointer";j.setAttribute("title",b);e.appendChild(j);j.onclick=function(){a.handleCommand("zoom in")};var n=t.createElement("img");n.src=f+"zoomout.jpg";n.width=32;n.height=40;n.style.cursor="pointer";n.setAttribute("title",c);e.appendChild(n);n.onclick=function(){a.handleCommand("zoom out")};var r=t.createElement("img");r.src=f+"centermap.jpg";r.width=31;r.height=40;r.style.cursor="pointer";r.setAttribute("title",i);e.appendChild(r);r.onclick=function(){a.handleCommand("center map")};m.appendChild(e);u.appendChild(m)};this.addNewLine=function(a,d,b,c){v=t.createElement("tr");l=t.createElement("td");l.innerHTML=a;l.style.width=s+"px";l.className="contextMenuTd";l.style.cursor="pointer";if(d&&b){l.onclick=function(){d.handleCommand(b,c,c)}}l.setAttribute("id","td"+w);l.onmouseover=K;var i=0;if(G===false){i=17}else{i=24}if((y+(w+1)*i)>iHeight){y=iHeight-((w+1)*i);h.style.top=y+"px";if(F===0){A.style.top=y+4+"px"}}v.appendChild(l);u.appendChild(v);w++;if(F===0){var f=0;if(E===0){f=w*17}else{f=w*16}if(G){f+=61}A.style.height=(f)+"px"}};function K(a){var d=null;if(a){d=a.target}else{var b=window.event;d=b.srcElement}d.className="selectedContextMenuTd";L(a)}function L(a){var d=null;if(a){d=a.target}else{var b=window.event;d=b.srcElement}d.onmouseout=M}function M(a){var d=null;if(a){d=a.target}else{var b=window.event;d=b.srcElement}d.className="contextMenuTd"}function P(){l.style.backgroundColor="#C0C0C0"}function Q(){N()}function N(){q.onmouseout=O}function O(){var a=t.getElementById(z);if(a){a.parentNode.removeChild(a)}}}function InfoForUserWindow(){var e=null;var j=null;this.getWindowElement=function(a,d,b,c,i,f,o,g,k){this.close();e=new Bubble(iDoc,iBrowser);var m=e.getBubble(a,d,b,c,null,null,true);if(f){n(f,o,g,k)}if(i){if(j){clearTimeout(j)}j=null;j=setTimeout(r,i)}return m};function n(a,d,b,c){var i=iDoc.createElement("table");i.style.width="100%";i.style.height="100%";i.border="0";var f=iDoc.createElement("tbody");i.appendChild(f);var o=iDoc.createElement("tr");f.appendChild(o);var g=iDoc.createElement("td");o.appendChild(g);g.style.textAlign="center";g.style.fontFamily="Verdana";if(d){g.style.fontSize=d+"px"}if(b){g.style.color=b}if(c){g.style.fontWeight=c}var k=document.createTextNode(a);g.appendChild(k);e.addContext(i)}function r(){if(j){clearTimeout(j);j=null}if(e){e.close();e=null}}this.close=function(){r()}}