// script ver. 1.1
function showpic(path){ 
x=document.getElementById("show");
x.innerHTML='<div style="position:absolute; visibility:hidden; z-index:999;"><a href="javascript: hide(this);"><img src="'+path+'" onload="showpic1();"/></a></div>';
x.style.position="absolute";
x.style.display="block";
}

function showpic1(){
if((x.firstChild.offsetWidth!=0)&&(x.firstChild.offsetHeight!=0)&&(x.firstChild.offsetWidth>100)&&(x.firstChild.offsetHeight>100)){
var width,height,ignoreMe,imgWidth,imgHeight,top,left;
if(window.innerWidth){
    width = window.innerWidth;
    height = window.innerHeight;
  }   else if(document.documentElement && document.documentElement.clientWidth){
    width = document.documentElement.clientWidth;
    height = document.documentElement.clientHeight;
  }   else if(document.body && document.body.clientWidth){
    width = document.body.clientWidth;
    height = document.body.clientHeight;
  }
imgWidth=x.firstChild.offsetWidth; 
imgHeight=x.firstChild.offsetHeight; 
ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; 
top=(ignoreMe+((height-imgHeight)/2));
left=(width-imgWidth)/2;
x.style.top=top+'px';
x.style.left=left+'px';
x.style.zIndex=999;}

document.getElementById("show").firstChild.style.visibility="visible";
}

function hide(){
x=document.getElementById("show");
x.innerHTML="";
x.style.display="none";
}