/*
 * Function to clear link color, set a new one, and move 
 * to a specific group of testimonial
 *
 */

function moveMe(who, move) {
	var link_zero = document.getElementById("link_zero");
	var link_one = document.getElementById("link_one");
	var link_two = document.getElementById("link_two");
	var link_three = document.getElementById("link_three");
	var link_four = document.getElementById("link_four");
	var link_five = document.getElementById("link_five");
	//var link_six = document.getElementById("link_six");
	
	switch(who) {
		case 0:
			// I'm the active link
			link_zero.className = "ablb14";
			
			// And these are the normal links
			link_one.className = "abckb14";
			link_two.className = "abckb14";
			link_three.className = "abckb14";
			link_four.className = "abckb14";
			link_five.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-3px"; }
		break;
		
		case 1:
			// I'm the active link
			link_one.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_two.className = "abckb14";
			link_three.className = "abckb14";
			link_four.className = "abckb14";
			link_five.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-832px"; }
		break;
		
		case 2:
			// I'm the active link
			link_two.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_one.className = "abckb14";
			link_three.className = "abckb14";
			link_four.className = "abckb14";
			link_five.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-1660px"; }
		break;
		
		case 3:
			// I'm the active link
			link_three.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_one.className = "abckb14";
			link_two.className = "abckb14";
			link_four.className = "abckb14";
			link_five.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-2490px"; }
		break;
		
		case 4:
			// I'm the active link
			link_four.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_one.className = "abckb14";
			link_two.className = "abckb14";
			link_three.className = "abckb14";
			link_five.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-3315px"; }
		break;
		
		case 5:
			// I'm the active link
			link_five.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_one.className = "abckb14";
			link_two.className = "abckb14";
			link_three.className = "abckb14";
			link_four.className = "abckb14";
			//link_six.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-4140px"; }
		break;
		/*
		case 6:
			// I'm the active link
			link_six.className = "ablb14";
			
			// And these are the normal links
			link_zero.className = "abckb14";
			link_one.className = "abckb14";
			link_two.className = "abckb14";
			link_three.className = "abckb14";
			link_four.className = "abckb14";
			link_five.className = "abckb14";
			
			// Go to the specific testimonial group
			if(move == "true") { crossobj.style.left = "-4965px"; }
		break;
		*/
		
		
	}	
}

function moveLeft(){
	if(parseInt(crossobj.style.left) > -4140) {
		if (window.moveupvar) clearTimeout(moveupvar)
		if (iens6&&parseInt(crossobj.style.left) >= (contentwidth*(-1)+100))
		crossobj.style.left = parseInt(crossobj.style.left)-speed+"px"
		else if (ns4&&crossobj.top >= (contentwidth*(-1)+100))
		crossobj.left -= speed
		movedownvar = setTimeout("moveLeft()",20)
	}
}

function moveRight(){
	if(parseInt(crossobj.style.left) < -5) {
		if (window.movedownvar) clearTimeout(movedownvar)
		if (iens6&&parseInt(crossobj.style.left) <= 0)
		crossobj.style.left = parseInt(crossobj.style.left)+speed+"px"
		else if (ns4&&crossobj.left <= 0)
		crossobj.left += speed
		moveupvar = setTimeout("moveRight()",20)
	}
}

function stopscroll(){
	if (window.moveupvar) clearTimeout(moveupvar)
	if (window.movedownvar) clearTimeout(movedownvar)
}

function getcontent_height(){
	if (iens6)
		contentheight = crossobj.offsetHeight
	else if (ns4)
		document.nscontainer.document.nscontent.visibility = "show"
}
window.onload = getcontent_height
