	var main_timer;	

	function NextFurniture()
	{
		var num = 1;
		num = parseInt(Math.random()*5)+1;
		document.getElementById('f1').innerHTML = "<img src=\"/images/frame" + num + ".png\">";
		num = parseInt(Math.random()*19)+1;
		document.getElementById('f2').innerHTML = "<img src=\"/images/mattress" + num + ".png\">";
		num = parseInt(Math.random()*10)+1;
		document.getElementById('f3').innerHTML = "<img src=\"/products/thumbs/cimage" + num + ".jpg\">";	

		num = parseInt(Math.random()*3)+1;

		TweenVertical("sec1",336,-30,3,"sin");
		TweenVertical("sec2",336,-30,3,"sin");
		TweenVertical("sec3",336,-30,3,"sin");
		main_timer = window.setTimeout("BackDown()",4000);
	}

	function BackDown()
	{
		TweenVertical("sec1",0,-366,6,"sin");
		TweenVertical("sec2",0,-366,6,"sin");
		TweenVertical("sec3",0,-366,6,"sin");
		main_timer = window.setTimeout("NextFurniture()",500);
	}




	var rtd = 3.14/180;				// Radians to Degrees.
	var timer_reference;


	// ANYTHING YOU NEED DONE AFTER THE TWEEN IS FINISHED GOES HERE: //
	//--------------------------------------------------------------------------------------------------------------------------------------------
	function CleanUp(sectionID)
	{
		document.images['si1'].src = document.images['si2'].src;
		document.getElementById('ss2').style.left = -648;
		document.images['si2'].src = ("/images/tx.gif");
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------




	// TWEEN VERTICALLY ONLY: //
	//--------------------------------------------------------------------------------------------------------------------------------------------
	function TweenVertical(sectionID, startY, endY, step, style)
	{
		var lengthY = endY - startY;
		var timerref;
		var newnumY = 0;
		TweenAction(sectionID, 0, startY, 0, 0, 0, lengthY, 0, 0, timerref, 0, step, 0, 0, 0, style, 0, 0, 0, newnumY, 0, 0);
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------


	// TWEEN HORIZONTALLY ONLY: //
	//--------------------------------------------------------------------------------------------------------------------------------------------
	function TweenHorizontal(sectionID, startX, endX, step, style)
	{
		var lengthX = endX - startX;
		var timerref;
		var newnumX = 0;
		TweenAction(sectionID, startX, 0, 0, 0, lengthX, 0, 0, 0, timerref, step, 0, 0, 0, style, 0, 0, 0, newnumX, 0, 0, 0);
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------


	// TWEEN WIDTH ONLY: //
	//--------------------------------------------------------------------------------------------------------------------------------------------\
	function TweenWidth(sectionID, startWidth, endWidth, step, style)
	{
		var lengthWidth = endWidth - startWidth;
		var timerref;
		var newnumWidth = 0;
		TweenAction(sectionID, 0, 0, startWidth, 0, 0, 0, lengthWidth, 0, timerref, 0, 0, step, 0, 0, 0, style, 0, 0, 0, newnumWidth, 0);
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------


	// TWEEN HEIGHT ONLY: //
	//--------------------------------------------------------------------------------------------------------------------------------------------
	function TweenHeight(sectionID, startHeight, endHeight, step, style)
	{
		var lengthHeight = endHeight - startHeight;
		var timerref;
		var newnumHeight = 0;
		TweenAction(sectionID, 0, 0, 0, startHeight, 0, 0, 0, lengthHeight, timerref, 0, 0, 0, step, 0, 0, 0, style, 0, 0, 0, newnumHeight);
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------


	// TWEEN MULTIPLE DIRECTIONS: //
	//--------------------------------------------------------------------------------------------------------------------------------------------
	function Tween(sectionID, startX, endX, startY, endY, startWidth, endWidth, startHeight, endHeight, stepX, stepY, stepWidth, stepHeight, styleX, styleY, styleWidth, styleHeight)
	{
		// Determine if movement to the right:
		var lengthX = endX - startX;
		var lengthY = endY - startY;
		var lengthWidth = endWidth - startWidth;
		var lengthHeight = endHeight - startHeight;
		var timerref;
		var newnumX = 0;
		var newnumY = 0;
		var newnumWidth = 0;
		var newnumHeight = 0;

		TweenAction(sectionID, startX, startY, startWidth, startHeight, lengthX, lengthY, lengthWidth, lengthHeight, timerref, stepX, stepY, stepWidth, stepHeight, styleX, styleY, styleWidth, styleHeight, newnumX, newnumY, newnumWidth, newnumHeight);
	}
	//--------------------------------------------------------------------------------------------------------------------------------------------


	//////////////////////////////////////////////////////////////////////////////
	// DO NOT CALL THIS FUNCTION!  THIS IS CALLED BY THE APPROPRIATE INITIATOR: //
	//////////////////////////////////////////////////////////////////////////////
	function TweenAction(sectionID, startX, startY, startWidth, startHeight, lengthX, lengthY, lengthWidth, lengthHeight, timer_reference, stepX, stepY, stepWidth,stepHeight, styleX, styleY, styleWidth, styleHeight, newnumX, newnumY, newnumWidth, newnumHeight)
	{
		var mathnum = 0;
		var stop1 = 0;
		var stop2 = 0;
		var stop3 = 0;
		var stop4 = 0;

		if(lengthX!=0)
		{
			if(stop1==0)
			{
				if(styleX == "sin"){mathnum = Math.sin(newnumX*rtd);}
				if(styleX == "cos"){mathnum = Math.cos(newnumX*rtd);}
				if(styleX == "none"){mathnum = newnumX/90;}
				var newX = startX + mathnum * lengthX;
				if(newnumX >= 90){stop1=1;}
				newnumX += stepX;
				document.getElementById(sectionID).style.left = (newX + "px");
			}
		}else{stop1=1;}
		if(lengthY!=0)
		{
			if(stop2==0)
			{
				if(styleY == "sin"){mathnum = Math.sin(newnumY*rtd);}
				if(styleY == "cos"){mathnum = Math.cos(newnumY*rtd);}
				if(styleY == "none"){mathnum = newnumY/90;}
				var newY = startY + mathnum * lengthY;
				if(newnumY >= 90){stop2=1;}
				newnumY += stepY;
				document.getElementById(sectionID).style.top = (newY + "px");
			}
		}else{stop2=1;}
		if(lengthWidth!=0)
		{
			if(stop3==0)
			{
				if(styleWidth == "sin"){mathnum = Math.sin(newnumWidth*rtd);}
				if(styleWidth == "cos"){mathnum = Math.cos(newnumWidth*rtd);}
				if(styleWidth == "none"){mathnum = newnumWidth/90;}
				var newWidth = startWidth + mathnum * lengthWidth;
				if(newnumWidth >= 90){stop3=1;}
				newnumWidth += stepWidth;
				document.getElementById(sectionID).style.width = (newWidth + "px");
			}
		}else{stop3=1;}
		if(lengthHeight!=0)
		{
			if(stop4==0)
			{
				if(styleHeight == "sin"){mathnum = Math.sin(newnumHeight*rtd);}
				if(styleHeight == "cos"){mathnum = Math.cos(newnumHeight*rtd);}
				if(styleHeight == "none"){mathnum = newnumHeight/90;}
				var newHeight = startHeight + mathnum * lengthHeight;
				if(newnumHeight >= 90){stop4=1;}
				newnumHeight += stepHeight;
				document.getElementById(sectionID).style.height = (newHeight + "px");
			}
		}else{stop4=1;}

		if(stop1==1 && stop2==1 && stop3==1 && stop4==1)
		{
			CleanUp(sectionID);
			window.clearTimeout(timer_reference);
			return;
		}
		else
		{
			timer_reference = window.setTimeout("TweenAction(\'" + sectionID + "\', " + startX + ", " + startY + ", " + startWidth + ", " + startHeight + ", " + lengthX + ", " + lengthY + ", " + lengthWidth + ", " + lengthHeight + ", " + timer_reference + ", " + stepX + ", " + stepY + ", " + stepWidth + ", " + stepHeight + ", \'" + styleX + "\', \'" + styleY + "\', \'" + styleWidth + "\', \'" + styleHeight + "\', " + newnumX + ", " + newnumY + ", " + newnumWidth + ", " + newnumHeight + ")", 20);
		}
	}
	/////////////////////
	// END TWEEN CLASS //
	/////////////////////


	// Image Rollover Variables: //
	var preLoaded = false;

	function LoadImage(location)
	{
		result = new Image();
		result.src = location;
		return result;
	}

	function ChangeImage(imgDocID,imgObjName)
	{
		if(preLoaded == true)
		{
			document.images[imgDocID].src = eval (imgObjName + ".src")
		}
	}

	function PreLoad()
	{
		logo = LoadImage("/images/logo.png");
		logoo = LoadImage("/images/logoo.png");
		logotext = LoadImage("/images/logotext.png");
		logotexto = LoadImage("/images/logotexto.png");
		preLoaded = true;
	}

	PreLoad();
