/* arree, here we go ....
/* -------------------------

       Kalenderdagen 

/* ------------------------- */
function makeArray(len)
{	
	for (var i = 0; i < len; i++) this[i] = null;
	this.length = len;
}
var	dayNames = new makeArray(7);
	dayNames[0] = "zondag";
	dayNames[1] = "maandag";
	dayNames[2] = "dinsdag";
	dayNames[3] = "woensdag";
	dayNames[4] = "donderdag";
	dayNames[5] = "vrijdag";
	dayNames[6] = "zaterdag";
var monthNames = new makeArray(12);
	monthNames[0] = "januari";
	monthNames[1] = "februari";
	monthNames[2] = "maart";
	monthNames[3] = "april";
	monthNames[4] = "mei";
	monthNames[5] = "juni";
	monthNames[6] = "juli";
	monthNames[7] = "augustus";
	monthNames[8] = "september";
	monthNames[9] = "oktober";
	monthNames[10] = "november";
	monthNames[11] = "december";

function makeMieDate(){
		var myDateString = '';
		
		var now = new Date();
		var day = now.getDay();
		var month = now.getMonth();
		var year = now.getYear();
		var date = now.getDate();
		
		// Check for a two digit year code
		if (year < 100)
		{
			// Fix two digit year codes up to 2036 (I hope that all computer systems by then will use a four digit date code)
			if (year <= 36)
			{
				// Add three digits to the year displayed for years up to 2009
				if (year < 10)
				{
					
					myDateString += "<span id=today>";
					myDateString += dayNames[day] + " " + date + " " + monthNames[month] + " 200" + year;
				}
				else
				// Add two digits to the year displayed for years 2010 and beyond
				{
					
					myDateString += "<span id=today>";
					myDateString += dayNames[day] + " " + date + " " + monthNames[month] + " 20" + year;
				}
			}
			else
			//	Modify the currently used two digit date code to display four digits
			{
				myDateString += "<span id=today>";
				myDateString += dayNames[day] + " " + date + " " + monthNames[month] + " 19" + year;
			}
		}
		else if (year >= 2000)
		// Display the Y2K ready four digit date code
		{
			myDateString += "<span id=today>";
			myDateString += dayNames[day] + " " + date + " " + monthNames[month] + " " + year;
			
		}
		else
		// Displayed when an invalid date code has been received
		{
			myDateString += "<span id=today>";
			myDateString += dayNames[day] + " " + date + " " + monthNames[month] + " 2005"; // IS EIGENLIJK FOUT HIER!!! >> *** No Valid DATE ****
			
		}
		
		return myDateString+"</span>";
}






/* ---------------------------


    QUERYSTRING in JavaScript

	http://www.eggheadcafe.com/articles/20020107.asp
	
	I think most of this code should be self - explanatory; we are cracking the URL by passing the window.location.search portion into the PageQuery object, which simply splits the key-value pairs into arrays. Then we simply iterate the "collection" with the function prototype "getValue" returning the match. Finally , we unescape it in the utility accessor function "queryString".

   -------------------------- */

function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
	else this.q = null;
	
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i];
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	
	this.getValue = function(s) {
		for(var j=0; j < this.keyValuePairs.length; j++) {
			if(this.keyValuePairs[j].split("=")[0] == s)
				return this.keyValuePairs[j].split("=")[1];
		}
		return false;
	}
	
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	
	this.getLength = function() { return this.keyValuePairs.length; } 
}

function queryString(key){
	var page = new PageQuery(window.location.search); 
	var myval ;
	if(myval = page.getValue(key)) return unescape(myval);
	else return myval; //hier: myval = false
}

/* 
function displayItem(key){
	if(queryString(key)=='false') {
		document.write("you didn't enter a ?name=value querystring item.");
	}else{
		document.write(queryString(key));
	}
}
alert(  queryString('msgCat')  );
*/





/* ---------------------------
    
   M A C R O M E D I A  scripts
 
  --------------------------- */

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadimg() { //v3.0
  var d=document; if(d.img){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadimg.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
