//=================================================================================================
function MM_preloadImages(){
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function submitLoginForm(){
	var username = document.getElementById('UserName').value;
	var pass = document.getElementById('pass').value;
	if(username == '' || username == username.defaultValue || pass == '' || pass == pass.defaultValue){
		alert('U heeft geen gebruikersnaam en wachtwoord opgegeven')
		return false;
	}else{
		document.forms['login'].submit();
	}
}
//=================================================================================================
var bodyHeight;						// Holds the height of the body content in pixels
function setContentHeight(){
	var windowHeight; 				// Height of the browser frame.
	var contentHeight;				// Height that the content div should be.
	var heightDif = 308;			// Difference between height of the window and the height that the content should be.
	var leftcolHeight =  document.getElementById('leftcol').offsetHeight;
	var contentHeight;
	var browser;
	
	
	// Track bodyheight if it is not trecked yet. 
	if (!bodyHeight) bodyHeight = document.body.offsetHeight;

	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		browser = "mozilla";
		windowHeight = window.innerHeight;
	} 
	else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )) {
		//IE 6+ in 'standards compliant mode'
		browser = "ie6";
		windowHeight = document.documentElement.clientHeight;
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		browser = "ie4";
		windowHeight = document.body.clientHeight;
	}
	// Calculate content height
	if (windowHeight > bodyHeight){
		contentHeight = windowHeight - heightDif;
		document.getElementById('contentWrapper').style.height =contentHeight+'px';
	}
	// Make sure the leftcol div is not longer than the content div.
	if (leftcolHeight > contentHeight){
		contentHeight = leftcolHeight;
		document.getElementById('contentWrapper').style.height =contentHeight+'px';
	}
}
window.onresize = setContentHeight;
