var myTWin = window.myTWin;
    
    function OpenMyWin(link,winName,sirka,vyska,popisek)
    {
      var retValue=true;
      if (myTWin!=null && !myTWin.closed)
      {
        myTWin.focus();
        myTWin.location.href=link.href;
      }
      else
      {
        myTWin=window.open(link.href,winName,'width='+sirka+',height='+vyska+',scrollbars=0,resizable=0,toolbar=0');
        myTWin.document.open('text/html');
        myTWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n');
        myTWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">\n');
        myTWin.document.write('<head>\n');
        myTWin.document.write('<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n');
        myTWin.document.write('<meta name="Description" content="HC Grewis Plumlov" />\n');
		myTWin.document.write('<meta name="keywords" content="lední hokej, Plumlov" />\n');
        myTWin.document.write('<meta http-equiv="imagetoolbar" content="no" />\n');
        myTWin.document.write('<meta name="autosize" content="off" />\n');
		myTWin.document.write('<title>'+popisek+' - Kliknutim zavrete</title>\n');
        myTWin.document.write('<style>body { font:81.25%/1.4 Verdana,sans-serif; margin: 0; padding: 0; text-align: center; }  img { border-style: none;display:block; }</style>\n');
        myTWin.document.write('</head>\n');
        myTWin.document.write('<body>\n');
        myTWin.document.write("<a title=\"Kliknutím zavřete\"  href=\"javascript:window.close('close')\">\n");
        myTWin.document.write('<img alt=\"Kliknutím zavřete\" src=\"'+link.href+'\"');
        myTWin.document.write(' width=\"'+sirka+'\" height=\"'+vyska+'\" alt="'+popisek+'" /></a>\n');
        myTWin.document.write('</body>\n');
        myTWin.document.write('</html>');        
        myTWin.document.close();
        if (myTWin==null || typeof(myTWin)=="undefined")
          retValue=false;
        else
        {
          link.target=winName;
          myTWin.focus();
        }
      }
      return retValue;
    }

