function showPic(picture,title){
  var pic_rel_path = "\.\." + "/img/CLOSE.gif";
  var pic_abs_path = "/img/CLOSE.gif";
  var close_pic;
  /*
  for (var i=0; i < document.all.tags("script").length; i++)
  {
    var obj = document.all.tags("script")[i];
    var ScriptFile = obj.src.substr(obj.src.lastIndexOf("\/") + 1);
    if (ScriptFile == "show_pic.js")
    {
      close_pic = obj.src.substr(0, obj.src.lastIndexOf("\/")) + "\/" + pic_rel_path;
      break;
    }
    else
    {
      close_pic = pic_abs_path;
    };
  }
  */
//  alert(close_pic);
  if (picture=='') return false;
  newWindow = window.open("","newWindow","width="+100+",height="+100+",left="+100+",top="+100);
  newWindow.document.open();
  newWindow.document.write('<html><head><title>'+title+'</title>');
  newWindow.document.write('<script>function resize(){ ');
  newWindow.document.write('   var pic = document.getElementById("pic");');
  newWindow.document.write('   if (typeof(pic)!="undefined"){ ');
  newWindow.document.write('       self.resizeTo(pic.width,pic.height+30);');
  newWindow.document.write('   }');
  newWindow.document.write('}');
  newWindow.document.write('\</script\>');
  newWindow.document.write('</head><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onload="resize()">');
  newWindow.document.write('<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:2; left: 0px; top: 0px; overflow: visible;">'); 
  newWindow.document.write('<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td height="100%" valign="bottom" align="right"><a href="javascript:self.close();"><img border=0 src="'+close_pic+'"></a></td></tr></table>');
  newWindow.document.write('</div><div id="Layer2" style="position:absolute; width:100%; height:100%; z-index:1; left: 0px; top:0px;">'); 
  newWindow.document.write('<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle"><img id="pic" src="'+picture+'"></td></tr></table>');
  newWindow.document.write('</div></body></html>');
  newWindow.document.close();
  newWindow.focus();
}


