function delete_confirm(text){
	var clicked = confirm(text)
	if (clicked == true){
	  return true;
	} else {
		return false;
	}
  }
  
  function check_submit_vars(values,lengths,email,filetype,requiredtxt,filetype_error,form_name){
  	var error = 0;
  	var lenght_error = 0;
  	var type_error = 0;
  	var errorFields = '';
	for(i=0; i<values.length; i++){
		formvar = document.forms[form_name].elements[values[i]];
		//NORMAL VALUE PART
		if(formvar.value.length <= lengths[i] &&  lengths[i]!=0){
			document.getElementById("label_"+values[i]).style.color="#FF0000";
			error=1;
			length_error=1;
		} else {
			document.getElementById("label_"+values[i]).style.color="";
		}
		
		//FILETYPE PART
		if(formvar.type=='file' && filetype[i]!=0){
			variablePos = formvar.value.length - 4;
			last = formvar.value.substr(variablePos,4);
			if(filetype[i].match(",")){
				gesplit=filetype[i].split(",");
				cur_error=1;
				for(j=0; j<gesplit.length; j++){
					if(last.match(gesplit[j])){
						cur_error=0;
					}
				}
				if(cur_error==1){
					error=1;
					document.getElementById("label_"+values[i]).style.color="#FF0000";
				} else {
					document.getElementById("label_"+values[i]).style.color="";
				}
			} else{
				if(!last.match(gesplit[j])){
					error=1;
					document.getElementById("label_"+values[i]).style.color="#FF0000";
				} else {
					document.getElementById("label_"+values[i]).style.color="";
				}
			}
		}
		
		//MAIL PART
		if(email[i]==1){
			var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if (!filter.test(formvar.value)){ 
				error=1;
				document.getElementById("label_"+values[i]).style.color="#FF0000";
			} else {
				document.getElementById("label_"+values[i]).style.color="";
			}
		}
	}
	if(error==1){
		alert(requiredtxt);
		return false;
	} else {
		return true;
	}
  }


function combine_array(array1,array2){
	for(i=0; i<array2.length; i++){
		number=array1.length;
		array1[number]=array2[i];
	}
	return array1;
}

function show_image(image,id){
	popup_width=49;
	popup_height=10;
	window.open('/foto_popup.php?image='+image,id,'height='+popup_height+',width='+popup_width+',directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0')
}

function show_agenda(nummer,link,tekst){
	document.getElementById('agenda1').style.backgroundColor='#ccd0d1';
	document.getElementById('agenda2').style.backgroundColor='#ccd0d1';
	document.getElementById('agenda3').style.backgroundColor='#ccd0d1';
	document.getElementById('agenda4').style.backgroundColor='#ccd0d1';
	document.getElementById('agenda5').style.backgroundColor='#ccd0d1';
	document.getElementById('agenda'+nummer).style.backgroundColor='#7ba49c';
	document.getElementById('agenda_tekst').innerHTML=tekst;
	currentURL=link; 
}

clickDisabled=0;
function loadLink(link,id){
	if(link!=undefined && clickDisabled!=1){
		window.open(link,id);
	}
	clickDisabled=1;
	setTimeout('linkUnDisable();',500);
}
function linkUnDisable(){
	clickDisabled=0;
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) { 
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
/////menu
var activeMenuItem = new Array();
	
	function isUlInArray(inputObj,ulObj){
		while(inputObj && inputObj.id!='dhtmlgoodies_listMenu'){
			if(inputObj==ulObj)return true;
			inputObj = inputObj.parentNode;			
		}		
		return false;
	}
	
	function showHideSub(e,inputObj)
	{
		

		if(!inputObj)inputObj=this;
		var parentObj = inputObj.parentNode;
		var ul = parentObj.getElementsByTagName('UL')[0];
		if(activeMenuItem.length>0){
			for(var no=0;no<activeMenuItem.length;no++){
				if(!isUlInArray(ul,activeMenuItem[0]) && !isUlInArray(activeMenuItem[0],ul)){
					activeMenuItem[no].style.display='none';
					activeMenuItem.splice(no,1);
					no--;
				}
			}			
		}
		if(ul.offsetHeight == 0){
			ul.style.display='block';
			activeMenuItem.push(ul);
		}else{
			ul.style.display='none';
		}
	}
	
	function showHidePath(inputObj)
	{
		var startTag = inputObj;
		showHideSub(false,inputObj);
		inputObj = inputObj.parentNode;
		while(inputObj){			
			inputObj = inputObj.parentNode;
			if(inputObj.tagName=='LI')showHideSub(false,inputObj.getElementsByTagName('A')[0]);
			if(inputObj.id=='dhtmlgoodies_listMenu')inputObj=false;	
		}		
	}
	
	/*function initMenu()
	{
		var obj = document.getElementById('dhtmlgoodies_listMenu');
		var linkCounter=0;
		var aTags = obj.getElementsByTagName('A');
		var activeMenuItem = false;
		var activeMenuLink = false;
		var thisLocationArray = location.href.split(/\//);
		var fileNameThis = thisLocationArray[thisLocationArray.length-1];
		if(fileNameThis=="" || fileNameThis=="www.nl0031.nl"){
			fileNameThis="index.php";
		}
		
		if(fileNameThis.indexOf('?')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('?'));
		if(fileNameThis.indexOf('#')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('#'));

		for(var no=0;no<aTags.length;no++){
			var parent = aTags[no].parentNode;
			var subs = parent.getElementsByTagName('UL');
			if(subs.length>0){
				aTags[no].onclick = showHideSub;	
				linkCounter++;
				aTags[no].id = 'aLink' + linkCounter;
			}	
			
			if(aTags[no].href.indexOf(fileNameThis)>=0 && aTags[no].href.charAt(aTags[no].href.length-1)!='#'){				
				if(aTags[no].parentNode.parentNode){								
					var parentObj = aTags[no].parentNode.parentNode.parentNode;
					var a = parentObj.getElementsByTagName('A')[0];
					if(a.id && !activeMenuLink){
						
						activeMenuLink = aTags[no];
						activeMenuItem = a.id;
					}
				}
			}		
		}		

		if(activeMenuLink){
			activeMenuLink.className='activeMenuLink';
		}
		if(activeMenuItem){
			if(document.getElementById(activeMenuItem))showHidePath(document.getElementById(activeMenuItem));	
		}
	}
	window.onload = initMenu;*/
//////einde menu

