function ie6Hack()
{
    div = document.getElementById('contents');

    if ( div )
    {
        if ( navigator.appName == "Microsoft Internet Explorer" )
        {
            var temp=navigator.appVersion.split('MSIE');
            var ieVer=parseInt(temp[1])

            if ( ieVer <= 6 )
            {
                div.style.overflowX = 'hidden';
                div.style.overflowY = 'scroll';
            }
        }
    }
}

function initBackground()
{
    var div = document.getElementById('background');

    if ( div )
    {
        div.style.position = 'fixed';
    }
}

function fadeBackground()
{
    fadeDown( 'background', 'menuDoLeave()' );
}

function fillBackground( prepath, includeLogo )
{
    // Get background size
    var backSize = new Array(2);
    getWindowSize(top,backSize);
	
	// Calculate w/h ratio and limit to available possibilities
	var ratio = Math.round( backSize[0] / backSize[1] * 10.0 );

    if ( ratio < 10 ) ratio = 10;
	if ( ratio > 20 ) ratio = 20;

	// Construct name of best fitting background picture
	var filename;

    if ( includeLogo )
        filename = prepath + "/images/bg/" + ratio + "_inc.jpg";
    else
	    filename = prepath + "/images/bg/" + ratio + "_ex.jpg";

	document.write('<img alt="" src="' + filename + '" width="' + backSize[0] + '" height="' + backSize[1] + '" border="0">');
}

