var opendiv=0;

function showimg(path){
document.getElementById('imgimg').src=null;
document.getElementById('imgimg').src=path;
showdiv();
}

function showdiv(divid){
if (divid == null) divid="imgdiv";
var scroll = document.documentElement.scrollTop || document.body.scrollTop
document.getElementById(divid).style.display="block";
document.getElementById(divid).style.visibility="visible";
divw=document.getElementById(divid).offsetWidth;
document.getElementById(divid).style.top=scroll+100+"px";
document.getElementById(divid).style.left=512-Math.round(divw/2)+"px";
}

function hideimg(divid){
if (divid == null) divid="imgdiv";
document.getElementById(divid).style.display="none";
document.getElementById(divid).style.visibility="hidden";
}

function showfdiv(id){
hideimg("imgdiv");
document.getElementById('divid'+id).style.display="block";
document.getElementById('divid'+id).style.visibility="visible";
if (opendiv!=0 && opendiv!=id){
document.getElementById('divid'+opendiv).style.display="none";
document.getElementById('divid'+opendiv).style.visibility="hidden";}
opendiv=id;
}

