var BGHeights = new Array();
var BGWidths = new Array();
var BackgroundImages = new Array();
var BackgroundNames = new Array();
var IDees;
var L = 0;
var Opacity = 1; // starting with changing to new pic (start NIET met 0)
var TIMER_USP_HIDE = null;
var TIMER_USP_SHOW = null;
var changingHeights = new Array ();
var changingThumbs = new Array(); //for homepage changethumbs
var changingWidths = new Array();
var inum = 0;
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var isLoaded = 0;
var isNetscape = (navigator.appName == "Netscape");
var lastThumb = 0;
var last_active_element = null;
var last_element = new Array(); //content in usp table
last_element[0] = "";
var mixTime = 50; // 30 x 50 milliseconden voor de hele overgan
var nextTime = 3010;
var next_element = null;
var prevHeight = 0;
var prevWidth = 0;
var previous_active_element = null;
var startTime = 3010;
var usp_text0 = new Array(); //default text in usp table
usp_text0[0] = "";
//plaatjes in elkaar overvloeien:
var visitordata = new Cookie(document, "sitegen_pmc",240);
function $id(x){return document.getElementById(x)};
function Cookie(document, name, hours, path, domain, secure)
{
    this.$document = document;
    this.$name = name;
    if (hours)
        this.$expiration = new Date((new Date()).getTime() + hours*3600000);
    else this.$expiration = null;
    if (path) this.$path = path; else this.$path = null;
    if (domain) this.$domain = domain; else this.$domain = null;
    if (secure) this.$secure = true; else this.$secure = false;
}
Cookie.prototype.load = function() {
    var allcookies = this.$document.cookie;
    if (allcookies == "") return false;
    var start = allcookies.indexOf(this.$name + '=');
    if (start == -1) return false; // Cookie not defined for this page.
    start += this.$name.length + 1; // Skip name and equals sign.
    var end = allcookies.indexOf(';', start);
    if (end == -1) end = allcookies.length;
    var cookieval = allcookies.substring(start, end);
    var a = cookieval.split('&'); // Break it into array of name/value pairs.
    for(var i=0; i < a.length; i++) // Break each pair into an array.
        a[i] = a[i].split(':');
    for(var i = 0; i < a.length; i++) {
        this[a[i][0]] = unescape(a[i][1]);
    }
    return true;
}
Cookie.prototype.remove = function() {
    var cookie;
    cookie = this.$name + '=';
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';
    this.$document.cookie = cookie;
}
// go right away only for FireFox::
if (!isIE) {
if (visitordata.load()) {
    if (visitordata.lastbackgroundselector && visitordata.lastbackgrounddeclaration) {
    var selector = visitordata.lastbackgroundselector;
    var declaration = visitordata.lastbackgrounddeclaration;
// alert("vorige background selector: " + selector + "Declaration:" + declaration);
    setCssStyleScreenOnly(selector, declaration);
// alert("set previous!!");
}
}
}
Cookie.prototype.store = function () {
    var cookieval = "";
    for(var prop in this) {
        // Ignore properties with names that begin with '$' and also methods.
        if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function'))
            continue;
        if (cookieval != "") cookieval += '&';
        cookieval += prop + ':' + escape(this[prop]);
    }
    // Now that we have the value of the cookie, put together the
    // complete cookie string, which includes the name and the various
    // attributes specified when the Cookie object was created.
    var cookie = this.$name + '=' + cookieval;
    if (this.$expiration)
        cookie += '; expires=' + this.$expiration.toGMTString();
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    if (this.$secure) cookie += '; secure';
    this.$document.cookie = cookie;
}
function afterLoad() {
//records isLoaded and does onResize()
isLoaded = 1;
onLoadFunctions();
onResize();
}
function backgroundimage() {
// for setting the background image when resizing, called from onresize event
    if (!isLoaded) return;
   var picnum = getPicNum();
// var body0 = $id("bodybody");
// screen only!!
var selector = "body";
var declaration = "background-image:url("+BackgroundNames[picnum]+")";
//alert("set background image" + declaration);
var i = picnum;
if (BackgroundImages[i] == null) {
    BackgroundImages[i] = new Image(BGWidth[i], BGHeight[i]);
    BackgroundImages[i].src = BGName[i];
}
setCssStyleScreenOnly(selector, declaration);
var firstTime = 1;
if (!isIE) {
// load cookie data and put back if declaration changed (window size changed, or new)
visitordata.load();
if (visitordata.lastbackgroundselector != selector || visitordata.lastbackgrounddeclaration != declaration) {
    firstTime = 1;
    visitordata.lastbackgroundselector = selector;
    visitordata.lastbackgrounddeclaration = declaration;
    visitordata.store();
// alert("new cookie data");
}
else
    firstTime = 0;
}
declaration = "background-color: black";
setCssStyleScreenOnly(selector, declaration);
if (firstTime) {
// fill the preload images:
// body0.style.backgroundImage = "url("+BackgroundNames[picnum]+")";
    for (i=0; i<nBGImages; i++) {
    if (BackgroundImages[i] == null && i != picnum) {
        BackgroundImages[i] = new Image(BGWidths[i], BGHeights[i]);
        BackgroundImages[i].src = BackgroundNames[i];
    }
    }
    }
}
function backgroundimageoptions(key, value) {
 // take 'body' selector, put in setCssStyleOnly tag
var selector = "body";
var declaration = key + ":" + value;
setCssStyleScreenOnly(selector, declaration);
}
function bodyHeight(subtract) {
// do at changing size also on load (through onResizeFunctions)
// expecting a div with id "body0" setting at height minus "subtract":
// or a "leftpart" (only IE); with Netscape 15 more
    var height = 0;
    var dh = document.body.clientHeight;
    if (subtract > 0 && dh > subtract) {
    var height = dh - subtract;
    if (isNetscape)
        height += 15;
    }
    else
    var d = null;
    //if (isIE)
    // d = $id("leftpart");
    if (d == null)
        d = $id("body0");
    if (d == null) {
        alert("no such id: leftpart or body0");
        return;
    }
    d.style.height = height;
}
function changePaddingLeftmenu() {
    var leftpd = parseInt(document.body.clientWidth*0.2*0.2);
    if (leftpd <= 25)
        return
    var sleft = String(leftpd)+"px";
    //alert("padding lefton/leftoff: "+sleft);
    var elts = $class("leftoff");
    for (var e in elts) {
        alert("e leftoff: "+e.id);
        e.style.paddingLeft = sleft;
    }
    var eltson = $class("lefton");
    alert("elston:"+elston.length);
    for (e in eltson) {
        alert("e lefton: "+e.id);
        e.style.paddingLeft = sleft;
    }
}
function changeSize(frameName, Width, Height, minWPadding, minHPadding, scale) {
// do at changing size also on load
// expecting a div with id "frameName":
var dw = parseInt(document.body.clientWidth*scale);
var d = $id(frameName);
if (d == undefined) {
    alert("no such id: frame");
    return;
}
var pleft = minWPadding;
var pright = minWPadding;
var q = String(minHPadding)+"px";
if (Width > 0 && dw > Width) {
    var pwidth = dw - Width;
    if (pwidth*0.1 < minWPadding)
        var pleft = minWPadding;
    else
        var pleft = parseInt(pwidth*0.1);
    var pright = Math.max(0, pwidth - pleft);
    //alert("pleft: "+pleft+", pright: "+pright);
    }
var dh = document.body.clientHeight;
if (Height > 0 && dh > Height)
   var q= String(Math.max(minHPadding, parseInt((dh-Height)/2)));
var sleft = String(pleft) + "px";
var sright = String(pright) + "px";
var sstring = q + " " + sright + " " + q + " " + sleft;
//alert("|" + sstring + "|");
d.style.padding = sstring;
//same with banner (IE) or headerimg (Firefox)in header (only left)
if (isIE) {
    var ban = $id("banner");
    if (ban)
        ban.style.paddingLeft = sleft;
}
else {
    ban = $id("headerimg");
    if (ban)
        ban.style.paddingLeft = sleft;
}
}
function changethumbs(thumbs, widths, heights) {
var nThumbs = thumbs.length;
for (var i = 0; i<nThumbs; i++) {
    changingThumbs[i] = thumbs[i];
    changingWidths[i] = widths[i];
    changingHeights[i] = heights[i];
}
var dw = parseInt(document.body.clientWidth);
var div1 = $id('bannerrechts1');
var img1 = $id('bannerrechts1img');
var div2 = $id('bannerrechts2');
var img2 = $id('bannerrechts2img');
var width0 = changingWidths[0];
div1.style.position = "absolute";
div1.style.left = dw - width0 - 10;
div1.style.width = width0;
img1.width = width0;
div1.style.top = "10";
div2.style.position = "absolute";
var width1 = changingWidths[1];
div2.style.left = dw - width1 - 10;
div2.style.width = width1;
img2.width = width1;
div2.style.top = "10";
setOpacity(div2, img2, Opacity);
div2.style.visibility = "visible";
nextTime = startTime;
lastThumb = 1; // starting 1 higher...
TIMER = setTimeout("nextShow()", nextTime);
}
function clearPreviousElement() {
  previous_active_element = null ;
  clearTimeout(TIMER_USP_SHOW);
}
function copyArrayToElement(fromArray, toElement) {
    //first empty element
    while (toElement.hasChildNodes()) {
        toElement.removeChild(toElement.lastChild);
    }
    for (var i = 0; i<fromArray.length; i++)
        if (fromArray[i] != "")
               toElement.appendChild(fromArray[i]);
}
function copyElementToArray(fromElement, toArray) {
    var kids = fromElement.childNodes;
    var numkids = kids.length;
    for (var i = 0; i<toArray.length; i++)
        toArray[i] = "";
    for (var i=0; i<numkids; i++) {
        var clone = kids[i].cloneNode(true);
    //alert("i:"+i+ " clone:"+clone);
        toArray[i] = clone;
        }
}
function decreaseCols(items, cols) {
//try if cols can be lowered
if (cols == 1)
    return 1;
var nRows = Math.floor(items/cols);
if (items%cols)
    nRows++;
do {
    cols--;
    var newRows = Math.floor(items/cols);
    if (items%cols)
        newRows++;
} while (newRows == nRows);
return cols+1;
}
function doNetscapeCss(prefix, fileName) {
    if (isNetscape) {
        var t = '<link rel="stylesheet" href="'+prefix+fileName+'" type="text/css" title="'+fileName+'">';
  // alert("t:" + t);
        w(t);
    }
}
function doReload() {
    //reloads if height or width changed more than 10 pixels
var dw = document.body.clientWidth;
var dh = document.body.clientHeight;
var deltax = Math.abs(prevWidth-dw);
var deltay = Math.abs(prevHeight-dh);
if (deltax < 10 && deltay < 50)
    return;
document.location.href = document.location.href;
}
function frontimage(name, num) {
   var im = document.images[name];
   var n2 = name+num+'.jpg';
   im.src = n2;
var dw = document.body.clientWidth;
var w = parseInt(dw/3)-5;
im.src = n2;
im.width=w;
im.height=parseInt(w*0.75);
}
function getPicNum() {
    // get picture number based on the sizes of the screen
    var dw = document.body.clientWidth;
    var dh = document.body.clientHeight;
    var p = -1;
    // factorY groter, portret groter
    // factorY kleiner portret kleiner, zet in python
    if (!factorX && !factorY) {
        alert ("getPicNum, factorX en factorY beiden false");
        return;
    }
    for (var i=0; i<nBGImages; i++) {
       if (factorY && BGHeights[i] >= dh*factorY) {
        var firstI = i;
        break;
      }
       if (factorX && BGWidths[i] >= dw*factorX) {
        var firstI = i;
        break;
      }
    }
    if (i == nBGImages)
         return i-1;
    if (!doWide)
        return firstI; // no wide...
    // see if width OK:
    foundH = BGHeights[firstI];
    foundW = BGWidths[firstI];
    if (foundW >= dw)
        return firstI;
    if (factorY) {
        //screen wider than image, look further:
        for (i=firstI+1; i<nBGImages; i++) {
             if (BGHeights[i] == foundH)
                 return i;
         }
         return nBGImages-1;
    }
    if (factorX) {
          for (i=firstI+1; i<nBGImages; i++) {
              if (BGWidths[i] >= dw*factorX)
                    return i;
         }
        return nBGImages-1;
    }
}
function getPosition(w) {
  var myX = 0, myY = 0;
  if( typeof( w.pageXOffset ) == 'number' ) {
    //Non-IE
    myX = w.pageXOffset;
    myY = w.pageYOffset;
  } else {
    myX = document.body.scrollLeft ;
    myY = document.body.scrollTop ;
  }
  return Array(myX, myY);
}
function getSize(w) {
  var myWidth = 0, myHeight = 0;
  if( typeof( w.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = w.innerWidth;
    myHeight = w.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return Array(myWidth, myHeight);
}
function hideMore(id) {
    //at start of page, hide the Lees verder part
var d = $id(id);
if (d === null) {
    alert("no such id: "+id);
    return;
}
d.style.display = "none";
}
function indexmenu(Pic, Width, Height, Cl, Link, Text, Additional, Scale) {
    var L = Pic.length;
    var mw = 0;
    var paddingFactor = 0.95;
    for (var i=0; i<L; i++) {
        mw = Math.max(mw, Width[i]);
    }
    //width times Scale, that accounts for leftMenuWidth times
    //paddingFactor (above) which accounts for padding.
    var dw = document.body.clientWidth*Scale*paddingFactor;
    var nCol = Math.min(parseInt(dw/(mw+10)), L);
    nCol = decreaseCols(L, nCol);
    var WidthMin = Math.floor(dw/nCol);
    var widthActual = 0
    e = '<table class="indexmenu" border="0" cellpadding="0" cellspacing="0" width="100%">';
    w(e);
    w('<tr>');
    var al = "center";
    var im = '';
    var li = '';
    var firstCol = 0;
    var colorIndex = 0;
    for (var i=0; i<L; i++) {
        if (i%nCol == 0 && i > 0) {
        w('</tr><tr>');
        firstCol = (firstCol+1)%2;
        colorIndex = firstCol;
        }
        if (Link[i] != "")
            li = '<a href="'+ Link[i] + '">' + Text[i] + '</a><br>';
        else
            li = Text[i];
        if (Pic[i] != "") {
             widthActual = Math.max(WidthMin, Width[i]);
             im = '<img src="'+Pic[i]+'" width="' + Width[i] +
                      '" height="'+Height[i]+'" alt="' + Text[i] +
                    '">';
             if (Link[i] != "") {
                im = '<a href="'+ Link[i] + '">' + im + '</a>';
             }
        }
        else {
            widthActual = WidthMin;
            im = "";
        }
        if (Pic[i] == "" && Additional[i] != "")
            li = li + "<br><br>"+Additional[i];
        w('<td class="' + Cl[colorIndex] + '" align="center" width="' +
                widthActual + '">' + im + '</td>');
        colorIndex = (colorIndex + 1)%2;
    }
    while (i%nCol > 0) {
        w('<td class="' + Cl[colorIndex] + '" width="' +
                widthActual + '"</td>');
        i = i+1;
    }
    w('</tr></table>');
}
function indexmenucount(Pic, Width, Height, Cl, Link, Text, Additional, Count, Scale) {
    var L = Pic.length;
    var mw = 0;
    var paddingFactor = 0.98;
    for (var i=0; i<L; i++) {
        mw = Math.max(mw, Width[i]);
    }
    //width times Scale, that accounts for leftMenuWidth times
    //paddingFactor (above) which accounts for padding.
    var dw = document.body.clientWidth*Scale*paddingFactor;
    var nCol = Math.min(parseInt(dw/(mw+10)), L);
    e = '<table class="indexmenu" border="0" cellpadding="0" cellspacing="0" width="100%">';
    w(e);
    //w('<tr><td height="10"><td></tr><tr>');
    var al = "center";
    var im = '';
    var li = '';
    var lit = '';
    var clIndex = -1;
    for (var i=0; i<L; i++) {
        if (i%nCol == 0 && i > 0) {
        w('</tr><tr>');
        if (nCol%2 == 0)
            clIndex++;
        }
        if (Pic[i] != "") {
             im = '<img src="'+Pic[i]+'" width="' + Width[i]+
                      '" height="'+Height[i]+'" alt="' + Text[i] +
                     '">';
        }
        else {
            im = Text[i];
        }
        if (Link[i] != "") {
            lit = '<a href="'+ Link[i] + '">' + Text[i] + '</a>';
            li = '<a href="'+ Link[i] + '">' + im + '</a>';
        }
        else {
            lit = Text[i];
            li = im;
        }
        if (Pic[i] == "" && Additional[i] != "")
            lit = lit + "<br>"+Additional[i];
        if (Count[i] > 1)
            lit = lit + '&nbsp;('+Count[i]+')';
        clIndex++;
        if (clIndex >= L) {
            clIndex=L%2;
        }
        w('<td class="' + Cl[clIndex] + '" align="' +
                        'center' + '">' + li + '<br>'+lit+'</td>');
    }
    while (i%nCol > 0) {
        clIndex++;
        if (clIndex >= L) {
            clIndex=L%2;
        }
        w('<td class="' + Cl[clIndex] + '"</td>');
        i++;
    }
   w('</tr></table>');
}
function loadfirstbackgroundimage(Name, Width, Height) {
    // declare the pictures and preload the first with the right size
    nBGImages = Name.length;
    for (i=0; i<nBGImages; i++) {
    BackgroundNames[i] = Name[i];
    BGWidths[i] = Width[i];
    BGHeights[i] = Height[i];
    BackgroundImages[i] = null;
    }
    var picnum = getPicNum();
    //alert("picnum: " + picnum + "(total: " + nBGImages);
    if (BackgroundImages[picnum] == null) {
    BackgroundImages[picnum] = new Image(BGWidths[picnum], BGHeights[picnum]);
    BackgroundImages[picnum].src = BackgroundNames[picnum];
    }
}
function m(a, b, s, t) {
var mm;mm='<a href="';mm=mm+'mailto';mm+=":"+b;mm+="@"+a;
if(s){mm+="?subj";mm+="ect="+s};mm+='">';
if(t)mm=mm+t;else mm=mm+b+"@"+a;mm+="</a>";w(mm);
}
function nextShow() {
var dw = parseInt(document.body.clientWidth);
var div1 = $id('bannerrechts1');
var img1 = $id('bannerrechts1img');
var div2 = $id('bannerrechts2');
var img2 = $id('bannerrechts2img');
    if (Opacity >= 100) {
        // now div2 is fully showing, change pics and start to next picture
        img1.src = img2.src;
        div1.style.left = div2.style.left;
        div1.style.width = div2.style.width;
        img1.width = img2.width;
        div2.style.visibility = "hidden";
        img2.style.visibility = "hidden";
        //alert("div 2 now hidden");
        Opacity = 0;
        setOpacity(div2, img2, Opacity);
        //alert("div 2 now opacity 0, div1: " + img1.src);
        lastThumb++;
        if (lastThumb >= changingThumbs.length)
           lastThumb = 0;
        TIMER = setTimeout("nextShow()", mixTime);
        return;
    }
    else if (Opacity == 0) {
        // now change parameters of div2 (now doorlatend, opacity = 0):
        width0 = changingWidths[lastThumb];
        img2.src = changingThumbs[lastThumb];
        div2.style.left = dw - width0 - 10;
        div2.style.width = width0;
        img2.width = width0;
        //alert("make div 2 visible again, img2: " + img2.src);
        div2.style.visibility = "visible";
        img2.style.visibility = "visible";
        Opacity += 10;
        if (nextTime == startTime)
            nextTime = 2000;
        if (nextTime < 6000)
              nextTime += 200;
        TIMER = setTimeout("nextShow()", nextTime);
        return;
     }
     else {
        // in the process of unhiding div2:
        setOpacity(div2, img2, Opacity);
        if (Opacity < 50)
            Opacity += 4;
        else
            Opacity += 2;
        TIMER = setTimeout("nextShow()", mixTime);
        return;
    }
}
function onResize() {
    //acts if height or width changed more than 10 pixels
    if (!isLoaded) return;
    var dw = document.body.clientWidth;
    var dh = document.body.clientHeight;
    var deltax = Math.abs(prevWidth-dw);
    var deltay = Math.abs(prevHeight-dh);
    if (deltax < 10 && deltay < 50)
    return;
    prevHeight=dh;
    prevWidth=dw;
    onResizeFunctions();
}
function onResizeReload() {
    //reloads if height or width changed more than 10 pixels
    if (!isLoaded) return;
    var dw = document.body.clientWidth;
    var dh = document.body.clientHeight;
    var deltax = Math.abs(prevWidth-dw);
    var deltay = Math.abs(prevHeight-dh);
    if (deltax < 25 && deltay < 50)
    return;
    document.location.href = document.location.href;
}
function photopage(Text, Pic, Width, Height, AltText, Scale, SplitAt) {
    var L = Pic.length;
    var mw = 0;
    var padding = 20;
    for (var i=0; i<L; i++) {
        mw = Math.max(mw, Width[i]);
    }
    //width times Scale, that accounts for leftMenuWidth times
    //paddingFactor (above) which accounts for padding.
    var available = document.body.clientWidth*Scale - 2*padding;
    var dw = available*(1.0-SplitAt);
    var wide = 0;
    var leftandright = 0;
    if (dw > mw) wide = 1;
    else {
        if (available > mw)
            leftandright = (available - mw)/2;
    }
   // comment = 'wide; ' + wide + ' available: '+available + ' mw: '+ mw + ' leftandright:' + leftandright;
   // w('<p>'+comment+'</p>');
    w('<table class="inbody" border="0" cellpadding="0" cellspacing="0" width="100%">');
    for (var i=0; i<L; i++) {
        w('<tr><td height=10></td></tr>')
        if (wide == 0) {
            // onder elkaar!!
            if (Text[i] != "") {
                w('<tr><td height=10></td></tr>');
                w('<tr>');
                if (leftandright > 0)
                     w('<td width="'+leftandright+'"></td>');
                w('<td class="ibtop" align="left">' + Text[i]+ '</td></tr>');
                if (leftandright > 0)
                     w('<td width="'+leftandright+'"></td>');
                w('<tr><td height=10></td></tr>')
            }
            if (Pic[i] != "") {
                w('<tr>');
                 if (leftandright > 0)
                     w('<td width="'+leftandright+'"></td>');
                w('<td class="ibpbottom" align="left">');
                w('<img src="'+Pic[i]+'" width="' + Width[i]+
                      '" height="'+Height[i]+'" alt="' + AltText[i]+
                     '">');
                w('</td>');
                 if (leftandright > 0)
                     w('<td width="'+leftandright+'"></td>');
                 w('</tr>');
            }
        }
        else {
            // naast elkaar!!
            // altijd (eventueel lege) tekst:
            // eventueel test:' dw:' + dw + ' mw: ' + mw + ' wide: ' + wide +
            w('<tr><td class="ibleft" width="50%">' + Text[i]+'</td>');
            if (Pic[i] != "") {
                 w('<td class="ibpright" align="left">');
                 w('<img src="'+Pic[i]+'" width="' + Width[i]+
                      '" height="'+Height[i]+'" alt="' + AltText[i]+
                     '">');
                 w('</td></tr>');
            }
            else {
                w('<td></td></tr>');
            }
        }
    }
    w('<tr><td height=10></td></tr>')
    w('</table>');
}
function picmenu(Pic, Width, Height, Cl, Link, Text, Scale) {
    var L = Pic.length;
    var mw = 0;
    var paddingFactor = 0.98;
    for (var i=0; i<L; i++) {
        mw = Math.max(mw, Width[i]);
    }
    //width times Scale, that accounts for leftMenuWidth times
    //paddingFactor (above) which accounts for padding.
    var dw = document.body.clientWidth*Scale*paddingFactor;
    var nCol = Math.min(parseInt(dw/(mw+10)), L);
    nCol = decreaseCols(L, nCol);
    e = '<table class="picmenu" border="0" cellpadding="0" cellspacing="0" width="100%">';
    w(e);
    w('<tr><td height="10"><td></tr><tr>');
    var al = "center";
    var im = '';
    var li = '';
    for (var i=0; i<L; i++) {
        if (i%nCol == 0 && i > 0) {
        w('</tr><tr><td height="10"><td></tr><tr>');
        }
        if (Pic[i] != "") {
             im = '<img src="'+Pic[i]+'" width="' + Width[i]+
                      '" height="'+Height[i]+'" alt="' + Text[i]+
                     '">';
        }
        else {
            im = Text[i];
        }
        if (Link[i] != "") {
            li = '<a href="'+ Link[i] + '">' + im + '</a>';
        }
        else {
            li = im;
        }
        w('<td class="' + Cl[i] + '" align="' +
                        'center' + '">' + li + '</td>');
    }
    w('</tr><tr><td height="10"><td></tr></table>');
}
function prelima(Name, Width, Height) {
    var L = Name.length;
    for (var i=0; i<L; i++) {
        (new Image(Width[i], Height[i])).src = Name[i];
    }
}
function resizeprint(doResize, language) {
//sizes to convenient format for printing
var toX = 800;
var toY = 600;
var posX = 100;
var posY = 100;
alert ('doResize: '+doResize);
if (doResize != 1) {
    window.print();
    return;
}
var oldSize = getSize(window);
var oldPosition = getPosition (window);
alert('position: ' + oldPosition);
window.resizeTo(toX, toY);
window.moveTo(posX, posY);
var newPosition = getPosition (window);
alert('position: ' + newPosition);
var newSize = getSize(window);
var oldX = oldSize[0];
var oldY = oldSize[1];
var newX = newSize[0];
var newY = newSize[1];
window.print();
if (language == "nl")
    var T = "terug naar het vorige venster formaat";
else
    var T = "back to the previous window size" ;
alert(T);
window.resizeTo(toX + oldX-newX, toY+oldY-newY);
newSize = getSize(window);
//alert('old: '+ oldSize +' new:' + newSize);
}
function setCssStyleScreenOnly(selector, declaration) {
// set style for element screen only. declaration WITHOUT braces!!
// example: see changeSize.
if (!isIE) { // firefox:
    var style_node = document.createElement("style");
    style_node.setAttribute("type", "text/css");
    style_node.setAttribute("media", "screen");
    var text = selector + "{" + declaration + "}";
    style_node.appendChild(document.createTextNode(text));
    // append the style node:
    document.getElementsByTagName("head")[0].appendChild(style_node);
}
else { //IE
   if (declaration.indexOf("url(\.\./") >= 0){
    declaration = declaration.replace(/\.\.\//g, "");
   }
   if (document.styleSheets && document.styleSheets.length > 0) {
         var last_style_node = document.styleSheets[document.styleSheets.length - 1];
         if (typeof(last_style_node.addRule) == "object") last_style_node.addRule(selector, declaration);
        }
}
}
function setOpacity(div, elt, opacity) {
// this function sets the wanted opacity for IE and Netscape (Firefox)
// chrome and safare not working apparently.
if(isIE){
    div.style.filter="alpha(opacity=0)";
    div.filters.alpha.opacity = opacity; }
if(isNetscape){
  // elt.style.MozOpacity = 0;
    elt.style.MozOpacity = opacity/100; }
//div.style.visibility = "visible";
//Elt.style.visibility = "visible";
}
function showMore(id) {
    //show Lees verder part hide id+"link"
var d = $id(id);
if (d === null) {
    alert("no such id: "+id);
    return;
}
d.style.display = "inline";
d = $id(id+"link");
if (d === null) {
    return;
}
d.style.display = "none";
}
function tdHideAfterDelay(){
  clearTimeout(TIMER_USP_HIDE) ;
if (last_active_element) {
    var tfield = $id(last_active_element + "t");
    if (!tfield) return;
    tfield.className = "tdusps";
    var tfield2 =  $id(last_active_element + "tt");
    //alert("tfield2: "  + tfield2 +  " (" + last_active_element+ ")");
    if (!tfield2) return;
    tfield2.className = "tduspss";
    var f=$id('tduspe');
    // extra cell class:
    f.setAttribute("class", "tduspe");
    copyArrayToElement(usp_text0, f);
    last_active_element = null;
}
}
function tdhide() {
//do a closing hide by leaving the table:
// if (TIMER_USP) return ;
  TIMER_USP_HIDE = setTimeout(tdHideAfterDelay, 300) ;
}
function tdshow(idnum) {
  //do show in usp table (from tableusp and tableusp2)
  clearTimeout(TIMER_USP_HIDE);
  if (idnum == last_active_element || idnum == previous_active_element) {
    return;
    }
  if (last_active_element) {
    var tfield = $id(last_active_element+'t');
    if (!tfield) return;
    tfield.className = "tdusps";
    var tfield2 = $id(last_active_element+'tt');
    if (!tfield2) return;
    tfield2.className = "tduspss";
  }
//alert("idnum: "+ idnum + "last: " + last_active_element);
previous_active_element = last_active_element;
last_active_element = idnum;
if (!last_active_element) return;
var tfield = $id(idnum+'t');
if (!tfield) return;
//test_line("setting: "+idnum+" tfield: " +tfield);
//tfield.setAttribute("class","tduspsa");
tfield.className = "tduspsa";
var tfield2 = $id(idnum+'tt');
if (!tfield2) return;

tfield2.className = "tduspssa";
var e=$id(idnum+'h');
var f=$id('tduspe');
// extra cell class:
f.className = "tduspea";
//f.setAttribute("class", "tduspea");
var toChild = f.lastChild;
// first time copy contents to array:
if (usp_text0.length == 1 && usp_text0[0] == "" && f.hasChildNodes())
    copyElementToArray(f, usp_text0);
//copy contents to last_array:
copyElementToArray(e, last_element);
//put element in e cell:
copyArrayToElement(last_element, f);
TIMER_USP_SHOW = setTimeout(clearPreviousElement, 100);
}
function tdshowextra() {
  clearTimeout(TIMER_USP_HIDE);
}
function catchlocation() {
    //alert("location: "+ window.location);
    var loc = String(window.location);
    var locList = loc.split("#");
    
    if (locList.length == 2) {
        //alert('pseudo: '+ locList[1]);
        var pseudo = locList[1];
        tdshow(pseudo);
    }
}
function w(t) {
    document.write(t);
}
function adjustHomeButton(id){
 setCssStyleScreenOnly("#"+id, "background-position: center bottom;")
}

