var lidx = 400;
var lidy = 330;
var divwidth = 4;
var divwidth = 0;
var divheight = 0;
var t;

function imgpopup(imgsrc) {
	document.getElementById('largeimg').src = imgsrc.replace("T", "");
	document.getElementById('largeimgdiv').style.display = 'block';
	plusdivheight();
}

function plusdivheight() {
	if (divheight <= lidy) {
		document.getElementById('largeimgdiv').style.height = divheight + 'px';
		divheight = divheight + 5;
		t=setTimeout("plusdivheight()", 10);
	}
	else {
		plusdivwidth();
	}
}

function plusdivwidth() {
	if (divwidth <= lidx) {
		document.getElementById('largeimgdiv').style.width = divwidth + 'px';
		divwidth = divwidth + 5;
		t=setTimeout("plusdivwidth()", 10);
	}
}

function imgpopuphide() {
		clearTimeout(t)
		document.getElementById('largeimgdiv').style.display = 'none';
		document.getElementById('largeimgdiv').style.width = '4px';
		document.getElementById('largeimgdiv').style.height = '0px';
		divwidth = 4;
		divheight = 0;
}