
/* preload images */
var arImages=new Array();
function Preload() {
 var temp = Preload.arguments; 
 for(x=0; x < temp.length; x++) {
  arImages[x]=new Image();
  arImages[x].src=Preload.arguments[x];
 }
}


/* generieke popup functie	*/	
function popup(url,hoogte,breedte)	{
	var height, width;
	if (document.all)
	    height = document.body.offsetHeight, width = document.body.offsetWidth;
	else if (document.layers)
	    height = window.innerHeight, width = window.innerWidth;
		
	var y = (height/4)-0, x = (width/4)-0;
	
	popupvenster = window.open(url,"venster","width="+breedte+",height="+hoogte+",toolbar=0,scrollbars=no,directories=0,status=0,menubar=0,location=0,resizable=0,top=" + y + ",screenY=" + y + ",left=" + x + ",screenX=" + x);

}
		
		
/* show/hide layers */	
function getStyle( layer ) {
	if( document.getElementById ) {
		return document.getElementById( layer ).style
		} 
	else if( document.all ) {
		return document.all[layer].style
		} 
	else {
		return document[layer]
		}
	}


function showLayer(laag)	{
	getStyle(laag).visibility = "visible";
	getStyle(laag).display = "inline";
	}
	
function hideLayer(laag)	{
	getStyle(laag).visibility = "hidden";
	getStyle(laag).display = "none";
	}

	
	/* empty formfield */
	function makeEmpty(myFormObject)	{
		myFormObject.value = "";
		}
		
	
	
/* grote fotos tonen in popup */	
function fotovergroten(jpgnaam,fotobreedte,fotohoogte,alttag)	{
	var height, width;
	if (document.all)
	    height = document.body.offsetHeight, width = document.body.offsetWidth;
	else if (document.layers)
	    height = window.innerHeight, width = window.innerWidth;
	
	var y = (height/2)-200, x = (width/2)-200; // default values
	if((!window.grotefotovenster) || (grotefotovenster.closed))	{
		grotefotovenster = window.open("about:blank","fotovenster","width=" + fotobreedte + ",height=" + fotohoogte + ",toolbar=0,scrollbars=0,directories=0,status=0,menubar=0,location=0,resizable=0,top=" + y + ",screenY=" + y + ",left=" + x + ",screenX=" + x);
		}
	grotefotovenster.document.location.href = "foto.php";
	setTimeout('update("' + jpgnaam + '", "' + alttag +  '")',500)	
}


function unloading() 
{
	if((window.grotefotovenster) && (!grotefotovenster.closed))	{
		grotefotovenster.close();
	}

}


window.onunload=unloading;	
	
function update(jpgnaam,alttag)	{
	grotefotovenster.document.theImage.src = "images/fotoboek/" + jpgnaam + ".jpg";
	grotefotovenster.document.theImage.alt = alttag;
	grotefotovenster.focus();
	grotefotovenster.document.title = alttag;
}		


	
	
