
	if (DropDown.isSupported()) {
        
		//==================================================================================================
		// create a set of dropdowns
		//==================================================================================================
		// the first param should always be down, as it is here
		//
		// The second and third param are the top and left offset positions of the menus from their actuators
		// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
		// something like -5, 5
		//
		// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
		// of the actuator from which to measure the offset positions above. Here we are saying we want the 
		// menu to appear directly below the bottom left corner of the actuator
		//==================================================================================================
		var ms = new DropDownSet(DropDown.direction.down, 0, 0, DropDown.reference.bottomLeft);
                                                        //x , y    
		//==================================================================================================
		// create a dropdown menu
		//==================================================================================================
		// the first parameter should be the HTML element which will act actuator for the menu
		//==================================================================================================
		var topLevelIds = new Array(12,13,14,15,16)
		
		for(index=1; index <= topLevelIds.length; index++){
			
			if (typeof subNavFileName[index] != "undefined"){
				
	    		
				if(subNavFileName[index].length>0){
					eval("var menu" + index + " = ms.addMenu(document.getElementById(\"menu" + index + "\"));")
					for(j=0;j<subNavFileName[index].length;j++){
						
						if(subNavInNav[index][j] == "1"){
						
						//second levels
							//if(subNavParent[index][j] == ""){
								//add page (title, fielname)
								
								eval("menu" + index + ".addItem(subNavTitle[" + index + "][j], \"/\" + subNavFileName[" + index + "][j]);")
							//} 
						}
					}    
				} else {
					//var menu1 = ms.addMenu("");
					
				}   
			} else {
				//var menu1 = ms.addMenu("");
				
			}   
		}	
		
/*
		for(index=1; index <= topLevelIds.length; index++){
		
			if (typeof subNavFileName[1] != "undefined"){
				var menu1 = ms.addMenu(document.getElementById("menu1"));
	    		
				if(subNavFileName[1].length>0){
					var menu1 = ms.addMenu(document.getElementById("menu1"));
	    		    
					for(j=0;j<subNavFileName[1].length;j++){
						if(subNavInNav[1][j] == "1" && (subNavPrimaryNav[1][j]) == 12){
						//second levels
							if(subNavParent[1][j] == ""){
								//add page (title, fielname)
								menu1.addItem(subNavTitle[1][j], "/" + subNavFileName[1][j]);
							} 
						}
					}    
				} else {
					var menu1 = ms.addMenu("");
				}   
			} else {
				var menu1 = ms.addMenu("");
			}   
		}	

        //News/Events
        if (typeof subNavFileName[2] != "undefined"){
	        if(subNavFileName[2].length>0){
		        var menu2 = ms.addMenu(document.getElementById("menu2"));
		        //alert(subNavFileName[2].length);
		        for(k=0;k<subNavFileName[2].length;k++){
	                if(subNavInNav[2][k] == "1" && (subNavPrimaryNav[2][k]) == 3){
                 
                    //second levels
                        if(subNavParent[2][k] == ""){
                            menu2.addItem(subNavTitle[2][k], "/" + subNavFileName[2][k]);
                        } 
                    }
                }
            } else {
                var menu2 = ms.addMenu("");
            }   
        } else {
            var menu2 = ms.addMenu("");
        }   
        //menu2.addItem("Link Name", "link.html");
       // menu2.addItem("Link Name", "link.html");
        //menu2.addItem("Link Name", "link.html");
       // menu2.addItem("Link Name", "link.html");
        //menu2.addItem("Link Name", "link.html");
        
        var menu3 = ms.addMenu(document.getElementById("menu3"));
        menu3.addItem("Link Name", "link.html");
        menu3.addItem("Link Name", "link.html");
        menu3.addItem("Link Name", "link.html");
        
        var menu4 = ms.addMenu(document.getElementById("menu4"));
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        menu4.addItem("Link Name", "link.html");
        
        var menu5 = ms.addMenu(document.getElementById("menu5"));
        menu5.addItem("Link Name", "link.html");
        menu5.addItem("Link Name", "link.html");
        menu5.addItem("Link Name", "link.html");
        menu5.addItem("Link Name", "link.html");
        
        var menu6 = ms.addMenu(document.getElementById("menu6"));
        menu6.addItem("Link Name", "link.html");
        menu6.addItem("Link Name", "link.html");
        menu6.addItem("Link Name", "link.html");
        menu6.addItem("Link Name", "link.html");
        menu6.addItem("Link Name", "link.html");
        
        var menu7 = ms.addMenu(document.getElementById("menu7"));
        menu7.addItem("Link Name", "link.html");
        menu7.addItem("Link Name", "link.html");
        menu7.addItem("Link Name", "link.html");
        menu7.addItem("Link Name", "link.html");
        menu7.addItem("Link Name", "link.html");
        menu7.addItem("Link Name", "link.html");
            
    */
        
        //third Level
        //comment out these lines to remove level
        //var subMenu1 = menu2.addMenu(menu2.items[3]);
		//subMenu1.addItem("sub sub", "#");
		//subMenu1.addItem("Sub Sub Two", "#");
		//subMenu1.addItem("Sub Sub Three", "#");
		//subMenu1.addItem("Sub Sub Four", "#");


		
		








		 
		//==================================================================================================
		// write drop downs into page
		//==================================================================================================
		// this method writes all the HTML for the menus into the page with document.write(). It must be
		// called within the body of the HTML page.
		//==================================================================================================
		DropDown.renderAll();
	}
