var idx = "sub_1";
var dont = 0;


function doSub(id,kleur) {
	clear(idx);
	clearTimeout (dont);

	document.getElementById(id).style.backgroundColor = kleur;
	document.getElementById('submenu').style.backgroundColor = kleur;
	document.getElementById('submenu').style.visibility = "visible";

	var sub = id +'_content';
	document.getElementById(sub).style.visibility = "visible";
	
	idx = id;
	//alert(idx);
}

function dontSub(id) {
	var sub = id +'_content';
	dont = setTimeout("document.getElementById('"+ id +"').style.backgroundColor = '#d5e1e7';document.getElementById('submenu').style.visibility = 'hidden';document.getElementById('"+ sub +"').style.visibility = 'hidden'",5000);
	//dont = setTimeout("document.getElementById('submenu').style.visibility = 'hidden';",5000);
	//dont = setTimeout("document.getElementById('"+ sub +"').style.visibility = 'hidden';",5000);



}

function clear (idx) {
	//alert(idx);
	document.getElementById(idx).style.backgroundColor = "#d5e1e7";
	var sub = idx +'_content';
	document.getElementById(sub).style.visibility = "hidden";

//	document.getElementById(idx).style.backgroundColor = 'none';
}



var pg = new Array();
var zichtbaar = "";
var id_active = "";

function showReageer(id) {
	if (zichtbaar != "" && zichtbaar != id) {
		hideReageer2(zichtbaar);
		//showReageer2(zichtbaar);
	} else {
	}

	if (document.getElementById(id).className == "hide"){
		showReageer2(id);
	} else {
		hideReageer2(id);
	}
}

function showReageer2(id) {
	if (document.getElementById(id)) {
		document.getElementById(id).className = id;
	}
	zichtbaar = id;
}
function hideReageer2(id) {
	if (document.getElementById(id)) {
		document.getElementById(id).className = "hide";
	}
	zichtbaar = "";
}

var checkfield = '';
function reactForm(checkfield) {
	//alert ('reactForm:'+ field);
	if (document.getElementById(checkfield).value == ""+checkfield) {
		document.getElementById(checkfield).value = "";
	}
}

function reactFormcheck(checkfield) {
	//alert ('reactFormcheck:'+ checkfield);
	if (document.getElementById(checkfield).value == "") {
		//alert ('leeg');
		document.getElementById(checkfield).value = checkfield;
  	} else {
		//alert ('gewijzigd');
	}
}


function PopUp(filename,windowname) {
	window.open(filename,windowname,'width=400,height=300,fullscreen=0,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0')
}


