function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function setVisibleAnimate(index){
	//assumes the visible class is 'propertyVisible' and the invisible class is 'propertyInvisible'
	//assumes the divs to turn on and off are called 'propertyN' where N is an integer.
	//alert("running setVisible");
	var object = document.getElementById('property' + index);
	for (var j = 1; j < 7; j+=1) {
		if (j != index) {
			object = document.getElementById('property' + j);
			object.className = 'propertyInvisible';
			//alert("doing " + j + " for index of " + index);
		}
	}
	object = document.getElementById('property' + index);
	object.className = 'propertyVisible';
	
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
	
		lightweight = newImage("assets/comfort_inn.jpg");
		cabinet = newImage("assets/main_hickok.jpg");
		concrete = newImage("assets/college_main.jpg");
		panelized = newImage("assets/southpark.jpg");
		modifiediso = newImage("assets/walgreens.jpg");
		noncombustible = newImage("assets/triangle_square.jpg");
		preloadFlag = true;
		
		var interval = 3000;
		var t = new Array(30);
		//sets up 6x30=180 timeouts
		for (var j = 0; j < 30; j+=1) {
			for (var i = 1; i < 7 ; i+=1){
				t[i+j] = setTimeout("setVisibleAnimate('" + i + "')",interval*(i + 1)+j*interval*6);
			}
		}

	}
}