function openWin(url,w,h) { 
  open (url, '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h);
}

function openWinh(url,w,h) { 
  open (url, '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+w+',height='+h); 
}

function checkform(F) {
		if (F["volby"].selectedIndex < 1) {
			alert("Zvolte akci.");
			return false;
		}
		test = false;

		for (i = 0; i < F.elements.length; i++) {
			if (F.elements[i].type == "checkbox") {
				if (F.elements[i].checked) {
					test = true;
				}
			}
		}
		if (!test) { alert('Nezvolili-jste fotografie.') }
		return test;
	}

function AddFavorite(linkObj,addUrl,addTitle)
{
  if (document.all && !window.opera)
  {
    window.external.AddFavorite(addUrl,addTitle);
    return false;
  }
  else if (window.opera && window.print)
  {
    linkObj.title = addTitle;
    return true;
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
  {
    if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
    {
      window.sidebar.addPanel(addTitle,addUrl,'');
      return false;
    }
  }
  window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
  return false;
}

function show_orig(i) {
		eval('file_name = document.forms.upform.spic'+i+'.value'); 
		if (((file_name.toLowerCase()).indexOf("jpg") > 0) || ((file_name.toLowerCase()).indexOf("jpeg") > 0)) {
	        new_w = window.open("", "new_w", "width=600,height=465,status=0,menubar=0,scrollbars=1,resizable=1,menubar=0,left=50,top=50");
			new_w.document.open();
			new_w.document.write('<html><head><title>Náhled fotografie</title></head>');
			new_w.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff">');
			new_w.document.write('<a href="javascript:self.close()">');
			new_w.document.write('<img src="file:///'+file_name+'" alt="KLIKNUTÍM ZAVRETE." border="0" width="600"></a>');
			new_w.document.write('</body></html>');
			new_w.document.close();
		} else {
			alert("Není zadán obrázek.");
		}
}

function okno(url,nazev,x,y) {
 xc=(screen.width / 2) - (x/2);
 yc=(screen.height / 2) - (y/2);
 var windows=window.open(url,nazev,'width='+x+',height='+y+',top='+yc+',left='+xc+',menubar=0,toolbar=0,margins=0,scrollbars=1');
}

function oknoImg(url,nazev,x,y) {
 xc=(screen.width / 2) - (x/2);
 yc=(screen.height / 2) - (y/2);
 imgx=x-20;
 imgy=y-20;
 var windows=window.open(url,nazev,'width='+x+',height='+y+',top='+yc+',left='+xc+',menubar=0,toolbar=0,margins=0,scrollbars=0');
 windows.document.write('<body topmargin=0 leftmargin=0 rightmargin=0>');
 windows.document.write('<table cellspacing=0 cellpadding=0 border=0>');
 windows.document.write('<tr><td><img src='+url+' width='+x+' height='+y+' border=0></td></tr></table></body>'); 
}


