var image_room = new Array();
stop_content = 0;
image_now = 1;
new_plus = 2;
speed = 20;
function changeContent(imageId)
	{
	total = Math.floor(document.getElementById("room_big").childNodes.length/2);
	last_div = document.getElementById("room_big_" + image_now);
	this_div = document.getElementById("room_big_" + imageId);
	last_id = imageId;
	this_div.style.opacity= 0;
	this_div.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
	this_div.style.filter= "alpha(opacity=0)";
	layHide(10);
	image_now = imageId;
	if(imageId !=1)
		new_minus = imageId-1;
	else
		new_minus = total;
	if(imageId != total)
		new_plus = imageId+1;
	else
		new_plus = 1;
	prev_div = document.getElementById("room_big_" + new_minus);
	if(prev_div.getAttribute("alt")!="")
		{
		prev_div.setAttribute("src",prev_div.getAttribute("alt"));
		prev_div.setAttribute("alt","");
		}
	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","");
		}
	}
function layHide(step)
	{
	last_div.style.opacity= step / 10;
	alpha = step * 10;
	last_div.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
	last_div.style.filter= "alpha(opacity="+alpha+")";
	step --;
	if(step>=0)
		setTimeout("layHide("+step+")",speed);
	else
		{
		for(i=1;i<=total;i++)
			if(i!=last_id)
				document.getElementById("room_big_" + i).style.display= 'none';
		last_div.style.display= 'none';
		this_div.style.display= 'block';
		layShow(0);
		}
	}
function layShow(step)
	{
	this_div.style.opacity= step / 10;
	this_div.style.filter= "progid:DXImageTransform.Microsoft.Alpha(opacity="+ step * 10 +")";
	this_div.style.filter= "alpha(opacity="+ step * 10 +")";
	step ++;
	if(step<=10)
		setTimeout("layShow("+step+")",speed);
	}
function startContent()
	{
	changeContent(new_plus);
	setTimeout("domReady(function(){startContent();})",4000);
	}

