function detectexist(obj){
return (typeof obj !="undefined")
}
function popimage(popbackground,imgpath, popwidth, popheight, title, textdescription){
function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=100
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}
getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=no,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof popwin=="undefined" || popwin.closed)
popwin=window.open("","",winattributes)
else{
getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
popwin.moveTo(leftpos, toppos)
popwin.resizeTo(popwidth, popheight+30)
}
popwin.document.open()
popwin.document.write('<html><title>'+title+'<\/title><meta http-equiv="imagetoolbar" content="no"/><body onblur="self.close()" '+bodyattribute+'><p align="center"><font face="Arial"><b><span style="font-size:12pt;">'+title+'</b><a href="javascript:self.close()"><br><br><img src="'+imgpath+' " alt="close" " border="0"><\/a><span style="font-size:9pt;"><br><br>'+textdescription+'<\/span><\/font><\/p><\/body><\/html>')

popwin.document.close()
popwin.focus()
}
