var NewWindow = null;

function ShowItem(src, w, h){
if(NewWindow != null){NewWindow.close();}
if(NewWindow==null || NewWindow.closed){
 settings=
 "left=10,"
 +"top=20,"
 +"width=" + w + ","
 +"height=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"resizable=no"
 NewWindow = window.open("",'Klose',settings);
}
NewWindow.document.open();
NewWindow.document.clear();
NewWindow.document.write(
"<html><head><title>Fotogaléria</title></head>\n"
+"<body topmargin=0 leftmargin=0 onclick=window.close(); onblur=\"window.close();\""
+"onload=\"window.resizeTo(picture.width+10, picture.height+30);\" bgcolor=#FFFFFF>\n"
+"<img id=picture src=" + src + " style=\"cursor: hand\" title=\"zavrieť okno\" border=0>\n"
+"</body>\n"
+"</html>"
);
NewWindow.document.close();
NewWindow.focus();
}

function Delete(IdCategory, IdFile)
{
	if (confirm('Naozaj zmazať obrázok?'))
	{
		location.href='?photogallery&ID=' + IdCategory + '&del=' + IdFile;
	}
}
function DeleteMap(IdFile)
{
	if (confirm('Naozaj zmazať mapu?'))
	{
		location.href='?maps&del=' + IdFile;
	}
}
function DeleteAd(IdFile)
{
	if (confirm('Naozaj zmazať reklamu?'))
	{
		location.href='?news&del=' + IdFile;
	}
}

function ConfirmArchive(form)
{
	year = form.archive.value;
	datenow = new Date();
	if (parseInt(year) != year) {alert('Zlý formát roku'); return false;}
	if (year < 2005 || year > datenow.getFullYear()) {alert('Rok mimo rozsah'); return false;}
	return confirm('Naozaj archivovať rok ' + year + '?');
}

<!--
   window.defaultStatus = 'Preteky automobilov do vrchu - Moris Cup Jahodná';
//-->

