// Richard Mayer
// Services Informatiques Logitem

var timerSub = null;
var timerComm = null;
var cur_comm = 0;
var last_comm = 23;

function show_sub(subnumber) {
	clearTimeout(timerSub);
	hide_all_menus();

	document.getElementById('sub'+subnumber).style.display = 'block';
	document.getElementById('iHack'+subnumber).style.display = 'block';
}

function hide_sub(subnumber) {
	timerSub = setTimeout("hide_all_menus()",500);
}

function hide_all_menus() {
	document.getElementById('sub1').style.display = 'none';
	document.getElementById('iHack1').style.display = 'none';
}
function comm_change() {
	if(Number(cur_comm) == Number(last_comm)) {
		cur_comm = 1;
	} else {
		cur_comm++;
	}
	//alert(cur_comm);
	document.getElementById("commimg").src = "images/commanditaires/"+cur_comm+".jpg";
	timerComm = setTimeout("comm_change()",1500);
}
function start_comm() {
	timerComm = setTimeout("comm_change()",1500);
}
function stop_comm() {
	clearTimeout(timerComm);
}