// JavaScript Document

//start of right click disable
//end of right click
var popbackground="#e5e5e5" //specify backcolor or background image for pop window
var windowtitle="Product Window"  //pop window title
function detectexist(obj){
return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/5-popwidth/1 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/5-popheight/1 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 5
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 jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
getpos() 
jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitle+'</title><body bgcolor="#438bc6"'+bodyattribute+'><table align=center cellpadding="0" cellspacing="0" border="0" style="margin-top:10px;" ><tbody><tr><td align="center" valign="middle"><img src="'+imgpath+'" style="margin-bottom: 0"><br></td></tr><tr><td height="40" valign="top" style="padding-left:10px; text-align:left; padding-top:10px;  vertical-align:top; font-weight:"bold"; bgcolor="#e5e5e5">'+textdescription+'</td></tr><tr><td align="center"><a href="javascript:window.close();">Close Window</a></td></tr></tbody></table></body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}


