/* 
# www.publiclab.ch
# Alain Bellet 2006
*/

/* For popup menu */
var menu_delay = 0;

function show_navig(){
	// show specific menu
	set_display("navigblock","block");
	// clear delay
	init_delay();
}

function init_delay(){
	clearTimeout(menu_delay);
	menu_delay = setTimeout('hide_all()',8000);
}

function reset_delay(){
	clearTimeout(menu_delay);
}

function hide_all(){
	set_display("navigblock","none");
}

function thumb_action (the_popup,the_classsement,the_legend,state){
	if (the_popup == 1) the_id = "legendePersonal";
	if (the_popup == 2) the_id = "legendeEditorial";
	if (the_popup == 3) the_id = "legendeCorporate";
	if (the_popup == 4) the_id = "legendextra";
	if (state == 0 ){
	// start delay
	init_delay();
	set_html(the_id+the_classsement,'&nbsp;');
	}else{
	set_html(the_id+the_classsement,'&nbsp;/ '+the_legend);
	reset_delay();
	}
}

/* Global Functions */

// show-hide a div
function show_hide(the_div,vis){
	if (document.getElementById){
		document.getElementById(the_div).style.visibility = vis;
	}
	else if (document.all)
	{
		document.all[the_div].style.visibility = vis;
	}
}

// show-hide a div (with diplay
function set_display(the_div,vis){
	if (document.getElementById){
		document.getElementById(the_div).style.display = vis;
	}
	else if (document.all)
	{
		document.all[the_div].style.display = vis;
	}
}

// set html of a div
function set_html(the_div,html){
	if (document.getElementById){
		document.getElementById(the_div).innerHTML = html;
	}
	else if (document.all)
	{
		document.all[the_div].innerHTML = html;
	}
}
