function imageViewLink(imgUrl,title,reuseWindow)
{
  var sTarget = '_viewLink';
  if (reuseWindow !=null && !reuseWindow)
    sTarget = '_blank';
  var pWin = window.open('',sTarget,'width=400,height=460,top=40,left=60,channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0');
  if (pWin)
  {
    pWin.focus();
    pWin.document.open();
    pWin.document.writeln('<html>');
    pWin.document.writeln('  <head>');
    pWin.document.writeln('    <meta http-equiv="Page-Enter" content="RevealTrans(Duration=2,Transition=23)" />');
    pWin.document.writeln('    <meta http-equiv="Page-Exit" content="RevealTrans(Duration=1,Transition=12)" />');
    pWin.document.writeln('    <meta http-equiv="Imagetoolbar" content="no" />');
    pWin.document.writeln('    <meta http-equiv="MSThemeCompatible" content="no" />');
    pWin.document.writeln('    <meta name="MSSmartTagsPreventParsing" content="true" />');
    pWin.document.writeln('    <meta name="AutoSize" content="Off" />');
    var sTitle = 'Ukázka ERP EPASS';
    if (title != null && title.length > 0)
      sTitle = title;
    pWin.document.writeln('    <title>'+sTitle+'<\/title>');
    var bodyStyle = '';
    var divStyle = '';
    var imgStyle = '';
    var h1Style = '';

      bodyStyle = ' style="background:white; padding:4px; margin:0px; overflow:auto; cursor:pointer;"';
      if (navigator.appName=='Microsoft Internet Explorer')
        bodyStyle += ' height:100%;';
      bodyStyle +='"';
      divStyle = ' style="width:100%;text-align:center;"';
      imgStyle = ' style="border:none;"';
      h1Style = ' style="text-align:left; border-bottom:1px solid silver; font-family:Trebuchet MS, Arial, sans-serif; color:#000080; font-size:1.4em; margin:10px 28px 10px 28px; padding:5px 0 5px 0;"';

    pWin.document.writeln('  <\/head>');
    pWin.document.writeln('  <body' + bodyStyle + ' onclick="window.close();" onload="window.resizeTo(document.getElementById(\'Image\').width+56,document.getElementById(\'Image\').height+138);">');
    pWin.document.writeln('    <div' +divStyle + '><h1' + h1Style + '>'+sTitle+'</h1><img id="Image" src="' + imgUrl + '" alt="" ' + imgStyle + ' /><\/div>');
    pWin.document.writeln('  <\/body>');
    pWin.document.write('<\/html>');
    pWin.document.close();
  }
  return pWin;
}

