


function maximizeBoxColor(elmImg) {
	//elmImg.src.match(/(box\d+)\.gif/);
	//elmImg.ClassName = RegExp.$1;
	//elmImg.ClassName = elmImg.class;

	if ( elmImg.src.match(/box\d+\.gif/) ) {
		changeBoxColor(elmImg, '200');
	}
	else if ( elmImg.src.match(/btn(\d+)\.gif/) ) {
		elmImg.src = "img/btn" + RegExp.$1 + "hov" + ".gif";
	}
}

function fadeoutBoxColor(elmImg) {

	if ( elmImg.src.match(/box\d+\.gif/) ) {
	}
	else if ( elmImg.src.match(/btn(\d+)hov\.gif/) ) {
		elmImg.src = "img/btn" + RegExp.$1 + "" + ".gif";
		return;
	}
	else {
		return;
	}

	var strLastColor = "";
	elmImg.className.match(/box(\d+)/);
	strLastColor = RegExp.$1;

	//alert(strLastColor);

	var intLastColor = parseInt(strLastColor);
	var intInterval = 125;
	var intElapseTime = 125;

	if ( intLastColor <= 175 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '175') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 150 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '150') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 125 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '125') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 100 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '100') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 75 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '075') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 50 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '050') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 25 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '025') }, intElapseTime);
		intElapseTime += intInterval;
	}
	if ( intLastColor <= 0 ) {
		setTimeout(function(){ changeBoxColor(elmImg, '000') }, intElapseTime);
		intElapseTime += intInterval;
	}

}


function changeBoxColor(elmImg, strColor) {
	elmImg.src = "img/box" + strColor + ".gif";
}

