function popupKredietmeter(language){
	var winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=470,height=570,copyhistory=0"
	smallwindow=window.open("/kredietmeter.dhtml?language="+language,"Kredietmeter",winopts);
  smallwindow.focus();
}

function popupQuickscan(language){
	var winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=650,height=670,copyhistory=0"
	smallwindow=window.open("/quickscan.dhtml?language="+language,"QuickScan",winopts);
  smallwindow.focus();
}

function slideshow(link){
	theWidth = 1012;
	if(navigator.userAgent.indexOf("Safari") >= 0) {
		theHeight = 689;
	} else {
		theHeight = 675;
	}
	theTop = 0;
	theLeft = 0;
	var winopts = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=no,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
	smallwindow=window.open(link.href,"Slideshow",winopts);
  smallwindow.focus();
}



function doPrint (item) {
	theWidth = 600;
	theHeight = 500;
	theTop = Math.ceil((screen.height-theHeight*1.5)/2);
	theLeft = Math.ceil((screen.width-theWidth)/2);
	winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
	smallwindow=window.open(item+"?print=Y","PrintVersie",winopts);
	smallwindow.focus();
}
function doSearch() {
	if(document.zoekformulier.q.value!= "") {
		document.zoekformulier.submit();
	}
}

/*
function popupSwitcher() {
	setTimeout('switchPopups()', 5000);	
}
function switchPopups() {
	if (document.getElementById('quickscan').style.visibility=="hidden") {
		document.getElementById('quickscan').style.visibility="visible";
		document.getElementById('kredietmeter').style.visibility="hidden";
	} else {
		document.getElementById('quickscan').style.visibility="hidden";
		document.getElementById('kredietmeter').style.visibility="visible";
	}
	setTimeout('switchPopups()', 5000);	
}
*/

function calcSum () {
	var benelux = document.getElementById("omzetVerdelingBenelux").value;
	var eu = document.getElementById("omzetVerdelingEU").value;
	var noneu = document.getElementById("omzetVerdelingNonEU").value;
	benelux = parseFloat(benelux);
	eu = parseFloat(eu);
	noneu = parseFloat(noneu);
	if(isNaN(benelux)) {
		benelux = 0;
	}
	if(isNaN(eu)) {
		eu = 0;
	}
	if(isNaN(noneu)) {
		noneu = 0;
	}
	var sum = benelux + eu + noneu;
	if(sum > 100) {
		document.getElementById("som").innerHTML = "<span style='color:red'>" + sum + "</span>";
	}else {
		document.getElementById("som").innerHTML = sum;
	}
	document.getElementById("somHidden").value = sum;
}

