//benodigde functie voor foto overzichts bouwsteen
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var popupscherm=0;

function popup_afbeelding(filename, fileid, width, height, scrollbars, resizable, menubar, toolbar, status, location) {
	if (popupscherm && ! popupscherm.closed)	popupscherm.close();
	if (!filename || filename=="")				filename="http://www.pageprocessor.nl";
	if (!fileid || fileid=="")					fileid="PageProcessor";
	if (!width || width=="")					width="50";
	if (!height || height=="")					height="50";
	if (!scrollbars || scrollbars=="")			scrollbars="no";
	if (!resizable || resizable=="")			resizable="no";
	if (!menubar || menubar=="")				menubar="no";
	if (!toolbar || toolbar=="")				toolbar="no";
	if (!status || status=="")					status="no";
	if (!location || location=="")				location="no";
	popupscherm=0;
	var args = "height=" + height + ", width=" + width + ", scrollbars=" + scrollbars + ", resizable=" + resizable +  ", menubar=" + menubar + ", toolbar=" +toolbar + ", status=" + status + " ,location=" + location;
	popupscherm = open(filename, fileid, args);
	if (!InternetExplorer) 						popupscherm.focus();
}

/**rotating images on top of each page **/
	function showRotatingImage (value) {
		var sfeerbeeld  =  document.getElementById('img');
			if(!value || value == 'next'){
				showRotatingImage.nr++;
				if (showRotatingImage.nr >= imgArr.length)
					showRotatingImage.nr = 0;
			}
			if(value == 'prev'){
				showRotatingImage.nr = showRotatingImage.nr-1;
				if (showRotatingImage.nr < 0)
					showRotatingImage.nr = imgArr.length-1;
			}

			if (!sfeerbeeld)
				return false;
				sfeerbeeld.src = imgArr[showRotatingImage.nr];
				sfeerbeeld.title = altArr[showRotatingImage.nr];
			
			for(var i=0; i<showRotatingImage.timerId.length;i++)
					window.clearTimeout(showRotatingImage.timerId[i]);
			showRotatingImage.timerId = [];
			if (value == 'prev' || value == 'next')
				showRotatingImage.timerId[showRotatingImage.timerId.length] = window.setTimeout(showRotatingImage,8000);
			else
				showRotatingImage.timerId[showRotatingImage.timerId.length] = window.setTimeout(showRotatingImage,5000);
	}
	showRotatingImage.timerId = [];
	
	
/* drop down*/
function dropDown(ddid) { 
  if (
	document.getElementById(ddid).style.display == 'block') {
    document.getElementById(ddid).style.display = 'none';
	}
  else {
    document.getElementById(ddid).style.display = 'block'; 
    document.getElementById(ddid).style.position = 'absolute';
  }
};

function hideZoekOpties() {
  document.getElementById(ddid).style.display = 'none'; 
};
