//**************************************************************** 
// You are free to copy the "Image window 1.0"
// script as long as you keep this copyright notice: 
// Script found in: http://www.ed.kaliningrad.ru
// Author: Edward Koshel (ed@bytecity.ru)
//**************************************************************** 
var newW=null
var img=null
function OpenImgWindow(imageName,alt,posLeft,posTop,aw,ah) 
{
  img=new Image()
  img.src=imageName
  if (aw != null)
    w=aw
  else
    w=img.width
  if (ah != null)
    h=ah
  else
    h=img.height
  if (posLeft == null)
    posLeft=0
  if (posTop == null)
    posTop=0
  if(newW != null) 
    if(!newW.closed) 
      newW.close()
  newW= window.open("","newW","width="+w+",height="+h+",left="+posLeft+",top="+posTop)
  newW.document.open()
  newW.document.writeln('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">') 
  newW.document.writeln('<img src='+imageName+' alt='+alt+'>') //' width='+w+' height='+h+
  newW.document.write('</body></html>')
  newW.document.close()
  img=null
  newW.focus()
}
