function showMenu(menu)
{
    var content_array = [];
    var title = "";
    var back = 0;
   //main menu
    if (menu == 1)
    {
        content_array = [['About Us', 'about.html', 0], ['Featured', '#', 2], ['Academic', '#', 3], ['Institutional', '#', 4], ['Sustainable', '#', 5], ['Residential', '#', 6], ['Historic', '#', 7]];
    }
    
    //Featured
    else if (menu == 2)
    {
    	title = "Featured";
    	back = 1;
        content_array = [['Echo at the Leahy Center', 'echofeat.html', 0], ['Woodstock Residence 2', 'woodstockres2feat.html', 0], ['Conservation Plan South Acres', 'southacresfeat.html', 0], ['Army Aviation Facility', 'aviationfeat.html', 0], ['Wing Davis Wilks', 'wingdavisfeat.html', 0]];
    }
    
    //Academic
    else if (menu == 3)
    {
    	title = "Academic";
    	back = 1;
        content_array = [['Middlebury College', '#', 41], ['Champlain College', '#', 42], ['University of Vermont', '#', 43], ['Vermont Technical College', '#', 44], ['Pine Ridge School', '#', 45], ['Lyndon State College', '#', 46]];
    }
    
    
    //Institutional
    else if (menu == 4)
    {
    	title = "Institutional";
    	back = 1;
        content_array = [['Vermont Air National Guard', '#', 61], ['Vermont Army National Guard', '#', 62], ['State of Vermont', '#', 63], ['All Souls Interfaith', 'allsouls.html', 0], ['Billings Visitor Center', 'billingsvisitor.html', 0], ['Aquatic Center at Wake Robin', 'wakeaquatic.html', 0], ['Echo at the Leahy Center', 'echo.html', 0]];
    }
    
    //Sustainable
    else if (menu == 5)
    {
    	title = "Sustainable";
    	back = 1;
        content_array = [['Mill Complex', 'millcomplexsus.html', 0], ['Wing Davis Wilks', 'wingdavissus.html', 0], ['Echo at the Leahy Center', 'echosus.html', 0], ['Franklin Hall', 'franklinsus.html', 0], ['Aiken Hall', 'aikensus.html', 0], ['Academic and Student Activities Building', 'studentactivitiessus.html', 0]];
    }
    
    //Residential
    else if (menu == 6)
    {
    	title = "Residential";
    	back = 1;
        content_array = [['Woodstock Residence', 'woodstockres.html', 0], ['South Woodstock Residence 1', 'woodstockres1.html', 0], ['South Woodstock Residence 2', 'woodstockres2.html', 0]];
    }
    
    //Historic
    else if (menu == 7)
    {
    	title = "Historic";
    	back = 1;
        content_array = [['Shelburne Farms', '#', 81], ['Williams Hall', 'williamshallhis.html', 0], ['Arts and Science Complex', 'artssciencecomplexhis.html', 0], ['Woodstock Church', 'woodstockchurch.html', 0], ['116 State Street', '116statehis.html', 0], ['133 State Street', '133statehis.html', 0], ['Mill Complex', 'millcomplex.html', 0], ['1890 Farmhouse', '1890farmhouse.html', 0], ['Franklin Hall', 'franklinhis.html', 0]];
    }
    
    
    //Middlebury College
    else if (menu == 41)
    {
    	title = "Middlebury College";
    	back = 3;
        content_array = [['Franklin Hall', 'franklin.html', 0]];
    }
    
    //Champlain College
    else if (menu == 42)
    {
    	title = "Champlain College";
    	back = 3;
        content_array = [['Aiken Hall', 'aiken.html', 0], ['Perry Carriage Barn', 'carriage.html', 0]];
    }
    
    
    //University of Vermont
    else if (menu == 43)
    {
    	title = "University of Vermont";
    	back = 3;
        content_array = [['Williams Hall', 'williamshall.html', 0], ['Arts and Science Complex', 'artssciencecomplex.html', 0], ['Wing Davis Wilks Residnece Hall', 'wingdavis.html', 0], ['Delehanty Hall', 'delehanty.html', 0], ['Clay Studio Entry', 'claystudio.html', 0], ['Royall Tyler Theater', 'royalltyler.html', 0], ['Fleming Auditorium', 'fleming.html', 0]];
    }
    
   
   //Vermont Technical College
   else if (menu == 44)
   {
   	title = "Vermont Technical College";
   	back = 3;
       content_array = [['Morrill Hall', 'morrillhall.html', 0], ['Red Schoolhouse', 'redschoolhouse.html', 0]];
   }
   
   
   //Pine Ridge School
   else if (menu == 45)
   {
   	title = "Pine Ridge School";
   	back = 3;
       content_array = [['Academic Center', 'academiccenter.html', 0], ['Activity Center', 'activitycenter.html', 0], ['Sterling Residence Hall', 'sterlingres.html', 0], ['Stigum Residence Hall', 'stigumres.html', 0]];
   }
   
   
   //Lyndon
   else if (menu == 46)
   {
   	title = "Lyndon State College";
   	back = 3;
       content_array = [['Academic Center', 'lynacademiccenter.html', 0], ['Academic and Student Activities Building', 'studentactivities.html', 0]];
   }
   
   
   //Vermont Air
   else if (menu == 61)
   {
   	title = "Vermont Air National Guard";
   	back = 4;
       content_array = [['Fire Station and Gate House', 'firestation.html', 0], ['Base Headquarters', 'baseops.html', 0], ['Vehicle Maintenance', 'vehicle.html', 0], ['Deployment Training Center', 'deployment.html', 0], ['Dining and Medical Training', 'diningmedical.html', 0]];
   }
    
   
   
    //Vermont Army
    else if (menu == 62)
    {
    	title = "Vermont Army National Guard";
    	back = 4;
        content_array = [['Army Aviation Facility', 'aviation.html', 0], ['technology center', 'readinesstraining.html', 0]];
    }
    
    
    //Vermont State
    else if (menu == 63)
    {
    	title = "State of Vermont";
    	back = 4;
        content_array = [['116 State Street', '116state.html', 0], ['133 State Street', '133state.html', 0]];
    }
    
    
    
    //Shelburne Farms
    else if (menu == 81)
    {
    	title = "Shelburne Farms";
    	back = 7;
        content_array = [['Conservation Plan South Acres', 'southacres.html', 0], ['Learning Center', 'learncenter.html', 0]];
    }
    
    
    
    var content = '';
    if (title != null)
    {
        content += '<div class="menu_title">'+title+'</div>';
    }
    for (x = 0; x < content_array.length; x++)
    {
        var onclick = '';
        if (content_array[x][2] != 0)
        {
            onclick = "showMenu("+content_array[x][2]+")";
        }
        content += '<div class="menu_entry"><a href="'+content_array[x][1]+'" onclick="'+onclick+'">'+content_array[x][0]+'</a></div>';
        
    }
    if (back != 0)
    {
        content += '<div id="back_button" class="menu_entry"><a href="#" onclick="showMenu('+back+')">Back</a></div>';
    }
    document.getElementById('menu').innerHTML = content;
}
