/* script for handling the expanding/collapsing on TJOP
   borrows heavily on menuExpandable3.js, from gazingus.org
   Original author: Dave Lindquist (dave@gazingus.org) 
   Shamelessly copied from Marc Ozon by me.*/

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    if (window.opera) return; // Opera 

    // I used to set this in the style sheet, but then Opera 5/6
    // would hide the section, and have no way to unhide -Marc
    menu.style.display = "none";

   // actuator.parentNode.style.backgroundImage =
   // "url(/images/plus.gif)";

    actuator.onclick = function() {
        var display = menu.style.display;
        // this.parentNode.style.backgroundImage =
          //  (display == "block") ? "url(/images/plus.gif)" :
  //  "url(/images/minus.gif)";
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

function setup( parts )
{
 var i;
 var menu;
 var head;

 for (i=0; i < parts ; i++)
 {
  obj = "s" + i;
  head = "m" + i;
  initializeMenu( obj, head );
 }
}





/* script for using igal in making the monthly photo albums
   for Cees in Dutch
   Shamelessly copied from Marc Ozon*/
function makeArray() {
// from http://developer.irt.org/script/256.htm
 for (i = 0; i<makeArray.arguments.length; i++)
 this[i + 1] = makeArray.arguments[i];
}

var loc, date, monthnum, year;

loc = document.URL.indexOf("cees");
date = document.URL.substring(loc+5,loc+11);
year = date.substring(0,4);
monthnum = date.substring(4,6);

//var months = new makeArray('January','February','March','April','May','June','July','August','September','October','November','December'); 
var months = new makeArray('januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december'); 

if (monthnum < 10) monthnum = monthnum.substring(1,2);

month = months[monthnum];


