function showRoute(jak) 
	{
	kreslit_trasu=jak; 
	if (jak) otrasa.style.display='block'; 
	else otrasa.style.display='none';
	}

function setRoute(trasa,obrys,vypln)
	{
	if (prohlizec!=1) self.status="Zobrazování vektorových dat funguje bohužel jen v prohlížečích Microsoft internet Explorer.";
	if (!obrys) obrys="0,100,250";
	var text,i,cr;
	text="<div id='otrasa'><OBJECT style='width:"+gid("pd").style.left+"; height:"+gid("pd").style.top+"; z-index:2;position:absolute;left:0px;top:0px;' CLASSID='CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6'>";
	text=text+"<PARAM NAME='Line0001' VALUE='SetLineColor(255,255,255)'><PARAM NAME='Line0002' VALUE='SetLineStyle(1,4)'><PARAM NAME='Line0003' VALUE='HighQuality(1)'>";
	text=text+"<PARAM NAME='Line0004' VALUE='PolyLine("+(trasa.length/2);
	for (i=0;i<trasa.length;i=i+2) text=text+","+Math.round(m2px_x(trasa[i]))+","+Math.round(m2px_y(trasa[i+1]));
	text=text+",0)'>";
	text=text+"<PARAM NAME='ExtentTop' VALUE=0><PARAM NAME='ExtentLeft' VALUE=0></object>";
	
	text=text+"<OBJECT style='width:"+gid("pd").style.left+"; height:"+gid("pd").style.top+"; z-index:2;position:absolute;left:0px;top:0px;' CLASSID='CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6'>";
	text=text+"<PARAM NAME='Line0001' VALUE='SetLineColor("+obrys+")'><PARAM NAME='Line0002' VALUE='SetLineStyle(1,2)'><PARAM NAME='Line0003' VALUE='HighQuality(1)'>";
	text=text+"<PARAM NAME='Line0004' VALUE='PolyLine("+(trasa.length/2);
	for (i=0;i<trasa.length;i=i+2) text=text+","+Math.round(m2px_x(trasa[i]))+","+Math.round(m2px_y(trasa[i+1]));
	text=text+",0)'>";
	text=text+"<PARAM NAME='ExtentTop' VALUE=0><PARAM NAME='ExtentLeft' VALUE=0></object>";
	
	if (vypln)
		{
		text=text+"<OBJECT style='width:"+gid("pd").style.left+"; height:"+gid("pd").style.top+"; z-index:1;position:absolute;left:0px;top:0px;' CLASSID='CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6'>";
		text=text+"<PARAM NAME='Line0001' VALUE='HighQuality(1)'><PARAM NAME='Line0002' VALUE='SetLineColor("+vypln+")'><PARAM NAME='Line0003' VALUE='SetLineStyle(1,1)'><PARAM NAME='Line0004' VALUE='SetFillColor("+vypln+")'><PARAM NAME='Line0005' VALUE='SetFillStyle(1)'>";
		text=text+"<PARAM NAME='Line0006' VALUE='Polygon("+(trasa.length/2);
		for (i=0;i<trasa.length;i=i+2) text=text+","+Math.round(m2px_x(trasa[i]))+","+Math.round(m2px_y(trasa[i+1]));
		text=text+",0)'>";
		text=text+"<PARAM NAME='ExtentTop' VALUE=0><PARAM NAME='ExtentLeft' VALUE=0></object></div>";
		}
	text=text+"</div>"
	gid("ktrasa").innerHTML=text;
	ptrasa=trasa;
	tbarva=vypln;
	tobrys=obrys;
	
	text="";
	for (i=0;i<trasa.length;i=i+2) if ((Math.round(m2px_x(trasa[i]))-13)>0 && (Math.round(m2px_x(trasa[i]))+13)<s_m_px && (Math.round(m2px_y(trasa[i+1]))-8)>0 && (Math.round(m2px_y(trasa[i+1]))-8)<v_m_px) text=text+"<div class='cislo' style='left:"+(Math.round(m2px_x(trasa[i]))-13)+"px;top:"+(Math.round(m2px_y(trasa[i+1]))-8)+"px;width:26px;'>"+i/2+"</div>";
	gid("cisla").innerHTML=text;
	}
	
function showNumbers(jak) 
	{
	show_numbers=jak; 
	if (jak) cisla.style.visibility='visible'; 
	else cisla.style.visibility='hidden';
	}
