Previous
adHeight/adWidth) {garPic.style.height = adHeight + 'px';
garPic.style.width = adHeight/ratio + 'px';}
if( garPic.height/garPic.width < adHeight/adWidth) {garPic.style.width = adWidth + 'px'; }
showbox.style.width = garPic.style.width;
prefoto.style.top = (garPic.height - prefoto.height)/2 + 'px';
nextfoto.style.top = (garPic.height - prefoto.height)/2 + 'px';
showbox.style.marginLeft = ($(window).width() - garPic.width)/2 + 'px';
closebtn.style.right = '0px';
lightframe.style.left = '0px';
}
function finalize(){
garPic.style.height = '';
garPic.style.width = '';
prefoto.style.top = '';
nextfoto.style.top = '';
garPic.style.marginLeft = '';
}
function showGarPic(from,illustration,alb){
finalize();
currentAlb = alb;
garPic.src = from;
description.innerHTML = illustration;
adHeight = $(window).height()*0.8;
adWidth = $(window).width()*0.8;
lightframe.style.top = window.scrollY + 'px'
adjustSize();
document.body.style.overflow = 'hidden';
document.body.insertBefore(lightframe,document.body.childNodes[0]);
loading();
}
function go2left(){
var f = currentAlb;
for(j=0;j