	var interval = 5; 
	interval *= 1000;

	var image_index = 0;
	image_list = new Array();
	image_list[image_index++] = "images/home/imgA.jpg";
	image_list[image_index++] = "images/home/imgA3.jpg";
	image_list[image_index++] = "images/home/imgA2.jpg";
	image_list[image_index++] = "images/home/imgA.jpg";
	image_list[image_index++] = "images/home/imgA3.jpg";
	image_list[image_index++] = "images/home/imgA2.jpg";
	preloadImages(image_list);
	
	image_index = 0;
	image_list2 = new Array();
	image_list2[image_index++] = "images/home/imgA2.jpg";
	image_list2[image_index++] = "images/home/imgA.jpg";
	image_list2[image_index++] = "images/home/imgA3.jpg";
	image_list2[image_index++] = "images/home/imgA2.jpg";
	image_list2[image_index++] = "images/home/imgA.jpg";
	image_list2[image_index++] = "images/home/imgA3.jpg";
	preloadImages(image_list2);

	image_index = 0;
	image_list3 = new Array();
	image_list3[image_index++] = "images/home/imgB.jpg";
	image_list3[image_index++] = "images/home/imgB.jpg";
	image_list3[image_index++] = "images/home/imgB.jpg";
	image_list3[image_index++] = "images/home/imgB.jpg";
	image_list3[image_index++] = "images/home/imgB.jpg";
	image_list3[image_index++] = "images/home/imgB.jpg";
	preloadImages(image_list3);
	
	image_index = 0;
	image_list4 = new Array();
	image_list4[image_index++] = "images/home/imgB2.jpg";
	image_list4[image_index++] = "images/home/imgB2.jpg";
	image_list4[image_index++] = "images/home/imgB2.jpg";
	image_list4[image_index++] = "images/home/imgB2.jpg";
	image_list4[image_index++] = "images/home/imgB2.jpg";
	image_list4[image_index++] = "images/home/imgB2.jpg";
	preloadImages(image_list4);

	image_index = 0;
	image_list5 = new Array();
	image_list5[image_index++] = "images/home/imgC.jpg";
	image_list5[image_index++] = "images/home/imgC.jpg";
	image_list5[image_index++] = "images/home/imgC.jpg";
	image_list5[image_index++] = "images/home/imgC.jpg";
	image_list5[image_index++] = "images/home/imgC.jpg";
	image_list5[image_index++] = "images/home/imgC.jpg";
	preloadImages(image_list5);
	
	image_index = 0;
	image_list6 = new Array();
	image_list6[image_index++] = "images/home/imgC2.jpg";
	image_list6[image_index++] = "images/home/imgC2.jpg";
	image_list6[image_index++] = "images/home/imgC2.jpg";
	image_list6[image_index++] = "images/home/imgC2.jpg";
	image_list6[image_index++] = "images/home/imgC2.jpg";
	image_list6[image_index++] = "images/home/imgC2.jpg";
	preloadImages(image_list6);

	

	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('thephoto3').src = image_list3[imageID];
		document.getElementById('thephoto5').src = image_list5[imageID];
		setOpacity(document.getElementById('thephoto1'), 0);
		setOpacity(document.getElementById('thephoto3'), 0);
		setOpacity(document.getElementById('thephoto5'), 0);
		document.getElementById('thephoto1').style.zIndex = 2;
		document.getElementById('thephoto3').style.zIndex = 2;
		document.getElementById('thephoto5').style.zIndex = 2;
		document.getElementById('thephoto2').style.zIndex = 1;
		document.getElementById('thephoto4').style.zIndex = 1;
		document.getElementById('thephoto6').style.zIndex = 1;
		fadeIn('thephoto1', 0, 'thephoto2');
		fadeIn('thephoto3', 0, 'thephoto4');
		fadeIn('thephoto5', 0, 'thephoto6');
		var recur_call = "rmi1("+imageID+")";
		setTimeout(recur_call, interval);
	}

	function rmi1(imageID){
		document.getElementById('thephoto2').src = image_list2[imageID];
		document.getElementById('thephoto4').src = image_list4[imageID];
		document.getElementById('thephoto6').src = image_list6[imageID];
		setOpacity(document.getElementById('thephoto2'), 0);
		setOpacity(document.getElementById('thephoto4'), 0);
		setOpacity(document.getElementById('thephoto6'), 0);
		document.getElementById('thephoto2').style.zIndex = 2;
		document.getElementById('thephoto4').style.zIndex = 2;
		document.getElementById('thephoto6').style.zIndex = 2;
		document.getElementById('thephoto1').style.zIndex = 1;
		document.getElementById('thephoto3').style.zIndex = 1;
		document.getElementById('thephoto5').style.zIndex = 1;
		fadeIn('thephoto2', 0, 'thephoto1');
		fadeIn('thephoto4', 0, 'thephoto3');
		fadeIn('thephoto6', 0, 'thephoto5');
		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];
		}
	}	
