// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use

var popbackground="#e2e4eb" //specify backcolor or background image for pop window
var windowtitle="Amherst College Athletics"  //pop window title
var jkpopimage 

function detectexist(obj){
return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

leftpos=200
toppos=200
var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
jkpopwin=window.open("","",winattributes)
jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitle+'</title><body '+bodyattribute+' style="text-align: center"><img src="'+imgpath+'" style="margin-bottom: 0.5em"><p style="font-size:.8em; font-family:verdana; line-height:1.2">'+textdescription+'</p></body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}
