function popupImage(url,ltekst,fotoid,breedte,hoogte){
//if(ie){
    var pauze=250; // 1 seconde = 1000
    AL.onmouseout=STOP; 
    AR.onmouseout=STOP; 
    AH.onmouseout=STOP; 

    myImg = new Image(); 
    myImg.src = url; 
//   var w = breedte*1.75; 
//    var h = hoogte*1.75;
    if (screen.width >= 1600) {var w = 1200;}
	   else { if (screen.width >= 1400) { var w = 1000;}
		else { if (screen.width >= 1200) { var w = 800;}
		 else { if (screen.width >= 1100) { var w = 700;}
        	else { if (screen.width >= 1000) { var w = 600;}
				else { if (screen.width >= 0) { var w = 500;}}}}}}	   
	var h = w *0.7429;
    var leftct = ((w - 100) / 2) +"px";
	var topct = h +5 +"px";
	var topkort = h + 30 +"px";
//  borderrand vanaf top is hier 5 genomen!!
	var topcc = 5 +"px";  
	var leftcc = 5 +"px"; 
	var tekst = "Hier afsluiten";
	var tekstk = ltekst.replace(/&quot;/gi,"\"");
	tekstk = tekstk.replace(/&prime;/gi,"'");
// Browsertest
     ie = (document.getElementById && document.all && document.styleSheets) ? true:false;
     nn = (document.getElementById && !document.all) ? true:false

if(document.getElementById){
//   if(ie||nn){
// CC: is de foto
// CM: is overall plaat
// CT: is tekst over afsluiten
// CTk komt onder de popup
        ZoomDiv=document.getElementById("Zoom");
	    CC=document.createElement("img");ZoomDiv.appendChild(CC);
		CM=document.createElement("p");ZoomDiv.appendChild(CM);
		CT=document.createElement("p");ZoomDiv.appendChild(CT);
		Zoomtxt=document.getElementById("Zoom");
		CTk=document.createElement("img1");Zoomtxt.appendChild(CTk);
		CTH=document.createElement("img1");Zoomtxt.appendChild(CTH);
 //       var textnode = document.createTextNode("Sluit dit venster");
        var textnode = document.createTextNode(tekst);CT.appendChild(textnode);
//		var textkort = document.createTextNode("t");CTk.appendChild(textkort);
        CTk.innerHTML = tekstk;
		ZoomDiv.style.width=w+"px";
//		Zoom.style.top=t+"px";
//		Zoom.style.left=l+"px";
		ZoomDiv.style.height=h+10+"px";
		
		CC.style.position=CT.style.position=CM.style.position=CTH.style.position=CTk.style.position="absolute";
		
		CC.style.zIndex=CM.style.zIndex=CTH.style.zIndex=61;
		CT.style.zIndex=63;CTk.style.zIndex=62;
		
        CC.style.height=h+"px";
        CC.style.width=w+"px";

		CC.style.top=ZoomDiv.style.top + topcc;
		CC.style.left=ZoomDiv.style.left + leftcc;
		CC.src = myImg.src;
		
		CM.style.height=h+20+"px";
        CM.style.width=w-5+"px";
	    CM.style.top=ZoomDiv.style.top;
//		CM.style.border = "3px outset #c04043"; 
		CM.style.border = "5px outset #BEBEBE"; 
		
	   	CT.style.top=CTH.style.top=ZoomDiv.style.top + topct;
		CT.style.width=93+"px";	
        CTH.style.width=w-5+"px";
		CT.style.color="black";
		CT.style.left=ZoomDiv.style.left + leftct;
		CTH.style.left=ZoomDiv.style.left + 5;
		CTH.style.height=20+"px"
//		CS.style.pointer="default";
//		CT.style.border = "3px outset #c04043";
     	CT.style.backgroundColor="white";
		CTH.style.backgroundColor="white";
//		CS.style.left=Zoom.style.left + leftcs;
//		CS.src = "Knoppen/stop.jpg";
		CT.onclick=verbergVenster;
    	CT.style.cursor="hand";
//	    this.style.border = "1px dotted red";

        CTk.style.top=ZoomDiv.style.top + topkort;
		CTk.style.width=w-5+"px";
		CTk.style.left=ZoomDiv.style.left ;
		CTk.style.height=100+"px";
//		CTk.style.backgroundColor="#B0E0E6";
		CTk.style.backgroundImage= "url(../Achtergrond/Rood_Achter_verticaal_2.jpg)";
		CTk.style.border = "5px outset #BEBEBE";
		if (ie){
   	    document.getElementById("Dark").style.filter = "blendtrans(duration=1.85)alpha(opacity=75)";	
		document.getElementById("Dark").filters.blendTrans.apply();														 		document.getElementById("Dark").style.visibility = "visible";
	    document.getElementById("Dark").filters.blendTrans.play();
 //    	document.getElementById("Dark").style.visibility = "visible";
//     	document.getElementById("Dark").style.filter = "revealTrans(duration=2,transition=12";
//		document.getElementById("Dark").filters.revealTrans.apply();														 		document.getElementById("Dark").style.visibility = "visible";
//		document.getElementById("Dark").filters.revealTrans.play();
    	document.getElementById("Zoom").style.filter = "revealTrans(duration=2,transition=1)";
		document.getElementById("Zoom").filters.revealTrans.apply();														 		document.getElementById("Zoom").style.visibility = "visible";
    	document.getElementById("Zoom").filters.revealTrans.play();}
//		setTimeout('document.getElementById("Zoom").style.visibility = "visible"',750);} 
		else{
    	document.getElementById("Dark").style.visibility = "visible";
		setTimeout('document.getElementById("Zoom").style.visibility = "visible"',500);} 
		HALT=true;
         }

	else alert("Dit script gebruikt \"getElementById\". Jouw browser kent deze tag niet.");}

function verbergVenster(){
	  //    this.style.cursor=this.lnk?"pointer":"default";
	//    document.getElementById("Zoom").style.visibility = "hidden";
		if (ie){
    	document.getElementById("Zoom").style.filter = "revealTrans(duration=1.85,transition=2)";
		document.getElementById("Zoom").filters.revealTrans.apply();														 		document.getElementById("Zoom").style.visibility = "hidden";
    	document.getElementById("Zoom").filters.revealTrans.play();
//    	document.getElementById("Dark").style.filter = "revealTrans(duration=1,transition=12";
   	    document.getElementById("Dark").style.filter = "blendtrans(duration=2)alpha(opacity=75)";												
		document.getElementById("Dark").filters.blendTrans.apply();														 		document.getElementById("Dark").style.visibility = "hidden";
	    document.getElementById("Dark").filters.blendTrans.play();}
//		document.getElementById("Dark").style.visibility = "hidden";}
		else{
        document.getElementById("Zoom").style.visibility = "hidden";
		document.getElementById("Dark").style.visibility = "hidden";}

		AL.onmouseout=START; 
        AR.onmouseout=START; 
        AH.onmouseout=START; 
  		HALT=false;}


