            //var intCount = 0;


            //-Fonction d'ajout d'entrées principales-------------------------
            function DynamicMenu_addParent(strName,strURL,posleft,postop) {
                var strID = 'ID' + intCount++; 

                var strTemp = '<DIV ID="' + strID + '" CLASS="parent" style="position:absolute;left:' + posleft + ';top:' + postop + '"';
                strTemp += ' onMouseOver="Expand(this);" onMouseOut="Collapse(this);" onClick="cancelBubble(arguments[0]);">';
                //strTemp += ' onMouseOver="Expand(this);" onMouseOut="Collapse(this);" onClick="cancelBubble(arguments[0]);>';
                //strTemp += '<IMG SRC="Graphics/left.gif" width="1" Height="12">';
                strTemp += '<A CLASS="parent" HREF="' + strURL + '">' + strName + '</A>';
                //strTemp += strName;
                strTemp += '<DIV STYLE="display: none" CLASS="child"></DIV>';
                strTemp += '</DIV>';

                this.div.innerHTML += strTemp;
                this.currentChild = document.getElementById(strID);
            };

            //-Fonction d'ajout de liens dans le menu-------------------------
            function DynamicMenu_addChild(strName,strURL) {
                var strTemp = '<TR><TD class="child"><A CLASS="child" HREF="' + strURL + '"'
                            + ' onClick="cancelBubble(arguments[0]);">' 
                            + strName + '</A><BR></TD></TR>';

                if (document.all) {
                    this.currentChild.children[1].innerHTML += strTemp;
                } else {
                    this.currentChild.childNodes[1].innerHTML += strTemp;
                }
            };

            //-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) {
                if (document.all) {
                    //var imgIcon = objElement.children[0];
                    objElement = objElement.children[1];
                } else {
                    //var imgIcon = objElement.childNodes[0];
                    objElement = objElement.childNodes[1];
                }    

                if (objElement.style.display == "none") {  
                    objElement.style.display = "block" ;
                    //imgIcon.src = "Graphics/bottom.gif" ;
                } else {
                    objElement.style.display = "none" ;
                    //imgIcon.src = "Graphics/left.gif" ;
                }
            };


            //-Contracte ou expanse le menu-----------------------------------
            function Expand(objElement) {
                if (document.all) {
                    //var imgIcon = objElement.children[0];
                    objElement = objElement.children[1];
                } else {
                    //var imgIcon = objElement.childNodes[0];
                    objElement = objElement.childNodes[1];
                }    

                objElement.style.display = "block" ;
            };


            //-Contracte ou expanse le menu-----------------------------------
            function Collapse(objElement) {
                if (document.all) {
                    //var imgIcon = objElement.children[0];
                    objElement = objElement.children[1];
                } else {
                    //var imgIcon = objElement.childNodes[0];
                    objElement = objElement.childNodes[1];
                }    

                objElement.style.display = "none" ;
            };

            //-Fonction de création de menu dynamique------------------------- 
            function DynamicMenu() {
                var id = "Menu" + intCount++;
                document.write('<DIV Id="' + id + '"></DIV>');

                this.div = document.getElementById(id);
                this.currentChild = null;

                this.addParent = DynamicMenu_addParent;
                this.addChild = DynamicMenu_addChild;
            };

function BuildMenu(path){
            var menu = new DynamicMenu();
	    path="http://www.agri02.com/ja02/pages/";

            menu.addParent("Qui sommes-nous?",path+"qui_sommes_nous/missions.php",295,120);
                menu.addChild("Nos Missions",path+"qui_sommes_nous/missions.php");
                menu.addChild("Organisation",path+"qui_sommes_nous/organisation.php");
                menu.addChild("Les responsables cantonaux et départementaux",path+"qui_sommes_nous/responsables.php");

            menu.addParent("Informer",path+"informer/communication.php",423,120);
                menu.addChild("Communication",path+"informer/communication.php");
                menu.addChild("Installation",path+"informer/installation.php");
                //menu.addChild("Lait",path+"informer/lait.php");
                //menu.addChild("Viande bovine",path+"informer/viande_bovine.php");
                menu.addChild("Développement",path+"informer/developpement.php");
                //menu.addChild("Echo des cantons",path+"informer/echo_cantons.php");

            menu.addParent("Découvrir",path+"decouvrir/decouvrir.php",512,120);
                menu.addChild("Visite d\'exploitation",path+"decouvrir/decouvrir.php");
                menu.addChild("Village Gourmand",path+"decouvrir/village_gourmand.php");
                //menu.addChild("Fête paysanne",path+"decouvrir/fete_paysanne.php");

            menu.addParent("Partenaires",path+"partenaires/liste_partenaires.php",606,120);

            menu.addParent("Espace adhérent",path+"espace_adherent/index.php",697,120);

};


function ouvrirPage(page,t,l,w,h){
  window.open(page,"","toolbar=0,menubar=0,scrollbars=1,resizable=0,location=0,directories=0,top="+t+",left="+l+",width="+w+",height="+h);
};



