<!--
function imageWin(fileName,imageWidth, imageHeight) {
  var winName = fileName;
  var text1 = '/';
  var by = '_';
  var newstr = replace(winName, text1, by);
  var text2 = '.';
  var newerStr = replace(newstr, text2, by);
  winWidth = imageWidth + 20;
  winHeight = imageHeight + 20;
  myPopup = window.open('', newerStr ,'scrollbars=no,status=no,width=' + winWidth + ',height=' + winHeight +'')

  myPopup.document.open();
  myPopup.document.writeln('<html>');
  myPopup.document.writeln('<head>');
  myPopup.document.writeln('<title>"'+fileName+'"</title>');
  
  myPopup.document.writeln('</head>');
  myPopup.document.writeln('<body>');
  
  myPopup.document.writeln('<img src="'+fileName+'" width="'+imageWidth+'" height="'+imageHeight+'">');
  myPopup.document.writeln('</body>');
  myPopup.document.writeln('</html>');
  myPopup.document.close();
}

function replace(winName,text,by) {
// Replaces text with by in string
    var strLength = winName.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return winName;

    var i = winName.indexOf(text);
    if ((!i) && (text != winName.substring(0,txtLength))) return string;
    if (i == -1) return winName;

    var newstr = winName.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(winName.substring(i+txtLength,strLength),text,by);

    return newstr;
}
//-->

