﻿function WriteMenu()
{
    $.getJSON("data/menu.json", function (data)
    {
        var items = "";

        $.each(data, function (key, val)
        {
            items += ('<li><a href="' + val.url + '">' + val.name + '</a></li>');
        });

        $("#navMenu").html(items);
    });

    //check the height so i can set the leftContainer height for IE
    //also adjust the banner spacing depending on the browser
    var scnHei;
    if (self.innerHeight) // all except Explorer
    {
        scnHei = self.innerHeight;
        $(".headerSeparator").css("margin-top", "-8px");
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    // Explorer 6 Strict Mode
    {
        scnHei = document.documentElement.clientHeight;
        $(".headerSeparator").css("margin-top", "-7px");
    }
    else if (document.body) // other Explorers
    {
        scnHei = document.body.clientHeight;
        $(".headerSeparator").css("margin-top", "-7px");
    }

    $("#leftContainer").css("height", scnHei + "px");
}
