/*************************************/
/*        MENU TRANSVERSAL           */
/*************************************/
var button = new Array();

 button[0] = new Array();
 button[0]["texte"] = "MENTIONS&nbsp;LEGALES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 button[0]["lien"] = "../internet/transv.php?id=mention"; 
 button[0]["cible"] = "_self";
 
 button[1] = new Array();
 button[1]["texte"] = "CONTACT";
 button[1]["lien"] = "../internet/transv.php?id=contact"; 
 button[1]["cible"] = "_self";
 
 button[2] = new Array();
 button[2]["texte"] = "ADHESION";
 button[2]["lien"] = "../internet/transv.php?id=adhesion"; 
 button[2]["cible"] = "_self"; 
 
 button[3] = new Array();
 button[3]["texte"] = "PLAN DU SITE";
 button[3]["lien"] = "../internet/transv.php?id=plan"; 
 button[3]["cible"] = "_self";  

 button[4] = new Array();
 button[4]["texte"] = "RECHERCHE";
 button[4]["lien"] = "../internet/transv.php?id=search"; 
 button[4]["cible"] = "_self";   

 button[5] = new Array();
 button[5]["texte"] = "LIENS";
 button[5]["lien"] = "../internet/transv.php?id=link"; 
 button[5]["cible"] = "_self";   

/******************************************************************************************/ 
/* ELEMENTS DU BANDEAU */
var visuel = new Array(); 
 visuel[0] = new Array("oeil_1.jpg","visu0_1.jpg","visu0_2.jpg","visu0_3.jpg");
 visuel[1] = new Array("visu1_0.jpg","oeil_2.jpg","visu1_2.jpg","visu1_3.jpg");
 visuel[2] = new Array("visu2_0.jpg","visu2_1.jpg","oeil_3.jpg","visu2_3.jpg");
 visuel[3] = new Array("visu3_0.jpg","visu3_1.jpg","visu3_2.jpg","oeil_4.jpg");

/******************************************************************************************/
/* format button barre transversale */
var bf1 = new String("<TD VALIGN='middle' WIDTH=100 ALIGN='center'><A HREF='<!--lien//-->' target='<!--cible//-->' class='texte'><!--texte//--></A></TD>\n");
if(document.layers)
{
        var bf2off = new String("<TD VALIGN='middle' WIDTH=120 HEIGHT=24  BGCOLOR='#337CCB'><span class=menuItem><A HREF='<!--lien//-->' target='<!--cible//-->' class='txtblanc'><!--texte//--></A></span></TD>\n");
}        
else
{
        var bf2off = new String("<TD VALIGN='middle' WIDTH=120 HEIGHT=24  BGCOLOR='#337CCB' onMouseOver='this.style.cursor=\"hand\"; this.style.backgroundColor=\"#005BBF\";' onMouseOut='this.style.backgroundColor=\"#337CCB\";' onClick='self.location=\"<!--lien//-->\"'><span class=menuItem><A HREF='<!--lien//-->' class='txtblanc'><!--texte//--></A></span></TD>\n");
}        
var bf2on = new String("<TD VALIGN='middle' WIDTH=120 HEIGHT=24 BGCOLOR='#005BBF'><span class=menuItem><A HREF='<!--lien//-->' target='<!--cible//-->' class='txtblanc'><!--texte//--></A></span></TD>\n");  

function buildButton(t,s)
{
        var lt = t;
//        var tmpTag = null;
        switch(s)
        {
                case 0 :        /*  barre transversale du haut */
                        var str = new String(bf1);
                        break;
                case 1 :        /*  barre menu global */
                        if(t.identity == CurrentRub)
                                var str = new String(gfon);
                        else
                                var str = new String(gfoff);                        
                        break;    
                case 2 :        /*  barre menu gauche */
                       if(t.identity == CurrentPage)
                                var str = new String("<TR>"+bf2on+"</TR>");
                        else
                                var str = new String("<TR>"+bf2off+"</TR>");
                        break;                            
        }
        
        for(prop in lt)
        {
                eval("tmpTag = /<!--"+prop+"\\/\\/-->/g");       
                str = str.replace(tmpTag,lt[prop]);
        }
        return str;
}



function BarreTrans()
{
        this.tag = new String("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n<TR VALIGN='middle'>");
        this.htm = new String("");
        
        this.init = initObj;
        this.build = createBT;        
}

function createBT(t)
{
        for(var i=0;i<t.length;i++)
        {                
                this.tag += buildButton(t[i],0);        
                if(i<(t.length-1))
                this.tag += "<TD class='txtgris' ALIGN='center'><IMG SRC='"+zePath+"/commun/images/imgrd/px_noir.gif' WIDTH=1 HEIGHT=12></TD>";
        }
        this.tag += "</TR></TABLE>";
}

function initObj()
{
        document.open("text/html");
        document.write(this.tag);
        document.close();
}

var zeTrans = new BarreTrans();
    zeTrans.build(button);
    
/********************************/
function GlobalBarre()
{
        this.tag = new String("<TABLE BORDER=0 BGCOLOR='#000000' WIDTH=560 CELLPADDING=0 CELLSPACING=0>\n<TR VALIGN='middle'><TD><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1>\n<TR VALIGN='middle' BGCOLOR='#636F7D'>");
        this.htm = new String("");
        
        this.init = initObj;
        this.build = createGT;        
}

function createGT(t)
{
        for(var i=0;i<t.length;i++)
                this.tag += buildButton(t[i],1);        
        this.tag += "</TR></TABLE></TD></TR></TABLE>";
}

/********************************/

function swapLeftBarre(id,col)
 {
 	if(document.layers)
 		document.layers["NS"+id].bgColor= col;
	else
 		document.all[id].style.backgroundColor = col; 	 		
 } 

function LeftBarre(n)
{
        this.name=new String(n);
        this.colorOn=new String("red");
        this.colorOff=new String("orange");
        this.tag = new String("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n<TR HEIGHT=20 VALIGN='middle'><TD><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1>\n");
        this.htm = new String("");
        
        this.init = initObj;
        this.build = createLT;        
}


function createLT(t)
{
        if(this.name!="admin")
        {
                this.tag+= "<TR><TD BGCOLOR='#000000'><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH=100% HEIGHT=100%>\n<TR>\n<TD VALIGN='bottom' BGCOLOR='#005BBE' class='txtblancb'>";        
                this.tag+= "<IMG SRC='"+zePath+"/commun/images/imgrd/corner_blue.gif' HSPACE=3>"+t[0].texte+"";        
                this.tag+= "</TD>\n</TR>\n</TABLE>\n";        
                this.tag+= "</TD></TR>\n";
                for(var i=1;i<t.length;i++)
                {
                        this.tag += buildButton(t[i],2);
//                        this.tag += "</TD></TR>"; 
                }       
                this.tag += "</TABLE>\n</TD></TR>\n</TABLE>\n";
        }
       else
        {
               for(var i=0;i<t.length;i++)
                        this.tag += buildButton(t[i],2); 
                this.tag += "</TABLE>\n</TD></TR>\n</TABLE>\n";
        }
}
  
  
