/**FONCTION JAVASCRIPT*/

//**TRANSPARENCE IMAGES**//	
function makevisible(cur,which)
{
	if(document.getElementById)
	{
		if (which==0)
		{
			if(document.all)
				cur.filters.alpha.opacity=100
			else
				cur.style.setProperty("-moz-opacity", 1, "");
		}
		else
		{
			if(document.all)
				cur.filters.alpha.opacity=55
			else
				cur.style.setProperty("-moz-opacity", .55, "");
		}
	}
}	
	
	//ROLL OVER IMAGES//
function swap_img(p_target, img_name){	
	if (window.my_var != p_target) {
	window.document.images[p_target].src = img_name;
	}
}

function show_Div(id) {
	var obj = document.getElementById(id);
	if (obj != null) {
		obj.style.visibility='visible';
		obj.style.display='block';
	}
}

function hide_Div(id) {
	var obj = document.getElementById(id);
	if (obj != null) {
		obj.style.visibility='hidden';
		obj.style.display='none';
	}
}

//**CACHE/ACTIVE LES DIV**//	
function show_hide_Div(show,hidde0,hidde1,hidde2,hidde3,hidde4,hidde5){

/*	show_Div(show);
	hide_Div(hidde0);
	hide_Div(hidde1);
	hide_Div(hidde2);
	hide_Div(hidde3);
	hide_Div(hidde4);
	hide_Div(hidde5);
*/	
	//**CACHE/ACTIVE le contenu de gauche
	var base_class ='contenu_lecteur_';
	show = base_class + show;
	hidde0 = base_class + hidde0;
	hidde1= base_class + hidde1;
	hidde2= base_class + hidde2;
	hidde3= base_class + hidde3;
	hidde4= base_class + hidde4;
	hidde5= base_class + hidde5;
	
	show_Div(show);
	hide_Div(hidde0);
	hide_Div(hidde1);
	hide_Div(hidde2);
	hide_Div(hidde3);
	hide_Div(hidde4);
	hide_Div(hidde5);
}
		
// CACHE/ACTIVE le contenu de gauche
function show_hide_Div2(show,hidde,hidde1,hidde2,hidde3,hidde4){

	show_Div(show);
	hide_Div(hidde);
	hide_Div(hidde1);
	hide_Div(hidde2);
	hide_Div(hidde3);
	hide_Div(hidde4);
}

function swap_destinataire(p_target_Id,email){
	document.getElementById(p_target_Id).value = email;
	}
	
function active_image(path, p_target){
		if (my_var != "")	window.document.images[window.my_var].src = path + '/contact_' + window.my_var + '.gif';
		window.my_var = p_target;
		}
function active_image2(path, p_target){
		if (my_var == p_target) return;
		if (my_var != "")	window.document.images[window.my_var].src = path + '/onglet_' + window.my_var + '.gif';
		window.my_var = p_target;
		//alert(p_target);
		}
function active_onglet(p_target){
	var btn = document.getElementById(p_target);
	var btnRoot = p_target.substring(0,6);

	btn.className= "bl_menu_on"; 
	window.active_tab=p_target;
	
	//Désactiver les autres onglets
	var i=1;
	for (i=1;i<=6;i++){	
		if (window.active_tab != btnRoot+i) {
			var btnoff = document.getElementById(btnRoot+i);
			if (btnoff != null)	btnoff.className= "bl_menu_off"; 
		}
	}
}




