function display_email(name, company)
{

	location.href = 'mailto:' + name + "@" + company ;
	//document.write('<a href="mailto:\"' + name + "@" + company + '\">' + name + "@" + company + '</a>');
}


 function toggle( targetId )
 {
 	 if (document.getElementById)
 	 {
        target = document.getElementById( targetId );
		
        if (target.style.display == "none" || target.style.display == "")
        {
        	
              target.style.display = "block";
        } 
        else 
        {
        	
              target.style.display = "none";
        }
     }
 }
 
 
 
 
 
function setBodyHeight()
{

	var scnWid,scnHei;
	if (self.innerHeight) // all except Explorer
	{
		scnWid = self.innerWidth;
		scnHei = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		scnWid = document.documentElement.clientWidth; 
		scnHei = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		scnWid = document.body.clientWidth;
		scnHei = document.body.clientHeight;
	}
	
	document.getElementById('content').style.height = (scnHei-231 +"px");

	document.getElementById('add').style.height = (scnHei-222 +"px");
	document.getElementById('shadow_left').style.height = (scnHei-4 +"px");
	document.getElementById('shadow_right').style.height = (scnHei-4 +"px");
	
	
	document.getElementById('shadow_bottom').style.top = (scnHei-68 +"px");
	document.getElementById('shadow_below_container').style.left = ((scnWid-891)/2 +"px");
	document.getElementById('loader').style.left = (((scnWid/2)-200) +"px");
	
	
	
	
	if(document.getElementById('content-loaded').style.display=='none')
	{
		// image preloader
		
		
     // counter
	     var i = 0;
	
	
	     // create object
	     imageObj = new Image();
	
	
	     // set image list
	     images = new Array();
	     images[0]="templates/img/background-content.png";
	     images[1]="templates/img/bg_shadow_left_white.gif";
	     images[2]="templates/img/bg_shadow_right_white.gif";
	     images[3]="templates/img/btn_2msessies.gif";
	     images[4]="templates/img/btn_boekingen.gif";
	     images[5]="templates/img/btn_contact.gif";
	     images[6]="templates/img/btn_double2.gif";
	     images[7]="templates/img/btn_engels.gif";
	     images[8]="templates/img/btn_home.gif";
	     images[9]="templates/img/btn_links.gif";
	     images[10]="templates/img/btn_media.gif";
	     images[11]="templates/img/btn_nieuws.gif";
	     images[12]="templates/img/btn_producties.gif";
	     images[13]="templates/img/btn_team.gif";
	     images[14]="templates/img/btn_vacatures.gif";
	     images[15]="templates/img/footer.gif";
	     images[16]="templates/img/header-top.jpg";
	     images[17]="templates/img/shadow_absolute_bottom_white.png";
	     images[18]="templates/img/shadow_absolute_top_white.png";
	     images[19]="templates/img/footer.gif";
	     images[20]="templates/img/shadow_bottom.png";
	     images[21]="templates/img/shadow_top.png";
	   
	    
	
	
	     // start preloading
	     for(i=0; i<=21;i++) 
	     {
	        document.getElementById('loading_status').innerHTML = images[i] + ' wordt geladen..';  
	     	
	        imageObj = new Image();
	        imageObj.src=images[i];
			     	
	     	//alert(imageObj.compleet);
	          
	     }


		
		
		//alert(document.getElementById('page_loader').style.display);
		toggle('page_loader');
	//	alert(document.getElementById('page_loader').style.display);
		
	//	alert('nu content');
		
	//	alert(document.getElementById('content-loaded').style.display);
		toggle('content-loaded');
	//	alert(document.getElementById('content-loaded').style.display);
	
	}

}




		
function hideAllSubmenu()
{
	document.getElementById('News').style.display='none';
	//document.getElementById('TeamSub').style.display='none';
	document.getElementById('ProductiesSub').style.display='none';
	document.getElementById('MediaSub').style.display='none';
	
	
}
function submenu(id)
{
	hideAllSubmenu();
	var element;
	element = document.getElementById(id);
	element.style.display='';
}	




	function ajaxLoader(url,id) {
				 el = document.getElementById(id);
			        el.innerHTML = '<div style="text-align:center;width:750px;"><img src="templates/double2_loader.gif" alt="loading, please wait" border="0"/><br />Laden, een ogenblik geduld...</div>';
			  if (document.getElementById) {
			    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
			  }
			  if (x) {
			    x.onreadystatechange = function() {
			      if (x.readyState == 4 && x.status == 200) {
			     
			        el.innerHTML = x.responseText;
			      }
			    }
			    x.open("GET", url, true);
			    x.send(null);
			  }
			}
			
			
function bigimage(url,fotoid,fotoarray)
 {
	
 	//document.getElementById('groot-image').onload = 'javascript:imageloaded();';
 	
document.getElementById('groot-image-reeks').style.display='none';
 document.getElementById('foto_controls').style.display='none';
 	

 		toggle('loader');
 		if(navigator.vendor == "Apple Computer, Inc.")
	 	{
	 		toggle('imageenlarger');
		}
		else
		{
	 		toggle("loader");
		}
	
 	document.getElementById('groot-image').src = url;
 	document.getElementById('groot-image').style.display='block';
	
 	
 }
 
 
 function bigimagecontroll(url,fotoid,fotoarray,first)
 {
 
	var fotos = fotoarray.split(":");
 	
 	var intFotoid = parseInt(fotoid);
	
	document.getElementById('groot-image-reeks').style.display='block';
	document.getElementById('groot-image').style.display='none';
 	document.getElementById('groot-image-reeks').src = url;
 	
 	document.getElementById('loader').style.display='none';
	document.getElementById('imageenlarger').style.display='block';
	document.getElementById('foto_controls').style.display='block';
// 	toggle('imageenlarger');
 	
 	if(fotos[intFotoid-1])
 	{
 		document.getElementById('foto_control_vorige').href ="javascript:bigimagecontroll('"+fotos[intFotoid-1]+"','"+(intFotoid-1)+"','"+fotoarray+"','false');";
 		document.getElementById('foto_control_vorige').innerHTML ='Vorige foto';	
 	}
 	else
 	{
 		document.getElementById('foto_control_vorige').innerHTML ='';	
 	}
 	if(fotos[intFotoid+1])
 	{
 		document.getElementById('foto_control_volgende').href ="javascript:bigimagecontroll('"+fotos[intFotoid+1]+"','"+(intFotoid+1)+"','"+fotoarray+"','false');";
 		document.getElementById('foto_control_volgende').innerHTML ='volgende foto';	
 	}
 	else
 	{
 		document.getElementById('foto_control_volgende').innerHTML ='';	
 	}
	
 	
 	var imageWidth =''// document.getElementById('groot-image').width;
		ImageSource = (document.getElementById('groot-image-reeks').src);
	
	 	
	 	if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  winW = window.innerWidth-16;
		 	  //document.getElementById('imageenlarger').style.width = imageWidth + "px";
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  winW = document.body.offsetWidth-20;
		  
		 }
		}
		
		
		
	
		// If no image width was passed - preload the image then grab the width
		//value from the preloaded image
		theImage = new Image();
		theImage.src = ImageSource;
		imageWidth = theImage.width;
				
		if(imageWidth<1)
		{
			imageWidth = 600;
		}
		
		var imageLeft = (winW/2) - (imageWidth/2);
		document.getElementById('foto_controls').style.width = imageWidth + 'px';
		document.getElementById('imageenlarger').style.width = imageWidth + 'px';
		document.getElementById('imageenlarger').style.left = imageLeft + 'px';
		
		
 }
 
  function imageloaded(doen)
 {
	
	 	var imageWidth =''// document.getElementById('groot-image').width;
		ImageSource = (document.getElementById('groot-image').src);
	
	 	
	 	if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  winW = window.innerWidth-16;
		 	  //document.getElementById('imageenlarger').style.width = imageWidth + "px";
		 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  winW = document.body.offsetWidth-20;
		  
		 }
		}
		
		
		
		if ( imageWidth == '' || typeof( imageWidth ) == "undefined" ) {
		// If no image width was passed - preload the image then grab the width
		//value from the preloaded image
		theImage = new Image();
		theImage.src = ImageSource;
		imageWidth = theImage.width;
}
		
		
	//	alert(imageWidth);
		
		var imageLeft = (winW/2) - (imageWidth/2);
		
	//	alert(imageWidth);
		//document.write("<style>#imageenlarger{left:-" + imageLeft +";}</style>");
		
	document.getElementById('imageenlarger').style.left = imageLeft + 'px';
	document.getElementById('imageenlarger').style.width = imageWidth + 'px';
	document.getElementById('foto_controls').style.width = imageWidth + 'px';
	
		//alert(document.getElementById('imageenlarger').style.left);
	 	if(navigator.vendor != "Apple Computer, Inc.")
	 	{
		 	toggle('imageenlarger');
		 	toggle('loader');
	 	}
	 	
	 	if(imageWidth==0 || imageWidth=='')
		{
			if(document.getElementById('imageenlarger').offsetWidth)
			{
				var imageLeft = (winW - document.getElementById('imageenlarger').offsetWidth) /2
				//document.getElementById('imageenlarger').style.left = imageLeft + 'px';
			}
		}
	
 }