function showorhideregio(waarde){
	if(waarde=='NL'){
		$('#regiorow').show();
	}else{
		$('#regiorow').hide();
	}
}

function loadJS(wat,id){
	ajax("../js/makemenu.js.php?"+wat+"="+id);
}
function ajax(source){
	var fileref = "";
	fileref=document.createElement('script');
	fileref.setAttribute("type","text/javascript");
	fileref.setAttribute("src", source);
	document.getElementsByTagName("head").item(0).appendChild(fileref);
}
function checkFunctienaam(waarde){
	ajax("fncheck.php?fn="+waarde);
}
function checkVacatureId(vacatureId){
	if (vacatureId!=""){
		ajax("vidcheck.php?vid="+vacatureId);
	}
}
function checkXMLfeed(url){
	document.getElementById('feedcheckmsg').style.display = 'block';
	document.getElementById('feedcheckmsg').innerHTML = "<img src='/gfx/loading3.gif' width=16 height=16 border=0>";
	ajax("xmlfeedcheck.php?feed="+url);
}
function doIt(actie,confmsg){
	if (confmsg!='' && confirm(confmsg)){
		document.getElementById('deActie').value=actie;
		document.getElementById('vacForm').submit();
	}else if(confmsg==''){
		document.getElementById('deActie').value=actie;
		document.getElementById('vacForm').submit();
	}
}
function doIt2(cmd){
	document.getElementById('deCmd').value=cmd;
	document.getElementById('kandForm').submit();
}
function colorBg(vacId){
	if (document.getElementById('ch'+vacId).checked){
		document.getElementById('tr'+vacId).style.background ="#FFDD99";
	}else{
		document.getElementById('tr'+vacId).style.background ="#EEEEEE";
	}
}
function colorBg2(kandId){
	if (document.getElementById('ch'+kandId).checked){
		document.getElementById('t1r'+kandId).style.background ="#FFDD99";
		document.getElementById('t2r'+kandId).style.background ="#FFDD99";
	}else{
		document.getElementById('t1r'+kandId).style.background ="#EEEEEE";
		document.getElementById('t2r'+kandId).style.background ="#EEEEEE";
	}
}
var do_check = false;
function setCheckboxes(the_form)
{
    var elts      = document.forms[the_form].elements['vacid[]'];
    var elts_cnt  = elts.length;
	
	if (do_check == true) {
		do_check = false;
	}else{
		do_check = true;
	}
	
    for (var i = 0; i < elts_cnt; i++) {
        elts[i].checked = do_check;
    } // end for

    return true;
}