/*
	(c) 2007-2008 | http://olegrorovin.spb.ru/
	Author - Oleg Korovin (mail@olegrorovin.spb.ru)
*/

/******************************************************************************/
function BannerImageResize(elThis, iIncr){
		if( elThis.tTimer ) clearTimeout(elThis.tTimer);
		elThis.firstChild.style.visibility='visible';

		var
			elImg = elThis.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild,
			iWidth = parseInt(elImg.style.width) || 0;

		elThis.tTimer = setTimeout(
			function (){
				iWidth += iIncr;

				if(iWidth >= 200 || iWidth <= 105){
					clearTimeout(elThis.tTimer);
					if(iWidth >= 200) iWidth = 200;
					if(iWidth <= 100){
						iWidth = 105;
						elThis.firstChild.style.visibility='hidden';
					}
				}
				else {
					elThis.tTimer = setTimeout( arguments.callee , 20 );
				}

				elImg.style.width = iWidth + 'px';
				elImg.style.height = iWidth + 'px';
			},
			20
		);
	};
