function preload(imgName) {i=new Image(); i.src="img/"+imgName;}
function imgOn(imgName) {eval('document.'+imgName+'.src ="img/"+"'+imgName+'"+"_on.gif"');}
function imgOff(imgName) {eval('document.'+imgName+'.src ="img/"+"'+imgName+'"+".gif"');}


function oWin(pFileName, i_width, i_height, pTitle, pClose) {
  var owidth=(i_width>590)?590:i_width , oheight=(i_height>450)?450:i_height;
//  photoWin = window.open( "", "photo", "width=600,height=450,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
  if ((owidth!=i_width) || (oheight!=i_height))
    photoWin = window.open( "", "", "width="+(owidth+32)+",height="+(oheight+10)+",menubar, resizable,screenX=20,screenY=40,left=20,top=40");
  else
    photoWin = window.open( "", "", "width="+(owidth+50)+",height="+(oheight+86)+",screenX=20,screenY=40,left=20,top=40");
  photoWin.document.write('<html><head><title>' + pTitle + '</title>');
  photoWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
  photoWin.document.write('<style type="text/css">a.window:hover {color: #FFCE00;}</style>');
  photoWin.document.write('</head>');
  photoWin.document.write('<body bgcolor="#D1E0D1" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFCE00" style="font-family: Verdana, Arial, Helvetica, sans-serif;">');
  // photoWin.document.write('<div align="center"><b>' + pTitle + '</b><br />');
  photoWin.document.write('<a class="window" href="javascript:self.close()">');
  photoWin.document.write('<img style="border-color: #333 #333 #333 #333;" src="' + pFileName + '" width="' + i_width + '" height="' + i_height + '" border="1" alt="' + pClose + '" /><br />');
  // photoWin.document.write('<small>' + pClose + '</small></a><br /></div>');
  photoWin.document.write('</body></html>');
  photoWin.document.close();
  photoWin.focus();
}



