function zobrazObr()
{
	attr = 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=900,height=700,left = 190,top = 162';
	popWin=open('', 'Obrazok', attr);
	popWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> \n'+
													'<html xmlns="http://www.w3.org/1999/xhtml"> \n'+
												  	'<head> \n'+
												 			'<title>MX portál - Obrázok</title> \n'+
														    '<meta http-equiv="content-type" content="text/html; charset=windows-1250" /> \n'+
																'<meta http-equiv="pragma" content="no-cache" /> \n'+
	    													'<meta http-equiv="cache-control" content="no-cache" /> \n'+
															  '<meta http-equiv="expires" content="-1" /> \n'+
																'<meta http-equiv="content-language" content="sk" /> \n'+
															'</head> \n'+
															'<body> \n'+
																'<div align=center onclick="window.close();" title="Kliknutim sa obrázok zavrie"> \n'+
																	'<p align="center"><img border="0" src="'+zobrazObr.arguments[0]+'" /></p> \n'+
																'</div> \n'+
															'</body> \n'+
														'</html>');
}	 

function FotoPosun()
{	
	var aktObrazok=document.getElementById("obrazok").getAttribute("obr");
	var obrazky=foto.split(";");
	var miestoTmp=FotoPosun.arguments[1];
	if ((obrazky.length-1)>0)
	{
		for (i=0;i<obrazky.length-1;i++)
		{
			if (aktObrazok==obrazky[i])
			{						
				if (FotoPosun.arguments[0]==0)
				{
					if (i==0)
					{
						var str=parseInt(document.form.strana.value);
						if (str>0)
						{
							FotoPosunStrany(document.form.menu.value,document.form.subMenu.value,str-1,'',miestoTmp);
						}
						else
						{
							alert("Začiatok");
							break;
						}
					}
					ii=i-1;
				}
				if (FotoPosun.arguments[0]==1)
				{
					if (i==obrazky.length-2)
					{
						if (document.getElementById("btn_next2")==null){alert("Koniec");break;}
						var str=parseInt(document.form.strana.value);
						FotoPosunStrany(document.form.menu.value,document.form.subMenu.value,str+1,'',miestoTmp);
					}
					ii=i+1;
				}
				document.getElementById("obrazok").src=obrazky[ii];
				document.getElementById("obrazok").setAttribute("obr",obrazky[ii]);
			}
		}
	}
}

function FotoPosunStrany()
{	
	if (FotoPosunStrany.arguments[2]==0 && document.form.strana.value==0)
	{
		alert("Začiatok");return;
	}
	if (!(FotoPosunStrany.arguments[3]==undefined))	
	{
		if (FotoPosunStrany.arguments[3]=='koniec')	
		{alert("Koniec");return;}
	}
	document.form.menu.value=FotoPosunStrany.arguments[0];
	document.form.subMenu.value=FotoPosunStrany.arguments[1];
	document.form.strana.value=FotoPosunStrany.arguments[2];
	document.form.miesto.value=FotoPosunStrany.arguments[4];
	document.form.submit();
}
