function pageWidth()
{return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;}
function pageHeight()
{return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;}
function posRight() {return posLeft()+pageWidth();}
function posBottom() {return posTop()+pageHeight();}

function plaatje (bestand, breed, hoog)
{
	rand=17;
	popup = document.getElementById("POPOP");
		
	// tijdelijk 'plaatje wordt geladen', wanneer geladen afmetingen aanpassen en laten zien 
	popup.style.backgroundImage="url(deafbeeldingwordtgeladen.gif)";
	// tijdelijke afmetingen
	popup.style.width = 185+'px';
	popup.style.height = 204+'px';

	// tijdelijke positie
	popup.style.top = Math.round((posTop()+posBottom())/2-106/2-rand) + 'px';
	popup.style.left = Math.round(pageWidth()/2-160/2-rand) + 'px';
	popup.style.display = 'block';
	
	// nu het echte plaatje gaan laden, als het binnen is dan weergeven
	var img = document.createElement('img');
	
	img.onload = function () {
			popup.style.display = 'none';
			popup = document.getElementById("POPOP");
			popup.style.backgroundImage="url("+bestand+".jpg"+")";
			
			hoogw = img.height + 2 * rand;
			popup.style.height = hoogw + 'px';
			topw=Math.round((posTop()+posBottom())/2-hoogw/2);
			if (topw<posTop()) topw=posTop()+5;
			popup.style.top = topw + 'px';
			
			breedw = img.width + 2 * rand;
			popup.style.width = breedw + 'px';
			browser=navigator.userAgent;
			//in forefox komtie niet exact in het midden. komt dat door scrollbar?
			if (browser.indexOf('Firefox')>0) {naarlinksschuiven=9;} else naarlinksschuiven=0;
			popup.style.left = Math.round(pageWidth()/2-breedw/2-naarlinksschuiven) + 'px';
			popup.style.display = 'block';
	 	};

	img.src=bestand+".jpg"; //deze moet na onload staan, anders werkt het niet goed in IE doordat de img al in de cache zit
	return true;
}

function plaatjeweg ()
{
	popup = document.getElementById("POPOP");
	popup.style.display = 'none';
	return true;
}


if (top != self) top.location = self.location;

document.write ('[<A HREF="index.html">welkom</a>] <B>&middot;</B> [<A HREF="lijsttekst.html">tekst-index</a>] <B>&middot;</B> [<A HREF="lijstfoto.html">foto-index</a>] <B>&middot;</B> [<A HREF="cijfers.html">statistieken</a>] <B>&middot;</B> [<A HREF="links.html">links</a>] <B>&middot;</B> [<A HREF="winkels.html">winkels</a>]');


