function intScreenHeight() {
	// http://www.quirksmode.org/viewport/compatibility.html
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		// x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		// x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		// x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	
	return y;
}


function vHoogteAanpassing(){
	// iTotalHeight=$(document).height();
	iContainerHeight=$("#container").innerHeight();
	if (iContainerHeight<770) {
		iContainerHeight=770;
	}
	iContentHeight= iContainerHeight - $("#top").outerHeight(true) - $("#topnav").outerHeight(true) - $("#footer").outerHeight(true);
	iContentHeight=iContentHeight - 53;	
	$("#lijn").height(iContentHeight);
}

function vPlaatsButton() {	
	iXContainer=$("#leftnav").offset().left;	
	// iXButton=iXContainer + 794;
	iXButton=$("#sidekick_column_1").offset().left + 26; //aanpassing buttun btnMatching naar rechts
	document.getElementById("btnMatching").style.left=iXButton + 'px';
	document.getElementById("btnMatching").style.display='block';
}

function vPlaatsDon() {	
	iYFooter=$("#footer").offset().top;	
	iYDon=iYFooter - $("#imgDon").outerHeight();	
	document.getElementById("imgDon").style.left=$("#footer").offset().left + 'px';
	document.getElementById("imgDon").style.top=iYDon + 'px';	
	document.getElementById("imgDon").style.display='block';
}

function vPlaatsStartpaginaUitzondering() {
	iYFooter=$("#footer").offset().top;	
	iYSu=iYFooter - $("#startpagina_uitzondering").outerHeight();	
	document.getElementById("startpagina_uitzondering").style.left=$("#rightnav").offset().left + 'px';
	document.getElementById("startpagina_uitzondering").style.top=iYSu + 'px';	
	document.getElementById("startpagina_uitzondering").style.display='block';
}

function vSetEventHandlerButton() {
	// zet link op button, button_lees_verder wordt door de relevante templates (vaak de stappen_xyz templates) gezet.
	if (($("#btnMatching").length>0) && ($("#btnMatchingPopup").length>0)) { // bestaan button en popup div?
		$("#btnMatching").mouseenter(function () {
			iXButton=$("#btnMatching").offset().left - 150;
			iYButton=$("#btnMatching").offset().top + 90;
			document.getElementById("btnMatchingPopup").style.left=iXButton + 'px';
			document.getElementById("btnMatchingPopup").style.top=iYButton+ 'px';			
			$("#btnMatchingPopup").show(500);
		}
		);
		$("#btnMatchingPopup").mouseleave(function () {
			$("#btnMatchingPopup").hide(500);
		}
		);
	}
}