	var interval = 7; 
	interval *= 3000;
	var image_index = 0;
	image_left = new Array();
	image_left[image_index++] = "images/inspire-full.jpg";
	image_left[image_index++] = "images/connect-full.jpg";
	image_left[image_index++] = "images/express-full.jpg";
	image_left[image_index++] = "images/serve-full.jpg";
	preloadImages(image_left);
	
	image_index = 0;
	image_quote = new Array();
	image_quote[image_index++] = "images/home_quote_void.gif";
	image_quote[image_index++] = "images/home_quote_void.gif";
	image_quote[image_index++] = "images/home_quote_void.gif";
	image_quote[image_index++] = "images/home_quote_void.gif";
	image_quote[image_index++] = "images/home_quote_void.gif";
	image_quote[image_index++] = "images/home_quote_void.gif";
	preloadImages(image_quote);
	function fadeIn(objId, opacity, secID) {
		if (document.getElementById){
			obj = document.getElementById(objId);
			if (opacity <= 100) {
				setOpacity(obj, opacity);
				opacity += 5;
				window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
			}
		}
	}
	function fadeOut(objId,opacity) {
		var obj;
		if (document.getElementById) {
			obj = document.getElementById(objId);
			if (opacity >= 0) {
				setOpacity(obj, opacity);
				opacity -= 20;
				window.setTimeout("fadeOut('"+objId+"',"+opacity+")", 100);
			}
		}
	}
	function setOpacity(obj, opacity) {
		opacity = (opacity == 100)?99.999:opacity;
		// IE/Win
		obj.style.filter = "alpha(opacity:"+opacity+")";
		// Safari<1.2, Konqueror
		obj.style.KHTMLOpacity = opacity/100;
		// Older Mozilla and Firefox
		obj.style.MozOpacity = opacity/100;
		// Safari 1.2, newer Firefox and Mozilla, CSS3
		obj.style.opacity = opacity/100;
	}
	function rmi0(imageID){
		if (imageID > (image_index-1)) imageID = 0;
		document.getElementById('thephoto1').src = image_list[imageID];
//		document.getElementById('thephotoB1').src = image_list3[imageID];
		setOpacity(document.getElementById('thephoto1'), 0);
//		setOpacity(document.getElementById('thephotoB1'), 0);
		
		document.getElementById('thephoto1').style.zIndex = 2;
//		document.getElementById('thephotoB1').style.zIndex = 2;
		document.getElementById('thephoto2').style.zIndex = 1;
//		document.getElementById('thephotoB2').style.zIndex = 1;
		fadeIn('thephoto1', 0, 'thephoto2');
//		fadeIn('thephotoB1', 0, 'thephotoB2');
		
		var recur_call = "rmi1("+imageID+")";
		setTimeout(recur_call, interval);
	}
	function rmi1(imageID){
		document.getElementById('thephoto2').src = image_list2[imageID];
//		document.getElementById('thephotoB2').src = image_list4[imageID];
		
		setOpacity(document.getElementById('thephoto2'), 0);
//		setOpacity(document.getElementById('thephotoB2'), 0);
		
		document.getElementById('thephoto2').style.zIndex = 2;
//		document.getElementById('thephotoB2').style.zIndex = 2;
		
		document.getElementById('thephoto1').style.zIndex = 1;
//		document.getElementById('thephotoB1').style.zIndex = 1;
		
		fadeIn('thephoto2', 0, 'thephoto1');
//		fadeIn('thephotoB2', 0, 'thephotoB1');
		
		imageID = imageID + 1;
		var recur_call = "rmi0("+imageID+")";
		setTimeout(recur_call, interval);
	}
	function preloadImages(preload_array) {
		for(var loop = 0; loop < preload_array.length; loop++){
		 	var an_image = new Image();
			an_image.src = preload_array[loop];
		}
	}
	
	
	
	function rotateImages(imageID, refresh){
		document.getElementById('hl').src = image_left[imageID];
		imageID += 1;
		if (imageID >= image_left.length) imageID = 0;
		if (refresh){
			var recur_call = "rotateImages("+imageID+", true)";
			setTimeout(recur_call, 3000);
		}
	}
	function generate(x, y) {
		var range = y - x + 1;
		return Math.floor(Math.random() * range) + x;
	}
	

