/*
alta4 Geoinformatik AG - 01.10.2007
HTML ImageMapper NG AJAX
Version 11.0.6 beta
----------------------------------------------------------

*/
function ini_ovMap(){if(g_hasOvMap){if(!element("ovMap_attlayer")){var position=new Array(g_viewOff[0]+30,g_viewOff[1]+80);var content="<img id='ovMapImg' onmousedown='ovMapClickMover();' src='"+g_maptileimageDir+g_ovMapImgSrc+"' width='"+g_ovMapExt[0]+"' height='"+g_ovMapExt[1]+"' />";var l80V=Y9Ns("ovMap",content,null,position[1],position[0],"none",true,false,true,false,true,"","drag('ovMap');","","delete_crosshair();hider('ovMap');","","",l_ovMap,"minimize_popup('ovMap',"+g_ovMapExt[1]+",null,true,null);update_ovMapCrosshair();");a24.innerHTML+=l80V;element("ovMap_anchor").style.position="relative";element("ovMap_anchor").style.overflow="hidden";if(!g_showOvMapAtStart)hider('ovMap');spY0("ovMap",g_ovMapExt[1]);L66l("ovMap",Pkr);}else{element("ovMapImg").src=g_maptileimageDir+g_ovMapImgSrc;X41g('ovMap');}}}function ini_legend(){if(g_hasLegend){if(!element("legend_attlayer")){var j4r7k=0;var position=new Array(g_viewOff[0]+g_viewExt[0]-g_legendExt[0]-50,g_viewOff[1]+100);var content="<img id='legendImg' src='"+g_maptileimageDir+g_legendImgSrc+"' />";var e0A=g_legendExt[1];if(e0A>=(g_viewExt[1]-150))e0A=g_viewExt[1]-150;var _sRe=Y9Ns("legend",content,null,position[1],position[0],"none",true,false,true,false,true,"","drag('legend');","","hider('legend');","","",l_legend,"minimize_popup('legend',"+e0A+",null,true,null);");a24.innerHTML+=_sRe;if(!g_showLegendAtStart)hider('legend');spY0("legend",e0A);L66l("legend",s6$2);Mt9sm("legend",g_legendExt[0]+20);}else{element("legendImg").src=g_maptileimageDir+g_legendImgSrc;X41g('legend');}}}function delete_crosshair(){delete_obj("topOvMapHair");delete_obj("leftOvMapHair");delete_obj("bottomOvMapHair");delete_obj("rightOvMapHair");delete_obj("ovMapBullsEye");}function update_ovMapCrosshair(){var Dy4=V6N32("ovMap_minimized");if(g_hasOvMap&&element("ovMap_attlayer")&&!Dy4&&element("ovMap_attlayer").style.visibility!="hidden"){var TuI90=e9i();var yx99=V6N32("currMapOff");if(yx99==false)yx99=g_iniPxDelta;var s280=element("ovMap_anchor");var R$9_4=1;var x76=new Array();x76["zIndex"]=Pkr;x76["overflow"]="hidden";var wt0i7=new Array();wt0i7["zIndex"]=Pkr;wt0i7["overflow"]="hidden";var pIhj=new Array(g_baseMapExt[0]*TuI90,g_baseMapExt[1]*TuI90);var oP1=new Array((g_viewExt[0]/pIhj[0]),(g_viewExt[1]/pIhj[1]));var c40=new Array((-yx99[0]/pIhj[0]),(-yx99[1]/pIhj[1]));var GDx97=new Array(round(g_ovMapExt[0]*oP1[0]),round(g_ovMapExt[1]*oP1[1]));var D670=new Array(round(g_ovMapExt[0]*c40[0]),round(g_ovMapExt[1]*c40[1]));var e5ui=M54i(D670,GDx97,R$9_4);var Sy$h=e5ui[0];var bAdas=e5ui[1];var _7$=sq4(new Array(0,round(Sy$h[1]+(0.5*bAdas[1])-R$9_4)));var gnN=sq4(new Array(Sy$h[0],R$9_4));var vi2l0=sq4(new Array(Sy$h[0]+bAdas[0],round(Sy$h[1]+(0.5*bAdas[1])-R$9_4)));var y50=sq4(new Array((g_ovMapExt[0]-(Sy$h[0]+bAdas[0])),R$9_4));var mwmYh=sq4(new Array(round(Sy$h[0]+(0.5*bAdas[0])-R$9_4),0));var j66=sq4(new Array(R$9_4,Sy$h[1]));var dv1=sq4(new Array(round(Sy$h[0]+(0.5*bAdas[0])-R$9_4),Sy$h[1]+bAdas[1]));var N_30=sq4(new Array(R$9_4,(g_ovMapExt[1]-(Sy$h[1]+bAdas[1]))));var NC41=new Array();NC41["onmousedown"]='ovMapClickMover();';if(!element("ovMapBullsEye")){N43x(e5ui[0],e5ui[1],"ovMapBullsEye",NC41,wt0i7,s280);element("ovMapBullsEye").className="cross";}else G379(element("ovMapBullsEye"),e5ui[0],e5ui[1],"visible");BL4(mwmYh,j66,"topOvMapHair",x76,s280);BL4(dv1,N_30,"bottomOvMapHair",x76,s280);BL4(_7$,gnN,"leftOvMapHair",x76,s280);BL4(vi2l0,y50,"rightOvMapHair",x76,s280);}}function BL4(L_06c,size,id,style,S5G$){if(size[0]>0&&size[1]>0){if(!element(id)){N43x(L_06c,size,id,null,style,S5G$);element(id).className="hair";}else G379(element(id),L_06c,size,"visible");}else hide(id);}function sq4(w477){if(w477[0]<1)w477[0]=0;if(w477[1]<1)w477[1]=0;if(w477[0]>=g_ovMapExt[0])w477[0]=g_ovMapExt[0]-1;if(w477[1]>=g_ovMapExt[1])w477[1]=g_ovMapExt[1]-1;return w477;}function M54i(L_06c,P894m,R$9_4){if(document.all)R$9_4=0;if(L_06c[0]<1){P894m[0]=P894m[0]+L_06c[0];L_06c[0]=0;}if(L_06c[1]<1){P894m[1]=P894m[1]+L_06c[1];L_06c[1]=0;}if(L_06c[0]+P894m[0]>=g_ovMapExt[0]){P894m[0]=g_ovMapExt[0]-L_06c[0]-2*R$9_4;}if(L_06c[1]+P894m[1]>=g_ovMapExt[1]){P894m[1]=g_ovMapExt[1]-L_06c[1]-2*R$9_4;}if(L_06c[0]>=g_ovMapExt[0]){L_06c[0]=g_ovMapExt[0]-1;P894m[0]=1-2*R$9_4;}if(L_06c[1]>=g_ovMapExt[1]){L_06c[1]=g_ovMapExt[1]-1;P894m[1]=1-2*R$9_4;}if(L_06c[0]==0&&P894m[0]<=0){L_06c[0]=0;P894m[0]=1-2*R$9_4;}if(L_06c[1]==0&&P894m[1]<=0){L_06c[1]=0;P894m[1]=1-2*R$9_4;}return new Array(L_06c,P894m);}function ovMapClickMover(){if(g_hasOvMap&&element("ovMap_attlayer")){var W$52R=V6N32("viewExt");var yx99=V6N32("currMapOff");var r4n5M=e9i();var T8$=element("ovMap_attlayer").style;var L63t=new Array(E7p(T8$.left),E7p(T8$.top));var FlO4=new Array(L63t[0]+9,L63t[1]+28);var P596f=N8AU();var m6025=new Array(P596f[0]-FlO4[0],P596f[1]-FlO4[1]);var rd_A=new Array((g_baseMapExt[0]*r4n5M)/g_ovMapExt[0],(g_baseMapExt[1]*r4n5M)/g_ovMapExt[1]);var n46c7=new Array(round(m6025[0]*rd_A[0]),round(m6025[1]*rd_A[1]));showinmap(null,Fxtq(),n46c7[0]+","+n46c7[1]);}return true;}