function deleteRecs(title,table) {
  
	s="";
	for (i = 0; i < document.F.C1.length; i++) {
		if (document.F.C1[i].checked) {
			s = s + document.F.C1[i].value;
			if (i < document.F.C1.length-1) {
			  s = s + ","
			}
		}	
	}

	if (s =="") {
		alert('U moet een of meerdere vinkjes zetten')
	}
	else {
		if (s.substr(s.length-1,1)==",") {
			s = s.substr(0,s.length-1)
		}
	
		 if (confirm('Wilt u deze ' + title + ' verwijderen')) {
			document.location='del.asp?table=' + table + '&ids=' + s;
		}
	}
	
}

/*****************************************************************
* CheckChanged
******************************************************************/
function CheckChanged(url,hash,w,h,x,y,status,scroll)
{

	var submitForm = false;

	if (top.RIGHT.statusChangedV) {
		alert('Variant gewijzigd');
		top.RIGHT.document.F.changeV.value=1;
		top.RIGHT.statusChangedV=false;
		submitForm = true;
	}

	if (top.RIGHT.statusChangedB) {
		alert('Begrip gewijzigd');
		top.RIGHT.document.F.changeB.value=1;
		top.RIGHT.statusChangedB=false;
		submitForm = true;
	}

	if (submitForm)	{
		top.RIGHT.document.F.hash.value=hash;
		top.RIGHT.document.F.url.value=url;
		top.RIGHT.document.F.submit();
	}
	else {
		
		top.RIGHT.document.location=url+'&dummy=#'+hash;
		//top.RIGHT.document.location.hash=hash;
	}
	
}

function saveBegrip(id_begrip,id_variant,id_selectie,hash) {
// id_begrip, id_variant geven naar welk begrip/variant de pagina moet redirecten na het saven
	if (window.opener.top.RIGHT.statusChangedB || window.opener.top.RIGHT.statusChangedV) {
		if (window.opener.top.RIGHT.statusChangedB)	{
			alert('Begrip gewijzigd');
		}
		if (window.opener.top.RIGHT.statusChangedV)	{
			alert('Variant gewijzigd');
		}
		window.opener.top.RIGHT.document.F.url.value='editbegrip.asp?id=' + id_begrip + '&id_variant=' + id_variant + '&id_selectie=' + id_selectie;
		window.opener.top.RIGHT.document.F.hash.value=hash;
		window.opener.top.RIGHT.document.F.submit();
	}
	else {
		alert(window.opener.location);
		window.opener.location = 'editbegrip.asp?id=' + id_begrip + '&id_variant=' + id_variant + '&id_selectie=' + id_selectie + '&hash='+ hash;

		// DIT LEVERT permission denied omdat de pagina nog niet geladen kan zijn
//		window.opener.location.reload();
//		window.opener.location.hash=hash;
	}
	window.close();
}

/*****************************************************************
* ResetPage
*
* Reloads the current page, abandoning changes.
******************************************************************/
var popUp;
var xploor3 = (navigator.appName.indexOf("xplorer") !=-1 && navigator.appVersion.charAt(0) <= 2) ? true : false;

function ResetPage(UseParent)
{
	if (UseParent)
		parent.location.reload(true);
	else
		location.reload(true);
}

function openWindow(url,x,y,dx,dy,status,scroll,resizable) {
 	closeWindow()
	settings = "width=" + x + ",height=" + y + ",left=" + dx + ",top=" + dy + ",toolbar=0,location=0,directories=0,status=" + status + ",menubar=0,scrollbars=" + scroll + ",resizable=" + resizable + ",copyhistory=0"
	popUp = window.open(url,"Nieuws", settings)
	if (!xploor3 && popUp.focus()) {popUp.focus()}
	}

function openWindowAd(url,x,y,dx,dy,status,scroll,resizable) {
 	closeWindow()
	settings = "width=" + x + ",height=" + y + ",left=" + dx + ",top=" + dy + ",toolbar=0,location=0,directories=0,status=" + status + ",menubar=0,scrollbars=" + scroll + ",resizable=" + resizable + ",copyhistory=0"
	popUp = window.open(url,"admini", settings)
	if (!xploor3 && popUp.focus()) {popUp.focus()}
	}

function closeWindow() {
	if (!xploor3 && popUp && !popUp.closed) {
		popUp.close()
		}
	}

/*****************************************************************
* OpenClose
*
* Opent en sluit menus.
******************************************************************/

var ns6=document.getElementById&&!document.all?1:0
var head="display:''"
var folder='';
var status=0;
var plaatje1="pijlomhoog.gif";
var plaatje2="pijlomhoog.gif";
var id="id1";
  

function expandit(curobj,pltje){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (document.getElementById(id).style.visibility == "hidden") {
	document.getElementById(id).style.visibility = "visible";
	pltje='pijlomhoog.gif';
	curobj.src='images/'+pltje
	}
else
	{
	document.getElementById(id).style.visibility = "hidden";
	pltje='pijlomlaag.gif';
	curobj.src='images/'+pltje
	}
}

function expandover(curobj,pijlnaam,pltje){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+4].style
if (folder.display=="none") {
	folder.display="";
	pltje='pijlomhoog.gif';
	pijlnaam.src='images/'+pltje
	}
else
	{
	folder.display="none";
	pltje='pijlomlaag.gif';
	pijlnaam.src='images/'+pltje
	}
}

function expandlevel2(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+2].style
if (folder.display=="none") {
	folder.display="";
	}
else
	{
	folder.display="none";
	}
}


/*****************************************************************
* Highlite & deHighlite
*
* Opent en sluit menus.
******************************************************************/

/* window.onload = function() { document.getElementById('status_begrip').style.display = 'none'; } */

function toggle(image, divid) {
    var div = document.getElementById(divid);
    if (div.style.display == 'none') {
        div.style.display = 'block';
	image.src = 'images/h/verbergvenster_yellowdarkblue.jpg';
    } else {
        div.style.display = 'none';
	image.src = 'images/h/toonvenster_yellowdarkblue.jpg';
    }
}

function highlite(image) {
	if (image.src == 'http://' + document.location.host + '/images/toonvenster_yellowdarkblue.jpg') {
		image.src= 'images/h/toonvenster_yellowdarkblue.jpg';
		return;
	}

	if (image.src == 'http://' + document.location.host + '/images/verbergvenster_yellowdarkblue.jpg') {
		image.src= 'images/h/verbergvenster_yellowdarkblue.jpg';
	}
}

function dehighlite(image) {
	if (image.src == 'http://' + document.location.host + '/images/h/toonvenster_yellowdarkblue.jpg') {
                image.src= 'images/toonvenster_yellowdarkblue.jpg';
		return;

	}
	if (image.src == 'http://' + document.location.host + '/images/h/verbergvenster_yellowdarkblue.jpg') {
		image.src= 'images/verbergvenster_yellowdarkblue.jpg';
	}
}
