document.write('<style>.zoom * {display:none !important;}</style>')

var maxX,maxY,stepX,stepY;

function zoom(e,dir) {
//alert(lst(e))
 var z=e.z;
 if (dir<0)dir=-1;
 else dir=1;
 
 e.style.display='block';
 
 if (!z) {
    z={};
    e.z=z;
    z.w=e.clientWidth;
    z.h=e.clientHeight;
    z.cl=e.className;
    //z.ow=e.offsetWidth;
    //z.oh=e.offsetHeight;
    z.t=e.offsetTop;
    z.l=e.offsetLeft;
    with(e.style) {
	z.sw=width;
	z.sh=height;
	z.sml=marginLeft;
	z.smt=marginTop;
	z.sm=margin;
	}
    }
 e.className+=' zoom';
 z.dir=dir;
 if (dir>0) {
    e.style.width='0px';
    e.style.height='0px';
    e.style.marginLeft=(z.l+z.w/2)+'px';
    e.style.marginTop=(z.t+z.h/2)+'px';
    }
 else {
    e.style.width=z.w+'px';
    e.style.height=z.h+'px';
    }

 z.X=parseInt(z.w/8)*dir;
 z.Y=parseInt(z.h/8)*dir;

 setTimeout(function(){zsmall(e)},20);
}


function zsmall(e) {
 var z=e.z,W,H;
 
 W=e.offsetWidth+z.X;
 H=e.offsetHeight+z.Y;
 
 var ml=(z.w-W)/2,mt=(z.h-H)/2;

 
 if (z.dir<0 && (W<=0 || H<=0)) {
    e.className=z.cl;
    with (e.style) {
	display='none';
	width=z.sw;
	height=z.sh;
	marginLeft=z.sml;
	marginTop=z.smt;
	if (z.sm) margin=z.sm;
	}
    }
 else if (z.dir>0 && (W>=z.w || H>=z.h)) {
    e.className=z.cl;
    with (e.style) {
	width=z.sw;
	height=z.sh;
	marginLeft=z.sml;
	marginTop=z.smt;
	if (z.sm) margin=z.sm;
	}
    }
 else {
    setTimeout(function(){zsmall(e)},20);
    e.style.width=W+'px';
    e.style.height=H+'px';
    e.style.marginLeft=(z.l+ml)+'px';
    e.style.marginTop=(z.t+mt)+'px';
    }
}

