function pageLoad(sender, args)
{
    adjustHeight();
    $(".insideblock a").click(function()
    {
        adjustHeight();
    })

}
function adjustHeight()
{
    if ($("#maincontent").length)
    {
        $("#maincontent").css("height", "auto");
        console.log("ok");

        var mainHeight = $("#maincontent").innerHeight();
        var menuHeight = $("#dnanav").innerHeight();
        var bottomMenuHeight = $(".partneritemnav.itemtools .insideblock").innerHeight();
        var totalMenuHeight = (menuHeight + bottomMenuHeight) + 20;
        //console.log("mainHeight= " + mainHeight + " totalMenuHeight= " + totalMenuHeight + " menuHeight= " + menuHeight + " bottomMenuHeight= " + bottomMenuHeight);
        if (mainHeight < totalMenuHeight)
        {
            if ($.browser.msie)
            {
                //different for ie because of the wrong box model
                mainHeight = totalMenuHeight + 4;
            }

            else
            {
                mainHeight = totalMenuHeight - 58;
            }
            $("#maincontent").height(mainHeight);
        }
    }

}


/* solves the firebug console calls in browsers without firebug */
if (!('console' in window) || !('firebug' in console))
{
    var names = ['log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time', 'timeEnd', 'count', 'trace', 'profile', 'profileEnd'];
    window.console = {};
    for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() { };
}
//for the scriptmanager needs to be at the end of the script
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
