// JavaScript Document
// JavaScript Document
var IS_IE = (document.all) ? true : false;
var CLASS_NAME = (IS_IE) ? (navigator.appVersion.indexOf("MSIE 8.0")!=-1?"class":"className"): "class";


function activerOnglet(rang){
	var liste_onglets = document.getElementById("onglets-abonnement");
	var liste_contenus = document.getElementById("contenus-abonnement")
	onglets = liste_onglets.getElementsByTagName("li");
	contenus = liste_contenus.getElementsByTagName("li");
	for(var i=0;i<onglets.length ;i++){
		if(i==rang){
			onglets[i].setAttribute(CLASS_NAME,'actif');
			contenus[i].setAttribute(CLASS_NAME,'actif');
		}else{
			onglets[i].removeAttribute(CLASS_NAME);
			contenus[i].removeAttribute(CLASS_NAME);
		}
	}
	
}
function afficherPopUp(id_pop, stringPageLien){
	var pop_up = document.getElementById(id_pop);
	pop_up.setAttribute(CLASS_NAME,'pop-up');
	var fond_gris =  document.getElementById("grise");
	fond_gris.removeAttribute(CLASS_NAME);
	document.getElementById("popup").src=stringPageLien;
}
function masquerPopUp(id_pop){
	var pop_up = document.getElementById(id_pop);
	pop_up.setAttribute(CLASS_NAME,'cache');
	var fond_gris =  document.getElementById("grise");
	fond_gris.setAttribute(CLASS_NAME,'cache');
}



function afficherPlus(element){
	var div_parent = element.parentNode.parentNode;
	var div_enfant = element.firstChild;
	calques = div_parent.getElementsByTagName("div");
	for(var i=0;i<calques.length ;i++){
		if(calques[i].getAttribute(CLASS_NAME)=="content"){
			calques[i].setAttribute(CLASS_NAME,'cache');
			div_enfant.setAttribute('src','/redimgs/picto-plus.gif');
		}else if(calques[i].getAttribute(CLASS_NAME)=="cache"){
			calques[i].setAttribute(CLASS_NAME,'content');
			div_enfant.setAttribute('src','/redimgs/picto-moins.gif');
		}
	}
	
}


// vide les input text onfocus
function viderChamp(quelchamp){
	if(!quelchamp.drapeau){
		quelchamp.value = "";
		quelchamp.drapeau = true;
	}
}