	
// © 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)
	
function Street(add2Search,id,name,cityID,cityName,x,y){if(id!=0){if(arguments.length>3){this.id=id;this.name=name;if(cityName!="")new City(false,cityID,cityName);if(City.all[cityID]&&typeof(City.all[cityID])=="object")this.city=City.all[cityID];else
this.city=cityID;this.position=new Position(x,y);this.visited=false;Street.all[id]=this;if(add2Search)Street.lastInserted=Street.lastSearch[id]=Search.lastSearch[Street.htmlMenuID+id]=this;}
else{if(Street.all[id]&&typeof(Street.all[id])=="object"){}
else
Street.all[id]=id;if(add2Search)Street.lastInserted=Street.lastSearch[id]=Search.lastSearch[Street.htmlMenuID+id]=Street.all[id];}}
return Street.all[id];}
Street.defaultIcon=Array(21,21,21,11,11,11,11,21,11,11,11,11);Street.defaultVisitedIcon=Array(19,19,19,1,1,1,1,19,1,1,1,1);Street.init=function(){var ikony=Street.defaultIcon.unique();ikony=ikony.concat(Street.defaultVisitedIcon.unique());for(var id in ikony)if(typeof(ikony[id])=="number"&&ikony[id]!=0)loadIcon(ikony[id]);Street.reset();Search.getStreetById=function(id){return Search.lastSearch[Street.htmlMenuID+id];}}
Street.all=new Array();Street.allCount=function(){return Street.all.count();}
Street.getTotalCount=function(){return Street.lastSearch.count();}
Street.lastSearch=new Array();Street.name="Street";Street.htmlMapID="ms";Street.htmlMenuID="s";Street.suborder=2;Street.prototype.suborder=Street.suborder;Street.newSearch=function(){Street.lastSearch=new Array();}
Street.search=function(onlyHeader){if(onlyHeader)Search.redraw(onlyHeader);else
stack.addProcess(Search.load,40);}
Street.reset=function(){Street.zobrazovat_objekty=Street.zobrazovat_objekty_default;Street.zoradit_objekty=Street.zoradit_objekty_default;}
Street.prototype.click=function(){this.zoom2max();}
Street.prototype.visit=function(){Search.makeObjectVisited(this);}
Street.prototype.zoom2max=function(){Search.zoom2max(this);return false;}
Street.prototype.valueOf=function(){return this.name+", \n"+this.printAddress();}
Street.prototype.printIndex=function(index){return'<var>'+(Search.printIndex+1)+'.</var>';}
Street.tempStr='';Street.prototype.printTitle=function(){Street.tempStr=this.printAddress();return this.name+(Street.tempStr!=''?((!browser.isIE?", ":"\n")+Street.tempStr):'');}
Street.prototype.printCaption=function(){return'<strong>'+this.name+'</strong>';}
Street.prototype.printAdresa=function(){return'<address>'+this.printAddress()+'</address>';}
Street.prototype.printAddress=function(){return this.city.name;}
Street.factoryMethodArray=new Array(Street.prototype.printIndex,Street.prototype.printCaption,Street.prototype.printAdresa);Street.zobrazovat_objekty_default=1;Street.zoradit_objekty_default=0;Street.sorting=new Array();Street.sorting[0]=Search.sortByStreetFn;Street.howToSort=function(){return Street.sorting[0];}
Street.get_menuHeader_text=function(){return text["vyhl_ulic_namesti"];}
Street.get_celkovy_pocet_text=function(){return text["celkovy_pocet_ulic"];}
Street.get_pocet_text=function(){return text["pocet_ulic"];}
Street.get_nic_nenaslo_text=function(){return text["hs_ulicu_nenaslo"];}
Street.get_naslo_inde_text=function(){return text["hs_ulicu_naslo"];}
Street.get_skryte_text=function(){return"";}
Street.get_moznosti_zobrazovania_text=function(){return"";}
Street.get_moznosti_zoradovania_text=function(){return"";}
Street.prototype.add2MapHTML=Search.add2MapHTML;Street.prototype.add2MenuHTML=Search.add2MenuHTML;Street.zoom2optimum=function(){this.block(Street);Search.zoom2optimum(Street);this.free();}