// Copyright (c) Position s.r.o.
// All rights reserved.

ID_ZEBRASCALE_SPAN="idControlScale";ID_SEARCH_COUNTER="idResultCounter";ID_INFODIV="idInfoDiv";ID_INFODIV_CONTENT="idInformation";ID_INFODIV_TITLE="idInfoDivTitle";ID_INFODIV_BODY="idInfoDivBody";ID_INFODIV_FOOTER="idInfoDivFooter";ID_POIDIV="idPOIDiv";ID_POIDIV_TITLE_L="idPOIDivTitleL";ID_POIDIV_TITLE_R="idPOIDivTitleR";ID_POIDIV_BODY_L="idPOIDivBodyL";ID_POIDIV_BODY_R="idPOIDivBodyR";ID_TIPDIV="idTips";ID_LOCATEPT_ICON="LOCATEPTIcon";DEFAULT_SEARCH_FORM="basic";MAPCOUNTRY="CR";MIN_POPUP_WIDTH=180;
AntennaIconID="idPOIantenna";SEARCH_EXAMPLES=new Array("Liberec","Brno, Absolonova","Praha, Lublaňská 26");RED_ARROW='<img style="border:none;margin-right:5px;" src="../img/item_arrowred.gif" />';var FormValues=[];function preloadImages(a){for(var b=0;b<a.length;b++)(new Image).src=a[b]}function preloadCursor(a){document.createElement("img").src=a}
function formatScaleNumber(a){result="";a=Math.floor(a).toString();for(var b=a.length-3;b>=0;b-=3)result=" "+a.substr(b,3)+result;return result=a.substr(0,a.length-3*Math.floor(a.length/3))+result}
function getElementTopLeft(a){docObj=typeof a!="object"?document.getElementById(a):a;var b=new Array(2);if(document.defaultView){a=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("top");tmphght=a.split("px");b[0]=parseInt(tmphght[0]);a=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("left");tmphght=a.split("px");b[1]=parseInt(tmphght[0])}else{b[0]=document.getElementById(a).offsetTop;b[1]=document.getElementById(a).offsetLeft}return b}
function getElementHeight(a){docObj=typeof a!="object"?document.getElementById(a):a;if(document.defaultView){var b=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("height").split("px");b=parseInt(b[0])}a=docObj.offsetHeight;if(typeof b=="undefined"||a>b)return a;return b}
function getElementWidth(a){docObj=typeof a!="object"?document.getElementById(a):a;if(document.defaultView){tmphght=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("width").split("px");tmphght=parseInt(tmphght[0])}a=docObj.offsetWidth;if(typeof tmphght=="undefined"||a>tmphght)return a;return tmphght}
function getElementMarginH(a){docObj=document.getElementById(a);if(document.defaultView){var b=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("margin-left");a=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("margin-right")}else{b=docObj.currentStyle.marginLeft;a=docObj.currentStyle.marginRight}b=b.split("px");a=a.split("px");return tmphght=parseInt(b[0],10)+parseInt(a[0],10)}
function getElementMarginV(a){docObj=document.getElementById(a);if(document.defaultView){var b=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("margin-top");a=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("margin-bottom")}else{b=docObj.currentStyle.marginTop;a=docObj.currentStyle.marginBottom}b=b.split("px");if(b[0]=="auto")b[0]=0;a=a.split("px");if(a[0]=="auto")a[0]=0;return tmphght=parseInt(b[0],10)+parseInt(a[0],10)}
function UpdateTipsWidth(){var a=document.getElementById("idTips"),b=document.getElementById("idScaleControl"),c=document.getElementById("idMapControls"),d=document.getElementById("idMapBottomControls");if(a&&b&&c&&d){c=getElementWidth("idMapBottomControls");b=getElementWidth("idScaleControl");if(b==0)return false;d=getElementWidth("idMapControls");var e=getElementMarginH("idTips");c=c-b-d-e;a.style.left=b+"px";a.style.width=c+"px"}return true}function renderScaleText(a){return"1 : "+a}
function renderScales(){var a=map.ZoomLevels.length,b,c,d;if(map.ZoomLevels&&map.ZoomLevel>=0){var e=document.getElementById("idScaleHolder");if(e){var f="";f+='<map name="ScaleClickMap" style="outline:none;" hidefocus="true">\n';for(var g=a-1;g>=0;g--){b=(a-1-g)*7;c=b+6;d=renderScaleText(formatScaleNumber(map.ZoomLevels[g]));f+='<area href="javascript:map.SetScale(';f+=map.ZoomLevels[g]+');" onfocus="parent.focus();" style="outline:0;" alt="'+d+'" title="'+d;f+='" shape="rect" coords="'+b+",0,"+
c+',27" />\n'}f+="</map>\n";b=2+(a-1)+a*6;f+='<img src="img/zoom_out.gif" onclick="map.ZoomOut();" title="'+lngIconTitleZoomOut+'" alt="'+lngIconAltZoomOut+'" class="HandCursor" width="24px" height="27px" style="border: none;margin-left:5px;margin-right:0px;padding-right: 0px;"/></a>';f+='<img src="img/zoom_back_.gif" usemap="#ScaleClickMap" class="HandCursor" width="'+b+'px" height="27px"  style="border: none;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;" />';f+='<img src="img/zoom_in.gif" onclick="map.ZoomIn();" title="'+
lngIconTitleZoomIn+'" alt="'+lngIconAltZoomIn+'" class="HandCursor" width="22px" height="27px" style="margin-left:0px;margin-right:6px;padding: 0px;" />';d=renderScaleText(formatScaleNumber(map.ZoomLevels[map.ZoomLevel]));f+='<img class="HandCursor" src="img/zoom_bluerect.gif" width="6px" height="27px" style="position:absolute;left:'+(30+7*(a-1-map.ZoomLevel))+'px;" title="'+d+'" />';e.innerHTML=f}for(a=1;!UpdateTipsWidth();){a++;if(a>1E4)break}}}
function getElementTopBottom(a,b){docObj=document.getElementById(a);if(document.defaultView){a=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("top");var c=document.defaultView.getComputedStyle(docObj,"").getPropertyValue("height");top_=a.split("px");bottom_=c.split("px");b[0]=parseInt(top_[0]);b[1]=parseInt(b[0])+parseInt(bottom_[0])}else{b[0]=docObj.offsetTop;b[1]=docObj.offsetHeight+b[0]}}
function renderMapWin(){var a=new Array(2),b=new Array(2);getElementTopBottom("idArrowLeft",a);getElementTopBottom("imgRightUp",b);var c=a[0]-b[1];newHeight=Math.round(c-((c+(a[1]-b[1]))/2-c));a=document.getElementById("idWinLeft1");b=document.getElementById("idWinRight1");c=document.getElementById("idWinLeft2");var d=document.getElementById("idWinRight2");if(a)a.style.height=newHeight+"px";if(b)b.style.height=newHeight+"px";if(c)c.style.height=newHeight+"px";if(d)d.style.height=newHeight+"px"}
function HiliteImg(a,b){if(a&&b!="")a.src="images/"+b+"_.gif"}function DimImg(a,b){if(a&&b!="")a.src="images/"+b+".gif"}function HiliteImg2(a,b){var c=document.getElementById(a+"1");if(c)c.src="images/"+b+"1_.gif";if(c=document.getElementById(a+"2"))c.src="images/"+b+"2_.gif"}function DimImg2(a,b){var c=document.getElementById(a+"1");if(c)c.src="images/"+b+"1.gif";if(c=document.getElementById(a+"2"))c.src="images/"+b+"2.gif"}
function ImgChange(a,b){if(b=="undefined")b=false;img1=document.getElementById(a);img2=document.getElementById(a+"_");if(img1&&img2){img1.className=b?"hidden":"HandCursor";img2.className=b?"HandCursor":"hidden"}}function CursorChangeDown(a){a&&a.SetCursor(a.CursorPanDown);return true}function CursorChangeUp(a){a&&a.SetCursor(a.CursorPan);return true}
function changeSearch(a){var b=document.getElementById("idSearchForm1"),c=document.getElementById("idSearchForm2");if(b&&c){switch(a){case "basic":b.className="hidden";c.className="blockvisible";SelectedSearchFormType=formid=1;break;case "extended":b.className="blockvisible";c.className="hidden";formid=2;SelectedSearchFormType=0;break;default:break}RenderSearchMenu()}}
function GetFormValue(a,b){var c="";if(a>=0&&a<SearchForms.length/4){var d=SearchForms[a*4+1],e=SearchForms[a*4+2];a=SearchForms[a*4+3];for(var f="",g=0;g<a.length;g++){f=e[g];if(a[g]==b)break}if(b=document.getElementById(f))c=b.value}if(c=="- "+d[g]+" -")c="";return c}function FormMask(a){return"- "+a+" -"}
function SaveFormValue(a,b,c){if(a>=0&&a<SearchForms.length/4){var d=SearchForms[a*4+1],e=SearchForms[a*4+3];if(a=document.getElementById(SearchForms[a*4+2][b]))a.value=c!=""||c=="- "+d[j]+" -"?c:"- "+d[b]+" -"}}function RedrawFormValues(a){var b="";if(a>=0&&a<SearchForms.length/4){var c=SearchForms[a*4+2],d=SearchForms[a*4+3];a=SearchForms[a*4+1];b="";for(var e=null,f=0;f<d.length;f++){b=c[f];if(e=document.getElementById(b)){b=e.value;if(b=="")b=FormMask(a[f]);e.value=b}}}}
function ClearSearchForms(){for(var a=0;a<SearchForms.length/4;a++)for(var b=SearchForms[a*4+2],c=SearchForms[a*4+1],d=0;d<b.length;d++){idInput=b[d];idInput.value=FormMask(c[d])}}function RenderSearchMenu(){var a=SearchForms.length/4;for(j=0;j<a;j++)RedrawFormValues(j)}
function SearchBoxEnter(a){var b=document.getElementById(a);if(b){var c=SelectedSearchFormType,d=SearchForms.length/4;if(c>=0&&c<d){d=SearchForms[c*4+2];c=SearchForms[c*4+1];for(var e=0;e<d.length;e++)if(d[e]==a)break;if(b.value=="- "+c[e]+" -")b.value=""}}}
function SearchBoxLeave(a){var b=document.getElementById(a);if(b)if(b.value==""){var c=SelectedSearchFormType,d=SearchForms.length/4;if(c>=0&&c<d){d=SearchForms[c*4+2];c=SearchForms[c*4+1];for(var e=0;e<d.length;e++)if(d[e]==a)break;b.value="- "+c[e]+" -"}}}function SearchKeyPress(a){if(!a)a=window.event;if((a.which?a.which:a.keyCode)==13){Search();return false}return true}function ShowInfo(){ClearInfoDiv();document.getElementById(ID_INFODIV).style.visibility="visible"}
function HideSearch(){var a=document.getElementById(ID_INFODIV);if(a)a.style.visibility="hidden";window.places&&places.ClearDisplayedItems();window.customplaces&&customplaces.ClearDisplayedItems()}function gotoSearchExample(a){if(SelectedSearchFormType==1){var b=document.getElementById(SearchForms[6][0]);if(b)b.value=SEARCH_EXAMPLES[a];Search()}}
function clickFullScreen(a){if(a)window.close();else{a=window.screen.width;var b=window.screen.height,c="";if(document.all&&navigator.userAgent.indexOf("Opera")==-1)c="1";c="index.php?x="+a+"&y="+b+"&f=1&ie="+c;if(map){if(map.ZoomLevel!=map.ZoomLevels.length-1)c+="&SESS="+map.MapSession+"&SESSX="+map.X+"&SESSY="+map.Y;c+="&lang="+Lang;if(map.Mode){c+="&MAPMODE=";if(map.Mode!="")c+=ng_URLEncode(map.Mode)}if(map.Coverage){c+="&ACTIVECOV=";if(map.Coverage&&map.Coverage>=0)c+=map.Coverage}if(map.LayerStates){c+=
"&ACTIVELAY=";for(var d=0;d<map.LayerStates.length;d++){if(d>0)c+=";";c+=map.LayerStates[d]?"1":"0"}}}var e=SelectedSearchFormType;d=0;d=SearchForms[e*4+1];d=SearchForms[e*4+2];var f=SearchForms[e*4+3],g="";for(d=0;d<f.length;d++){g=GetFormValue(e,f[d]);if(g!="")c+="&SEARCH"+d+"="+g}c+="&SEARCHFIELDS="+f.length;if(SelectedSearchForm>=0)c+="&SEARCHFORM="+SelectedSearchFormType;window.open(c,"","fullscreen=yes, scrollbars=yes, width="+a+", height="+b+", top=0, left=0")}}
function clickPrint(){if(map){var a=720,b=600;if(a>screen.width)a=screen.width;if(b>screen.height)b=screen.height;var c=(screen.width-a)/2,d=(screen.heigh-b)/2;if(c<0)c=0;if(d<0)d=0;var e="";if(map.Coverage>=0)e+=map.Coverage;e="../src/print.php?ACOV="+e+"&"+map.URLStateParams();if(window.Lang)e+="&lang="+Lang;(a=window.open(e,"print","width="+a+",height="+b+",scrollbars=yes,menubar=yes,resizable=yes,left="+c+",top="+d))&&a.focus()}}
function clickHome(){map.ZoomMode();map.Home&&map.Home();ClearSearchForms();changeSearch(DEFAULT_SEARCH_FORM);ClearInfoDiv();window.places&&places.ClearDisplayedItems();window.customplaces&&customplaces.ClearDisplayedItems();map.RemovePopupIconByID(ID_LOCATEPT_ICON)}
function CheckLayer(a){if(map&&map.LayerStates){ActiveNearestResults==a&&map.LayerStates[a]&&HideSearch();map.LayerStates[a]=!map.LayerStates[a];setCheckImage("idLayer"+a,map.LayerStates[a]);map.MapCommand(map.LayerStates[a]?"EL":"DL",a)}}function CheckCoverage(a){if(map){for(var b=0;b<Coverage.length;b++)b!=a&&setCheckImage("idCoverage"+b,false);switchCheckImage("idCoverage"+a);map.MapCommand("CE",a)}}
function Search(){for(var a=false,b=SelectedSearchFormType,c=SearchForms[4*b+1],d=SearchForms[4*b+2],e=SearchForms[4*b+3],f="",g="",h=0;h<c.length;h++)if(document.getElementById(d[h]))switch(e[h]){case "city":f=GetFormValue(b,e[h]);if(f!="")a=true;break;case "street":g=GetFormValue(b,e[h]);if(g!="")a=true;break;case "cp":cp=GetFormValue(b,e[h]);if(cp!="")a=true;break;case "co":co=GetFormValue(b,e[h]);if(co!="")a=true;break}if(a){ActiveNearestResults=-1;GotoInfoDivElement();SetInfoBody(lngMessageWaitSearching);
ResetPOILocation();SwitchInfoPanel(0);switch(b){case 0:places.SearchAddress(f,g,cp,co);break;case 1:places.Search(f);break;default:ClearInfoFooter()}}}function ClearSearchCounter(){var a=document.getElementById(ID_SEARCH_COUNTER);if(a)a.innerHTML=""}function StartSearch(){ShowInfo();SetInfoTitle(lngSearchResults);SetInfoBody(lngMessageWaitSearching);return true}function StopSearch(){SetInfoBody("");ClearInfoFooter()}
function NextPage(){SetInfoBody(lngMessageWaitSearching);searchresults&&searchresults.NextPage()}function PrevPage(){SetInfoBody(lngMessageWaitSearching);searchresults&&searchresults.PrevPage()}function IsPrevPlaceVisible(a){if(typeof a.PrevVisible!="undefined"&&a.PrevVisible||typeof a.Params!="undefined"&&a.Params.PrevVisible)return true;return false}
function IsNextPlaceVisible(a){if(typeof a.NextVisible!="undefined"&&a.NextVisible||typeof a.Params!="undefined"&&a.Params.NextVisible)return true;return false}function renderSearchPlacesDesc(a){switch(a.Params.SearchType){case "city":for(var b in a.Results){var c=a.Results[b].city,d=getCityStatusFromCode(a.Results[b].statusKod),e="";e+=empty(c)?d:c+", "+d;a.Results[b].descr=e}break;default:break}}
function getCityStatusFromCode(a){var b=a,c=lngCityStatusCode;if(parseInt(a)!="NaN"&&typeof c[a]!="undefined")b=c[a];return b}
function DisplaySearchResults(a){map.PanMode();if(a.Results.length>0){searchresults=a;var b="";classname=' class="SearchResults';b+="<div "+classname+' style="position:relative;height:132px;/*background-color:#33cc33;*/">';if(typeof a.Params!="undefined"&&typeof a.Params.SearchType!="undefined")a.Params.SearchType=="nearest"?renderNearestResultsDesc(a):renderSearchPlacesDesc(a);for(var c=0;c<a.Results.length;c++){if(typeof a.Results[c].statusKod!="undefined")a.Results[c].statusKod=getCityStatusFromCode(a.Results[c].statusKod);
b+="<div>";b+='<span style="margin-right: 5px">';b+='<img src="img/item_arrowred.gif" width="6px" height="5px"/>';b+="</span><span>";if(typeof a.Results[c].dist!="undefined")b+=a.Results[c].dist+"&nbsp;&nbsp;";b+='<a href="javascript:LocateItem('+c+');" hidefocus="true">'+a.Results[c].descr+"</a>";b+="</span>";b+="</div>"}SetInfoBody(b);b="";c=IsPrevPlaceVisible(a);var d=IsNextPlaceVisible(a);if(c){if(typeof a.Params=="undefined"||typeof a.Params.PageFrom=="undefined"||typeof a.Params.PageTo=="undefined")var e=
a.PageFrom,f=a.PageTo;else{e=a.Params.PageFrom;f=a.Params.PageTo}b+=lngResults+" "+e+".."+f+"&nbsp|&nbsp";b+='<a href="javascript:PrevPage();">&laquo;&nbsp;';b+=lngPrevious;b+="</a>"}if(d){if(c)b+="&nbsp;|&nbsp;";b+='<a href="javascript:NextPage();">';b+=lngNext;b+="&nbsp;&raquo;</a>"}SetInfoFooter(b);GotoInfoDivElement();a.Results.length==1&&LocateItem(0)}}
function DisplaySearchError(a){var b="";switch(a){case -3:b=lngErrorInvalidID;break;case -2:b=lngErrorInvalidLayer;break;case -1:default:b=lngErrorNoResults;break}SwitchInfoPanel(0);SetInfoBody(b);ClearInfoFooter();GotoInfoDivElement()}function EnableLayer(a){if(map.LayerStates&&!map.LayerStates[a]){map.LayerStates[a]=!map.LayerStates[a];map.MapCommand("EL",parseInt(a))}}
function FindNearest(a){if(map){if(proj){GotoInfoDivElement();proj.NearestLayer=a;proj.OnCalculate=function(c,d){d&&nearest.NearestToPos("O2"+c.NearestLayer,d,MAPCOUNTRY)};var b=new ScreenPt(map.PopupX,map.PopupY);proj.Pixels2Proj(b)}ActiveNearestResults=a;map.HideMapMenu();EnableLayer(a)}}
function FindNearestToPos(a){if(POI_Location!="")if(map){if(proj){GotoInfoDivElement();nearest&&nearest.OnSearch();SwitchInfoPanel(0);proj.NearestLayer=a;proj.OnCalculate=function(c,d){d&&nearest.NearestToPos("O2"+c.NearestLayer,d,MAPCOUNTRY)};var b=new ScreenPt(POI_Location.x,POI_Location.y);proj.Pixels2Proj(b)}ActiveNearestResults=a;map.HideMapMenu();EnableLayer(a)}}
function SwitchInfoPanel(a){var b=document.getElementById(ID_INFODIV_CONTENT),c=document.getElementById(ID_POIDIV);switch(parseInt(a)){case 0:if(b)b.className="InfoDivContent";if(c)c.className="hidden";break;case 1:if(b)b.className="hidden";if(c)c.className="InfoDivContent";break;default:break}}function SetInnerHTML(a,b){if(a=document.getElementById(a))a.innerHTML=b}function GetInnerHTML(a){if(a=document.getElementById(a))return a.innerHTML;return""}
function AppendInnerHTML(a,b){if(a=document.getElementById(a))a.innerHTML+=b}function SetInfoTitle(a){SetInnerHTML(ID_INFODIV_TITLE,a)}function SetInfoBody(a){SetInnerHTML(ID_INFODIV_BODY,a);hideFocusOutlineOnLinks(ID_INFODIV_BODY)}function AppendInfoBody(a){AppendInnerHTML(ID_INFODIV_BODY,a);hideFocusOutlineOnLinks(ID_INFODIV_BODY)}function ElementAddClassTo(a,b){if(a=document.getElementById(a)){var c=a.className.split(" ",2);if(b!="")b=" "+b;a.className=c[0]+b}}
function SetInfoFooter(a){SetInnerHTML(ID_INFODIV_FOOTER,a);var b="",c="";if(a==""||typeof a=="undefined"){b="fontSize0";c="higherInfoBody"}ElementAddClassTo(ID_INFODIV_FOOTER,b);ElementAddClassTo(ID_INFODIV_BODY,c);hideFocusOutlineOnLinks(ID_INFODIV_FOOTER)}function ClearInfoDiv(){ClearInfoFooter();SetInfoBody("");SetInfoTitle("")}function ClearInfoFooter(){SetInfoFooter("")}function GotoInfoDivElement(){(oInfoDiv=document.getElementById(ID_INFODIV_CONTENT))&&oInfoDiv.scrollIntoView()}
function GotoTopElement(){window.scrollTo(0,0)}function SetPOITitles(a,b){a!=-1&&SetInnerHTML(ID_POIDIV_TITLE_L,a);b!=-1&&SetInnerHTML(ID_POIDIV_TITLE_R,b)}function SetPOIBodies(a,b){a!=-1&&SetInnerHTML(ID_POIDIV_BODY_L,a);b!=-1&&SetInnerHTML(ID_POIDIV_BODY_R,b);hideFocusOutlineOnLinks(ID_POIDIV)}
function RenderPOImenu(a){var b=true,c=true;if(POIclicked)b=false;if(typeof a=="object")c=false;if(b){SetPOITitles(lngAvailableSignals,lngNearestObjects);a="";if(LayerNearestTitles.length>0)for(b=0;b<LayerNearestTitles.length;b++){a+=RED_ARROW+'&nbsp;<a href="javascript:FindNearestToPos('+b+')">';a+=LayerObjectNames[b].toLowerCase()+"</a><br />"}}else{SetPOITitles(lngAvailableSignals,-1);a=-1}if(c){c=lngMessageWaitLoading;POILocated||(c="")}else{c="";if(typeof AvailCoverage!="undefined"&&POI_Location!=
""){for(b=0;b<AvailCoverage.length;b++)c+="<a href=\"javascript:CheckCoveragePOI('"+AvailCoverage[b][1]+"')\">"+AvailCoverage[b][0]+"</a><br />";if(AvailCoverage.length==0)c=lngNoCoverage}}SetPOIBodies(c,a);return true}
function RenderPOIPopup(a){var b="";if(typeof AvailCoverage!="undefined"&&POI_Location!=""){for(var c=0;c<AvailCoverage.length;c++)b+="<a href=\"javascript:CheckCoveragePOI('"+AvailCoverage[c][1]+"')\">"+AvailCoverage[c][0]+"</a><br />";if(AvailCoverage.length==0)b=lngNoCoverage}a.PopupIcons[AntennaIconID].descr=a.CreatePopupHTML(lngAvailableSignals,b);a.ShowPopupByID(AntennaIconID)}function CheckCoveragePOI(a){POIdontReset=true;CheckCoverage(a)}
function RestoreCmdFinished(){map.OnCommandFinished=cmdFinishedBackupForPOI}function RedirectCmdFinished(a){cmdFinishedBackupForPOI=map.OnCommandFinished;map.OnCommandFinished=typeof a!="undefined"&&a=="dataloaded"?POIloaded2:POIloaded}function POIloaded(){map.OnCommandFinished=cmdFinishedBackupForPOI}
function POIloaded2(a){a.OnCommandFinished=cmdFinishedBackupForPOI;if(POIRequestCoords==POI_Location.x+";"+POI_Location.y){RenderPOImenu(a);PlaceAntenna(a);RenderPOIPopup(a)}else a.RemovePopupIconByID(AntennaIconID)}function POISetMapPosition(a){if(a)if(proj){proj.OnCalculate=function(c,d){if(d)a.PopupIcons[AntennaIconID].pos=d};var b=new ScreenPt(POI_Location.x,POI_Location.y);proj.Pixels2Proj(b)}}
function UpdatePOImenu(){if(map)if(proj){proj.OnCalculate=function(b,c){if(c)map.PopupIcons[AntennaIconID].pos=c;RedirectCmdFinished("dataloaded");map.MapCommand("AVAILCOV","&pos="+c+"&cnt="+AvailCovCmdRunning+"&coords="+AvailCovCoords)};var a=new ScreenPt(POI_Location.x,POI_Location.y);RenderPOImenu();proj.Pixels2Proj(a)}}function POISendRequest(a,b){AvailCovCmdRunning++;AvailCovCoords=a+";"+b;UpdatePOImenu()}
function AddIconAntenna(a){if(a){bak_pos=bak_desc="";if(a.PopupIconExists(AntennaIconID)){bak_desc=a.PopupIcons[AntennaIconID].descr;bak_pos=a.PopupIcons[AntennaIconID].pos;a.RemovePopupIconByID(AntennaIconID)}var b=ScreenPt(a.MouseX,a.MouseY),c=new ScreenPt(15,23);a.AddPopupIcon(AntennaIconID,"../img/antenna.png",b,bak_desc,c);a.PopupIcons[AntennaIconID].pos=bak_pos}}
function PlaceAntenna(a,b,c){b=new ScreenPt(POI_Location.x,POI_Location.y);AddIconAntenna(a);if(c)a.PopupIcons[AntennaIconID].descr=a.CreatePopupHTML(lngAvailableSignals,lngMessageWaitLoading);a.DrawPopupIcon(AntennaIconID,b);return b}function DrawAntenna(a,b){var c=map;a=new ScreenPt(a,b);c.RemovePopupIconByID(AntennaIconID);c.DrawPopupIcon(AntennaIconID,a)}function HideIcon(){map&&map.RemovePopupIconByID(AntennaIconID)}
function LeftMouseButton(a){if(typeof ngIExplorer!="undefined"&&ngIExplorer&&a.button==1)return true;if(typeof ngOpera!="undefined"&&a.button==0)return true;if(typeof window.event=="undefined"&&a.button==0)return true;return false}
function POIMouseDown(a,b){if(!LeftMouseButton(b))return true;POIbeingLocated=true;POI_Location=new ScreenPt(a.MouseX,a.MouseY);typeof IDAntennaTimer!="undefined"&&window.clearTimeout(IDAntennaTimer);DrawAntenna(POI_Location.x,POI_Location.y);if(!POIclicked){ActiveNearestResults=-1;ShowInfo();SwitchInfoPanel(1)}IDAntennaTimer=window.setTimeout("POIcallSendRequest("+a.MouseOnMap+","+POI_Location.x+","+POI_Location.y+");",500);return POIclicked=true}
function StopMoveAntenna(){DrawAntenna(POI_Location.x,POI_Location.y)}function POIcallSendRequest(a,b,c){if(typeof a!="undefined"&&a)POISendRequest(b,c);else{HideIcon();POI_Location="";POILocated=false;RenderPOImenu(map)}}
function POIMouseMove(a){if(typeof POIbeingLocated=="undefined"||!POIbeingLocated)return true;typeof IDAntennaTimer!="undefined"&&window.clearTimeout(IDAntennaTimer);a.RemovePopupIconByID(AntennaIconID);POI_Location=new ScreenPt(a.MouseX,a.MouseY);IDAntennaTimer=window.setTimeout("POIcallSendRequest("+a.MouseOnMap+","+POI_Location.x+","+POI_Location.y+");",500);if(ngIExplorer){typeof IDAntennaMOVEtimer!="undefined"&&window.clearTimeout(IDAntennaMOVEtimer);IDAntennaMOVEtimer=window.setTimeout("StopMoveAntenna();",
50)}return true}POImodeBak=new function(){this.AllowCtrlBak=this.MapMenuBak=null;this.POIon=function(a){this.MapMenuBak=a.OnMapMenu;a.OnMapMenu=null;this.AllowCtrlBak=a.AllowCtrl;a.AllowCtrl=false};this.POIoff=function(a){a.OnMapMenu=this.MapMenuBak;a.AllowCtrl=this.AllowCtrlBak}};
function POIMouseUp(a,b){if(!LeftMouseButton(b))return true;POIbeingLocated=a.MouseDown=false;typeof IDAntennaTimer!="undefined"&&window.clearTimeout(IDAntennaTimer);if(a.MouseOnMap)if(POI_Location.x!=a.MouseX||POI_Location.y!=a.MouseY||typeof AvailCovCoords=="undefined"||POI_Location.x+";"+POI_Location.y!=AvailCovCoords){pos=PlaceAntenna(a,b,true);POI_Location=new ScreenPt(pos.x,pos.y);POILocated=true;POISendRequest(POI_Location.x,POI_Location.y)}else{PlaceAntenna(a,b);POISetMapPosition(a);RenderPOIPopup(a)}else{HideIcon();
POI_Location="";POILocated=false;RenderPOImenu(a)}return true}function ResetPOILocation(){if(window.POILocated)if(typeof POIdontReset=="undefined"||!POIdontReset){map.RemovePopupIconByID(AntennaIconID);POILocated=false;POI_Location="";POIclicked=false;AvailCovCmdRunning=0;SwitchInfoPanel(0);RestoreCmdFinished()}else UpdatePOImenu();POIdontReset=false;return true}function PopupCenter(){map.Center(map.PopupX,map.PopupY);map.HidePopup()}
function PopupMaxDetail(){map.MaxDetail(map.PopupX,map.PopupY);map.HidePopup()}function PopupScale200(){map.SetScale(2E5,map.PopupX,map.PopupY);map.HidePopup()}
function RenderNearestPopUpMenu(a,b,c,d){c="";if(LayerNearestTitles.length>0){c+=RED_ARROW+lngFindNearest+" <br />";for(i=0;i<LayerNearestTitles.length;i++){c+='&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:FindNearest('+i+')">';c+=LayerNearestTitles[i].toLowerCase()+"</a><br />"}}c+=RED_ARROW+'<a href="javascript:PopupCenter();">'+lngCenterMap+"</a><br />";c+=RED_ARROW+'<a href="javascript:PopupMaxDetail();">'+lngMaximalDetail+"</a><br />";if(typeof d!="undefined"&&d!="")c+=RED_ARROW+d;return a.CreatePopupHTML(b,
c)}function RenderDefaultPopUpMenu(a,b,c,d){c="";c+=RED_ARROW+'<a href="javascript:PopupCenter();">'+lngCenterMap+"</a><br />";c+=RED_ARROW+'<a href="javascript:PopupMaxDetail();">'+lngMaximalDetail+"</a><br />";if(typeof d!="undefined"&&d!="")c+=RED_ARROW+d;return a.CreatePopupHTML(b,c)}function ClosePopup(){window.customplaces&&customplaces.ClearDisplayedItems&&customplaces.ClearDisplayedItems();window.places&&places.ClearDisplayedItems&&places.ClearDisplayedItems()}
function SearchMenu(a,b){return RenderNearestPopUpMenu(a,b.descr,ngOpera)}function ItemPopupMenu(a,b){return RenderDefaultPopUpMenu(a,b.descr,ngOpera)}function MapMenuPos(a){return RenderNearestPopUpMenu(a,lngAtThisPlace,ngOpera)}function ActiveObjectMenu(a,b,c){return RenderDefaultPopUpMenu(a,c.descr,false,'<a href="javascript:Detail('+c.objid+",'"+b.objid+"');\">"+lngMoreInformation+"</a><br />")}
function Detail(a,b,c){switch(b){case "O2:ATMs":phpscript="src/detail_atm.php";infoTitle=lngActiveObjects[0];break;case "O2:Shops":phpscript="src/detail_shop.php";infoTitle=lngActiveObjects[1];break;case "O2:Hotspots":phpscript="src/detail_hotspot.php";infoTitle=lngActiveObjects[2];break;case "O2:Markets":phpscript="src/detail_market.php";infoTitle=lngActiveObjects[3];break;default:return}SwitchInfoPanel(0);SetInfoTitle(infoTitle);SetInfoBody(lngMessageWaitLoading);ClearInfoFooter();ShowInfo();GotoInfoDivElement();
if(!c||c=="undefined")c="";phpscript!=""&&places.ProcessUrl("../"+phpscript+"?id="+a+c+"&lang="+Lang)}function MeasureWidth(a,b){b=typeof b!="object"||!b?document.body:b;var c=document.createElement("DIV");if(!c)return false;c.style.position="absolute";c.style.visibility="hidden";c.innerHTML=a;b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}
function O2_CreatePopup(a,b,c,d,e,f){if(a){var g="http://"+document.domain+"/img/",h=new Array(2,3),l=new Array(1,1),o='<div id="idMAPPopupShadow" style="position:absolute;left:'+h[0]+"px;top:"+h[1]+'px;width:1px;height:1px"></div>',p='<div id="idMAPPopupShadow" style="position:absolute;left:'+h[0]+'px;top:0px;width:1px;height:1px"></div>',k=MeasureWidth(d,a);if(k===false||k<MIN_POPUP_WIDTH)k=MIN_POPUP_WIDTH;a.innerHTML=o+'<div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2" style="width:'+k+'px">'+
d+"</div>";a.style.width=k+"px";var n=false,m=false;if(b+k-10>this.MapWidth+e)if(b-k+10+2>=e)n=true;if(c-a.offsetHeight-2>f)m=true;if(m)c+=-a.offsetHeight-2;if(n)b+=-k+10+2;else b-=11;d=m?o+'<div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2" style="width:'+k+'px">'+d+'</div><div id="idMAPPopupArrow" style="z-index: 503; position: relative; top:-1px; text-align:'+(n?"right":"left")+'"><img src="'+g+'window_arr_down.gif" style="vertical-align:top;" width="23" height="6" alt="" border="0" /></div>':
'<div id="idMAPPopupArrow" style="position: relative; z-index: 503; font-size:0px;text-align:'+(n?"right":"left")+'"><img src="'+g+'window_arr_up.gif" style="vertical-align:bottom;" width="23" height="6" alt="" border="0" /></div>'+p+'<div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2" style="position: relative; top: -1px;width:'+k+'px;">'+d+"</div>";a.innerHTML=d;a.style.left=b+"px";a.style.top=c+"px";b=document.getElementById("idMAPPopupShadow");c=getElementHeight("idMAPPopupFrameO2")+(l[1]-h[1]);
l=getElementWidth("idMAPPopupFrameO2")+(l[0]-h[0]);if(b){b.style.height=c+"px";b.style.width=l+"px";if(!m)if(m=document.getElementById("idMAPPopupArrow"))b.style.top=getElementHeight(m)+h[1]-1+"px"}a.style.visibility="visible";hideFocusOutlineOnLinks(a)}}
function O2_CreatePopup_old(a,b,c,d,e,f){if(a){var g="http://"+document.domain+"/img/";horizshadow='<div id="idMAPPopupFrameShadowH" class="csMAPPopupFrameShadowH"></div>';horizshadow2='<div id="idMAPPopupFrameShadowH" class="csMAPPopupFrameShadowH" style="bottom:2px;"></div>';verticalshadow='<div id="idMAPPopupFrameShadowV" class="csMAPPopupFrameShadowV"></div>';cornershadow='<div id="idMAPPopupFrameShadowCorner" class="csMAPPopupFrameShadowC"></div>';a.innerHTML='<div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2">'+
d+horizshadow+"</div>";var h=false,l=false;if(b+a.offsetWidth-10>this.MapWidth+e){h=true;b+=-a.offsetWidth+10+2}else b-=11;ShadowCornerTop=a.offsetHeight-4;if(c-a.offsetHeight-2>f){l=true;c+=-a.offsetHeight-2}d=l?'<div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2">'+verticalshadow+d+cornershadow+"</div>"+horizshadow+'<div style="z-index: 503; position: relative; top:-3px; text-align:'+(h?"right":"left")+'"><img src="'+g+'window_arr_down.gif" style="vertical-align:top;" width="23" height="6" alt="" border="0" /></div>':
'<div style="position: relative; z-index: 503; font-size:0px;text-align:'+(h?"right":"left")+'"><img src="'+g+'window_arr_up.gif" style="vertical-align:bottom;" width="23" height="6" alt="" border="0" /></div><div id="idMAPPopupFrameO2" class="csMAPPopupFrameO2" style="position: relative; top: -1px;">'+verticalshadow+d+cornershadow+"</div>"+horizshadow2;a.innerHTML=d;for(d=getElementHeight("idMAPPopupFrameO2");d==0||d==false;)d=getElementHeight("idMAPPopupFrameO2");if(e=document.getElementById("idMAPPopupFrameShadowV")){e.style.top=
"1px";e.style.height=d-2+"px"}if(d=document.getElementById("idMAPPopupFrameShadowCorner")){if(!l){ShadowCornerTop--;d.style.right="-2px"}d.style.top=ShadowCornerTop+"px"}a.style.left=b+"px";a.style.top=c+"px";a.style.visibility="visible";hideFocusOutlineOnLinks(a)}}
function LocateItem(a){if(searchresults){var b=Array("H","P","D");if(ActiveNearestResults>=0&&ActiveNearestResults<b.length)searchresults.SearchType=b[ActiveNearestResults];window.places&&places.ClearDisplayedItems();window.customplaces&&customplaces.ClearDisplayedItems();GotoTopElement();switch(searchresults.SearchType){case "H":case "P":case "D":LocateNearest(searchresults,a);return;default:GotoTopElement();searchresults.LocateItem(a);return}}}
function LocateMapXY(a,b,c){if(map){NearestPopupLay=Layers[a];NearestPopupObjID=c;map.ActiveCommandCallback=ShowNearestPopup;GotoTopElement();map.LocateScaleXY("max",b)}}function LocateAfterLayerOn(a){map.ActiveCommandCallback=ShowNearestPopup;if(map.PositionToLocateTo){GotoTopElement();map.LocateScaleXY("max",map.PositionToLocateTo)}return true}
function LocateMapGC(a,b,c){if(map){NearestPopupLay=Layers[a];NearestPopupObjID=c;map.PositionToLocateTo=b;map.ActiveCommandCallback=LocateAfterLayerOn;EnableLayer(a)}}function LocateLayerObjectRPC(a){LocateLayerObject(a.LocateLayerObject_Layer,a.LocateLayerObject_Geocode,a.LocateLayerObject_ObjID)}
function LocateLayerObject(a,b,c){if(map){OnTilesLoadedBak=map.OnTilesLoaded;map.OnTilesLoaded=ShowLayerObjectPopup;if(parseInt(a)!="NaN")a=parseInt(a);NearestPopupLay=a;NearestPopupObjID=c;map.MapCommand("LOCATELAYEROBJ","&layer="+a+"&position="+ng_URLEncode(b)+"&scale=max")}}function ShowLayerObjectPopup(a){if(OnTilesLoadedBak)a.OnTilesLoaded=OnTilesLoadedBak;a.ShowActiveObjPopupByID(NearestPopupLay,NearestPopupObjID);a.OnTilesLoaded(this);return true}
function ShowNearestPopup(a){if(typeof NearestPopupLay=="string")for(var b=0;b<Layers.length;b++)if(Layers[b]==NearestPopupLay)break;a.ShowActiveObjPopupByID(NearestPopupLay,NearestPopupObjID)}function LocateNearest(a,b){var c=a.Results[b].id.split("_");if(c.length>=2){NearestPopupLay=c[0];NearestPopupObjID=c[1];map.ActiveCommandCallback=ShowNearestPopup}a=a.Results[b].pos;GotoTopElement();map.LocateScaleXY("max",a)}
function BeforeSetMapMode(a,b){if(a.Mode=="L"){if(a.Mode==b)return false;POImodeBak.POIoff(a)}return true}
function SetMapMode(a){a.OnMouseDown=null;a.OnMouseUp=null;a.OnMouseMove=null;if(a.Mode=="P"){ImgChange("idControlPan",true);a.OnMouseDown=CursorChangeDown;a.OnMouseUp=CursorChangeUp}else ImgChange("idControlPan",false);a.Mode=="Z+"?ImgChange("idControlZoom",true):ImgChange("idControlZoom",false);a.Mode=="L"?ImgChange("idControlAntenna",true):ImgChange("idControlAntenna",false);if(a.Mode=="L"){POImodeBak.POIon(a);POIclicked=false;RenderPOImenu(true);a.MouseMode="LP";a.SetCursor(a.CursorLocatePt);
if(window.POIMouseDown)a.OnMouseDown=POIMouseDown;if(window.POIMouseMove)a.OnMouseMove=POIMouseMove;if(window.POIMouseUp)a.OnMouseUp=POIMouseUp;var b=ScreenPt(a.MouseX,a.MouseY),c=new ScreenPt(15,23);a.AddPopupIcon(AntennaIconID,"../img/antenna.png",b,"",c)}else{SwitchInfoPanel(0);POIdontReset=false;ResetPOILocation()}}function setCheckImage(a,b){if(a=document.getElementById(a))a.src=b?"img/item_red.gif":"img/item.gif"}
function switchCheckImage(a){if(a=document.getElementById(a))a.src=a.src=="img/item_red.gif"?"img/item.gif":"img/item_red.gif"}function UpdateLayerStates(){if(map&&map.LayerStates)for(var a=0;a<map.LayerStates.length;a++)setCheckImage("idLayer"+a,map.LayerStates[a])}function UpdateCoverageStates(){if(map&&map.Coverage>=0&&Coverage)for(var a=0;a<Coverage.length;a++)setCheckImage("idCoverage"+a,a==map.Coverage?true:false)}function mapCommandStart(){return true}
function DrawMapControls(a){renderScales();if(InitMapMode!==false){a.SetMode(InitMapMode);InitMapMode=false}else a.ZoomLevel==0&&a.Mode!="L"&&a.PanMode();UpdateLayerStates();UpdateCoverageStates();DisplayCurrentTip();return true}var tstdebugtxt="--gra3l was here--";function tilesLoadingStart(){showClock("<br />tiles show");return true}function tilesLoadingStop(){hideClock("<br />tiles hide");return true}
function showClock(){var a=document.getElementById("idClock");clockCount++;if(a){a.className="blockvisible";if(!ngIExplorer)a.innerHTML='<img src="img/clock.png" style="width:33px;height:32px;" />'}return true}function hideClock(){var a=document.getElementById("idClock");clockCount--;if(a&&clockCount==0)a.className="hidden";return true}var CurrentTipIndex=0;function SetTipDiv(a){if(!SetInnerHTML(ID_TIPDIV,a))return false;return true}
function DisplayCurrentTip(){for(;CurrentTipIndex<0||CurrentTipIndex>=lngTipsArray.length;)CurrentTipIndex=Math.round(lngTipsArray.length*Math.random());DisplayTip(CurrentTipIndex)}function DisplayTip(a){if(a<lngTipsArray.length&&a>=0)if(lngTipsArray[a]!="undefined"){renderedTip='<div class="blackTitle" style="margin: 7px 8px 0 5px;float:left;height:100%;">'+lngTip+"</div>";renderedTip+='<p style="margin-top:7px;">'+lngTipsArray[a]+"</p>";SetTipDiv(renderedTip)}}
function DisplayNextTip(){CurrentTipIndex++;if(CurrentTipIndex>=lngTipsArray.length)CurrentTipIndex=0;DisplayTip(CurrentTipIndex)}function TipsTimerStart(){TipsTimerID=window.setInterval("DisplayNextTip()",8E3)}function TipsTimerStop(){window.clearTimeout(TipsTimerID)}
function hideFocusOutlineOnLinks(a){if(typeof a=="undefined"||a==""||!a)for(a=0;a<document.links.length;a++){if(ngIExplorer)document.links[a].hideFocus="true";document.links[a].style.outline="none"}else{if(typeof a!="object")a=document.getElementById(a);if(a){DBGlinksLevel=0;ProcessLinks(a)}}}
function ProcessLinks(a){tag_name=a.tagName;if(typeof tag_name!="undefined")tag_name=tag_name.toLowerCase();if(tag_name=="a"){if(ngIExplorer)a.hideFocus="true";a.style.outline="none"}for(var b=0;b<a.childNodes.length;b++)ProcessLinks(a.childNodes[b])}
function MapLocatePoint(){var a="&SCALEPROJPOS="+LocatePoint,b=LocatePoint.split(";"),c="",d=b.length;if(d>=3){c=b[1]+";"+b[2];if(d>3)c+=";"+b[3]}b=new ScreenPt(15,15);var e=ID_LOCATEPT_ICON;c=map.AddPopupIcon(e,"ngMapAPI/locate.png",c,LocatePtDescr!==false?LocatePtDescr:"",b);if(LocatePtDescr!==false)c.onpopup=function(g,h){return RenderNearestPopUpMenu(g,h.descr,ngOpera,'<a href="javascript:;" onclick="map.RemovePopupIconByID(\''+e+"');return false;\">"+lngRemoveIcon+"</a><br />")};typeof fullscreen!=
"undefined"&&fullscreen&&InfoDivHist.FullscreenInit();var f=map.OnCommandFinished;map.OnCommandFinished=function(g){this.OnCommandFinished=f;f(g);g.ShowPopupByID(e)};map.MapCommand("LOCATEPT","&ACTIVELAY="+ActiveLayers+"&ACTIVECOV="+ActiveCoverage+"&BW="+BWmap+a)}
function Init(){var a=new Array("img/item.gif","img/item_red.gif","img/arr_leftup.gif","img/arr_leftdown.gif","img/arr_rightup.gif","img/arr_rightdown.gif","img/arr_up.gif","img/arr_down.gif","img/arr_left.gif","img/arr_right.gif","img/mapW_up.gif","img/mapW_down.gif","img/mapW_left1.gif","img/mapW_left2.gif","img/mapW_right1.gif","img/mapW_right2.gif","img/icon1.gif","img/icon1_.gif","img/tip_icon1.gif","img/icon2.gif","img/icon2_.gif","img/icon3.gif","img/icon3_.gif","img/icon4.gif","img/icon4_.gif",
"img/icon5.gif","img/icon5_.gif","img/icon6.gif","img/icon6_.gif","img/btn_search_"+Lang+".gif","img/zoom_out.gif","img/zoom_back_.gif","img/zoom_in.gif","img/zoom_bluerect.gif","img/item_arrowred.gif","img/window_arr_down.gif","img/window_arr_up.gif","img/antenna.png");renderMapWin();preloadImages(a);preloadCursor("../img/antenna.cur");hideFocusOutlineOnLinks();RenderSearchMenu();clockCount=0;map=new ngMap("idMainMap","map.php?lang="+Lang);map.CursorPan="url('img/Hand_big.cur'), move";map.CursorPanDown=
"url('img/Hand_small.cur'), move";map.CursorZoomIn="url('img/lupa.cur'), crosshair";map.CursorLocatePt="url('img/antenna.cur'), crosshair";map.CreatePopup=O2_CreatePopup;map.OnModeChanging=BeforeSetMapMode;map.OnModeChanged=SetMapMode;map.OnCommand=mapCommandStart;map.OnCommandFinished=DrawMapControls;map.OnTilesLoading=tilesLoadingStart;map.OnTilesLoaded=tilesLoadingStop;map.OnItemPopupMenu=ItemPopupMenu;map.OnMapMenu=MapMenuPos;map.OnActiveObjectMenu=ActiveObjectMenu;map.LayerStates=[];POI_Location=
"";POILocated=false;AvailCovCmdRunning=0;proj=new ngProj(map);places=new ngPlaces(map);places.PageSize=10;places.OnSearch=StartSearch;places.OnSearchResults=DisplaySearchResults;places.OnSearchCancel=StopSearch;places.OnSearchError=DisplaySearchError;places.OnItemPopupMenu=SearchMenu;nearest=new ngNearest(map);nearest.NearestURL="http://"+document.domain+"/src/nearest.php";nearest.PageSize=10;nearest.OnSearch=StartSearch;nearest.OnSearchResults=DisplaySearchResults;nearest.OnSearchCancel=StopSearch;
nearest.OnSearchError=DisplaySearchError;nearest.OnLocateItem=LocateNearest;if(ShopID!=""&&ShopID!="undefined")Detail(ShopID,"O2:Shops","&uid="+ShopID+"&locate=true");else{if(InitSession!=""){map.MapSession=InitSession;map.X=InitX;map.Y=InitY;map.Update()}if(LocatePoint.length>0)MapLocatePoint();else{window.InitSearch&&InitSearch&&Search();map.MapCommand("IT","&ACTIVELAY="+ActiveLayers+"&ACTIVECOV="+ActiveCoverage+"&BW="+BWmap)}}ActiveNearestResults=-1;TipsTimerStart()}window.onload=Init;
window.onunload=TipsTimerStop;
