
	if (DropDown.isSupported()) {
        //alert("hi");
		//==================================================================================================
		// 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, 2, 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
		//==================================================================================================
		
		
		//ModelStation
		//alert(subNavFileName[1]);
		if(subNavFileName[1].length>0){
		    var menu1 = ms.addMenu(document.getElementById("menu1"));
		    
		    //alert(subNavFileName[7]);
	        for(j=0;j<subNavFileName[1].length;j++){
	         //alert("hi");
	         //alert(subNavPrimaryNav[1][j]);
	            if(subNavInNav[1][j] == "1" && (subNavPrimaryNav[1][j]) == 9663){
               
                //second levels
                    if(subNavParent[1][j] == ""){
                        menu1.addItem(subNavTitle[1][j], "http://www.clarifi.com/" + subNavFileName[1][j]);
                    } 
                }
            }
         } else {
            var menu1 = ms.addMenu("");
         }   
	    
	    
		//Services
	    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]) == 4773){
             
                //second levels
                    if(subNavParent[2][k] == ""){
                        menu2.addItem(subNavTitle[2][k], "http://www.clarifi.com/" + subNavFileName[2][k]);
                    } 
                }
            }
         } else {
            var menu2 = ms.addMenu("");
         }   
		
		//Support
		if(subNavFileName[3].length>0){
		    var menu3 = ms.addMenu(document.getElementById("menu3"));
		    for(l=0;l<subNavFileName[3].length;l++){
	            if(subNavInNav[3][l] == "1" && (subNavPrimaryNav[3][l]) == 4774){
             
                //second levels
                    if(subNavParent[3][l] == ""){
                        menu3.addItem(subNavTitle[3][l], "http://www.clarifi.com/" + subNavFileName[3][l]);
                    } 
                }
            }
         } else {
            var menu3 = ms.addMenu("");
         }      
		//alert(j);
		
		//Partners
		//alert(subNavFileName[4].length);
		if(subNavFileName[4].length>0){
		    var menu4 = ms.addMenu(document.getElementById("menu4"));
		    for(m=0;m<subNavFileName[4].length;m++){
	         //alert(subNavFileName[4].length);
	            if(subNavInNav[4][m] == "1" && (subNavPrimaryNav[4][m]) == 4776){
             
                //second levels
                    if(subNavParent[4][m] == ""){
                        menu4.addItem(subNavTitle[4][m], "http://www.clarifi.com/" + subNavFileName[4][m]);
                    } 
                }
            }
         } else {
            var menu4 = ms.addMenu("");
         }    
		
	
		//Events
		if(subNavFileName[5].length>0){
		    var menu5 = ms.addMenu(document.getElementById("menu5"));
		    for(n=0;n<subNavFileName[5].length;n++){
	         //alert(subNavFileName[5].length);
	            if(subNavInNav[5][n] == "1" && (subNavPrimaryNav[5][n]) == 4777){
             
                //second levels
                    if(subNavParent[5][n] == ""){
                        menu5.addItem(subNavTitle[5][n], "http://www.clarifi.com/" + subNavFileName[5][n]);
                    } 
                }
            }
         } else {
            var menu5 = ms.addMenu("");
         }   
		
		//About-ClariFI
		
		if(subNavFileName[6].length>0){
		
		    var menu6 = ms.addMenu(document.getElementById("menu6"));
		
		    for(o=0;o<subNavFileName[6].length;o++){
    		
	            if(subNavInNav[6][o] == "1" && (subNavPrimaryNav[6][o]) == 4778){
             
                //second levels
                    if(subNavParent[6][o] == ""){
                        menu6.addItem(subNavTitle[6][o], "http://www.clarifi.com/" + subNavFileName[6][o]);
                    } 
                }
            }
      
        } else {
            var menu6 = ms.addMenu("");
        }
        
        //Contact
     
        if(subNavFileName[7].length>0){
		    var menu7 = ms.addMenu(document.getElementById("menu7"));
		    
		    for(p=0;p<subNavFileName[7].length;p++){
	            if(subNavInNav[7][p] == "1" && (subNavPrimaryNav[7][p]) == 4779){
                //second levels
                    if(subNavParent[7][p] == ""){
                        menu7.addItem(subNavTitle[7][p], "http://www.clarifi.com/" + subNavFileName[7][p]);
                    } 
                }
            }
         } else {
            var menu7 = ms.addMenu("");
         }
    
        
        //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();
	}

