
// © 2002-2004 Supernavigator s.r.o., Vsetky prava vyhradene!
// Riesenie je priemyselno-pravne chranene a je predmetom chraneneho autorskeho diela!
// Precitajte si podmienky pouzitia (http://www.supernavigator.sk/navigator/conditions.php)
	
var Search=new Object();Search.init=function(){Search.form=getById('vyhladavanie');if(Search.form){Search.keyword=Search.form.keyword;Search.keyword.onmousedown = function(e) { if (rightMouse(e)) {stopBubbling(e); return true;} };Search.keyword.oncontextmenu = function(e) { stopBubbling(e); return true; };getById('searchbutton').onclick=Search.form.onsubmit=function(){if(window.AddressPoint&&!Search.object&&Search.recognizeAddress(Search.keyword.value)){Search.setObject(AddressPoint);document.getElementById('searchAddress').className="selected";Search.go();return false}getById('searchbutton').focus();return false};Search.keyword.active=false;Search.keyword.onfocus=function(){SuperNavigator.keysEnabled=false};Search.keyword.onblur=function(){SuperNavigator.keysEnabled=true};Search.buttons=new Array("searchCategory","searchFirmName","searchKeyword","searchAddress","searchStreet","searchCity");if(getById('searchCategory'))getById('searchCategory').onmousedown=function(e){Search.setObject(Category);return Search.go(e)};if(getById('searchFirmName'))getById('searchFirmName').onmousedown=function(e){Search.setObject(Firm);return Search.go(e)};if(getById('searchKeyword'))getById('searchKeyword').onmousedown=function(e){Search.setObject(Firm,true);return Search.go(e)};if(getById('searchAddress'))getById('searchAddress').onmousedown=function(e){Search.setObject(AddressPoint);return Search.go(e)};if(getById('searchStreet'))getById('searchStreet').onmousedown=function(e){Search.setObject(Street);return Search.go(e)};if(getById('searchCity'))getById('searchCity').onmousedown=function(e){Search.setObject(City);return Search.go(e)}}var ikony=Search.defaultIconMaxDisplayResult.unique();for(var id in ikony)if(typeof(ikony[id])=="string")loadIcon(ikony[id]);Search.objects=new Array(window.City,window.Street,window.AddressPoint,window.Firm,window.Property);Search.onafterinit()};Search.onafterinit=function(){};Search.addressSubmitAfterInit=function(){Search._addressSubmitAfterInitProcess=setInterval(Search._addressSubmitAfterInit,100)};Search._addressSubmitAfterInit=function(){if(!MapView.map_was_displayed)return false;Search.setObject(AddressPoint);Search.go();clearInterval(Search._addressSubmitAfterInitProcess)};Search.defaultIconMaxDisplayResult=new Array(0,'a','a','b','b','b','b','a','b','b','b','b');Search.recognizeAddress=function(address){a='^[^%5C.%5C-]*';b='( [0-9]+ ?[a-zA-Z]?([%5C/%5C%5C%5C-)[0-9]*[a-zA-Z]?)?';return eval('address.match(/'+unescape('('+a+'(([aio]v[a%E1])|(vej)|([cstzo]k[a%E1])|([b%u010Dlntz]ia)|([e%E9]ho)|([e%u010Dbdjl%u013Etps%u0161rvnz%u017E]n[a%E1])|([iy]ho)|([ls]m[a%E1])|([as]t[a%E1])|(rov)|(lie)|(ine)|(uh%E1)|([ea]l[a%E1])|(sti)|(ch%E1)|(n%E1m.))'+b+')?%2C ?.*((nitra)|([inv]ce)|([%u010D%u013Eons%u0161rtv%FA]ka)|([%u010Ddhjk%u013Enr%u0161t]ov)|([ao]v[a%E1])|([ai]ny)|(vci)|(ov[e%E9o])|(in[a%E1])|(ica)|([nrv]ec)|([%E1%u010D%EDon]ky)|([%u010Ddelrs%u017E]n[a%E1])|([%u010Ddlnr]ie)|(n%EDk)|(sk[e%E9o])|([ou]ta)|([h%u013En]om)|([%u010Dlt][i%ED]n)|( ves)|(hod)|(a%u0148a)|([cv]ou)|([ao]da)|([dt]ok)|([%u010Dnt]n%E9)|([mv]or)|([eo]le)|(%u0161te)|(%E1re)|(jer)|(ora)|(azy)|(haj)|(t%E1l)|(iar)|(o%u013Ea)|(vrch)|(el%E1)|(mlyn)|(ady)|(dza)|(%u010Dno)|(rad)|(laz)|([%u010D%u0148]a)|(ch%E1))$)|'+'( '+a+'(([aio]v[a%E1])|(vej)|([cstzo]k[a%E1])|([b%u010Dlntz]ia)|([e%E9]ho)|([e%u010Dbdjl%u013Etps%u0161rvnz%u017E]n[a%E1])|([iy]ho)|([ls]m[a%E1])|([as]t[a%E1])|(rov)|(lie)|(ine)|(uh%E1)|([ea]l[a%E1])|(sti)|(ch%E1)|(n%E1m.))'+b+')$)|('+a+'((nitra)|([inv]ce)|([%u010D%u013Eons%u0161rtv%FA]ka)|([%u010Ddhjk%u013Enr%u0161t]ov)|([ao]v[a%E1])|([ai]ny)|(vci)|(ov[e%E9o])|(in[a%E1])|(ica)|([nrv]ec)|([%E1%u010D%EDon]ky)|([%u010Ddelrs%u017E]n[a%E1])|([%u010Ddlnr]ie)|(n%EDk)|(sk[e%E9o])|([ou]ta)|([h%u013En]om)|([%u010Dlt][i%ED]n)|( ves)'+'|(hod)|(a%u0148a)|([cv]ou)|([ao]da)|([dt]ok)|([%u010Dnt]n%E9)|([mv]or)|([eo]le)|(%u0161te)|(%E1re)|(jer)|(ora)|(azy)|(haj)|(t%E1l)|(iar)|(o%u013Ea)|(vrch)|(el%E1)|(mlyn)|(ady)|(dza)|(%u010Dno)|(rad)|(laz)|([%u010D%u0148]a)|(ch%E1))'+b+')$)')+'/)')};Search.lastSearch=new Array();Search.actualKeyword='';Search.actualKeywordNameClient='';Search.actualCategory=null;Search.actualPobocka=null;Search.actualFirmID=null;Search.actualFirmIDs=null;Search.actualMyPosIDs=null;Search.actualMyPosSelfIDs=null;Search.actualClientCategoryIDs=null;Search.actualMyPosCategoryIDs=null;Search.onlyOpen=false;Search.onlyOpenLast=false;Search.onBeforeCompleteMapHTML=Search.onBeforeCompleteMenuHTML=Search.onAfterCompleteMapHTML=Search.onAfterCompleteMenuHTML=function(){return""};Search.adCode='';Search.clearAdCode=function(){Search.adCode=''};Search.setAdCode=function(adCode){Search.adCode=adCode.replace(/^\s*|\s*$|\n*|\r*/g,"")};Search.actualClear=function(){Search.actualKeyword='';Search.actualKeywordNameClient='';Search.actualCategory=null;Search.actualPobocka=null;Search.actualFirmID=null;Search.actualFirmIDs=null;Search.actualStreetIDs=null;Search.actualMyPosIDs=null;Search.actualMyPosSelfIDs=null;Search.actualClientCategoryIDs=null};Search.setActualKeyword=function(keyword){Search.actualClear();Search.actualKeyword=keyword};Search.setActualCategory=function(categoryID){Search.actualClear();if(!Category.client)Search.actualCategory=categoryID;else Search.actualClientCategoryIDs=new Array(categoryID,null)};Search.setActualPobocka=function(pobockaID){Search.actualClear();Search.actualPobocka=pobockaID};Search.setActualFirmID=function(ID){Search.actualClear();Search.actualFirmID=ID};Search.setActualFirmIDs=function(IDsArray){Search.actualClear();Search.actualFirmIDs=IDsArray};Search.setActualStreetIDs=function(IDsArray){Search.actualClear();Search.actualStreetIDs=IDsArray};Search.setActualMyPosIDs=function(IDsArray){Search.actualClear();Search.actualMyPosIDs=IDsArray};Search.setActualMyPosSelfIDs=function(selfIDsArray){Search.actualClear();Search.actualMyPosSelfIDs=selfIDsArray};Search.setActualClientCategoryIDs=function(CategoryIDs){Search.actualClear();Search.actualClientCategoryIDs=CategoryIDs};Search.setActualMyPosCategoryIDs=function(CategoryIDs){Search.actualClear();Search.actualMyPosCategoryIDs=CategoryIDs};Search.setActualKeywordNameClient=function(keyword,clientID){Search.actualClear();Search.actualKeywordNameClient=keyword};Search.totalCount=0;Search.displayedCount=0;Search.object=null;Search.setObject=function(object,_FirmKeyword){if(Search.object!=Firm&&object==Firm){Search.clearItems();var obj=document.getElementById(_FirmKeyword?'searchKeyword':'searchFirmName');if(obj)obj.className="selected"}Search.object=object;if(object==Firm)Search.keywordSearching=_FirmKeyword?true:false;Search.reset()};Search.maxDisplayResult=300;Search.clearLastArea=function(){Search.last=new Area(null,null)};Search.clearLastArea();Search.displayedAlreadyAll=function(){return Search.totalCount&&Search.totalCount==Search.displayedCount};Search.setLastArea=function(area){if(area)Search.last=area.getCopy();else Search.last=MapView.wholeArea};Search.clearItems=function(){var obj;if(Search.buttons&&Search.buttons.length)for(var i=0;i<Search.buttons.length;i++){obj=getById(Search.buttons[i]);if(obj)obj.className=""}};Search.activateItem=function(e){if(!e)return;var obj=eventElement(e);if(obj&&obj.id.indexOf("search")===0&&obj.id!="searchbutton"){Search.clearItems();obj.className="selected"}};Search.isInArea=function(area){return area.isInArea(Search.last)};Search.keywordCheck=function(){var keyword=Search.keyword.value.trim();if(keyword.length<3&&(keyword.length<2||Search.object!=Firm||Search.keywordSearching)){alert(text["3_znaky"]);Search.keyword.value=keyword;Search.keyword.focus();return false}Search.setActualKeyword(keyword);return keyword};Search.reset=function(){Search.showAllLevel=false;Search.totalCount=0};Search.newSearch=function(){Search.lastSearch=new Array();for(var i=0;i<Search.objects.length;i++)if(Search.objects[i]&&Search.objects[i].newSearch)Search.objects[i].newSearch()};Search.firstSearchAfterClick=false;Search.go=function(e){if(!MapView.map_was_displayed||!Search.object)return false;if(!browser.isNS)Search.keyword.blur();if(Search.keywordCheck()){if(window.AdminPortal&&Search.object==Firm){Search.setObject(null);Search.clearItems();getById('searchbutton').focus();return false}Search.firstSearchAfterClick=true;Search.activateItem(e);Search.clearLastArea();Search.totalCount=0;getById('searchbutton').onclick=Search.form.onsubmit=function(){Search.go(e);return false};if(!browser.isNS)getById('searchbutton').blur();MapView.setFnWhenFinished(Search.object.search);Search.object.reset();MapView.redraw()}return false};Search.getActualKeywordForURL=function(){return escape(Search.actualKeyword)};Search.tooMany=false;Search.load=function(plusURL){var mapa=MapView.actual;if(!mapa||window.AdminPortal||Search.object==window.AddressPoint)mapa=Map.first_map;var area=mapa.getArea();if(!Search.tooMany&&((!Search.isInArea(area)&&!Search.displayedAlreadyAll())||Search.onlyOpenLast!=Search.onlyOpen)){Search.tooMany=false;area=Area.compound(Search.last,area);Search.setLastArea(area);this.block(SuperNavigator.loadFrame);stopWatch.start();var area="&x1="+area.cornerUL.x+"&y1="+area.cornerUL.y+"&x2="+area.cornerBR.x+"&y2="+area.cornerBR.y;var plus=plusURL?"&"+plusURL:"";plus+="&"+SuperNavigator.SID;if((Search.object==window.AddressPoint&&Search.firstSearchAfterClick)||SuperNavigator.canZoomOptimal()&&(Search.actualFirmIDs||Search.actualStreetIDs||Search.actualMyPosIDs||Search.actualMyPosSelfIDs||Search.actualClientCategoryIDs||Search.actualMyPosCategoryIDs)&&(!window.SetPosition||!SetPosition.dontZoom2max))plus+="&zoom2optimum";var script=".."+((!Search.actualMyPosIDs&&!Search.actualMyPosSelfIDs&&!Search.actualMyPosCategoryIDs)?"/navigator/search.php":"/mypositions/getmypositions.php");if(script=='../mypositions/getmypositions.php'&&MyPosition.alsoInactive)plus+="&alsoInactive";if(Search.onlyOpen)plus+="&onlyOpen=true";Search.onlyOpenLast=Search.onlyOpen;if(window.clientsMapFn)plus+="&noLimit=true";if(SuperNavigator.portalID)plus+='&portalID='+SuperNavigator.portalID;if(Search.actualKeyword!="")SuperNavigator.load(script+"?"+(!Search.keywordSearching?"keyword":"byKeyword")+"="+Search.getActualKeywordForURL()+"&what="+Search.object.name+area+plus);else if(Search.actualKeywordNameClient!="")SuperNavigator.load(script+"?clientKeyword="+escape(Search.actualKeywordNameClient)+"&clientID="+Search._tempClientID+"&what="+Search.object.name+area+plus);else if(Search.actualCategory)SuperNavigator.load(script+"?category="+Search.actualCategory+"&what="+Search.object.name+area+plus);else if(Search.actualPobocka)SuperNavigator.load(script+"?pobocka="+Search.actualPobocka+"&what="+Search.object.name+area+plus);else if(Search.actualFirmID)SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"ID="+Search.actualFirmID+"&what="+Search.object.name+plus);else if(Search.actualFirmIDs){var p = Search.actualFirmIDs.implode(",");if (p.length>2000) p = 'storedInSession';SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"IDs="+p+"&what="+Search.object.name+plus); }else if(Search.actualStreetIDs)SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"IDs="+Search.actualStreetIDs.implode(",")+"&what="+Search.object.name+plus);else if(Search.actualMyPosIDs)SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"IDs="+Search.actualMyPosIDs.implode(",")+"&firmID="+SuperNavigator.loggedFirm.id+"&what=load"+plus);else if(Search.actualMyPosSelfIDs)SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"SelfIDs="+Search.actualMyPosSelfIDs.implode(",")+"&firmID="+SuperNavigator.loggedFirm.id+"&what=load"+plus);else if(Search.actualMyPosCategoryIDs)SuperNavigator.load(script+"?"+Search.object.name.LCFirst()+"CategoryIDs="+Search.actualMyPosCategoryIDs.implode(",")+"&firmID="+SuperNavigator.loggedFirm.id+"&what=load"+plus);else if(Search.actualClientCategoryIDs){if(window.AdminPortal&&Search.actualClientCategoryIDs.length==2){plus+="&NA=true";AdminPortal.allPositionsInCategoryAreLoaded=true}SuperNavigator.load(script+"?clientCategoryIDs="+Search.actualClientCategoryIDs.implode(",")+"&what="+Search.object.name+area+plus)}Search.firstSearchAfterClick=false;Search.changeHeader()}else{Search.redraw();Search.tooMany=false}};Search.loadAndRefreshOneFirmInAdminportal=function(firmID){var area=Map.first_map.getArea();this.block(SuperNavigator.loadFrame);stopWatch.start();var area="&x1="+area.cornerUL.x+"&y1="+area.cornerUL.y+"&x2="+area.cornerBR.x+"&y2="+area.cornerBR.y;if(Search.object!=Firm){Search.setObject(Firm);Search.setActualFirmID(firmID)}SuperNavigator.load("../navigator/search.php?"+Search.object.name.LCFirst()+"ID="+firmID+"&refresh=true&what="+Search.object.name+"&"+SuperNavigator.SID)};Search.point2ObjectOnMap=function(obj){MapView.showPointer(obj.position.toScreenFromBase())};Search.hidePointerOnMap=function(){MapView.hidePointer()};Search.zoom2max=function(obj){if(obj){obj.visit();var pos=!obj.viewPosition?obj.position:obj.viewPosition;if(obj.position){if(obj.city)MapView.zoom2max(obj.position,obj.city.id);else MapView.zoom2max(obj.position)}}};Search.goBack=function(e){if(rightMouse(e)){MapView.setFnWhenFinished(null);if(Search.actualCategory)Category.backUpOneLevel(e);else Category.backToRoot(e)}};Search.an=null;Search.bn=null;Search.sortByNameFn=function(a,b){if(a.suborder<b.suborder)return 1;if(a.suborder>b.suborder)return-1;Search.an=a.name.bootless();Search.bn=b.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1;if(a.city&&b.city){Search.an=a.city.name.bootless();Search.bn=b.city.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.street&&b.street){Search.an=a.street.name.bootless();Search.bn=b.street.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.id>b.id)return 1;else return-1;return 0};Search.sortByStreetFn=function(a,b){if(a.suborder<b.suborder)return 1;if(a.suborder>b.suborder)return-1;if(!a.street&&b.street)return-1;if(a.street&&!b.street)return 1;if(a.street&&b.street){Search.an=a.street.name.bootless();Search.bn=b.street.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}Search.an=a.name.bootless();Search.bn=b.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1;if(a.city&&b.city){Search.an=a.city.name.bootless();Search.bn=b.city.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.id>b.id)return 1;else return-1;return 0};Search.sortByAddressFn=function(a,b){if(a.suborder>b.suborder)return 1;if(a.suborder<b.suborder)return-1;if(!a.street&&b.street)return-1;if(a.street&&!b.street)return 1;if(a.street&&b.street){Search.an=a.street.name.bootless();Search.bn=b.street.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.name&&b.name){Search.an=a.name.bootless();Search.bn=b.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.city&&b.city){Search.an=a.city.name.bootless();Search.bn=b.city.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}if(a.cisloOrientacne>b.cisloOrientacne)return 1;if(a.cisloOrientacne<b.cisloOrientacne)return-1;if(a.pismenoOrientacne>b.pismenoOrientacne)return 1;if(a.pismenoOrientacne<b.pismenoOrientacne)return-1;if(a.cisloPopisne>b.cisloPopisne)return 1;if(a.cisloPopisne<b.cisloPopisne)return-1;return 0};Search.sortByCityFn=function(a,b){if(a.suborder<b.suborder)return 1;if(a.suborder>b.suborder)return-1;if(!a.city&&b.city)return-1;if(a.city&&!b.city)return 1;if(a.city&&b.city){Search.an=a.city.name.bootless();Search.bn=b.city.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}Search.an=a.name.bootless();Search.bn=b.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1;if(a.street&&b.street){Search.an=a.street.name.bootless();Search.bn=b.street.name.bootless();if(Search.an>Search.bn)return 1;if(Search.an<Search.bn)return-1}return 0};Search.howToSort=function(){return this.sorting[this.zoradit_objekty]};Search.isSortDefault=function(){return Search.object.zoradit_objekty==Search.object.zoradit_objekty_default};Search.printTotalCount=function(){var countObj;for(var i=0;i<Search.objects.length;i++)if(Search.objects[i]){countObj=getById(Search.objects[i].htmlMenuID+'total_count');if(countObj)countObj.innerHTML=Search.totalCount;countObj=getById(Search.objects[i].htmlMenuID+'total_count2');if(countObj)countObj.innerHTML=Search.objects[i].totalCount}};Search.printAktualnyPocet=function(kolko){var countObj;for(var i=0;i<Search.objects.length;i++)if(Search.objects[i]){if(!kolko)var kolko=Search.displayedCount;countObj=getById(Search.objects[i].htmlMenuID+'pocet_zobrazenych');if(countObj)countObj.innerHTML=kolko;countObj=getById(Search.objects[i].htmlMenuID+'pocet_zobrazenych2');if(countObj)countObj.innerHTML=kolko}};Search.resetAllCountsInClasses=function(){for(var i=0;i<Search.objects.length;i++)if(Search.objects[i])Search.objects[i].totalCount=Search.objects[i].displayedCount=0};Search.makeObjectVisited=function(obj,hideIt,notVisitedBoolean){if(!obj.visited||notVisitedBoolean){obj.visited=!notVisitedBoolean;var CLASS=obj.constructor;var MENUobj=getById(CLASS.htmlMenuID+obj.id);var MAPobj=getById(CLASS.htmlMapID+obj.id);if(MENUobj){if((MENUobj.className=="item"||MENUobj.className=="item special"||MENUobj.className=="itemSelected")&&!notVisitedBoolean)MENUobj.className="item visited";else if(MENUobj.className=="item font")MENUobj.className="item font visited";else MENUobj.className=MENUobj.className.replace(" visited","")}if(MAPobj&&MAPobj.nodeName=='A'){if(!notVisitedBoolean&&MAPobj.firstChild.src==icons[CLASS.defaultIcon[MapView.actual.map.level]].src)MAPobj.firstChild.src=icons[CLASS.defaultVisitedIcon[MapView.actual.map.level]].src;else if(notVisitedBoolean&&MAPobj.firstChild.src==icons[CLASS.defaultVisitedIcon[MapView.actual.map.level]].src)MAPobj.firstChild.src=icons[CLASS.defaultIcon[MapView.actual.map.level]].src}if(hideIt){Search.displayedCount--;obj.constructor.displayedCount--;Search.printAktualnyPocet();if(MENUobj)MENUobj.style.display="none";if(MAPobj)MAPobj.style.display="none";if(Search.displayedCount<8){var obj=getById('pocet2');if(obj)obj.style.display="none"}if(Search.displayedCount==0){MapView.clear();Search.redraw()}}}};Search.getPocetHTML=function(loadBoolean,CLASS){var HTML="";HTML+='<div id="pocet1"><div class="pocty_celkom">';var priznak=window.AddressPoint&&CLASS===AddressPoint&&loadBoolean;var celkovyPocet=!priznak?Search.totalCount:City.getTotalCount()+Street.getTotalCount()+AddressPoint.getTotalCount();var totalC=(loadBoolean||Search.object!==window.AddressPoint)?celkovyPocet:CLASS.getTotalCount();var actualC=loadBoolean?"???":CLASS.displayedCount;HTML+='<span class="text">'+(priznak?Firm.get_celkovy_pocet_text():CLASS.get_celkovy_pocet_text())+':</span>';HTML+='<span class="cislo" id="'+CLASS.htmlMenuID+'total_count">'+totalC+'</span>';HTML+="</div>\n";HTML+='<div class="pocty">';HTML+='<span class="text">'+(priznak?Firm.get_pocet_text():CLASS.get_pocet_text())+':</span>';HTML+='<span class="cislo" id="'+CLASS.htmlMenuID+'pocet_zobrazenych">'+actualC+"</span>";HTML+="</div></div>\n";if(!loadBoolean&&totalC>actualC&&window.AddressPoint&&Search.object===AddressPoint){if(window.City&&CLASS==City)HTML+='<a href="" class="buttonZoom2Optimum" onclick="stack.addProcess(City.zoom2optimum, Map.processCode); return false;">'+text['butt_show_all_cities']+'</a>';else if(window.Street&&CLASS==Street)HTML+='<a href="" class="buttonZoom2Optimum" onclick="stack.addProcess(Street.zoom2optimum, Map.processCode); return false;">'+text['butt_show_all_streets']+'</a>';else if(window.AddressPoint&&CLASS==AddressPoint)HTML+='<a href="" class="buttonZoom2Optimum" onclick="stack.addProcess(AddressPoint.zoom2optimum, Map.processCode, true); return false;">'+text['butt_show_all_addresses']+'</a>'}return HTML};Search.showAllLevel=false;Search.showAll=function(){Search.showAllLevel=MapView.actual.map.level;MapView.redraw()};Search.changeHeader=function(){if(window.Category&&Search.object.get_menuHeader_text){Category.MenuHeader(Search.object.get_menuHeader_text());Category.MenuLink(text["spat_na_uvodne"],Category.toRootFalse)}};Search.zobrazovat_alebo_ne=function(obj){return(((!obj.visited&&obj.constructor.zobrazovat_objekty!=3)||obj.constructor.zobrazovat_objekty<2)||(obj.visited&&obj.constructor.zobrazovat_objekty==3))};Search.printIndex=0;Search.redraw=function(onlyHeader){if(!MapView.actual)return;var CLASS=Search.object;var breakerStart=false;if(CLASS==Firm&&SuperNavigator.promtUpdate)Firm.ChangePositionMode.updateClientForm();if(window.Draw){Draw.clear();MapView.canvas.style.visibility='hidden'}if(!onlyHeader&&Search.tooMany){var menuHTML="";if(Search.totalCount>0)menuHTML+=Search.getPocetHTML(true,CLASS);menuHTML+="<div class=\"alert toomuch\">"+text["velmi_vela_vysledkov"]+"</div>";if(window.Category)Category.Div.innerHTML=menuHTML;return false}if(!CLASS||(window.Category&&CLASS==Category))return false;if(typeof(CLASS.first)!="undefined")CLASS.first=null;if(window.Category)Category.ScrollOnTop();var mapHTML=Search.onBeforeCompleteMapHTML();var menuHTML=Search.onBeforeCompleteMenuHTML();Search.MapHTMLradius="";var area=MapView.actual.getArea();var aLevel=MapView.actual.map.level;var ikona=icons[CLASS.defaultIcon[aLevel]];var ikonaVis=icons[CLASS.defaultVisitedIcon[aLevel]];if(CLASS.preserveThisIcons)ikona=ikonaVis=icons[CLASS.preserveThisIcons[aLevel]];if(CLASS.ifOnlyOneIcon&&CLASS.ifOnlyOneIconObject&&CLASS.ifOnlyOneIconLevel==MapView.actual.map.level)ikona=ikonaVis=CLASS.ifOnlyOneIconObject;addHalfIcon(ikona);addHalfIcon(ikonaVis);Search.resetAllCountsInClasses();if(CLASS.defaultSpecialIcon){var ikonaSpecial=icons[CLASS.defaultSpecialIcon[aLevel]];addHalfIcon(ikonaSpecial)}if(!onlyHeader){if(window.Category)Category.Div.onmousedown=Search.goBack;var objekty=new Array();var objekty_bez_pozicie=new Array();var objekty_vypisane=new Array();var i=0;var k=0;var previous;var pocet_celkom=0;var pocet_in_area=0;var id,obj;var Classes=new Array();var actualArea=MapView.actual.getArea();for(id in Search.lastSearch)if(typeof(Search.lastSearch[id])=="object"){obj=Search.lastSearch[id];if(!Classes.contain(obj.constructor))Classes.push(obj.constructor);if(!obj.position&&(!MapView.actualCity||obj.city.id==MapView.actualCity.id)&&Search.zobrazovat_alebo_ne(obj)){objekty_bez_pozicie[k++]=obj;pocet_in_area++}else if(obj.position&&((!obj.radius&&obj.position.isInArea(actualArea))||(obj.radius&&obj.position.isInArea(actualArea.getCopy().expand(MapView.getFirstKoefInMeters(obj.radius)))))){if(i==0&&(CLASS.first)!="undefined")CLASS.first=obj;if(previous)previous.next=obj;previous=obj;if(Search.zobrazovat_alebo_ne(obj)){objekty[i++]=obj;obj.constructor.displayedCount++}pocet_in_area++}obj.constructor.totalCount++;pocet_celkom++}if(previous)previous.next=null;Search.pocet_in_area=pocet_in_area;Search.displayedCount=0;var pocet_adeptov_na_cyklus=objekty.length;Search.changeHeader();if(window.Category&&(!Search.isSortDefault()||!browser.isIE||CLASS==window.AddressPoint))objekty.sort(CLASS.howToSort());var temp1="";var temp2="";Search.printIndex=0;var load_step=50/pocet_adeptov_na_cyklus; var load_phase=0;var priliz_vela=function(){return(!Search.showAllLevel||(Search.showAllLevel>MapView.actual.map.level))&&(pocet_adeptov_na_cyklus>Search.maxDisplayResult)};var icon;if(priliz_vela()){var pos,posArray;icon=icons[Search.defaultIconMaxDisplayResult[MapView.actual.map.level]];addHalfIcon(icon);var uz_je=new Array();var koef=1/(parseInt(icon.width)*1);var pocet_casti=parseInt(MapView.getWidth()*koef);for(var i=0;i<pocet_adeptov_na_cyklus;i++){pos=objekty[i].position.toScreenFromBase().floor();posArray=parseInt(pos.x*koef)+parseInt(pos.y*koef)*pocet_casti;pos.minus(icon.half);if(uz_je[posArray]!==1){uz_je[posArray]=1;temp1+='<img src="'+icon.src+'" class="si" style="'+pos.printToStyleHTML()+'" onclick="return MapView.zoomClick();" />';if(temp1.length>1024){mapHTML+=temp1;temp1=""}}Search.displayedCount++}}else{var actualClass;var CityFlag,StreetFlag,AddressFlag;CityFlag=StreetFlag=AddressFlag=false;CityFlagDone=StreetFlagDone=AddressFlagDone=false;if(Search.adCode!=''){temp2+='<div id="sponzorovane_odkazy">';temp2+='<h3>'+text["sponzorovane_odkazy"]+':</h3>';temp2+=Search.adCode;temp2+='</div>'}for(var i=0;i<pocet_adeptov_na_cyklus;i++){if(!breakerStart&&objekty[i].start){breakerStart=true;temp2+='<div class="breakerStart">'+text["za_start_nezodpovedame"]+'</div>'}if(!actualClass||actualClass!=objekty[i].constructor){if(Search.object==window.AddressPoint){if(window.City&&actualClass==City)CityFlag=true;if(window.Street&&actualClass==Street)StreetFlag=true;if(window.Address&&actualClass==Address)AddressFlag=true}actualClass=objekty[i].constructor;if(window.City&&window.Street&&window.AddressPoint&&Search.object==window.AddressPoint){if((actualClass==Street||actualClass==AddressPoint)&&!CityFlag&&!CityFlagDone&&City.getTotalCount()>0){temp2+=Search.getPocetHTML(false,City);CityFlagDone=true}if(actualClass==AddressPoint&&!StreetFlag&&!StreetFlagDone&&Street.getTotalCount()>0){temp2+=Search.getPocetHTML(false,Street);StreetFlagDone=true}}temp2+=Search.getPocetHTML(false,actualClass);var ikona=icons[actualClass.defaultIcon[aLevel]];var ikonaVis=icons[actualClass.defaultVisitedIcon[aLevel]];if(actualClass.preserveThisIcons)ikona=ikonaVis=icons[CLASS.preserveThisIcons[aLevel]];if(CLASS.ifOnlyOneIcon&&CLASS.ifOnlyOneIconObject&&CLASS.ifOnlyOneIconLevel==MapView.actual.map.level)ikona=ikonaVis=CLASS.ifOnlyOneIconObject;addHalfIcon(ikona);addHalfIcon(ikonaVis)}if(Math.floor(load_phase+load_step)==Math.floor(load_phase)+1)SuperNavigator.message(text["vysledok_sa_pripravuje"]+" "+Math.floor(load_phase)+"%");load_phase+=load_step;if(objekty[i].special)icon=ikonaSpecial;else if(objekty[i].visited&&(CLASS.zobrazovat_objekty==1||CLASS.zobrazovat_objekty==3))icon=ikonaVis;else icon=ikona;temp1+=objekty[i].add2MapHTML(icon);temp2+=objekty[i].add2MenuHTML();Search.printIndex++;objekty_vypisane[Search.displayedCount]=objekty[i];Search.displayedCount++;if(temp1.length>1024){mapHTML+=temp1;temp1=""}if(temp2.length>1024){menuHTML+=temp2;temp2=""}}if(window.City&&window.Street&&window.AddressPoint&&Search.object==AddressPoint){if(actualClass==City)CityFlag=true;if(actualClass==Street)StreetFlag=true;if(actualClass==AddressPoint)AddressFlag=true;if(!CityFlag&&!CityFlagDone&&City.getTotalCount()>0){temp2+=Search.getPocetHTML(false,City);CityFlagDone=true}if(actualClass!=AddressPoint&&!StreetFlag&&!StreetFlagDone&&(Street.getTotalCount()>0)){temp2+=Search.getPocetHTML(false,Street);StreetFlagDone=true}if(!AddressFlag&&!AddressFlagDone&&AddressPoint.getTotalCount()>0){temp2+=Search.getPocetHTML(false,AddressPoint);AddressFlagDone=true}}}if(!priliz_vela()){var pocet_adeptov_na_cyklus_bez_pozicie=objekty_bez_pozicie.length;var obj;var k=0;var bezpozHTML="";for(var i=0;i<pocet_adeptov_na_cyklus_bez_pozicie;i++){obj=objekty_bez_pozicie[i];bezpozHTML+=obj.add2MenuHTML();Search.printIndex++;objekty_vypisane[Search.displayedCount]=obj;Search.displayedCount++;k++}if(k>0)temp2+="<div class=\"bez_pozicie\">"+text["bez_pozicie"]+"</div>"+bezpozHTML}mapHTML='<div id="spadove_oblasti">'+Search.MapHTMLradius+'</div>'+mapHTML+temp1;menuHTML+=temp2;var pocetHTML=Search.getPocetHTML(false,CLASS);if(priliz_vela()){menuHTML+="<div class=\"alert toomuch\">";menuHTML+=text["velmi_vela_vysledkov"];menuHTML+="</div>\n";menuHTML+='<input type="button" value="'+text["pokracovat_budem_cakat"]+'" onclick="Search.showAll()" />\n'}else{if(Search.displayedCount>4*MapView.size.y&&Search.object!=window.AddressPoint)menuHTML+="<br />"+pocetHTML.replace(CLASS.htmlMenuID+'total_count',CLASS.htmlMenuID+'total_count2').replace(CLASS.htmlMenuID+'pocet_zobrazenych',CLASS.htmlMenuID+'pocet_zobrazenych2').replace('pocet1','pocet2');if(Search.totalCount>0&&Search.displayedCount==0&&pocet_in_area==0){if(Search.object==window.AddressPoint)menuHTML+="<br /><br />";menuHTML+="<div class=\"alert\">"+CLASS.get_naslo_inde_text()+"</div>\n"}if(Search.totalCount==0||(Search.object==window.AddressPoint&&AddressPoint._searchingCislo!=''&&(!AddressPoint._searchingIsExact||(AddressPoint._searchingUlica!=''&&AddressPoint._searchingUlica!=AddressPoint._searchingMesto&&AddressPoint.getTotalCount()==0&&Street.getTotalCount()==0)))){if(Search.object==window.AddressPoint&&AddressPoint._searchingCislo!=''&&!AddressPoint._searchingIsExact)menuHTML+="<br /><br />";if(window.Category)menuHTML+="<div class=\"alert\">"+CLASS.get_nic_nenaslo_text()+"</div>\n";else if(CLASS.get_nic_nenaslo_text())alert(CLASS.get_nic_nenaslo_text());if(Search.keyword)Search.keyword.focus()}else{if(pocet_in_area>0&&Search.displayedCount==0)menuHTML+=CLASS.get_skryte_text(pocet_in_area-Search.displayedCount);menuHTML+="<br />\n";menuHTML+=CLASS.get_moznosti_zobrazovania_text();if(Search.displayedCount>4*MapView.size.y)menuHTML+=CLASS.get_moznosti_zoradovania_text()}menuHTML+="<br />\n"}}else{if(Search.totalCount>0)menuHTML+=Search.getPocetHTML(true,CLASS);menuHTML+=Search.getWaitingText()}if(window.Category&&Search.actualCategory)menuHTML=Category.makePathMenu(Search.actualCategory)+"<br />"+menuHTML;else if(window.Category&&(Search.actualClientCategoryIDs&&Category.client))menuHTML=Category.makePathMenu(Search.actualClientCategoryIDs[0])+"<br />"+menuHTML;mapHTML+=Search.onAfterCompleteMapHTML();menuHTML+=Search.onAfterCompleteMenuHTML();MapView.objectsDiv.innerHTML+=mapHTML;if(window.Category)Category.Div.innerHTML=menuHTML;if(window.MyPosition&&SuperNavigator.loggedFirm&&SuperNavigator.loggedFirm.id)MyPosition.redraw();if(priliz_vela&&!priliz_vela()){var objMap=null;var objMenu=null;for(var i=0;i<Search.displayedCount;i++){if(Math.floor(load_phase+load_step)==Math.floor(load_phase)+1)SuperNavigator.message(text["vysledok_sa_pripravuje"]+" "+Math.floor(load_phase)+"%");load_phase+=load_step;CLASS=objekty_vypisane[i].constructor;objMap=getById(CLASS.htmlMapID+objekty_vypisane[i].id);Search.addEvents2MapObj(objMap,objekty_vypisane[i]);objMenu=getById(CLASS.htmlMenuID+objekty_vypisane[i].id);Search.addEvents2MenuObj(objMenu,objMap,objekty_vypisane[i])}}SuperNavigator.message();if(getById('spadove_oblasti')){if(browser.isIE)getById('spadove_oblasti').style.filter="alpha(opacity="+(70-MapView.actual.map.level*5)+")";else getById('spadove_oblasti').style.MozOpacity=0.7-0.01*MapView.actual.map.level*5}if(priliz_vela&&!priliz_vela())for(var i=0;i<Classes.length;i++)if(Classes[i].loadIcons)Classes[i].loadIcons();Search.onAfterObjectsRedraw()};Search.onAfterObjectsRedraw=function(){};Search.addEvents2MapObj=function(objMap,realObj){if(objMap&&!realObj.radius){objMap.realObject=realObj;if(window.Category)objMap.onmouseover=Search.highlightInMenu_on;if(window.Category)objMap.onmouseout=Search.highlightInMenu_off;objMap.onclick=Search.click}};Search.addEvents2MenuObj=function(objMenu,objMap,realObj){if(objMenu){objMenu.realObject=realObj;if(objMap){objMenu.onmouseover=Search.showOnMap;objMenu.onmouseout=Search.hideOnMap}objMenu.onclick=Search.click;if(objMenu.lastChild.nodeName=="DIV")objMenu.lastChild.onmouseover=Search.E_hideLogo;if(window.AdminPortal&&realObj.constructor==Firm)AdminPortal.setEventsForMenuItem(objMenu)}};Search.getWaitingText=function(){var menuHTML="<div class=\"message wait\">";menuHTML+=text["cakajte_process"];menuHTML+="</div>\n";menuHTML+="<div class=\"message tip\">";menuHTML+="<h3>"+text["tip_dlha_chvila"]+"</h3>";var nahodne_cislo=Math.round(Math.random()*(SuperNavigator.pocetTipov-1))+1;menuHTML+=text["tip_"+nahodne_cislo.zerofill(2)];menuHTML+="</div>\n";return menuHTML};Search.click=function(e){if(SuperNavigator.clientsProfileFn)SuperNavigator.clientsProfileFn(this.realObject.id);else if(SuperNavigator.clientsProfileURL)window.open(SuperNavigator.clientsProfileURL+"?id="+this.realObject.id,"win"+this.realObject.id);else if(!SuperNavigator.cannotOpenProfiles)this.realObject.click();else if(SuperNavigator.cannotOpenProfiles&&!rightMouse(e))MapView.zoomClick(e);return false};Search.loadLogo=function(imgObj){if(imgObj&&imgObj.nodeName=="IMG"&&imgObj.name!=""){imgObj.src=imgObj.name;imgObj.name=""}};Search.highlightInMenu_on=function(e){var object=(typeof(this.realObject)!="undefined")?this.realObject:e;var CLASS=object.constructor;var elementHTML=getById(CLASS.htmlMenuID+object.id);if(!elementHTML)return false;if(elementHTML.lastChild.nodeName=="DIV")Search.loadLogo(elementHTML.lastChild.firstChild);if(window.Category)Category.highlight_on(elementHTML)};Search.highlightInMenu_off=function(e){var object=(typeof(this.realObject)!="undefined")?this.realObject:e;var CLASS=object.constructor;var elementHTML=getById(CLASS.htmlMenuID+object.id);if(!elementHTML)return false;Category.highlight_off(elementHTML)};Search.showOnMap=function(e){var object=(typeof(this.realObject)!="undefined")?this.realObject:e;var CLASS=object.constructor;var elementHTML=getById(CLASS.htmlMenuID+object.id);if(!elementHTML)return false;Search.point2ObjectOnMap(object);Search.showLogo(elementHTML);if(SuperNavigator.clientID&&!SuperNavigator.mapModule&&CLASS.name=="Firm")AdminPortal.displayOptionsInElement(elementHTML,"block")};Search.hideOnMap=function(e){var object=(typeof(this.realObject)!="undefined")?this.realObject:e;var CLASS=object.constructor;Search.hidePointerOnMap();var elementHTML=getById(CLASS.htmlMenuID+object.id);if(!elementHTML)return false;Search.hideLogo(elementHTML);if(SuperNavigator.clientID&&!SuperNavigator.mapModule&&CLASS.name=="Firm")AdminPortal.displayOptionsInElement(elementHTML,"none")};Search.showLogo=function(elementHTML){if(elementHTML.lastChild.nodeName=="DIV"){Search.loadLogo(elementHTML.lastChild.firstChild);elementHTML.lastChild.style.display="block"}};Search.E_hideLogo=function(e){var obj=eventElement(e);if(obj.nodeName=="IMG")obj=obj.parentNode;Search.hideLogo(obj);stopBubbling(e)};Search.hideLogo=function(elementHTML){if(elementHTML.lastChild.nodeName=="DIV")elementHTML.lastChild.style.display="none"};Search.zoom2optimum=function(CLASS,_onlyAddresPointZoom){var city=-1;var cityBool=false;var area=new Area();area.cornerUL=new Position(10000000,10000000);area.cornerBR=new Position(-10000000,-10000000);var id;var counter=0;var objekty=(!window.MyPosition||CLASS!=MyPosition)?((CLASS==window.AddressPoint&&!_onlyAddresPointZoom)?Search.lastSearch:CLASS.lastSearch):MyPosition.lastSearch;var objs=new Array();var isInCity=(CLASS==window.AddressPoint&&MapView.actual&&MapView.actual.map.city)?MapView.actual.map.city:false;var areSomeObjectsInThisCity=false;for(id in objekty)if(typeof(objekty[id])=="object"&&objekty[id].constructor.all){objs.push(objekty[id]);if(isInCity&&objekty[id].city&&objekty[id].city.id==isInCity.id)areSomeObjectsInThisCity=true}if(CLASS==window.AddressPoint&&objs.length==1&&objs[0].constructor==City){if(mapCity[objs[0].id])MapView.gotoCity(mapCity[objs[0].id]);else MapView.zoomToLevel(Map.max_level_statu-1,objs[0].position);return false}if(CLASS==window.MyPosition&&objs.length==1&&objs[0].constructor==MyPosition&&objs[0].level!=0){if(objs[0].city&&mapCity[objs[0].city.id])MapView.gotoCity(mapCity[objs[0].city.id],objs[0].level,objs[0].position);else MapView.zoomToLevel(objs[0].level,objs[0].position);return false}var pos;for(var i=0;i<objs.length;i++){if(!isInCity||!areSomeObjectsInThisCity||(objs[i].city&&objs[i].city.id==isInCity.id)){counter++;pos=!objs[i].viewPosition?objs[i].position:objs[i].viewPosition;if(area.cornerUL.x>pos.x)area.cornerUL.x=pos.x;if(area.cornerBR.x<pos.x)area.cornerBR.x=pos.x;if(area.cornerUL.y>pos.y)area.cornerUL.y=pos.y;if(area.cornerBR.y<pos.y)area.cornerBR.y=pos.y;if(city!=objs[i].city&&!cityBool){city=objs[i].city;cityBool=true}else if(city!=objs[i].city&&cityBool)city=-1}}if(counter==0||SuperNavigator.forceLevel){MapView.redraw();return false}if(city===-1)city=null;if(city){if(mapCity[city.id]&&!mapCity[city.id].haveLoadedMaps()){if(this.isStack)this.free();var center=area.getCenter();stack.addProcess(Map.load_mapu_mesta,25.5,city.id,Map.max_level_statu+1,center.x,center.y);stack.addProcess(CLASS.zoom2optimum,Map.processCode);return false}}MapView.zoom2optimum(area)};Search.searchAndZoomObjectByID=function(objID,CLASS,_onlyRefresh){if(!_onlyRefresh){Search.clearLastArea();Search.setObject(CLASS);Search.setActualFirmID(objID);MapView.setFnWhenFinished(null);stack.addProcess(Search.load,Map.processCode)}else stack.addProcess(Search.loadAndRefreshOneFirmInAdminportal,Map.processCode,objID);return false};Search.searchAndZoomObjectByIDs=function(objectIDs,CLASS,selfIDsBoolean){Search.clearLastArea();Search.setObject(CLASS);if(CLASS==Firm)Search.setActualFirmIDs(objectIDs);else if(CLASS==Street)Search.setActualStreetIDs(objectIDs);else if(CLASS==MyPosition){if(!selfIDsBoolean)Search.setActualMyPosIDs(objectIDs);else Search.setActualMyPosSelfIDs(objectIDs)}MapView.setFnWhenFinished(null);stack.addProcess(Search.load,Map.processCode);return false};Search.searchByNameInClient=function(keyword,clientID){Search.clearLastArea();Search.setObject(Firm);Search.setActualKeywordNameClient(keyword);Search._tempClientID=clientID;MapView.setFnWhenFinished(null);stack.addProcess(Search.load,Map.processCode);return false};Search.searchAndZoomObjectByCategoryIDs=function(CategoryIDs,CLASS){Search.clearLastArea();Search.setObject(CLASS);if(CLASS==Firm)Search.setActualClientCategoryIDs(CategoryIDs);else if(window.MyPosition&&CLASS==MyPosition)Search.setActualMyPosCategoryIDs(CategoryIDs);MapView.setFnWhenFinished(null);stack.addProcess(Search.load,Map.processCode);return false};Search.searchInCategory=function(categoryObj){Search.clearLastArea();if(categoryObj.special=="no")Search.setObject(Firm);if(categoryObj.special=="realitna")Search.setObject(Property);if(categoryObj.special=="no"||categoryObj.special=="realitna"){Search.setActualCategory(categoryObj.id);Category.aktivna=categoryObj}else if(categoryObj.special=="mesta"){Search.setObject(City);Search.setActualKeyword('[vsetky mesta s mapou]')}if(Search.keyword)Search.keyword.value='';MapView.setFnWhenFinished(Firm.search);MapView.redraw();return false};Search.searchInPobocka=function(pobID){Search.setObject(Firm);Search.clearLastArea();Search.setActualPobocka(pobID);MapView.setFnWhenFinished(null);if(Search.keyword)Search.keyword.value='';stack.addProcess(Search.load,Map.processCode,"zoom2optimum=true");return false};Search.MapHTML="";Search.MenuHTML="";Search.pos="";Search.address="";Search.priemer=0;Search.priemer2=26;Search.k;Search.add2MapHTML=function(icon){Search.MapHTML="";if(this.radius)Search.priemer=MapView.getActualKoefInMeters(this.radius);Search.titleHTML="";if(!window.Category&&this.name.trim()!="")Search.titleHTML=' title="'+this.printTitle()+'"';if(browser.isOP||!this.radius||Search.priemer<Firm.minRadiusSize){Search.pos=this.position.toScreenFromBase().minus(icon.half);Search.MapHTML+='<a id="'+this.constructor.htmlMapID+this.id+'" class="i" href="#" ';Search.MapHTML+='style="'+Search.pos.printToStyleHTML();if(Search.object==window.AddressPoint)Search.MapHTML+="; z-index:"+Math.round(Search.pos.plus(icon.half).getY());Search.MapHTML+=';"';Search.MapHTML+='><img src="'+icon.src+'"';Search.MapHTML+=Search.titleHTML;Search.MapHTML+=' />';Search.MapHTML+=this.printIndex(Search.printIndex+1)+'</a>'}else{if(browser.isIE)Search.pos=this.position.toScreenFromBase().minus(Search.priemer*0.1782,Search.priemer*0.5545);if(browser.isNS)Search.pos=this.position.toScreenFromBase().minus(Search.priemer*0.1798,Search.priemer*0.5671);Search.MapHTMLradius+='<div id="'+this.constructor.htmlMapID+this.id+'" class="radius" style="font-size: '+Math.round(Search.priemer*(browser.isNS?0.993:1))+'px;'+Search.pos.printToStyleHTML()+'">&bull;</div>'}return Search.MapHTML};Search.iconIndex=new Array(1,2,3,5,6,4);Search.add2MenuHTML=function(){Search.MenuHTML="";Search.MenuHTML+='<a id="'+this.constructor.htmlMenuID+this.id+'" href="#" class="item';if(this.visited&&(this.constructor.zobrazovat_objekty==1||this.constructor.zobrazovat_objekty==3))Search.MenuHTML+=' visited';if(this.special&&(!this.visited||(this.constructor.zobrazovat_objekty!=1&&this.constructor.zobrazovat_objekty!=3)))Search.MenuHTML+=' special';if(this.font)Search.MenuHTML+=' font';Search.MenuHTML+='">';for(var i=0;i<this.constructor.factoryMethodArray.length;i++)Search.MenuHTML+=this.constructor.factoryMethodArray[i].apply(this);Search.MenuHTML+='</a>';return Search.MenuHTML};Search.showOnProfileMapObject=null;Search.showOnProfileMap=function(priStarteMapy){if(!priStarteMapy){var obj=Search.showOnProfileMapObject;var CLASS=obj.constructor;var mapHTML="";var icon=icons[CLASS.defaultIcon[MapView.actual.map.level]];addHalfIcon(icon);var mapHTML="";var pos=obj.position.toScreenFromBase().round();mapHTML+='<div style="width:'+MapView.getWidth()+'px; height:'+pos.getY()+'px;" class="printposition" id="horizontalpositionline"></div>';mapHTML+='<div style="width:'+pos.getX()+'px; height:'+MapView.getHeight()+'px;" class="printposition" id="verticalpositionline"></div>';var box=new Size(11,11);var posBox=pos.getCopy().minus(box.getCopy().divide(2)).minus(1);mapHTML+='<div style="'+box.plus(1).printToStyleHTML()+posBox.printToStyleHTML()+'" class="printposition" id="positionbox"></div>';pos.minus(icon.half);mapHTML+='<a class="ikona" href="#" ';mapHTML+='style="'+pos.printToStyleHTML()+'"';mapHTML+=' onclick="return false;"';mapHTML+='><img src="'+icon.src+'" /></a>';mapHTML+=here(obj.position);MapView.showOnProfile=vytvorHTMLElement("div","showOnProfile",MapView.mainDiv);MapView.showOnProfile.style.display="block";MapView.showOnProfile.style.position="absolute";MapView.showOnProfile.style.left="0px";MapView.showOnProfile.style.top="0px";MapView.showOnProfile.style.border="1px solid red";MapView.showOnProfile.style.zIndex="5";MapView.showOnProfile.innerHTML=mapHTML;MapView.showDistanceToPosition(obj.position)}};