var imgFile = "";

function closeUp(filename) {
	if (filename == null || filename == "") return;
	imgFile = filename;
	imgWindow=window.open("closeUp.html","shoeViewer","directories=no,location=no,height=400,width=600,resizable=yes");
	imgWindow.focus();
}

function startup() {
	textArray = new Array(5);
	textArray[0] = "More than 70% of all people in the U.S. will have painful foot problems at some point during their lifetime";
	textArray[1] = "Foot wear affects foot health, and foot health affects an individuals mobility which affects your overall health";
	textArray[2] = "A person weighing 170 lbs. imposes a total of 1,000 tons on their feet and shoes over the course of a day.";
	textArray[3] = "The bones and joints of the foot and ankle can be subject to approximately three times the body weight during walking alone.";
	textArray[4] = "The average person engaging in non-strenuous activity walks approximately 4 miles every day or about 115,000 miles in a lifetime.";
	rotateFacts("rotateBox",textArray,10);
}


rotationNum = 0;
timerHandle = 0;
rotateContainer = null;
rotateIndex = 0;
rotateArray = null;
var rotations = 0;

function rotateFacts(container,textArray,num) {
	//alert(document.getElementById(container));
	if (document.getElementById(container) == null || textArray == null) return;
	if (isNaN(num)) rotations = 10;
	else rotations = num;
	rotateContainer = document.getElementById(container);
	rotateArray = textArray;
	timerHandle = window.setInterval("doRotate()",6000);
	doRotate();
}

function doRotate() {
	rotationNum ++;
	if (rotationNum >= rotations) {
		clearInterval(timerHandle);
	}
	rotateIndex = parseInt(Math.random() * rotateArray.length) % rotateArray.length;
	rotateContainer.innerText = rotateArray[rotateIndex];
}


