
	var timeout = null;
	var imgWidth = 0;
	var eleimg = null;

	function showVergrootTekst(){
		
		if(!document.getElementById('tekst_cont')){
		
			var ele = document.createElement('div'); 
			ele.setAttribute('id','tekst_cont');
			ele.onmouseover = function(){cancleHide()};
			ele.innerHTML = "Vergroot de afbeelding";
			ele.onclick=function(){showFullFoto('contact-route-full.jpg');};
		
			this.timeout = document.getElementById('foto_holder').appendChild(ele);
		}
	}

	function cancleHide(){
		
		clearTimeout(this.timeout);
	}

	
	function hideVergrootTekst(){
	
		var parent1 = null;
		var ele = document.getElementById('tekst_cont');
		
		if(ele.parentElement!=null)parent1 =  ele.parentElement; 
		if(ele.parentNode !=null )parent1 =  ele.parentNode;
		this.timeout = setTimeout(function(){parent1.removeChild(ele);}, 50);
	
	}
	
	
	function showFullFoto(naam){
	
		if(!document.getElementById('show_cont') && !document.getElementById('show_bg')){
			var count=0;
			this.imgWidth=0;
		
			eleimg = document.createElement('img');
			eleimg.src = './template/image/'+naam;
			eleimg.onload = function(){ imgWidth=(typeof eleimg.naturalWidth == "undefined") ? eleimg.naturalWidth : eleimg.width; };
											
			setTimeout(function(){ showAll(eleimg);},50);
		}
	}
	
	/*
		FUNCTIE OM HET SCHERM TE LATEN ZIEN;
	*/
	function showAll(){
			//alert(eleimg.complete);
			if(this.imgWidth!=0 || eleimg.complete){
				//alert(eleimg.height);
				var imgHeight = (typeof eleimg.naturalHeight != "undefined") ? eleimg.naturalHeight : eleimg.height;
				var imgWidth = (typeof eleimg.naturalWidth != "undefined") ? eleimg.naturalWidth : eleimg.width;
								
				var elebg = document.createElement('div'); 
				elebg.setAttribute('id','show_bg');
				elebg.innerHTML = "&nbsp;";
				elebg.style.height = document.getElementById("main").offsetHeight;
		
				var ele1 = document.createElement('div'); 
				ele1.setAttribute('id','show_cont');
				document.body.appendChild(elebg);
				document.body.appendChild(ele1);
				
				ele1.appendChild(eleimg);
											
				var eleTekst = document.createElement('div');
				eleTekst.setAttribute('id','fullfoto_tekst');
				document.body.appendChild(eleTekst);
							
				var eleSluitKnop = document.createElement('img');
				eleSluitKnop.setAttribute('id','sluitknop');
				eleSluitKnop.src = './template/image/contact-sluit-knop.gif';
				document.body.appendChild(eleSluitKnop);
								
				ele1.style.width = (imgWidth)+"px";
				ele1.style.height = (imgHeight)+"px";
				ele1.style.padding = "13px";
				ele1.style.marginTop =  "-"+Math.round((imgHeight) /2)+"px";
				ele1.style.marginLeft =  "-"+Math.round((imgWidth) /2)-13+"px";
				
				eleTekst.style.left = ele1.offsetLeft;
				eleTekst.style.top = ele1.offsetTop + ele1.offsetHeight;
				
				if(navigator.appName!= "Microsoft Internet Explorer"){
					eleTekst.style.width = (imgWidth)+"px" ;
				}else{
					eleTekst.style.width = (imgWidth+26)+"px" ;
				}
				
				eleTekst.style.padding = "13px";
				eleTekst.innerHTML = "<span>Omschrijving:</span> Afbeelding route naar Scoot Media.";
				
				
				eleSluitKnop.style.top = ele1.offsetTop;
				eleSluitKnop.style.left = (ele1.offsetLeft+ ele1.offsetWidth + 30) +"px";
			
				eleSluitKnop.onclick = function(){hideFullFoto()};
				
			}else{
				setTimeout(function(){ showAll(eleimg);},50)
			}
	}
	
	
	
	function hideFullFoto(){
	
		var ele1 = document.getElementById('sluitknop');
		var ele2 = document.getElementById('fullfoto_tekst');
		var ele3 = document.getElementById('show_cont');
		var ele4 = document.getElementById('show_bg');
		
		
		document.body.removeChild(ele1);
		document.body.removeChild(ele2);
		document.body.removeChild(ele3);
		document.body.removeChild(ele4);
		
	}
	
	