/* DOPRAVA  START*/
function onmap(co){
	if (document.getElementById('mapa')!=null){
		document.getElementById('mapa').src="/layout/mapa/"+co+".png";
	}		
}
function change_sel(co){
	var stary=document.getElementById('akt_mesto').value;
	if (document.getElementById(co)!=null){
		document.getElementById(co).style.display="";
	}	
	if (document.getElementById('akt_mesto')!=null){
		document.getElementById('akt_mesto').value=co;
	}		
	if (document.getElementById(stary)!=null){
		document.getElementById(stary).style.display='none';
	}	
}
function change_m2(co){
//	document.forms["form_doprava"].submit();
}
/* DOPRAVA KONEC*/

function myhref(text,kam) {
	top.location.replace(kam);
};

function smaz(obj,def){
	if (document.getElementById(obj)!=null){
		if (document.getElementById(obj).value==def) document.getElementById(obj).value='';
	}		
}

//SLIDER
var casovac = null;

function TitleFotoStart(posun)
{
	if (casovac != null)
	{
		clearInterval(casovac);
	}
	casovac = setInterval('TitleFotoPosun('+posun+')',50);
}

function TitleFotoPosun(posun)
{
	var floatObj = document.getElementById('slider-content-float');
 	if (posun > 0 && floatObj.offsetLeft>=0)
	{
		TitleFotoStop();
		return;
	}
	
	if (posun < 0 && 771 - floatObj.offsetLeft >= floatObj.offsetWidth)
	{
		TitleFotoStop();
		return;
	}

	floatObj.style.left = (floatObj.offsetLeft + posun) + 'px';
}

function TitleFotoStop()
{
	if (casovac != null)
	{
		clearInterval(casovac);
		casovac = null;
	}
}

