// JavaScript Document
function showTheImg(s,w){

// set image width if not given
if (w == undefined){ w = 600 }

document.theImg.src = s

// get new x position
x = (document.body.clientWidth / 2) - (w / 2) + 100
if (x < 0){ document.getElementById('theImgDiv').style.left = '1px' }
else{ document.getElementById('theImgDiv').style.left = x + 'px' }

// get new y position
h = document.theImg.height // get image height
y = Math.floor(document.body.scrollTop + (document.body.clientHeight / 2) - (h / 2))
if (y < 0){ document.getElementById('theImgDiv').style.top = '1px' }
else{ document.getElementById('theImgDiv').style.top = y + 'px' }

document.theImg.width = w
document.getElementById('theImgDiv').style.top = y + 'px'
document.getElementById('theImgDiv').style.visibility = 'visible'
document.getElementById('theImgDiv').zindex = '20'
}

function hideTheImg(){

document.getElementById('theImgDiv').style.visibility = 'hidden'
document.getElementById('theImgDiv').zindex = '-1'
}

document.write('<div id="theImgDiv" style="position:absolute; visibility:hidden; background-color:#FFF; border:1px solid #666; z-index:100;"><img name="theImg" src="img/blank.gif" onclick="hideTheImg()" width="1" border="0" style="cursor:hand; margin:4px;"></div>')
