function trasa(){
				  cil=encodeURI(document.map.st.value);
				   window.open("http://www.mapy.cz/#sa=r@st=sr@ssq=opu%C5%A1t%C4%9Bn%C3%A1,%20brno@sss=1@ssp=109150208_122798080_151879680_156336128@srq=route(fast,toll):"+cil+"%3E49%C2%B011'8.162%22N,%2016%C2%B036'31.106%22E","trasa","");
}

function changeImg(src,imgNum){
 document.getElementById('bigImg').src=src;
 document.getElementById('imgA').href=src;
 document.getElementById('dimImgCountAct').innerHTML = imgNum;
 actimg = parseInt(imgNum);
}

var actimg = 1;

function changeImgTo(operand,max){
 actimg = actimg + parseInt(operand);
 if (actimg > max) actimg = max;
 if (actimg < 1)   actimg = 1;
 document.getElementById('bigImg').src=document.getElementById('img'+actimg).href;
 document.getElementById('imgA').href=document.getElementById('img'+actimg).href;
 document.getElementById('dimImgCountAct').innerHTML = actimg;
}

function pridejAuto(auto){
 cti('/oblibene_funkce.php?pridejAuto='+auto,'nic');
}

function odeberAuto(auto){
 cti_synchro('/oblibene_funkce.php?odeberAuto='+auto,'nic');
 location.href="/autobazar/informace/oblibene.htm";
}

function setCookie(cookieName,cookieValue,nHours) {
 var today = new Date();
 var expire = new Date();
 if (nHours==null || nHours==0) nHours=1;
 expire.setTime(today.getTime() + 3600000*nHours);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}
      hs.zindexcounter = 8000;
	hs.graphicsDir = '/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
      hs.showCredits = false;
      hs.dynamicallyUpdateAnchors = true;
	//hs.dimmingOpacity = 0.75;

	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 4000,
		repeat: false,
		useControls: true,
		fixedControls: true,
		overlayOptions: {
			opacity: .75,
			position: 'top center',
			hideOnMouseOut: true
		}
	});

var run;

function moveFoto(dir){
 pos = parseInt(document.getElementById('canvas').style.marginLeft);
 if (isNaN(pos)) pos = 0;
 max = parseInt(document.getElementById('Wdetect').offsetWidth);
 maxLeft = (max - 600)*(-1);
 if (dir == 'right'){ newPos = pos - 5; if (newPos<maxLeft) newPos = maxLeft; }
 if (dir == 'left') { newPos = pos + 5; if (newPos>0) newPos = 0;}
 document.getElementById('canvas').style.marginLeft = newPos + 'px';

 document.getElementById('canvas').style.marginLeft = newPos + 'px';
                      run = setTimeout("moveFoto('"+dir+"')",30);



}

function stopMoveFoto(){
   clearTimeout(run);
}