function galery (name, folder, m, sizex, sizey)
{
 var img = '';
 var url = '';
 
 img = name+".jpg";
 url = folder+"/"+name;

if (m=='A') { 

 galerys = window.open ('', 'zoom', 'left=100, top=100, width='+sizex+', height='+sizey+','+
                        'toolbar=no, location=no, directories=no, status=no,'+
                        'menubar=no, scrollbars=no, resizable=no, copyhystory=no');

} else {
 galerys = window.open ('', 'zoom', 'left=100, top=100, width=600, height=424,'+
                        '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/'+url+'" alt="'+name+'" />\n');
   write ('</a>\n');
   write ('</body>\n');
   write ('</html>');
  close ();
 }
}