// script ver. 1.1
function showpic(path){ 
x=document.getElementById("show");
x.innerHTML='<div style="position:absolute; visibility:hidden;"><div style="position:relative;"><a href="javascript: hide(this);"><img src="http://mirodom.su/img/close.gif" style="position:absolute; top:0px; right:0px;"/><img src="'+path+'" onload="showpic1();"/></a></div></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';
//y=document.getElementById("show_close");
//y.style.top=top+'px';
x.style.left=left+'px';
//leftclose=left+imgWidth-86;
//y.style.left= leftclose+'px';
x.style.zIndex=119;
//y.style.zIndex=999;
}

document.getElementById("show").firstChild.style.visibility="visible";
}

function hide(){
x=document.getElementById("show");
x.innerHTML="";
x.style.display="none";
}