arrHC = new Array();
arrHC[0] = "jamie_tom";
arrHC[1] = "jerry_vicki";
arrHC[2] = "jamie_betsy";
arrHC[3] = "eric_chris";
arrHC[4] = "catherine_charlie";

for (x = 0; x < arrHC.length; x++) { 
	thisHC = "hc"+x;
	thisHC = new Image();
	thisHC.src = "images/thm_"+arrHC[x]+".jpg";
	x++;
	}
	
var slot0 = 0;
var slot1 = 1;
var slot2 = 2;

function moveSlots() {
	document.getElementById("hc0Link").setAttribute("href","collision_"+arrHC[slot0]+".asp");
	document.getElementById("hc0Img").setAttribute("src","images/thm_"+arrHC[slot0]+".jpg");
	
	document.getElementById("hc1Link").setAttribute("href","collision_"+arrHC[slot1]+".asp");
	document.getElementById("hc1Img").setAttribute("src","images/thm_"+arrHC[slot1]+".jpg");
	
	document.getElementById("hc2Link").setAttribute("href","collision_"+arrHC[slot2]+".asp");
	document.getElementById("hc2Img").setAttribute("src","images/thm_"+arrHC[slot2]+".jpg");
	
	new Effect.Appear("hcContainer",{to: 1.0, from: 0.1, duration: 0.6, delay: 0.1});
	}

function scrollHC(dir) {

	if(dir == "next") {
		slot0 = slot0+1;
		if(slot0 > arrHC.length-1) {
			slot0 = 0;
			}
		
		slot1 = slot0+1;
		if(slot1 > arrHC.length-1) {
			slot1 = 0;
			}
		
		slot2 = slot1+1;
		if(slot2 > arrHC.length-1) {
			slot2 = 0;
			}
		}

	if(dir == "prev") {
		slot0 = slot0-1;

		if(slot0 < 0) {
			slot0 = arrHC.length-1;
			}
		
		slot1 = slot0+1;
		if(slot1 > arrHC.length-1) {
			slot1 = 0;
			}
			
		slot2 = slot1+1;
		if(slot2 > arrHC.length-1) {
			slot2 = 0;
			}
		}
		
	new Effect.Fade("hcContainer",{to: 0.1, from: 1.0, duration: 0.6, afterFinish: moveSlots});
	}
