/*

    General JavaScript Functions

    Revision: 2008-11-18
    Author: Jan Virt


    Encoding: UTF-8

*/

function imgShow(img, desc, x, y)
{
  var wnd = window.open('', '_blank', 'top=50,left=50,width=' + x + ',height=' + y);
  var url = location.href;
  url = url.replace(/[^\/]*$/, img);
  with (wnd.document)
  {
    open();
    write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"' + "\n");
    write('  "http://www.w3.org/TR/html4/strict.dtd">' + "\n");
    write('<html lang="cs">' + "\n");
    write('<head>' + "\n");
    write('  <meta http-equiv="content-type" content="text/html; charset=utf-8">' + "\n");
    write('  <meta http-equiv="content-style-type" content="text/css; charset=utf-8">' + "\n");
    write('  <meta name="author" content="Jan Virt (http://jv.borec.cz/)">' + "\n");
    write('  <title>' + desc + '</title>' + "\n");
    write('  <style type="text/css">' + "\n");
    write('    body { padding: 0; margin: 0; }' + "\n");
    write('    img { position: absolute; left: 0; top: 0; padding: 0; margin: 0; }' + "\n");
    write('    #info { position: absolute; left: 0; bottom: 0; padding: 5px; margin: 0; color: yellow; font-size: 0.8em; display: none; }' + "\n");
    write('  </style>' + "\n");
    write('</head>' + "\n");
    write('<body onclick="window.close()" onkeypress="document.getElementById(\'info\').style.display = \'block\';">' + "\n");
    write('<img src="' + url + '" alt="Kliknutím zavřete okno">' + "\n");
    write('<div id="info">' + url + "</div>\n");
    write('</body>' + "\n");
    write('</html>' + "\n");
    close();
  }
  return false;
}
