function macAddict(){
if (navigator.appVersion.indexOf("Win") <= -1){
		if (window.navigator.appName == "Microsoft Internet Explorer"){
				if (location.href != 'index_mac_ie.asp'){
					location.href = 'index_mac_ie.asp';
							}
					}
			}
	}

function ExplorerFix() {
	for (a in document.links) document.links[a].onfocus = document.links[a].blur; 
	}
if(document.all) document.onmousedown = ExplorerFix;

function popup(text,titel,breite,hoehe) {
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-breite)/2, topPos = (h-hoehe)/2;

window.open('popup.asp?text=' + text + '&titel=' + titel,titel,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+breite+',height='+hoehe+',screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function openTheatre(){
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-800)/2, topPos = (h-566)/2;
window.open('theatre/vera.asp','Theatre','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=800px,height=566px,screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function openTheatreRuben(){
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-800)/2, topPos = (h-566)/2;
window.open('theatre/ruben.asp','Theatre','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=800px,height=566px,screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function openMail(){
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-500)/2, topPos = (h-500)/2;
window.open('blijf_op_de_hoogte.asp','Mail','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500px,height=500px,screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function openPolletje(){
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-550)/2, topPos = (h-500)/2;
window.open('igorsikorsky.asp','Polletje','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=550px,height=500px,screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function popup1jaar(text,titel,breite,hoehe,bars) {
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-breite)/2, topPos = (h-hoehe)/2;

window.open(text,'popup1jaar','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + bars + ',resizable=no,width='+breite+',height='+hoehe+',screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
}

function ImageExpander(oThumb, sImgSrc, sImgWidth, sImgHeight){
if (sImgWidth == '')
	{sImgWidth = 800}
if (sImgHeight == '')
	{sImgHeight = 600}
if (navigator.appVersion.indexOf("Win") <= -1){
	if (window.navigator.appName != "Microsoft Internet Explorer"){
	var w = screen.availWidth;
	var h = screen.availHeight;
	var leftPos = (w-sImgWidth)/2, topPos = (h-sImgHeight)/2;
	window.open(sImgSrc,'Vera','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + sImgWidth + 'px,height=' + sImgHeight + 'px,screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);return true;
	}
	else { alert("Hebbie een Mac? Bekijk de site dan liever niet met " + window.navigator.appName); }
	}
else if (window.navigator.appName != "Microsoft Internet Explorer"){
popup(sImgSrc,'Vera',sImgWidth,sImgHeight);
}
else {
	// store thumbnail image and overwrite its onclick handler.
	this.oThumb = oThumb;
	this.oThumb.expander = this;
	this.oThumb.onclick = function() { this.expander.expand(); }
	
	// record original size
	this.smallWidth = oThumb.offsetWidth;
	this.smallHeight = oThumb.offsetHeight;	

	this.bExpand = true;
	this.bTicks = false;
	
	// self organized list
	if ( !window.aImageExpanders )
	{
		window.aImageExpanders = new Array();
	}
	window.aImageExpanders.push(this);

	// create the full sized image.
	this.oImg = new Image();
	this.oImg.expander = this;
	this.oImg.onload = function(){this.expander.onload();}
	this.oImg.src = sImgSrc;
}
}

ImageExpander.prototype.onload = function()
{
	this.oDiv = document.createElement("div");
	document.body.appendChild(this.oDiv);
	this.oDiv.appendChild(this.oImg);
	this.oDiv.style.position = "absolute";
	this.oDiv.expander = this;
	this.oDiv.onclick = function() {this.expander.toggle();};
	this.oImg.title = "Klik om te verkleinen.";
	this.bigWidth = this.oImg.width;
	this.bigHeight = this.oImg.height;
	
	if ( this.bExpand )
	{
		this.expand();
	}
	else
	{
		this.oDiv.style.visibility = "hidden";
		this.oImg.style.visibility = "hidden";
	}
}
ImageExpander.prototype.toggle = function()
{
	this.bExpand = !this.bExpand;
	if ( this.bExpand )
	{
		for ( var i in window.aImageExpanders )
			if ( window.aImageExpanders[i] !== this )
				window.aImageExpanders[i].reduce();
	}
}
ImageExpander.prototype.expand = function()
{
	// set direction of expansion.
	this.bExpand = true;

	// set all other images to reduce
	for ( var i in window.aImageExpanders )
		if ( window.aImageExpanders[i] !== this )
			window.aImageExpanders[i].reduce();

	// if not loaded, don't continue just yet
	if ( !this.oDiv ) return;
	
	// hide the thumbnail
	this.oThumb.style.visibility = "hidden";
	
	// calculate initial dimensions
	this.x = this.oThumb.offsetLeft;
	this.y = this.oThumb.offsetTop;
	this.w = this.oThumb.clientWidth;
	this.h = this.oThumb.clientHeight;
	
	this.oDiv.style.left = this.x + "px";
	this.oDiv.style.top = this.y + "px";
	this.oImg.style.width = this.w + "px";
	this.oImg.style.height = this.h + "px";
	this.oDiv.style.visibility = "visible";
	this.oDiv.style.zIndex  = "100";
	this.oImg.style.visibility = "visible";
	
	// start the animation engine.
	if ( !this.bTicks )
	{
		this.bTicks = true;
		var pThis = this;
		window.setTimeout(function(){pThis.tick();},25);	
	}
}
ImageExpander.prototype.reduce = function()
{
	// set direction of expansion.
	this.bExpand = false;
}
ImageExpander.prototype.tick = function()
{
	// calculate screen dimensions
	var cw = document.body.clientWidth;
	var ch = document.body.clientHeight;
	var cx = document.body.scrollLeft + cw / 2;
	var cy = document.body.scrollTop + ch / 2;

	// calculate target
	var tw,th,tx,ty;
	if ( this.bExpand )
	{
		tw = this.bigWidth;
		th = this.bigHeight;
		if ( tw > cw )
		{
			th *= cw / tw;
			tw = cw;
		}	
		if ( th > ch )
		{
			tw *= ch / th;
			th = ch;
		}
		tx = cx - tw / 2;
		ty = cy - th / 2; 
	}
	else
	{
		tw = this.smallWidth;
		th = this.smallHeight;
		tx = this.oThumb.offsetLeft;
		ty = this.oThumb.offsetTop;
	}	
	// move 5% closer to target
	var nHit = 0;
	var fMove = function(n,tn) 
	{
		var dn = tn - n;
		if ( Math.abs(dn) < 3 )
		{
			nHit++;
			return tn;
		}
		else
		{
			return n + dn / 10;
		}
	}
	this.x = fMove(this.x, tx);
	this.y = fMove(this.y, ty);
	this.w = fMove(this.w, tw);
	this.h = fMove(this.h, th);
	
	this.oDiv.style.left = this.x + "px";
	this.oDiv.style.top = this.y + "px";
	this.oImg.style.width = this.w + "px";
	this.oImg.style.height = this.h + "px";

	// if reducing and size/position is a match, stop the tick	
	if ( !this.bExpand && (nHit == 4) )
	{
		this.oImg.style.visibility = "hidden";
		this.oDiv.style.visibility = "hidden";
		this.oThumb.style.visibility = "visible";

		this.bTicks = false;
	}
	
	if ( this.bTicks )
	{
		var pThis = this;
		window.setTimeout(function(){pThis.tick();},25);
	}
}
// mouseovers

if (document.images)
        {		dooron = new Image();
                dooron.src = "img/door_opening.gif";
                dooroff = new Image();
                dooroff.src = "img/door_closing.gif";
				
				door2006on = new Image();
                door2006on.src = "img/door_opening_2006.gif";
                door2006off = new Image();
                door2006off.src = "img/door_closing_2006.gif";
				
				door2007on = new Image();
                door2007on.src = "img/door_opening_2007.gif";
                door2007off = new Image();
                door2007off.src = "img/door_closing_2007.gif";
				
				lifton = new Image();
                lifton.src = "img/lift_opening.gif";
                liftoff = new Image();
                liftoff.src = "img/lift_closing.gif";
				
				prevyearon = new Image();
                prevyearon.src = "img/backto_2004_on.gif";
                prevyearoff = new Image();
                prevyearoff.src = "img/backto_2004_off.gif";
				
				prevyear2005on = new Image();
                prevyear2005on.src = "img/backto_2005_1_on.gif";
                prevyear2005off = new Image();
                prevyear2005off.src = "img/backto_2005_1_off.gif";
				
				prevyear20052on = new Image();
                prevyear20052on.src = "img/backto_2005_on.gif";
                prevyear20052off = new Image();
                prevyear20052off.src = "img/backto_2005_off.gif"; 
				
				prevyear2006on = new Image();
                prevyear2006on.src = "img/backto_2006_1_on.gif";
                prevyear2006off = new Image();
                prevyear2006off.src = "img/backto_2006_1_off.gif";
				
				prevyear20062on = new Image();
                prevyear20062on.src = "img/backto_2006_on.gif";
                prevyear20062off = new Image();
                prevyear20062off.src = "img/backto_2006_off.gif"; 
				
				prevyear2007on = new Image();
                prevyear2007on.src = "img/backto_2007_1_on.gif";
                prevyear2007off = new Image();
                prevyear2007off.src = "img/backto_2007_1_off.gif"; 
				
				prevyear20072on = new Image();
                prevyear20072on.src = "img/backto_2007_on.gif";
                prevyear20072off = new Image();
                prevyear20072off.src = "img/backto_2007_off.gif"; 
				
				prevyear2008on = new Image();
                prevyear2008on.src = "img/backto_2008_1_on.gif";
                prevyear2008off = new Image();
                prevyear2008off.src = "img/backto_2008_1_off.gif"; 
				
				prevyear20082on = new Image();
                prevyear20082on.src = "img/backto_2008_on.gif";
                prevyear20082off = new Image();
                prevyear20082off.src = "img/backto_2008_off.gif"; 
				
				nextyearon = new Image();
                nextyearon.src = "img/to_2005_on.gif";
                nextyearoff = new Image();
                nextyearoff.src = "img/to_2005_off.gif";
				
				nextyear2on = new Image();
                nextyear2on.src = "img/to_2005_2_on.gif";
                nextyear2off = new Image();
                nextyear2off.src = "img/to_2005_2_off.gif";
				
				nextyear3on = new Image();
                nextyear3on.src = "img/to_2006_on.gif";
                nextyear3off = new Image();
                nextyear3off.src = "img/to_2006_off.gif";
				
				nextyear4on = new Image();
                nextyear4on.src = "img/to_2007_on.gif";
                nextyear4off = new Image();
                nextyear4off.src = "img/to_2007_off.gif";
				
				nextyear5on = new Image();
                nextyear5on.src = "img/to_2006_2_on.gif";
                nextyear5off = new Image();
                nextyear5off.src = "img/to_2006_2_off.gif";

				nextyear6on = new Image();
                nextyear6on.src = "img/to_2007_2_on.gif";
                nextyear6off = new Image();
                nextyear6off.src = "img/to_2007_2_off.gif";

				nextyear20082on = new Image();
                nextyear20082on.src = "img/to_2008_2_on.gif";
                nextyear20082off = new Image();
                nextyear20082off.src = "img/to_2008_2_off.gif";

				nextyear2009on = new Image();
                nextyear2009on.src = "img/to_2009_on.gif";
                nextyear2009off = new Image();
                nextyear2009off.src = "img/to_2009_off.gif";

				mailon = new Image();
                mailon.src = "img/blijfopdehoogte_o.gif";
                mailoff = new Image();
                mailoff.src = "img/blijfopdehoogte.gif";
				
				filmzaalon = new Image();
                filmzaalon.src = "img/filmzaal_o.gif";
                filmzaaloff = new Image();
                filmzaaloff.src = "img/filmzaal.gif";
				
				pedigreeon = new Image();
                pedigreeon.src = "img/pedigree_o.gif";
                pedigreeoff = new Image();
                pedigreeoff.src = "img/pedigree.gif"; 
				
				pedigree_rubenon = new Image();
                pedigree_rubenon.src = "/img/pedigree_ruben_o.gif";
                pedigree_rubenoff = new Image();
                pedigree_rubenoff.src = "/img/pedigree_ruben.gif";                       
            
                }

        function turnOn(imageName)
        {
                if (document.images)
                {
                document[imageName].src = eval(imageName + "on.src");
                }
        }

        function turnOff(imageName)
        {
                if (document.images)
                {
                document[imageName].src = eval(imageName + "off.src");
                }
        }
		
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function init() {
        if (ns4) block = document.blockDiv
        if (ie4) block = blockDiv.style
}

// Show/Hide functions for pointer objects

function showObject(obj) {
        if (ns4) obj.display = "block"
        else if (ie4) obj.display = "block"
}

function hideObject(obj) {
        if (ns4) obj.display = "none"
        else if (ie4) obj.display = "none"
}

