function hotBox(obj,defClass) {
	if (document.getElementById) {
		eval(obj).className = defClass + ' boxhover';
	}
}
function coldBox(obj,defClass) {
	if (document.getElementById) {
		eval(obj).className = defClass;
	}
}
/*--------------------------------------------------------------------------
 * defining global variables to detect the version of the browser
 * created : 2003-04-01 by mst
--------------------------------------------------------------------------*/
var agt = navigator.userAgent.toLowerCase();

var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);

var is_nav     = ((agt.indexOf('mozilla') != -1) 
                 && (agt.indexOf('spoofer') == -1)
						     && (agt.indexOf('compatible') == -1) 
								 && (agt.indexOf('opera') == -1)
						     && (agt.indexOf('webtv') == -1) 
								 && (agt.indexOf('hotjava') == -1));
var is_nav2    = (is_nav && (is_major == 2));
var is_nav3    = (is_nav && (is_major == 3));
var is_nav4    = (is_nav && (is_major == 4));
var is_nav4up  = (is_nav && (is_major >= 4));
var is_navonly = (is_nav 
                 && ((agt.indexOf(";nav") != -1) 
								    || (agt.indexOf("; nav") != -1)) );
var is_nav6    = (is_nav && (is_major == 5));
var is_nav6up  = (is_nav && (is_major >= 5));

var is_ie      = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3     = (is_ie && (is_major < 4));
var is_ie4     = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up   = (is_ie && (is_major >= 4));
var is_ie5     = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5   = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up   = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6     = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up   = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
/*--------------------------------------------------------------------------
 * function : dateLastModified
 * parameters : language and level
 * returns : the date of last modification of a page
 * created : 2003-04-01 by mst
 * modified : 2003-08-01 by psm (added german translation)
 * modified : 2003-09-09 by mst (output of date is unavailable because our host
                                 changes the date when copying to the production server)
--------------------------------------------------------------------------*/
function dateLastModified(inLanguage,inLevel) { 
  var level = setLevel(inLevel);
	var language = inLanguage.toLowerCase();
	var modificationDate = new Date(document.lastModified); 
	var altTextSquares = "";
	var theModText = "";
	var theDate = "";
	var theDay = modificationDate.getDate(); 
	var theMonth = modificationDate.getMonth()+1; 
	var theYear = modificationDate.getYear(); 
	var theHour = modificationDate.getHours();
	var theMinute = modificationDate.getMinutes();
	var theSecond = modificationDate.getSeconds();

	switch (language) {
		case "n":
			theModText = "Laatst gewijzigd op ";
			altTextSquares = "decoratie";
			break;
		case "f":
			theModText = "Information modifiée le ";
			altTextSquares = "décoration";
			break;
		case "g":
			theModText = "Letzten mal geänderd am ";
			altTextSquares = "decoration";
			break;
	}

	theDate += "<img src=\""
					+ level
					+ "../images/nf/layout/squares.gif\" width=\"35\" height=\"11\" alt=\""
					+ altTextSquares
					+ "\" border=\"0\"> ";
	
	theDate += theModText

	theDate += ((theDay < 10) ? "0": "") + theDay + "-";
	theDate += ((theMonth < 10) ? "0": "") + theMonth + "-";
	
	if (!is_ie4up) { 
		if (theYear <= 100) { 
			theYear +=1900; 
		} 
	} 
	
	theDate += theYear;
// remove comment signs to create output
//	document.write(theDate); 
}
/*--------------------------------------------------------------------------
 * function : dateToday
 * parameters : none
 * returns : today's date
 * created : 2004-01-19 by mst
--------------------------------------------------------------------------*/
function dateToday() { 
	var today = new Date(); 
	var theDate = "";
	var theDay = today.getDate(); 
	var theMonth = today.getMonth()+1; 
	var theYear = today.getYear(); 
	var theHour = today.getHours();
	var theMinute = today.getMinutes();
	var theSecond = today.getSeconds();

	theDate += ((theDay < 10) ? "0": "") + theDay + "-";
	theDate += ((theMonth < 10) ? "0": "") + theMonth + "-";
	
	if (!is_ie4up) { 
		if (theYear <= 100) { 
			theYear +=1900; 
		} 
	} 
	
	theDate += theYear + " ";
	theDate += ((theHour < 10) ? "0": "") + theHour + ":";
	theDate += ((theMinute < 10) ? "0": "") + theMinute + ":";
	theDate += ((theSecond < 10) ? "0": "") + theSecond;
	
// remove comment signs to create output
	return (theDate); 
}
/*--------------------------------------------------------------------------
 * function : setTopButton
 * parameter : language, level
 * returns : a button to go the top of a page
 * created : 2003-04-01 by mst
 * modified : 2003-08-01 by psm (added german translation)
--------------------------------------------------------------------------*/
function setTopButton (inLanguage,inLevel) {
	/*setBackButton(inLanguage,inLevel);*/
	var level = setLevel(inLevel);
	var language = inLanguage.toLowerCase();
	var altTextTopButton = "";

	switch (language) {
		case "n":
			altTextTopButton = "Top van deze pagina";
			break;
		case "f":
			altTextTopButton = "Haut de la page";
			break;
		case "g":
		case "d":
			altTextTopButton = "Zum Anfang dieser Seite";
			break;
	}
	
	document.write(" "
				+ "<a href=\"#top\">"
				+ " <img class=\"illustration\" src=\""
				+ level
				+ "../images/layout/top.gif\" width=\"15\" height=\"15\" alt=\""
				+ altTextTopButton
				+ "\">"
				+ altTextTopButton
				+ "</a>");
	return false;
}
/*--------------------------------------------------------------------------
 * function : setLevel
 * parameter : level
 * returns : level times '../'
 * created : 2003-04-01 by mst
--------------------------------------------------------------------------*/
function setLevel(inLevel) {
  var level = "";
	if (inLevel==null){
		level = 0;
	}
  for (i = 0; i < inLevel; i++) {
     level += "../";
  }
  return level;
}
/*--------------------------------------------------------------------------
 * function : checkWindow
 * parameter : window name
 * returns : true if window name exists / false if it does not
 * created : 2003-09-09 by mst
--------------------------------------------------------------------------*/
function checkWindow(inWndwName) {
	// check if a window with name inWndwName exists
	if (window.name==inWndwName) {
		return true;
	} else {
		return false;
	}
}
/*--------------------------------------------------------------------------
 * function : loadFile
 * parameter : file, target
 * returns : loads a page into the opener window if it exists
 * created : 2003-09-15 by mst
--------------------------------------------------------------------------*/
function loadFile(file,target) {
	if (target != '') {
		target.window.location.href = file; //load document into opener window
	} else {
		window.location.href = file; //load document into current window
	}
}
/*--------------------------------------------------------------------------
 * function : checkWhites
 * removes leading, trailing and double blanks
 * created by search.fgov.be
--------------------------------------------------------------------------*/
function checkWhites(myform){
	var str = myform.OriginalQT.value;
	var double_blank = /[ ]+/gi;
	var leading_blank = /^[ ]/gi;
	var trailing_blank = /[ ]$/gi;
	
	str = str.replace(double_blank," ");
	str = str.replace(leading_blank,"");
	str = str.replace(trailing_blank,"");
	myform.OriginalQT.value = str;
}
/*--------------------------------------------------------------------------
 * created by http://www.somacon.com/p143.php
--------------------------------------------------------------------------*/
// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if (!radioObj) {
		return false;
	}
	var radioLength = radioObj.length;
	if (radioLength == undefined){
		if(radioObj.checked) {
			return radioObj.value;
		} else {
			return false;
		}
	}
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return false;
}
/*--------------------------------------------------------------------------
 * created by http://www.somacon.com/p143.php
--------------------------------------------------------------------------*/
// set the radio button with the given value as being checked
// do nothing if there are no radio buttons
// if the given value does not exist, all the radio buttons
// are reset to unchecked
function setCheckedValue(radioObj, newValue) {
	if(!radioObj) {
		return false;
	}
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for (var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if (radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}
