window.onload = function() {

	/*
	hoofdmenu bekijken
	*/
	var menu_height = Element.getHeight($('mainnav'));

	if(menu_height >= 240) {
		$('main').style.height = Math.floor((Element.getHeight($('main')) + 30)) + 'px';
		var bottom_content = document.getElementsByClassName('bottom_content');

		if(bottom_content[0]) {
			bottom_content[0].style.marginTop = 30 + 'px';
		}
	}

	/*
	portfolio lijst scrollbar

	if($('portfolio_total_list')) {

		var current_portfolio_height = Element.getHeight($('portfolio_total_list'));
		var current_nav_height		 = Element.getHeight($('main'));

		if(current_portfolio_height > current_nav_height) {
			$('portfolio_total_list').style.height = current_nav_height + 'px';
		}
	}
	*/

	/*
	site in het midden uitlijnen.

	var screen_height;

	if(typeof(window.innerHeight) == 'number' ) {
		screen_height = window.innerHeight;
	}
	else {
		screen_height = document.documentElement.clientHeight;
	}

	var site_height	  = Element.getHeight($('page'));
	var top_margin	  = 0;

	if(screen_height > site_height) {
		top_margin = ((screen_height - site_height) / 2);
		document.body.style.marginTop = Math.floor(top_margin) + 'px';
	}
	*/

	/*
	nieuwsbriefknop positioneren.
	*/
	$('nieuwsbrief').style.top = Math.floor(((Element.getHeight($('page')) - 90) + 0)) + 'px';
	$('nieuwsbrief').style.visibility = 'visible';

	/*
	mozilla fix.indexOf("aix") !=-1)
	*/
	var vendor = navigator.vendor;

	if(navigator.vendor == '' || vendor.indexOf('Apple') != -1) {
		document.getElementById('main').style.marginTop = '0px';
		document.getElementById('sub').style.marginTop = '0px';
		document.getElementById('nav').style.marginTop = '0px';
	}

	/*
	portfolio nogmaals corrigeren
	*/
	if($('portfolio_total_list')) {
		var current_nav_height		 = Element.getHeight($('content'));
		$('portfolio_total_list').style.height = (current_nav_height - 35) + 'px';
	}
}
