var showphoto;
var pFileName;
var pTitle;
var winwidth;
var winheight;
var photoWin;
if(window.open){
function showphoto(pFileName, pTitle, winwidth, winheight) {

// window parameters
photoWin=
window.open( "", "photo", "toobar=no,scrollbars=yes,resizable=yes,menubar=no,width=50+"+winwidth+",height=150+"+winheight);
photoWin.resizeTo(winwidth+50, winheight+150)

// write to window
photoWin.focus()
photoWin.document.write("<html><title>" + pTitle + "</title>")
photoWin.document.write("<img src=" + pFileName + ">")
photoWin.document.write("<br><br><form><input type='button' value='close window'onClick='window.close()'></form>")
photoWin.document.write("</body></html>")
photoWin.document.close()
}
}