
$.getDocHeight = function(){
    return Math.max(
        $(document).height(),
        $(window).height(),
        /* For opera: */
        document.documentElement.clientHeight
    );
};

function iframeResize() 
{
	var footerheight = $("#footer").outerHeight( false );
	var windowheight = $.getDocHeight() - 1;
	var h = windowheight - 383 - 34 - footerheight;

	if ($("#iframe").is(':hidden'))
	{

		if( windowheight < 700 )
		{
			$("#main").height( 700 );
		}

		$("#iframeoverlay").attr('height', '1' );
		$("#overlaycontent").css("top","625px");
	}
	else
	{
		$("#overlaycontent").css("top","393px");
		$("#main").height( windowheight );
		$("#iframeoverlay").attr('height', h );
		$("#iframeoverlay").height( h );
	}
};

var flashvars = {};
var params = {};
	params.wmode = "window";
	params.menu = "false";
	params.bgcolor = "#ffffff";
	params.scale = "noScale";
	params.align = "t";
	params.salign = "t";
var attributes = {id:"flashcontent", name:"flashcontent"};
swfobject.embedSWF("Website.swf", "flashcontent", "780", "620", "9","/js/expressInstall.swf", flashvars, params, attributes);  


function toggleDIV(bVisible, sURL) 
{
	if (bVisible) 
	{
		$("#overlaycontent").css("top","393px");
		$("#iframe").show();
		$("#iframeoverlay").attr("src", sURL );
	}
	else
	{
		$("#iframe").hide();
		$("#overlaycontent").css("top","625px");
		$("#iframeoverlay").attr("src", "leeg.html" );
	}

	iframeResize();
}
		
function selectLang(sLang) 
{
	// verander footer taal		   

	if(sLang == 'nl')
	{
		$("#footernl").show();
		$("#footerfr").hide();
	}
	else
	{
		$("#footerfr").show();
		$("#footernl").hide();
	}
}

$(document).ready(function() {

	$.ifixpng('/images/x.gif');
 	$('img[src$=.png], #main').ifixpng();

	selectLang('nl');	// init taal footer
	iframeResize();		// init frame
});

