image_now = 1;
new_plus = 2;
speed = 1;
var IE='\v'=='v';
if(IE) 
	steps = 30;
else
	steps = 100;
timeout = 8000;
function changeContent(imageId)
	{
	total = Math.floor(document.getElementById("room_big").childNodes.length/2);
	last_div = document.getElementById("room_big_" + image_now);
	if(imageId != total)
		new_plus = imageId+1;
	else
		new_plus = 1;
	image_now = new_plus;
	next_div = document.getElementById("room_big_" + new_plus);
	if(next_div.getAttribute("alt")!="")
		{
		next_div.setAttribute("src",next_div.getAttribute("alt"));
		next_div.setAttribute("alt","");
		}
	document.getElementById("room_big").style.background = "url("+next_div.getAttribute("src")+") no-repeat top left";
	layHide(100);
	}
function layHide(step)
	{
	step = step - Math.ceil(100/step);
	last_div.style.opacity= step / 100;
	last_div.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity="+step+")";
	last_div.style.filter= "alpha(opacity="+step+")";
	if(step>=0)
		{
		setTimeout("layHide("+step+")",1);
		}
	else
		{
		for(i=1;i<=total;i++)
			if(i!=next_div)
				document.getElementById("room_big_" + i).style.display= 'none';
		next_div.style.display= 'block';
		next_div.style.opacity= 1;
		next_div.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
		next_div.style.filter= "alpha(opacity=100)";
		setTimeout("domReady(function(){changeContent(new_plus);})",timeout);
		}

	}