function insertAddress($3s,event){hideInfo();$0K();$1s('crosshair');toolMode="createaddress";setStatus(cl_selectNewObjectPosition);$2H(updateTooltip);enableTooltip();$3t=$3s;updateTooltip(event);};
function editAddressFormCancel(){hideObj('addresseditwindow');clearToolstate();startPan();};
function editAddressFormOk(){var $3u=document.getElementById("addresseditwindow");var $3v=document.getElementById("streetnameselect");var $3w=document.getElementById("addressnumberfield");$e($3u);if($3u.isedit){var $3x=$0i($3u.DBIndex,$3u.Id);if($3x){$3x.UpdateAddress($3u.Id,$3v.value,$3w.value);}}else{var $3x=new SR_Point("","","",null,$3y,$3z);var $3A=SearchDB.Insert($3x);$3x.SetAddress($3A,$3u.$eK,$3v.value,$3w.value,$3y,$3z);};clearToolstate();startPan();$3u.DBIndex=null;$3u.Id=null;$0H(true);};
function $a($3s){var $3B=document.getElementById("addresseditwindow");var $3v=document.getElementById("streetnameselect");var $3w=document.getElementById("addressnumberfield");var $3C=$3D.get_StreetNames($3s);if($3C&&$3C.length>0){var i;for(i=$3v.length-1;i>=0;i--)$3v.remove(i);for(i=0;i<$3C.length;i++)$3v.options[$3v.options.length]=new Option($3C[i],$3C[i]);var $3x=null;if($3B.DBIndex&&$3B.Id)$3x=$0i($3B.DBIndex,$3B.Id);if($3x){if($3x.StreetName)$3v.value=$3x.StreetName;else $3v.value="";if($3x.AddressNumber)$3w.value=$3x.AddressNumber;else $3w.value="";}else{$3w.value="";}};$f($3B);};
function $b($3E,Id,$3s,event){var $3B=document.getElementById("addresseditwindow");var $3v=document.getElementById("streetnameselect");var $3w=document.getElementById("addressnumberfield");$3F=$0S(event,$3B);$3B.style.left=$3F.x+"px";$3B.style.top=$3F.y+"px";if($3E&&Id){$3B.isedit=true;var $3x=$0i($3E,Id);if($3x){$3B.DBIndex=$3E;$3B.Id=Id;if($3x.Municipality){if(!$3D.ExistMunicipality($3x.Municipality)){$3D.Load($3x.Municipality);cancelEventPropagation(event);return;}};if($3x.StreetName)$3v.value=$3x.StreetName;else $3v.value="";if($3x.AddressNumber)$3w.value=$3x.AddressNumber;else $3w.value="";}}else{$3B.$eK=$3s;if(!$3D.ExistMunicipality($3s)){$3D.Load($3s);cancelEventPropagation(event);return;};$3w.value="";$3B.isedit=false;};$f($3B);cancelEventPropagation(event);};var $3G;var $3H;var $3I;
function startSlide($3J,$3K,$3L){var k=null;if($3J!=0){k=Math.abs((1.0*$3K)/$3J);};if(slideActive==false){slideActive=true;$3M="map";$3H=Math.abs($3J);$3I=Math.abs($3K);slideMap($3J,$3K,$3L,k);}};
function slideMap($3J,$3K,$3L,k){var $3N="slideMap("+$3J+","+$3K+","+$3L+","+k+")";var $3O=30;var $3P=0;var $3Q=0;if(k!=null){sx=$3O/Math.sqrt(Math.pow(k,2)+1);sy=$3O*k/Math.sqrt(Math.pow(k,2)+1);$3P=Math.ceil($3O/Math.sqrt(Math.pow(k,2)+1));$3Q=Math.ceil($3O*k/Math.sqrt(Math.pow(k,2)+1));}else{$3P=0;$3Q=$3O;};$3H=$3H-$3P;$3I=$3I-$3Q;if($3H>0||$3I>0){if($3H>0){if($3J>0){$3P=$3P;}else if($3J!=0){$3P=-$3P;}};if($3I>0){if($3K>0){$3Q=$3Q;}else if($3K!=0){$3Q=-$3Q;}};doPan(null,$3P,$3Q);$3G=setTimeout($3N,$3L);}else{$0q();$2W();slideActive=false;}};var $3R;var $3S;var $3T;var $3U=2.0;var $3V=0.5;var $3W;var $3X;
function startZoomEffect($3Y){var $3Z=document.getElementById("mappics");var $40=document.getElementById("zoomeffect");var $41=document.getElementById("maphider");var $42;var i;$3R=getImageArea($43);$40.style.left=$44.style.left;$40.style.top=$44.style.top;var $45=$43.length;for(i=0;i<$45;i++){$46=$43[i];var $47=document.createElement("img");$47.style.position="absolute";$47.style.left=$46.style.left;$47.style.top=$46.style.top;$47.startleft=parseInt($46.style.left,10);$47.starttop=parseInt($46.style.top,10);$47.imgX=$46.imgX;$47.imgY=$46.imgY;$47.src=appPath+"/img/empty.gif";$47.src=$46.src;$40.appendChild($47);};$3W=1.0;$3S=parseInt($40.style.left,10);$3T=parseInt($40.style.top,10);$41.style.visibility="visible";drawZoomEffect($3Y);};
function drawZoomEffect($3Y){if(($3W<$3U&&$3Y)||($3W>$3V&&!$3Y)){var $40=document.getElementById("zoomeffect");var $48=document.getElementById("effectpics");var $3N;if($3Y){$3N="drawZoomEffect(true)";}else{$3N="drawZoomEffect(false)";};$49=$40.childNodes;for(i=0;i<$49.length;i++){$49[i].style.left=($49[i].startleft+Math.round(256*($3W-1)*$49[i].imgX))+"px";$49[i].style.top=($49[i].starttop+Math.round(256*($3W-1)*$49[i].imgY))+"px";$49[i].style.width=Math.ceil(256*$3W)+"px";$49[i].style.height=Math.ceil(256*$3W)+"px";};dx=Math.round((Math.abs($3S+$3R.left)+$4a/2.0)*(1-$3W));dy=Math.round((Math.abs($3T+$3R.top)+$4b/2.0)*(1-$3W));$40.style.left=$3S+dx+"px";$40.style.top=$3T+dy+"px";if($3Y){$3W=$3W*1.15;}else{$3W=$3W/1.15;};$3X=setTimeout($3N,30);}else{stopZoomInEffect();}};
function stopZoomInEffect(){var $40=document.getElementById("zoomeffect");var $41=document.getElementById("maphider");zoomPending=false;$41.style.visibility="hidden";for(i=$40.childNodes.length;i>0;i--){$40.removeChild($40.childNodes[i-1]);}};
function Browser$ClipBoard(element){if($4c){var $4d=element.createTextRange();$4d.execCommand("Copy");}};
function Browser$BookMark(title,$4e){if(window.sidebar){window.sidebar.addPanel(title,$4e,"");}else if(window.external){window.external.AddFavorite($4e,title);}else if(window.opera&&window.print){var $4f=document.createElement('a');$4f.setAttribute('rel','sidebar');$4f.setAttribute('href',$4e);$4f.setAttribute('title',title);$4f.click();}};
function Browser$Email($4g,$4e){window.open("mailto:?subject="+$4g+"&body="+cl_mapLinkName+" "+$2s($4e),"email");};
function $c($3u){var sb=new StringBuilder("");for(var i=0;i<$3u.length;i++){var element=$3u[i];var $4h="";if(!String.IsPrintable(element.name)){continue;};switch(element.type.toLowerCase()){case 'submit':case 'hidden':case 'password':case 'text':case 'textarea':$4h="&"+element.name+"="+$2s(element.value);break;case 'checkbox':case 'radio':if(element.checked){$4h="&"+element.name+"="+element.value;};break;case 'select-one':var $4i=element.selectedIndex;if($4i>=0){var $4j=element.options[$4i];$4h="&"+element.name+"="+$4j.value;};break;case 'select-multiple':for(var e=0;e<element.length;e++){var $4k=element.options[e];if($4k.selected){$4h+="&"+element.name+"="+$4k.value;}};break;case 'button':$4h="&"+element.name+"="+element.value;break;default:alert("Unknown type: "+$4l);};sb.Append($4h);};return sb.ToString();};
function $d($3u){for(var i=0;i<$3u.length;i++){var element=$3u[i];if(!String.IsPrintable(element.name)){continue;};switch(element.type.toLowerCase()){case 'submit':case 'hidden':case 'password':case 'text':case 'textarea':element.value="";break;case 'checkbox':case 'radio':break;case 'select-one':if(element.length>0){element.selectedIndex=0;};break;case 'select-multiple':for(var e=0;e<element.length;e++){var $4j=element.options[e];if($4j.selected){$4j.selected=false;}};break;case 'button':break;default:}}};
function hideObj($4m){var $3x=document.getElementById($4m);$e($3x);};
function $e($3x){if($3x){$3x.style.visibility="hidden";if($4n){$3x.style.display="none";}}};
function showObj($4m){var $3x=document.getElementById($4m);$f($3x);};
function $f($3x){if($3x){$3x.style.visibility="visible";$3x.style.display="block";}};var $4o=null;
function startMenuTimer(){removeMenuTimer();$4o=setTimeout("hideMenu();",400);};
function removeMenuTimer(){if($4o){clearTimeout($4o);$4o=null;}};
function hideMenu(){removeMenuTimer();hideObj("actionMenu");};
function MapCollectionActionMenu(parent){showObj("actionMenu");var $3x=document.getElementById("actionMenu");$3x.onmouseover=function(){removeMenuTimer();};$3x.onmouseout=function(){startMenuTimer();};if(parent){}};var $4p=null;var $4q=null;var $4r=null;
function $g(id,name,$4s){$4p=id;$4q=name;$4r=$4s;var $4t=document.getElementById("activeCollectionName");if($4t){if(name){$4t.innerHTML=name;}else{$4t.innerHTML=id?cl_unnamedCollection:cl_unsavedCollection;}}};
function collectionPropertiesSave(){var name=document.getElementById("collectionName");var $4s=document.getElementById("collectionExplanation");$4q=name.value;$4r=$4s.value;var $3x=document.getElementById("propertiesTab");MapCollectionSave($3x.onready,true);$e($3x);};
function collectionPropertiesCancel(){hideObj("propertiesTab");};
function collectionPropertiesShow($4u,$4v){var name=document.getElementById("collectionName");var $4s=document.getElementById("collectionExplanation");if(name){name.value=$4u?"":String.get_Safe($4q);};if($4s){$4s.value=$4u?"":String.get_Safe($4r);};var $3x=document.getElementById("propertiesTab");$3x.onready=$4v;$f($3x);};
function $h(){var $4w=false;if(document.getElementById('collectionNew')){$4w=true;};return $4w;};
function MapCollectionNew($4x){if(MySitesDB.get_Dirty()&&$h()){var ok=confirm(String.format(cl_unsavedChangesSave,$4q?$4q:""));if(ok){MapCollectionSave("new",false);return;}};$g(null,null,null);clearMySites();MySitesDB.set_Dirty(false);showMySitesTab();if(!$4x){collectionPropertiesShow();}};
function MapCollectionActivate($4y){if(MySitesDB.get_Dirty()&&$h()){var $4z=String.format(cl_unsavedChangesSave,String.get_Safe($4q));var ok=confirm($4z);if(ok){MapCollectionSave("activate&activateid="+$4y,false);return;}};var $4A="POST";var $4e=appPath+"/MapCollectionLink.ashx";var $4B="action=opencollection&mid="+$4y;$4B+="&subsite="+$2t(subsite);$3p("ib",$4A,$4e,$4B,$p);};
function MapCollectionDelete(){var $4y=$4p;var $4z=String.format(cl_deleteCollectionConfirm,String.get_Safe($4q));var $4C=confirm($4z);if($4C){var $4A="POST";var $4e=appPath+"/MapCollectionLink.ashx";var $4B="action=deletecollection&mid="+$4y;$3p("ib",$4A,$4e,$4B,$j);}};
function MapCollectionSave($4D,$4E){var $4A="POST";var $4e=appPath+"/MapCollectionLink.ashx";var $4B;var $4F=$h();if($4F&&$4p){$4B=$m("updatecollection",$4p);}else{if($4F){if(!$4E&&!String.IsPrintable($4q)){collectionPropertiesShow(true,$4D);return;}else{$4B=$m("savecollection");}}else{$4B=$m("savecollection");};$4B+="&subsite="+$2t(subsite);};$4B+=$l();if($4D){$4B+="&onready="+$4D;};$3p("ib",$4A,$4e,$4B,$k);};
function $i($3x,$4G){if($4G){if($3x.value==$4G){$3x.className='fieldblurred';}else{$3x.className='fieldactive';}}else if($3x.value.length>0){$3x.className='fieldactive';}};
function MapCollectionShortLink(){if($h()){if($4p){showShortLink($4p);}else{MapCollectionSave("shortlink");}}else{MapCollectionSave("shortlink");}};
function $j(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K){if($4K.status){MapCollectionNew(true);if($4K.op=="delete"){$u($4K.mapid);}}else{}}}};
function $k(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K){if($4K.status){if($4K.reg){$g($4K.mid,$4K.name,$4K.tip);};if($4K.op=="update"){$v($4K.mid,$4K.name);}else if($4K.op=="insert"){$w($4K.mid,$4K.name);};MySitesDB.set_Dirty(false);if($4K.onready){if($4K.onready=='shortlink'){showShortLink($4K.mid);}else if($4K.onready=='new'){MapCollectionNew();}else if($4K.onready=='activate'){if($4K.activateid){MapCollectionActivate($4K.activateid);}}}}else{}}}};
function $l(){var $4B="&layers="+$2t(Themes[currentTheme].Name);$4B+=$1B();$4B+="&cp="+Math.round(centerSouth)+","+Math.round(centerEast);$4B+="&z="+Themes[currentTheme].Wupp[zoomLevel];$4B+="&language="+currentLanguage;return $4B;};
function $m($4L,id){var $4M=0;var $4N=new StringBuilder("action="+$4L);if(id){$4N.Append("&mid="+id);};$4N.Append("&Name="+$2t($4q));$4N.Append("&Explanation="+$2t($4r));for(var Id in MySitesDB.hashtable){var $3x=MySitesDB.hashtable[Id];if($3x&&$3x.Name){var s="&Name"+$4M+"="+$2t($3x.Name);s+="&Explanation"+$4M+"="+$2t($3x.Explanation);s+="&Url"+$4M+"="+$2t($3x.Url);s+="&Image"+$4M+"="+$2t($3x.Image);if($3x.PointArray){var $4O=$3x.get_Filled();s+="&PointArray"+$4M+"="+$3x.PathToString();s+="&Fill"+$4M+"=";s+=$4O?"true":"false";s+="&LineColor"+$4M+"="+String.get_Safe($3x.LineColor);s+="&LineType"+$4M+"="+String.get_Safe($3x.LineType);s+="&LineWidth"+$4M+"="+String.get_Safe($3x.LineWidth);if($4O){s+="&FillColor"+$4M+"="+$3x.FillColor;}}else{s+="&North"+$4M+"="+Math.round($3x.North);s+="&East"+$4M+"="+Math.round($3x.East);};$4N.Append(s);$4M++;}};$4N.Append("&Count="+$4M);return $4N.ToString();};
function $n($4P){var $4M=0;var $4N=new StringBuilder("");for(var Id in MySitesDB.hashtable){var $3x=MySitesDB.hashtable[Id];if($0h($3x)){var s="";if($4M>0){s="&";};if($3x.PointArray){var $4O=$3x.get_Filled();s+="PointArray"+$4M+"="+$3x.PathToString();s+="&Fill"+$4M+"=";s+=$4O?"true":"false";}else{s+="North"+$4M+"="+Math.round($3x.North);s+="&East"+$4M+"="+Math.round($3x.East);};if($4P){s+="&Name"+$4M+"="+$2t($3x.Name);s+="&Explanation"+$4M+"="+$2t($3x.Explanation);};$4N.Append(s);$4M++;}};$4N.Append("&Count="+$4M);return $4N.ToString();};
function $o($4K){var $4Q=false;hideInfo();MySitesDB.Clear();if($4K&&$4K.Layer){var $4R=$1n($4K.Layer);if($4R!=currentTheme){$2U($4R,$4K.onlayers,$4K.offlayers);};if($4K.count<1){$4Q=true;}};$0u(MySitesDB,$4K,$4S);if($4K){$g($4K.CollId?$4K.CollId:null,$4K.CollName,$4K.CollExp);if($4Q){zoomLevel=$2Y($4K.zoom);centerSouth=$4K.north;centerEast=$4K.east;$2V();$31();$1a();$2T(true);}};if(!$4T){showMySitesTab();};showAllMySites();$1k();MySitesDB.set_Dirty(false);};
function $p(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K){$o($4K);}}};
function showMySites(){showMySitesTab($4U);};
function $q(){hideObj("myMapsTab");hideObj("myObjectsTab");hideObj("mysiteslist");hideObj("mysiteswindow");};var $4U=null;
function showMySitesTab($4V){var $4W=$0V("mysiteswindow");showObj("mysiteswindow");var $4X=document.getElementById("mysitescell");var $4Y=document.getElementById("mysitescellend");var $4Z=document.getElementById("mymapscell");var $50=document.getElementById("mymapscellend");if($4V){hideObj("myObjectsTab");hideObj("mysiteslist");showObj("myMapsTab");$4Z.className="htabon htabtext";$4X.className="htab htabtext";$4Y.className="htab";$50.className="htabon";}else{hideObj("myMapsTab");showObj("myObjectsTab");showObj("mysiteslist");$4Z.className="htab htabtext";$4X.className="htabon htabtext";$4Y.className="htabon";$50.className="htab";};$4U=$4V;if(!$4W){$1S("mysiteswindow",null);}};
function $r(){var $51=document.getElementById('myMapsBody');var $52=0;for(var Id in $53.hashtable){var $3x=$53.hashtable[Id];if($3x&&$3x.Name){var $54=$51.insertRow($52);var $55=$54.insertCell(0);$54.id="midtr"+$3x.MapId;$55.innerHTML=$t($3x);$52++;}}};
function $s(){var $56=false;try{if(Collections){var length=Collections.length;for(var i=0;i<length;i++){var name=Collections[i].name;if(!String.IsPrintable(name)){name="Collection";};$53.Insert(Collections[i].mid,name);};$56=true;}}catch(e){$56=false;};$r();};
function $t($3x){return "<a class=\"bluelink\" onmousedown=\"MapCollectionActivate('"+$3x.MapId+"')\">"+$3x.Name+"</a>";};
function $u($57){var $54=document.getElementById('midtr'+$57);var $51=document.getElementById('myMapsBody');$51.deleteRow($54.rowIndex);$53.Delete($57);};
function $v($57,name){var $54=document.getElementById('midtr'+$57);var $55=$54.cells[0];var $3x=$53.Update($57,name);$55.innerHTML=$t($3x);};
function $w($57,name){var $3x=$53.Insert($57,name);var $51=document.getElementById('myMapsBody');var $52=$51.rows.length;var $54=$51.insertRow($52);$54.id="midtr"+$3x.MapId;var $55=$54.insertCell(0);$55.innerHTML=$t($3x);};
function addToMyObjs(Id){var $3x=SearchDB.Select(Id);if($3x){var $58=true;if($0p(MySitesDB,$3x.Name)==true){$58=confirm(cl_targetWithSameNameExitsI);};showMySitesTab();if($58){var $59=MySitesDB.InsertClone($3x);var $4e=$59.Url;if(!$2N($4e,true)){$59.Url=null;};$1k();}}};var $5a=new GeoUtil();var $5b=null;var $5c=null;var $5d=null;
function $x($5e,$5f,$5g){$5b=$D($5e,$5f,$5g);};
function $y($5h,$5i,$5j){var format=cl_distanceCoordinates;if($5j&&$5j=='distance'){if(String.IsPrintable($5c)){eval("format = cl_"+$5c);}}else if(String.IsPrintable($5d)){eval("format = cl_"+$5d);};return $z(format,$5h,$5i);};
function $z(format,$5h,$5i){var $5k;if($5b){if($5b.wgs){$5k=$5b.wgs.ConvertFormatXY(format,$5i,$5h);}else if($5b.zoneshift){$5k=$5b.zoneshift.ConvertFormatXY(format,$5i,$5h);}else if($5b.affine){$5k=$5b.affine.ConvertFormatXY(format,$5i,$5h);}else{$5k=String.format(format,Math.round($5h),Math.round($5i));}}else{$5k=String.format(format,Math.round($5h),Math.round($5i));};return $5k;};
function $A($4L){var $4w={"name":"","params":""};var a1=$4L.indexOf("[");var a2=$4L.indexOf("]");if(a1>=0&&a2>=0){$4w.name=$4L.slice(0,a1);$4w.params=$4L.slice(a1+1,a2);};return $4w;};
function $B($4L){var $4w={"name":null,"a":null,"b":null,"c":null,"d":null,"e":null,"f":null};var $5l=$4L.split(",");if($5l.length>1){for(var i=0;i<$5l.length;i++){var n=$2v($5l[i]);$4w[n.name]=parseFloat(n.value);}}else{$4w.name=$5l[0];};return $4w;};
function $C($4L){var $4w={"source":-1,"target":3};var $5m=$4L.split(",");for(var i=0;i<$5m.length;i++){var n=$2v($5m[i]);if(n.value=='auto'){$4w[n.name]=-1;}else{$4w[n.name]=parseInt(n.value,10);}};return $4w;};
function $D($5e,$5f,$5g){var $4w={"affine":null,"zoneshift":null,"wgs":null};var $5n=null;if(String.IsPrintable($5f)){$5c=$5f;};if(String.IsPrintable($5g)){$5d=$5g;};if(String.IsPrintable($5e)){$5n=$5e.stripSpaces().split(";");};if($5n&&$5n.length>0){for(var i=0;i<$5n.length;i++){var a=$A($5n[i]);if(a.name=='affine'){var $5o=$B(a.params);if($5o.name=="turku"||$5o.name=="turkuwithzone"){$4w.affine=new CCHelmert($5o.name);}else{$4w.affine=new CCHelmert('param',$5o.a,$5o.b,$5o.c,$5o.d,$5o.e,$5o.f);}}else if(a.name=='kkjzoneshift'){var $5p=$C(a.params);$4w.zoneshift=new CCKKJZoneShift($4w.affine,$5p.source,$5p.target);}else if(a.name=='kkj2wgs'){var $5q=-1;var p=$2v(a.params);if(p.name=="source"){if(p.value=='auto'){$5q=-1;}else{$5q=parseInt(p.value,10);}};$4w.wgs=new CCWGS84($4w.affine,$5q);}else{setStatus("Transform "+a.name+" not supported");}}};return $4w;};
function CCHelmert($5r,a,b,c,d,e,f){this.Type=$5r;this.aff_a=a;this.aff_b=b;this.aff_c=c;this.aff_d=d;this.aff_e=e;this.aff_f=f;};CCHelmert.prototype.ConvertXY=function($5s,$5t){var $5u,$5v;if(this.Type=='turku'||this.Type=='turkuwithzone'){var xk,yk,dx,dy,xv,yv,$5w,$5x;$5x=$5s;$5w=$5t;xk=$5w/1000.0;yk=$5x/1000.0;dx=(xk-105.0)*(2*yk*yk+140.0*yk-4900.0)/244900.0;dy=(yk*yk*yk-343000.0-(xk-105.0)*(xk-105.0)*(yk+140.0))/244900.0;xv=$5w+6600000.0+dx;yv=$5x+500000.0+dy;if(xv>1000000.0){xk=xv-Math.floor(xv/1000000.0)*1000000.0;}else{xk=xv;};if(yv>100000.0){yk=yv-Math.floor(yv/100000.0)*100000.0;}else{yk=yv;};$5u=1.000005371*xk+0.000000049*yk-5.782-xk+xv;$5v=1.000005371*yk-0.000000049*xk+0.924-yk+yv;if(this.Type=='turkuwithzone'){if($5v<1000000.0){$5v+=1000000.0;}}}else if(this.Type=='param'){var $5y=$5t;var $5z=$5s;$5u=this.aff_a+this.aff_c*$5y+this.aff_d*$5z;$5v=this.aff_b+this.aff_e*$5y+this.aff_f*$5z;}else{$5u=$5s;$5v=$5t;};return new Array($5u,$5v);};CCHelmert.prototype.ConvertFormatXY=function(format,$5s,$5t){var a=this.ConvertXY($5s,$5t);var n=$E(Math.round(a[0]));var e=$E(Math.round(a[1]));var $5k=String.format(format,n,e);return $5k;};
function CCKKJZoneShift($5A,S,T){this.Helmert=$5A;this.SourceZone=S;this.TargetZone=T;};CCKKJZoneShift.prototype.ConvertXY=function($5s,$5t){var $5u,$5v;$5u=$5s;$5v=$5t;var $5B=this.SourceZone;var $5C;var $5D;if(this.Helmert!=null){var $5E=this.Helmert.ConvertXY($5s,$5t);$5u=$5E[0];$5v=$5E[1];};if($5B<0){$5B=$5a.KKJ_DetectZone($5v);};var $3F=$5a.KKJ_xy2gk($5v,$5u,$5B);$5C=$3F[0];$5D=$3F[1];return $5a.KKJ_gk2xy($5C,$5D,this.TargetZone);};CCKKJZoneShift.prototype.ConvertFormatXY=function(format,$5s,$5t){var a=this.ConvertXY($5s,$5t);var $5k=String.format(format,Math.round(a[1]),Math.round(a[0]));return $5k;};
function CCWGS84($5A,$5B){this.Helmert=$5A;this.ResultZone=$5B;};CCWGS84.prototype.ConvertFormatXY=function(format,$5s,$5t){var $3F;$3F=this.ConvertXY_MML($5s,$5t);var $5C=$3F[0];var $5D=$3F[1];ll=new LatLon();ll.set_DoubleDec($5C);$5C=ll.ToString();ll.set_DoubleDec($5D);$5D=ll.ToString();return String.format(format,$5C,$5D);};CCWGS84.prototype.ConvertXY_MML=function($5s,$5t){var $5C,$5D;var $5u=$5s;var $5v=$5t;var P,I;var $5B=this.ResultZone;if(this.Helmert!=null){var $5E=this.Helmert.ConvertXY($5s,$5t);$5u=$5E[0];$5v=$5E[1];};if($5B<0){$5B=$5a.KKJ_DetectZone($5v);};if($5B!=3){var $3F=$5a.KKJ_xy2gk($5v,$5u,$5B);$5C=$3F[0];$5D=$3F[1];var $5F=$5a.KKJ_gk2xy($5C,$5D,3);$5v=$5F[0];$5u=$5F[1];};if($5u<=7200000){P=-125.056+0.9999955294*$5u+0.0000068348*$5v;I=-107.850+0.9999955294*$5v-0.0000068348*$5u;}else{P=-132.881+1.0000006841*$5u-0.0000015179*$5v;I=-185.993+1.0000006841*$5v+0.0000015179*$5u;};return $5a.WGS_xy2gk(I,P,3);};
function GeoUtil(){};GeoUtil.prototype.atanh=function(x){return Math.log((1+x)/(1- x))/ 2;};GeoUtil.prototype.asinh=function(x){return Math.log(x+Math.sqrt(x*x+1));};GeoUtil.prototype.cosh=function(x){var $5G=Math.exp(x);$5G=($5G+1/$5G)/2;return $5G;};GeoUtil.prototype.sinh=function(x){var $5G=Math.exp(x);$5G=($5G-1/$5G)/2;return $5G;};GeoUtil.prototype.tanh=function(x){var $5G=Math.exp(x);var a=($5G-1/$5G);var b=($5G+1/$5G);return a/b;};GeoUtil.prototype.KKJ_DetectZone=function(I){var $5B=0;if(I>=1000000&&I<2000000){$5B=1;}else if(I>=2000000&&I<3000000){$5B=2;}else if(I>=3000000&&I<4000000){$5B=3;}else if(I>=4000000&&I<5000000){$5B=4;}else if(I>=5000000&&I<6000000){$5B=5;}else if(I>=6000000&&I<7000000){$5B=6;}else if(I>=7000000&&I<8000000){$5B=7;};return $5B;};GeoUtil.prototype.KKJ_DetectGeoZone=function($5H){var $5B=0;if($5H>16.50&&$5H<=19.50){$5B=0;}else if($5H>19.50&&$5H<=22.50){$5B=1;}else if($5H>22.50&&$5H<=25.50){$5B=2;}else if($5H>25.50&&$5H<=28.50){$5B=3;}else if($5H>28.50&&$5H<=31.50){$5B=4;}else if($5H>31.50&&$5H<=34.50){$5B=5;}else if($5H>34.50&&$5H<=37.50){$5B=6;}else if($5H>37.50&&$5H<=40.50){$5B=7;};return $5B;};GeoUtil.prototype.KKJ_xy2gk=function(x,y,$5q){var $5I,$5J;var aa=6367654.5000575837;var e=0.081991889979029189;var $5K,$5L,$5M,$5N,q,q1,q2,$5O;var i;var hh=[0.00084127633881858816,0.00000005956192977992,0.00000000016948520876,0.00000000000022047390];x=x-500000-1E6*$5q;$5K=y/aa;$5M=x/aa;$5L=$5K;$5N=$5M;for(i=1;i<5;i++){$5L=$5L-hh[i-1]*Math.sin(2.0*i*$5K)*this.cosh(2.0*i*$5M);$5N=$5N-hh[i-1]*Math.cos(2.0*i*$5K)*this.sinh(2.0*i*$5M);};$5O=Math.asin(1.0/this.cosh($5N)*Math.sin($5L));q=this.asinh(Math.tan($5O));q2=q;q1=q;i=0;do{i++;q1=q2;q2=q+e*this.atanh(e*this.tanh(q2));}while(((q1-q2>1E-12)||(q1-q2<-1E-12))&&i<20);$5I=Math.atan(this.sinh(q2))*180/Math.PI;$5J=Math.asin(this.tanh($5N)/Math.cos($5O))*180/Math.PI;$5J=$5J+(18+$5q*3);return new Array($5I,$5J);};GeoUtil.prototype.KKJ_gk2xy=function($5I,$5J,$5q){var x,y;var aa=6367654.5000575837;var e=0.081991889979029189;var q,q1,q2,$5O,$5M,$5N,$5K,$5L;var hh=[0.00084127599100955919,0.00000076730668628408,0.00000000121291229577,0.00000000000248508228];$5I=$5I/180*Math.PI;$5J=$5J/180*Math.PI;$5J=$5J-(18+$5q*3)/180.0*Math.PI;q1=this.asinh(Math.tan($5I));q2=this.atanh(e*Math.sin($5I));q=q1-e*q2;$5O=Math.atan(this.sinh(q));$5N=this.atanh(Math.cos($5O)*Math.sin($5J));$5L=Math.asin(Math.sin($5O)*this.cosh($5N));$5K=$5L;$5M=$5N;for(var i=1;i<5;i++){$5K=$5K+hh[i-1]*Math.sin(2.0*i*$5L)*this.cosh(2.0*i*$5N);$5M=$5M+hh[i-1]*Math.cos(2.0*i*$5L)*this.sinh(2.0*i*$5N);};y=aa*$5K;x=aa*$5M;x=x+500000+1e6*$5q;return new Array(x,y);};GeoUtil.prototype.WGS_xy2gk=function(x,y,$5q){var $5I,$5J;var aa=6367449.1458234154;var e=0.081819190842621486;var $5K,$5L,$5M,$5N,q,q1,q2,$5O;var i;var hh=[0.00083773216406006522,5.9058695679340996e-008,1.6734888803548956e-010,2.1677377630221183e-013];x=x-500000-1E6*$5q;$5K=y/aa;$5M=x/aa;$5L=$5K;$5N=$5M;for(i=1;i<5;i++){$5L=$5L-hh[i-1]*Math.sin(2.0*i*$5K)*this.cosh(2.0*i*$5M);$5N=$5N-hh[i-1]*Math.cos(2.0*i*$5K)*this.sinh(2.0*i*$5M);};$5O=Math.asin(1.0/this.cosh($5N)*Math.sin($5L));q=this.asinh(Math.tan($5O));q2=q;q1=q;i=0;do{i++;q1=q2;q2=q+e*this.atanh(e*this.tanh(q2));}while(((q1-q2>1E-12)||(q1-q2<-1E-12))&&i<20);$5I=Math.atan(this.sinh(q2))*180/Math.PI;$5J=Math.asin(this.tanh($5N)/Math.cos($5O))*180/Math.PI;$5J=$5J+(18+$5q*3);return new Array($5I,$5J);};
function LatLon(){this.DoubleValue=0.0;};LatLon.prototype.set_DoubleDec=function($5P){this.DoubleValue=$5P;};LatLon.prototype.get_DoubleDec=function(){return this.DoubleValue;};LatLon.prototype.ConvertDouble2Deg=function(){this.Degrees=Math.floor(this.DoubleValue);var f=(this.DoubleValue-this.Degrees)*60.0;this.Minutes=Math.floor(f);this.Seconds=(f-this.Minutes)*60.0;return true;};LatLon.prototype.ToString=function($5Q){this.ConvertDouble2Deg();var $5R=Math.round(this.Seconds*100)/100;return this.Degrees+"º "+this.Minutes+"' "+$5R+"''";};
function $E($5S){var $4w="";$5S=$5S+'';if($5S&&$5S.length>3){var l=$5S.length;for(var i=0;i<l;i++){if(i>0&&(l-i)%3==0){$4w+=" ";};$4w+=$5S.charAt(i);}}else{$4w=$5S;};return $4w;};var $5T=null;var $5U=null;var $5V="http://www.w3.org/2000/svg";
function $F(){if($5W||$5X){$Q(true,"guide");}};
function $G($5Y){return $5Y?$5T:$5U;};
function $H($5Y){var $5Z=$5Y?"mapmeter":"dynmapmeter";return document.getElementById($5Z);};
function $I($5Y){var $5Z=$5Y?"svgmeter":"dynsvgmeter";return document.getElementById($5Z);};
function $J(){var $60=false;if(!$5T&&!$5U){$5T=SVGCreate();if($5T){$5U=SVGCreate();};if($5U){$60=true;}}else{$60=true;};return $60;};
function $K(){return($5W||$5X);};
function $L(){var $4w=!$K();if($4w){$4w=$61;};return $4w;};
function $M($5Y,$62,$63,$64,$65,$66,$67,$68,$69,$6a){if($5W){$01($63,$62,$64,$65,$66,$67,$68,$69,$6a);}else if($5X){var $6b=$G($5Y);$62=document.getElementById($5Y?"svgmeter":"dynsvgmeter");if($6b){$U($6b,$62,$63,$64,$65,$66,$67,$68,$6a);}}else{$02($63,$62,$65,$68);}};
function $N($5Y,$62,$3x,Id){if($5W){$0d($62,$3x,Id);}else if($5X){var $6b=$G($5Y);$62=document.getElementById($5Y?"svgmeter":"dynsvgmeter");if($6b){$0c($6b,$62,$3x,Id);}}};
function $O(name){if(name&&(name=='meter'||name=='drawing')){return true;};return false;};
function $P($6c,name){if($6c==name){return true;};if($6c=='dyntargets'&&name&&(name=='meter'||name=='drawing')){return true;};return false;};
function $Q($5Y,$6d,$6e){if($5W){$03($5Y,$6d,$6e);}else if($5X){$Y($5Y,$6d,$6e);}else{var $6f=$H($5Y);for(var i=0;i<$6f.childNodes.length;i++){if(!$6d||$P($6d,$6f.childNodes[i].linename)){if(!($6e&&$P($6e,$6f.childNodes[i].linename))){$6f.removeChild($6f.childNodes[i]);i=i-1;}}}}};
function $R($5Y,$6d){var $4w=false;if($5W){$4w=$04($5Y,$6d);}else if($5X){$4w=$Z($5Y,$6d);};return $4w;};
function $S($5Y,x1,y1,x2,y2,$64,$66,$67,$68){var $62;if($5W){$62=document.getElementById($5Y?"mapmeter":"dynmapmeter");$00($62,x1,y1,x2,y2,$64,$66,$67,$68);}else if($5X){var $6b=$G($5Y);$62=document.getElementById($5Y?"svgmeter":"dynsvgmeter");if($6b){$W($6b,$62,x1,y1,x2,y2,$64,$66,$67,$68);}}};
function SVGCreate(){var $4w=null;try{$4w=document.createElementNS($5V,"svg");$4w.setAttribute("version","1.1");$4w.setAttribute("width",$6g*2);$4w.setAttribute("height",$6g*2);var $6h="0 0 "+$6g*2+" "+$6g*2;$4w.setAttribute("viewBox",$6h);$4w.setAttribute("overflow","visible");$4w.setAttribute("preserveAspectRatio","none");}catch(e){$4w=null;};return $4w;};
function $T(){var $4w=false;if(toolMode=='drawpolygon'||toolMode=='drawpolyline'||toolMode=='createaddress'||toolMode=='createsite'||toolMode=='movesite'||toolMode=='selectposition'||toolMode=='distance'||toolMode=='moveLine'||toolMode=="zoom"){$4w=true;};return $4w;};
function handlePolylineDblClick($6i,event){alert("dda");};
function handlePolylineMouseDown($6i,event){if($T()){return;};if($5W){$6i.fill.color="blue";}else if($5X){if($6j==false&&$4n==false&&$6k==false){if($6i.getAttributeNS(null,"fill")!="none"){$6i.setAttributeNS(null,"fill","blue");}}};var $4w=$2v($6i.linename);showInfo($4w.name,$4w.value,$14(event)-$6l,$15(event)-$6m);cancelEventPropagation(event);};
function handlePolylineMouseOver($6i,event){if($1p())return;if($5W){$6i.fill.color="black";}else if($5X){if($6j==false&&$4n==false&&$6k==false){if($6i.getAttributeNS(null,"fill")!="none"){$6i.setAttributeNS(null,"fill","black");}}};removeInfoTimer();};
function handlePolylineContextmenu(event){if($T()){return;};cancelEventPropagation(event);};
function handleSVGMouseOut($6i,$65){if($5W){$6i.fill.color=$65;}else if($5X){if($6j==false&&$4n==false&&$6k==false){if($6i.getAttributeNS(null,"fill")!="none"){$6i.setAttributeNS(null,"fill",$65);}}};startHideTimer();};
function $U($6b,$62,$63,$64,$65,$66,$67,$68,$6a){var sb=new StringBuilder("M");var $3F;var $6i;var $6n,$6o;var $6p,$6q;for(var i=0;i<$63.length;i++){$3F=$2K($63[i].east,$63[i].south);if(i==0){sb.Append(($3F.x+$6g)+","+($3F.y+$6g));$6n=$3F.x;$6o=$3F.y;}else{sb.Append(" L"+($3F.x+$6g)+","+($3F.y+$6g));if(i==($63.length-1)){$6p=$3F.x;$6q=$3F.y;}}};$6i=document.createElementNS($5V,"path");if($65!="none"){$3F=$2K($63[0].east,$63[0].south);sb.Append(" L"+($3F.x+$6g)+","+($3F.y+$6g));};$6i.setAttributeNS(null,"stroke-width",$66+"px");$6i.setAttributeNS(null,"d",sb.ToString());$6i.setAttributeNS(null,"stroke",$64);$6i.setAttributeNS(null,"stroke-opacity",0.75);$6i.setAttributeNS(null,"stroke-linecap","round");$6i.setAttributeNS(null,"stroke-linejoin","round");$6i.setAttributeNS(null,"fill",$65);$6i.setAttributeNS(null,"fill-opacity",0.5);$6i.setAttributeNS(null,"overflow","visible");var $6r=$X($67);$6i.setAttributeNS(null,"stroke-dasharray",$6r);$6i.linename=$68;if($68!="meter"){$6i.onmousedown=function(event){handlePolylineMouseDown(this,event);};$6i.oncontextmenu=function(event){handlePolylineContextmenu(event);};$6i.onmouseover=function(event){handlePolylineMouseOver(this,event);};$6i.onmouseout=function(event){handleSVGMouseOut(this,$65);};};$V($6b,$6i,$62);if($6a){$0a($6b,$62,$6n,$6o,true);$0a($6b,$62,$6p,$6q);}};
function $V($6b,$6i,$62){$6b.appendChild($6i);if(!$6b.SDiv){$62.appendChild($6b);$6b.SDiv=true;}};
function $W($6b,$62,x1,y1,x2,y2,$64,$66,$67,$68){var $6i=document.createElementNS($5V,"line");$6i.linename=$68;$6i.setAttributeNS(null,"x1",x1+$6g);$6i.setAttributeNS(null,"y1",y1+$6g);$6i.setAttributeNS(null,"x2",x2+$6g);$6i.setAttributeNS(null,"y2",y2+$6g);$6i.setAttributeNS(null,"stroke",$64);$6i.setAttributeNS(null,"stroke-width",$66);$6i.setAttributeNS(null,"stroke-opacity",0.75);$6i.setAttributeNS(null,"stroke-linecap","round");$6i.setAttributeNS(null,"overflow","visible");var $6r=$X($67);$6i.setAttributeNS(null,"stroke-dasharray",$6r);$6b.appendChild($6i);$62.appendChild($6b);};
function $X($67){if($67=="solid"){return "1";};if($67=="dot"){return "3,8";}else if($67=="dash"){return "8,8";}else if($67=="longdash"){return "18,8";}else{return "1";}};
function $Y($5Y,$6d,$6e){var $6s=$G($5Y);if($6s){for(var i=0;i<$6s.childNodes.length;i++){if(!$6d||$P($6d,$6s.childNodes[i].linename)){if(!($6e&&$P($6e,$6s.childNodes[i].linename))){$6s.removeChild($6s.childNodes[i]);i=i-1;}}};var $6t=$I($5Y);$6t.appendChild($6s);}};
function $Z($5Y,$6d){var $6s=$G($5Y);if($6s){for(var i=0;i<$6s.childNodes.length;i++){if(!$6d||$6s.childNodes[i].linename==$6d){return true;}}};return false;};
function $00($62,x1,y1,x2,y2,$64,$66,$67,$68){$6u=document.createElement("v:line");$6u.linename=$68;$6u.from=x1+","+y1;$6u.to=x2+","+y2;$6v=document.createElement("v:stroke");$6v.opacity="0.75";$6v.color=$64;$6v.weight=$66;$6v.dashstyle=$67;$6u.appendChild($6v);$62.appendChild($6u);};
function $01($63,$62,$64,$65,$66,$67,$68,$69,$6a){var $6w="";var i;var $6u;var $6v;var $6x;var $3F;var $6n,$6o;var $6p,$6q;for(i=0;i<$63.length;i++){$3F=$2K($63[i].east,$63[i].south);if(i!=0){$6w=$6w+", ";if(i==($63.length-1)){$6p=$3F.x;$6q=$3F.y;}}else{$6n=$3F.x;$6o=$3F.y;};$6w=$6w+$3F.x+", "+$3F.y;};$6u=document.createElement("v:polyline");$6u.stroked="true";$6u.linename=$68;if($68!="meter"){$6u.onmousedown=function(){handlePolylineMouseDown(this,event);};$6u.onmouseover=function(){handlePolylineMouseOver(this,event);};$6u.onmouseout=function(){handleSVGMouseOut(this,$65);};$6u.oncontextmenu=function(){handlePolylineContextmenu(event);};};$6v=document.createElement("v:stroke");$6v.opacity="0.75";$6v.color=$64;$6v.weight=$66+"pt";$6v.endcap="round";$6v.dashstyle=$67;$3F=$2K($63[0].east,$63[0].south);if($65=="none"){if($69){$06(appPath+"/img/b.gif",$3F.x-$6y,$3F.y-$6z);};$6u.filled="false";}else{$6u.filled="true";$6x=document.createElement("v:fill");$6x.opacity="0.5";$6x.color=$65;$6u.appendChild($6x);$6w=$6w+", "+$3F.x+", "+$3F.y;};$6u.points=$6w;$6u.appendChild($6v);$62.appendChild($6u);if($6a){$0b($62,$6n,$6o);if($63.length>1)$0b($62,$6p,$6q);}};
function $02($63,$5j,$6x,$68){for(i=0;i<$63.length-1;i++){$6A=$2K($63[i].east,$63[i].south);$5F=$2K($63[i+1].east,$63[i+1].south);$05($6A.x,$6A.y,$5F.x,$5F.y,$5j,$68);};if($6x!="none"){$6A=$2K($63[0].east,$63[0].south);$5F=$2K($63[$63.length-1].east,$63[$63.length-1].south);$05($6A.x,$6A.y,$5F.x,$5F.y,$5j,$68);}};
function $03($5Y,$6d,$6e){var $6f=$H($5Y);for(i=0;i<$6f.childNodes.length;i++){if(!$6d||$6f.childNodes[i].linename==$6d){if(!($6e&&$P($6e,$6f.childNodes[i].linename))){$6f.removeChild($6f.childNodes[i]);i=i-1;}}}};
function $04($5Y,$6d,$6e){var $6f=$H($5Y);for(i=0;i<$6f.childNodes.length;i++){if(!$6d||$6f.childNodes[i].linename==$6d){return true;}};return false;};
function $05(x1,y1,x2,y2,$5j,$68){var dY=Math.abs(y2-y1);var dX=Math.abs(x2-x1);var $6B=15;var tX;var tY;var $6C=x2;var $6D=y2;if(dY<dX){if(x2<x1){tX=x2;x2=x1;x1=tX;tY=y2;y2=y1;y1=tY;};x=x1;y=y1;k=(y2-y1)/(x2-x1);while(x+$6B<x2){y=y+k*$6B;x=x+$6B;$06(appPath+"/img/b2.gif",x-6,y-6,$5j,$68);}}else{if(y2<y1){tX=x2;x2=x1;x1=tX;tY=y2;y2=y1;y1=tY;};x=x1;y=y1;k=(x2-x1)/(y2-y1);while(y+$6B<y2){x=x+k*$6B;y=y+$6B;$06(appPath+"/img/b2.gif",x-6,y-6,$5j,$68);}};$06(appPath+"/img/b2.gif",parseInt($6C-6,10),parseInt($6D-6,10),$5j,$68);};
function $06($6E,x,y,$5j,$68){var $6F;if($5j){$6F=$5j;}else{$6F=mapMeter;};var $47=document.createElement("img");$47.style.position="absolute";$47.style.left=x+"px";$47.style.top=y+"px";$47.src=$6E;if($68){$47.linename=$68;}else{$47.linename="meter";};$6F.appendChild($47);};
function $07(x,y,$5j,$68){var $6F;if($5j){$6F=$5j;}else{$6F=mapMeter;};var $47=document.createElement("div");$47.style.position="absolute";$47.style.left=x+"px";$47.style.top=y+"px";$47.style.height="9px";$47.style.width="9px";if($68){$47.linename=$68;}else{$47.linename="meter";};$6F.appendChild($47);};
function handle_MouseOver($6G,event){if(toolMode!="moveLine"){$1s("crosshair");};if($5W){$6G.fill.color="red";}else if($5X){if($6G.getAttributeNS(null,"fill")!="none"){$6G.setAttributeNS(null,"fill","red");};if($6j){var $6H=document.getElementById("svgmeter");$6H.style.visibility="hidden";$6H.style.visibility="visible";}}};
function handle_MouseOut($6G,event){if(toolMode!="moveLine"){$1t();};if($5W){$6G.fill.color="gray";}else if($5X){if($6G.getAttributeNS(null,"fill")!="none"){$6G.setAttributeNS(null,"fill","gray");};if($6j){var $6H=document.getElementById("svgmeter");$6H.style.visibility="hidden";$6H.style.visibility="visible";}}};
function handle_MouseDown($6G,event,$3J,$3K){$6I=toolMode;toolMode="moveLine";$1s("crosshair");if($5W){$6G.fill.color="red";}else if($5X){if($6G.getAttributeNS(null,"fill")!="none"){$6G.setAttributeNS(null,"fill","red");}};if($3J||$3K){$6J=$3J;$6K=$3K;}else{$6J=$14(event);$6K=$15(event);};document.onmousemove=handle_MouseMove;document.onmouseup=handle_MouseUp;$6L=$14(event);$6M=$15(event);$6N=$6G.Id;$6O=$6G.NodeId;cancelEventPropagation(event);};var $6N;var $6O;var $6J;var $6K;
function handle_MouseUp(event){toolMode=$6I;document.onmouseup=null;document.onmousemove=null;var $3x=$0i($6P,$6N);$1t();if($3x){var $6Q=centerEast+Math.round(($6J-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $6R=centerSouth+Math.round((-$6K+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);$3x.MoveNode($6O,$6R,$6Q);$0j($6P,true);if($6S){$0y(true);}else{var $6T=$6P+"="+$6N;$Q(true,$6T,null);removeHandles();$0w(true,$6P,$6N,$3x);}}};
function handle_MouseMove(event,$3J,$3K){if($3J||$3K){$6J=$3J;$6K=$3K;}else{$6J=$14(event);$6K=$15(event);};if(!$3J&&!$3K){cancelEventPropagation(event);}};
function removeHandles(){$Q(true,"handle",null);};
function $08(x,y){var $6G=document.createElementNS($5V,"rect");$6G.setAttributeNS(null,"x",x-5+$6g+"");$6G.setAttributeNS(null,"y",y-5+$6g+"");$6G.setAttributeNS(null,"width","9");$6G.setAttributeNS(null,"height","9");$6G.setAttributeNS(null,"fill","gray");$6G.setAttributeNS(null,"stroke","gray");$6G.setAttributeNS(null,"stroke-width","1");$6G.setAttributeNS(null,"fill-opacity","0.8");$6G.setAttributeNS(null,"stroke-opacity","0.8");return $6G;};
function $09(x,y){var $6G=document.createElement("v:rect");$6G.style.position="absolute";$6G.style.width="9px";$6G.style.height="9px";$6G.style.left=(x-5)+"px";$6G.style.top=(y-5)+"px";$6G.setAttribute("fillcolor","gray");$6G.setAttribute("stroke","red");$6G.setAttribute("strokeweight","3");$6G.filled="true";$6G.stroked="true";var $6v=document.createElement("v:stroke");$6v.opacity="0.75";$6v.color="red";$6v.weight="1px";var $6x=document.createElement("v:fill");$6x.color="gray";$6x.opacity="0.8";$6G.appendChild($6x);$6G.appendChild($6v);return $6G;};
function $0a($6b,$62,x,y,$6U){var $6G=$08(x,y);$6G.onmousedown=function(event){handleDoubleClick(event);cancelEventPropagation(event)};$6G.linename="drawing";$V($6b,$6G,$62);};
function $0b($62,x,y,$6U){var $6G=$09(x,y);$6G.onmousedown=function(event){handleDoubleClick(event);cancelEventPropagation(event)};$6G.linename="drawing";$62.appendChild($6G);};
function $0c($6b,$62,$3x,Id){var $3F;var $6G;if($3x.PointArray){for(var i=0;i<$3x.PointArray.length;i++){$3F=$2K($3x.PointArray[i].east,$3x.PointArray[i].south);var $6G=$08($3F.x,$3F.y);$6G.onmousedown=function(event){handle_MouseDown(this,event);};$6G.onmouseover=function(event){handle_MouseOver(this,event);};$6G.onmouseout=function(event){handle_MouseOut(this,event);};$6G.linename="handle";$6G.Id=Id;$6G.NodeId=i;$V($6b,$6G,$62);}}};
function $0d($62,$3x,Id){var $3F;var $6G;if($3x.PointArray){for(var i=0;i<$3x.PointArray.length;i++){$3F=$2K($3x.PointArray[i].east,$3x.PointArray[i].south);var $6G=$09($3F.x,$3F.y);$6G.onmousedown=function(event){handle_MouseDown(this,event);};$6G.onmouseover=function(event){handle_MouseOver(this,event);};$6G.onmouseout=function(event){handle_MouseOut(this,event);};$6G.linename="handle";$6G.Id=Id;$6G.NodeId=i;$62.appendChild($6G);}}};var $6V=0;var $6W=1;var $6P=2;var $4S=0;var $6X=1;var $6Y=2;var $6Z=3;var LayerDB=new DataBase(true);var SearchDB=new DataBase(false);var MySitesDB=new DataBase(false);var $3D=new StreetNameDataBase(false);var $53=new CollectionDataBase(false);var $70=null;var $71="Red";var $72="Green";var $73="solid";var $74=2;
function $0e($75,$76){var $4w=true;var $77=$1e($75);if($77&&$76>$77)$4w=false;return $4w;};
function $0f($76){var $4w=true;if(CatLayerMax&&$76>CatLayerMax)$4w=false;return $4w;};
function $0g($3x){var $4w=false;if($3x&&$3x.PointArray){$4w=true;};return $4w;};
function $0h($3x){return($3x&&($3x.Name||$3x.FmtText||$3x.AttrList));};
function $0i($3E,Id){var DB=$0l($3E);var $3x=DB.Select(Id);return $3x;};
function $0j($3E,$78){var DB=$0l($3E);DB.set_Dirty($78);};
function $0k($3E,Id){var $4w=false;var DB=$0l($3E);var $3x=DB.Select(Id);if($3x){DB.DeleteObj($3x);$4w=true;};return $4w;};
function $0l($4M){var $4w=MySitesDB;if($4M==$6V){$4w=LayerDB;}else if($4M==$6W){$4w=SearchDB;};return $4w;};
function $0m(DB){var $4w=$6P;if(DB==LayerDB){$4w=$6V;}else if(DB==SearchDB){$4w=$6W;};return $4w;};
function TXWPoint(n,e){this.south=n;this.east=e;};TXWPoint.prototype.North=function(){return this.south;};TXWPoint.prototype.East=function(){return this.east;};
function $0n($79,$7a){var routePoints=new Array();for(var a=0;a<$79.length&&a<$7a.length;a++){routePoints.push(new TXWPoint($79[a],$7a[a]));};return routePoints;};
function $0o($3E,Id,$3x){var $7b=false;if($3x.PointArray){var $6T=$3E+"="+Id;$7b=$R(true,$6T);}else{var $7c=document.getElementById("mapsites");var $7d="showInfo("+$3E+","+Id+")";$7b=($7c.innerHTML.indexOf($7d)!=-1);};return $7b;};
function $0p(DB,name){var $4w=false;for(var Id in DB.hashtable){var $3x=DB.hashtable[Id];if($3x&&$3x.Name&&$3x.Name==name){$4w=true;break;}};return $4w;};
function DataBase($7e){this.hashtable=new Array();this.autoid=0;if($7e){this.$eL=new Array();this.$eM=new Array();this.LoadedBB=new BBox();}};DataBase.prototype.$eN=function(){var $7f=true;if(this.LoadedBB.Valid){var $7g=$1l(0.01);if(this.LoadedBB.BBInside($7g)){$7f=false;}};return $7f;};DataBase.prototype.$eO=function($7h){var $7i=false;if(this.$eM.Find($7h))$7i=true;return $7i;};DataBase.prototype.Clear=function(){this.hashtable=new Array();this.Dirty=false;};DataBase.prototype.Count=function(){var $7j=0;for(var Id in this.hashtable){if($0h(this.hashtable[Id])){$7j++;}};return $7j;};DataBase.prototype.set_LoadedArea=function(BB){this.LoadedBB=BB;};DataBase.prototype.CatChecked=function($7k){if($7k==this.lastc){return this.laststate}else{this.laststate=this.$eL.Find($7k);this.lastc=$7k;return this.laststate;}};DataBase.prototype.CatChecked_Bg=function(){this.lastc=null;this.laststate=false;};DataBase.prototype.AddCategory=function($7k,$7l){var $7m=false;if(this.$eL.Find($7k)==false){this.$eL.push($7k);$7m=true;};if($7l&&this.$eM.Find($7k)==false){this.$eM.push($7k);$7m=true;};return $7m;};DataBase.prototype.UnloadCategory=function($7k){var $7m=false;if(this.$eM.Find($7k)){this.$eM.remove($7k);$7m=true;};this.LoadedBB.Valid=false;for(var Id in this.hashtable){var $3x=this.hashtable[Id];if($3x!=null&&$3x.Category==$7k){this.hashtable[Id]=null;}};return $7m;};DataBase.prototype.RemoveCategory=function($7k){var $7m=false;if(this.$eL.Find($7k)==true){this.$eL.remove($7k);$7m=true;};if(this.$eM.Find($7k)==false){this.$eM.remove($7k);$7m=true;};for(var Id in this.hashtable){var $3x=this.hashtable[Id];if($3x!=null&&$3x.Category==$7k){this.hashtable[Id]=null;}};return $7m;};DataBase.prototype.DeleteObj=function($3x){if($3x){if($3x.Editable&&$3x.get_EditType()=='ea'){var Op="Op=update&Type=delete&streetname="+$2s($3x.StreetName)+"&addressnumber="+$2s($3x.AddressNumber)+"&municipality="+$2s($3x.Municipality);$0D(Op);$3x.Editable=false;};$3x.Name=null;$3x.FmtText=null;this.Dirty=true;}};DataBase.prototype.Insert=function($77){this.autoid++;if($77==null){throw "NullPointerException {"+this.autoid+"},{"+$77+"};";}else{this.hashtable[this.autoid]=$77;};this.Dirty=true;return this.autoid;};DataBase.prototype.InsertClone=function($3x){this.autoid++;var $7n=$3x.clone(true);this.hashtable[this.autoid]=$7n;this.Dirty=true;return $7n;};DataBase.prototype.Select=function($7o){return this.hashtable[$7o];};DataBase.prototype.set_Dirty=function($78){this.Dirty=$78;};DataBase.prototype.get_Dirty=function(){return this.Dirty;};
function SR_Point(name,$4s,$4e,$7p,$5h,$5i){this.Name=name;this.Explanation=$4s;this.Url=$4e;this.Image=$7p;this.North=$5h;this.East=$5i;};SR_Point.prototype.Point=function(){return new TXWPoint(this.North,this.East);};SR_Point.prototype.GetType=function(){return "Point";};SR_Point.prototype.set_EncType=function($7q){this.EncType=$7q;};SR_Point.prototype.get_EncType=function(){return this.EncType;};SR_Point.prototype.set_UrlType=function($7r){this.UrlType=$7r;};SR_Point.prototype.get_UrlType=function(){return this.UrlType;};SR_Point.prototype.get_BB=function(){return new BBox(this.North,this.East,this.North,this.East);};SR_Point.prototype.RegisterBB=function(BB){BB.RegisterPoint(this.North,this.East);};SR_Point.prototype.set_Category=function($7s){this.Category=$7s;};SR_Point.prototype.get_Category=function(){return this.Category;};SR_Point.prototype.set_FmtText=function($7t){this.FmtText=$7t;};SR_Point.prototype.get_FmtText=function(){return this.FmtText;};SR_Point.prototype.set_AV=function($77){this.AV=$77;};SR_Point.prototype.get_AV=function(){return this.AV;};SR_Point.prototype.SetAddress=function($3A,$3s,$7u,$7v,$5h,$5i){this.set_Editable(true);this.set_EditType('ea');if(this.Editable&&this.get_EditType()=='ea'){var Op="Op=update&Type=insert&streetname="+$2s($7u)+"&addressnumber="+$2s($7v)+"&municipality="+$2s($3s)+"&n="+$5h+"&e="+$5i+"&aid="+$3A;$0D(Op);};this.Municipality=$3s;this.StreetName=$7u;this.AddressNumber=$7v;this.Name=this.StreetName+" "+this.AddressNumber;this.North=$5h;this.East=$5i;};SR_Point.prototype.UpdateAddress=function($3A,$7u,$7v){if(this.Editable&&this.get_EditType()=='ea'){var Op="Op=update&Type=update&o_streetname="+$2s(this.StreetName)+"&o_addressnumber="+$2s(this.AddressNumber)+"&streetname="+$2s($7u)+"&addressnumber="+$2s($7v)+"&municipality="+$2s(this.Municipality)+"&o_n="+this.North+"&o_e="+this.East+"&aid="+$3A;$0D(Op);};this.StreetName=$7u;this.AddressNumber=$7v;this.Name=this.StreetName+" "+this.AddressNumber;};SR_Point.prototype.Move=function($5h,$5i,id){if(this.Editable&&this.get_EditType()=='ea'){var Op="Op=update&Type=move&streetname="+$2s(this.StreetName)+"&addressnumber="+$2s(this.AddressNumber)+"&municipality="+$2s(this.Municipality)+"&n="+$5h+"&e="+$5i;$0D(Op);};this.North=$5h;this.East=$5i;};SR_Point.prototype.set_EditableAddress=function($7u,$7v,$3s){this.Editable=true;this.StreetName=$7u;this.AddressNumber=$7v;this.Municipality=$3s;this.EditType='ea';};SR_Point.prototype.set_Editable=function($7w){this.Editable=$7w;};SR_Point.prototype.get_Editable=function(){return this.Editable;};SR_Point.prototype.set_EditType=function($7x){this.EditType=$7x;};SR_Point.prototype.get_EditType=function(){return this.EditType;};SR_Point.prototype.AddDocument=function($4e,$7y){if(!this.DocList)this.DocList=new Array();var $7z=new Object();$7z.Url=$4e;$7z.Exp=$7y;this.DocList.push($7z);};SR_Path.prototype.AddDocument=function($4e,$7y){if(!this.DocList)this.DocList=new Array();var $7z=new Object();$7z.Url=$4e;$7z.Exp=$7y;this.DocList.push($7z);};
function SR_Path(name,$4s,$4e,$7p,$7A){this.Name=name;this.Explanation=$4s;this.Url=$4e;if($7p)this.Image=$7p;else this.Image=appPath+"/img/polypoint.gif";this.PointArray=$7A;};SR_Path.prototype.GetType=function(){return this.Filled?"Polygon":"Polyline";};SR_Path.prototype.get_CenterPoint=function($7B){var $3F=null;var $5i=null;var $5h=null;if(this.North&&this.East){$5i=this.East;$5h=this.North;}else{var $4M=this.PointArray.length>0?Math.floor(this.PointArray.length/2):0;if($4M==0&&this.PointArray.length>0){$5i=this.PointArray[0].east;$5h=this.PointArray[0].south;}else if($4M>0){$5i=Math.round((this.PointArray[$4M].east+this.PointArray[$4M-1].east)/2);$5h=Math.round((this.PointArray[$4M].south+this.PointArray[$4M-1].south)/2);}};if($5i&&$5h){if($7B){$3F=$2K($5i,$5h);}else{$3F=new Object();$3F.x=$5i;$3F.y=$5h;}};return $3F;};SR_Path.prototype.Point=function(){return new TXWPoint(this.North,this.East);};SR_Path.prototype.set_Point=function($5h,$5i){this.North=$5h;this.East=$5i;};SR_Path.prototype.get_FirstPoint=function($7B){if(this.PointArray){var $3F;if($7B){$3F=$2K(this.PointArray[0].east,this.PointArray[0].south);}else{$3F=new Object();$3F.x=this.PointArray[0].east;$3F.y=this.PointArray[0].south;};return $3F;};return null;};SR_Path.prototype.get_LastPoint=function($7B){if(this.PointArray){var $3F;var $4M=this.PointArray.length>0?this.PointArray.length-1:0;if($7B){$3F=$2K(this.PointArray[$4M].east,this.PointArray[$4M].south);}else{$3F=new Object();$3F.x=this.PointArray[$4M].east;$3F.y=this.PointArray[$4M].south;};return $3F;};return null;};SR_Path.prototype.set_EncType=function($7q){this.EncType=$7q;};SR_Path.prototype.get_EncType=function(){return this.EncType;};SR_Path.prototype.set_UrlType=function($7r){this.UrlType=$7r;};SR_Path.prototype.get_UrlType=function(){return this.UrlType;};SR_Path.prototype.get_BB=function(){var $4w=new BBox();this.RegisterBB($4w);return $4w.Valid?$4w:null;};SR_Path.prototype.RegisterBB=function(BB){if(this.PointArray){for(var i=0;i<this.PointArray.length;i++){BB.RegisterPoint(this.PointArray[i].south,this.PointArray[i].east);}}};SR_Path.prototype.PathToString=function(){var sb=new StringBuilder("");for(var a=0;a<this.PointArray.length;a++){var $7C=a>0?"~":"";$7C+=Math.round(this.PointArray[a].south)+"~"+Math.round(this.PointArray[a].east);sb.Append($7C);};return sb.ToString();};SR_Path.prototype.set_Filled=function($6x){if(!$6x){this.FillColor=null;};if($6x){if(!this.Image)this.Image=appPath+"/img/areapoint.gif";if(!this.FillColor){this.FillColor=$72;}}else{if(!this.Image)this.Image=appPath+"/img/polypoint.gif";};this.Filled=$6x;};SR_Path.prototype.get_Filled=function(){return this.Filled;};SR_Path.prototype.set_Category=function($7s){this.Category=$7s;};SR_Path.prototype.get_Category=function(){return this.Category;};SR_Path.prototype.get_FmtText=function(){return null;};SR_Path.prototype.set_AV=function($77){this.AV=$77;};SR_Path.prototype.get_AV=function(){return this.AV;};SR_Path.prototype.set_Editable=function($7w,$7D){this.Editable=$7w;if($7w){this.EditId=$7D;}else{this.EditId=null;}};SR_Path.prototype.get_Editable=function(){return this.EditId;};SR_Path.prototype.set_EditType=function($7x){this.EditType=$7x;};SR_Path.prototype.get_EditType=function(){return this.EditType;};SR_Path.prototype.MoveNode=function($7E,$5h,$5i){this.PointArray[$7E].south=$5h;this.PointArray[$7E].east=$5i;};SR_Path.prototype.set_Presentation=function($64,$7F,$7G,$65){this.LineColor=$64?$64:$71;this.LineType=$7F?$7F:$73;this.LineWidth=$7G?$7G:$74;if($65){this.FillColor=$65;}};
function $0q($4E){var $7f=false;var $76=Themes[currentTheme].Wupp[zoomLevel];if(!$0f($76)){if($4E){$0H(false);};return;};var $7H=LayerDB.$eL.length;if($7H>0){if($4E){$7f=true;}else if(LayerDB.$eN()){$7f=true;}};if(!$7f){for(var i=0;i<$7H;i++){var $75=LayerDB.$eL[i];if(!LayerDB.$eO($75)&&$0e($75,$76)){$7f=true;break;}}};if($7f){var $7I=false;var $7J="";for(var i=0;i<$7H;i++){var $75=LayerDB.$eL[i];if($0e($75,$76)){if(LayerDB.$eO($75)){};$7J+="&cidname="+$2s($75);}else{LayerDB.UnloadCategory($75);$7I=true;}};if($7I){$0H(false);$4E=false;};if($7J.length>0){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=catinarea&noadmchk=true"+$7J;$70=$1l(null);$4e+=$70.ToAreaString();if($6S){$4e+="&Language="+Language;};$3p("ib",$4A,$4e,"",$0t);}else if($4E){$0H(false);}}else if($4E){$0H(false);}};
function $0r($7k,$7K){var $7m=false;if($7K==true){$7m=LayerDB.AddCategory($7k);}else{$7m=LayerDB.RemoveCategory($7k);};return $7m;};
function $0s($7L,$7K){var i;var l=$7L.length;if($7K==true){var $7M="";for(var i=0;i<l;i++){var $7k=$7L[i];var $76=Themes[currentTheme].Wupp[zoomLevel];if($0f($76)){if($0e($7k,$76)){$7M+="&cidname="+$2s($7k);}else{LayerDB.AddCategory($7k,false);}}else{LayerDB.AddCategory($7k,false);}};if($7M.length>0){var $4e=appPath+"/Search.ashx?Op=catinarea"+$7M;$70=$1l(null);$4e+=$70.ToAreaString();$3p("ib","GET",$4e,"",$0t);}}else{for(var i=0;i<l;i++){var $7k=$7L[i];LayerDB.RemoveCategory($7k);};$0H(false);}};
function $0t(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K&&$4K.categories){for(var i=0;i<$4K.categories.length;i++){LayerDB.RemoveCategory($4K.categories[i]);if($1h($4K.categories[i])){LayerDB.AddCategory($4K.categories[i],true);}}};LayerDB.CatChecked_Bg();$0u(LayerDB,$4K,$6Z);LayerDB.set_LoadedArea($70);}};
function get_EncTypeText($7t,$7q){if($7q){if($7q=='decode'){return String.unescapeHTML($7t);}};return $7t;};
function $0u(DB,$4K,$7N,$7q){var $7O="";var sb=null;var $3E=$0m(DB);$0I();hideInfo();if($7N==$6Y){$7O="<span class='mysites'><h3 class='mysites'>"+String.get_Safe($4K.CollName)+"</h3>";if($4K.CollExp){$7O+="<p class='mysites'>"+$4K.CollExp+"</p>";};if($4K.Creator){$7O+="<p class='mysites'>"+cl_performer+":&nbsp;"+$4K.Creator+"</p>";};sb=new StringBuilder($7O);};if($4K.count<1){if($7N==$6X){$7O="<p>"+cl_noObjectsFound+"</p>";$1C($7O);$0G($3E!=$6V);}else if($7N==$6Y){if(String.IsPrintable($4K.CollName)||String.IsPrintable($4K.CollExp)||String.IsPrintable($4K.Creator)){$1C($7O);}}}else{var $7P;var $7Q="";var Id;if($7N==$6X){if($4K.truncated){$7Q=String.format(cl_searchTooManyObjectsFoundDisplayingN,$4K.count);}else{$7Q=String.format(cl_searchNObjectsFound,$4K.count);};sb=new StringBuilder("<table><tr><td class=\"searchHeader\">"+$7Q+"</td><tr>");}else if($7N==$6Y){sb.Append("<table class='mysites' style='width: 100%; display: block; cursor: auto;'>");};for(var i=0;i<$4K.results.length;i++){if($4K.results[i]&&$4K.results[i].name){var $3x;var $7R=$4K.results[i];if($7N==$6Z){if(DB.CatChecked($7R.category)==false){continue;}};if($7R.northarray){var $7S=$0n($7R.northarray,$7R.eastarray);$3x=new SR_Path(get_EncTypeText($7R.name,$7q),$7R.tip,$7R.url,$7R.image,$7S);if($7R.north){$3x.set_Point($7R.north,$7R.east);};$3x.set_Presentation($7R.linecolor,$7R.linetype,$7R.linewidth,$7R.fillcolor?$7R.fillcolor:null);if($7R.fill){$3x.set_Filled($7R.fill);};if($7N==$6Y){$3x.set_AV(true);}}else{$3x=new SR_Point(get_EncTypeText($7R.name,$7q),$7R.tip,$7R.url,$7R.image,$7R.north,$7R.east);};if($7R.category){$3x.set_Category($7R.category);};if($7R.editable){$3x.set_EditableAddress($7R.streetname,$7R.addressnumber,$7R.municipality);};if($7R.pe){$3x.PX=$7R.pe;};if($7R.pn){$3x.PY=$7R.pn;};if($7R.refid){$3x.RefId=$7R.refid;};if($7R.extdocs){var $7T=$7R.extdocs.length;for(var $7z=0;$7z<$7T;$7z++){$3x.AddDocument($7R.extdocs[$7z].url,$7R.extdocs[$7z].exp);}};if($7R.addattrs){var $7U=$7R.addattrs.length;$3x.AttrList=new Array();for(var $7V=0;$7V<$7U;$7V++){var a=new Object();a.n=$7R.addattrs[$7V].n;a.v=$7R.addattrs[$7V].v;$3x.AttrList.push(a);}};Id=DB.Insert($3x);if($7R.urltype){$3x.set_UrlType($7R.urltype);if($7R.urltype=='SF'){$3x.Url="JavaScript:showFeedbackById("+$3E+","+Id+");";}};var $7W;if($7N==$6X){$7W="searchClick("+$3E+","+Id+");";$7O="<tr><td><a class=\"searchRow\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\""+$7W+"\">"+$7R.name+"</td></tr>";sb.Append($7O);}else if($7N==$6Y){$7W="searchClick("+$3E+","+Id+");";$7O="<tr class='mysites'><td width='30px' class='mysites'><img src='";if($7R.image){$7O+=$7R.image+"' border='0'></td>";}else{if($3x&&$3x.Image){$7O+=$3x.Image+"' border='0'></td>";}else{$7O+=appPath+"/img/point.gif' border='0'></td>";}};$7O+="<td class='mysites'><h4 class='mysites'><a style=\"cursor:pointer\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\"searchClick("+$3E+","+Id+");\">"+String.escapeHTML($3x.Name)+"</a></h4>";if($7R.tip){$7O+="<p class='mysites'>"+String.escapeHTML($7R.tip)+"</p>";}else{$7O+="<p class='mysites'>&nbsp;</p>";};$7O+="</td></tr>";sb.Append($7O);}}};if($7N==$6X){sb.Append("</table>");$7O=sb.ToString();}else if($7N==$6Y){sb.Append("</table></span>");$7O=sb.ToString();};if($4K.results.length==1){if($4K.setarea){;}else{if($7N!=$4S&&$7N!=$6Z){searchClick($3E,Id,true);}}};if($4K.results.length<1){if($7N==$6X){$7O="<p>"+cl_noObjectsFound+"</p>";}}else if($4K.setarea){var $7X=$4K.width;var $7Y=$4K.height;centerEast=$4K.meast;centerSouth=$4K.mnorth;zoomLevel=$2X($7X,$7Y);$2V();if($4K.results.length==1){searchClick($3E,Id);}};if($7N!=$4S&&$7N!=$6Z){$1C($7O);};$0G($3E!=$6V);};$0J();};
function $0v($3E,Id,$3x){return $0z($3E,Id,$3x);};
function $0w($5Y,$3E,Id,$3x){var $7Z=null;var $80=$K();var $81=document.getElementById($5Y?"mapmeter":"dynmapmeter");var $6T=$3E+"="+Id;var $82;var $83=$3x.LineColor?$3x.LineColor:$71;var $84=$3x.LineWidth?$3x.LineWidth:$74;var $85=$3x.LineType?$3x.LineType:$73;if($3x.get_Filled()){$82=$3x.FillColor?$3x.FillColor:$72;}else{$82="none";};$M($5Y,$81,$3x.PointArray,$83,$82,$84,$85,$6T,false);if($3E==$6P&&Id==$86){$N($5Y,$81,$3x,Id);};if(!$80){$7Z=$0A($3E,Id,$3x);};return $7Z;};
function $0x(DB,$3E,$81,$5Y){var $7Z;var sb=new StringBuilder("");var $87=$K();var $88=$L();var $89=true;if($3E==$6V||$3E==$6W){var $8a=SVGRMin?SVGRMin:0.01;var $76=Themes[currentTheme].Wupp[zoomLevel];if(SVGRMax){if($76<$8a||$76>SVGRMax){$87=false;$88=false;}};if($3E==$6V){$89=$0f($76);}};for(var Id in DB.hashtable){var $3x=DB.hashtable[Id];if($0h($3x)){if($3x.PointArray){var $6T=$3E+"="+Id;var $82;if($3x.get_Filled()){$82=$3x.FillColor?$3x.FillColor:$72;}else{$82="none";};if($87||$88||$3x.get_AV()){var $83=$3x.LineColor?$3x.LineColor:$71;var $84=$3x.LineWidth?$3x.LineWidth:$74;var $85=$3x.LineType?$3x.LineType:$73;$M($5Y,$81,$3x.PointArray,$83,$82,$84,$85,$6T,false);if($3E==$6P&&Id==$86){$N($5Y,$81,$3x,Id);}};$7Z=$0A($3E,Id,$3x);sb.Append($7Z);}else if($89){$7Z=$0z($3E,Id,$3x);sb.Append($7Z);}}};return sb.ToString();};
function $0y($5Y){var $7c=document.getElementById($5Y?"mapsites":"dynmapsites");$7c.innerHTML="";var $7Z;var $81=document.getElementById($5Y?"mapmeter":"dynmapmeter");$Q($5Y,false,"dyntargets");if($5Y){$7Z=$0x(SearchDB,$6W,$81,$5Y);$7Z+=$0x(MySitesDB,$6P,$81,$5Y);}else{$7Z=$0x(LayerDB,$6V,$81,$5Y);};$7c.innerHTML=$7Z;};
function $0z($3E,Id,$3x){var $7Z="";var $8b=false;var $5j="linkwnd";if($3x.Url&&$3x.Url.indexOf("cript:")!=-1){$5j=null;};if(!String.IsPrintable($3x.Url)){$8b=true;};var	$3F=$2K($3x.East,$3x.North);var x=$3F.x;var y=$3F.y;if($3x.PX)x-=$3x.PX;else x-=pinOffsetX;if($3x.PY)y-=$3x.PY;else y-=pinOffsetY;if(!$3x.Image||$3x.Image=='undefined'){$8c=appPath+"/img/point.gif";}else{$8c=$3x.Image;};if($8b){$7Z="<div style='position: absolute; top: "+y+"px; left: "+x+"px;'>"+"<img border='0' src='"+$8c+"' ";}else{$7Z="<div style='position: absolute; top: "+y+"px; left: "+x+"px;'><a ";if($5j){$7Z+="target=\""+$5j+"\" ";};$7Z+="href=\""+$3x.Url+"\">"+"<img border='0' src='"+$8c+"' ";};$7Z+="onmouseover=\"showInfo("+$3E+","+Id+");\"";if($8b){$7Z+=" onmouseout=\"startHideTimer()\"></div>";}else{$7Z+=" onmouseout=\"startHideTimer()\"></a></div>";};return $7Z;};
function $0A($3E,Id,$3x){var $4K="";if($3x.PointArray){var $3F=$3x.get_CenterPoint(true);if($3x.Image){$4K=$0B($3E,Id,$3x,$3F,$3x.Image);}else{if($3x.get_Filled()){$4K=$0B($3E,Id,$3x,$3F,appPath+"/img/areapoint.gif");}else{$4K=$0B($3E,Id,$3x,$3F,appPath+"/img/polypoint.gif");}}};return $4K;};
function $0B($3E,Id,$3x,$3F,$7p){var $8d=true;var $5j="linkwnd";if($3x.Url&&$3x.Url.indexOf("cript:")!=-1){$5j=null;};var $7Z="<div style='position: absolute; top: "+($3F.y-12)+"px; left: "+($3F.x-12)+"px;'>";if(String.IsPrintable($3x.Url)){if($5j){$7Z+="<a target=\""+$5j+"\"";}else{$7Z+="<a";};$7Z+=" href=\""+$3x.Url+"\">";}else{$8d=false;};$7Z+="<img border='0' src='"+$7p+"' "+"onmouseover=\"showInfo("+$3E+","+Id+","+$3F.x+","+$3F.y+");\" onmouseout=\"startHideTimer()\">";if($8d){$7Z+="</a></div>";}else{$7Z+="</div>";};return $7Z;};
function BBox($8e,$8f,$8g,$8h){if($8e){this.eastmax=$8h;this.eastmin=$8f;this.northmax=$8g;this.northmin=$8g;this.Valid=true;}else{this.Valid=false;}};BBox.prototype.Clear=function(){this.Valid=false;};BBox.prototype.Extend=function($8i){if(this.Valid){this.eastmax+=$8i;this.northmax+=$8i;this.eastmin-=$8i;this.northmin-=$8i;}};BBox.prototype.RegisterPoint=function($5h,$5i){if(this.Valid){this.eastmax=Math.max(this.eastmax,$5i);this.eastmin=Math.min(this.eastmin,$5i);this.northmax=Math.max(this.northmax,$5h);this.northmin=Math.min(this.northmin,$5h);}else{this.eastmax=$5i;this.eastmin=$5i;this.northmax=$5h;this.northmin=$5h;this.Valid=true;}};BBox.prototype.PointInside=function($5h,$5i){var $8j=false;if(this.Valid){if($5h>=this.northmin&&$5h<=this.northmax&&$5i>=this.eastmin&&$5i<=this.eastmax){$8j=true;}};return $8j;};BBox.prototype.BBInside=function(BB){var $8j=false;if(this.PointInside(BB.northmin,BB.eastmin)&&this.PointInside(BB.northmax,BB.eastmax)){$8j=true;};return $8j;};BBox.prototype.ToAreaString=function(){var $4w=null;if(this.Valid){$4w="&south="+this.northmin+"&west="+this.eastmin+"&north="+this.northmax+"&east="+this.eastmax;};return $4w;};
function $0C(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K.status){setStatus("OK");}else if(String.IsPrintable($4K.msg)){if($4K.aid){var $3x=$0i($6W,$4K.aid);if($3x){$3x.set_Editable(false);var DB=$0l($6W);DB.DeleteObj($3x);$0H(true);}};if($4K.msg){alert($4K.msg);}}}};
function $0D($8k){var $4A="GET";var $4e=appPath+"/Search.ashx?"+$8k;$3p("ib",$4A,$4e,"",$0C);};
function $0E(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K&&$4K.municipality&&$4K.streetnames){$3D.Insert($4K.municipality,$4K.streetnames);$a($4K.municipality);}}};
function $0F($3s){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=getstreetnames&municipality="+$3s;$3p("ib",$4A,$4e,"",$0E);};
function StreetNameDataBase(){this.hashtable=new Array();};StreetNameDataBase.prototype.Load=function($3s){$0F($3s);};StreetNameDataBase.prototype.Insert=function($3s,$8l){this.hashtable[$3s]=$8l;};StreetNameDataBase.prototype.ExistMunicipality=function($3s){if(this.hashtable[$3s]){return true;};return false;};StreetNameDataBase.prototype.get_StreetNames=function($3s){return this.hashtable[$3s];};
function CollectionIdentity($57,name){this.MapId=$57;this.Name=name;};
function CollectionDataBase(){this.hashtable=new Array();};CollectionDataBase.prototype.Insert=function($57,name){var $59=new CollectionIdentity($57,name);this.hashtable[$57]=$59;return $59;};CollectionDataBase.prototype.Update=function($57,name){var $59=new CollectionIdentity($57,name);this.hashtable[$57]=$59;return $59;};CollectionDataBase.prototype.Delete=function($57){this.hashtable[$57]=null;};CollectionDataBase.prototype.Clear=function(){this.hashtable=new Array();};var $8m=false;var $8n=false;
function $0G($5Y){if($5Y){$8m=true;}else{$8n=true;}};
function $0H($5Y){$0y($5Y);if($5Y){$8m=false;}else{$8n=false;}};
function $0I(){$8m=false;$8n=false;};
function $0J(){if($8m){$0y(true);$8m=false;};if($8n){$0y(false);$8n=false;}};var $86=null;
function $0K(){if($K()){if($86){$86=null;removeHandles();}}};
function $0L($3x,Id){if($K()){var $62=document.getElementById("mapmeter");if($86!=Id){removeHandles();}else{return;};$N(true,$62,$3x,Id);$86=Id;}};
function extendedFeedbackSubmit($8o){var $8p=false;if($8o.referenceid){if($8o.RefIdLocation&&$8o.RefIdLocation.checked){}else if($8o.PointedLocation.checked){if(!String.IsPrintable($8o.north.value)||!String.IsPrintable($8o.east.value)){alert(cl_noPointedLocation);$8p=true;}}}else{if($8o.NoLocation&&$8o.NoLocation.checked){}else if($8o.PointedLocation&&$8o.PointedLocation.checked){if(!String.IsPrintable($8o.north.value)||!String.IsPrintable($8o.east.value)){if($8o.NoLocation){if(!confirm(cl_noPointedLocationSendFeedbackAnyway)){$8p=true;}else{$8o.NoLocation.checked=true;$8o.PointedLocation.checked=false;}}else{alert(cl_noPointedLocation);$8p=true;}}}else if($8o.OwnObjects&&$8o.OwnObjects.checked){var $7j=MySitesDB.Count();if($7j==0){if(confirm(cl_noOwnObjectsSendFeedbackAnyway)){$8o.locationdata.value="";}else{$8p=true;}}else{var $4B=$n(true);$8o.locationdata.value=$4B;}}else{}};if($8p==false){$8o.layer.value=$2t(Themes[currentTheme].Name);$8o.layerscript.value=$1B();$8o.submit();return false;}else{return true;}};
function postLoad(){var $8q;if(document.frames){$8q=document.frames["postFrame"];}else{$8q=window.frames["postFrame"];};var $8r=$8q.document.body.innerHTML;if($8r.length>1){var $4K=$2u($8r);if($4K){if($4K.status){hideObj("extendedfeedbackdiv");var $8s=null;if($4K.deniedfiletype){$8s=cl_attachmentDenied;};deleteUserPosition();$1Y($8s);}else{alert(cl_errorSavingFeedback);}}}};
function $0M(){var $4H=fbReq.readyState;if($4H==$4J){ajClu(fbReq);if(!$3q(fbReq)){return;};if(fbReq.responseText.length<2){return;};var $8t=document.getElementById("ebtarget");$8t.innerHTML=fbReq.responseText;$1z("extendedfeedbackdiv");$1r("extendedfeedbackdiv","extendedfeedbackbox",true,32);}};
function $0N($8u){var $4A="GET";var $4e=appPath+"/ExtendedFeedback.aspx";$4e+="?target="+$8u.target;if($8u.subject){$4e+="&subject="+$8u.subject;};if($8u.filter){$4e+="&filter="+$8u.filter;};$3p("fb",$4A,$4e,"",$0M);};
function showExtendedFeedback($8v,$6c){var $4A="GET";var $4e=appPath+"/ExtendedFeedback.aspx";if($8v){$4e+="?Query="+$8v;};if(String.IsPrintable($6c)){$4e+="?Filter="+$6c;};$3p("fb",$4A,$4e,"",$0M);};
function showFeedbackById($3E,Id,event){hideInfo();if(event)cancelEventPropagation(event);var $3x=$0i($3E,Id);if($3x){var $4A="GET";var $5m="referenceid="+$3x.RefId+"&north="+$3x.North+"&east="+$3x.East+"&name="+$2s($3x.Name);var $4e=appPath+"/ExtendedFeedback.aspx?"+$5m;$3p("fb",$4A,$4e,"",$0M);}};
function changeCategory(){if(!EmodelDataList){return;};var $8w=document.extendedFeedbackForm.Target.value;var $4g=document.extendedFeedbackForm.Subject;var i;var j;for(i=$4g.length-1;i>=0;i--){$4g.remove(i);};for(i=0;i<EmodelDataList.length;i++){if(EmodelDataList[i].Name==$8w){for(j=0;j<EmodelDataList[i].Words.length;j++){$4g.options[$4g.options.length]=new Option(EmodelDataList[i].Words[j],EmodelDataList[i].Words[j]);}}}};
function extendedFeedbackSelectTarget(){$8x="emodel";setStatus(cl_selectFeedbackTarget);startPositionSelect();};
function $0O($5h,$5i){var $3u=document.extendedFeedbackForm;$1Z();$3u.north.value=$5h;$3u.east.value=$5i;$3u.PointedLocation.checked=true;};
function $0P($8y){var $7W,$7O;var $7j=0;$0I();hideInfo();if($8y.messages&&$8y.messages.length>0){$7j=$8y.messages.length;};var $7Q=String.get_Safe($8y.target);if($8y.feedback){$7Q+=", "+String.get_Safe($8y.feedback);};$7Q+=" ("+$7j+")";$7O="<span class='mysites'><h3 class='mysites'>"+$7Q+"</h3>";var sb=new StringBuilder($7O);if($8y.messages&&$8y.messages.length>0){sb.Append("<table class='mysites' style='width: 100%; display: block; cursor: auto;'>");var $8z=appPath+"/ExtendedFeedbackInfo.aspx?Id=";var $8A,$8B;for(var i=0;i<$8y.messages.length;i++){$7W=$8z+$8y.messages[i].fid;if($8y.messages[i].geo){var Id;$8B="";for(var $8C=0;$8C<$8y.messages[i].geo.length;$8C++){Id=$0Q(SearchDB,$8y.messages[i].geo[$8C]);if(Id>0){var $8D="searchClick("+$6W+","+Id+");";$8B+="<a class=\"searchRow\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\""+$8D+"\">"+"&nbsp;"+($8C+1)+"&nbsp;</a>";}}}else{$8B=null;};$7O="<tr><td><p class='mysites'>"+(i+1)+". "+$8y.messages[i].target+", "+$8y.messages[i].feedback;if($8B){$7O+=$8B;};$7O+="</p></td></tr>";if(String.IsPrintable($8y.messages[i].text)){$8A=$8y.messages[i].text;}else{$8A=cl_additionalInfo;};$7O+="<tr><td><a class=\"bubblelink\"  href=\"javascript:openUrl('"+$7W+"')\">"+$8A+"</td></tr>";sb.Append($7O);};sb.Append("</ul></span>");}else{sb.Append("<p class='mysites'>"+cl_noObjectsFound+"</p>");};$1C(sb.ToString());$0G(true);$0J();};
function $0Q(DB,$8E,$7q){var Id=0;if($8E&&$8E.name){var $3x;if($8E.northarray){var $7S=$0n($8E.northarray,$8E.eastarray);$3x=new SR_Path(get_EncTypeText($8E.name,$7q),$8E.tip,$8E.url,$8E.image,$7S);if($8E.north){$3x.set_Point($8E.north,$8E.east);};$3x.set_Presentation($8E.linecolor,$8E.linetype,$8E.linewidth,$8E.fillcolor?$8E.fillcolor:null);if($8E.fill){$3x.set_Filled($8E.fill);};if($8E.urltype){$3x.set_UrlType($8E.urltype);};$3x.set_AV(true);}else{$3x=new SR_Point(get_EncTypeText($8E.name,$7q),$8E.tip,$8E.url,$8E.image,$8E.north,$8E.east);};Id=DB.Insert($3x);};return Id;};var $8F=null;
function startPan(){var $8G=document.getElementById("panimg");toolMode="pan";if($8G)$8G.src=appPath+"/img/hand_down.gif";setHandCursor($44);};
function startZoom(){var $8H=document.getElementById("zoomimg");toolMode="zoom";$8H.src=appPath+"/img/zoom_down.gif";$44.style.cursor="default";};
function startMeter($8I){var $8J=true;SideWindow.OpenPage(SW_MEASURED);if($8I&&toolMode=="distance")$8J=false;if($8J){var $8K=document.getElementById("meterimg");toolMode="distance";$8K.src=appPath+"/img/measure_down.gif";setStatus(cl_measureDistance);enableTooltip();$44.style.cursor="crosshair";}};
function endMeter(){clearToolstate();startPan();};
function createDraw($6x,$8L){$8M=$6x;clearToolstate();$0K();var $8N=document.getElementById($6x?"drawpolygon":"drawpolyline");if($6x){toolMode="drawpolygon";if($8N)$8N.src=appPath+"/img/draw_area_down.gif";}else{toolMode="drawpolyline";if($8N)$8N.src=appPath+"/img/draw_poly_down.gif";};setStatus(cl_drawPolylineTip);if($8L)enableTooltip($8L);$44.style.cursor="crosshair";if($8O&&$8O.points&&$8O.points.length>0){$2H(drawLine);}};
function saveDrawing($8P){var name=document.getElementById("sitenamefield");var $8Q=document.getElementById("siteurlfield");var $4s=document.getElementById("siteexplanationfield");var $4e=$8Q.value;if(!$2N($4e,true))$4e=null;if($8P=="drawpolygon"||$8P=="drawpolyline"){var $3x=new SR_Path((name.value=="")?cl_ownDrawing:name.value,($4s.value!="")?$4s.value:null,$4e,null,$8O.points);$3x.set_Presentation($8O.linecolor,$8O.dashtype,$8O.lineweight,$8M?$8O.fillcolor:null);$3x.set_Filled($8M);MySitesDB.Insert($3x);$0R();}else if($8P=="createsite"){var $3x=new SR_Point((name.value=="")?cl_ownObject:name.value,($4s.value!="")?$4s.value:null,$4e,appPath+"/img/Point2.gif",$3y,$3z);MySitesDB.Insert($3x);};$0I();name.value="";$1k();$0G(true);$0J();};
function $0R(){$8O.points=null;if($5W){$03(true,"guide0");$03(true,"guide1");$03(true,"drawing");}else{$Y(true,"guide");$Y(true,"drawing");}};
function cancelDrawing(){$0R();clearToolstate();startPan();};
function setPopupPosition(event,$8R){var $8S=$12(event);var $8T=$13(event);var $8U=$0Z();var $8V=$0Y();var w=getWidth($8R);var h=180;if($8R!=null){$f($8R);if($8V>$8T+h){$8R.style.bottom="";$8R.style.top=$8T+"px";}else{$8R.style.bottom=($8V-$8T)+"px";$8R.style.top="";};if($8U>$8S+w){$8R.style.right="";$8R.style.left=($8S)+"px";}else{$8R.style.right=($8U-$8S)+"px";$8R.style.left="";}}};
function $0S(event,$8W){var cw=$0Z();var ch=$0Y();var cx=$12(event);var cy=$13(event);var pw=getWidth($8W);var ph=getHeight($8W);var px=getLeft($8W);var py=getTop($8W);var nx;var ny;if(cx-pw/ 2.0> 0&& cx+ pw/ 2.0<cw-20)nx=cx-pw/2.0;else if(cx-pw/2.0>0)nx=cw-pw-20;else nx=20;if(cy+ph<ch-20)ny=cy-ph/2.0;else if(ch>ph)ny=ch-ph-20;else ny=20;var $8X=new Object();$8X.x=nx;$8X.y=ny;return $8X;};
function showSiteProperties(event){if(toolMode=="drawpolygon"||toolMode=="drawpolyline"){var $8Y=2;if(toolMode=="drawpolygon")$8Y=3;if($8O.points==null||$8O.points.length<$8Y){return;}};openEditWindow(null,null,event);if($5X){$Y(true,"guide");}else if($5W){$03(true,"guide0");$03(true,"guide1");};$2I(drawLine);};
function startPositionSelect($5j){var $8Z=document.getElementById("positionselect");if(toolMode!="positionselect")$6I=toolMode;toolMode="selectposition";enableTooltip();$44.style.cursor="default";if($5j)$8x=$5j;};
function $0T($5h,$5i){var $90=document.getElementById("userposition");$3y=$5h;$3z=$5i;var $3F=$2K($3z,$3y);$90.style.left=$3F.x-10+"px";$90.style.top=$3F.y-30+"px";$f($90);};
function deleteUserPosition(){hideObj("userposition");$3y=null;$3z=null;};
function cancelEventPropagation(event){if($4c==true||$6j==true){window.event.cancelBubble=true;window.event.returnValue=false;};if($91==true&&event){event.preventDefault();event.stopPropagation();}};
function openUrl($4e,event){if(toolMode!="distance"){if($4e==null||$4e=="undefined")return;if($4e.indexOf("cript:")!=-1)eval($4e);else window.open($4e,"mywin");if(event)cancelEventPropagation(event);}};
function $0U($3x){var $4w=false;if($3x&&$3x.style.visibility=="visible")$4w=true;return $4w;};
function $0V($4m){var $3x=document.getElementById($4m);return $0U($3x);};
function enableTooltip($8L){$8F=$8L;$44.onmouseover=showTooltip;$2H(updateTooltip);$44.onmouseout=$0X;};
function $0W(){$8F=null;if($6S){sWL(true,true);$44.onmouseover=function(event){sWLT();};}else{$44.onmouseover=null;};$2I(updateTooltip);if($6S){$44.onmouseout=function(event){sWL(false);};}else{$44.onmouseout=null;}};
function showTooltip(event){showObj("tooltipdiv");};
function cancelDrawLine(){$2I(drawLine);$44.onmouseout=null;document.onmouseout=null;};
function showContextMenu(event){var $8R=null;if(toolMode=="drawpolygon"||toolMode=="drawpolyline")$8R=document.getElementById("drawcontextdiv");else if(toolMode=="distance")$8R=document.getElementById("distancecontextdiv");else $8R=document.getElementById("maincontextdiv");if($8R)setPopupPosition(event,$8R);};
function hideActionMenu(){hideObj("actionMenu");};
function hideContextMenu(){hideObj("drawcontextdiv");hideObj("distancecontextdiv");hideObj("maincontextdiv");};
function updateDistance(){var $92=document.getElementById("distancediv");var $93=document.getElementById("lastmeterpoint");meterDistance=0;var i;if(mapMeter.points&&mapMeter.points.length>0){for(i=1;i<mapMeter.points.length;i++){meterDistance=meterDistance+Math.sqrt(Math.pow(mapMeter.points[i-1].east-mapMeter.points[i].east,2)+Math.pow(mapMeter.points[i-1].south-mapMeter.points[i].south,2));};$93.innerHTML=String.format(cl_lastPointLocation,$y(mapMeter.points[mapMeter.points.length-1].south,mapMeter.points[mapMeter.points.length-1].east,'distance'));}else{$93.innerHTML="";};$92.innerHTML=String.format(cl_totalDistance,Math.round(meterDistance));};
function updateTooltip(event){var x,y,$3F;if($6S){x=$14(event);y=$15(event);}else{x=$12(event);y=$13(event);};var $94=document.getElementById("tooltipdiv");$94.style.left=(x+10)+"px";$94.style.top=(y+20)+"px";if(toolMode=="distance"){var $95=centerEast+Math.round(($14(event)-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $96=centerSouth+Math.round((-$15(event)+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);if(mapMeter.points==null)$94.innerHTML=cl_selectFirstPoint+"&nbsp;";else if(mapMeter.points.length>0){$94.innerHTML=Math.round(meterDistance+Math.sqrt(Math.pow(mapMeter.points[mapMeter.points.length-1].east-$95,2)+Math.pow(mapMeter.points[mapMeter.points.length-1].south-$96,2)))+" "+cl_meters;}}else if(toolMode=="selectposition"){var $97="";if($8x=="searchengine")$97=cl_selectNewObjectPosition;else if($8x=="feedback")$97=cl_selectFeedbackTarget;else if($8x=="property")$97=cl_selectQueryPorpertiesTarget;else if($8x=="link")$97=cl_selectLinkPosition;else if($8x=="emodel")$97=cl_selectFeedbackTarget;else if($8x=="external"&&$98)$97=$98;else $97=cl_selectPositionFromMap;$94.innerHTML=$97+"&nbsp;";}else if(toolMode=="createsite"||toolMode=="createaddress"){$94.innerHTML=cl_selectNewObjectPosition;}else if(toolMode=="movesite"){$94.innerHTML=cl_selectMoveObjectPosition;}else if(toolMode=="drawpolyline"||toolMode=="drawpolygon"){if($6S){$94.innerHTML=$8F;}}};
function $0X(event){hideObj("tooltipdiv");};
function testMouseOut(event){if($12(event)<=0||$12(event)>=$0Z()||$13(event)<=0||$13(event)>=$0Y()){if(toolMode=="pan")stopPan(event);else if(toolMode=="zoom")cancelZoom(event);}};
function $0Y(){var h;if($6S){h=$99.offsetHeight;return h;};if(typeof(window.innerHeight)=='number'){h=window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){h=document.documentElement.clientHeight;}else if(document.body&&document.body.clientHeight){h=document.body.clientHeight;};return h;};
function $0Z(){var w;if($6S){w=$99.offsetWidth;return w;};if(typeof(window.innerWidth)=='number'){w=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){w=document.documentElement.clientWidth;}else if(document.body&&document.body.clientWidth){w=document.body.clientWidth;};return w;};
function $10(){var w=$0Z();if($6S)return w;var $9a=getLeft($99);return w-$9a;};
function $11(){var h=$0Y();if($6S)return h;var $9b=getTop($99);if($4T)return h-$9b;else return h-$9b-28;};
function $12($9c){var x;if($4c==true||$6j==true)x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;if($91==true)x=$9c.clientX+window.scrollX;return x;};
function $13($9c){var y;if($4c==true||$6j==true)y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;if($91==true)y=$9c.clientY+window.scrollY;return y;};
function $14($9c){var x=$12($9c);if($6S){return x-$99.offsetLeft;};var $9a=getLeft($99);x-=$9a;if($4c)x-=2;return x;};
function $15($9c){var y=$13($9c);if($6S){return y-$99.offsetTop;};var $9b=getTop($99);y-=$9b;if($4c)y-=2;return y;};
function $16(){var $9d=document.getElementById("zoompointer");if($9d){var $9e=getTop($9d);var $9f=document.getElementById("zoomscale");var $9g=getTop($9f);var $9h=getHeight($9f);var $9i=getHeight($9d);$9d.style.top=($9g+((1-zoomLevel/(Themes[currentTheme].Wupp.length-1)))*($9h-$9i))+"px";}};
function setStatus($9j){var $9k=document.getElementById("statusdiv");if($9k)$9k.innerHTML=$9j;};
function $17(){var $9l=document.getElementById("themeselect");var $9m=-1;var $9n=0;for(var i=0;i<Themes.length;i++){if(Themes[i].OverView==false){if(i==currentTheme)$9m=$9n;$9l.options[$9l.options.length]=new Option(Themes[i].Label,i);$9n++;}};if($9m>=0){$9l.selectedIndex=$9m;};$1a();};
function $18(name){for(var i=0;i<Themes[currentTheme].Layers.length;i++){if($1x(Themes[currentTheme].Layers[i],name))return i;};return -1;};
function $19(name){for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if($1x(Themes[currentTheme].CategoryLayers[i],name))return i;};return -1;};
function $1a(){var $9o=document.getElementById("areaselect");var i;for(i=$9o.length-1;i>=0;i--){$9o.remove(i);};for(i=0;i<Themes[currentTheme].NamedAreas.length;i++){$9o.options[$9o.options.length]=new Option(Themes[currentTheme].NamedAreas[i].Name,Themes[currentTheme].NamedAreas[i].Name);};var $7O="";if(Themes[currentTheme].Layers.length>0||Themes[currentTheme].CategoryLayers.length>0){var $7O='<form class="formfield" name="layerform"><table>';for(i=0;i<Themes[currentTheme].Layers.length;i++){$7O+='<tr><td class="formfield"><input class="layername" type="checkbox" onclick="cLayerState('+i+')" id="lr_'+i+'"';if(Themes[currentTheme].Layers[i].On)$7O+=' checked="checked">';else $7O+='>';$7O+='<label for="lr_'+i+'" class="layername">'+Themes[currentTheme].Layers[i].Label+'</label></td></tr>';};for(i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].LinkTo){}else if(Themes[currentTheme].CategoryLayers[i].Gui){$7O+='<tr><td class="formfield"><input class="categorylayername" type="checkbox" onclick="cCatLayerState('+i+')" id="clr_'+i+'"';if(Themes[currentTheme].CategoryLayers[i].On)$7O+=' checked="checked">';else $7O+='>';$7O+='<label for="clr_'+i+'" class="categorylayername">'+Themes[currentTheme].CategoryLayers[i].Label+'</label></td></tr>';}};$7O+="</table></form>";};$1b("layerlist",$7O);};
function $1b(name,$7O){var $3x=document.getElementById(name);if($3x)$3x.innerHTML=$7O;};
function cLayerState($4M){if($4M>=0&&$4M<Themes[currentTheme].Layers.length){var $9p="lr_"+$4M;var $3x=document.getElementById($9p);if($3x){Themes[currentTheme].Layers[$4M].On=$3x.checked?true:false;}else{if(Themes[currentTheme].Layers[$4M].On)Themes[currentTheme].Layers[$4M].On=false;else Themes[currentTheme].Layers[$4M].On=true;};layerCommand=$2S();$2V();$1d(Themes[currentTheme].Layers[$4M].Name,Themes[currentTheme].Layers[$4M].On);updateMapLink();}};
function $1c($4M,$77){if($4M>=0&&$4M<Themes[currentTheme].Layers.length){if(Themes[currentTheme].Layers[$4M].On!=$77){Themes[currentTheme].Layers[$4M].On=$77;layerCommand=$2S();$2V();$1d(Themes[currentTheme].Layers[$4M].Name,Themes[currentTheme].Layers[$4M].On);updateMapLink();}}};
function $1d($9q,$9r){var $7L=null;for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].LinkTo&&Themes[currentTheme].CategoryLayers[i].LinkTo==$9q){var $9s=Themes[currentTheme].CategoryLayers[i].CategoryName;Themes[currentTheme].CategoryLayers[i].On=$9r;if($9s){if(!$7L)$7L=new Array();if($7L.Find($9s)==false){$7L.push($9s);}}}};if($7L)$0s($7L,$9r);};
function $1e($9q){var $9t=0;for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].CategoryName==$9q){if(Themes[currentTheme].CategoryLayers[i].MaxZoom){$9t=Themes[currentTheme].CategoryLayers[i].MaxZoom;break;}}};return $9t;};
function cCatLayerState($4M){if($4M>=0&&$4M<Themes[currentTheme].CategoryLayers.length){var $9p="clr_"+$4M;var $3x=document.getElementById($9p);if($3x){Themes[currentTheme].CategoryLayers[$4M].On=$3x.checked?true:false;}else{if(Themes[currentTheme].CategoryLayers[$4M].On)Themes[currentTheme].CategoryLayers[$4M].On=false;else Themes[currentTheme].CategoryLayers[$4M].On=true;};if(Themes[currentTheme].CategoryLayers[$4M].CategoryName){var $7L=new Array();$7L.push(Themes[currentTheme].CategoryLayers[$4M].CategoryName);$0s($7L,Themes[currentTheme].CategoryLayers[$4M].On);};updateMapLink();}};
function $1f($4M,$77){if($4M>=0&&$4M<Themes[currentTheme].CategoryLayers.length){if(Themes[currentTheme].CategoryLayers[$4M].On!=$77){Themes[currentTheme].CategoryLayers[$4M].On=$77;var $7L=new Array();$7L.push(Themes[currentTheme].CategoryLayers[$4M].CategoryName);$0s($7L,Themes[currentTheme].CategoryLayers[$4M].On);};updateMapLink();}};
function $1g(name,on){var $9u=false;var $9v="";for(var i=0;i<Themes[currentTheme].Layers.length;i++){if($1x(Themes[currentTheme].Layers[i],name)){Themes[currentTheme].Layers[i].On=on;$9v=Themes[currentTheme].Layers[i].Label;$9u=true;break;}};{for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].LinkTo){if(Themes[currentTheme].CategoryLayers[i].LinkTo==name||Themes[currentTheme].CategoryLayers[i].LinkTo==$9v){Themes[currentTheme].CategoryLayers[i].On=on;}}else if(Themes[currentTheme].CategoryLayers[i].Gui&&$1x(Themes[currentTheme].CategoryLayers[i],name)){Themes[currentTheme].CategoryLayers[i].On=on;break;}}}};
function $1h($7h){for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].CategoryName==$7h){return Themes[currentTheme].CategoryLayers[i].On;}};return false;};
function clearDetailCategories(){var $8Z=document.getElementById("selectedcategories");for(i=$8Z.length-1;i>=0;i--)$8Z.remove(i);};
function hideBigMap(){hideObj("mapbig");showObj("bigmapshowbutton");};
function showBigMap(){showObj("mapbig");hideObj("bigmapshowbutton");};
function removeInfoTimer(){if($9w){clearTimeout($9w);$9x=null;}};
function hideInfo(){if($9w){clearTimeout($9w);$9x=null;};var $9y=document.getElementById("infowindowdiv");if($0U($9y)){$9y.sitename=null;hideObj("infoclosebutton");hideObj("infoarrowright");hideObj("infoarrowleft");$e($9y);}};
function showMessagePanel(x,y,$7t){var $9y=document.getElementById("messagepaneldiv");var $9z=document.getElementById("messagepaneltext");hideObj("messagepanelclosebutton");$9z.innerHTML=$7t;$9y.style.left=(x+42)+"px";$9y.style.top=(y-37)+"px";$f($9y);};
function hideMessagePanel(){hideObj("messagepanelclosebutton");hideObj("messagepaneldiv");};
function doHover($3x){$3x.style.textDecoration="underline";};
function doMenuHover($3x){$3x.className="menu_context_on";};
function removeMenuHover($3x){$3x.className="menu_context_off";};
function doBackgroundHover($3x){$3x.className="box_context_on";};
function removeBackgroundHover($3x){$3x.className="box_context_off";};
function removeHover($3x){$3x.style.textDecoration="none";};
function $1i(){toolMode=$6I;if(toolMode=="pan")startPan();else if(toolMode=="distance")startMeter();else if(toolMode=="zoom")startZoom();};
function clearToolstate(){var $8G=document.getElementById("panimg");var $8H=document.getElementById("zoomimg");var $8K=document.getElementById("meterimg");var $9A=document.getElementById("drawpolyline");var $9B=document.getElementById("drawpolygon");var $9C=document.getElementById("drawsite");if($8K)$8K.src=appPath+"/img/measure_inact.jpg";$8G.src=appPath+"/img/hand_inact.jpg";$8H.src=appPath+"/img/zoom_inact.jpg";if($9A)$9A.src=appPath+"/img/draw_poly_inact.gif";if($9B)$9B.src=appPath+"/img/draw_area_inact.gif";if($9C)$9C.src=appPath+"/img/draw_site_inact.gif";cancelDrawLine();$0X();$0W();};
function clearMySites(){hideInfo();$0I();MySitesDB.Clear();$1k();$0G(true);$0J();};
function showAllMySites(){var BB=new BBox();for(var Id in MySitesDB.hashtable){var $3x=MySitesDB.hashtable[Id];if($3x&&$3x.Name){if($0o($6P,Id,$3x)==false){if($3x.PointArray){$0w(true,$6P,Id,$3x);}else{var $7Z=$0v($6P,Id,$3x);var $7c=document.getElementById("mapsites");$7c.innerHTML=$7c.innerHTML+$7Z;}};$3x.RegisterBB(BB);}};if(BB.Valid){var $7X=BB.eastmax-BB.eastmin;var $7Y=BB.northmax-BB.northmin;centerEast=BB.eastmin+$7X/2.0;centerSouth=BB.northmin+$7Y/2.0;zoomLevel=$2X($7X,$7Y);$2V();}};
function $1j(name){return $0p(MySitesDB,name);};
function $1k(){var $7j=0;var $7O=new StringBuilder("<table class='mysites' style='width: 100%; display: block; cursor: auto;'>");for(var i in MySitesDB.hashtable){var $3x=MySitesDB.hashtable[i];if($3x&&$3x.Name){var $9D="<tr class='mysites'>";var Image;if($3x.Image)Image=$3x.Image;else Image=appPath+"/img/point.gif";$9D+="<td width='30px' class='mysites'><a  style=\"cursor:pointer\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\"showDrawing("+$6P+","+i+");\">"+"<img src='"+Image+"' border='0'></a></td>";$9D+="<td class='mysites'><h4 class='mysites'><a style=\"cursor:pointer\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\"showDrawing("+$6P+","+i+");\">"+String.escapeHTML($3x.Name)+"</a></h4>";if($3x.Explanation)$9D+="<p class='mysites'>"+String.escapeHTML($3x.Explanation,true)+"</p>";else $9D+="<p class='mysites'>&nbsp;</p>";$9D+="</td></tr>";$7O.Append($9D);$7j++;}};$7O.Append("</table>");var $9E=document.getElementById("mysiteslist");if($9E){if($7j>0)$9E.innerHTML=$7O.ToString();else $9E.innerHTML="<div class=\"actionhelp\">"+cl_ownObjectsHelp+"</div>";}};
function setScaleText(){var $9F=document.getElementById("scaletext");if($9F)$9F.innerHTML="&nbsp;"+100*Themes[currentTheme].Wupp[zoomLevel]+" m&nbsp;";};
function $1l($8i){var BB=new BBox();var $7X=$4a*Themes[currentTheme].Wupp[zoomLevel];var $7Y=$4b*Themes[currentTheme].Wupp[zoomLevel];var $5i=centerEast+$7X/2;var $9G=centerSouth-$7Y/2;var $9H=centerEast-$7X/2;var $5h=centerSouth+$7Y/2;BB.RegisterPoint($9G,$9H);BB.RegisterPoint($5h,$5i);if($8i){if($8i>0.1)BB.Extend($8i);}else{var $9I=imageSize*Themes[currentTheme].Wupp[zoomLevel];BB.Extend($9I);};return BB;};
function $1m(){var $7X=$4a*Themes[currentTheme].Wupp[zoomLevel];var $7Y=$4b*Themes[currentTheme].Wupp[zoomLevel];var $5i=centerEast+$7X/2;var $9G=centerSouth-$7Y/2;var $9H=centerEast-$7X/2;var $5h=centerSouth+$7Y/2;return "&south="+$9G+"&west="+$9H+"&north="+$5h+"&east="+$5i;};
function $1n($9q){var $4M=$1o($9q);return $4M>=0?$4M:0;};
function $1o($9q){var $4M=-1;for(var i=0;i<Themes.length&&$4M==-1;i++){if(Themes[i].Name==$9q)$4M=i;};return $4M;};
function startHideTimer(){removeInfoTimer();$9w=setTimeout("hideInfo();",400);};
function $1p(){if(document.onmousemove==drawZoom||toolMode=="createsite"||toolMode=="createaddress"||toolMode=="drawpolygon"||toolMode=="drawpolyline"||toolMode=="distance"||toolMode=="selectposition"||$0V("maincontextdiv")){return true;};return false;};
function showInfo($3E,Id,$9J,$9K,$9L){if(document.onmouseup||(!$9L&&($1p())))return;removeInfoTimer();if($6S&&$3E==$6P){return $9M($3E,Id,$9J,$9K,$9L);};var $7O="";var $9y=document.getElementById("infowindowdiv");var $9N=document.getElementById("infoclosebutton");var $9z=document.getElementById("infotext");var $3x=$0i($3E,Id);var $9O=false;if(!$3x){return;};var $9P=$3x.get_FmtText();if($3x.Name!=null||$9P!=null||$3x.AttrList!=null){var $7w=false;var $9Q=false;var $9R=false;var $9S=false;if($3E==$6V){$7w=false;$9Q=false;}else if($3E==$6W){$7w=false;if($3x.get_EditType()=='ext')$9S=true;else $9Q=$3x.get_Editable();}else if($3E==$6P){$7w=true;$9Q=false;if($0g($3x)&&$3x.PointArray&&$3x.PointArray.length<50){$9R=true;}};if($9L||$9P||$3x.get_EditType()=='ext')$9O=true;if($9P){$7O=$9P;}else{if($3x.AttrList!=null){$7O+="<b>"+String.escapeHTML($3x.Name)+"</b>";for(var a=0;a<$3x.AttrList.length;a++){$7O+="<br/>"+String.escapeHTML($3x.AttrList[a].n);$7O+=": ";$7O+=String.escapeHTML($3x.AttrList[a].v);}}else{$7O+="<b>"+String.escapeHTML($3x.Name)+"</b>";if($3x.Explanation&&$3x.Name!=$3x.Explanation)$7O+="<br/>"+String.escapeHTML($3x.Explanation,true);else $7O+="<br/>&nbsp;";if($3x.CategoryPath)$7O+="<br/>"+$3x.CategoryPath;};var $9T=false;if($3x.get_UrlType()=='SF'){$7O+="<br/><br/><a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:showFeedbackById("+$3E+","+Id+", event)\">"+$2w("feedbackLink")+"</a>";$9T=true;}else if($2N($3x.Url)){var $9U=cl_additionalInfo;if($3x.get_UrlType()=='PR')$9U=cl_planRegulations;$7O+="<br/><a class=\"bubblelink\" href=\"JavaScript:openUrl('"+$3x.Url+"')\">"+$9U+"...</a>&nbsp;&nbsp;&nbsp;";}else{$7O+="<br/>&nbsp;";};if($3x.DocList&&$3x.DocList.length>0){for(var $7z=0;$7z<$3x.DocList.length;$7z++){var $4e=$3x.DocList[$7z].Url;var $7y=$3x.DocList[$7z].Exp;if(String.IsPrintable($4e)){if(String.IsPrintable($7y)){$7O+="<br/><a class=\"bubblelink\" href=\"JavaScript:openUrl('"+$4e+"')\">"+$7y+"...</a>&nbsp;&nbsp;&nbsp;";}else{$7O+="<br/><a class=\"bubblelink\" href=\"JavaScript:openUrl('"+$4e+"')\">"+$4e+"...</a>&nbsp;&nbsp;&nbsp;";}}}};if(!$4T&&$9T==false&&$3E==$6W&&!$3x.AttrList&&$9S==false){$7O+="<br/><a class=\"bubblelink\" href=\"JavaScript:addToMyObjs("+Id+")\">"+cl_addToOwnObjects+"</a>";$7O+="<br/><a class=\"bubblelink\" href=\"JavaScript:mapLinkToTarget("+Id+")\">"+cl_createMapLinkToTarget+"</a>";}};if($9S){$7O+="<br>";$7O+="<a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:moveSite("+$3E+","+Id+", event)\">"+cl_move+"</a>&nbsp;&nbsp;";$7O+="<a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:applyEdit("+$3E+","+Id+", event)\">"+cl_apply+"</a>&nbsp;&nbsp;";};if($7w||($9Q&&String.IsPrintable($3x.AddressNumber))){$7O+="<br>";if(!$3x.PointArray)$7O+="<a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:moveSite("+$3E+","+Id+", event)\">"+cl_move+"</a>&nbsp;&nbsp;";$7O+="<a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:delSelObject("+$3E+","+Id+", event)\">"+cl_delete+"</a>&nbsp;&nbsp;";$7O+="<a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:openEditWindow("+$3E+","+Id+", event)\">"+cl_edit+"</a>";};if($9Q){var $3s=$3x.Municipality;if(String.IsPrintable($3x.AddressNumber)){$7O+="<br/><a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:insertAddress('"+$3s+"', event)\">"+cl_addAddressLocation+"</a>";}else{$7O+="<br/><a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:insertAddress('"+$3s+"', event)\">"+cl_addAddressLocation+"</a>";}};var x,y;if($3x.PointArray&&$9J&&$9K){x=$9J;y=$9K;}else{var $3F=null;if($3x.PointArray)$3F=$3x.get_CenterPoint(true);if(!$3F){$3F=$2K($3x.East,$3x.North);};x=$3F.x;y=$3F.y;};$9z.innerHTML=$7O;$1q($3x,$9y,x,y);$9y.sitename=$3E+"="+Id;$f($9y);var $9z=document.getElementById("infotext");var $9V=document.getElementById("infoarrowleft");var $9W=document.getElementById("infoarrowright");if($9O){$f($9N);$9V.onmouseover=$9W.onmouseover=$9z.onmouseover=function(){removeInfoTimer();};$9V.onmouseout=$9W.onmouseout=$9z.onmouseout=null;}else{$e($9N);$9V.onmouseover=$9W.onmouseover=$9z.onmouseover=function(){removeInfoTimer();};$9V.onmouseout=$9W.onmouseout=$9z.onmouseout=function(){startHideTimer();}};if($9R){$0L($3x,Id);}else{$0K();}}};
function $1q($3x,$9y,x,y){var $9V=document.getElementById("infoarrowleft");var $9W=document.getElementById("infoarrowright");var $9a=0;var $9b=0;if(!$6S){$9a=getLeft($99);$9b=getTop($99);};if($4n){$9y.style.right="";$9y.style.left="-256px";$9y.style.top="";$9y.style.bottom="-256px";$f($9y);};var w=200;var h=100;w=$9y.offsetWidth;h=$9y.offsetHeight;var $9X=pinOffsetX;var $9Y=pinOffsetY;if($0g($3x)){$9X=14;$9Y=9;};if($0Z()>x-$9X+24+$6l+$9a+w){$9y.style.right="";$9y.style.left=(x-$9X+24+$6l+$9a)+"px";hideObj("infoarrowright");showObj("infoarrowleft");}else{$9y.style.left="";$9y.style.right=($0Z()+7-x-$6l-$9a+22)+"px";hideObj("infoarrowleft");showObj("infoarrowright");};if($0Y()>y-$9X-29+$6m+$9b+h){$9W.style.top=$9V.style.top="30px";$9W.style.bottom=$9V.style.bottom="";$9y.style.bottom="";$9y.style.top=(y-$9Y-29+$6m+$9b)+"px";}else{$9W.style.top=$9V.style.top="";var bt=($0Y()-y-$6m-$9b+2);if(bt<9)bt=9;$9W.style.bottom=$9V.style.bottom=bt+"px";$9y.style.top="";$9y.style.bottom=(10)+"px";}};
function getWidth($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.width,10);};
function getHeight($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.height,10);};
function getLeft($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.left,10);};
function getTop($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.top,10);};
function getRight($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.right,10);};
function getBottom($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);return parseInt($3x.style.bottom,10);};
function centerWindow($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);var cw=$0Z();var ch=$0Y();var pw=getWidth($3x);var ph=getHeight($3x);var x=Math.max(0,Math.round(cw/ 2.0- pw/2.0));var y=Math.max(0,Math.round(ch/ 2.0- ph/2.0)-25);$3x.style.left=x+"px";$3x.style.top=y+"px";};
function showForm(name,$9Z,$a0){var $3x=document.getElementById(name);var $a1=document.getElementById($9Z);if($3x.$eP){}else{try{$a2=parseInt($3x.style.height,10);$a3=parseInt($3x.style.width,10);if($a0&&$a2){};$3x.$eP=$a2;$3x.$eQ=$a3*0.8;}catch(e){}};$f($3x);$2n($3x);};
function $1r(name,$9Z,$a0,$a4){var $3x=document.getElementById(name);if($3x.$eP){}else{try{var $a1=document.getElementById($9Z);var $a2=$a1.scrollHeight;var $a3=$a1.scrollWidth;if($a0&&$a2){if($a4)$a2+=$a4;var $a5=38;$a1.style.height=$a2+"px";$3x.style.height=($a2+$a5)+"px";$3x.$eP=($a2+$a5);if($a3)$3x.$eQ=$a3*0.8;}}catch(e){}};$1y($3x,0,0);$f($3x);$2n($3x);};
function setHandCursor($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);if(!$3x)return;if($4c){$3x.style.cursor=appPath+"/img/hand.cur";}else if($6j||$6k){$3x.style.cursor="pointer";}else{$3x.style.cursor="-moz-grab";}};
function setGrabCursor($3x){if(typeof $3x=="string")$3x=document.getElementById($3x);if($4c){$3x.style.cursor=appPath+"/img/grab.cur";}else if($6j||$6k){$3x.style.cursor="pointer";}else{$3x.style.cursor="-moz-grabbing";}};
function setTransparent($3x,$a6){if($4c){$3x.style.filter="alpha(opacity="+$a6+")";}else{$3x.style.opacity=""+$a6/100;}};var $a7;
function $1s(c){if($a7!=$44.style.cursor&&$44.style.cursor!=c)$a7=$44.style.cursor;$44.style.cursor=c;};
function $1t(){if(String.IsPrintable($a7)){$44.style.cursor=$a7;$a7=null;}};
function $1u($a8,$a9,$aa){var $ab=document.getElementById($a8);var $ac=document.getElementById($a9);var h=getHeight($ab);var sh=getHeight($ac);var dh=h-sh;var h2=$aa+dh;if($ab.$eP){if(h2<$ab.$eP)h2=$ab.$eP;};if(h2<150)h2=150;$ab.style.height=h2+"px";$ac.style.height=(h2-dh)+"px";};
function $1v(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=$1v.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}};
function $1w(){if($4c==true){$1v(appPath+'/img/hand.cur',appPath+'/img/grab.cur');};$1v(appPath+'/img/b.gif',appPath+'/img/b2.gif',appPath+'/img/point.gif',appPath+'/img/point2.gif',appPath+'/img/empty.gif',appPath+'/img/open_wnd.gif',appPath+'/img/shut_wnd.gif',appPath+'/img/areapoint.gif',appPath+'/img/polypoint.gif');};
function $1x(lr,name){if(lr.Name==name||lr.Label==name){return true;}else{return false;}};
function $1y($ad,$ae,$af){var w=getWidth($ad);var $ag;var $ah=$0Z();var $ai=$0Y();var h=getHeight($ad);var $aj;if($ad.style.left){var $ak=getLeft($ad);$ag=$ak+$ae;if($ag>=0&&($ag+w)<=$ah)$aj=$ag;else if($ag<0)$aj=0;else $aj=($ah-w);if($aj<0)$aj=0;$ad.style.left=$aj+"px";}else{var $al=getRight($ad);$ag=$al-$ae;if($ag>=0&&($ag+w)<=$ah)$aj=$ag;else if($ag<0)$aj=0;else $aj=($ah-w);if($aj<0)$aj=0;$ad.style.right=$aj+"px";};var $am=getTop($ad);$ag=$am+$af;if($ag>=0&&($ag+h)<=$ai)$aj=$ag;else if($ag<0)$aj=0;else $aj=($ai-h);if($aj<0)$aj=0;$ad.style.top=$aj+"px";};
function rstImg($an,$6s){if(document.images){document.images[$an].src=$6s;}};
function zoomOut($an){hideInfo();if(document.images){document.images[$an].src=appPath+"/img/zoom_out_down.gif";};zoom(1);setTimeout('rstImg("'+$an+'", "'+appPath+'/img/zoom_out_act.gif");',500);};
function clearDynContext($an){if($an){if(document.images){document.images[$an].src=appPath+"/img/clear_down.gif";}};clearVis(true);var $4t=document.getElementById("searchresults");$4t.innerHTML="";SideWindow.HidePage(SW_RESULTS);if($an){setTimeout('rstImg("'+$an+'", "'+appPath+'/img/clear_inact.jpg");',500);}};
function showFeedback($4u){$1z("feedbackdiv");if($4u){$d(document.feedbackForm);};showForm("feedbackdiv","feedbackbox",true);};
function showShortLink($ao){$1z("shortlinkdiv");setModal("shortlinkdiv");var $3x=document.getElementById("shortlinkdiv");var $ap=document.getElementById("shortlinkhtml");var $4e=baseURL+"?mid="+$ao;document.shortlinkForm.holdtext.value=$4e;$ap.innerHTML="<center><a class=\"formfield\" target=\"link\" href=\""+$4e+"\">"+$4e+"</a></center>";showForm("shortlinkdiv","shortlinkbox",true);};
function showLocationLink(){$1z("locationlinkdiv");showForm("locationlinkdiv","loclinkbox",true);$1A(centerSouth,centerEast);};
function objectProperties(){$8x="property";startPositionSelect();};
function ClipBoard($aq){var element;if($aq){element=$aq.holdtext;}else{element=document.locationLinkForm.holdtext;};Browser$ClipBoard(element);};
function EmailLink($aq){var $4g=cl_mapLinkName;var $4e;if($aq){$4e=$aq.holdtext.value;}else{$4e=document.locationLinkForm.holdtext.value;};Browser$Email($4g,$4e);};
function BookMark($aq){var $4e;var title=cl_mapLinkName;if($aq){$4e=$aq.holdtext.value;}else{$4e=document.locationLinkForm.holdtext.value;};Browser$BookMark(title,$4e);};
function $1z($ar){var $as=false;hideInfo();if($ar!="advancedsearch"){hideObj("advancedsearch");};if($ar!='locationlinkdiv'){if($0V("locationlinkdiv")){$as=true;hideObj("locationlinkdiv");}};if($ar!='feedbackdiv'){if($0V("feedbackdiv")){$as=true;hideObj("feedbackdiv");}};if($ar!="extendedfeedbackdiv"){if($0V("extendedfeedbackdiv")){$as=true;hideObj("extendedfeedbackdiv");}};if($ar!='extLocLinkdiv'){hideObj('extLocLinkdiv');};if($as){deleteUserPosition();}};
function $1A($5h,$5i){var $3u=document.locationLinkForm;$3u.north.value=$5h;$3u.east.value=$5i;var $at=$5h+"  "+$5i;$3u.location.value=$at;updateMapLink();$1Z();};
function updateMapLink(){var $3u=document.locationLinkForm;var $ap=document.getElementById("locationlinkhtml");var $3x=document.getElementById("locationlinkdiv");if($ap!=null&&$0V("locationlinkdiv")){var $4e="";if($3x.shortLinkId){$4e=baseURL+"?mid="+$3x.shortLinkId;}else{var $au=$2s(Themes[currentTheme].Label);$4e=baseURL+"?layers="+$au;$4e+=$1B();var $5h=$3u.north.value;var $5i=$3u.east.value;if($5h.length<1){$5h=centerSouth;};if($5i.length<1){$5i=centerEast;};$4e+="&cp="+$5h+","+$5i;$4e+="&z="+Themes[currentTheme].Wupp[zoomLevel];if($3u.LinkExplanation.value.length>0){$4e+="&title="+$2s($3u.LinkExplanation.value);};$4e+="&language="+currentLanguage;};$3u.holdtext.value=$4e;$ap.innerHTML="<center><a class=\"formfield\" target=\"link\" href=\""+$4e+"\">"+$4e+"</a></center>";}};
function $1B(){var $av="";for(var i=0;i<Themes[currentTheme].Layers.length;i++){if(Themes[currentTheme].Layers[i].On!=Themes[currentTheme].Layers[i].Def){if(Themes[currentTheme].Layers[i].On){$av+="&lon="+$2s(Themes[currentTheme].Layers[i].Label);}else{$av+="&loff="+$2s(Themes[currentTheme].Layers[i].Label);}}};for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].LinkTo){}else if(Themes[currentTheme].CategoryLayers[i].On!=Themes[currentTheme].CategoryLayers[i].Def){if(Themes[currentTheme].CategoryLayers[i].On){$av+="&lon="+$2s(Themes[currentTheme].CategoryLayers[i].Label);}else{$av+="&loff="+$2s(Themes[currentTheme].CategoryLayers[i].Label);}}};return $av;};
function $1C($7O){if($7O){var $4t=document.getElementById("searchresults");if($4t){$4t.innerHTML=$7O;}};if(!$4T&&SideWindow){SideWindow.OpenPage(SW_RESULTS);}};
function $1D($7O){if($7O){var $4t=document.getElementById("htmldata");if($4t)$4t.innerHTML=$7O;};var $3x=document.getElementById("htmldiv");if($3x){centerWindow($3x);$f($3x);$2n($3x);}};
function feedbackSelectTarget(){$8x="feedback";setStatus(cl_selectFeedbackTarget);startPositionSelect();};
function locationLinkSelectTarget(){$8x="link";setStatus(cl_selectLinkPosition);startPositionSelect();};
function $1E(){var $4H=fbReq.readyState;if($4H==$4J){ajClu(fbReq);if(!$3q(fbReq)){return;};deleteUserPosition();if(fbReq.responseText.length<2){return;};var $4K=$2u(fbReq.responseText);var $7O="";for(var i=0;i<$4K.results.length;i++){$7O+=$4K.results[i].property+"<br>";};if($4K.results.length>0){var $3x=new SR_Point(null,null,null,appPath+"/img/Info.gif",$4K.north,$4K.east);$3x.set_FmtText($7O);var Id=SearchDB.Insert($3x);updateSites();showInfo($6W,Id,null,null,true);}else{var $3F=$2K($4K.east,$4K.north);showMessagePanel($3F.x,$3F.y,cl_pickNoObjectsWithPropertiesFound);var $aw=setTimeout("hideMessagePanel()",2000);}}};
function $1F(){var $4A="GET";var $4e=appPath+"/Feedback.ashx?Op=p&Theme="+$2s(Themes[currentTheme].Name)+"&North="+$3y+"&East="+$3z+"&zoom="+zoomLevel+layerCommand;$3p("fb",$4A,$4e,"",$1E);};
function $1G(){var $4H=fbReq.readyState;if($4H==$4J){ajClu(fbReq);if(!$3q(fbReq)){return;};var $4B=fbReq.responseText;$1Z();if($4B.length<2){return;};var $4K=$2u(fbReq.responseText);document.feedbackForm.north.value=$4K.north;document.feedbackForm.east.value=$4K.east;if($4K.results.length>0){if(document.feedbackForm.feedbackProperty){document.feedbackForm.feedbackProperty.value=$4K.results[0].property;}}else{var $3F=$2K($4K.east,$4K.north);showMessagePanel($3F.x,$3F.y,cl_pickNoObjectsWithPropertiesFound);var $aw=setTimeout("hideMessagePanel()",2000);};var $at=$4K.north+"  "+$4K.east;document.feedbackForm.location.value=$at;}};
function $1H($5h,$5i){if(feedbackPick){var $4A="GET";var $4e=appPath+"/Feedback.ashx?Op=p&Theme="+$2s(Themes[currentTheme].Name)+"&North="+$5h+"&East="+$5i+"&zoom="+zoomLevel+layerCommand;var $5m="";$3p("fb",$4A,$4e,"",$1G);}else{document.feedbackForm.north.value=$5h;document.feedbackForm.east.value=$5i;var $at=$5h+"  "+$5i;document.feedbackForm.location.value=$at;$1Z();}};
function feedbackSelectTarget(){$8x="feedback";startPositionSelect();};
function $1I(){var $4H=fbReq.readyState;if($4H==$4J){ajClu(fbReq);if(!$3q(fbReq)){return;};hideObj("feedbackdiv");deleteUserPosition();var $9j=fbReq.responseText;alert($9j);}};
function feedbackSubmit($3u){if($3u.Comment.value.length<1){alert(cl_feedbackFillQuestionField);return false;};var $4A="GET";var $4e=appPath+"/Feedback.ashx?Op=u&Theme="+$2s(Themes[currentTheme].Name)+layerCommand+$c($3u)+"&baseURL="+$2s(baseURL);$3p("fb",$4A,$4e,"",$1I);return true;};
function $1J(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);SearchDB.Clear();$0u(SearchDB,$4K,$6X);}};
function doSearch($3u){if($3u.searchtext.value==cl_searchTip){return;};if($3u.searchtext.value.length<1){return;};var $4A="GET";var $4e=appPath+"/Search.ashx?Op=all&Name="+$2s($3u.searchtext.value);if($3u.Municipality){$4e+="&Municipality="+$2s($3u.Municipality.value);};if($3u.addressOnly){if($3u.addressOnly.checked)$4e+="&SearchMask=a";};if($3u.searchtext.value.indexOf("currentarea:")!=-1){$4e+=$1m();};$3p("ib",$4A,$4e,"",$1J);};
function searchClick($3E,Id,$ax){var $3x=$0i($3E,Id);if($3x){showSite($3E,Id,$ax);}};
function createTree($ay){$az=new Tree();for(var i=0;i<$ay.length;i++){var lb;if($ay[i].leaf&&$ay[i].pid!=-1){lb=new Leaf($ay[i].id,$ay[i].name);}else{lb=new Branch($ay[i].id,$ay[i].name);};$az.MapInsert($ay[i].id,$ay[i].name);if($ay[i].pid==-1){$az.add(lb);}else{$az[$ay[i].pid].add(lb);}};var $4t=document.getElementById("detailcategories");$4t.innerHTML=$az.html();if($aA>=0){$3l($aA);};if($aB){$az.expand();}else{}};
function $1K(){if($4I.readyState==$4J){ajClu($4I);if(!$3q($4I)){return;};var $4B=$4I.responseText;if($4B.length<2){return;};var $ay=$2u($4I.responseText);createTree($ay);}};var $aA=-1;
function $1L($aC){var $56=false;try{if(Categories){createTree(Categories);$56=true;}}catch(e){$56=false;};if($56==false){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=getcategories";$aA=$aC;$3p("ib",$4A,$4e,"",$1K);}};var $az;
function setLanguage(l){var $4e=appPath+"/Default.aspx?layers="+Themes[currentTheme].Name+"&cp="+Math.round(centerSouth)+","+Math.round(centerEast)+"&z="+Themes[currentTheme].Wupp[zoomLevel]+"&Language="+l;window.location.href=$4e;};
function $1M($5h,$5i){var $4A="GET";var $4e;var $3u=document.areaDivisionForm;var $aD=encodeURIComponent($3u.areaDivision.value);if($5h&&$5i){$4e=appPath+"/Search.ashx?Op=areadivpt&areadivision="+$aD+"&North="+$5h+"&East="+$5i;$3u.searchtext.value="";}else{return;};$3p("ib",$4A,$4e,"",$1O);};
function searchAreaDivision($3u){var $4A="GET";var $4e;var $aD=encodeURIComponent($3u.areaDivision.value);if($3u.searchtext.value.length>0&&$3u.searchtext.value!=cl_exactAddressTip){$4e=appPath+"/Search.ashx?Op=areadivpt&areadivision="+$aD+"&Name="+$2s($3u.searchtext.value);if($3u.Municipality){$4e+="&Municipality="+$2s($3u.Municipality.value);}}else{return;};$3p("ib",$4A,$4e,"",$1O);};
function $1N($aE,$aF,$aG,$aH){var s=Math.min($aE,$aG);var n=Math.max($aE,$aG);var w=Math.min($aF,$aH);var e=Math.max($aF,$aH);var $7X=e-w;var $7Y=n-s;centerEast=w+$7X/2.0;centerSouth=s+$7Y/2.0;zoomLevel=$2X($7X,$7Y);$2V();};
function $1O(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<1){return;};var $4K=$2u($4I.responseText);if($4K.outside){alert(cl_positionOutsideOfAnyArea);}else{if($4K.naddressfound==1){var $7O="<table class=\"areasearch\"><tr><td colspan=\"2\"><b>"+$4K.areaname+"</b></td></tr>";for(var i=0;i<$4K.attributes.length;i++){if($4K.attributes[i].valueexp){$7O+="<tr><td colspan=\"2\"><a target=\"areaLink\" class=\"bubblelink\" href=\""+$4K.attributes[i].value+"\"/>"+$4K.attributes[i].valueexp+"</a></td></tr>";}else{$7O+="<tr><td>"+$4K.attributes[i].key+"</td><td>"+$4K.attributes[i].value+"</td></tr>";}};$7O+="</table>";var $aI=false;if($4K.displayat){if($4K.displayat=="source")$aI=true;};var $3x=new SR_Point(null,null,$4K.url,$4K.image,$aI?$4K.north:$4K.areanorth,$aI?$4K.east:$4K.areaeast);$3x.set_FmtText($7O);var Id=SearchDB.Insert($3x);if($aI){deleteUserPosition();$1N($4K.north,$4K.east,$4K.north,$4K.east);}else{$0T($4K.north,$4K.east);$1N($4K.areanorth,$4K.areaeast,$4K.north,$4K.east);};showSite($6W,Id,true);}else if($4K.naddressfound==-1){alert(cl_addressNrMissing);updateSites();}else if($4K.naddressfound>0){alert(cl_severalAddressFound);updateSites();}else{alert(cl_addressNotFound);updateSites();}}}};
function $1P(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K.valid){var $3u=document.extMapLinkForm;var $au=$2s(Themes[currentTheme].Label);var $4e=baseURL+"?layers="+$au;if($3u.ExtLinkAddress.checked){$4e+="&request=findaddress,"+$2s($4K.name)+","+$2s($3u.StreetName.value)+","+$3u.AddressNumberInt.value;}else{$4e+="&request=findbuilding,"+$2s($3u.Label.value);};var $7c=document.getElementById("extLocLinkError");$7c.innerHTML="";var $3x=document.getElementById("extLocLink");$3x.innerHTML="<center><a class=\"formfield\" target=\"link\" href=\""+$4e+"\">"+$4e+"</a></center>";}else{var $3x=document.getElementById("extLocLink");$3x.innerHTML="";var $7c=document.getElementById("extLocLinkError");$7c.innerHTML=$4K.errormessage;}}};
function extMapLinkSubmit($3u){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=checkextmaplink"+$c($3u);$3p("ib",$4A,$4e,"",$1P);};
function messagePanel(msg){alert(msg);};
function doAdvancedSearch($3u){var $4A="GET";var $6c="";if($3u.Text.value==cl_searchDetailTip){$6c="";}else{$6c=$2s($3u.Text.value);};var $4e=appPath+"/Search.ashx?Op=ext&Name="+$6c;var $7J="";var $8Z=document.getElementById("selectedcategories");if($8Z.length==0||($8Z.length==1&&$8Z.options[0].value==3)){$7J+="&cid=allc";}else{for(var i=0;i<$8Z.length;i++){$7J+="&cid="+$8Z.options[i].value;}};$4e+=$7J;if($3u.MapArea.checked){$4e+=$1m();};if($3u.Municipality&&$3u.Municipality.value.length>0){$4e+="&Municipality="+$2s($3u.Municipality.value);};if($3u.Area&&$3u.Area.value.length>0){$4e+="&Area="+$2s($3u.Area.value);};if($3u.Occ&&$3u.Occ.value.length>0){$4e+="&Occ="+$2s($3u.Occ.value);};$3p("ib",$4A,$4e,"",$1Q);};
function $1Q(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if(document.searchForm.Municipality){if($4K.municipality){document.searchForm.Municipality.value=$4K.municipality;}else{document.searchForm.Municipality.value="";}};if($4K.searchtext){document.searchForm.searchtext.value=$4K.searchtext;document.searchForm.searchtext.className='fieldactive'};hideObj("advancedsearch");SearchDB.Clear();$0u(SearchDB,$4K,$6X);}};var currentPlanRegHtml=null;
function $1R(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);var $7O;var sb=new StringBuilder("");if($4K.name){$7O="<h3 class=\"planreg\">"+$4K.name+"</h3>";sb.Append($7O);};if($4K.tip){$7O="<h4 class=\"planreg\">"+$4K.tip+"</h4>";sb.Append($7O);};if($4K&&$4K.reg){sb.Append("<table class=\"planreg\">");for(var i=0;i<$4K.reg.length;i++){$7O="<tr>";if($4K.reg[i].picsrc){$7O+="<td align=\"center\"><img src=\""+$4K.reg[i].picsrc+"\"></td>";}else{$7O+="<td></td>";};if($4K.reg[i].PlRegNum){$7O+="<td>"+$4K.reg[i].PlRegNum+"</td>";}else{$7O+="<td></td>";};$7O+="<td>"+$4K.reg[i].Desc+"</td></tr>";sb.Append($7O);};sb.Append("</table>");};$7O=sb.ToString();hideInfo();$1D($7O);currentPlanRegHtml=$7O;}};
function planRegulationLink($aJ,$aK){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=getplanregulations&LUPlanId="+$aJ;if($aK){$4e+="&PlanId="+$aK;};$3p("ib",$4A,$4e,"",$1R);};
function showAdvancedSearch(){$1z("advancedsearch");var $3x=document.getElementById("advancedsearch");if($0U($3x)){$e($3x);}else{try{var $a2=$3x.scrollHeight;if($a2){$3x.style.height=$a2;}}catch(e){};centerWindow($3x);var $aL=document.searchForm;var $aM=document.advancedSearchForm;var $7t=$aL.searchtext.value;if($aL.Municipality&&$aM.Municipality){$aM.Municipality.value=$aL.Municipality.value;};clearDetailCategories();if($aM.MapArea){$aM.MapArea.checked=false;};if($aM.Occ){$aM.Occ.value="any";};if($7t==cl_searchTip){$aM.Text.value=cl_searchDetailTip;$aM.Text.className='fieldblurred';$f($3x);return;}else if($aM.Text.value.length>0){$aM.Text.className='fieldactive';};var $aN=$7t;var i=0;var $aO=0;var $aP="";while(i<5){var $4w=String.GetNextField($7t);if($4w){$7t=$4w.end;};if($4w.t=='currentarea:'){$aO++;$aM.MapArea.checked=true;}else if($4w.t=='allinname:'){$aO++;if($aM.Occ){$aM.Occ.value="obj";}}else if($4w.t=='allincategoryname:'){$aO++;if($aM.Occ){$aM.Occ.value="cat";}}else if($4w.t=='allinexplanation:'){$aO++;if($aM.Occ){$aM.Occ.value="exp";}}else if($4w.t=='allinurl:'){$aO++;if($aM.Occ){$aM.Occ.value="url";}}else if($4w.t=='category:'){$aO++;var $aQ=String.GetNextField($7t);var $4M=$az.MapGet($aQ.t);if($4M>=0){adLTL($4M);};if($aQ){$7t=$aQ.end;}}else{if($aP.length>0){$aP+=" ";};$aP+=$4w.t;};if($4w.t==null||$4w.end==null){break;};i++;};if($aO==0){$aP=$aN;};$aM.Text.value=$aP.rtrim();$f($3x);}};
function mapLinkToTarget(Id){var $3x=SearchDB.Select(Id);if($3x){document.locationLinkForm.LinkExplanation.value=$3x.Name;$1z("locationlinkdiv");showObj("locationlinkdiv");if($3x.North&&$3x.East){$1A($3x.North,$3x.East);}else if($3x.PointArray&&$3x.PointArray.length>0){$1A($3x.PointArray[0].south,$3x.PointArray[0].east);}}};
function setModal($aR){var $aS=document.getElementById("mapmodal");$aS.mform=$aR;$f($aS);$aT=$aR;};
function closeForm(name){if(name=='mysiteswindow'){$q();return;};if($0V("mapmodal")){hideObj("mapmodal");};if(name=='locationlinkdiv'||name=='feedbackdiv'||name=='extendedfeedbackdiv'){deleteUserPosition();};if(name){hideObj(name);};if(name=='sewindowdiv'){currentSeHtml="";}else if(name=='htmldiv'){currentPlanRegHtml="";}};
function mapModalClick(){var $aS=document.getElementById("mapmodal");if($aS&&$aS.mform){closeForm($aS.mform);$aS.mform=null;}};
function $1S($aU,$a1){if($aU=="mysiteswindow"){var c=document.getElementById("mysiteslist");var v=document.getElementById("mysiteswindow");var $aV=document.getElementById("collectionList");var vh=v.offsetHeight;var top=parseInt(c.style.top,10);var $aW=vh-top-32-32;if($aW>20){c.style.height=$aW;};top=parseInt($aV.style.top,10);$aW=vh-top-32-32;if($aW>20){$aV.style.height=$aW;}}};
function $1T($3M,$aX,$aY,$aZ){var $ab=document.getElementById($3M);var $ac=document.getElementById($aX);var w=getWidth($ab)+$aY;var h=getHeight($ab)+$aZ;var sh=getHeight($ac);var dh=h-sh-$aZ;$ab.style.width=w+"px";$ab.style.height=h+"px";$ac.style.height=(h-dh)+"px";};
function applyMaxLength(name,$b0){var $3x=document.getElementById(name);if($3x){if($3x.value.length>$b0){$3x.value=$3x.value.substring(0,$b0);}}};
function $1U($8u){SideWindow.OpenPage(SW_AREADIV);var $8R=document.getElementById("areaDivision");if($8R&&$8u.areatype){$8R.value=$8u.areatype;}};
function $1V(){$32($b1,"true");};
function $1W(){var $4w=false;var $b2=$33($b1);if($b2&&$b2=="true"){$4w=true;};return $4w;};
function qryVis(){showObj("querydiv");};
function $1X(){if(currentLanguage=='fin'&&String.IsPrintable($b3)&&!$1W()){setTimeout("qryVis();",$b4*1000);}};
function showQuery(){hideObj("querydiv");openUserQuery($b3);$1V();};
function $1Y($8s){var $3x=document.getElementById("messageform");var $b5=document.getElementById("messageCaption");if($b5){$b5.innerHTML=cl_extendedFeedbackThankYouCaption;};$b5=document.getElementById("messageBody");if($b5){$b5.innerHTML=cl_extendedFeedbackThankYouBody;};$b5=document.getElementById("messageWarning");if($b5){$b5.innerHTML=$8s?$8s:"";};$1z("messageform");setModal("messageform");try{var $a2=$3x.scrollHeight;if($a2){$3x.style.height=$a2;}}catch(e){};centerWindow($3x);$f($3x);};
function $1Z(){if(!$b6){var $aw=setTimeout("deleteUserPosition()",$b7);}};
function $20($b8){var $3x=document.getElementById($b8);if($3x){$3x.innerHTML="";}};
function propLink($b9,id){printPage($b9,id);};
function $21($8y){var $7W,$7O;var $7j=0;$0I();hideInfo();var title=String.get_Safe($8y.query.title);var $3x=new SR_Point(title,title,null,null,$8y.query.north,$8y.query.east);$3x.tpid=$8y.query.tpid;$3x.returnurl=$8y.query.returnurl;$3x.set_EditType('ext');if($8y.query.conv)$3x.Conv=$8y.query.conv;var Id=SearchDB.Insert($3x);var $7Q=String.format(cl_getLocationTitle,title);$7O="<span class='mysites'><h3 class='mysites'>"+$7Q+"</h3>";$7O+="</br><div class=\"actionhelp\">"+cl_getLocationHelp+"</div>";var sb=new StringBuilder($7O);if(Id>0){var $8D="searchClick("+$6W+","+Id+");";$8B="</br><a class=\"getlocationrow\" onmouseover=\"doHover(this)\" onmouseout=\"removeHover(this)\" onmousedown=\""+$8D+"\">"+title+"</a>";sb.Append($8B);$8B="<br/><a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" onmousedown=\"JavaScript:moveSite("+$6W+","+Id+", event)\">"+cl_move+"</a>&nbsp;&nbsp;";sb.Append($8B);$8B="<br/><a class=\"bubblelink\" onmouseover=\"doHover(this);\" onmouseout=\"removeHover(this);\" href=\"JavaScript:applyEdit("+$6W+","+Id+")\">"+cl_apply+"</a>";sb.Append($8B);};sb.Append("</span>");$1C(sb.ToString());$0G(true);$0J();showInfo($6W,Id,null,null,true);};
function applyEdit($3E,Id,event){hideInfo();if(event)cancelEventPropagation(event);var $3x=$0i($3E,Id);if($3x){var $5h=$3x.North;var $5i=$3x.East;var $ba=$3x.Conv;var $bb="id="+Id+"&north="+$5h+"&east="+$5i+"&conv="+$ba;$23($bb);}};
function $22(){var $4H=$4I.readyState;if($4H==$4J){ajClu($4I);if(!$3q($4I)){return;};if($4I.responseText.length<2){return;};var $4K=$2u($4I.responseText);if($4K&&$4K.id){var $3x=$0i($6W,$4K.id);if($3x){var $bc=$3x.returnurl;var $bd=$3x.tpid;if(String.IsPrintable($bd))$bc=$bc.replace('{tpid}',$bd);$bc=$bc.replace('{east}',$4K.east);$bc=$bc.replace('{north}',$4K.north);if(String.IsPrintable($bc)){document.location.href=$bc;}}}}};
function $23($bb){var $4A="GET";var $4e=appPath+"/Search.ashx?Op=ConvertCoordinates&"+$bb;$3p("ib",$4A,$4e,"",$22);};
function $24($5i,$9G){var $be=document.getElementById("map");var $8X=new Object();var $bf=Math.round(($5i-centerEast)/Themes[currentTheme].Wupp[zoomLevel]);var $bg=Math.round(($9G-centerSouth)/Themes[currentTheme].Wupp[zoomLevel]);$8X.x=Math.round(mapWidth/2-getLeft($be))+$bf;$8X.y=Math.round(mapHeight/2-getTop($be))-$bg;return $8X;};
function updatePrintSites($bh){if($bh.pinOffsetX)pinOffsetX=$bh.pinOffsetX;if($bh.pinOffsetY)pinOffsetY=$bh.pinOffsetY;var $7c=document.getElementById("mapsites");$7c.innerHTML="";var $7Z;$7Z=$28($bh.LayerDB,true);$7Z+=$28($bh.SearchDB,true);$7Z+=$28($bh.MySitesDB,false);$7c.innerHTML=$7Z;};
function printdrawImagePolyLine($63,$5j,$6x){for(i=0;i<$63.length-1;i++){$6A=$24($63[i].east,$63[i].south);$5F=$24($63[i+1].east,$63[i+1].south);$05($6A.x,$6A.y,$5F.x,$5F.y,$5j);};if($6x!="none"){$6A=$24($63[0].east,$63[0].south);$5F=$24($63[$63.length-1].east,$63[$63.length-1].south);$05($6A.x,$6A.y,$5F.x,$5F.y,$5j);}};
function updatePrintMeterLines($bh,mapMeter){var $6A;var $5F;if($bh.mapMeter.points){updatePrintMeterDistances($bh);$6A=$24($bh.mapMeter.points[0].east,$bh.mapMeter.points[0].south);$06(appPath+"/img/b.gif",parseInt($6A.x-$6y,10),parseInt($6A.y-$6z,10));$2b($bh.mapMeter.points,mapMeter,"rgb(0,203,255)","none",4,"solid",true);}};
function $25($63,$62,$64,$65,$66,$67,$69){var $6w="";var i;var $6u;var $6v;var $6x;var $3F;for(i=0;i<$63.length;i++){$3F=$24($63[i].east,$63[i].south);if(i!=0)$6w=$6w+", ";$6w=$6w+$3F.x+", "+$3F.y;};$6u=document.createElement("v:polyline");$6u.stroked="true";$6v=document.createElement("v:stroke");$6v.opacity="0.75";$6v.color=$64;$6v.weight=$66+"pt";$6v.endcap="round";$6v.dashstyle=$67;$3F=$24($63[0].east,$63[0].south);if($65=="none"){if($69)$06(appPath+"/img/b.gif",$3F.x-$6y,$3F.y-$6z);$6u.filled="false";}else{$6u.filled="true";$6x=document.createElement("v:fill");$6x.opacity="0.5";$6x.color=$65;$6u.appendChild($6x);$6w=$6w+", "+$3F.x+", "+$3F.y;};$6u.points=$6w;$6u.appendChild($6v);$62.appendChild($6u);};
function updatePrintMeterDistances($bh){var $bi=document.getElementById("meterdistances");var $bj="";var $bk;var $6A;var $5F;$bi.innerHTML="";if($bh.mapMeter.points){for(i=1;i<$bh.mapMeter.points.length;i++){$6A=$24($bh.mapMeter.points[i-1].east,$bh.mapMeter.points[i-1].south);$5F=$24($bh.mapMeter.points[i].east,$bh.mapMeter.points[i].south);$bk=Math.round(Math.sqrt(Math.pow($bh.mapMeter.points[i-1].east-$bh.mapMeter.points[i].east,2)+Math.pow($bh.mapMeter.points[i-1].south-$bh.mapMeter.points[i].south,2)))+" m";$bj+="<div class='box_metertext' style='position:absolute; top:"+Math.round(($6A.y+$5F.y)/2.0-7)+"; left:"+Math.round(($6A.x+$5F.x)/2.0-10)+";'>&nbsp;"+$bk+"&nbsp;</div>";};$bi.innerHTML=$bj;if($bh.mapMeter.points.length>1){var $94=document.getElementById("tooltipdiv");$94.style.visibility="visible";$94.style.left=$5F.x+"px";$94.style.top=$5F.y+"px";$94.innerHTML=String.format($bh.cl_totalDistance,Math.round($bh.meterDistance));}}};
function swapVisualizations(){var $bl=document.getElementById("visualcheck");var $bm=document.getElementById("visualizations");var $94=document.getElementById("tooltipdiv");var $bn=document.getElementById("idDynamicContent");if($bl.checked){$bm.style.visibility="visible";$94.style.visibility="visible";$bn.style.visibility="visible";}else{$bm.style.visibility="hidden";$94.style.visibility="hidden";$bn.style.visibility="hidden";};if($2e()){var $6b=$G(true);$2g($6b,$bl.checked?"visible":"hidden")}};
function TXWinitPrintPage($bo,$bp,$bq,$br,$bs){CheckBrowser(true);$6g=0;pinOffsetX=$bo.pinOffsetX;pinOffsetY=$bo.pinOffsetY;$bt="print";var $be=document.getElementById("map");var $bu=document.getElementById("mappics");mapMeter=document.getElementById("mapmeter");Themes=$bo.Themes;SVGRMin=$bo.SVGRMin;SVGRMax=$bo.SVGRMax;if($bp&&$bq){centerSouth=$bp;centerEast=$bq;}else{centerSouth=$bo.centerSouth;centerEast=$bo.centerEast;};zoomLevel=$bo.zoomLevel;currentTheme=$bo.currentTheme;if($bs){var $bv=$1o($bs);if($bv>=0)currentTheme=$bv;};if($br||$bs){zoomLevel=$2Y($br);};var $bw=Math.floor((centerEast-(mapWidth/ 2.0)* Themes[currentTheme].Wupp[zoomLevel])/ $bo.imageSize/Themes[currentTheme].Wupp[zoomLevel]);var $bx=Math.floor((centerSouth+(mapHeight/ 2.0)* Themes[currentTheme].Wupp[zoomLevel])/ $bo.imageSize/Themes[currentTheme].Wupp[zoomLevel]);var $by=Math.round((($bw)*$bo.imageSize+mapWidth/2.0)*Themes[currentTheme].Wupp[zoomLevel]);var $bz=Math.round((($bx+1)*$bo.imageSize-mapHeight/2.0)*Themes[currentTheme].Wupp[zoomLevel]);var dy=Math.round((centerSouth-$bz)/Themes[currentTheme].Wupp[zoomLevel]);var dx=Math.round((-centerEast+$by)/Themes[currentTheme].Wupp[zoomLevel]);var $6E;$be.style.left=dx+"px";$be.style.top=dy+"px";var x=0;var y=0;var $bA="http://www.w3.org/1999/xlink";var $bB=document.getElementById("svgmappics");$J();var $bC=25;for(i=0;i<$bC;i++){var $6E=$bo.getTileUrl(($bw+x),($bx-y),Themes[currentTheme].Name,zoomLevel,$bo.layerCommand);if($2e()){var $8N=document.createElementNS($5V,"image");$8N.setAttributeNS(null,"x",x*256+"");$8N.setAttributeNS(null,"y",y*256+"");$8N.setAttributeNS(null,"width","256");$8N.setAttributeNS(null,"height","256");$8N.setAttributeNS($bA,"xlink:href",$6E);$8N.$eR=true;$5T.appendChild($8N);}else{$26($bu,x*256,y*256,$6E);};y++;if(y>=5){x++;y=0;}};if($2e()&&$bB)$bB.appendChild($5T);setScaleText();updatePrintSites($bo);updatePrintMeterLines($bo,mapMeter);$31();var $bD=null;if($bo.currentPlanRegHtml){if(String.IsPrintable($bo.currentPlanRegHtml)&&$bo.cl_planRegulations){$bD="<h3 class=\"resulttable\">"+$bo.cl_planRegulations+"</h3></br>";$bD+=$bo.currentPlanRegHtml;}else{$bD=$bo.currentPlanRegHtml;};$bD+="<br/>";};if($bo.currentSeHtml){if(!$bD)$bD="";if(String.IsPrintable($bo.currentSeHtml)&&$bo.cl_freeSitesSearchResults){$bD+="<h3 class=\"resulttable\">"+$bo.cl_freeSitesSearchResults+"</h3></br>";$bD+=$bo.currentSeHtml;}else{$bD+=$bo.currentSeHtml;}};if($bD)$27($bD);};
function $26(parent,$bE,$bF,$6E){var $47=document.createElement("img");$47.style.position="absolute";$47.style.top=$bF+"px";$47.style.left=$bE+"px";$47.style.width="256px";$47.style.height="256px";$47.src=$6E;parent.appendChild($47);};
function $27($7O){var $4t=document.getElementById("idDynamicContent");if($4t)$4t.innerHTML=$7O;};
function preparePrint($4G){var $bG="";var $bH=document.printForm.notes.value;if($bH!=$4G){$bG=$bH;};var $90=document.getElementById("idPrintNotes");if($90){try{if($4n){$90.innerHTML=String.escapeHTML($bG);}else{$90.innerText=$bG;}}catch(e){}}};
function $28(DB,$bI){var $7Z;var sb=new StringBuilder();var $81=document.getElementById("mapmeter");var $87=$K();var $88=$L();if($bI){var $8a=SVGRMin?SVGRMin:0.01;if(SVGRMax){var $76=Themes[currentTheme].Wupp[zoomLevel];if($76<$8a||$76>SVGRMax){$87=false;$88=false;}}};for(var Id in DB.hashtable){var $3x=DB.hashtable[Id];if($0h($3x)){if($3x.PointArray){var $82;if($3x.get_Filled()){$82=$3x.FillColor?$3x.FillColor:$72;}else{$82="none";};if($87||$88||$3x.get_AV()){var $83=$3x.LineColor?$3x.LineColor:$71;var $84=$3x.LineWidth?$3x.LineWidth:$74;var $85=$3x.LineType?$3x.LineType:$73;$2b($3x.PointArray,$81,$83,$82,$84,$85,false);}else{$7Z=$2c($3x);sb.Append($7Z);}}else{$7Z=$29($3x);sb.Append($7Z);}}};return sb.ToString();};
function $29($3x){var $8c;if(!$3x.Image||$3x.Image=='undefined')$8c=appPath+"/img/point.gif";else $8c=$3x.Image;var $3F=$24($3x.East,$3x.North);var x=$3F.x;var y=$3F.y;if($3x.PX)x-=$3x.PX;else x-=pinOffsetX;if($3x.PY)y-=$3x.PY;else y-=pinOffsetY;var $7Z="<div style='position: absolute; top: "+y+"px; left: "+x+"px;'><img border='0' src='"+$8c+"'></div>";return $7Z;};
function $2a($3x,$3F,$8c){var $7Z="<div style='position: absolute; top: "+($3F.y-12)+"px; left: "+($3F.x-12)+"px;'><img border='0' src='"+$8c+"'></div>";return $7Z;};
function $2b($63,$62,$64,$65,$66,$67,$69){if($5W){$25($63,$62,$64,$65,$66,$67,$69);}else if($2f()){$2d($63,$62,$64,$65,$66,$67,$69);}else{printdrawImagePolyLine($63,$62,$65);}};
function $2c($3x){var $4K="";if($3x.PointArray){var cp=$3x.get_CenterPoint(false);var $3F=$24(cp.x,cp.y);$4K=$2a($3x,$3F,$3x.Image);};return $4K;};
function $2d($63,$62,$64,$65,$66,$67,$69){var $6b=$G(true);$62=document.getElementById("svgmappics");var $bJ="M";var $3F;var $6i;for(i=0;i<$63.length;i++){$3F=$24($63[i].east,$63[i].south);if(i==0){$bJ=$bJ+($3F.x+$6g)+","+($3F.y+$6g);}else{$bJ=$bJ+" L"+($3F.x+$6g)+","+($3F.y+$6g);}};$6i=document.createElementNS($5V,"path");if($65!="none"){$3F=$24($63[0].east,$63[0].south);$bJ=$bJ+" L"+($3F.x+$6g)+","+($3F.y+$6g);$6i.setAttributeNS(null,"stroke-width",$66+"px");}else{$6i.setAttributeNS(null,"stroke-width",$66+"px");};$6i.setAttributeNS(null,"d",$bJ);$6i.setAttributeNS(null,"stroke",$64);$6i.setAttributeNS(null,"stroke-opacity",0.75);$6i.setAttributeNS(null,"stroke-linecap","round");$6i.setAttributeNS(null,"stroke-linejoin","round");$6i.setAttributeNS(null,"fill",$65);$6i.setAttributeNS(null,"fill-opacity",0.5);$6i.setAttributeNS(null,"overflow","visible");var $6r=$X($67);$6i.setAttributeNS(null,"stroke-dasharray",$6r);$V($6b,$6i,$62);};
function $2e(){if($5X&&$4n)return true;return false;};
function $2f(){if($5X&&!$6j)return true;return false;};
function $2g($6s,$bK){if($6s){for(var i=0;i<$6s.childNodes.length;i++){if(!$6s.childNodes[i].$eR)$6s.childNodes[i].style.visibility=$bK;}};return false;};
function $2h(){var $4H=seReq.readyState;if($4H==$4J){ajClu(seReq);if(!$3q(seReq))return;hideObj("FreeSites_searchengineupddiv");deleteUserPosition();var $9j=seReq.responseText;alert($9j);}};
function $2i(){var $4H=seReq.readyState;if($4H==$4J){ajClu(seReq);if(!$3q(seReq)){return;};var $4B=seReq.responseText;if($4B.length<2){return;};var $4K=$2u($4B);if($bt){if($bt=='print'){$27($4K.html);}}else{$2j($4K);}}};var currentSeHtml=null;
function $2j($4K){if($4K.vis.length>0){for(i=0;i<$4K.vis.length;i++){if($4K.vis[i]){var $bL="";if($4K.vis[i].url){$bL=$4K.vis[i].url;}else if($4K.vis[i].urlid){$bL=$2o($4K.vis[i].urlid);};var $3x=new SR_Point($4K.vis[i].tip,null,$bL,$4K.vis[i].image,$4K.vis[i].north,$4K.vis[i].east);var id=SearchDB.Insert($3x);if($4K.onmap){showSite($6W,id,null,null,true);}else{}}};if($4K.setarea){if(!$4K.onmap){var $7X=$4K.width;var $7Y=$4K.height;centerEast=$4K.meast;centerSouth=$4K.mnorth;zoomLevel=$2X($7X,$7Y);$2V(true);}}else{updateSites();}};if($4K.html!=null&&$4K.html.length>0){showseSites($4K.html);};currentSeHtml=$4K.html;};
function searchEngineSearch($3u,$bM){var $4e=appPath+"/SearchEngine.ashx?Op=s"+$c($3u);if($3u.InsideMap.checked){$4e+=$1m();};$3p("se","GET",$4e,"",$2i);return true;};
function $2k(){var $4H=seReq.readyState;if($4H==$4J){ajClu(seReq);if(!$3q(seReq)){return;};var $8t=document.getElementById("FreeSites_searchform");$8t.innerHTML=seReq.responseText;SideWindow.OpenPage(SW_SEARCHENGINE);}};
function $2l(){var $4H=seReq.readyState;if($4H==$4J){ajClu(seReq);if(!$3q(seReq)){return;};var $8t=document.getElementById("FreeSites_searchform");$8t.innerHTML=seReq.responseText;$1z("FreeSites_searchenginediv");try{var $3u=document.seSearchForm;if($bN){var $bO=$bN.length;if($bO>0){var e;for(var i=0;i<$bO;i++){var element=$3u[$bN[i].name];switch(element.type.toLowerCase()){case 'text':case 'textarea':if($bN[i].value){element.value=$bN[i].value;};break;case 'checkbox':case 'radio':if($bN[i].value){element.checked=$bN[i].value;};break;case 'select-one':if($bN[i].value){for(e=0;e<element.length;e++){var $4j=element.options[e];if($4j.value==$bN[i].value){$4j.selected=true;break;}}};break;case 'select-multiple':for(e=0;e<element.length;e++){var $4j=element.options[e];if($bN[i].value){if($4j.value==$bN[i].value){$4j.selected=true;}else{$4j.selected=false;}}else if($bN[i].values){var $bP=false;for(var s=0;s<$bN[i].values.length;s++){if($4j.value==$bN[i].values[s]){$bP=true;break;}};$4j.selected=$bP;}};break;}}}}}catch(e){};showObj("FreeSites_searchenginediv");SideWindow.OpenPage(SW_SEARCHENGINE);}};var $bN=null;
function showFreeSitesSearch($bQ){var $8t=document.getElementById("FreeSites_searchform");if($8t&&$8t.innerHTML.length>100){SideWindow.OpenPage(SW_SEARCHENGINE);}else{var $4e=appPath+"/SearchEngine.ashx?SearchClass="+$bQ;$3p("se","GET",$4e,"",$2k);}};
function freeSiteSearchLink($4K){var $bQ=$4K.query.searchclass;if(!$bQ){$bQ="FreeSites";};var $4e=appPath+"/SearchEngine.ashx?SearchClass="+$bQ;$3p("se","GET",$4e,"",$2l);try{$bN=$4K.query.fields;}catch(e){$bN=null;}};
function $2m(event){if($4c==true||$6j==true){window.event.cancelBubble=true;};if($91==true&&event){event.stopPropagation();}};
function $2n($3x){if(typeof $3x=="string"){$3x=document.getElementById($3x);};if($3x){if($91){$3x.addEventListener('DOMMouseScroll',$2m,false);};if($4c==true||$6j==true){$3x.onmousewheel=$2m;}}};
function showseSites($7O){if($7O){var $4t=document.getElementById("sesearchresults");if($4t){$4t.innerHTML=$7O;}};var $3x=document.getElementById("sewindowdiv");$f($3x);$2n($3x);};
function SearchEngineCmd($bR){var $4e=appPath+"/SearchEngine.ashx?Op=c&"+$bR;$3p("se","GET",$4e,"",$2i);};
function SearchEnginePropertiesCmd($bS){try{var Url=$2o($bS);var $bT=window.open(Url,'seProperties');}catch(e){}};
function $2o($bS){var Url=appPath+"/SearchEngine.ashx?Op=p&Theme="+$2s(Themes[currentTheme].Name)+"&Properties="+$bS+layerCommand;return Url;};
function $2p(){var $4H=seReq.readyState;if($4H==$4J){ajClu(seReq);if(!$3q(seReq)){return;};var $bU=document.getElementById("FreeSites_updateform");if($bU){$bU.innerHTML=seReq.responseText;};var $bV=document.getElementById("FreeSites_searchengineupdbox");showObj("FreeSites_searchengineupddiv");}};
function SearchEngineUpdateCmd($bR){var $4e=appPath+"/SearchEngine.ashx?Op=c&"+$bR;$3p("se","GET",$4e,"",$2p);};var $bW;
function SearchEngineInsertCmd($bX){$bW=$bX;$8x="searchengine";startPositionSelect();};
function $2q(X,Y){var $4e=appPath+"/SearchEngine.ashx?Op=c&Update=-1&X="+X+"&Y="+Y+"&SearchClass="+$bW;$3p("se","GET",$4e,"",$2p);};
function LimitLength($bY,$b0){if($bY.value.length>$b0){$bY.value=$bY.value.substring(0,$b0);}};
function searchEngineUpdate($3u,$bZ){var $4w=true;if($bZ){if($bZ.length%2==0){for(var i=0;i<$bZ.length;i+=2){var $c0=$3u[$bZ[i]].value;if($c0==null||$c0.length<1){alert($bZ[i+1]);$4w=false;}}}};if($4w==true){var $4e=appPath+"/SearchEngine.ashx?Op=u"+$c($3u);$3p("se","GET",$4e,"",$2h);};return $4w;};var SW_THEMES=0;var SW_RESULTS=1;var SW_AREADIV=2;var SW_MEASURED=3;var SW_SEARCHENGINE=4;var $c1=0;var $c2=1;var $c3=2;
function SWPage($4l,name,$c4){this.Type=$4l;this.Name=name;this.Visible=$c4;};
function SWindow($c5){this.Pages=new Array();this.ContainerName=$c5;this.Active=-1;this.Visible=true;};SWindow.prototype.Insert=function($c6){var $c7=document.getElementById("tabheader"+$c6.Name);if($c7){this.Pages.push($c6);}};SWindow.prototype.$eS=function($4l){for(var i=0;i<this.Pages.length;i++){if(this.Pages[i].Type==$4l){return i;}};return -1;};SWindow.prototype.$eT=function(){var $7j=0;for(var i=0;i<this.Pages.length;i++){if(this.Pages[i].Visible){$7j++;}};return $7j;};SWindow.prototype.HidePage=function($4l,$c8){var i=this.$eS($4l);if(i>=0){if(this.Pages[i].Visible){this.Pages[i].Visible=false;if(this.Active==i){this.$eU(i);};this.Refresh();}}};SWindow.prototype.OpenPage=function($4l){var i=this.$eS($4l);if(i>=0){if(this.Pages[i].Visible==false){this.Pages[i].Visible=true;};this.Active=i;this.Toggle(true);this.Refresh();}};SWindow.prototype.$eU=function($c9){for(var i=0;i<this.Pages.length;i++){if(this.Pages[i].Visible==true&&i!=$c9){this.Active=i;return i;}};return -1;};SWindow.prototype.ClosePage=function($4l){var i=this.$eS($4l);if(i>=0){this.$eU(i);this.Refresh();}};SWindow.prototype.ExistPage=function($4l){var i=this.$eS($4l);return i>=0?true:false;};SWindow.prototype.Refresh=function($4l){var $ca=document.getElementById("tabheaderthemes");var $cb=getHeight($ca);var $c7;var $cc;var $cd=document.getElementById(this.ContainerName);var $ce=getHeight($cd);var $7H=this.$eT();var $cf=0;var $cg=$ce-($7H*$cb)-1;for(var i=0;i<this.Pages.length;i++){$c7=document.getElementById("tabheader"+this.Pages[i].Name);$cc=document.getElementById("tabcontent"+this.Pages[i].Name);if(this.Pages[i].Visible){$c7.style.visibility="visible";if(i==this.Active){$cc.style.visibility="visible";$cc.style.top=(($cf+1)*$cb)+"px";$cc.style.height=$cg+"px";$cc.style.overflow="auto";}else{$cc.style.visibility="hidden";$cc.style.height="1px";};if(i<=this.Active){$c7.style.bottom="";$c7.style.top=(($cf-0)*$cb)+"px";}else{$c7.style.top="";$c7.style.bottom=(($7H-$cf-1)*$cb)+"px";};$cf++;}else{$c7.style.visibility="hidden";$cc.style.visibility="hidden";}};if($6j){var $6H=document.getElementById("tabroot");$6H.style.visibility="hidden";$6H.style.visibility="visible";}};SWindow.prototype.Resize=function(){var $cd=document.getElementById(this.ContainerName);if($cd){var $6H=document.getElementById("tabroot");var $ch=getTop($6H);var $ci=$0Y()-$ch-30;if($ci<50){$ci=50;};$cd.style.height=$ci+"px";$6H.style.height=$ci+15+"px";this.Refresh();}};SWindow.prototype.Toggle=function(){var $9r;if(arguments.length==0){$9r=this.Visible?false:true;}else{$9r=arguments[0];};if($9r==this.Visible){return;};hideInfo();var $cj=document.getElementById("toggleimg");var $6H=document.getElementById("tabroot");var menubar=document.getElementById("menubardiv");if(!$9r&&getLeft($6H)>=0){$cj.src=appPath+"/img/open_wnd.gif";$cj.title=cl_openSideWindow;$6H.style.left="-240px";if(menubar){menubar.style.left="1px";};$99.style.left="0px";}else{$cj.src=appPath+"/img/shut_wnd.gif";$cj.title=cl_closeSideWindow;$6H.style.left="0px";if(menubar){menubar.style.left="239px";};$99.style.left="238px";};$2P();$2Q();this.Visible=$9r;this.Resize();};
function $2r($c5){SideWindow=new SWindow($c5);if(!$4T){SideWindow.Insert(new SWPage(SW_THEMES,"themes",true));};SideWindow.Insert(new SWPage(SW_RESULTS,"results",false));if(!$4T){SideWindow.Insert(new SWPage(SW_MEASURED,"measure",true));SideWindow.Insert(new SWPage(SW_AREADIV,"areadiv",true));SideWindow.Insert(new SWPage(SW_SEARCHENGINE,"searchengine",true));SideWindow.OpenPage(SW_THEMES);};SideWindow.Resize();};
function StringBuilder($77){this.sts=new Array("");this.Append($77);};StringBuilder.prototype.Append=function($77){if($77)this.sts.push($77);};StringBuilder.prototype.Clear=function(){this.sts.length=1;};StringBuilder.prototype.ToString=function(){return this.sts.join("");};String.prototype.stripSpaces=function(){return this.replace(/\s/g,"");};String.escapeHTML=function($7t,b){if(!$7t)return "";if($7t.indexOf("<")>=0||$7t.indexOf(">")>=0||$7t.indexOf("&")>=0){var d=document.createElement('div');var $4w="";if(b){var rw=$7t.split("<br/>");for(var i=0;i<rw.length;i++){var t=document.createTextNode(rw[i]);d.appendChild(t);$4w+=d.innerHTML;if(i!=(rw.length-1))$4w+="<br/>";d.removeChild(t);}}else{var t=document.createTextNode($7t);d.appendChild(t);$4w=d.innerHTML;d.removeChild(t);};return $4w;}else{return $7t;}};String.removeTags=function($7t){return $7t.replace(/<\/?[^>]+>/gi,'');};String.unescapeHTML=function($7t){var d=document.createElement('div');d.innerHTML=String.removeTags($7t);return d.childNodes[0]?d.childNodes[0].nodeValue:'';};String.format=function(){if(arguments.length<1)return null;var $8k=arguments[0];for(var i=1;i<arguments.length;i++){var re=new RegExp('\\{'+(i-1)+'\\}','gm');$8k=$8k.replace(re,arguments[i]);};return $8k;};String.get_Safe=function(s){if(!s||s=='undefined')return "";else return s;};String.IsPrintable=function($77){if($77!=null&&$77!='undefined'&&$77.length>0)return true;else return false;};
function $2s(s){return encodeURIComponent(s);};
function $2t(s){if(s)return encodeURIComponent(s);else return "";};
function $2u(s){var $4K=eval('('+s+')');return $4K;};String.GetNetNonWhiteSpace=function($7t){if($7t){for(var i=0;i<$7t.length;i++){var ch=$7t.charAt(i);if(ch!=' ')return ch;}};return null;};String.ReadField=function($7t){var $4w={"t":"","end":null};if($7t){for(var i=0;i<$7t.length;i++){var ch=$7t.charAt(i);if(ch!=' '){$7t=$7t.substr(i);break;}};for(var i=0;i<$7t.length;i++){var ch=$7t.charAt(i);if(ch!=' ')$4w.t+=ch;else{$4w.end=$7t.substr(i+1);break;}}};return $4w;};String.ReadFieldTerm=function($7t,$ck){var $4w={"t":"","end":null};if($7t){for(var i=0;i<$7t.length;i++){var ch=$7t.charAt(i);if(ch!=' '&&ch!=$ck){$7t=$7t.substr(i);break;}};for(var i=0;i<$7t.length;i++){var ch=$7t.charAt(i);if(ch!=$ck)$4w.t+=ch;else{$4w.end=$7t.substr(i+1);break;}}};return $4w;};String.GetNextField=function($7t){var p=String.GetNetNonWhiteSpace($7t);if(p=='\'' || p == '\"'){return String.ReadFieldTerm($7t,p);}else{return String.ReadField($7t);}};String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};
function d2h($77){var h=($77-0).toString(16);return h.length>1?h:'0'+h;};Array.prototype.remove=function(s){for(var i=0;i<this.length;i++){if(s==this[i])this.splice(i,1);}};Array.prototype.Find=function(s){for(var i=0;i<this.length;i++){if(s==this[i])return true;};return false;};Object.prototype.clone=function($cl){if(!this.constructor)return null;var $cm=new this.constructor();for(var $cn in this){if(!$cl){$cm[$cn]=this[$cn];}else if(typeof this[$cn]=='object'){if(this[$cn])$cm[$cn]=this[$cn].clone($cl);else $cm[$cn]=null;}else{$cm[$cn]=this[$cn];}};return $cm;};
function $2v($4L){var $4w={"name":"","value":""};var a1=$4L.indexOf("=");if(a1>=0){$4w.name=$4L.slice(0,a1);$4w.value=$4L.slice(a1+1);};return $4w;};
function $2w($co){var msg=$co;try{eval("msg=cl_"+$co);}catch(e){msg=$co;};return msg;};var $4T=false;var $6S=false;
function $2x($cp){$4T=true;if($cp){$6S=true;}};
function $2y(){if(!$6S){$cq=document.getElementById("linecolor").value;$cr=document.getElementById("fillcolor").value;$cs=document.getElementById("lineweight").value;$ct=document.getElementById("dashtype").value;}else{var $cu=document.getElementById("infowindowdiv");if($cu&&$cu.data){$cq=$cu.data.LineColor;$cr=$cu.data.FillColor;$cs=$cu.data.LineWidth;$ct=$cu.data.LineType;};if(!$cq)$cq="red";if(!$cr)$cr="blue";if(!$cs)$cs=2;if(!$ct)$ct="solid";}};var $cq='red';var $cs=2;var $ct='solid';var $cr='blue';var $bt=null;var $b7=5000;var $b6=true;var $3t;var $cv=256;var $cw=200;var $cx=true;var $cy=300;var subsite=null;var curOvrTInd;var $8x="";var zoomLevel=2;var curOvrZLvl;var layerCommand="";var toolMode="pan";var $6I="pan";var imageSize=256;var $44;var $cz;var mapMeter;var $8O;var $6l;var $6m;var $3M;var $aX;var $99;var $43;var $4a;var $4b;var $6L;var $6M;var $cA;var $cB;var $cC;var $cD;var $cE=0;var $cF=0;var centerSouth;var centerEast;var $3y;var $3z;var $cG;var $cH;var $cI;var $cJ;var $cK;var $cL;var $6j=false;var $4c=false;var $91=false;var $4n=false;var $6k=false;var $cM=false;var $cN=false;var slideActive=false;var zoomPending=false;var meterDistance;var $cO=true;var $8M=false;var $6g=30000;var $9w;var pinOffsetX=9;var pinOffsetY=29;var $6y=8;var $6z=7;var $5W=false;var $5X=false;var $cP;var $cQ;var $61=false;var $cR=0.0;var $b3=null;var $b4=100;var $b1="userquery0801";var $aB=true;
function TXWSetAttributes(){var $4w=true;var i,a=TXWSetAttributes.arguments;var $7o,$77;for(i=0;i<a.length;i+=2){$7o=a[i];if((i+1)<a.length){$77=a[i+1];if(TXWSetAttribute($7o,$77)!=true)$4w=false;}};return $4w;};
function TXWSetAttribute($7o,$77){var $4w=true;if($7o=='pinoffset-n'){pinOffsetY=$77;}else if($7o=='pinoffset-e'){pinOffsetX=$77;}else if($7o=='imgemulation-search'){$61=$77;}else if($7o=='zoommarginal'){$cR=$77;}else if($7o=='userquery-url'){$b3=$77;}else if($7o=='userquery-timeout'){$b4=$77;}else if($7o=='userposition-keep'){$b6=$77;}else if($7o=='mmove-timer'){$cx=$77;}else if($7o=='mmove-timer-intv'){$cy=$77;}else if($7o=='adv-search-expand'){$aB=$77;}else{$4w=false;};return $4w;};
function $2z($cS,Id){$cP=$cS;$cQ=Id;};
function CheckBrowser($cT){var $4K=true;var $cU=navigator.userAgent.toLowerCase();if($cU.indexOf("msie")>=0){$4c=true;};if($cU.indexOf("netscape6/")>=0||$cU.indexOf("gecko")>=0){$91=true;};if($cU.indexOf("firefox")>=0){$4n=true;};if($cU.indexOf("navigator")>=0){$cM=true;};if($cU.indexOf("opera")!=-1){$6j=true;};if($cU.indexOf("safari")!=-1){$6k=true;if($cU.indexOf("chrome")!=-1){$cN=true;}};if($4c){$5W=true;}else if($4n||$6j||$6k){if($6j||$6k){$6g=2048;var $cV=document.getElementById("svgmeter");if($cV){$cV.style.left=-$6g+"px";$cV.style.top=-$6g+"px";};$cV=document.getElementById("dynsvgmeter");if($cV){$cV.style.left=-$6g+"px";$cV.style.top=-$6g+"px";}};$5X=$J();};$cO=false;return $4K;};var $cW=null;var $cX=null;var $cY;
function $2A(){if($4T){return;};if($cx){$2H($2C);}else{$2H($2D);}};
function $2B(){if($4T){};if($cx){$2I($2C);if($cY){clearTimeout($cY);$cY=null;}}else{$2I($2D);}};
function $2C(event){if($cY){$cW=$14(event);$cX=$15(event);}else{$cY=setTimeout("shC();",$cy);}};
function shC(){$cY=null;if($cW&&$cX){$2E($cW,$cX);}};
function $2D(event){var $8S=$14(event);var $8T=$15(event);$2E($8S,$8T);};
function $2E($8S,$8T){var $cZ=Themes[currentTheme].Wupp[zoomLevel];$4a=$10();$4b=$11();var $d0=getImageArea($43);var centerEast=Math.round((($cC+1)*imageSize+$4a/2.0-($6l+imageSize+$d0.left))*$cZ);var centerSouth=Math.round((($cD)*imageSize-$4b/2.0+($6m+imageSize+$d0.top))*$cZ);var $6Q=centerEast+Math.round(($8S-$4a/2)*$cZ);var $6R=centerSouth+Math.round((-$8T+$4b/2)*$cZ);var $5k=$y($6R,$6Q);var $bk=document.getElementById("coordinatediv");if($bk){$bk.innerHTML=$5k;}};
function $2F(){$0q();};var $d1=new Array();
function $2G(event){var l=$d1.length;for(var i=0;i<l;i++){if($d1[i]){($d1[i])(event);}}};
function $2H($d2){if($d1.Find($d2)==false){$d1.push($d2);}};
function $2I($d2){$d1.remove($d2);};var $d3=1000;var $d4=false;var $d5=null;
function sWLT(){if($d4==false&&$d5==null){$d5=setTimeout("sWL(true);",$d3);}};
function sWL($d6,$4E){if($d5){clearTimeout($d5);$d5=null;};if(!$4E){if($d6==$d4)return;};$d4=$d6;if($91){if($6S){if($d6)$99.addEventListener('DOMMouseScroll',doMouseWheel,false);else $99.removeEventListener('DOMMouseScroll',doMouseWheel,false);}else window.addEventListener('DOMMouseScroll',doMouseWheel,false);};if($4c==true||$6j==true||$6k){if($6S){if($d6)$99.onmousewheel=doMouseWheel;else $99.onmousewheel=null;}else window.onmousewheel=document.onmousewheel=doMouseWheel;}};
function handleMouseDown(event,id,$d7){hideContextMenu();var $d8=false;if(event){if($4c&&event.button>1||($4n||$91)&&event.which>1)$d8=true;};hideInfo();if(slideActive==false&&!$d8){$3M=id;if($d7){$aX=$d7;}else{$aX=null;};if(id=="map"&&toolMode=="distance"){var $3F;var $d0;var $8S=$14(event);var $8T=$15(event);$d0=getImageArea($43);centerEast=Math.round((($cC+1)*imageSize+$4a/2.0-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-$4b/2.0+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);var $6Q=centerEast+Math.round(($8S-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $6R=centerSouth+Math.round((-$8T+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);var x=$8S-$6l;var y=$8T-$6m;if(mapMeter.points==null){mapMeter.points=new Array;$06(appPath+"/img/b.gif",parseInt(x-$6y,10),parseInt(y-$6z,10));}else{$3F=$2K(mapMeter.points[mapMeter.points.length-1].east,mapMeter.points[mapMeter.points.length-1].south);if(!$K())$05($3F.x,$3F.y,x,y);};mapMeter.points[mapMeter.points.length]=new Object();mapMeter.points[mapMeter.points.length-1].east=$6Q;mapMeter.points[mapMeter.points.length-1].south=$6R;updateDistance();updateMeterDistances(mapMeter.points);$Q(true,"meter");$M(true,mapMeter,mapMeter.points,"rgb(0,203,255)","none",4,"solid","meter",true);var $d9=0.05;if(($8S<$4a*$d9||$8S>$4a-$4a*$d9)&&(($8T-27)<$4b*$d9||$8T>$4b-$4b*$d9)){startSlide(Math.round($4a/2.0)-$8S,Math.round($4b/2.0)-$8T,2);}else if($8S<$4a*$d9||$8S>$4a-$4a*$d9){startSlide(Math.round($4a/2.0)-$8S,0,2);}else if(($8T-27)<$4b*$d9||$8T>$4b-$4b*$d9){startSlide(0,Math.round($4b/2.0)-$8T,2);};updateTooltip(event);}else if(id=="map"&&(toolMode=="drawpolyline"||toolMode=="drawpolygon")){var $3F;var $d0;var $8S=$14(event);var $8T=$15(event);$d0=getImageArea($43);centerEast=Math.round((($cC+1)*imageSize+$4a/2.0-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-$4b/2.0+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);var $6Q=centerEast+Math.round(($8S-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $6R=centerSouth+Math.round((-$8T+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);var x=$8S-$6l;var y=$8T-$6m;if($8O.points==null){$8O.points=new Array;}else{$3F=$2K($8O.points[$8O.points.length-1].east,$8O.points[$8O.points.length-1].south);if(!$K()){$05($3F.x,$3F.y,x,y);}};$8O.points[$8O.points.length]=new Object();$8O.points[$8O.points.length-1].east=$6Q;$8O.points[$8O.points.length-1].south=$6R;$2y();$8O.linecolor=$cq;$8O.fillcolor=$cr;$8O.lineweight=$cs;$8O.dashtype=$ct;$Q(true,"drawing");if($5W){$Q(true,"guide");}else if($5X){$Q(true,"guide");};$M(true,mapMeter,$8O.points,$cq,$8M?$cr:"none",$cs,$ct,"drawing",false,true);var $d9=0.05;if(($8S<$4a*$d9||$8S>$4a-$4a*$d9)&&(($8T-27)<$4b*$d9||$8T>$4b-$4b*$d9)){startSlide(Math.round($4a/2.0)-$8S,Math.round($4b/2.0)-$8T,2);}else if($8S<$4a*$d9||$8S>$4a-$4a*$d9){startSlide(Math.round($4a/2.0)-$8S,0,2);}else if(($8T-27)<$4b*$d9||$8T>$4b-$4b*$d9){startSlide(0,Math.round($4b/2.0)-$8T,2);};$2H(drawLine);$44.onmouseout=function(){$F();};}else if(id=="map"&&(toolMode=="createsite"||toolMode=="createaddress"||toolMode=="movesite")){var $8S=$14(event);var $8T=$15(event);var $6Q=centerEast+Math.round(($8S-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $6R=centerSouth+Math.round((-$8T+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);var $90=document.getElementById("userposition");var $3F=$2K($6Q,$6R);if(toolMode=="createsite"){$3y=Math.round($6R);$3z=Math.round($6Q);showSiteProperties(event);}else if(toolMode=="createaddress"){$3y=Math.round($6R);$3z=Math.round($6Q);$b(null,null,$3t,event);}else if(toolMode=="movesite"){var $3x=$0i($cP,$cQ);if($3x){$3x.Move($6R,$6Q,$cQ);$0j($cP,true);$0I();$1k();$0G(true);$0J();clearToolstate();startPan();}};cancelEventPropagation(event);}else if(id=="map"&&toolMode=="zoom"){$6L=$14(event);$6M=$15(event);document.onmousemove=drawZoom;document.onmouseup=doZoom;if($6j==true||$91==true){document.onmouseout=testMouseOut;};cancelEventPropagation(event);}else if(id=="map"&&toolMode=="selectposition"){var $8S=$14(event);var $8T=$15(event);var $6Q=centerEast+Math.round(($8S-$4a/2)*Themes[currentTheme].Wupp[zoomLevel]);var $6R=centerSouth+Math.round((-$8T+$4b/2)*Themes[currentTheme].Wupp[zoomLevel]);var $90=document.getElementById("userposition");var $3F=$2K($6Q,$6R);$3y=Math.round($6R);$3z=Math.round($6Q);$90.style.left=$3F.x-10+"px";$90.style.top=$3F.y-30+"px";$f($90);setStatus(cl_positionSelected);$0X();$0W();$1i();if($8x==""){}else if($8x=="searchengine"){$2q($3y,$3z);}else if($8x=="feedback"){$1H($3y,$3z);}else if($8x=="property"){$1F();}else if($8x=="link"){$1A($3y,$3z);}else if($8x=="areadivision"){$1M($3y,$3z);}else if($8x=="emodel"){$0O($3y,$3z);}else if($8x=="external"){if($da)$da($3y,$3z);};$8x="";cancelEventPropagation(event);}else{$6L=$cA=$14(event);$6M=$cB=$15(event);$2B();document.onmousemove=doPan;document.onmouseup=stopPan;if($6j==true||$91==true)document.onmouseout=testMouseOut;if(id=="mapbigimages"){var $db=document.getElementById("mapbigimages");$cI=getLeft($db);$cJ=getTop($db);setGrabCursor($db);setGrabCursor("mapbigarea");}else if(id=="map"||id=="zoompointer"){setGrabCursor(id);};cancelEventPropagation(event);}}};
function drawLine(event){var $a5=5;var $8S=$14(event);var $8T=$15(event);var x=$8S-$6l;var y=$8T-$6m;var $3F=$2K($8O.points[$8O.points.length-1].east,$8O.points[$8O.points.length-1].south);if(x>$3F.x){x=x-$a5;}else{x=x+$a5;};if(y>$3F.y){y=y-$a5;}else{y=y+$a5;};if($5W||$5X){$2y();}};
function drawZoom(event){var $8S=$14(event);var $8T=$15(event);var x=Math.min($8S,$6L);var y=Math.min($8T,$6M);var w=Math.abs($8S-$6L);var h=Math.abs($8T-$6M);var $dc=document.getElementById("zoomboxdiv");$dc.style.width=w+"px";$dc.style.height=h+"px";$dc.style.left=x+"px";$dc.style.top=y+"px";$f($dc);cancelEventPropagation(event);};
function doZoom(event){var $8S=$14(event);var $8T=$15(event);var x=Math.min($8S,$6L);var y=Math.min($8T,$6M);var w=Math.abs($8S-$6L);var h=Math.abs($8T-$6M);var $d0=getImageArea($43);if(w>=1&&h>=1){centerEast=Math.round((($cC+1)*imageSize+Math.round(x+w/2.0)-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-Math.round(y+h/2.0)+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);zoomLevel=$2X(w*Themes[currentTheme].Wupp[zoomLevel],h*Themes[currentTheme].Wupp[zoomLevel]);$2V(true);};cancelZoom(event);};
function cancelZoom(event){hideObj("zoomboxdiv");document.onmouseup=null;document.onmousemove=null;document.onmouseout=null;};
function $2J(){if(mapMeter.points||$8O.points){if(mapMeter.points){$Q(true,"meter");updateMeterDistances(mapMeter.points);var $6A=$2K(mapMeter.points[0].east,mapMeter.points[0].south);$06(appPath+"/img/b.gif",parseInt($6A.x-$6y),parseInt($6A.y-$6z));$M(true,mapMeter,mapMeter.points,"rgb(0,203,255)","none",4,"solid","meter",true);};if($8O.points){$Q(true,"drawing");$M(true,mapMeter,$8O.points,$8O.linecolor,$8M?$8O.fillcolor:"none",$8O.lineweight,$8O.dashtype,"drawing",false,true);}}};
function $2K($5i,$9G){var $8X=new Object();var $bf=Math.round(($5i-centerEast)/Themes[currentTheme].Wupp[zoomLevel]);var $bg=Math.round(($9G-centerSouth)/Themes[currentTheme].Wupp[zoomLevel]);$8X.x=Math.round($4a/2-$6l)+$bf;$8X.y=Math.round($4b/2-$6m)-$bg;return $8X;};
function doPan(event,$3J,$3K){var $ae;var $af;var $d0;var $45=$43.length;var i;var $dd;if($3J||$3K){$ae=$3J;$af=$3K;}else{var x;var y;x=$14(event);y=$15(event);$ae=x-$6L;$af=y-$6M;$6L=x;$6M=y;};if($3M=="map"){$d0=getImageArea($43);if(($6l+$d0.left+$ae)>0){$cC=$cC-1;for(i=0;i<$45;i++){$dd=$43[i];if($dd.imgX==$cL-1){$6E=$2Z($cC,$cD-$dd.imgY);$2M($dd,$6E);$dd.style.left=$d0.left-imageSize+"px";$dd.imgX=0;}else{$dd.imgX=$dd.imgX+1;}};$d0=getImageArea($43);}else if(($6l+$d0.left+$ae)<-512){$cC=$cC+1;for(i=0;i<$45;i++){$dd=$43[i];if($dd.imgX==0){$6E=$2Z($cC+$cL-1,$cD-$dd.imgY);$2M($dd,$6E);$dd.style.left=$d0.left+imageSize*($cL)+"px";$dd.imgX=$cL-1;}else{$dd.imgX=$dd.imgX-1;}};$d0=getImageArea($43);};if(($6m+$d0.top+$af)>0){$cD=$cD+1;for(i=0;i<$45;i++){$dd=$43[i];if($dd.imgY==$cK-1){$6E=$2Z($cC+$dd.imgX,$cD);$2M($dd,$6E);$dd.style.top=$d0.top-imageSize+"px";$dd.imgY=0;}else{$dd.imgY=$dd.imgY+1;}};$d0=getImageArea($43);}else if(($6m+$d0.top+$af)<-512){$cD=$cD-1;for(i=0;i<$45;i++){$dd=$43[i];if($dd.imgY==0){$6E=$2Z($cC+$dd.imgX,$cD-$cK+1);$2M($dd,$6E);$dd.style.top=$d0.top+imageSize*($cK)+"px";$dd.imgY=$cK-1;}else{$dd.imgY=$dd.imgY-1;}};$d0=getImageArea($43);};$44.style.left=($6l+$ae)+"px";$44.style.top=($6m+$af)+"px";$6l=$6l+$ae;$6m=$6m+$af;centerEast=Math.round((($cC+1)*imageSize+$4a/2.0-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-$4b/2.0+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);if(!$3J&&!$3K){var ovrMA=document.getElementById("mapbigarea");if(ovrMA){ovrMA.style.left=Math.round($cv/ 2.0- parseInt(ovrMA.style.width)/ 2.0+(centerEast-$cH)/Themes[curOvrTInd].Wupp[curOvrZLvl])+"px";ovrMA.style.top=Math.round($cw/ 2.0- parseInt(ovrMA.style.height)/ 2.0+(-centerSouth+$cG)/Themes[curOvrTInd].Wupp[curOvrZLvl])+"px";}}}else if($3M=="zoompointer"){$ad=document.getElementById($3M);$am=getTop($ad);$de=document.getElementById("zoomscale");$df=getTop($de);$dg=getHeight($de);$dh=getHeight($ad);if($am+$af>=$df&&$am+$dh+$af<=$df+$dg)$ad.style.top=($am+$af)+"px";}else if($3M=="mapbigresize"){var $di=document.getElementById("mapbig");var w=getWidth($di);var h=getHeight($di);var w2=w-$ae;var h2=h-$af;if(w2<50)w2=50;if(w2>256)w2=256;if(h2<50)h2=50;if(h2>256)h2=256;$di.style.width=w2+"px";$di.style.height=h2+"px";$cv=w2;$cw=h2;}else if($aX){var $ab=document.getElementById($3M);var $ac=document.getElementById($aX);var w=getWidth($ab);var h=getHeight($ab);var sh=getHeight($ac);var dh=h-sh;var w2;if($ab.style.left)w2=w+$ae;else w2=w-$ae;var h2=h+$af;if($ab.$eP){if(h2<$ab.$eP)h2=$ab.$eP;};if(h2<150)h2=150;if($ab.$eQ){if(w2<$ab.$eQ)w2=$ab.$eQ;};if(w2<150)w2=150;$ab.style.width=w2+"px";$ab.style.height=h2+"px";$ac.style.height=(h2-dh)+"px";$1S($3M,$aX);}else{if($3M=="mapbigimages"){var $db=document.getElementById($3M);var $ak=getLeft($db);var $am=getTop($db);var dx=0;var dy=0;setGrabCursor($db);setGrabCursor("mapbigarea");if($ak>0||$ak<-256||$am>0||$am<-256){if($ak>0)dx=-1;else if($ak<-256)dx=1;if($am>0)dy=1;else if($am<-256)dy=-1;$cI=$cI+dx*256;$cJ=$cJ-dy*256;var $dj=$db.childNodes;for(i=0;i<$dj.length;i++){if($dj[i].src){$dj[i].imgX=$dj[i].imgX+dx;$dj[i].imgY=$dj[i].imgY+dy;$dj[i].src=getTileUrl($dj[i].imgX,$dj[i].imgY,ovrViewTheme,curOvrZLvl,"");}};if($ak>0)$db.style.left="-256px";else if($ak<-256)$db.style.left="0px";if($am>0)$db.style.top="-256px";else if($am<-256)$db.style.top="0px";}};$ad=document.getElementById($3M);if($3M=="mapbigimages"){if($ad.style.left){$ak=getLeft($ad);$ad.style.left=($ak+$ae)+"px";}else{$al=getRight($ad);$ad.style.right=($al-$ae)+"px";};$am=getTop($ad);$ad.style.top=($am+$af)+"px";}else{$1y($ad,$ae,$af);}};if(!$3J&&!$3K)cancelEventPropagation(event);};
function stopPan(event){if($3M=="map"){setHandCursor($44);$2W();}else if($3M=="zoompointer"){$2L(event);setHandCursor($3M);}else if($3M=="mapbigimages"){var $db=document.getElementById("mapbigimages");setHandCursor($db);setHandCursor("mapbigarea");$dk=getLeft($db);$dl=getTop($db);if(Math.round(Math.abs($cI-$dk)*Themes[curOvrTInd].Wupp[curOvrZLvl]/Themes[currentTheme].Wupp[zoomLevel])<$4a&&Math.round(Math.abs($cJ-$dl)*Themes[curOvrTInd].Wupp[curOvrZLvl]/Themes[currentTheme].Wupp[zoomLevel])<$4b){var $dm=Math.round(($cI-$dk)*Themes[curOvrTInd].Wupp[curOvrZLvl]/Themes[currentTheme].Wupp[zoomLevel]);var $dn=Math.round(($cJ-$dl)*Themes[curOvrTInd].Wupp[curOvrZLvl]/Themes[currentTheme].Wupp[zoomLevel]);startSlide(-$dm,-$dn,2);}else{centerEast=centerEast+($cI-$dk)*Themes[curOvrTInd].Wupp[curOvrZLvl];centerSouth=centerSouth-($cJ-$dl)*Themes[curOvrTInd].Wupp[curOvrZLvl];$2V();}}else if($3M=="mapbigresize"){$2W();};document.onmouseup=null;document.onmousemove=null;document.onmouseout=null;$2A();if($3M=="map"||$3M=="mapbigimages"){var x=$14(event);var y=$15(event);var dx=x-$cA;var dy=y-$cB;if(Math.abs(dy)>0||Math.abs(dx)>0)$2F();}};
function $2L(event){var $9d=document.getElementById("zoompointer");var $9e=getTop($9d);var $9f=document.getElementById("zoomscale");var $9g=getTop($9f);var $9h=getHeight($9f);var $9i=getHeight($9d);var $do=Math.round((1-($9e-$9g)/($9h-$9i))*(Themes[currentTheme].Wupp.length-1));if($do!=zoomLevel){zoomLevel=$do;$2V(true);}};
function handleScaleClick(event){var $9f=document.getElementById("zoomscale");var $9h=getHeight($9f);var y=$13(event);if($6S){y-=$99.offsetTop;};var $dp=getTotalOffset($9f);var $do=Math.round((1-(y-$dp.y)/$9h)*(Themes[currentTheme].Wupp.length-1));if($do!=zoomLevel){hideInfo();zoomLevel=$do;$2V(true);}};
function getTotalOffset($3x){var $dp=new Object();var $dq;$dp.x=0;$dp.y=0;while(true){$dq=getLeft($3x);if(!isNaN($dq))$dp.x=$dp.x+$dq;$dq=getTop($3x);if(!isNaN($dq))$dp.y=$dp.y+$dq;if(!($3x=$3x.offsetParent))break;};return $dp;};
function $2M($dr,$6E){if($6j){$dr.innerHTML="";$6u=document.createElement("img");$6u.src=appPath+"/img/empty.gif";$6u.src=$6E;$dr.appendChild($6u);sendImageRequest($dr,$6u,$6E);}else{sendImageRequest($dr,$dr.imgobj,$6E);}};var $8y=null;var SideWindow=null;
function initlink(s){$8y=s;};
function TXWinit($ds){if($ds)$2x();if(!$6S)$99=document.getElementById("mapcontainer");$2P();var $dt=document.getElementById("mapbig");if($dt){$cv=getWidth($dt);$cw=getHeight($dt);};$44=document.getElementById("map");$cz=document.getElementById("mappics");mapMeter=document.getElementById("mapmeter");$8O=new Object();if($8y!=null){if($8y.setarea&&$8y.mnorth){mNorth=$8y.mnorth;mEast=$8y.meast;if($8y.width){mWidth=$8y.width;mHeight=$8y.height;}};if($8y.onlayers){for(var i=0;i<$8y.onlayers.length;i++)$1g($8y.onlayers[i],true);};if($8y.offlayers){for(var i=0;i<$8y.offlayers.length;i++)$1g($8y.offlayers[i],false);}}else{};themeChangeEvent(Themes[currentTheme].Name);layerCommand=$2S();CheckBrowser();$4a=$10();$4b=$11();$cL=Math.ceil($4a/imageSize)+2;$cK=Math.ceil($4b/imageSize)+2;$44.width=imageSize*$cL+"px;";centerSouth=mNorth;centerEast=mEast;if(mWupp>=0)zoomLevel=$2Y(mWupp);else zoomLevel=$2X(mWidth,mHeight);$16();setScaleText();curOvrTInd=$1n(ovrViewTheme);$cE=Math.floor((centerEast)/imageSize/Themes[currentTheme].Wupp[zoomLevel]);$cF=Math.floor((centerSouth)/imageSize/Themes[currentTheme].Wupp[zoomLevel]);$cH=centerEast;$cG=centerSouth;var $du=Math.floor((centerEast)/imageSize/Themes[currentTheme].Wupp[zoomLevel]);var $dv=Math.floor((centerSouth)/imageSize/Themes[currentTheme].Wupp[zoomLevel]);$cC=$du-Math.floor($4a/ imageSize/ 2.0)-1;$cD=$dv+Math.floor($4b/ imageSize/ 2.0)+1;var $by=Math.round((($cC+1)*imageSize+$4a/2.0)*Themes[currentTheme].Wupp[zoomLevel]);var $bz=Math.round((($cD)*imageSize-$4b/2.0)*Themes[currentTheme].Wupp[zoomLevel]);$6m=Math.round((centerSouth-$bz)/Themes[currentTheme].Wupp[zoomLevel]);$6l=Math.round((-centerEast+$by)/Themes[currentTheme].Wupp[zoomLevel]);$44.style.left=$6l+"px";$44.style.top=$6m+"px";startPan();for(j=0;j<$cK;j++){for(i=0;i<$cL;i++){$6E=$2Z($cC+i,$cD-j);$dw=(j-1)*imageSize;$dx=(i-1)*imageSize;$2R($6E,$dx,$dw,i,j);}};$43=$cz.childNodes;if(!$6S)sWL(true);if(!$4T)$17();$2W();if($99)$99.onkeydown=handleKeyEvent;$31();if(!$4T)$2r('SWContainer');var $dy=-1;if($8y!=null){if($8y.query!=null){if($8y.query.type=='address'){if(document.searchForm.addressOnly)document.searchForm.addressOnly.checked=true;if($8y.municipality!=null&&document.searchForm.Municipality){document.searchForm.Municipality.value=$8y.municipality;};var $3x=document.getElementById("fieldsearch");if($3x)$3x.className='fieldactive';if($8y.searchtext&&document.searchForm)document.searchForm.searchtext.value=$8y.searchtext;$0u(SearchDB,$8y,$6X);}else if($8y.query.type=='all'){if(document.searchForm.addressOnly)document.searchForm.addressOnly.checked=false;var $3x=document.getElementById("fieldsearch");if($3x)$3x.className='fieldactive';if($8y.searchtext&&document.searchForm)document.searchForm.searchtext.value=$8y.searchtext;if($8y.municipality!=null&&document.searchForm.Municipality){document.searchForm.Municipality.value=$8y.municipality;};$0u(SearchDB,$8y,$6X);}else if($8y.query.type=='linksearch'){var $3x=document.getElementById("fieldsearch");if($3x)$3x.className='fieldactive';if($8y.searchtext&&document.searchForm)document.searchForm.searchtext.value=$8y.searchtext;if(document.searchForm&&document.searchForm.Municipality&&$8y.municipality)document.searchForm.Municipality.value=$8y.municipality;$0u(SearchDB,$8y,$6X);}else if($8y.query.type=='cat'){var $3x=document.getElementById("fieldsearch");if($3x)$3x.className='fieldactive';if(document.searchForm)document.searchForm.searchtext.value=$8y.searchtext;$dy=$8y.query.cid;$0u(SearchDB,$8y,$6X);}else if($8y.query.type=='link'){if($8y.results)$0u(SearchDB,$8y,$4S,"decode");}else if($8y.query.type=='searchengine'){$2j($8y);freeSiteSearchLink($8y);}else if($8y.query.type=='collection'){if($8y.results)$0u(SearchDB,$8y,$6Y);}else if($8y.query.type=='mycollection'){$o($8y);}else if($8y.query.type=='collqry'){$0P($8y);}else if($8y.query.type=='getlocation'){$21($8y);}};if($8y.formactions){for(var a=0;a<$8y.formactions.length;a++){if($8y.formactions[a].type=='feedback'){$0N($8y.formactions[a]);}else if($8y.formactions[a].type=='areasearch'){$1U($8y.formactions[a]);}}}}else{if(!$4T){var $3x=document.getElementById("fieldsearch");$i($3x,cl_searchTip);}};if(!$4T){$1L($dy);$s();$2A();};$44.onmousemove=$2G;$2T();try{$x(CoordDef,CoordDistKey,CoordStatusKey);}catch(e){};setHandCursor("mapbigimages");setHandCursor("mapbigarea");if($0V("mysiteswindow")){$1S("mysiteswindow",null);};$1w();if(!$4T){$2n("SWContainer");$2n("mysiteswindow");$2n("areaselect");$1X();};setHandCursor($44);};
function handleKeyEvent($9c){if($6S)return;{var $dz=document.all?event.keyCode:$9c.which;if($dz==38){hideInfo();startSlide(0,256,15);}else if($dz==40){hideInfo();startSlide(0,-256,15);}else if($dz==37){hideInfo();startSlide(256,0,15);}else if($dz==39){hideInfo();startSlide(-256,0,15);};cancelEventPropagation($9c);}};
function zoom($dA){if(!zoomPending){hideInfo();if($dA<0){zoomLevel=zoomLevel+1;if(zoomLevel<Themes[currentTheme].Wupp.length){$3V=(1.0*Themes[currentTheme].Wupp[zoomLevel])/Themes[currentTheme].Wupp[zoomLevel-1];zoomPending=true;if($cO)startZoomEffect(true);else setTimeout("zoomPending = false;",600);$2V(true);}else{zoomLevel=Themes[currentTheme].Wupp.length-1;}}else{zoomLevel=zoomLevel-1;if(zoomLevel>=0){$3U=(1.0*Themes[currentTheme].Wupp[zoomLevel])/Themes[currentTheme].Wupp[zoomLevel+1];zoomPending=true;if($cO)startZoomEffect(false);else setTimeout("zoomPending = false;",600);$2V(true);}else{zoomLevel=0;}}}};
function createSite(){hideInfo();clearToolstate();$0K();var $8N=document.getElementById("drawsite");if($8N)$8N.src=appPath+"/img/draw_site_down.gif";toolMode="createsite";setStatus(cl_selectNewObjectPosition);$2H(updateTooltip);enableTooltip();$44.style.cursor="crosshair";};
function moveSite($3E,Id,event){hideInfo();toolMode="movesite";setStatus(cl_selectMoveObjectPosition);$2H(updateTooltip);enableTooltip();$cP=$3E;$cQ=Id;updateTooltip(event);$44.style.cursor="crosshair";cancelEventPropagation(event);};
function delSelObject($3E,Id,event,$dB){hideInfo();cancelEventPropagation(event);if($dB||confirm(cl_deleteConfirm)){$0I();$0k($3E,Id);if($3E==$6P){$1k();};$0G(true);$0J();}};
function $2N($4e,$dC){var $4w=false;if(!$4e)return false;if($dC){var $dD=/(http|https):\/\/(\w+:{0,1};\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;$4w=$dD.test($4e);}else{$4w=($4e&&$4e!=null&&$4e!="null"&&$4e!="undefined"&&$4e!=undefined);};return $4w;};
function openEditWindow($3E,Id,event){hideInfo();if($3E==$6W)$b($3E,Id,null,event);else openPropertiesWindow($3E,Id,event);if($3E&&Id){}else{clearToolstate();startPan();}};
function openPropertiesWindow($3E,Id,event){if($6S)return $9M($3E,Id);var $3B=document.getElementById("editwindow");var $dE=document.getElementById("sitenamefield");var $dF=document.getElementById("siteurlfield");var $dG=document.getElementById("siteexplanationfield");$3F=$0S(event,$3B);$3B.style.left=$3F.x+"px";$3B.style.top=$3F.y+"px";if($3E&&Id){$3B.isedit=true;var $3x=$0i($3E,Id);if($3x){if($3x.Name)$dE.value=$3x.Name;else $dE.value="";if($2N($3x.Url,true))$dF.value=$3x.Url;else $dF.value="";if($3x.Explanation)$dG.value=$3x.Explanation;else $dG.value="";$3B.DBIndex=$3E;$3B.Id=Id;}}else{$dE.value="";$dF.value="";$dG.value="";$3B.$eV=toolMode;$3B.isedit=false;};$f($3B);cancelEventPropagation(event);};
function editFormOk(){var $3u=document.getElementById("editwindow");$e($3u);if($3u.isedit){var $3x=$0i($3u.DBIndex,$3u.Id);if($3x){var $dE=document.getElementById("sitenamefield");var $dF=document.getElementById("siteurlfield");var $dG=document.getElementById("siteexplanationfield");$3x.Name=$dE.value;if($2N($dF.value,true))$3x.Url=$dF.value;else $3x.Url="";$3x.Explanation=$dG.value;$0j($3u.DBIndex,true);$0I();$1k();$0G(true);$0J();}}else{saveDrawing($3u.$eV);};$3u.DBIndex=null;$3u.Id=null;};
function editFormCancel(){var $3u=document.getElementById("editwindow");$e($3u);if($3u.isedit){}else{cancelDrawing();}};
function updateSites(){$0I();$0G(true);$0J();};
function $2O(){if($3z&&$3y){var $dH=document.getElementById("userposition");var $3F=$2K($3z,$3y);$dH.style.left=$3F.x-10+"px";$dH.style.top=$3F.y-30+"px";}};
function $2P(){$4a=$10();$4b=$11();$34($4a,$4b);var $dI=document.getElementById("menubardiv");if($dI)$dI.style.width=$4a+"px";};
function $2Q(){var $d0=getImageArea($43);$4a=$10();$4b=$11();var $dJ=Math.ceil($4a/imageSize)+2;var $dK=Math.ceil($4b/imageSize)+2;if($dJ>$cL){for(i=$cL;i<$dJ;i++){for(j=0;j<$cK;j++){$6E=$2Z($cC+i,$cD-j);$dw=$d0.top+j*imageSize;$dx=$d0.left+i*imageSize;$2R($6E,$dx,$dw,i,j);}};$cL=$dJ;};if($dK>$cK){for(j=$cK;j<$dK;j++){for(i=0;i<$cL;i++){$6E=$2Z($cC+i,$cD-j);$dw=$d0.top+j*imageSize;$dx=$d0.left+i*imageSize;$2R($6E,$dx,$dw,i,j);}};$cK=$dK;};$d0=getImageArea($43);centerEast=Math.round((($cC+1)*imageSize+$4a/2.0-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-$4b/2.0+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);$2W();$2F();};
function TXWresize(){$2P();$2Q();if(SideWindow)SideWindow.Resize();};
function $2R($6E,$bE,$bF,x,y){var $dL=document.createElement("div");var $47=document.createElement("img");$dL.style.position="absolute";$dL.style.left=$bE+"px";$dL.style.top=$bF+"px";$dL.imgX=x;$dL.imgY=y;$47.style.position="absolute";$47.style.top="0px";$47.style.left="0px";$47.src=appPath+"/img/empty.gif";$dL.appendChild($47);$cz.appendChild($dL);sendImageRequest($dL,$47,$6E);};
function sendImageRequest($dr,$dM,$4e){$dr.error=0;$dr.src=$4e;$dr.imgobj=$dM;if(!$6j){$dM.style.visibility="hidden";$dM.onerror=function(){setStatus("Tile loading error");$dr.error=1;$dM.onerror=null;$dM.onload=null;$dM.style.visibility="hidden";};$dM.onload=function(){$dM.style.visibility="visible";$dM.onerror=null;$dM.onload=null;}}else{$dM.src=appPath+"/img/empty.gif";};$dM.src=$4e;};
function doMouseWheel(event){if(!event)event=window.event;var $a5;if(event.wheelDelta&&$6j)$a5=-event.wheelDelta;else if(event.wheelDelta)$a5=event.wheelDelta;else if(event.detail)$a5=-event.detail;if($a5<0)$a5=-1;else $a5=1;if($a5){if($a5>0){zoom(-1);}else{zoom(1);}};cancelEventPropagation(event);};
function getImageArea($dj){var $dN;var $dO;var $45=$dj?$dj.length:0;var $dd;$3x=new Object();for(i=0;i<$45;i++){$dd=$dj[i];if($dd.imgX==0){$dN=parseInt($dd.style.left,10);$3x.left=$dN;};if($dd.imgY==0){$dO=parseInt($dd.style.top,10);$3x.top=$dO;};if($dN&&$dO)break;};return $3x;};
function deleteMeterPoint(){var i;var j=0;var $dP=new Array();if(mapMeter.points){for(i=0;i<mapMeter.points.length-1;i++){var $3x=new Object();$3x.east=mapMeter.points[i].east;$3x.south=mapMeter.points[i].south;$dP[j]=$3x;j++;};if($dP.length>0)mapMeter.points=$dP;else mapMeter.points=null;$0I();$2J();updateDistance();updateMeterDistances(mapMeter.points);setStatus(cl_lastMeasurePointRemoved);if(!mapMeter.points)mapMeter.innerHTML="";$0J();}else{setStatus(cl_noPointsToDelete);}};
function deleteMeterLines(){$Q(true,"meter");if(mapMeter.points!=null){mapMeter.points=null;updateDistance();updateMeterDistances(mapMeter.points);}};
function deleteDrawing(){var $6d="drawing";$Q(true,$6d,null);$0I();$8O.points=null;$2J();$2I(drawLine);$1k();$0J();};
function showSite($3E,Id,$ax){var $7c=document.getElementById("mapsites");var $3x=$0i($3E,Id);if($3x){if(!$0o($3E,Id,$3x)){if($3x.PointArray){var $7Z=$0w(true,$3E,Id,$3x);if($7Z)$7c.innerHTML+=$7Z;}else{var $7Z=$0v($3E,Id,$3x);$7c.innerHTML=$7c.innerHTML+$7Z;}};if(!$ax){$30($3x);};showInfo($3E,Id,null,null,true);}};
function $2S(){var $dQ=0;var $dR=0;var $av="";for(var i=0;i<Themes[currentTheme].Layers.length;i++){if(Themes[currentTheme].Layers[i].On)$dQ+=Math.pow(2,$dR);$dR++;if($dR>=8){$av+=d2h($dQ);$dQ=0;$dR=0;}};if($dR>0)$av+=d2h($dQ);if($av.length<1)$av="00";return "&Layerkey="+$av;};
function $2T($dS){var $dT=null;var $7m=false;if($dS)$dT=LayerDB.$eL.clone(true);if(Themes[currentTheme].CategoryLayers){for(var $4M=0;$4M<Themes[currentTheme].CategoryLayers.length;$4M++){if($0r(Themes[currentTheme].CategoryLayers[$4M].CategoryName,Themes[currentTheme].CategoryLayers[$4M].On))$7m=true;if($dT)$dT.remove(Themes[currentTheme].CategoryLayers[$4M].CategoryName);}};if(Themes[currentTheme].CategoryLayers.length>0){for(var $dU=0;$dU<Themes[currentTheme].Layers.length;$dU++){var name=Themes[currentTheme].Layers[$dU].Name;for(var i=0;i<Themes[currentTheme].CategoryLayers.length;i++){if(Themes[currentTheme].CategoryLayers[i].LinkTo&&Themes[currentTheme].CategoryLayers[i].LinkTo==name){Themes[currentTheme].CategoryLayers[i].On=Themes[currentTheme].Layers[$dU].On;if($0r(Themes[currentTheme].CategoryLayers[i].CategoryName,Themes[currentTheme].Layers[$dU].On))$7m=true;}}}};if($dT){for(var i=0;i<$dT.length;i++){if($0r($dT[i],false))$7m=true;}};$0q($7m);};
function changeTheme(){var $9l=document.getElementById("themeselect");if(Themes[$9l.value].Wupp.length>0){var $dV=Themes[currentTheme].Wupp[zoomLevel];currentTheme=$9l.value;zoomLevel=$2Y($dV);if(zoomLevel<0||zoomLevel>=Themes[currentTheme].Wupp.length){if(zoomLevel>=Themes[currentTheme].Wupp.length)zoomLevel=Themes[currentTheme].Wupp.length-1;};layerCommand=$2S();$2V();$31();$1a();themeChangeEvent(Themes[currentTheme].Name);$2T(true);}else{for(i=$9l.length-1;i>=0;i--){if($9l[i].value==currentTheme)$9l[i].selected=true;else $9l[i].selected=false;}}};
function $2U($dW,$dX,$dY){if(Themes[$dW].Wupp.length>0){var $dV=Themes[currentTheme].Wupp[zoomLevel];currentTheme=$dW;zoomLevel=$2Y($dV);if(zoomLevel<0||zoomLevel>=Themes[currentTheme].Wupp.length){if(zoomLevel>=Themes[currentTheme].Wupp.length)zoomLevel=Themes[currentTheme].Wupp.length-1;};if($dX){for(var i=0;i<$dX.length;i++)$1g($dX[i],true);};if($dY){for(var i=0;i<$dY.length;i++)$1g($dY[i],false);};layerCommand=$2S();$1a();themeChangeEvent(Themes[currentTheme].Name);var $9l=document.getElementById("themeselect");$9l.value=$dW;}};
function $2V($dZ){$0I();hideContextMenu();$16();setScaleText();var $cZ=Themes[currentTheme].Wupp[zoomLevel];$cE=Math.floor((centerEast)/imageSize/$cZ);$cF=Math.floor((centerSouth)/imageSize/$cZ);$cC=$cE-Math.floor($4a/ imageSize/ 2.0)-1;$cD=$cF+Math.floor($4b/ imageSize/ 2.0)+1;var $by=Math.round((($cC+1)*imageSize+$4a/2.0)*$cZ);var $bz=Math.round((($cD)*imageSize-$4b/2.0)*$cZ);var dy=Math.round((centerSouth-$bz)/$cZ);var dx=Math.round((-centerEast+$by)/$cZ);$2W();for(var i=0;i<$43.length;i++){var $dd=$43[i];var $6E=$2Z($cC+$dd.imgX,$cD-$dd.imgY);var $77=($dd.imgX-1)*imageSize;$dd.style.left=$77+"px";$77=($dd.imgY-1)*imageSize;$dd.style.top=$77+"px";$dd.imgobj.onload=null;$dd.imgobj.onerror=null;$2M($dd,$6E);};$44.style.left=dx+"px";$44.style.top=dy+"px";$6l=getLeft($44);$6m=getTop($44);if($dZ)$2F();$0G(true);$2O();$2J();$0G(false);$0J();};
function $2W(){var $db=document.getElementById("mapbigimages");var ovrMA=document.getElementById("mapbigarea");if(!$db||!ovrMA)return;var boxwidth=0;var boxheight=0;var $dj=$db.childNodes;$cG=centerSouth;$cH=centerEast;curOvrZLvl=0;var $e0=Math.max($4a,$4b)*Themes[currentTheme].Wupp[zoomLevel];for(i=Themes[curOvrTInd].Wupp.length-1;i>=0;i--){if(Themes[curOvrTInd].Wupp[i]*$cv>$e0*1.6){curOvrZLvl=i;break;}};var $bw=Math.floor((centerEast-($cv/ 2.0)* Themes[curOvrTInd].Wupp[curOvrZLvl])/ imageSize/Themes[curOvrTInd].Wupp[curOvrZLvl]);var $bx=Math.floor((centerSouth+($cw/ 2.0)* Themes[curOvrTInd].Wupp[curOvrZLvl])/ imageSize/Themes[curOvrTInd].Wupp[curOvrZLvl]);var $by=Math.round((($bw)*imageSize+$cv/2.0)*Themes[curOvrTInd].Wupp[curOvrZLvl]);var $bz=Math.round((($bx+1)*imageSize-$cw/2.0)*Themes[curOvrTInd].Wupp[curOvrZLvl]);var dy=Math.round((centerSouth-$bz)/Themes[curOvrTInd].Wupp[curOvrZLvl]);var dx=Math.round((-centerEast+$by)/Themes[curOvrTInd].Wupp[curOvrZLvl]);var $6E;$db.style.left=dx+"px";$db.style.top=dy+"px";boxwidth=Math.round($4a*Themes[currentTheme].Wupp[zoomLevel]/Themes[curOvrTInd].Wupp[curOvrZLvl]);boxheight=Math.round($4b*Themes[currentTheme].Wupp[zoomLevel]/Themes[curOvrTInd].Wupp[curOvrZLvl]);ovrMA.style.left=Math.round($cv/ 2.0- boxwidth/ 2.0)+"px";ovrMA.style.top=Math.round($cw/ 2.0- boxheight/ 2.0)+"px";ovrMA.style.width=boxwidth+"px";ovrMA.style.height=boxheight+"px";var x=0;var y=0;for(i=0;i<$dj.length;i++){if($dj[i].src){$6E=getTileUrl(($bw+x),($bx-y),ovrViewTheme,curOvrZLvl,"");if($dj[i].src!=encodeURI($6E)){$dj[i].src=$6E;$dj[i].imgX=$bw+x;$dj[i].imgY=$bx-y;x++;if(x>=2){y++;x=0;}}else break;}}};
function changeArea(){var $9o=document.getElementById("areaselect");var $e1=$9o.value;var $7X;var $7Y;for(var i=0;i<Themes[currentTheme].NamedAreas.length;i++){if(Themes[currentTheme].NamedAreas[i].Name==$e1){hideInfo();centerEast=(Themes[currentTheme].NamedAreas[i].West+Themes[currentTheme].NamedAreas[i].East)/2;centerSouth=(Themes[currentTheme].NamedAreas[i].North+Themes[currentTheme].NamedAreas[i].South)/2;$7X=Themes[currentTheme].NamedAreas[i].East-Themes[currentTheme].NamedAreas[i].West;$7Y=Themes[currentTheme].NamedAreas[i].North-Themes[currentTheme].NamedAreas[i].South;zoomLevel=$2X($7X,$7Y);$2V(true);break;}}};
function $2X($7X,$7Y){var $e2;var $e3;var $e4=20;var i=Themes[currentTheme].Wupp.length-1;while(i>=0){$e2=($10()-$e4)*Themes[currentTheme].Wupp[i];$e5=($11()-$e4)*Themes[currentTheme].Wupp[i];if($e2>=$7X&&$e5>=$7Y){break;};i--;};return i>=0?i:0;};
function $2Y($76){var $4w=0;var i=Themes[currentTheme].Wupp.length-1;while(i>=0){if(Themes[currentTheme].Wupp[i]>=$76)break;i--;};if(i>=0){$4w=i;}else{if($76>Themes[currentTheme].Wupp[0])$4w=0;else if($76<Themes[currentTheme].Wupp[Themes[currentTheme].Wupp.length-1])$4w=Themes[currentTheme].Wupp.length-1;};return $4w;};
function getTileUrl(x,y,$e6,$76,$e7){var $e8=(srvArray!=null)?srvArray.length:0;var $e9=0;if($e8>0)$e9=(x+y)%($e8+1);var $ea="/GetTile.ashx?theme="+$2s($e6)+"&x="+x+"&y="+y+"&zoom="+$76;if($e9==0)$6E=appPath+$ea;else $6E=srvArray[$e9-1]+$ea;$6E+=$e7;return $6E;};
function $2Z(x,y){return getTileUrl(x,y,Themes[currentTheme].Name,zoomLevel,layerCommand);};
function $30($3x,$eb){if($3x){var BB=$3x.get_BB();centerEast=Math.round((BB.eastmax+BB.eastmin)/2.0);centerSouth=Math.round((BB.northmax+BB.northmin)/2.0);if($eb){zoomLevel=$eb;}else{if($cR>0.1){BB.Extend($cR);};var $ec=BB.eastmax-BB.eastmin;var $ed=BB.northmax-BB.northmin;zoomLevel=$2X($ec,$ed);};$2V(true);}};
function showDrawing($3E,Id){var $3x=$0i($3E,Id);if($3x){$30($3x);showInfo($3E,Id,null,null,true);}};
function updateMeterDistances($63){var $bi=document.getElementById("meterdistances");$bi.innerHTML="";if(mapMeter.points){var sb=new StringBuilder("");var $bk;var $6A;var $5F;for(var i=1;i<mapMeter.points.length;i++){$6A=$2K(mapMeter.points[i-1].east,mapMeter.points[i-1].south);$5F=$2K(mapMeter.points[i].east,mapMeter.points[i].south);$bk=Math.round(Math.sqrt(Math.pow(mapMeter.points[i-1].east-mapMeter.points[i].east,2)+Math.pow(mapMeter.points[i-1].south-mapMeter.points[i].south,2)))+" m";sb.Append("<div class='box_metertext' style='position:absolute; top:"+Math.round(($6A.y+$5F.y)/2.0-7)+"; left:"+Math.round(($6A.x+$5F.x)/2.0-10)+";'>&nbsp;"+$bk+"&nbsp;</div>");};$bi.innerHTML=sb.ToString();}};
function handleDoubleClick(event){if(toolMode=="drawpolyline"||toolMode=="drawpolygon"){showSiteProperties(event);}else if(toolMode!="distance"){var x=$14(event);var y=$15(event);var $d0=getImageArea($43);centerEast=Math.round((($cC+1)*imageSize+x-($6l+imageSize+$d0.left))*Themes[currentTheme].Wupp[zoomLevel]);centerSouth=Math.round((($cD)*imageSize-y+($6m+imageSize+$d0.top))*Themes[currentTheme].Wupp[zoomLevel]);if(zoomLevel<Themes[currentTheme].Wupp.length-1)zoomLevel=zoomLevel+1;$2V(true);}};
function $31(){var $ee=document.getElementById("copy1");var $7t=Themes[currentTheme].Copyright;if($7t.length>0)$7t+=".";$7t+=Themes[currentTheme].LastUpdate;if($ee)$ee.innerHTML=$7t;$ee=document.getElementById("copy2");if($ee)$ee.innerHTML=$7t;};
function clearVis($81){hideInfo();$0I();if($81)deleteMeterLines();$Q(true,null,$81?"meter":null);SearchDB.Clear();deleteUserPosition();$0G(true);$0J();};
function clearAllSites(){$20("searchresults");clearVis(false);};
function $32(name,$77){var $9D;var $ef=new Date();var $eg=356;$ef.setTime($ef.getTime()+($eg*24*60*60*1000));var $eh="; expires="+$ef.toGMTString();$9D=name+"="+$77;$9D=$9D+$eh;document.cookie=$9D;};
function $33(name){var $9D=""+document.cookie;var $ei=name+"=";var $8J=$9D.indexOf($ei);if($8J!=-1){var end=$9D.indexOf(";",$8J);if(end !=-1)return $9D.substring($8J+$ei.length,end);else return $9D.substring($8J+$ei.length,$9D.length);}else return null;};
function $34($ej,$ek){if($99){if($4T){if($99.style.width.indexOf('%')==-1)$99.style.width=($ej-2)+"px";if($99.style.height.indexOf('%')==-1)$99.style.height=($ek-2)+"px";}else{$99.style.width=$ej+"px";$99.style.height=$ek+"px";}}};
function expandCategoryTree(){if($az)$az.expand();};
function collapseCategoryTree(){if($az)$az.collapse();};
function Tree(){this.branches=new Array();this.add=$38;this.html=$37;this.expand=$35;this.collapse=$36;this.idmapping=new Array();};Tree.prototype.MapInsert=function($7o,$77){this.idmapping[$7o]=$77;};Tree.prototype.MapGet=function($77){if($77!=null){for(var i in this.idmapping){if(this.idmapping[i]==$77){return i;}}};return -1;};
function Branch(id,$el){this.id=id;this.label=$el;this.html=$3d;this.add=$3e;this.leaves=new Array();this.expand=$3a;this.collapse=$3c;};
function Leaf(id,$el){this.id=id;this.label=$el;this.html=$3f;};
function $35(){var $em=this.branches.length;for(var i=0;i<$em;i++){this.branches[i].expand();}};
function $36(){var $em=this.branches.length;for(var i=0;i<$em;i++){this.branches[i].collapse();}};
function $37(){var $en='';var $em=this.branches.length;for(var i=0;i<$em;i++)$en+=this.branches[i].html();return $en;};
function $38(Branch){this.branches[this.branches.length]=Branch;Branch.parent=-1;$az[Branch.id]=Branch;};
function $39($eo){if($eo&&$eo.leaves&&$eo.leaves.length>0){$3g($eo.id);for(var a=0;a<$eo.leaves.length;a++){$39($eo.leaves[a]);$3g($eo.leaves[a].id);}}};
function $3a(){return $39(this);};
function $3b($eo){if($eo&&$eo.leaves&&$eo.leaves.length>0){$3h($eo.id);for(var a=0;a<$eo.leaves.length;a++){$3b($eo.leaves[a]);$3h($eo.leaves[a].id);}}};
function $3c(){return $3b(this);};
function $3d(){var $ep='<span class="treebranch">';if(this.leaves.length>0){$ep+='<a onClick="shBR(\'' + this.id + '\')"><img src="'+appPath+'/img/tclosed.gif" id="img'+this.id+'"></a>';}else{$ep+='<a onClick="adLTL(\'' + this.id + '\')"><img src="'+appPath+'/img/Leaf.gif" id="img'+this.id+'"></a>';};$ep+='<a onClick="adLTL(\'' + this.id + '\')">&nbsp;'+this.label+'</a>';$ep+='</span>';$ep+='<span class="treeleaf" id="'+this.id+'">';var $eq=this.leaves.length;for(var i=0;i<$eq;i++)$ep+=this.leaves[i].html();$ep+='</span>';return $ep;};
function $3e(Leaf){Leaf.parent=this.id;this.leaves[this.leaves.length]=Leaf;$az[Leaf.id]=Leaf;};
function $3f(){var $er=$er='<a onClick="adLTL('+this.id+')">';$er+='<img src="'+appPath+'/img/Leaf.gif" border="0">&nbsp;'+this.label+'</a><br>';return $er;};
function shBR(Branch){var $3x=document.getElementById(Branch);if($3x){var $es=$3x.style;if($es.display=="block")$es.display="none";else $es.display="block";$3i("img"+Branch);}};
function $3g(Branch){var $3x=document.getElementById(Branch);if($3x){if($3x.style.display!="block"){$3x.style.display="block";$3i("img"+Branch,"expand");}}};
function $3h(Branch){var $3x=document.getElementById(Branch);if($3x){if($3x.style.display!="none"){$3x.style.display="none";$3i("img"+Branch,"collapse");}}};
function $3i($8N,$et){var $eu=document.getElementById($8N);if($eu){var $ev=true;if(!$et){if($eu.src.indexOf('closed')>-1)$ev=false;}else if($et.indexOf('expand')>-1){$ev=false;};var im=$ev?'tclosed.gif':'topened.gif';$eu.src=appPath+'/img/'+im;}};
function $3j(s){if(s.leaves){var $eq=s.leaves.length;for(var j=0;j<$eq;j++){$3n(s.leaves[j].id);$3j($az[s.leaves[j].id]);}}};
function $3k(s){if(s.branches){var $em=s.branches.length;for(var j=0;j<$em;j++){$3n(s.branches[j].id);$3j($az[s.branches[j].id]);$3k($az[s.branches[j].id]);}};$3j(s);};
function $3l(id){var s=$az[id];$3m(s.id,s.label);while(s.parent!=-1){shBR(s.parent);s=$az[s.parent];}};
function adLTL(id){var s=$az[id];$3m(s.id,s.label);while(s.parent!=-1){$3n(s.parent);s=$az[s.parent];};s=$az[id];$3k(s);};
function $3m(id,$ew){if($ew){var $8Z=document.getElementById("selectedcategories");var $ex=false;for(var i=0;i<$8Z.length;i++){if($8Z.options[i].value==id){$ex=true;break;}};if(!$ex){$8Z.options[$8Z.options.length]=new Option($ew,id);}}};
function removeDetailCategory(){var $8Z=document.getElementById("selectedcategories");if($8Z)$8Z.remove($8Z.selectedIndex);};
function $3n(id){var $8Z=document.getElementById("selectedcategories");for(var i=$8Z.length-1;i>=0;i--){if($8Z.options[i].value==id)$8Z.remove(i);}};var $4J=4;var $ey=null;
function $3o(){var $ez=null;if(window.XMLHttpRequest){$ez=new XMLHttpRequest();}else if(typeof ActiveXObject!="undefined"){try{$ez=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){$ez=new ActiveXObject("Microsoft.XMLHTTP");}};if($ez==null){alert("XMLHttpRequest not supported");};return $ez;};var $4I;var fbReq;var seReq;var $eA;var $eB;var $eC;
function $3p($3N,$4A,$4e,$5m,$eD){$3r($3N);var $eE=$3o();var $eF=60000;if(!$eE){return;};if($3N=="ib"){$4I=$eE;$eE.onreadystatechange=$eD;$eA=setTimeout("ajAb(ibReq);",$eF);}else if($3N=="fb"){fbReq=$eE;$eE.onreadystatechange=$eD;$eB=setTimeout("ajAb(fbReq);",$eF);}else if($3N=="se"){seReq=$eE;$eE.onreadystatechange=$eD;$eC=setTimeout("ajAb(seReq);",$eF);}else{return;};if(!$ey){$eE.open($4A,$4e,true);}else{if($4A=="POST"){$eE.open($4A,$4e,true);}else{$4e=$ey+"?path="+$2s($4e);$eE.open($4A,$4e,true);}};if($4A=="POST"){$eE.setRequestHeader("Content-Type","application/x-www-form-urlencoded");};$eE.send($5m);};
function ajAb($eG){$eG.abort();$eG.onreadystatechange=function(){};alert("Unable to reach the server...");};
function ajClu($eG){$eG.onreadystatechange=function(){};};
function $3q($eG){var $eH=false;try{if($eG&&($eG.status==200)){$eH=true;};if($eG==$4I){if($eA){clearTimeout($eA);$eA=null;}}else if($eG==fbReq){if($eB){clearTimeout($eB);$eB=null;}}else if($eG==seReq){if($eC){clearTimeout($eC);$eC=null;}}}catch(e){$eH=false;};return $eH;};
function $3r($3N){var $eI=false;var $eJ=null;if($3N=="ib"){if($eA){clearTimeout($eA);$eA=null;$eJ=$4I;$eI=true;}}else if($3N=="fb"){if($eB){clearTimeout($eB);$eB=null;$eJ=fbReq;$eI=true;}}else if($3N=="se"){if($eC){clearTimeout($eC);$eC=null;$eJ=seReq;$eI=true;}};if($eI&&$eJ){$eJ.abort();ajClu($eJ);};return $eI;};

