			  function confirmDelete(IDvar){
				 var okToDelete = confirm('Weet je zeker dat je deze vacature wilt verwijderen?');
					if(okToDelete){
					   location.href = 'admin/deletejob.php?id=' + IDvar;
				 }
			  }

function confirmDelete2(IDvar){
	 var okToDelete = confirm('Weet je zeker dat je dit nieuwsitem wilt verwijderen?');
		if(okToDelete){
		   location.href = 'admin/deletenews.php?id=' + IDvar;
		 }
}

function confirmDelete3(IDvar){
	 var okToDelete = confirm('Weet je zeker dat je deze folder/nieuwsbrief wilt verwijderen?');
		if(okToDelete){
		   location.href = 'admin/deleteupload.php?id=' + IDvar;
		 }
}

function confirmDelete4(IDvar){
	 var okToDelete = confirm('Weet je zeker dat je dit staflid wilt verwijderen?');
		if(okToDelete){
		   location.href = 'admin/deletestaf.php?id=' + IDvar;
		 }
}

function confirmDelete5(IDvar){
	 var okToDelete = confirm('Weet je zeker dat je dit contactpersoon wilt verwijderen?');
		if(okToDelete){
		   location.href = 'admin/deletecontact.php?id=' + IDvar;
		 }
}

function confirmDelete6(IDvar){
	 var okToDelete = confirm('Weet je zeker dat je deze afdeling wilt verwijderen?');
		if(okToDelete){
		   location.href = 'deleteafdeling.php?id=' + IDvar;
		 }
}

var delay;

//functie om een submenu weg te halen
	function submenuWeg(id){
	
		  if(id=='home'){
			   document.getElementById('dropdown_home').className = 'dropdown';}
			   
			  if(id=='wiezijnwij' || id=='mission' || id=='identiteit' ){
				   document.getElementById('dropdown_home').className = 'dropdown';}

		  if(id=='producten'){
			   document.getElementById('dropdown_prod').className = 'dropdown';}
			   
			  if(id=='verzorging' || id=='opvang' || id=='langdurig' || id=='ambulant' || id=='SCW'){
				   document.getElementById('dropdown_prod').className = 'dropdown';}

		  if(id=='regios'){
			   document.getElementById('dropdown_regios').className = 'dropdown';}
			   
			  if(id=='zhz' || id=='zeeland'){
				   document.getElementById('dropdown_regios').className = 'dropdown';}
				   
		  if(id=='organisatie'){
			   document.getElementById('dropdown_organisatie').className = 'dropdown';}
			   
			  if(id=='organogram' || id=='staf'){
				   document.getElementById('dropdown_organisatie').className = 'dropdown';}
				   
		  if(id=='vacatures'){
			   document.getElementById('dropdown_vacatures').className = 'dropdown';}
			   
			  if(id=='betaald' || id=='vrijwillig'){
				   document.getElementById('dropdown_vacatures').className = 'dropdown';}

		  if(id=='informatie'){
			   document.getElementById('dropdown_informatie').className = 'dropdown';}
			   
			  if(id=='jaarverslag' || id=='folders' || id=='nieuwsbrief '){
				   document.getElementById('dropdown_informatie').className = 'dropdown';}

		  if(id=='contact'){
			   document.getElementById('dropdown_contact').className = 'dropdown';}
			   
			  if(id=='contactformulier' || id=='contactpersonen' || id=='routebeschrijvingen'){
				   document.getElementById('dropdown_contact').className = 'dropdown';}

	}

	function MM_swapImgRestore(id) { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

	  if(id=='home'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='wiezijnwij' || id=='mission' || id=='identiteit' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }

	  if(id=='producten'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='verzorging' || id=='opvang' || id=='langdurig' || id=='ambulant' || id=='SCW'){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }
			  
	  if(id=='regios'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='zhz' || id=='schouwen' || id=='zeeland' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }
			  
	  if(id=='organisatie'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='organogram' || id=='staf' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }
			  
	  if(id=='vacatures'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='betaald' || id=='vrijwillig' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }

	  if(id=='informatie'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='jaarverslag' || id=='folders' || id=='nieuwsbrief' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }
			  
	 if(id=='contact'){
		delay = window.setTimeout('submenuWeg(\''+id+'\')', 500);
	  }
			  if(id=='contactformulier' || id=='contactpersonen' || id=='routebeschrijvingen' ){
				delay = window.setTimeout('submenuWeg(\''+id+'\')', 100);
			  }
	  
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	

// Functie om de dropdown's te clear-en
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2]

			if(a[i]=='home'){
			   	clearTimeout(delay);
				document.getElementById('dropdown_home').className = 'dropdown';
				document.getElementById('dropdown_prod').className = 'dropdown';
			    document.getElementById('dropdown_home').className = 'dropdown_home';}

				   if(a[i]=='wiezijnwij' || a[i]=='mission' || a[i]=='identiteit'){
					    clearTimeout(delay);}

		   if(a[i]=='producten'){
			   	clearTimeout(delay);
				document.getElementById('dropdown_prod').className = 'dropdown';
				document.getElementById('dropdown_home').className = 'dropdown';
				document.getElementById('dropdown_regios').className = 'dropdown';
			    document.getElementById('dropdown_prod').className = 'dropdown_producten';}

				   if(a[i]=='verzorging' || a[i]=='opvang' || a[i]=='langdurig' || a[i]=='ambulant' || a[i]=='SCW'){
					    clearTimeout(delay);}

		   if(a[i]=='regios'){
				clearTimeout(delay);
				document.getElementById('dropdown_home').className = 'dropdown';
				document.getElementById('dropdown_regios').className = 'dropdown';
				document.getElementById('dropdown_prod').className = 'dropdown';
				document.getElementById('dropdown_organisatie').className = 'dropdown';
				document.getElementById('dropdown_regios').className = 'dropdown_regios';}

				   if(a[i]=='zhz' || a[i]=='zeeland'){
					    clearTimeout(delay);}		
						
		   if(a[i]=='organisatie'){
				clearTimeout(delay);
				document.getElementById('dropdown_informatie').className = 'dropdown';
				document.getElementById('dropdown_regios').className = 'dropdown';
				document.getElementById('dropdown_organisatie').className = 'dropdown';
				document.getElementById('dropdown_prod').className = 'dropdown';
				document.getElementById('dropdown_vacatures').className = 'dropdown';
				document.getElementById('dropdown_organisatie').className = 'dropdown_organisatie';}

				   if(a[i]=='organogram' || a[i]=='staf'){
					    clearTimeout(delay);}		

		   if(a[i]=='vacatures'){
				clearTimeout(delay);
				document.getElementById('dropdown_prod').className = 'dropdown';
				document.getElementById('dropdown_organisatie').className = 'dropdown';
				document.getElementById('dropdown_regios').className = 'dropdown';
				document.getElementById('dropdown_informatie').className = 'dropdown';
				document.getElementById('dropdown_vacatures').className = 'dropdown_vacatures';}
				
				   if(a[i]=='betaald' || a[i]=='vrijwillig'){
					    clearTimeout(delay);}		

		   if(a[i]=='informatie'){
				clearTimeout(delay);
				document.getElementById('dropdown_organisatie').className = 'dropdown';
				document.getElementById('dropdown_informatie').className = 'dropdown';
				document.getElementById('dropdown_contact').className = 'dropdown'
				document.getElementById('dropdown_vacatures').className = 'dropdown';
				document.getElementById('dropdown_informatie').className = 'dropdown_informatie';}

				   if(a[i]=='jaarverslag' || a[i]=='folders' || a[i]=='nieuwsbrief'){
					    clearTimeout(delay);}		

		   if(a[i]=='contact'){
				clearTimeout(delay);
				document.getElementById('dropdown_informatie').className = 'dropdown';
				document.getElementById('dropdown_contact').className = 'dropdown';
				document.getElementById('dropdown_contact').className = 'dropdown_contact';}
				   
				   if(a[i]=='contactformulier' || a[i]=='contactpersonen' || a[i]=='routebeschrijvingen'){
					    clearTimeout(delay);}	

	   ;}
	}
	
//Functie om in het 'nieuws toevoegen'-formulier te switchen tussen het dropdown menu en het uploadveld
function afbeelding_kiezen(x) {
  if (x == "1") { 
    /* dropdown weg -- upload verschijnen */
    document.getElementById('afbeelding_dropdown').className = 'afbeelding_dropdown-hide';
    document.getElementById('afbeelding_upload').className = 'afbeelding_upload-show';
    return;
    }

  if (x == "2") { 
    /* dropdown terug -- upload verdwijnen */ 
    document.getElementById('afbeelding_dropdown').className = 'afbeelding_dropdown-show';
    document.getElementById('afbeelding_upload').className = 'afbeelding_upload-hide';
    return;
    }

}
