var currCount = 0
var timerID
var imgtoPreload = new Array()
var imgtoNow = new Image()

function getImagesIndex(ImagesCount, ImagesName, ImagesSuffix) { 
//
    
}

function adjustHeights(newHeight) {
	window.document.menuRaj.SetVariable("/:newHeight", newHeight);
	window.document.menuRaj.GotoFrame (1);
}

function setKm() {
	document.f.km.value = document.f.mesta.options[document.f.mesta.selectedIndex].value;
	//alert(document.forms['f'].mesta.value)
}

function showImg(url) {
	actual_Img = new Image();
	actual_Img.src  = url;
	checkLoad();
}

function checkLoad() {
	 if (actual_Img.height != 0) {
		openImgWin(actual_Img);
		return;
     }
	timerID = setTimeout("checkLoad()",10) 

}

function openImgWin(Img) {
	//alert(Img.height + "\n" + Img.width);
   windowid++; 
   t = "Náhled obrázku";
   wleft = (screen.width - Img.width) / 2;
   wtop = (screen.height - Img.height) / 2;
   w=open("",windowid,"toolbar=no," +
   		"directories=no," +
   		"menubar=no," +
   		"scrollbars=no," +
   		"resizable=no," +
   		"width="+Img.width+"," +
   		"height="+Img.height+"," +
   		"left="+ wleft +"," +
   		"top="+wtop );
   w.document.write("<HTML><HEAD>");
   w.document.write("<TITLE>"+t+"</TITLE></HEAD>");
   w.document.write("<BODY leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><CENTER>");
      w.document.write("<IMG SRC=\""+Img.src+"\">");
   w.document.write("</CENTER></BODY></HTML>");
}

windowid=0;

function imgWin(t,i,w,h) {
   windowid++; 
   id=name;	
   w=open("",windowid,"toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,width="+w+",height="+h);
   w.document.write("<HTML><HEAD>");
   w.document.write("<TITLE>"+t+"</TITLE></HEAD>");
   w.document.write("<BODY leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><CENTER>");
      w.document.write("<IMG SRC=\""+i+"\">");
   w.document.write("</BODY></HTML></CENTER>");
}

