function turn_off(ImageName) {
	if (document.images != null) {
		document[ImageName].src = eval(ImageName + "_off.src");
	}
}

function turn_over(ImageName) {
	if (document.images != null) {
		document[ImageName].src = eval(ImageName + "_over.src");
	}
}

function newObr(src,winName,w,h,prop,lp,tp) {
	winLeft = (!lp)? (screen.width - w) / 2 : lp;
	winTop = (!tp)? ((screen.height - h) / 2) : tp;
	winProp = (!prop)? 'menubar=no,resizable=no,scrollbars=0,status=no,toolbar=no,locationbar=no,directories=no' : prop;
	winProp += ',width='+w+',height='+h+',left='+winLeft+',top='+winTop;
	Win = window.open(src,winName,winProp);
	Win.focus();
}
   
function novy_obrazek(imgsrc,imgname,w,h) {
	newObr('','fotos',w, h);
	Win.document.open();
	Win.document.write('<html>\n');
	Win.document.write('<head>\n');
	Win.document.write('	<title>'+imgname+'</title>\n');
	Win.document.write('	<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">\n');
	Win.document.write('<link rel="StyleSheet" href="/css/main.css" type="text/css">\n'); 
	Win.document.write('	<style type="text/css">body {margin: 0;}</style>\n');
	Win.document.write('</head>\n');
	Win.document.write('<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bottommargin="0" rightmargin="0">\n');
	Win.document.write('<img src="'+imgsrc+'" width="'+w+'" height="'+h+'" border="0" title="[click to close]" alt="[click to close]" onclick="window.close();">\n');
	Win.document.write('</body>\n');
	Win.document.write('</html>\n');
	Win.document.close();
	Win.focus();
}
