/*
sfHover = function() {
	if(document.getElementById("menu") != null){
	    var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	    for (var i=0; i<sfEls.length; i++) {
	        sfEls[i].onmouseover=function() {
	            this.className+=" hover";
	        }
	        sfEls[i].onmouseout=function() {
	            this.className=this.className.replace(new RegExp(" hover\\b"), "");
	        }
	    }
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/

function updateDistributeur(land){
    var selects = document.getElementsByTagName("SELECT");
    for (var i = 0; i < selects.length; i++) {
		if(selects[i].id == 'distributeur_' + land){
			selects[i].style.display = '';
		}else if(selects[i].id.substring(0,13) == 'distributeur_'){
			selects[i].style.display = 'none';
		}
    }
}

function bijlageToevoegen(){
	var isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;

	document.getElementById('bijlage_0').style.display = 'none';
	document.getElementById('bijlage_1').style.display = (isIE ? 'inline' : 'table-row');
	document.getElementById('bijlage_2').style.display = (isIE ? 'inline' : 'table-row');
	document.getElementById('bijlage_3').style.display = (isIE ? 'inline' : 'table-row');
}

function popup(url,breedte,hoogte,center){
   	var LeftPosition=(screen.width)?(screen.width-breedte)/2:100;
   	var TopPosition=(screen.height)?(screen.height-hoogte)/2:100;
	if(center == true){
		settings = 'toolbar=0, location=0, directories=0, statusbar=0, menubar=0, scrollbars=1, resizable=0, width='+breedte+', height='+hoogte+', top='+TopPosition+',left='+LeftPosition;
	}else{
		settings = 'toolbar=0, location=0, directories=0, statusbar=0, menubar=0, scrollbars=1, resizable=0, width='+breedte+', height='+hoogte;
	}
	var windowname = 'window_'+url;
	windowname = windowname.substr(0,windowname.length-4);
	window.open(url, 'window', settings);
}

function setReseller(reseller_tekst,reseller_id){
	document.getElementById('reseller_tekst').innerHTML = reseller_tekst;
	document.getElementById('reseller_tekst_input').value = reseller_tekst;
	document.getElementById('reseller_id').value = reseller_id;
}