function checkall(grp){ // alle checked attributes van een groep bepalen
	for(i=0;i<document.forms[1].elements.length;i++)
		if(document.forms[1].elements[i].name.indexOf(grp)!=-1&&document.forms[1].elements[i].name.indexOf("all")==-1)
			document.forms[1].elements[i].checked = document.forms[1].elements[grp+"_alles"].checked;
}

function allcheck(grp){ // checked attribute van een all-checkbox bepalen
	all = true;
	for(i=0;i<document.forms[1].elements.length;i++)
		if(document.forms[1].elements[i].name.indexOf(grp)!=-1&&document.forms[1].elements[i].name.indexOf("all")==-1)
			if(!document.forms[1].elements[i].checked){
				all = false;
				break;
			}
	document.forms[1].elements[grp+"_alles"].checked = all;
	if(all) checkall(grp);
}

function filmPopup(url) {
   var winH;
   winH = window.open(url,"frmFilm","height=500,width=550,status=no,location=no,personalbar=no,resizable=no")
}

function Popup(url, width, height, windowname) {
   var winH;
   winH = window.open(url,windowname,"height="+height+",width="+width+",status=no,location=no,personalbar=no,resizable=yes,scrollbars=yes")
}

function changePage(strURI, strRequestPar) {
	//alert(strRequestPar);
	var strDocLocHref = document.location.href;
	if (document.location.href.indexOf('?' + strRequestPar) > -1) {
		//if (strDocLocHref.indexOf('uri', strDocLocHref.indexOf('?' + strRequestPar)) > -1) {
			document.location.href = strDocLocHref.substr(0, strDocLocHref.indexOf(strRequestPar)) + strRequestPar + '=' + strURI + strDocLocHref.substr(strDocLocHref.indexOf(strRequestPar) + 19, strDocLocHref.length - strDocLocHref.indexOf(strRequestPar) + 19);
		//}				
	} else {
		document.location.href = document.location.href + '?' + strRequestPar + '=' + strURI;
	}
}

function mailPagina(url) {
	Popup('/mail.php?url='+escape(url)+'&actie=mailform',550,430,'mail');
}

function mailAll(url) {
	Popup('/mail.php?url='+escape(url)+'&actie=mailformsubs',550,430,'mail');

}

function mailSemiAll(url) {
	Popup('/mail.php?url='+escape(url)+'&actie=mailformsubs&toonprint=semi',550,430,'mail');

}

function printPagina(url) {
	deUrl = url;
	if (deUrl.indexOf('?') == -1){
		Popup(url+'?print=true',600,600,'mail');
	}else{
		Popup(url+'&print=true',600,600,'mail');
	}
}

function printAll(url) {
	deUrl = url;
	if (deUrl.indexOf('?') == -1){
		Popup(url+'?print=all',600,600,'mail');
	}else{
		Popup(url+'&print=all',600,600,'mail');
	}
}

function printSemiAll(url) {
	deUrl = url;
	if (deUrl.indexOf('?') == -1){
		Popup(url+'?print=all&toonprint=semi',600,600,'mail');
	}else{
		Popup(url+'&print=all&toonprint=semi',600,600,'mail');
	}
}

function getObjStyle(name)
{
 if (document.getElementById)
 {
  return document.getElementById(name).style;
 }
 else if (document.all)
 {
  return document.all[name].style;
 }
 else if (document.layers)
 {
  return document.layers[name];
 }
 else return false;
} 