/****************************************/
/* 			DECLARATION					*/	
/****************************************/
var tab_fond_cadre=new Array();			// stocker chemin accés image pour fond du cadre et contenu /	original
var tab_fond_cadre2=new Array();			// stocker chemin accés image pour fond du cadre et contenu / v2
var tab_id_menu=new Array();
var tab_img_menu=new Array();
var tab_lib_menu=new Array();
var tab_lib2_menu=new Array();
var tab_info_menu=new Array();
var aidemenu=new Array();
var nbmenu;
var txt_titre_menu;

var tab_id_ssmenu=new Array();
var tab_lib_ssmenu=new Array()
var tab_info_ssmenu=new Array();;
var tab_id_ssmenuMEDI=new Array();
var tab_lib_ssmenuMEDI=new Array();
var tab_id_ssmenuSERV=new Array();
var tab_lib_ssmenuSERV=new Array();
var nbssmenu;
var txt_titre_ssmenu;

var BrowNam=navigator.appName;
var BrowVer=parseInt(navigator.appVersion);	 
var VersionNav = navigator.appVersion.slice(22,25);
var message;
var menu="menu";
var ssmenu="sousmenu";
var jeton;
var jeton1="defaut1";
var jeton2="defaut2";
var coulover="#F2F19E";	 // ivoire
var coulclick="white";
var coulini1="#885133";	 // marron
var coulini2="#885133";
var txtclick="#AE365E";
var txtini1="white";
var txtini2="white";
/****************************************/
/* 			INITIALISATION				*/		
/****************************************/	
txt_titre_menu="";
txt_titre_ssmenu="";
// Les chemins sont pris à partir de la racine par défaut 
//on passe en variable le complément du chemin ex : "../"
tab_fond_cadre[0]="images/fonds/bambou_c_hg1.gif";	//coin supérieur gauche
tab_fond_cadre[1]="images/fonds/bambou_fh1.gif";		//barre haute
tab_fond_cadre[2]="images/fonds/bambou_c_hd1.gif";	//coin supérieur droit
tab_fond_cadre[3]="images/fonds/bambou_fg1.gif";		//barre gauche
tab_fond_cadre[4]="images/fonds/f_vert12.jpg";	//background pour tableau du contenu		  	
tab_fond_cadre[5]="images/fonds/bambou_fd1.gif";		//barre droite
tab_fond_cadre[6]="images/fonds/bambou_c_bg1.gif";  	//coin inférieur gauche
tab_fond_cadre[7]="images/fonds/bambou_fb1.gif";		//barre inférieur
tab_fond_cadre[8]="images/fonds/bambou_c_bd1.gif";	//coin inférieur droit

//on passe en variable le complément du chemin ex : "../"
tab_fond_cadre2[0]="images/fonds/bambou_c_hg.gif";	//coin supérieur gauche
tab_fond_cadre2[1]="images/fonds/bambou_fh.gif";		//barre haute
tab_fond_cadre2[2]="images/fonds/bambou_c_hd.gif";	//coin supérieur droit
tab_fond_cadre2[3]="images/fonds/bambou_fg.gif";		//barre gauche
tab_fond_cadre2[4]="images/fonds/f_vert12.jpg";	//background pour tableau du contenu		  	
tab_fond_cadre2[5]="images/fonds/bambou_fd.gif";		//barre droite
tab_fond_cadre2[6]="images/fonds/bambou_c_bg.gif";  	//coin inférieur gauche
tab_fond_cadre2[7]="images/fonds/bambou_fb.gif";		//barre inférieur
tab_fond_cadre2[8]="images/fonds/bambou_c_bd.gif";	//coin inférieur droit


//stocker identifiant menu principal, utilisé pour accés page
tab_id_menu[0]="menu1";
tab_id_menu[1]="menu2";
tab_id_menu[2]="menu3";
tab_id_menu[3]="menu4";
nbmenu=tab_id_menu.length;
//stocker 2ème libellé menu principal, pour titre menu
tab_lib_menu[0]="ACCUEIL";
tab_lib_menu[1]="LAMPES";
tab_lib_menu[2]="SAVOIR +";
tab_lib_menu[3]="CONTACT";
//stocker txt information à afficher pour un menu
tab_info_menu[0]="Bienvenue sur mon site";
tab_info_menu[1]="Découvrez mes dernières créations" ;
tab_info_menu[2]="Des informations sur mon environnement" ;
tab_info_menu[3]="Commander, contacter, Hit Parade" ;
//stocker identifiant sous menu 
tab_id_ssmenu[0]="ssmenu21";	//lampes classiques
tab_id_ssmenu[1]="ssmenu22";	//personnifiées
tab_id_ssmenu[2]="ssmenu23";	//pragmatiques
tab_id_ssmenu[3]="ssmenu31";	//liens utiles
tab_id_ssmenu[4]="ssmenu32";	//matière première
tab_id_ssmenu[5]="ssmenu33";	//hit parade
tab_id_ssmenu[6]="ssmenu41";	//commander
tab_id_ssmenu[7]="ssmenu42";	//contacter
tab_id_ssmenu[8]="ssmenu43";	//livre d'or
nbssmenu=tab_id_ssmenu.length;
//stocker libellé sous menu 
tab_lib_ssmenu[0]="Classiques";
tab_lib_ssmenu[1]="Personnifiées";
tab_lib_ssmenu[2]="Pragmatiques";
tab_lib_ssmenu[3]="Liens utiles";
tab_lib_ssmenu[4]="Matière première";
tab_lib_ssmenu[5]="Hit parade";
tab_lib_ssmenu[6]="Commander";
tab_lib_ssmenu[7]="Contacter";
tab_lib_ssmenu[8]="Livre d or";
//stocker txt information à afficher pour un sous menu
tab_info_ssmenu[0]="Les Les produits de la catégorie 1";
tab_info_ssmenu[1]="Les Les produits de la catégorie 2" ;
tab_info_ssmenu[2]="Les Les produits de la catégorie 3" ;
tab_info_ssmenu[3]="Les Les produits de la catégorie 4" ;


function debut_cadre(path_img)
	{
	// mise en forme du cadre
	document.writeln('<table width="100%" height="100%" border=1><tr><td valign=baseline>');
		// DIMENSIONS PAR DEFAUT pour la page
	document.writeln('<table width=900 height=500 align="center" valign="center" cellspan="0" cellpadding=0 border=0  cellspacing=0>');
	document.writeln('<tr><td height=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%"></td>');
	document.writeln('<td ></td></tr>');
	document.writeln('<tr><td ></td>');
	document.writeln('<td width="100%" height="100%">');	
	}
function debut_cadre2(path_img)
	{
	// mise en forme du cadre
	document.writeln('<table width="100%" height="100%" border=0><tr><td valign=baseline>');
		// DIMENSIONS PAR DEFAUT pour la page
	document.writeln('<table width=800 height=500 align="center" valign="center" cellspan="0" cellpadding=0 border=0  cellspacing=0>');
	document.writeln('<tr><td  background="'+path_img+tab_fond_cadre2[0]+'" height=10>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%" background="'+path_img+tab_fond_cadre2[1]+'">&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td  background="'+path_img+tab_fond_cadre2[2]+'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>');
	document.writeln('<tr><td height="100%" background="'+path_img+tab_fond_cadre2[3]+'" width=20>&nbsp;</td>');
	document.writeln('<td width="100%" height="100%">');	
	}
function init_htpage(path_img)
	{
	/* document.writeln('');	 */
	/* début du contenu */
	document.writeln('<TABLE border=0 valign="bottom" align="center" cellpadding="0" cellspacing="0"  width="850" height="500" background="'+path_img+tab_fond_cadre[4]+'">'); // COULEURS PAR DEFAUT DU FOND
	document.writeln('<TR><TD width="150" height="65" valign="center" align="center">');
	document.writeln('<a href="'+path_img+'index.htm" alt="Accès à la première page du site de Bamboucoco">');
	document.writeln('<IMG border =0 src="'+path_img+'images/deco/logo_bc.gif">');	//MISE EN PLACE LOGO DU SITE,
	document.writeln('</a></TD><TD><center>');
	document.writeln('<IMG border =0 src="'+path_img+'images/deco/titre_bc_jaune1.gif"><br>');	// MISE EN PLACE TITRE général pour chaque en-tête de page
	}
function barre_menu1()
	{//Mise en place barre de menu principale sous forme d'image avec effet et lien associés 
	//images menu stochés dans dossier IMAGES/DECO/MENU/
	//Utilise identifiant de chaque menu concaténé avec chiffre 1 ou 2 pour spécifié nom du fichier image (normal et italique)
	for (var i=0;i<tab_id_menu.length;i++)
		{
		if (i==nbmenu-1)
			{document.writeln('<A href="page/nbclickmenu.asp?menu_site='+tab_id_menu[i]+'" onmouseover="document.'+tab_id_menu[i]+'.src=\'images/deco/menu/'+tab_id_menu[i]+'2.gif\';affichBulle(\''+tab_info_menu[i]+'\');return(true);"  onmouseout="document.'+tab_id_menu[i]+'.src=\'images/deco/menu/'+tab_id_menu[i]+'1.gif\'; affichBulle(0);" ><img name="'+tab_id_menu[i]+'" src="images/deco/menu/'+tab_id_menu[i]+'1.gif" border=0>');}
		else
			{document.writeln('<A href="page/nbclickmenu.asp?menu_site='+tab_id_menu[i]+'" onmouseover="document.'+tab_id_menu[i]+'.src=\'images/deco/menu/'+tab_id_menu[i]+'2.gif\';affichBulle(\''+tab_info_menu[i]+'\');return(true);"  onmouseout="document.'+tab_id_menu[i]+'.src=\'images/deco/menu/'+tab_id_menu[i]+'1.gif\'; affichBulle(0);" ><img name="'+tab_id_menu[i]+'" src="images/deco/menu/'+tab_id_menu[i]+'1.gif" border=0></a><img src="images/deco/menu/barre2.gif">');}
		}
	document.writeln('</center>');
	}  
function barre_menu2()
	{
	for (var i=0;i<tab_id_menu.length;i++)
		{
		if (i==nbmenu-1)
			{document.writeln('<A href="nbclickmenu.asp?menu_site='+tab_id_menu[i]+'" onmouseover="colorover1(\''+tab_id_menu[i]+'\');affichBulle(\''+tab_info_menu[i]+'\');return(true);"  onmouseout="colorout1(\''+tab_id_menu[i]+'\'); affichBulle(0);" ><img name="'+tab_id_menu[i]+'" src="../images/deco/menu/'+tab_id_menu[i]+'1.gif" border=0></a>');}
		else
			{document.writeln('<A href="nbclickmenu.asp?menu_site='+tab_id_menu[i]+'" onmouseover="colorover1(\''+tab_id_menu[i]+'\');affichBulle(\''+tab_info_menu[i]+'\');return(true);"  onmouseout="colorout1(\''+tab_id_menu[i]+'\');affichBulle(0);" ><img name="'+tab_id_menu[i]+'" src="../images/deco/menu/'+tab_id_menu[i]+'1.gif" border=0></a><img src="../images/deco/menu/barre2.gif">');
			}				
		}
	document.writeln('</center>');
}  

function fin_htpage()
	{
	document.writeln('</center></TD><td width=40>&nbsp;&nbsp;</td></TR><TR><TD valign=top><center><br><br>');
	}
function ssmenugen(Objidmenu,Objidssmenu)
//***********************************
//*	MISE EN PLACE BARRE DE SOUS MENU*	
//***********************************
	{ //LIBELLE MENU : faire défiler la table des identifiants menu
		//			pour trouver l'index du menu sélectionné et l'utiliser
		//			pour récupérer le libellé dans la table des libellés menu, 
		//			puis stocker lib menu dans variable txt_titre_menu
	for (var i=0;i<nbmenu;i++)
		{
		if(tab_id_menu[i]==Objidmenu)
		{txt_titre_menu=tab_lib_menu[i];}
		}	
	//LIBELLE SOUS MENU : faire défiler la table des identifiants sous menu
	//					même traitements que ci dessus pour libellé menu
	for (var i=0;i<nbssmenu;i++)
		{
		if(tab_id_ssmenu[i]==Objidssmenu)
		{txt_titre_menu=txt_titre_menu+" / "+tab_lib_ssmenu[i];}
		}
	switch(Objidmenu)
	{ //sous menu spécifique selon Menu sélectionné
		case "INDEX":
			document.writeln('<br><br><br><br><br><p class="centrer">Réalisé par :');
			document.writeln('<br><a href="cv_alexandre_lorillon.htm" target="_blank">Alexandre</A>');
			document.writeln('<br>M.A.J.:&nbsp;14/03/08<br><br>');
			txt_titre_menu="Bienvenue sur le site de BambouCoco";	// TITRE DE LA PAGE INDEX.HTM, titre par défaut pour la première page du site <h1></h1>
			break;
		case "menu2": //lampes 
			document.writeln('<center><TABLE border=0 class=ssmenu id="sousmenu" cellspacing=10 >');
			document.writeln('<TR><TD class=defaut id=defaut2 ></TD></TR><TD>');
			for (var i=0;i<3;i++) // ATTENTION!!! INDIQUER LES INDEX DE LA PLAGE DE SOUS MENU CONCERNEES
				{document.writeln('<a href="nbclickssmenu.asp?menu_site='+Objidmenu+'&ssmenu_site='+tab_id_ssmenu[i]+'" onmouseover="colorover2(\''+tab_id_ssmenu[i]+'\');"  onmouseout="colorout2(\''+tab_id_ssmenu[i]+'\');"><img name='+tab_id_ssmenu[i]+' border=0 src="../images/deco/ssmenu/'+tab_id_ssmenu[i]+'1.gif"></a><br><img border=0 src="../images/deco/ssmenu/barre.gif"><br>');}			
			document.writeln('</td></tr></TABLE></center>');
			break;
		case "menu3": //savoir+
			document.writeln('<center><TABLE border=0 class=ssmenu id="sousmenu" cellspacing=10 >');
			document.writeln('<TR><TD class=defaut id=defaut2 ></TD></TR><TD>');
			for (var i=3;i<6;i++) // ATTENTION!!! INDIQUER LES INDEX DE LA PLAGE DE SOUS MENU CONCERNEES
				{document.writeln('<a href="nbclickssmenu.asp?menu_site='+Objidmenu+'&ssmenu_site='+tab_id_ssmenu[i]+'" onmouseover="colorover2(\''+tab_id_ssmenu[i]+'\');"  onmouseout="colorout2(\''+tab_id_ssmenu[i]+'\');"><img name='+tab_id_ssmenu[i]+' border=0 src="../images/deco/ssmenu/'+tab_id_ssmenu[i]+'1.gif"></a><br><img border=0 src="../images/deco/ssmenu/barre.gif"><br>');}						document.writeln('</td></tr></TABLE></center>');
			break;
		case "menu4": //contact
			document.writeln('<center><TABLE border=0 class=ssmenu id="sousmenu" cellspacing=10 >');
			document.writeln('<TR><TD class=defaut id=defaut2 ></TD></TR><TD>');
			for (var i=6;i<9;i++) // INDIQUER LES INDEX DE LA PLAGE DE SOUS MENU CONCERNEES
				{document.writeln('<a href="nbclickssmenu.asp?menu_site='+Objidmenu+'&ssmenu_site='+tab_id_ssmenu[i]+'" onmouseover="colorover2(\''+tab_id_ssmenu[i]+'\');"  onmouseout="colorout2(\''+tab_id_ssmenu[i]+'\');"><img name='+tab_id_ssmenu[i]+' border=0 src="../images/deco/ssmenu/'+tab_id_ssmenu[i]+'1.gif"></a><br><img border=0 src="../images/deco/ssmenu/barre.gif"><br>');}			
			// GESTION PARTICULIRE pour sous menu TCHAT, ouverture lien exterieur
			document.writeln('</td></tr></TABLE></center>');
			break;	
		default:  
			// document.writeln('<center><TABLE border=0 class=ssmenu id="sousmenu" cellspacing=10 >');
			// document.writeln('<TR><TD class=defaut id=defaut2 ></TD></TR><TD>');
			// for (var i=0;i<4;i++)
			// {document.writeln('<a href="nbclickssmenu.asp?idmenu='+Objidmenu+'&idssmenu='+tab_id_ssmenu[i]+'" onmouseover="colorover2(\''+tab_id_ssmenu[i]+'\');"  onmouseout="colorout2(\''+tab_id_ssmenu[i]+'\');"><img name='+tab_id_ssmenu[i]+' border=0 src="../images/deco/ssmenu/'+tab_id_ssmenu[i]+'1.gif"></a><br><img border=0 src="../images/deco/ssmenu/barre.gif"><br>');}			
			//document.writeln('</td></tr></TABLE></center>');
			break;
	}
	}	
function fin_ssmenu()
	{
	document.writeln('</center></TD>');
	document.writeln('<TD Valign="top" bgcolor="#ffffff">');
	}
function debut_cadre3(path_img)
	{
	// mise en forme du cadre
		// DIMENSIONS PAR DEFAUT pour la page
	document.writeln('<table align="center" valign="center" cellspan="0" cellpadding=0 border=0  cellspacing=0>');
	document.writeln('<tr><td height=1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%" background=""></td>');
	document.writeln('<td ></td></tr>');
	document.writeln('<tr><td ></td>');
	document.writeln('<td width="100%" height="100%">');	
	}
function debut_contenu()
	{
	document.writeln('<TABLE border=0  width="100%" ><TR><TD valign=top>');
//	document.writeln('<TABLE border=1 width="100%" cellpadding="3" ><tr ><td width="100%" height="100%" valign=top>');
//	document.writeln('<h2>'+txt_titre_menu+txt_titre_ssmenu+'</h2>')
	} 

function fin_contenu()
	{
	document.writeln('</td></tr></TABLE>');	 
	document.writeln('</TD><td width=20>&nbsp;&nbsp;</td></TR>');
	} 
function fin_contenu2()
	{
	document.writeln('</td></tr></TABLE>');
	document.writeln('</TD><td cellpading=5 valign="top" width=120><br><br><br><br>');
	}
function fin_ssmenu2()
	{
	document.writeln('</td></TR>');	
	}	
// *** PIED DE PAGE ***
function piedpage1(connecter)
	{//page index, à la racine
	document.writeln('<TR height="30"><TD align=center><a class="spe" href="javascript:infoecran();"><font color=black ><font size=2>©</font>opyright 2007</font></a></TD><TD>'); 
	document.writeln('<center><TABLE class="pied" cellspacing="2"><TR>');
	document.writeln('<TD><A class="spe" href="plan_site.htm">Plan<font color="#000000"> |</font></a></TD>');
	if (connecter=="OK")
		{document.writeln('<TD><A class="spe" href="page/deconnecter.asp">Se déconnecter<font color="#000000"> |</font></a></TD>');
		document.writeln('<TD><A class="spe" href="page/statistique.asp">Stat.<font color="#000000"> |</font></a></TD>');}
	else
		{	document.writeln('<TD><A class="spe" href="page/id_site.asp">V.I.P.<font color="#000000"> |</font></a></TD>');}
	document.writeln('<TD><A class="spe" href="page/nbclickssmenu.asp?menu_site=menu3&ssmenu_site=ssmenu33">Hit Parade<font color="#000000"> |</font></a></TD>');
	document.writeln('<TD><A class="spe" href="page/nbclickssmenu.asp?menu_site=menu4&ssmenu_site=ssmenu42"> Contact<font color="#000000"> |</font></a></TD>');
	document.writeln('<TD><a class="spe" href="javascript:favoris();"> Favoris<font color="#000000"> |</font></a></TD>');
	document.writeln('<TD><A class="spe" href="base/id_cms.htm">adm</a></TD>');	
	document.writeln('</TR></TABLE></center></TD><td width=20>&nbsp;&nbsp;</td></TR></TABLE>');
	}
function piedpage2(connecter)
	{//page contenu dans dossier PAGE
	document.writeln('<TR height="30"><TD align=center><a class="spe" href="javascript:infoecran();"><font color=black ><font size=2>©</font>opyright 2007</font></a></TD><TD>'); 
	document.writeln('<center><TABLE class="pied" cellspacing="2"><TR>');
	document.writeln('<TD><A class="spe" href="../plan_site.htm">Plan<font color="#000000"> |</font></a></TD>');
	if (connecter=="OK")
		{document.writeln('<TD><A class="spe" href="deconnecter.asp">Se déconnecter<font color="#000000"> |</font></a></TD>');
		document.writeln('<TD><A class="spe" href="statistique.asp">Stat.<font color="#000000"> |</font></a></TD>');}
	else
		{document.writeln('<TD><A class="spe" href="id_site.asp">V.I.P.<font color="#000000"> |</font></a></TD>');}
	document.writeln('<TD><A class="spe" href="nbclickssmenu.asp?info=services&menu_site=menu3&ssmenu_site=ssmenu33">Hit Parade<font color="#000000"> |</font></a></TD>');
	document.writeln('<TD><A class="spe" href="nbclickssmenu.asp?menu_site=menu4&ssmenu_site=ssmenu42"> Contact<font color="#000000"> |</font></a></TD>');
	document.writeln('<TD><a class="spe" href="javascript:favoris();"> Favoris<font color="#000000"> |</font></a></TD>');
	if (Int_nbvisiteur>1)
		{document.writeln('<TD><p class="spe">Il y a '+Int_nbvisiteur+' visiteurs connectés</TD>');}
	else
		{document.writeln('<TD><p class="spe">Vous ête seul sur le site...</TD>');}		
	document.writeln('</TR></TABLE></center></TD><td width=20>&nbsp;&nbsp;</td></TR></TABLE>');
	}

function fin_cadre(path_img)
	{
 	document.writeln('</td><td height="100%" background="'+path_img+tab_fond_cadre[5]+'" width=20>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>');
	document.writeln('<tr><td  background="'+path_img+tab_fond_cadre[6]+'" height=20>&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%"  background="'+path_img+tab_fond_cadre[7]+'">&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td background="'+path_img+tab_fond_cadre[8]+'">&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>');
	document.writeln('</td></tr></table>');
	}
function fin_cadre2(path_img)
	{
 	document.writeln('</td><td height="100%" background="'+path_img+tab_fond_cadre2[5]+'" width=20>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>');
	document.writeln('<tr><td  background="'+path_img+tab_fond_cadre2[6]+'" height=20>&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%"  background="'+path_img+tab_fond_cadre2[7]+'">&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td background="'+path_img+tab_fond_cadre2[8]+'">&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>');
	document.writeln('</td></tr></table>');
	}
function fin_cadre3()
	{
 	document.writeln('</td><td</td></tr>');
	document.writeln('<tr><td height=20>&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td width="100%"  >&nbsp;&nbsp;&nbsp;&nbsp;</td>');
	document.writeln('<td >&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>');
	}
function favoris(){browserName = navigator.appName;browserVer = parseInt(navigator.appVersion);if (browserName=="Microsoft Internet Explorer" && browserVer>=4){window.external.AddFavorite(location.href,'Bamboucoco');}}
function infoecran()
	{
	alert(" Ce site a été développé par Alexandre LORILLON \nLa navigation est optimisée pour Internet Explorer \nLa disposition et le nombre d'images sont adaptées selon la taille de votre écran \nVotre résolution est de " + screen.width + "x" + screen.height+"\nVotre navigateur est du type:\n "+navigator.appName +" "+VersionNav);
	}	

// GESTION COULEUR BARRE NAVIGATION PRINCIPALE
function colorover1(cel1)
	{
	if (jeton1!=cel1)
		{
		document.all[cel1].src="../images/deco/menu/"+cel1+"2.gif";
		}
	}
function colorout1(cel1)
	{
	if (jeton1!=cel1)
		{
		document.all[cel1].src="../images/deco/menu/"+cel1+"1.gif";
		}
	}
function img_chg(element,path_img,cel1)
{	 if (jeton!=cel1)
	{ document.img[1].src=path_img;}	
	//element.setAttribute("src", path_img);}	
}
function Colorchg1(cel1)
	{	 
		document.all[cel1].src="../images/deco/menu/"+cel1+"3.gif"; 
		jeton1=cel1; 
	}	
function colorover2(cel2)
	{
	if (jeton2!=cel2 )
		{
		document.all[cel2].src="../images/deco/ssmenu/"+cel2+"2.gif";
		}
	}	
function colorout2(cel2)
	{
	if (jeton2!=cel2 )
		{
		document.all[cel2].src="../images/deco/ssmenu/"+cel2+"1.gif";
		}
	}
function Colorchg2(cel2)
	{
		document.all[cel2].src="../images/deco/ssmenu/"+cel2+"3.gif";
		jeton2=cel2;
	}

function heurej()
	{
	var myDate = new Date();
	var heures=myDate.getHours();
	var minutes=myDate.getMinutes();
	if (heures<10)
		{heures="0"+heures}
	if (minutes<10)
		{minutes="0"+minutes}
	var result=(heures)+":"+(minutes);
	return result
	} 
function date_mmjj()
	{
	var myDate = new Date();
	var nbjour=myDate.getDate()
	var nbmois=myDate.getMonth()+1
	nbmois=nbmois*100
	var result=nbjour+nbmois
	return result
	}
function datej()
	{
	var myDate = new Date();
	var nbmois=myDate.getMonth()+1;
	if (nbmois<10)
		{nbmois="0"+nbmois}
	var result=myDate.getDate()+"/"+nbmois+"/"+myDate.getYear();
	return result
	}
function moisj()
	{
	var semaine= new Array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
	var mois = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre");
	var myDate = new Date();
	var result= mois[myDate.getMonth()]+" "+(myDate.getYear());
	window.defaultStatus=  "VISITEZ LA SELECTION DE "+result;
	document.writeln (result)
	}
function miseforme()
	{ 
	
	if(document.all['miseforme'].style.visibility=='visible')
		{document.all['miseforme'].style.visibility='hidden';}
	else
		{document.all['miseforme'].style.visibility='visible';}
	}

 function accessible(cms)
{
	switch(cms)
	{
		case 1:
		{
			document.fliste1.idmenu1.disabled=true;
			document.fliste1.idssmenu1.disabled=true;
			document.fliste1.motclef.disabled=true;
			break
		}
		case 2:
		{
			document.fliste1.idmenu1.disabled=false;
			document.fliste1.idssmenu1.disabled=true;
			document.fliste1.motclef.disabled=true;
			break
		}
		case 3:
		{
			document.fliste1.idmenu1.disabled=true;
			document.fliste1.idssmenu1.disabled=false;
			document.fliste1.motclef.disabled=true;
			break
		}
		case 4:
		{
			document.fliste1.idmenu1.disabled=true;
			document.fliste1.idssmenu1.disabled=true;
			document.fliste1.motclef.disabled=false;
			break
		}
		default:
		{
			alert ("problème");
		}
	}
}
                   // PARAMETRES MODIFIABLES
var delaiAffBull = 100
var delaiAffStat = 900
var autoEffBull  = 9000
var delaiEffBull = 200
var delaiEffStat = 200
var DecalVertic  = 16
var DecalHoriz   = 6
var TailleText   = 'font-size: 11px'  
var PolicText    = 'Tahoma,Arial'     
var CouleurTexte = '#494B5D'          
var CouleurFond  = '#FDF1B0'          
var CouleurBord  = '#786654'
var CouleurOmbr  = '#000000'


                  // PARAMETRES A NE PAS MODIFIER
var AffichBull=setTimeout('document.getElementById("infoBull").style.visibility = "visible";document.getElementById("ombrBull").style.visibility = "visible"',delaiAffBull);
clearTimeout(AffichBull);
var EffacBull=setTimeout('Vt=2;effacem()',delaiEffBull);
clearTimeout(EffacBull);
var EffacAutoBull=setTimeout('Vt=1;effacem();window.status=""',autoEffBull);
clearTimeout(EffacAutoBull);
var tempo=setTimeout('if(Vt==1)Opac=Opac-3;OpacOmbr=OpacOmbr-3;if(Vt==2)Opac=Opac-8;OpacOmbr=OpacOmbr-8;effacem()',Vitess/1000);
clearTimeout(tempo);
var AffStat=setTimeout('window.status=textBull',delaiAffStat);
clearTimeout(AffStat);

                  // DECLARATIONS
var textBull     = '';
var Vitess       = 1;
var Opac         = 500;
var OpacOmbr     = 20;
var Opac_2       = 10;
var Opac_2Ombr   = .2;
var Vt           = 1;
var EffB         = 0;
var larg_ecran_B = 0;
var haut_ecran_B = 0;
var Long         = 0;
var limiteH      = 0;
var limiteV      = 0;
var retourB      = 0;
var PosHoriz     = 0;
var PosVertic    = 0;
var PosBullHoriz = 0;
var PosBullVerti = 0;
var scrollPag    = 0;
var limiteBull   = 0;

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(navigator.appName.substring(0,3) == "Net")
	document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;                                            // Capture de la position de la souris

function get_mouse(e){                                                       // Transfert de la position de la souris
	x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
	y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
	    PosBullHoriz = x;
            PosBullVerti = y;
}

function affichBulle(Bull){                                                  // Affichage de la bulle
        larg_ecran_B = document.body.clientWidth;                            // Recadrage dans l'écran
        haut_ecran_B = document.body.clientHeight;
        scrollPag = document.body.scrollTop;
        if (ie4)Long = (Bull.length * (60 / 13)) + 26; 
        if (ns6)Long = (Bull.length * (60 / 13)) + 50;                       // (50) A adapter selon de la police 
        limiteH = PosBullHoriz + Long + DecalHoriz;
        limiteV = scrollPag + haut_ecran_B;
        retourB = limiteH - larg_ecran_B;
        PosHoriz = PosBullHoriz + DecalHoriz;
        PosVertic = PosBullVerti + DecalVertic;
        limiteBull = PosBullVerti + 30;
        if (limiteH > larg_ecran_B)PosHoriz = PosHoriz - retourB;
        if (limiteBull > limiteV)PosVertic = PosVertic - 40;
        if (Bull == 0){                                                      // Test de la présence du texte
        clearTimeout(AffichBull);
        clearTimeout(EffacAutoBull);
        clearTimeout(AffStat);
        EffacBull=setTimeout('Vt=2;effacem()',delaiEffBull);
        setTimeout('ChxLien=0',300);
        }
        else if (Bull != 0){var textBull = Bull;                             // Récuperation du texte
        if (document.getElementById){document.getElementById("infoBull").style.visibility = "hidden";document.getElementById("ombrBull").style.visibility = "hidden";}
        Opac = 100;OpacOmbr = 20
var cadreBull = '<table border="1" cellpadding="0" cellspacing="0"'+         // Cadre de la bulle
                ' style="border:1px solid '+CouleurBord+'; border-collapse: collapse; font-family: '+PolicText+'; '+TailleText+'; color: '+CouleurTexte+'; margin-left: 8; filter: alpha(opacity='+Opac+'); -moz-opacity: '+Opac_2+'"><tr><td style="border-style:solid; border-width:1px; margin-left: 8;" bgcolor="'+CouleurFond+'" bordercolor="'+CouleurBord+'" Width=><nobr>&nbsp; '+textBull+' &nbsp;</nobr></td></tr></table>'
var ombreBull = '<table border="0" cellpadding="0" cellspacing="0"'+         // Ombre de la bulle
                ' style="border:0px solid '+CouleurBord+'; border-collapse: collapse; font-family: '+PolicText+'; '+TailleText+'; color: '+CouleurTexte+'; margin-left: 8; filter: alpha(opacity='+OpacOmbr+'); -moz-opacity: '+Opac_2Ombr+'"><tr><td style="border-style:solid; border-width:0px; margin-left: 8;" bgcolor="'+CouleurOmbr+'" bordercolor="'+CouleurBord+'" Width=><nobr>&nbsp; '+textBull+'&nbsp;</nobr></td></tr></table>'

        if ((document.getElementById) && (document.getElementById("infoBull").style.visibility != "visible")){
            document.getElementById("infoBull").innerHTML = cadreBull;      // Affichage du cadre avec le texte 
            document.getElementById("ombrBull").innerHTML = ombreBull;
            AffichBull=setTimeout('document.getElementById("infoBull").style.visibility = "visible";document.getElementById("ombrBull").style.visibility = "visible"',delaiAffBull);
            document.getElementById("infoBull").style.top = PosVertic;      // position verticale
            document.getElementById("infoBull").style.left = PosHoriz;      // Position horizontale
            document.getElementById("ombrBull").style.top = PosVertic + 5;  // position verticale
            document.getElementById("ombrBull").style.left = PosHoriz + 8;  // Position horizontale
            EffacAutoBull=setTimeout('Vt=1;effacem();window.status=""',autoEffBull);
            clearTimeout(EffacBull);
            }
        }
        afftextStat(Bull);                                                  // Transfert du texte pour la barre de status
}

function afftextStat(text){                                                 // Affichage du texte de la barre de status
        if(text != 0){textBull = text;
        AffStat=setTimeout('window.status=textBull',delaiAffStat)}
        else {setTimeout("window.status=''",delaiEffStat)}
}

function effacem(){
var cadreBull = '<table border="1" cellpadding="0" cellspacing="0"'+        // Cadre de la bulle
                ' style="border:1px solid '+CouleurBord+'; border-collapse: collapse; font-family: '+PolicText+'; '+TailleText+'; color: '+CouleurTexte+'; margin-left: 8; filter: alpha(opacity='+Opac+'); -moz-opacity: '+Opac_2+'"><tr><td style="border-style:solid; border-width:1px; margin-left: 8;" bgcolor="'+CouleurFond+'" bordercolor="'+CouleurBord+'" Width=><nobr>&nbsp; '+textBull+' &nbsp;</nobr></td></tr></table>'
var ombreBull = '<table border="0" cellpadding="0" cellspacing="0"'+        // Ombre de la bulle
                ' style="border:0px solid '+CouleurBord+'; border-collapse: collapse; font-family: '+PolicText+'; '+TailleText+'; color: '+CouleurTexte+'; margin-left: 8; filter: alpha(opacity='+OpacOmbr+'); -moz-opacity: '+Opac_2Ombr+'"><tr><td style="border-style:solid; border-width:0px; margin-left: 8;" bgcolor="'+CouleurOmbr+'" bordercolor="'+CouleurBord+'" Width=><nobr>&nbsp; '+textBull+'&nbsp;</nobr></td></tr></table>'

        document.getElementById("infoBull").innerHTML = cadreBull
        document.getElementById("ombrBull").innerHTML = ombreBull
        if (ie4) tempo=setTimeout('if(Vt==1)Opac=Opac-3;OpacOmbr=OpacOmbr-3;if(Vt==2)Opac=Opac-8;OpacOmbr=OpacOmbr-8;effacem()',Vitess/1000)
        else {document.getElementById("infoBull").innerHTML = "";document.getElementById("ombrBull").innerHTML = "";}           // A vous d'adapter l'éffacement en douceur pour Netscape, Firefox, etc...
        if (Opac <= 0) {
        clearTimeout(tempo)
        document.getElementById("infoBull").innerHTML = ""
        document.getElementById("ombrBull").innerHTML = ""
        }
}

document.write('<DIV id=infoBull STYLE="position: absolute;z-Index:10"></DIV><DIV id=ombrBull STYLE="position: absolute;z-Index:9"></DIV>')

