

var windowtitle="Image Window"  

function detectexist(obj){
return (typeof obj !="undefined")
}

function popimage(popwidth, popheight,popbackground){
var  winattributes='width='+popwidth+',height='+popheight+',resizable=yes'
var bodyattribute='style="background:'+popbackground+';"' 
if (typeof popwin=="undefined" || popwin.closed)
popwin=window.open("","",winattributes)
else{
popwin.resizeTo(popwidth, popheight+30)
}
popwin.document.open()
popwin.document.write('<html><title>'+windowtitle+'</title><body '+bodyattribute+'></body></html>')
popwin.document.close()
popwin.focus()
}
