var rotateStyle = new Array (
"/images/rotating/r-small.jpg","small-house-plans.asp","Small",
"/images/rotating/r-ranch.jpg","ranch-house-plans.asp","Ranch",
"/images/rotating/r-craftsman.jpg","craftsman-house-plans.asp","Craftsman",
"/images/rotating/r-twostory.jpg","two-story-house-plans.asp","Two Story",
"/images/rotating/r-luxury.jpg","luxury-house-plans.asp","Luxury",
"/images/rotating/r-farm.jpg","farm-house-plans.asp","Farm House",
"/images/rotating/r-narrow.jpg","narrow-lot-house-plans.asp","Narrow",
"/images/rotating/r-green.jpg","energy-star.asp","Green/Energy Star"
);
var numCells = 4;  // Change the number of images to rotate here.
var curCell = 1;
var numItems = rotateStyle.length/3;
var curStyle = 4;  // Change selected first rotate style here
setTimeout("rotate(rotate1," + curStyle + ")",4000);


function rotate(rotateCell,style)
{
	var styleNum = (parseInt(style) * 3) + 1;
	rotateCell.innerHTML = fillRotate(styleNum);
	curCell ++;
	curStyle ++;
	if(curCell > numCells)curCell=1;
	if(curStyle >= numItems)curStyle=0;		
	setTimeout("rotate(rotate" + curCell + "," + curStyle + ")",2000);
}
function fillRotate(passItem)
{
	var rotateItem = parseInt(passItem);
	return "<a href=\"" + rotateStyle[rotateItem] + "\"><img src=\"" + rotateStyle[rotateItem-1] + "\" width=\"142\" height=\"92\" alt=\"" + rotateStyle[rotateItem+1] + " " + rotateStyle[rotateItem+2] + "\" border=\"0\"></a><br>"
		+ "<a href=\"" + rotateStyle[rotateItem] + "\"><font class=\"RotateFont1\">" + rotateStyle[rotateItem+1] + "</a>";
}
