function showImage(url,w,h){

	wasOpen  = false;
  if ( (0<w) && (0<h) )
  {
	  win = window.open('', '', 'left='+(screen.width/2-100)+', top='+(screen.height/2-80)+', width=190, height=180, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	else
	{
    win = window.open(url);
  }

  win.focus();

  win.document.write('<html style="padding: 0; maring: 0;"><body style="padding: 0; maring: 0;"><div style="text-align: center;" id="loading"><img src="images/loading.gif" width="50" height="50" alt="" /></div><img id="photo" style="position: absolute; left: 0; top: 0; visibility: hidden;" onclick="window.close();" onload="this.style.visibility=\'visible\'; window.moveTo(screen.width/2-(document.images.photo.width+30)/2, screen.height/2-(document.images.photo.height+60)/2); window.resizeTo((document.getElementById(\'photo\').offsetWidth), (document.getElementById(\'photo\').offsetHeight+25)); window.moveTo(screen.width/2-(document.images.photo.width+10)/2, screen.height/2-(document.images.photo.height+60)/2);" name="photo" src="'+url+'" alt="" /></body></html>');

  
  return (typeof(win)=='object')?true:false;


} 


function windowUp(url,w,h){

	wasOpen  = false;
  if ( (0<w) && (0<h) )
  {
	 win = window.open(url,'detail','left='+(screen.width/2-w/2)+', top='+(screen.height/2-h/2)+', width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	else
	{
    win = window.open(url);
  }
	win.focus();
  return (typeof(win)=='object')?true:false;

} 

function OpenNewWindow (url)

{

 no = window.open (url, 'OpenNewWindow');

 no.document.focus();

}



//galerie

function galery (pat, name,w,h)

{

 var img = '';

 

 img = name;

 

 galerys = window.open ('', 'zoom', 'left=100, top=100, width='+w+', height='+h+','+

                        'toolbar=no, location=no, directories=no, status=no,'+

                        'menubar=no, scrollbars=no, resizable=no, copyhystory=no');



 with (galerys.document)

 {

  open ();

   write ('<?xml version="1.0" encoding="iso-8859-2"?>\n');

   write ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n');

   write ('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">\n');

   write ('<head>\n\n');

   write (' <title>galery - '+name+'</title>\n\n');

   write (' <meta http-equiv="content-type"  content="application/xhtml+xml; charset=iso-8859-2" />\n');

   write (' <meta http-equiv="pragma"        content="no-cache" />\n');

   write (' <meta http-equiv="cache-control" content="no-cache" />\n');

   write (' <meta http-equiv="expires"       content="-1" />\n\n');

   write ('<style type="text/css">body{margin:0px;padding:0px;overflow:hidden;}img{border:0px}</style>');

   write ('</head>\n');

   write ('<body>\n');

   write ('<a href="javascript:close();" title="close">');

   write ('<img src="img/'+pat+'/'+img+'" alt="'+name+'" name="prvni" />\n');

   write ('</a>\n');

   write ('</body>\n');

   write ('</html>');

  close ();

 }

}

// prepocitava objednavku darkovych poukazu
function zmenaCelkem() {
	var a = parseInt(document.form.hodnota.options[document.form.hodnota.selectedIndex].text);
	var b = parseInt(document.form.pocet.value);
	if (!b) {
		b = 1;
		document.form.pocet.value = 1;
	}
	document.form.celkem.value = (a && b) ? a*b : 0;
}

 

