/*****************************************************************/
/*                            Header                             */
/*****************************************************************/
function sfc_topnavOver(el){
	el.className = (el.className + " " + "mouseover");
}
function sfc_topnavOut(el){
	el.className = el.className.replace("mouseover", "");
}
/*****************************************************************/
/*                           Rotator                             */
/*****************************************************************/
var sfc_rotator_counter = 0;
var sfc_rotator_total = 4;
var sfc_rotator_interval = 0
var sfc_rotator_speed = 8000;

function sfc_doRotate(to){
	document.getElementById("case"+sfc_rotator_counter).style.display = "none";
	
	if(to != null){
		sfc_rotator_counter = to;
		document.getElementById("case"+to).style.display = "block";
		sfc_resetRotateTimer();
	}else{
		sfc_rotator_counter = (sfc_rotator_counter + 1)%4;
		document.getElementById("case"+sfc_rotator_counter).style.display = "block";
		sfc_resetRotateTimer();
	}
}
function sfc_resetRotateTimer(){
	clearInterval(sfc_rotator_interval);
	
	sfc_rotator_interval = setInterval("sfc_doRotate()",sfc_rotator_speed)
}
function sfc_startRotate(speed,total,start){
	sfc_rotator_total = total;
	sfc_rotator_speed = speed;
	sfc_rotator_counter = (start)? start:0;
	for(i=0;i<sfc_rotator_total;i++){
		document.getElementById("case"+i).style.display = "none";
	}
	document.getElementById("case"+sfc_rotator_counter).style.display = "block";
	
	sfc_rotator_interval = setInterval("sfc_doRotate()",speed);
}