﻿// JScript File



            /*
                 Initialize and render the MenuBar when its elements are ready 
                 to be scripted.
            */

            YAHOO.util.Event.onContentReady("ScheragoMenu", function () {

                /*
					Instantiate a MenuBar:  The first argument passed to the constructor
					is the id for the Menu element to be created, the second is an 
					object literal of configuration properties.
                */

                var oMenuBar = new YAHOO.widget.MenuBar("ScheragoMenu", { 
                                                            autosubmenudisplay: true, 
                                                            hidedelay: 750, 
                                                            lazyload: true });

                /*
                     Define an array of object literals, each containing 
                     the data necessary to create a submenu.
                */

                var aSubmenuData = [
                  
                   {
                        id: "Home", 
                        itemdata: []
                        },
                          {
                        id: "About", 
                        itemdata: []
                        },

                    {
                        id: "Meetings", 
                        itemdata: [
                          
                            {
                                text: "AACC • American Association for Clinical Chemistry", 
                                submenu: { 
                                            id: "aacc", 
                                            itemdata: [
                                                { text: "Clinical Lab Expo - July 26-28, 2011 - Atlanta, GA", url: "http://www.scherago.com/cle/" },
                                            
                                            ] 
                                        }
                            
                            },   
                            
                            {
                                text: "ENDO Expo • The Endocrine Society", 
                                submenu: { 
                                            id: "endo", 
                                            itemdata: [
                                                { text: "ENDO 2011 - June 4-7, 2011 - San Diego, CA", url: "http://www.scherago.com/endocrine/AnnualMeeting.htm" },
                                                
                                            ] 
                                        }
                            
                            }, 
                            
                               {
                                text: "PAG • Plant & Animal Genome Conference", 
                                submenu: { 
                                            id: "pag", 
                                            itemdata: [
                                                { text:  "PAG XIX - January 15-19, 2011 - San Diego, CA", url: "pag.html" },
                                               
                                            ] 
                                        }
                            
                            }, 
                            
                                
                             {
                                text: "Arab Health/MEDLAB-Dubai" , 
                                submenu: { 
                                            id: "medlab", 
                                            itemdata: [
                                                { text:  "MEDLAB-Dubai Expo - January 24-27, 2011 - Dubai, UAE", url: "medlab.html" },
                                               
                                            ] 
                                        }
                            
                                                      
                            },  
                             
                            
                             {
                                text: "PABME • Pharmaceutical Manufacturing and Biotechnology Middle East" , 
                                submenu: { 
                                            id: "pabme", 
                                            itemdata: [
                                                { text:  "Pharmaceutical Manuf. and Biotechnology Middle East - May 23-25, 2010 - Dubai, UAE", url: "pabme.html" },
                                            ] 
                                        }
                            
                            },  
                            
                            {
                                text: "CMEF • China International Medical Equipment Fair" , 
                                submenu: { 
                                            id: "cmef", 
                                            itemdata: [
                                                { text:  "China International Medical Equipment Fair (Fall Edition) - October 12-15, 2010 - Shenyang, China", url: "http://www.scherago.com./cmef-ivd" },
                                            ] 
                                        }
                            
                            },  
                        ]    
                    },
                    
                    {
                        id: "Publications", 
                        itemdata: [
                            {
                                text: "AACC • American Association for Clinical Chemistry", 
                                submenu: { 
                                            id: "aacc", 
                                            itemdata: 
                                            [
                                                { text: "Clinical Laboratory News (CLN)", url: "http://www.scherago.com/cln/cln.html" },
                                                { text: "Clinical Chemistry (CC)", url: "http://www.scherago.com/ccj/ccj.html" },
                                                { text: "Lab Tests Online (LTO)", url: "aacc.html" },
                                                { text: "Insertion Order Form", url: "http://www.scherago.com/cgi/resformAACC.shtml" },
  						
                                            ] 
                                        }
                            },  
                            
                              {
                                text: "ASN • American Society of Nephrology" , 
                                submenu: { 
                                            id: "asn", 
                                            itemdata: 
                                            [
                                                { text: "Journal of the American Society of Nephrology (JASN)", url: "http://www.scherago.com/asn/" },
                                                { text: "Clinical Journal of the American Society of Nephrology (CJASN)", url: "http://www.scherago.com/asn/" },
						{ text: "ASN Kidney News", url: "http://www.scherago.com/asn/" },
						{ text: "Nephrology Self-Assesment program (NephSAP)", url: "http://www.scherago.com/asn/" },
                                                { text: "Insertion Order Form", url: "http://www.scherago.com/cgi/resformJASN.shtml" },
                                            ] 
                                        }
                            },  
                            
                           {
                                
                                text: "The Endocrine Society", 
                                  submenu: { 
                                            id: "endopubs", 
                                            itemdata: 
                                            [
                                                { text: "Journal of Clinical Endocrinology and Metabolism (JCEM)", url: "http://www.scherago.com/endocrine/Advertise.htm" },
                                                { text: "Endocrine Reviews", url: "http://www.scherago.com/endocrine/Advertise.htm"},
 						{ text: "Endocrine News (EN)", url: "http://www.scherago.com/endocrine/Advertise.htm"}, 
						{ text: "Endocrinology", url: "http://www.scherago.com/endocrine/Advertise.htm"}, 
						{ text: "Molecular Endocrinology", url: "http://www.scherago.com/endocrine/Advertise.htm"}, 
						{ text: "Meeting & Exhibit Guide", url: "http://www.scherago.com/endocrine/Advertise.htm"}, 
						{ text: "Insertion Order Form", url: "http://www.scherago.com/cgi/resformENDO.shtml" },      
                            		    ]	
					}
				},  
                                
                        ] 
                    },
                    
                    {
                        id: "Contact",
                        itemdata: [ ]
                    }                    
                ];


                /*
                     Subscribe to the "beforerender" event, adding a submenu 
                     to each of the items in the MenuBar instance.
                */

                oMenuBar.subscribe("beforeRender", function () {

					var nSubmenus = aSubmenuData.length,
						i;


                    if (this.getRoot() == this) {

						for (i = 0; i < nSubmenus; i++) {
						    
						    if(aSubmenuData[i].itemdata != "")
						    {
                        	this.getItem(i).cfg.setProperty("submenu", aSubmenuData[i]);
                        	}
						}

                    }

                });


                /*
                     Call the "render" method with no arguments since the 
                     markup for this MenuBar instance is already exists in 
                     the page.
                */

                oMenuBar.render();         
            
            });

 