﻿/// <reference path="../../Scripts/jquery-1.2.6.js" />

$(document).ready(function() {
    $('.MenuDynamic b:eq(2)').hide();
    Adjustments();
});

function Adjustments() {
    var stylesheetsLoaded = document.styleSheets.length > 0;
    var allImageLoaded = true;
    
    $('#divLeftContent img').each(function() {
        if (this.complete == false) {
            allImageLoaded = false;
        }
    });
    
    if (stylesheetsLoaded = false || allImageLoaded == false) {
        //In Chrome and Safari the stylesheet is not always loaded by the time this code runs. This code depends on the final rendering ( and so stylesheet )
        //Wait until stylsheet has loaded
        window.setTimeout('Adjustments()', 500);
        return;
    }

    BoostMainContentBack();
}

//If the left content is too tall the main content back height needs to be increased
function BoostMainContentBack() {
    var mainContent = $('#divContentSheetFrame .Back');
    var leftContent = $('#divLeftContent');
    var leftContentHeight = leftContent.height();
    //alert(leftContentHeight);
    if (leftContentHeight > mainContent.height()) {
        mainContent.height(leftContentHeight + 10);
    }
   
}

