/*
version 1.1 
modif par TSEF Yannick Gaillabaud
webmaster intraterre et webmaster DCTEI
mail : yannick.gaillabaud@dctei.terre.def
-----------------------------------------
le 22/11/01 -> fonction lien + fonction efface effacepas
-----------------------------------------
a réaliser la position dans la page + gérer le redimentionnement
*/

var tempo=0;

function lien(active,nom,lien,espaces){
	if(active){result ='<a href='+lien+' CLASS=ejsmenu>'+nom;}else{result ='<font class=ejsmenu>'+nom;}
	for (;espaces>0;espaces--,result+='&nbsp');
	if(active){result+='</a>';}else{result +='</font>';}
	return result;
}

function efface(){
	tempo = setTimeout("kill()",200);
}

function effacepas(){
		if (tempo>0){clearTimeout(tempo);}	
}

/* posYmenu = 98; */
posYmenu = 114;
posXmenu = 111;
bgcolor='#d0d6fa';
bgcolor2='#0421d2';
needcenter = true;
/*if(!needcenter){
	  posXmenu = 228;
}else{	if (document.all){
			// internet explorer 5.5//
			// calcul approximatif ...//
			if ((document.body.clientWidth)<770){
				  posXmenu=111;
			}else{
				  posXmenu = (document.body.clientWidth/2)-(600/2)+28;
			}
		}else{
			// netscape 6//
			if ((window.innerWidth)<780){
				posXmenu=111;
			}else{
				posXmenu = (window.innerWidth/2)-(600/2)+13;
			}
		}	
}*/

document.write('<style type="text/css">');
document.write('.popper { POSITION: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topgauche { position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10; }')
document.write('A:hover.ejsmenu {color:#FFFFFF; text-decoration:none;}')
document.write('A.ejsmenu {color:#000000; text-decoration:none;}')
document.write('</style>')
document.write('<DIV class=popper id=topdeck></DIV>');
/*
LIENS
*/
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[4] = new Array;
zlien[5] = new Array;

zlien[0][0] = lien(1,"Les origines","Introduction.htm",5);
zlien[0][1] = lien(1,"Le Drapeau","Drapeau.htm",5);
zlien[0][2] = lien(1,"Les Chefs","HCDC.htm",5);
zlien[0][3] = lien(1,"L'insigne","HInsigne.htm",5);
zlien[0][4] = lien(1,"Attributs","Htradi.htm",5);
zlien[0][5] = lien(1,"Le calot","Hcalot.htm",5);
zlien[0][6] = lien(1,"Uniformes","H_uniform_menu.htm",5);
zlien[0][7] = lien(1,"La popote","Hpopote.htm",5);

zlien[1][0] = lien(1,"Mot du colonel","mot_cdc.htm",7);
zlien[1][1] = lien(1,"Bio du colonel","CDC_futur.htm",7);
zlien[1][2] = lien(1,"Les missions","OMissions.htm",7);
zlien[1][3] = lien(1,"L'outre-mer","O_OM_menu.htm",7);
zlien[1][4] = lien(1,"Les unités","unites.htm",7);
zlien[1][5] = lien(1,"Les Présidents","President_menu.htm",2);
zlien[1][6] = lien(1,"Le matériel","Rmateriel.htm",7);
zlien[1][7] = lien(1,"L'annuaire","Annuaire2.htm",7);
zlien[1][8] = lien(1,"Plan d'acces","Plan_acces.htm",7);
zlien[1][9] = lien(1,"Photos 2009","ancien_menu2.htm",5);
zlien[1][10] = lien(1,"Photos 2010/1","ancien_menu3.htm",5);
zlien[1][11] = lien(1,"Photos 2010/2","ancien_menu4.htm",5);

zlien[2][0] = lien(1,"Mot du Président","a1.htm",2);
zlien[2][1] = lien(1,"Le bureau","a2.htm",2);
zlien[2][2] = lien(1,"le col Druart","a6.htm",2);
zlien[2][3] = lien(1,"l'adc Petit","adc_petit.htm",2);
zlien[2][4] = lien(1,"le col Verdier","a8.htm",2);
zlien[2][5] = lien(1,"le sch Ferrer","a9.htm",2);
zlien[2][6] = lien(1,"le gal Magendie","a12.htm",2);
zlien[2][7] = lien(1,"Récit cpl Chateau","a10.htm",2);
zlien[2][8] = lien(1,"Récit 1cl Mellon","a11.htm",2);
zlien[2][9] = lien(1,"Récit cba Fleurot","a14.htm",2);
zlien[2][10] = lien(1,"Récit gal Pol","a16.htm",2);
zlien[2][11] = lien(1,"CV cba Loustau","a15.htm",2);
zlien[2][12] = lien(1,"Archives photos","photos_menu.htm",5);

zlien[3][0] = lien(1,"Plaquette 2008","D_plaquette2008.htm",2);
zlien[3][1] = lien(1,"L'encre du 1°","Alaune_Presse_journal1.htm",2);
zlien[3][2] = lien(1,"Communication","osa.htm",2);
zlien[3][3] = lien(1,"Liens","liens.htm",2);
zlien[3][4] = lien(1,"Forum","http://forum.1rima.fr/forum",2);
zlien[3][5] = lien(1,"Album","http://photos.1rima.fr/photos",2);

zlien[4][0] = lien(1,"Chef BEH","besh1.htm",5);
zlien[4][1] = lien(1,"Juridique","besh2.htm",5);
zlien[4][2] = lien(1,"Accueil/Infos","besh3.htm",5);
zlien[4][3] = lien(1,"Aide aux familles","Dbrrcp_famille.htm",5);
zlien[4][4] = lien(1,"Logement","GangoulemeLogement.htm",5);
zlien[4][5] = lien(1,"Angoulême","Gangouleme.htm",5);
zlien[4][6] = lien(1,"Histoire","Ghistoire.htm",5);

zlien[5][0] = lien(1,"DMD","DDMD.htm",7);
zlien[5][1] = lien(1,"CIRFA","DCIRAT.htm",7);
zlien[5][2] = lien(1,"ASA","DASA.htm",7);
zlien[5][3] = lien(1,"CSA","DCSA.htm",7);


var nava = (document.layers);
var dom = (document.getElementById);
var iex = (document.all);
if (nava) { skn = document.topdeck }
else if (dom) { skn = document.getElementById("topdeck").style }
else if (iex) { skn = topdeck.style }
/* skn.top = posYmenu+24; */
skn.top = posYmenu+22;

function pop(msg,pos)
{
	skn.visibility = "hidden";
	a=true
	pos=pos+1;
	skn.left = posXmenu+pos-1;
	var content ="<div id=skn1><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=119 onmouseover=\"effacepas();\" onmouseout=\"efface();\">";
	pass = 0
	while (pass < msg.length)
	{
		content += "<TR ><TD BGCOLOR="+bgcolor+" onMouseOver=\"effacepas();this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=1 FACE=\"Verdana\"><B>&nbsp;&nbsp;"+msg[pass]+"</B></FONT></TD></TR>";
		pass++;
	}
	content += "</TABLE></div>";
	if (nava){
    	skn.document.write(content);
	  	skn.document.close();
	 	skn.visibility = "visible";
 	}else if (dom){
	  	document.getElementById("topdeck").innerHTML = content;
	  	skn.visibility = "visible";
  	}else if (iex){
	  document.all("topdeck").innerHTML = content;
	  skn.visibility = "visible";
  	}
}

function kill()
{
	skn.visibility = "hidden";
}

document.onclick = kill;
document.write('<DIV ID=topgauche onmouseout=\"efface();\" onmouseover=\"effacepas();\"><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=600 HEIGHT=21><TR>')
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],0)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A  onClick="return(false)" onMouseOver="pop(zlien[0],0)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>Traditions</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[1],100)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[1],100)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>1er RIMa</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[2],200)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(true)" onMouseOver="pop(zlien[2],200)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>Amicale</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[3],300)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[3],300)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>Infos</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[4],400)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[4],400)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>Familles</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');
document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[5],500)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[4],500)" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><B>Divers</B></FONT></a></TD>');
document.write('<TD WIDTH=1 ALIGN=center BGCOLOR='+bgcolor+'></TD>');


document.write('</TR></TABLE></DIV>');