// JavaScript Document
     var intCount = 0;
    

            //-Fonction d'ajout d'entrées principales-------------------------
            function DynamicMenu_addParent(strName,strAlt) {
                var strID = 'P_' + strName; 
                var strTemp = '<DIV id="'+strID+'" CLASS="parent">';
                strTemp += '<IMG SRC="../../images/menu_dyn/' + iconeLeft + '" Height="18" border="0"><a id="'+strID+'" onclick="expandCollapse(document.getElementById(this.id));" href="javascript:void(0)">' ;
                strTemp += '<IMG SRC="../../images/menu_dyn/' + strName + '" alt="'+strAlt+'" Height="20" border="0"></a>';
                strTemp += '<DIV STYLE="display: none" CLASS="child"></DIV>';
                strTemp += '</DIV>';

                this.div.innerHTML += strTemp;
                this.currentChild = document.getElementById(strID);
            }
         
            //-Fonction d'ajout d'entrées principales avec lien direct-------------------------
            function DynamicMenu_addGrandParent(strName,strURL,strAlt) {
                var strID = 'P_' + strName;
                var strTemp = '<DIV ALIGN="LEFT" CLASS="parent"><A HREF="' + strURL + '"'
                strTemp += ' onClick="cancelBubble(arguments[0]);">' 
                strTemp += '<IMG SRC="../../images/menu_dyn/' + iconeLeft + '" border="0" Height="18">'
                strTemp += '<IMG SRC="../../images/menu_dyn/' + strName + '.gif" alt="' + strAlt + '" border="0" Height="20">' + '</A></DIV>';
                strTemp += '<DIV STYLE="display: none" CLASS="child"></DIV>';
                strTemp += '</DIV>';

                this.div.innerHTML += strTemp;
                this.currentChild = document.getElementById(strID);
            }
         
            //-Fonction d'ajout des sous entrées principales-------------------------
            function DynamicMenu_addSousParent(strName) {
                var strID = 'S_' + strName; 
                var strTemp = '<DIV ID="' + strID + '"CLASS="parent"';
                strTemp += ' onClick="expandCollapse(this);">';
                strTemp += '<IMG SRC="../../images/menu_dyn/' + iconeLeft + '" Height="18">';
                strTemp += '<IMG SRC="../../images/menu_dyn/' + strName + '.gif" Height="20">';
                strTemp += '<DIV STYLE="display: none" CLASS="child"></DIV>';
                strTemp += '</DIV>';

                if (document.all) {
                    this.currentChild.children[1].innerHTML += strTemp;
                } else {
                    this.currentChild.childNodes[2].innerHTML += strTemp;
                }
            
                this.currentChild = document.getElementById(strID);
            }
         
            //-Fonction d'ajout d'un frere a une sous entré-------------------------
            function DynamicMenu_addFrere(strName,strName2) {
                var strID = 'S_' + strName; 
                var strTemp = '<DIV ID="' + strID + '"CLASS="parent"';
                strTemp += ' onClick="expandCollapse(this);">';
                strTemp += '<IMG SRC="../../images/menu_dyn/' + iconeLeft + ' "Height="18">';
                strTemp += '<IMG SRC="../../images/menu_dyn/' + strName + '.gif" Height="20">';
                strTemp += '<DIV STYLE="display: none" CLASS="child"></DIV>';
                strTemp += '</DIV>';

            this.currentChild = document.getElementById(strName2)
                if (document.all) {
                    this.currentChild.children[1].innerHTML += strTemp;
                } else {
                    this.currentChild.childNodes[2].innerHTML += strTemp;
                }
            
                this.currentChild = document.getElementById(strID);
            }


            //-Fonction d'ajout de liens dans le menu-------------------------
            function DynamicMenu_addChild(strName,strURL,strAlt) {
                var strTemp = '<DIV ALIGN="LEFT"><A HREF="' + strURL + '" CLASS="child"'
                            + ' onClick="cancelBubble(arguments[0]);">' 
                            + '<IMG SRC="../../images/menu_dyn/'+strName+'.gif" alt="' + strAlt + '" border="0" Height="15">' + '</A></DIV>';

                if (document.all) {
                    this.currentChild.children[2].innerHTML += strTemp;    // Explorer
                } else {
                    this.currentChild.childNodes[2].innerHTML += strTemp;  // Netscape, Firefox
                }
            
            }

            //-inhibe la cascade d'évènements au DIV conteneur----------------
            function cancelBubble(netEvent) {
                if (document.all) {
                    window.event.cancelBubble = true;
                } else {
                    netEvent.cancelBubble = true;
                }
            }

            //-Contracte ou expanse le menu-----------------------------------
            function expandCollapse(objElement) {

            var strId = objElement.id;
            if (intCount == 0) {
                   if (document.all) {                          //Explorer
                       var imgIcon = objElement.children[0];
                       objElement = objElement.children[2];
                   } else {
                       var imgIcon = objElement.childNodes[0];  // Netscape, Firefox
                       objElement = objElement.childNodes[2];
                   }    
   
                   if (objElement.style.display == "none") {  
                       objElement.style.display = "block" ;
                      imgIcon.src = "../../images/menu_dyn/"+iconeBottom;
                   } else {
                       objElement.style.display = "none" ;
                       imgIcon.src = "../../images/menu_dyn/"+iconeLeft;
                   }
               
            }
                        
            if (strId.substring(0,1) == 'S') {
               intCount = 1;
            }

            if (strId.substring(0,1) == 'P' && intCount == 1) {
               intCount = 0;
            }
         
            }

            //-Fonction de création de menu dynamique------------------------- 
            function DynamicMenu(strName) {
                //var id = "Menu" + intCount++;
                var id = strName;
                document.write('<DIV Id="' + id + '"></DIV>');

                this.div = document.getElementById(id);
                this.currentChild = null;

                this.addParent = DynamicMenu_addParent;
                this.addGrandParent = DynamicMenu_addGrandParent;
                this.addSousParent = DynamicMenu_addSousParent;
                this.addFrere = DynamicMenu_addFrere;
                this.addChild = DynamicMenu_addChild;
            }