
var tmpw = 0;
var tmph = 0;
var num = 0;
var img = null;
var timer = null;

function expand(it) {
	tmpw = it.width; // save original size
	tmph = it.height; // save original size
	num = 0;
	img = it;
	timer = setTimeout("exp()",100); // 100ms steps
}

function exp() {
	img.width = img.width * 1.2; // 10% each time
	img.height = img.height * 1.1; // 10% each time
	num++
	if (num < 5) // 5 steps then stop
	{timer = setTimeout("exp()",100);}
}

function shrink(it) {
	
	clearTimeout(timer); // stop if active
	it.width = tmpw; // go back to original size
	it.height = tmph;
}
