function initPage() {
	clearFormFields({
		clearInputs: true,
		clearTextareas: true,
		passwordFieldText: true,
		addClassFocus: "focus",
		filterClass: "clearform"
	});
}

function clearFormFields(o) {
	if (o.clearInputs == null) o.clearInputs = true;
	if (o.clearTextareas == null) o.clearTextareas = true;
	if (o.passwordFieldText == null) o.passwordFieldText = false;
	if (o.addClassFocus == null) o.addClassFocus = false;
	if (!o.filterClass) o.filterClass = "default";
	if(o.clearInputs) {
		var inputs = document.getElementsByTagName("input");
		for (var i = 0; i < inputs.length; i++ ) {
			if((inputs[i].type == "text" || inputs[i].type == "password") && inputs[i].className.indexOf(o.filterClass) != -1) {
				inputs[i].valueHtml = inputs[i].value;
				inputs[i].onfocus = function ()	{
					if(this.valueHtml == this.value) this.value = "";
					if(this.fake) {
						inputsSwap(this, this.previousSibling);
						this.previousSibling.focus();
					}
					if(o.addClassFocus && !this.fake) {
						this.className += " " + o.addClassFocus;
						this.parentNode.className += " parent-" + o.addClassFocus;
					}
				}
				inputs[i].onblur = function () {
					if(this.value == "") {
						this.value = this.valueHtml;
						if(o.passwordFieldText && this.type == "password") inputsSwap(this, this.nextSibling);
					}
					if(o.addClassFocus) {
						this.className = this.className.replace(o.addClassFocus, "");
						this.parentNode.className = this.parentNode.className.replace("parent-"+o.addClassFocus, "");
					}
				}
				if(o.passwordFieldText && inputs[i].type == "password") {
					var fakeInput = document.createElement("input");
					fakeInput.type = "text";
					fakeInput.value = inputs[i].value;
					fakeInput.className = inputs[i].className;
					fakeInput.fake = true;
					inputs[i].parentNode.insertBefore(fakeInput, inputs[i].nextSibling);
					inputsSwap(inputs[i], null);
				}
			}
		}
	}
	if(o.clearTextareas) {
		var textareas = document.getElementsByTagName("textarea");
		for(var i=0; i<textareas.length; i++) {
			if(textareas[i].className.indexOf(o.filterClass) != -1) {
				textareas[i].valueHtml = textareas[i].value;
				textareas[i].onfocus = function() {
					if(this.value == this.valueHtml) this.value = "";
					if(o.addClassFocus) {
						this.className += " " + o.addClassFocus;
						this.parentNode.className += " parent-" + o.addClassFocus;
					}
				}
				textareas[i].onblur = function() {
					if(this.value == "") this.value = this.valueHtml;
					if(o.addClassFocus) {
						this.className = this.className.replace(o.addClassFocus, "");
						this.parentNode.className = this.parentNode.className.replace("parent-"+o.addClassFocus, "");
					}
				}
			}
		}
	}
	function inputsSwap(el, el2) {
		if(el) el.style.display = "none";
		if(el2) el2.style.display = "inline";
	}
}

if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);

//eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 t(a,b){g(3=0;3<a.h;3++){k c=[],d=[],n=[],e=[],4=[],l=[];8(a[3].5(\'.\')!=-1||a[3].5(\'#\')==-1){8(a[3].5(\'>\')!=-1){c[3]=a[3].f(a[3].5(\'>\')+2);a[3]=a[3].f(0,a[3].5(\'>\')-1)}8(a[3].5(\'.\')!=-1){d[3]=a[3].f(a[3].5(\'.\')+1);a[3]=a[3].f(0,a[3].5(\'.\'))}n[3]=a[3];8(!d[3])d[3]=\'\';8(c[3]){l[3]=r.o(n[3]);g(k j=0;j<l[3].h;j++){8(l[3][j].6.5(d[3])!=-1){4[3]=l[3][j].o(c[3]);g(k i=0;i<4[3].h;i++){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}}}s{4[3]=r.o(n[3]);g(k i=0;i<4[3].h;i++){8(4[3][i].6.5(d[3])!=-1){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}}}s 8(a[3].5(\'#\')!=-1){8(a[3].5(\'>\')!=-1){c[3]=a[3].f(a[3].5(\'>\')+2);a[3]=a[3].f(0,a[3].5(\'>\')-1)}a[3]=a[3].m(\'#\',\'\');e[3]=r.u(a[3]);8(e[3]){8(c[3]){4[3]=e[3].o(c[3]);g(k i=0;i<4[3].h;i++){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}s{e[3].p=9(){7.6+=\' \'+b};e[3].q=9(){7.6=7.6.m(b,\'\')}}}}}}',31,31,'|||_hoverItem|_hoverElement|indexOf|className|this|if|function||||_class|_id|substr|for|length|||var|_parent|replace|_tag|getElementsByTagName|onmouseover|onmouseout|document|else|hoverForIE6|getElementById'.split('|'),0,{}));

//unpacked version of the above packed code
function hoverForIE6(a, b) {
	for (_hoverItem = 0; _hoverItem < a.length; _hoverItem++) {
		var c = [],
		_class = [],
		_tag = [],
		_id = [],
		_hoverElement = [],
		_parent = [];
		if (a[_hoverItem].indexOf('.') != -1 || a[_hoverItem].indexOf('#') == -1) {
			if (a[_hoverItem].indexOf('>') != -1) {
				c[_hoverItem] = a[_hoverItem].substr(a[_hoverItem].indexOf('>') + 2);
				a[_hoverItem] = a[_hoverItem].substr(0, a[_hoverItem].indexOf('>') - 1)
			}
			if (a[_hoverItem].indexOf('.') != -1) {
				_class[_hoverItem] = a[_hoverItem].substr(a[_hoverItem].indexOf('.') + 1);
				a[_hoverItem] = a[_hoverItem].substr(0, a[_hoverItem].indexOf('.'))
			}
			_tag[_hoverItem] = a[_hoverItem];
			if (!_class[_hoverItem]) _class[_hoverItem] = '';
			if (c[_hoverItem]) {
				_parent[_hoverItem] = document.getElementsByTagName(_tag[_hoverItem]);
				for (var j = 0; j < _parent[_hoverItem].length; j++) {
					if (_parent[_hoverItem][j].className.indexOf(_class[_hoverItem]) != -1) {
						_hoverElement[_hoverItem] = _parent[_hoverItem][j].getElementsByTagName(c[_hoverItem]);
						for (var i = 0; i < _hoverElement[_hoverItem].length; i++) {
							_hoverElement[_hoverItem][i].onmouseover = function () {
								this.className += ' ' + b
							};
							_hoverElement[_hoverItem][i].onmouseout = function () {
								this.className = this.className.replace(b, '')
							}
						}
					}
				}
			} else {
				_hoverElement[_hoverItem] = document.getElementsByTagName(_tag[_hoverItem]);
				for (var i = 0; i < _hoverElement[_hoverItem].length; i++) {
					if (_hoverElement[_hoverItem][i].className.indexOf(_class[_hoverItem]) != -1) {
						_hoverElement[_hoverItem][i].onmouseover = function () {
							this.className += ' ' + b
						};
						_hoverElement[_hoverItem][i].onmouseout = function () {
							this.className = this.className.replace(b, '')
						}
					}
				}
			}
		} else if (a[_hoverItem].indexOf('#') != -1) {
			if (a[_hoverItem].indexOf('>') != -1) {
				c[_hoverItem] = a[_hoverItem].substr(a[_hoverItem].indexOf('>') + 2);
				a[_hoverItem] = a[_hoverItem].substr(0, a[_hoverItem].indexOf('>') - 1)
			}
			a[_hoverItem] = a[_hoverItem].replace('#', '');
			_id[_hoverItem] = document.getElementById(a[_hoverItem]);
			if (_id[_hoverItem]) {
				if (c[_hoverItem]) {
					_hoverElement[_hoverItem] = _id[_hoverItem].getElementsByTagName(c[_hoverItem]);
					for (var i = 0; i < _hoverElement[_hoverItem].length; i++) {
						_hoverElement[_hoverItem][i].onmouseover = function () {
							this.className += ' ' + b
						};
						_hoverElement[_hoverItem][i].onmouseout = function () {
							this.className = this.className.replace(b, '')
						}
					}
				} else {
					_id[_hoverItem].onmouseover = function () {
						this.className += ' ' + b
					};
					_id[_hoverItem].onmouseout = function () {
						this.className = this.className.replace(b, '')
					}
				}
			}
		}
	}
}

/* insert your class and id ***********************
_hoverClassName = 'hover';
_hoverEl = ['ul.ul-class > li',	'div.div-class', 'span', '#box', '#nav > li'];
/**************************************************/
function ieHover() {
	hoverForIE6(['div.block'], 'hover');
	hoverForIE6(['div.box'], 'hover');
	hoverForIE6(['ul.admintopnav > li'], 'hover');
}

if (window.attachEvent && !window.opera){
	window.attachEvent("onload", ieHover);
}

function calendar_show_month(structuur_ID, blockname, m, y) {
	var t = $j.ajax({
		url: "/includes/display_calendar.php",
		data: "structuur_ID=" + escape(structuur_ID) + "&blockname=" + escape(blockname) + "&m=" + escape(m) + "&y=" + escape(y),
		async: false
	}).responseText;
	$("calendarDiv").innerHTML = t;
}



