	var interval = 5; 
	interval *= 1000;

	var image_index = 0;
	image_list = new Array();
	image_list[image_index++] = "images/homepicA7.jpg";
	image_list[image_index++] = "images/homepicA9.jpg";
	image_list[image_index++] = "images/homepicA13.jpg";
	image_list[image_index++] = "images/homepicA15.jpg";
	preloadImages(image_list);
	
	image_index = 0;
	image_list2 = new Array();
	image_list2[image_index++] = "images/homepicA8.jpg";
	image_list2[image_index++] = "images/homepicA12.jpg";
	image_list2[image_index++] = "images/homepicA14.jpg";
	image_list2[image_index++] = "images/homepicA16.jpg";
	preloadImages(image_list2);
	

	image_index = 0;
	image_list3 = new Array();
	image_list3[image_index++] = "images/homepicB7.jpg";
	image_list3[image_index++] = "images/homepicB6.jpg";
	image_list3[image_index++] = "images/homepicB13.jpg";
	image_list3[image_index++] = "images/homepicB15.jpg";
	preloadImages(image_list3);
	
	image_index = 0;
	image_list4 = new Array();
	image_list4[image_index++] = "images/homepicB8.jpg";
	image_list4[image_index++] = "images/homepicB10.jpg";
	image_list4[image_index++] = "images/homepicB14.jpg";
	image_list4[image_index++] = "images/homepicB16.jpg";
	preloadImages(image_list4);


	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];
		}
	}
	
	
	
