var count_promo=0;
function MontrerMenu(strimg) {
    document.getElementById(strimg).style.visibility="visible";
}

function CacherMenus(strimg) {
	document.getElementById(strimg).style.visibility="hidden";

}
function closemenu(strimg){
	//ferme seulement le menu sans toucher au reste
	var close='menu_'+strimg;
	document.getElementById(close).style.visibility="hidden";
	//document.getElementById(close).style.display="none";
}
function afficheliste(strimg){
	var menuall=new Array("logiciel","comite","formation","hotline","internet","securite","telechargement","web21");
	var themenu="menu_";
	var noclose='menu_'+strimg;
	var img_on='img_'+strimg;
	if (document.forms[0].first.value=="0"){
		document.forms[0].first.value=strimg;
		document.getElementById(noclose).style.visibility="visible";
		document.getElementById(img_on).src='/image/fleche_menu.gif';
		for(i=0;i< menuall.length;i++ ){
			if (menuall[i] != strimg){
				document.getElementById('menu_'+ menuall[i]).style.visibility="hidden";
				document.getElementById('img_'+menuall[i]).src='/image/puce_vide.gif';
			}
		}
	}else{
		if(document.forms[0].first.value != strimg ){
			document.forms[0].first.value=strimg;
			document.getElementById(noclose).style.visibility="visible";
			document.getElementById(img_on).src='/image/fleche_menu.gif';
			for(i=0;i< menuall.length;i++ ){
				if (menuall[i] != strimg){
					document.getElementById('menu_'+ menuall[i]).style.visibility="hidden";
					document.getElementById('img_'+menuall[i]).src='/image/puce_vide.gif';
				}
			}
		}else{
		//deuxieme click	
			document.forms[0].first.value="0";
			document.getElementById(noclose).style.visibility="hidden";
			document.getElementById(img_on).src='/image/puce_vide.gif';
			
		}
	}



	
}
function newwindow(url,type,name){
	if(type=="1"){
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=526,height=500');
	}else if (type=="2"){
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=600,height=600');
	}else if(type=="3"){
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=526,height=300');
	}else if (type=="4"){
		//contact
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=530,height=600');
	}else if (type=="5"){
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=800,height=700');
	}else if (type=="6"){
		//popup formation & contact
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=528,height=600');
	}else if (type=="7"){
		//popup demo extranet
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=0,width=850,height=750');
	}else if (type=="8"){
		//url externe
		window.open(url,name,'');
	}else if (type=="9"){
		//popup big
		window.open(url,name,'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width=850,height=750');
	}

	


	


	
}

function supprimeliste(strimg){
	document.getElementById(strimg).style.display="none";
}
function supprimeliste(nohid){
	
	document.getElementById(nohid).style.display="none";

}
function rappel_window(page){
	document.forms[0].where.value=page;
	document.forms[0].submit();
}
function valueto(cas){
	document.listemandat.to.value=cas;
	document.listemandat.submit();
	
}
function envoyer(){
	if(document.contact.nom){
		if ( (document.contact.nom.value=="") || (document.contact.prenom.value=="") ||(document.contact.email.value=="") ) {
			alert("Veuillez remplir les champs obligatoires");
			return false;
		}else {
			document.contact.submit();
		}
	}else{
		document.forms[0].submit();
	}
}
function verif(){
	if(document.getElementById('pwd')){
		if(document.getElementById('pwd').value=="" || document.getElementById('login').value==""){
			alert("Il y a une erreur sur votre identifiant ou votre mot de passe \n Veuillez ressaisir vos paramètres.\nMerci");
			return false;
		}else{
			return true;
		}
	}
}
	
var count_promo=0;
	
function aff_promo(count_promo,nbpromol){
        document.getElementById('promo_'+count_promo).style.display="block";
        for(i=1;i<=nbpromol;i++){
                if(i!=count_promo){
                        document.getElementById('promo_'+i).style.display="none";
                }
        }
}
function wait(){
                if( document.forms[0].nbpromo.value != null  ){
                        var nbpromol=document.forms[0].nbpromo.value;
                        if(count_promo>=nbpromol){
                                count_promo=0;
                        }
                }
                count_promo++;
                aff_promo(count_promo,nbpromol);

}
function lancer(){
        setInterval("wait()",2000);
}



