/*
HTML Imagemapper 10 AJAX
alta4 Geoinformatik 2006
30.10.2006 - 10.0.23
http://www.alta4.com
*/
function startUp(){uR05();config_IM();setTimeout("W7817()",250)}function W7817(){document.getElementsByTagName("body")[0].innerHTML+="<h3 id='loadingTxt' style='position:absolute; top:"+g_viewOff[1]+round(g_viewExt[1]/2)+"px; left:"+g_viewOff[0]+"px; width:"+g_viewExt[0]+"px; text-align:center; '></h3>";iHkm();R3_7();KOj();J0hP();l87_();I0$();setTimeout("dlH('l27$()')",250)}function dlH(T29R3){var $5bO$=true;for(var item in $28){if(!$28[item].complete){$5bO$=false;break}}($5bO$)?setTimeout(T29R3,1):setTimeout("dlH('"+T29R3+"')",500)}function l27$(){_t61x();S579();ini_ovMap();ini_legend();S_P1();create_lists();v9l();Lb6();$0g98();S51r3();J6$();inM();G5s8();D48U();$1Q4();ay5_P();update_ovMapCrosshair();rT4();if(g_postToMapGallery)n05();try{g_searchFields=g_defaultSearchField.concat(g_searchFields)}catch(k597){}delete_obj('loadingTxt');Qr6()}function J3105(){delete_obj(g_areaCon);delete_obj(g_areaLay);hide_popup(N4k);clear(element(__a6))}function Qp49(c6783,V55o9){e7nx(c6783);_t61x();R3_7();KOj();clear(element(a_9n));S579();S51r3();J6$();Lb6();update_ovMapCrosshair();A341();v9l();$1Q4();$0g98();rT4();Qr6()}function x0s25(){pN920=true;delete_obj(g_areaCon);delete_obj(g_areaLay);hide_popup(N4k);clear(element(__a6));T36_()}function j2$(D2rrm){}function g85R(){pN920=false;J6$();rT4();update_ovMapCrosshair();Qr6()}function Y3xq3(){}gO29T=new Array();function $7GUl(Jpo93){gO29T.push(Jpo93)}function _4Nv(){if(gO29T.length>0){var I134=gO29T[0];gO29T.shift();return I134}else{return false}}function Qr6(){var t5C=_4Nv();if(t5C)setTimeout(t5C,5)}X79RN=null;IQD0=null;function uR05(){X79RN=document.getElementsByTagName("body")[0];IQD0=document.getElementsByTagName("head")[0]}function iwr0(ljf,size,id,tfj0,$r61,parent){var u93i=qVUv("div");u93i.setAttribute("id",id);ax66F(u93i,ljf,size,null);if(tfj0!=null){for(var item in tfj0)u93i.setAttribute(item,tfj0[item])}if($r61!=null){for(var item in $r61)u93i.style[item]=$r61[item]}a0$10(parent,u93i)}function clear(f4o4){if(f4o4)f4o4.innerHTML=""}function element(id){return document.getElementById(id)}function delete_obj(id){if(element(id)){var f4o4=element(id);var parent=f4o4.parentNode;var H9mx$=parent.removeChild(f4o4)}}function ax66F(f4o4,ljf,size,$x8){if(typeof(f4o4)=="object"){var $E68=f4o4.style;if(ljf!=null){$E68.position="absolute";if(!isNaN(ljf[0]))$E68.left=ljf[0]+"px";if(!isNaN(ljf[1]))$E68.top=ljf[1]+"px"}if(size!=null){if(!isNaN(size[0]))$E68.width=size[0]+"px";if(!isNaN(size[1]))$E68.height=size[1]+"px"}if($x8!=null)$E68.visibility=$x8}}function qVUv(element){return document.createElement(element)}function hide(id){if(element(id))element(id).style.visibility="hidden"}function $x8(id){if(element(id))element(id).style.visibility="visible"}function bX7(f4o4,hY1){a0$10(f4o4,document.createTextNode(hY1))}function a0$10(u8c4,p12){if(u8c4&&p12)u8c4.appendChild(p12)}function by6_o(f4o4){if(document.all)f4o4.style.cursor="hand";else f4o4.style.cursor="pointer"}function e79KH(I9Yw){var d91F9=I9Yw;if(I9Yw>100)d91F9=d91F9-Math.floor(d91F9/100)*100;if((d91F9%2)==0)return true;else return false}function NT1E(p2n){if(isNaN(p2n[0]))p2n.sort();else p2n.sort(m_L2);var o3o=new Array();o3o.push(p2n[0]);for(var item=1;item<p2n.length;item++){if(p2n[item]!=o3o[o3o.length-1])o3o.push(p2n[item])}return o3o}function Hj0(input,ch08){for(var item in input)ch08[item]=input[item]}function m_L2(a,b){return a-b}function round(_g58G){return Math.round(_g58G)}function u0f(i){var W02x7=i.length;if(i.substring((W02x7-2),W02x7)=="px"){i=i.substring(0,(W02x7-2));i=parseInt(i,10)}return i}function CxH9(){var ck7=new Date();return ck7.getTime()}function f454(){return true}function I43c(){return false}VEg8();function VEg8(){FQ0s=new Array()}function ofM2w($t$h3,value){if(typeof(value)=="object"){FQ0s[$t$h3]=new Array();for(var item in value){FQ0s[$t$h3][item]=value[item]}}else FQ0s[$t$h3]=value}function $R51J($t$h3){if(typeof(FQ0s[$t$h3])!="undefined")return FQ0s[$t$h3];else return false}function print_item(id,Aqsf,coords){switch(id){case "map":var ajU=new Array("map",Y514);ofM2w("printItem",ajU);open_printWindow();break;case "dB":var Y514="<table class=\"printDBTable\"><tr>";var vvR9=1;for(var vnn34 in pFlxv){Y514+="<td>"+g1x7m(pFlxv[vnn34][0],false)+"</td>";if(vvR9==3){Y514+="</tr><tr>";vvR9=1}vvR9++}Y514+="</tr></table>";var ajU=new Array("dB",Y514);ofM2w("printItem",ajU);open_printWindow();break;case "dD":var ajU=new Array("dD",element(D5_a6+"_resultCon").innerHTML);ofM2w("printItem",ajU);open_printWindow();break;default:var F067=D8$(id);var P2S=g1x7m(id,false);var Bq6=x2i4(coords);var ajU=new Array(id,P2S,coords);ofM2w("printItem",ajU);$7GUl("open_printWindow()");move(Bq6[0],Bq6[1],'to');break}}function open_printWindow(){var width=700;var s0mU=window.open("print.html","HTMLImagemapperPrintDialog","top=50,left=50,height=650,width="+width+",resizable=yes,scrollbars=yes,menubar=yes");if(s0mU&&s0mU.focus)s0mU.focus()}Fh0=8;$_1=9;A40D9=10;o9I=12;Gnql=8;lmrv8=11;qAjj=13;Fu4g=3;g6g_=2;p9747=6;_NKr=4;yqMJ=3;k030=5;C2DE=5;D2OB=5;_98RM=6;A6158=5;T465v=6;n75G=7;function $1Q4(){if(g_hasCopyrightInfo){if(!element("copyrightInfo")){var p=qVUv("p");p.style.position="absolute";p.style.top=(g_viewOff[1]+g_viewExt[1]-100)+"px";p.style.left=g_viewOff[0]+"px";p.style.width=g_viewExt[0]-20+"px";p.style.textAlign="center";p.id="copyrightInfo";a0$10(X79RN,p)}if(element("copyrightInfo")){var p=element("copyrightInfo");p.innerHTML=g_copyrightInfo[_8S2U()];p.style.zIndex=yqMJ}}}function DB5ug(id,hY1,action){var Y514="<div onmousedown='"+action+"'>";Y514+='<table class="buttonTable" id="'+id+'_knob" cellpadding="0" cellspacing="0">';Y514+='  <tr>';Y514+='    <td><img src="design/button_lo.gif" width="1" height="1" alt=""></td>';Y514+='    <td style="background:url(design/button_lo.gif) repeat-x; " ></td>';Y514+='    <td><img src="design/button_ro.gif" width="2" height="1" alt=""></td>';Y514+='  </tr>';Y514+='  <tr>';Y514+='    <td style="background:url(design/button_lo.gif) repeat-y; " width="1"></td>';Y514+='    <td height="17" class="buttonContainer">'+hY1+'</td>';Y514+='    <td style="background:url(design/button_r.gif) repeat-y; " width="2"></td>';Y514+='  </tr>';Y514+='  <tr>';Y514+='    <td><img src="design/button_lu.gif" width="1" height="2" alt=""></td>';Y514+='    <td style="background:url(design/button_u.gif) repeat-x; " height="2" ></td>';Y514+='    <td><img src="design/button_ru.gif" width="2" height="2" alt=""></td>';Y514+='  </tr>';Y514+='</table>';Y514+='</div>';return Y514}function ay5_P(){if((typeof(g_mapViewDirs)=="object")&&(g_mapViewDirs.length>=1)){var qg121=0;if(element("infoBar"))qg121=u0f(element("infoBar").style.height);var position=new Array(g_viewOff[0],g_viewOff[1]+qg121);iwr0(position,new Array(g_viewExt[0],40),"changeViewCon",null,null,X79RN);var Y514="<table style='float:right;' cellpadding='0' cellspacing='0' border='0'><tr>";for(var i=0;i<g_mapViewDirs.length;i++){var v2B=DB5ug("change_view"+i,g_mapViewDirs[i][0],'reload_tiles("'+g_mapViewDirs[i][1]+'");');Y514+="<td>"+v2B+"</td>"}Y514+="</tr></table>";element("changeViewCon").innerHTML=Y514;for(var i=0;i<g_mapViewDirs.length;i++){by6_o(element("change_view"+i+"_knob"))}}}function v9l(){if(g_logoSize[1]>=80)var AL1QQ=g_logoSize[1];else var AL1QQ=80;AL1QQ+=10;if(g_hasInfoBar){if(!element("infoBar")){iwr0(g_viewOff,new Array(g_viewExt[0],AL1QQ),"infoBar",null,null,X79RN);_NOt2();mPe44();g1Mh()}Ib5(element("infoBar"),0.6);var style=element("infoBar").style;style.backgroundColor="#fff";style.zIndex=_NKr}}function _NOt2(){if(g_hasInfoBar&g_hasTitle){var YqTyh=qVUv("div");YqTyh.id="titleCon";a0$10(element("infoBar"),YqTyh);element("titleCon").innerHTML=g_title;var style=element("titleCon").style;style.position="absolute";style.top="5px";style.right="5px";style.fontSize="20px";style.textAlign="right"}}function mPe44(){if(g_hasInfoBar&&g_hasComments){var N6YW=qVUv("div");N6YW.id="authorInfoCon";N6YW.innerHTML=g_authorInfo;a0$10(element("infoBar"),N6YW);var style=element("authorInfoCon").style;style.position="absolute";style.bottom="5px";style.right="5px";style.textAlign="right"}}function g1Mh(){if(g_hasInfoBar&g_hasLogo){var I5i7=qVUv("div");I5i7.id="logoCon";a0$10(X79RN,I5i7);var style=element("logoCon").style;style.position="absolute";style.top=(g_viewOff[1]+5)+"px";style.left=(g_viewOff[0]+5)+"px";style.zIndex=_NKr+1;var $tl2=_1q(g_logoPath,g_logoSize,"logo",null,"");a0$10(element("logoCon"),$tl2)}}iG3=0;function inM(){var q1X87=40;var ViA82=new Array(40,40);var frame=qVUv("img");frame.src=g_designDir+"frame.gif";frame.id="bottomFrame";frame.width=g_viewExt[0];frame.height=q1X87;frame.style.position="absolute";frame.style.top=g_viewExt[1]+g_viewOff[1]-q1X87+"px";frame.style.left=g_viewOff[0]+"px";frame.style.zIndex=k030;a0$10(X79RN,frame);var j88=qVUv("img");j88.src=g_designDir+"frameCorner.gif";j88.id="bottomFrameCorner";j88.width=ViA82[0];j88.height=ViA82[1];j88.style.position="absolute";j88.style.top=g_viewExt[1]+g_viewOff[1]-ViA82[1]+"px";j88.style.left=g_viewOff[0]+"px";j88.style.zIndex=C2DE;if(g_zoomFactors.length>1){a0$10(X79RN,j88);iG3+=40}var ljf=35;var n$90=qVUv("div");n$90.id="frameKnobsCon";n$90.style.zIndex=D2OB;n$90.style.verticalAlign="bottom";n$90.style.position="absolute";n$90.style.left=g_viewOff[0]+iG3+5+"px";n$90.style.top=g_viewOff[1]+g_viewExt[1]-ljf+"px";n$90.style.width=g_viewExt[0]-iG3-10+"px";n$90.style.height=ljf-2+"px";n$90.style.overflow="hidden";a0$10(X79RN,n$90)}function G5s8(){var WJs$0="<table cellpadding='0' cellspacing='0' border='0'><tr>";if(g_hasSearch){WJs$0+="<td><input type='text' id='frameSearchInput' size=15 /><a href='javascript:search(\'simple\');'><img id='simpleSearch' src='"+g_designDir+"search.gif' /></a></td><td>"+DB5ug("search",l_advancedSearch,"toggle_search();")+"</td>";iG3+=250}if(g_hasOvMap){WJs$0+="<td>"+DB5ug("ovMap",l_ovMap,"toggle_ovMap();")+"</td>";iG3+=120}if(g_hasLegend){WJs$0+="<td>"+DB5ug("legend",l_legend,"toggle_legend();")+"</td>";iG3+=70}if(g_hasLists){WJs$0+="<td>"+DB5ug("lists",l_lists,"toggle_lists();")+"</td>";iG3+=90}if(g_hasPrintKnob){WJs$0+="<td>"+DB5ug("print",l_print,"print_item(\"map\",0,\"\");")+"</td>";iG3+=90}element("frameKnobsCon").innerHTML+=WJs$0+"<td id='rwInfoCon' class='rwConStyle' ></td></tr></table>";if(element("search_knob"))by6_o(element("search_knob"));if(element("ovMap_knob"))by6_o(element("ovMap_knob"));if(element("legend_knob"))by6_o(element("legend_knob"));if(element("lists_knob"))by6_o(element("lists_knob"));if(element("print_knob"))by6_o(element("print_knob"))}function toggle_search(){if(jxG=="simple"){jxG="advanced";create_dD()}else{jxG="advanced";if(element(D5_a6+"_attlayer")&&element(D5_a6+"_attlayer").style.visibility=="visible"){setSimple();hider(D5_a6)}else create_dD()}}function toggle_ovMap(){if(element("ovMap_attlayer")&&element("ovMap_attlayer").style.visibility=="visible"){delete_crosshair();hider('ovMap')}else{ini_ovMap();update_ovMapCrosshair()}}function toggle_lists(){if(element(BmT+"_attlayer")&&element(BmT+"_attlayer").style.visibility=="visible")hider(BmT);else create_lists()}function toggle_legend(){if(element("legend_attlayer")&&element("legend_attlayer").style.visibility=="visible")hider("legend");else ini_legend()}function urlHandler(){var OT_S0=window.location.search;if(OT_S0!=''){var $M5h=new RegExp("#","");OT_S0=OT_S0.replace($M5h,"");OT_S0=OT_S0.substring(1,OT_S0.length);if(OT_S0.indexOf("&")!=-1){var aM__=OT_S0.split("&");var e21=new Array();for(var i=0;i<Xcx50.length;i++){e21[i]=Xcx50[i].split("=");Y38(e21[i])}}else{var e21=new Array();e21[0]=OT_S0.split("=");Y38(e21[0])}}}function Y38(FTE3){if(FTE3[0]=="center"){var $7Jtu=FTE3[1].split("_");ySKG($7Jtu[0],$7Jtu[1],$7Jtu[2])}if(FTE3[0]=="showinmap"){var $7Jtu=FTE3[1].split("_");var F38="showinmap("+$7Jtu[0]+","+$7Jtu[1]+",'"+$7Jtu[2]+"')";$7GUl(F38)}}function posCalc(){a5_=new Array(g_viewExt[0]-250,80);Xu14=new Array((g_viewOff[0]+g_viewExt[0]-225),round(g_viewOff[1]+g_viewExt[1]-475));K043=new Array(g_viewOff[0]+g_viewExt[0]-300,g_viewOff[0]+100);jG7b0=new Array(round((g_viewExt[0]/2)-(g_dDWidth/2)),g_viewExt[1]-100);Al5IR=new Array(g_viewOff[0]+g_viewExt[0]-450,g_viewOff[1]+150);if(g_viewPosType=="%"){var _4O=new Array();if(document.all)_4O=new Array(document.body.clientWidth,document.body.clientHeight);else _4O=new Array(window.innerWidth,window.innerHeight);g_viewOff=new Array(round(g_viewOff[0]/100*_4O[0]),round(g_viewOff[1]/100*_4O[1]));g_viewExt=new Array(round(g_viewExt[0]/100*_4O[0]),round(g_viewExt[1]/100*_4O[1]))}ySKG(0,round((g_baseMapExt[0]*g_zoomFactors[0])/2),round((g_baseMapExt[1]*g_zoomFactors[0])/2))}function ySKG(Aqsf,x,y){var W_5A2=Aqsf;var foundIt=true;if(x<0||x>(g_baseMapExt[0]*g_zoomFactors[W_5A2]))foundIt=false;if(y<0||y>(g_baseMapExt[1]*g_zoomFactors[W_5A2]))foundIt=false;if(!foundIt){W_5A2=0;x=round((g_baseMapExt[0]*g_zoomFactors[0])/2);y=round((g_baseMapExt[1]*g_zoomFactors[0])/2)}set_zoomLevel(parseInt(W_5A2));var ekII=new Array(parseInt(x)-g_viewExt[0]/2,parseInt(y)-g_viewExt[1]/2);g_picUL=new Array(Math.floor(ekII[0]/g_tSize[0]),Math.floor(ekII[1]/g_tSize[1]));g_iniPxDelta=new Array(g_tSize[0]-round(ekII[0]-(g_picUL[0]*g_tSize[0])),g_tSize[1]-round(ekII[1]-(g_picUL[1]*g_tSize[1])))}function calc_g_viewExt(){if(document.all){if(document.documentElement&&document.documentElement.clientHeight)g_viewExt=new Array(document.documentElement.clientWidth,document.documentElement.clientHeight);else if(document.body)g_viewExt=new Array(document.body.clientWidth,document.body.clientHeight)}else g_viewExt=new Array(window.innerWidth,window.innerHeight)}function n05(){var E53K="http://www.alta4.com/scripts/im_examplesCounter.php?site="+location.href;E53K+="&author="+encodeURIComponent(g_mapGalleryAuthor);E53K+="&title="+encodeURIComponent(g_mapGalleryTitle);E53K+="&comment="+encodeURIComponent(g_mapGalleryComment);E53K+="&copyright="+encodeURIComponent(g_mapGalleryCopyright);E53K+="&email="+encodeURIComponent(g_mapGalleryEmail);E53K+="&industryId="+encodeURIComponent(g_mapGalleryIndustryId);E53K+="&industryText="+encodeURIComponent(g_mapGalleryIndustryText);E53K+="&UL_X="+g_rwUL[0];E53K+="&UL_Y="+g_rwUL[1];E53K+="&LR_X="+g_rwLR[0];E53K+="&LR_Y="+g_rwLR[1];E53K+="&coordSys="+encodeURIComponent(g_coordSys);var f3k8l=g_zoomFactors[0];for(var i=1;i<g_zoomFactors.length;i++)f3k8l+=";"+g_zoomFactors[i];E53K+="&zoomFactors="+f3k8l;var UU973=qVUv("script");UU973.setAttribute("type","text/javascript");UU973.setAttribute("src",E53K);UU973.setAttribute("id",E53K);a0$10(document.getElementsByTagName("head")[0],UU973)}
