/*
alta4 Geoinformatik - ThemeBrowser Extension 1.1
build upon ImageMapper 10.0.25
--------------------------------------------------------------------------

*/
function startUp(){tL5l();config_IM();setTimeout("cDU()",250);}function cDU(){document.getElementsByTagName("body")[0].innerHTML+="<p class='startUpMessage' 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; '>"+g_startUpMessage+"</p>";LjA();u6Th();r226();wI82i();O_g45();_7r();setTimeout("h$BO('Tb4m7()')",250);}function h$BO(o11){var S2W=true;for(var item in A532B){if(!A532B[item].complete){S2W=false;break;}}(S2W)?setTimeout(o11,1):setTimeout("h$BO('"+o11+"')",500);}function Tb4m7(){nk377();J4P();ini_ovMap();ini_legend();Wo0();create_lists();m3t();Hf3w6();L4K();B4Rg5();oa2();rO19();Vnl7();A2I$6();FJp8();tD3U0();update_ovMapCrosshair();kB16();if(g_postToMapGallery)Hwr();try{g_searchFields=g_defaultSearchField.concat(g_searchFields);}catch(e2b){}delete_obj('loadingTxt');HXA();}function _A30w(){delete_obj(g_areaCon);delete_obj(g_areaLay);hide_popup(e_3i7);clear(element(bdM));}function QIXtF(c14j,Oj$dJ){ks00(c14j);nk377();u6Th();r226();clear(element($v03));J4P();B4Rg5();oa2();Hf3w6();update_ovMapCrosshair();TX8();m3t();FJp8();L4K();kB16();HXA();}function rsl(){Ae8=true;delete_obj(g_areaCon);delete_obj(g_areaLay);hide_popup(e_3i7);clear(element(bdM));oK1();}function jo74(y3A){}function RmlI(){Ae8=false;oa2();kB16();update_ovMapCrosshair();HXA();}function v0H(){}$_771=new Array();function D$f3B(W1v){$_771.push(W1v);}function F$526(){if($_771.length>0){var _09Ve=$_771[0];$_771.shift();return _09Ve;}else{return false;}}function HXA(){var p$P=F$526();if(p$P)setTimeout(p$P,5);}hT09=null;$if=null;function tL5l(){hT09=document.getElementsByTagName("body")[0];$if=document.getElementsByTagName("head")[0];}function BmI4(F400y,size,id,X9579,s0J7_,parent){var KC0=VeNQ("div");KC0.setAttribute("id",id);m$sh(KC0,F400y,size,null);if(X9579!=null){for(var item in X9579)KC0.setAttribute(item,X9579[item]);}if(s0J7_!=null){for(var item in s0J7_)KC0.style[item]=s0J7_[item];}N_0(parent,KC0);}function clear(iNu){if(iNu)iNu.innerHTML="";}function element(id){return document.getElementById(id);}function delete_obj(id){if(element(id)){var iNu=element(id);var parent=iNu.parentNode;var G99=parent.removeChild(iNu);}}function m$sh(iNu,F400y,size,Sj32){if(typeof(iNu)=="object"){var U4Gc5=iNu.style;if(F400y!=null){U4Gc5.position="absolute";if(!isNaN(F400y[0]))U4Gc5.left=F400y[0]+"px";if(!isNaN(F400y[1]))U4Gc5.top=F400y[1]+"px";}if(size!=null){if(!isNaN(size[0]))U4Gc5.width=size[0]+"px";if(!isNaN(size[1]))U4Gc5.height=size[1]+"px";}if(Sj32!=null)U4Gc5.visibility=Sj32;}}function VeNQ(element){return document.createElement(element);}function hide(id){if(element(id))element(id).style.visibility="hidden";}function Sj32(id){if(element(id))element(id).style.visibility="visible";}function muI9$(iNu,r06){N_0(iNu,document.createTextNode(r06));}function N_0(MVE6,oMy8){if(MVE6&&oMy8)MVE6.appendChild(oMy8);}function mHN17(iNu){if(document.all)iNu.style.cursor="hand";else iNu.style.cursor="pointer";}function X8Gh(hl04){var Ykvu=hl04;if(hl04>100)Ykvu=Ykvu-Math.floor(Ykvu/100)*100;if((Ykvu%2)==0)return true;else return false;}function R1G(Ra0L){if(isNaN(Ra0L[0]))Ra0L.sort();else Ra0L.sort(is7b);var S16=new Array();S16.push(Ra0L[0]);for(var item=1;item<Ra0L.length;item++){if(Ra0L[item]!=S16[S16.length-1])S16.push(Ra0L[item]);}return S16;}function x02g7(input,V142){for(var item in input)V142[item]=input[item];}function is7b(a,b){return a-b;}function round(v68r9){return Math.round(v68r9);}function EvB_(i){var J0pK=i.length;if(i.substring((J0pK-2),J0pK)=="px"){i=i.substring(0,(J0pK-2));i=parseInt(i,10);}return i;}function uM50(){var Ny5Fw=new Date();return Ny5Fw.getTime();}function f875a(){return true;}function G95(){return false;}BO0();function BO0(){$5CI9=new Array();}function $6075(Y8tj_,value){if(typeof(value)=="object"){$5CI9[Y8tj_]=new Array();for(var item in value){$5CI9[Y8tj_][item]=value[item];}}else $5CI9[Y8tj_]=value;}function $436(Y8tj_){if(typeof($5CI9[Y8tj_])!="undefined")return $5CI9[Y8tj_];else return false;}function print_item(id,MCrc,coords){switch(id){case "map":var KtF=new Array("map",c0KT);$6075("printItem",KtF);open_printWindow();break;case "dB":var c0KT="<table class=\"dashBoardPrintTable\"><tr>";var jCY=1;for(var K2T3i in gK7kN){c0KT+="<td>"+lm74(gK7kN[K2T3i][0],false)+"</td>";if(jCY==3){c0KT+="</tr><tr>";jCY=1;}jCY++;}c0KT+="</tr></table>";var KtF=new Array("dB",c0KT);$6075("printItem",KtF);open_printWindow();break;case "dD":var KtF=new Array("dD",element(t7Y_+"_resultCon").innerHTML);$6075("printItem",KtF);open_printWindow();break;default:var Qm700=uxR88(id);var j4F88=lm74(id,false);var O0u6=Njr75(coords);var KtF=new Array(id,j4F88,coords);$6075("printItem",KtF);D$f3B("open_printWindow()");move(O0u6[0],O0u6[1],'to');break;}}function open_printWindow(){var width=700;var i9596=window.open("print.html","HTMLImagemapperPrintDialog","top=50,left=50,height=650,width="+width+",resizable=yes,scrollbars=yes,menubar=yes");if(i9596&&i9596.focus)i9596.focus();}U0ll5=8;OaY=9;VR_P=10;XY6=12;np83=8;qe9iH=11;d84L9=13;O4Y=3;U8FD=2;$4G3T=6;N3s=4;lSkb$=3;g70=5;f_5=5;Ff2=5;$16k1=6;Um0=5;H4m=6;wuOJD=7;function FJp8(){if(g_hasCopyrightInfo){if(!element("copyrightInfo")){var p=VeNQ("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";p.className="copyright";N_0(hT09,p);}if(element("copyrightInfo")){var p=element("copyrightInfo");p.innerHTML=g_copyrightInfo[V24()];p.style.zIndex=lSkb$;}}}function x7134(id,r06,action){var c0KT="<div onmousedown='"+action+"'>";c0KT+='<table class="buttonTable" id="'+id+'_knob" cellpadding="0" cellspacing="0">';c0KT+='  <tr>';c0KT+='    <td><img src="design/button_lo.gif" width="1" height="1" alt=""></td>';c0KT+='    <td style="background:url(design/button_lo.gif) repeat-x; " ></td>';c0KT+='    <td><img src="design/button_ro.gif" width="2" height="1" alt=""></td>';c0KT+='  </tr>';c0KT+='  <tr>';c0KT+='    <td style="background:url(design/button_lo.gif) repeat-y; " width="1"></td>';c0KT+='    <td height="17" class="knob">'+r06+'</td>';c0KT+='    <td style="background:url(design/button_r.gif) repeat-y; " width="2"></td>';c0KT+='  </tr>';c0KT+='  <tr>';c0KT+='    <td><img src="design/button_lu.gif" width="1" height="2" alt=""></td>';c0KT+='    <td style="background:url(design/button_u.gif) repeat-x; " height="2" ></td>';c0KT+='    <td><img src="design/button_ru.gif" width="2" height="2" alt=""></td>';c0KT+='  </tr>';c0KT+='</table>';c0KT+='</div>';return c0KT;}function tD3U0(){if((typeof(g_mapViewDirs)=="object")&&(g_mapViewDirs.length>=1)){if(element("infoBar"))WL7u=EvB_(element("infoBar").style.height);var position=new Array(g_viewOff[0],g_viewOff[1]+WL7u);BmI4(position,new Array(g_viewExt[0],40),"changeViewCon",null,null,hT09);if(g_themeBrowserAsDropDown){var V565l=document.createElement("select");V565l.id="viewChangeDropDown";for(var i=0;i<g_mapViewDirs.length;i++){var X1fo2=document.createElement("option");X1fo2.text=g_mapViewDirs[i][0];X1fo2.value=i;var $u_x=null;if(document.all)$u_x=V565l.length;V565l.add(X1fo2,$u_x);}V565l.onchange=triggerDropDownViewChange;V565l.selectedIndex=g_mapViewDirs.length-1;element("changeViewCon").style.textAlign="right";element("changeViewCon").appendChild(V565l);}else{var WL7u=0;var c0KT="<table style='float:right;' cellpadding='0' cellspacing='0' border='0'><tr>";for(var i=0;i<g_mapViewDirs.length;i++){var bDoU=x7134("change_view"+i,g_mapViewDirs[i][0],'viewChange("'+i+'");');c0KT+="<td>"+bDoU+"</td>";}c0KT+="</tr></table>";element("changeViewCon").innerHTML=c0KT;for(var i=0;i<g_mapViewDirs.length;i++){mHN17(element("change_view"+i+"_knob"));}}}}function triggerDropDownViewChange(){var selection=element("viewChangeDropDown").selectedIndex;viewChange(selection);}function viewChange(Sul){if(typeof(g_mapViewDirs[Sul])=="object"){var WT2=g_mapViewDirs[Sul];xgd(g_geoTilesDir);g_maptileimageDir=WT2[1];g_attDir=WT2[2];g_geoTilesDir=WT2[3];g_searchDir=WT2[4];g_listsDir=WT2[7];g_searchFields=WT2[5];g_searchChunks=WT2[6];g_lists=WT2[8];if(element("ovMapImg"))element("ovMapImg").src=g_maptileimageDir+g_ovMapImgSrc;if(element("legendImg"))element("legendImg").src=g_maptileimageDir+g_legendImgSrc;delete_obj(g_areaCon);DjG();n7f7();t7373();H9p8();}}function xgd(U9112){var scripts=document.getElementsByTagName("script");var MJQo1=scripts.length;for(var i=0;i<MJQo1;i++){if(typeof(scripts[i])=="object"){if(scripts[i].id.indexOf(U9112)!=-1){try{scripts[i].parentNode.removeChild(scripts[i]);i--;}catch(e2b){}}}}}function m3t(){if(g_logoSize[1]>=80)var i4$f9=g_logoSize[1];else var i4$f9=80;i4$f9+=10;if(g_hasInfoBar){if(!element("infoBar")){BmI4(g_viewOff,new Array(g_viewExt[0],i4$f9),"infoBar",null,null,hT09);i88X();I683();$l29n();}o3eJ(element("infoBar"),0.6);element("infoBar").className="infoBar";element("infoBar").style.zIndex=N3s;}}function i88X(){if(g_hasInfoBar&g_hasTitle){var t9x03=VeNQ("div");t9x03.id="titleCon";N_0(element("infoBar"),t9x03);element("titleCon").innerHTML=g_title;element("titleCon").className="title";var style=element("titleCon").style;style.position="absolute";style.top="5px";style.right="5px";}}function I683(){if(g_hasInfoBar&&g_hasComments){var L8N64=VeNQ("div");L8N64.id="authorInfoCon";L8N64.innerHTML=g_comments;N_0(element("infoBar"),L8N64);var style=element("authorInfoCon").style;element("authorInfoCon").className="comments";style.position="absolute";style.bottom="5px";style.right="5px";}}function $l29n(){if(g_hasInfoBar&g_hasLogo){var qviQ_=VeNQ("div");qviQ_.id="logoCon";N_0(hT09,qviQ_);var style=element("logoCon").style;style.position="absolute";style.top=(g_viewOff[1]+5)+"px";style.left=(g_viewOff[0]+5)+"px";style.zIndex=N3s+1;var B129=uDey_(g_logoPath,g_logoSize,"logo",null,"");N_0(element("logoCon"),B129);}}Yk0$6=0;function rO19(){var mf70=40;var I3j_D=new Array(40,40);var frame=VeNQ("img");frame.src=g_designDir+"frame.gif";frame.id="bottomFrame";frame.width=g_viewExt[0];frame.height=mf70;frame.style.position="absolute";frame.style.top=g_viewExt[1]+g_viewOff[1]-mf70+"px";frame.style.left=g_viewOff[0]+"px";frame.style.zIndex=g70;N_0(hT09,frame);var kci=VeNQ("img");kci.src=g_designDir+"frameCorner.gif";kci.id="bottomFrameCorner";kci.width=I3j_D[0];kci.height=I3j_D[1];kci.style.position="absolute";kci.style.top=g_viewExt[1]+g_viewOff[1]-I3j_D[1]+"px";kci.style.left=g_viewOff[0]+"px";kci.style.zIndex=f_5;if(g_hasZoomBar&(g_zoomFactors.length>1)){N_0(hT09,kci);Yk0$6+=40;}var F400y=35;var v0C$=VeNQ("div");v0C$.id="frameKnobsCon";v0C$.style.zIndex=Ff2;v0C$.style.verticalAlign="bottom";v0C$.style.position="absolute";v0C$.style.left=g_viewOff[0]+Yk0$6+5+"px";v0C$.style.top=g_viewOff[1]+g_viewExt[1]-F400y+"px";v0C$.style.width=g_viewExt[0]-Yk0$6-10+"px";v0C$.style.height=F400y-2+"px";v0C$.style.overflow="hidden";N_0(hT09,v0C$);}function Vnl7(){var B9R7="<table cellpadding='0' cellspacing='0' border='0'><tr>";if(g_hasSearch){B9R7+="<td><input type='text' id='frameSearchInput' size=15 /><a href=\"javascript:search('simple');\"><img id='simpleSearch' src='"+g_designDir+"search.gif' /></a></td><td>"+x7134("search",l_advancedSearch,"toggle_search();")+"</td>";Yk0$6+=250;}if(g_hasOvMap){B9R7+="<td>"+x7134("ovMap",l_ovMap,"toggle_ovMap();")+"</td>";Yk0$6+=120;}if(g_hasLegend){B9R7+="<td>"+x7134("legend",l_legend,"toggle_legend();")+"</td>";Yk0$6+=70;}if(g_hasLists){B9R7+="<td>"+x7134("lists",l_lists,"toggle_lists();")+"</td>";Yk0$6+=90;}if(g_hasPrintKnob){B9R7+="<td>"+x7134("print",l_print,"print_item(\"map\",0,\"\");")+"</td>";Yk0$6+=90;}element("frameKnobsCon").innerHTML+=B9R7+"<td id='rwInfoCon' class='rwConStyle' ></td></tr></table>";if(element("search_knob"))mHN17(element("search_knob"));if(element("ovMap_knob"))mHN17(element("ovMap_knob"));if(element("legend_knob"))mHN17(element("legend_knob"));if(element("lists_knob"))mHN17(element("lists_knob"));if(element("print_knob"))mHN17(element("print_knob"));}function toggle_search(){if(k8x=="simple"){k8x="advanced";create_dD();}else{k8x="advanced";if(element(t7Y_+"_attlayer")&&element(t7Y_+"_attlayer").style.visibility=="visible"){setSimple();hider(t7Y_);}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(c3Rrb+"_attlayer")&&element(c3Rrb+"_attlayer").style.visibility=="visible")hider(c3Rrb);else create_lists();}function toggle_legend(){if(element("legend_attlayer")&&element("legend_attlayer").style.visibility=="visible")hider("legend");else ini_legend();}function urlHandler(){var WUm=window.location.search;if(WUm!=''){var g454=new RegExp("#","");WUm=WUm.replace(g454,"");WUm=WUm.substring(1,WUm.length);if(WUm.indexOf("&")!=-1){var v1Q=WUm.split("&");var q9Q88=new Array();for(var i=0;i<P91C9.length;i++){q9Q88[i]=P91C9[i].split("=");fM92(q9Q88[i]);}}else{var q9Q88=new Array();q9Q88[0]=WUm.split("=");fM92(q9Q88[0]);}}}function fM92(Eu02){if(Eu02[0]=="center"){var r1644=Eu02[1].split("_");kS8(r1644[0],r1644[1],r1644[2],false);}if(Eu02[0]=="centerRW"){var r1644=Eu02[1].split("_");kS8(r1644[0],r1644[1],r1644[2],true);}if(Eu02[0]=="showinmap"){var r1644=Eu02[1].split("_");var S50="showinmap("+r1644[0]+","+r1644[1]+",'"+r1644[2]+"')";D$f3B(S50);}}function posCalc(){H$G=new Array(g_viewExt[0]-250,80);q40=new Array((g_viewOff[0]+g_viewExt[0]-225),round(g_viewOff[1]+g_viewExt[1]-475));uPoK=new Array(g_viewOff[0]+g_viewExt[0]-300,g_viewOff[0]+100);VLmq6=new Array(round((g_viewExt[0]/2)-(g_dDWidth/2)),g_viewExt[1]-100);_78=new Array(g_viewOff[0]+g_viewExt[0]-450,g_viewOff[1]+150);if(g_viewPosType=="%"){var xO_j=new Array();if(document.all)xO_j=new Array(document.body.clientWidth,document.body.clientHeight);else xO_j=new Array(window.innerWidth,window.innerHeight);g_viewOff=new Array(round(g_viewOff[0]/100*xO_j[0]),round(g_viewOff[1]/100*xO_j[1]));g_viewExt=new Array(round(g_viewExt[0]/100*xO_j[0]),round(g_viewExt[1]/100*xO_j[1]));}kS8(0,round((g_baseMapExt[0]*g_zoomFactors[0])/2),round((g_baseMapExt[1]*g_zoomFactors[0])/2),false);}function kS8(MCrc,x,y,m73){var n18=MCrc;var foundIt=true;set_zoomLevel(parseInt(n18));if(m73){var Pm2=ld7qo(new Array(x,y));x=Pm2[0];y=Pm2[1];}if(x<0||x>(g_baseMapExt[0]*g_zoomFactors[n18]))foundIt=false;if(y<0||y>(g_baseMapExt[1]*g_zoomFactors[n18]))foundIt=false;if(!foundIt){n18=0;x=round((g_baseMapExt[0]*g_zoomFactors[0])/2);y=round((g_baseMapExt[1]*g_zoomFactors[0])/2);}var N4fP=new Array(parseInt(x)-g_viewExt[0]/2,parseInt(y)-g_viewExt[1]/2);g_picUL=new Array(Math.floor(N4fP[0]/g_tSize[0]),Math.floor(N4fP[1]/g_tSize[1]));g_iniPxDelta=new Array(g_tSize[0]-round(N4fP[0]-(g_picUL[0]*g_tSize[0])),g_tSize[1]-round(N4fP[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 Hwr(){var b642R="http://www.alta4.com/scripts/im_examplesCounter.php?site="+location.href;b642R+="&author="+encodeURIComponent(g_mapGalleryAuthor);b642R+="&title="+encodeURIComponent(g_mapGalleryTitle);b642R+="&comment="+encodeURIComponent(g_mapGalleryComment);b642R+="&copyright="+encodeURIComponent(g_mapGalleryCopyright);b642R+="&email="+encodeURIComponent(g_mapGalleryEmail);b642R+="&industryId="+encodeURIComponent(g_mapGalleryIndustryId);b642R+="&industryText="+encodeURIComponent(g_mapGalleryIndustryText);b642R+="&UL_X="+g_rwUL[0];b642R+="&UL_Y="+g_rwUL[1];b642R+="&LR_X="+g_rwLR[0];b642R+="&LR_Y="+g_rwLR[1];b642R+="&coordSys="+encodeURIComponent(g_coordSys);var _T2=g_zoomFactors[0];for(var i=1;i<g_zoomFactors.length;i++)_T2+=";"+g_zoomFactors[i];b642R+="&zoomFactors="+_T2;var _586=VeNQ("script");_586.setAttribute("type","text/javascript");_586.setAttribute("src",b642R);_586.setAttribute("id",b642R);N_0(document.getElementsByTagName("head")[0],_586);}
