<!-- 
// Dit script is gemaakt door mark knol @ proximedia.nl
// Deze versie laadt een plaatje in een popupvenster 
// zonder witte randen en pakt automatisch de goede maat.

function Foto(img,txt){
 foto1= new Image();
 foto1.src=(img);
 CheckFoto(img,txt);
}
function CheckFoto(img,txt){
 if((foto1.width!=0)&&(foto1.height!=0)){
 viewFoto(img,txt);
}
else{
 uitvoering="CheckFoto('"+img+"','"+txt+"')";
 interval=setTimeout(uitvoering,20);
}
}
function viewFoto(img,txt){
 imgbreedte=foto1.width;
 imghoogte=foto1.height;
 if (!txt) {txt=img}
 vars="width="+imgbreedte+",height="+imghoogte+",left="+((screen.width-imgbreedte)/2)+",top="+((screen.height-imghoogte)/2)+",scrollbars=no,resize=no,menubar=no";
 newwindow=window.open("","nieuwvenster",vars);
 newwindow.document.write("<html>\n<head>\n<title>"+txt+"</title>\n");
 newwindow.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\">\n");
 newwindow.document.write("</head>\n\n<body style=\"margin:0px; padding:0px;\" onBlur=\"window.close()\">\n"); 
 newwindow.document.write("<img src=\""+img+"\" border=\"0\" onclick=\"javascript:window.close()\">\n"); 
 newwindow.document.write("</body>\n</html>\n"); 
 if (newwindow.document.focus) {newwindow.document.focus();}
 newwindow.document.close(); 
}

// Popupvenster voor html-pagina's

function popitup(url) {
	newwindow=window.open(url,'nieuwvenster','width=750,height=500,status=yes,scrollbars=yes,resizable=yes,left='+((screen.width-750)/2)+',top='+((screen.height-500)/2));
	if (window.focus) {newwindow.focus()}
	return false;
}


var alphaNum;
function fade(elmnt2){
	var okee = elmnt2;
	alphaNum+=4;	
	object = document.getElementById(elmnt2).style;
    object.opacity = (alphaNum / 100);
    object.filter = "alpha(opacity=" + alphaNum + ")";	
	if (alphaNum < 100) {		
		uitvoering2="fade('"+elmnt2+"')";
		setTimeout(uitvoering2,20);		
	} 
	if (!alphaNum) {
		alphaNum =10;
		uitvoering2="fade('"+okee+"')";
		setTimeout(uitvoering2,10);
	}
} 

// VRAGENBAK
// MEDE MOGELIJK GEMAAKT DOOR MARTIJN FRANSEN. 
// extra functie toegevoegd: automatisch inklappen voor andere vragen
function kweekmaterialen(elmnt) {
totaalaantalvragen = 5;
// verander dit naar het totaal aantal vragen.

var DHTML = (document.getElementById || document.all || document.layers);
if ( !DHTML ) alert('Uw browser ondersteund geen DHTML');

function getObj(name) {
	if (document.getElementById) {
		this.style = document.getElementById(name).style;
	} else
	if (document.all) {
		this.style = document.all[name].style;
	} else
	if (document.layers) {
		this.style = document.layers[name];
	}
}

for (m = 0; m < totaalaantalvragen+1; m++) {	
	vragenbak= new getObj("v"+m);	
	if (m == elmnt) {
		alphaNum = 10;
		vragenbak.style.display="block";		
    	vragenbak.style.opacity = (alphaNum / 100);
	    vragenbak.style.filter = "alpha(opacity=" + alphaNum + ")"; 
		fade("v"+m);
	} else {		
		vragenbak.style.display="none";
	}
} 


}

// drolover

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '2'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('2'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;



//  einde script 
-->
