

/* --------------------------------------------------------------------------------- */
/*
			//HIGHLIGHT TABLEROW V2
			//too slow when there are many tablerows

			function highlight_mouseover(obj){

				if(obj.className.search(/highlight_clicked/) == -1){		
					obj.className = obj.className.replace(/ highlight_mouseout/, "");
					obj.className += " highlight_mouseover";
				}

			}

			function highlight_mouseout(obj){

				obj.className = obj.className.replace(/ highlight_mouseover/, " highlight_mouseout");

			}

			function highlight_mouseclick(obj){

				if(obj.className.search(/highlight_clicked/) == -1){ //not clicked yet

					obj.className = obj.className.replace(/ highlight_mouseover/, "");
					obj.className += " highlight_clicked";

				}else{ //already clicked

					obj.className = obj.className.replace(/ highlight_clicked/, "");
					obj.className += " highlight_mouseover";

				}
			}
*/

/* --------------------------------------------------------------------------------- */
/*
			//HIGHLIGHT TABLEROW V3
			//still too slow when there are many tablerows

			function highlight_mouseover(obj){

				var clicked = obj.className.indexOf(" highlight_clicked");
				if(clicked == -1){
					var end = obj.className.indexOf(" highlight_mouseout");
					if(end != -1){
						obj.className = obj.className.substring(0, end);
					}
					obj.className += " highlight_mouseover";
				}

			}

			function highlight_mouseout(obj){

				var clicked = obj.className.indexOf(" highlight_clicked");
				if(clicked == -1){
					var end = obj.className.indexOf(" highlight_mouseover");
					if(end != -1){
						obj.className = obj.className.substring(0, end);
					}
					obj.className += " highlight_mouseout";
				}	

			}

			function highlight_mouseclick(obj){

				var clicked = obj.className.indexOf(" highlight_clicked");
				if(clicked == -1){

					var end = obj.className.indexOf(" highlight_mouseover");
					if(end != -1){
						obj.className = obj.className.substring(0, end);
					}
					obj.className += " highlight_clicked";

				}else{
					var end = clicked;
					obj.className = obj.className.substring(0, end);
					obj.className += " highlight_mouseover";
				}

			}
*/
/* --------------------------------------------------------------------------------- */
//HIGHLIGHT TABLEROW V1

function highlight_mouseover(obj){
	
	if(obj.style.backgroundColor != 'gold'){
		obj.style.backgroundColor='#ffff7b';
	}
}

function highlight_mouseout(obj){
	if(obj.style.backgroundColor != 'gold'){
		obj.style.backgroundColor='white';
	}
}

function highlight_mouseclick(obj){
	if(obj.style.backgroundColor != 'gold'){
		obj.style.backgroundColor='gold';
	}else{
		obj.style.backgroundColor='white';
	}
}


/* --------------------------------------------------------------------------------- */
//LOADING

function loadingOff(){
	//hide loading icon
	var x = document.getElementById("loading");
	if(x){
		x.style.display = 'none';
	}
}

/* --------------------------------------------------------------------------------- */
function showHistoryItems(){
	
	var btn = document.getElementById("js_togglehistory1");
	var table = document.getElementById("js_togglehistory2");	

	if(table.style.display == "none"){
		table.style.display = 'block';
		btn.innerHTML = "verbergen";
	}else{
		table.style.display = 'none';
		btn.innerHTML = "toon alle versies";
	}

}
/* --------------------------------------------------------------------------------- */
//SIMPELERE TOGGLE FUNCTIE
//momenteel alleen gebruikt bij tonen voorwaarden v texten

function simpleToggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

/* --------------------------------------------------------------------------------- */
function approveReason(obj){

	var reason = document.getElementById('js_approveReason');
	var dropdown = document.getElementById('js_approveSelect');
	var div = document.getElementById('js_approveBlock');
	
	if(dropdown.value == "disapprove"){
		reason.style.display = 'inline';
		div.className = 'approveNeg';
	}else if(dropdown.value == "approve"){
		reason.style.display = 'none';
		div.className = 'approvePos';
	}else{
		reason.style.display = 'none';
		div.className = 'approveNeutral';
	}

}
/* --------------------------------------------------------------------------------- */
function at(){
	document.write('@');
}

/* --------------------------------------------------------------------------------- */

function showIframe(){

	var radioS = document.getElementById('js_radioS');
	var radioM = document.getElementById('js_radioM');
	var radioL = document.getElementById('js_radioL');
	
	var iframeS = document.getElementById('js_iframeS');
	var iframeM = document.getElementById('js_iframeM');
	var iframeL = document.getElementById('js_iframeL');

	//iframeS.style.display = "block";
	//iframeM.style.display = "block";
	//iframeL.style.display = "block";

	iframeS.style.display = "none";
	iframeM.style.display = "none";
	iframeL.style.display = "none";

	if(radioS.checked == true){ iframeS.style.display = "block"; }	
	if(radioM.checked == true){ iframeM.style.display = "block"; }	
	if(radioL.checked == true){ iframeL.style.display = "block"; }	

}

/* --------------------------------------------------------------------------------- */
function setFocus(id){

	var em = document.getElementById(id);
	em.focus();

}

/* --------------------------------------------------------------------------------- */
/* todo
function subscriptionCosts(organisatie, abonnement, aantalmensen){

	
	if(organisatie == null){ return " - "; }
	if(abonnement == null){ return " - "; }
	if(aantalmensen == null){ return " - "; }

	scholen = new Array(
		[80,120,160],
		[120,170,220],
		[160,220,280],
		[200,270,340]
	);
	
	ho = new Array(
		[80,"in overleg","nvt"],
		[120,"in overleg","nvt"],
		[160,"in overleg","nvt"],
		[200,"in overleg","nvt"],
		[250,"in overleg","nvt"],
		[300,"in overleg","nvt"]
	);
	
	overig = new Array(
		[80,120,"nvt"],
		[120,170,"nvt"],
		[160,220,"nvt"],
		[200,270,"nvt"]
	);

	if(organisatie == "scholen"){ 
		overzicht = scholen;
		js_costs_schools
	}
	if(organisatie == "ho"){ 
		overzicht = ho; 
	}
	if(organisatie == "overig"){ 
		overzicht = overig; 
	}
	
	var1 = aantalmensen;

	if(abonnement == "email"){ var2 = 0; }
	if(abonnement == "intern"){ var2 = 1; }
	if(abonnement == "extern"){ var2 = 2; }

	return overzicht[var1][var2];

}
*/

/* --------------------------------------------------------------------------------- */
function showCosts(dropdown, index){
	
	id = dropdown[index].value;
	document.getElementById('js_costs_schools').style.display = 'none';
	document.getElementById('js_costs_hbowo').style.display = 'none';
	document.getElementById('js_costs_other').style.display = 'none';
	document.getElementById(id).style.display = 'block';

}

/* --------------------------------------------------------------------------------- */
function showToelating(id){
		
	document.getElementById('js_loten').style.display = 'none';
	document.getElementById('js_decentraal').style.display = 'none';
	document.getElementById('js_andere').style.display = 'none';
	document.getElementById('js_uitgeloot').style.display = 'none';
	document.getElementById(id).style.display = 'block';

}
/* --------------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------------- */

