/*
# scripts.js
#
# v1.0 - 01/jul/2005 - Bob Kersten - Initial version
#
# (C) Copyright 2005 Fellownet
# All rights reserved.
*/

cindex = -1;
naam_old = -1;

app = navigator.appName;
ver = navigator.appVersion;
mac = ver.indexOf("Macintosh") > 0;
win = ver.indexOf("Win") > 0;
vnum = parseFloat(ver);
 magOok = (((app == "Netscape") && (vnum >= 3 )) ||
       ((mac) && (app == "Microsoft Internet Explorer") && (vnum >= 3.01 )) ||
       ((win) && (app == "Microsoft Internet Explorer") && (vnum >= 4 ))) ;
if (magOok) 
         {
// vul het aantal roll-over plaatjes in
          off = new MakeImageArray(5);
          over = new MakeImageArray(5);
          down = new MakeImageArray(5)

		  // vul hier de off-toestand van de plaatjes in
           off[0].src = "images/btn-nieuws.jpg";
           off[1].src = "images/btn-agenda.jpg";
           off[2].src = "images/btn-fotos.jpg";
           off[3].src = "images/btn-gastenboek.jpg";
           off[4].src = "images/btn-links.jpg";
// vul hier de over-toestand in
           over[0].src = "images/btn-nieuws-1.gif";
           over[1].src = "images/btn-agenda-1.gif";
           over[2].src = "images/btn-fotos-1.gif";
           over[3].src = "images/btn-gastenboek-1.gif";
           over[4].src = "images/btn-links-1.gif";
// en ook de down-toestand
           down[0].src = "images/btn-nieuws-1.gif";
           down[1].src = "images/btn-agenda-1.gif";
           down[2].src = "images/btn-fotos-1.gif";
           down[3].src = "images/btn-gastenboek-1.gif";
           down[4].src = "images/btn-links-1.gif";
}
function MakeImageArray(n) {
    this.length = n;
    for (var i = 0; i<=n; i++) {
        this[i] = new Image();
    }
    return this;
}
function mOver(num,pos) {
    if (document.images) {
        if ((over[num].src != "") && (num != cindex)) {
            document.images[pos].src = over[num].src;
        }
    }
}
function mOut(num,pos) {
    if (document.images) {
        if ((off[num].src != "") && (num != cindex)) {
            document.images[pos].src = off[num].src;
        }
    }                   
}
function mClick(num,pos) {
    if (document.images) {
        if ((down[num].src != "")) {
            if (cindex != -1) {
                document.images[naam_old].src = off[cindex].src;
            }
            document.images[pos].src = down[num].src;
            cindex = num;
            naam_old = pos;
        }
    }
}

function openImage (which, width, height) {
	w = width;
	h = height;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	msg = window.open ("afbeelding.php?afbeelding=" + which, "msg", "toolbar=no,width=" + w + ",height=" + h + ",directories=no,resizable=no,status=no,scrollbars=no,menubar=no,location=no,left=" + l + ",screenX=" + l + ",top=" + t + ",screenY=" + t);
	msg.focus ();
}

