function shrink() {
	var obj = document.getElementById('topimg');
	intHeight = parseInt(obj.style.height);

	loopCount++;
	
	if (loopCount > 20 ) {
		clearInterval(myTimer);
	}
	
	/*
	if ( isNaN(intHeight) ) {
		intHeight = 160;
	}
	alert(intHeight);
	*/
	if ( intHeight > 0 ) {
		
		intHeight-=16;
		if ( obj.style.height ) {
			obj.style.height = intHeight + "px";	
		}
		/*
		if ( document.getElementById('topimg') ) {
			document.getElementById('topimg').style.height = intHeight + "px";
		}
		*/
	} else {
		clearInterval(myTimer);
	}
	
}
loopCount = 1;
function shrinker() {
	myTimer = setInterval("shrink()", 16);
}
function loadTop() {
	addEvent(document.getElementById('top'), 'click', shrinker);
	addEvent(document.getElementById('topimg'), 'click', shrinker);
}
//addEvent(window, 'load', loadTop);
