var killdiv=1
var newdiv=2
var botdiv=3

function movetestim(totdiv){
	blendimage2('testimContent'+killdiv,'testimContent'+newdiv,'testimContent'+botdiv,700)
	
	newdiv=newdiv+1
    killdiv=killdiv+1
    botdiv=botdiv+1
	if (newdiv>totdiv){
		newdiv=1	
	}
    if (killdiv>totdiv){
		killdiv=1	
	}
    if (botdiv>totdiv){
		botdiv=1	
	}
}

function starttestim(totdiv){
	starttestim=setInterval ('movetestim('+totdiv+')', 5000);
}

//change the opacity for different browsers
function changeOpac2(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function blendimage2(divkill, divnew, divbot, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divnew).style.display='block'
	document.getElementById(divbot).style.zIndex=12
	document.getElementById(divkill).style.zIndex=11
	document.getElementById(divnew).style.zIndex=10
	
	//make image transparent
	changeOpac2(0, divnew);
	
	//make new image

	//fade in image
	x=100
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + divnew + "')",(timer * speed));
		setTimeout("changeOpac(" + x + ",'" + divkill + "')",(timer * speed));
		timer++;
		x--
	}
}
