/* JavaScript Cache File generated by eCMS at Fri, 20 Aug 2010 10:06:38. */

/** File: ./class.jsEffect.js */

function copyPrototype(descendant, parent) {
	var sConstructor	= parent.toString();
	var aMatch	= sConstructor.match( /\s*function (.*)\(/ );
	if ( aMatch != null ) { descendant.prototype[aMatch[1]] = parent; }
	for (var m in parent.prototype) {
		descendant.prototype[m] = parent.prototype[m];
	}
};


var jsEffect = jseffect = {};
/**
 * Core Class with basic effect implementation
 */
jsEffect.Core = function Core(elmid, fps, transition) {
	if (elmid == null) alert('Missing required first parameter "element" or "elementID".');

	this.element	= typeof elmid == "object" ? elmid : document.getElementById(elmid);
	this.fps		= fps != null ? fps : 100;
	this.unit		= "px";
	this.transition	= transition != null ? transition : jsEffect.Transitions.smoothOut;

	this.wait		= false;
	this.queue		= new Array();

	return this;
};
jsEffect.Core.prototype	= {
	setElm :	function(elmid) {
		var _this	= this;
		if (this._checkWait(function () { _this.setElm(elmid) })) {
			this.element	= typeof elmid == "object" ? elmid : document.getElementById(elmid);
		}
		return this;
	},
	setFps :	function(fps) {
		var _this	= this;
		if (this._checkWait(function () { _this.setFps(fps) }))
			this.fps	= fps;
		return this;
	},
	setUnit :	function(unit) {
		var _this	= this;
		if (this._checkWait(function () { _this.setUnit(unit) }))
			this.unit	= unit;
		return this;
	},
	setTrans :	function(transition) {
		var _this	= this;
		if (this._checkWait(function () { _this.setTrans(transition) }))
			this.transition	= transition;
		return this;
	},

	custom :	function(begin, end, duration) {
		var _this	= this;
		if (!this._checkWait(function () { _this.custom(begin, end, duration) }))
			return this;

		this.wait		= true;
		this.current	= begin;
		var sTime		= new Date().getTime();
		var change		= end - begin;

		this.startStyle(this.current);

		if (change == 0 || duration == 0) {
			this.finishStyle(end);
			return _this.resume();
		}

		this.timer	= setInterval(function () {
			var cTime	= new Date().getTime();
			if (cTime < sTime + duration) {
				cTime	= cTime - sTime;
				this.current	= _this.transition(cTime, begin, change, duration);
				_this.setStyle(Math.round(this.current));
			}
			else {
				this.current	= end;
				clearTimeout(_this.timer);
				_this.finishStyle(Math.round(this.current));
				_this.resume();
			}
		}, (1000 / this.fps));

		return this;
	},

	set :		function(value) {
		this.startStyle(value);
		return this;
	},

	pause :		function(duration) {
		this.wait	= true;
		var _this	= this;
		if (duration && duration > 0) {
			setTimeout(function() {	_this.resume() }, duration);
		}
		return this;
	},

	resume :		function() {
		this.wait	= false;
		this._execQueue();
		return this;
	},

	execute :		function(func) {
		if (this._checkWait(func)) func.apply();
		return this;
	},

	_checkWait :	function(func) {
		if (this.wait) {
			this.queue[this.queue.length]	= func;
			return false;
		}
		return true;
	},

	_execQueue :	function() {
		while (this.queue.length > 0) {
			if (this.wait) return false;
			this.queue.shift().apply();
		}

		return true;
	}
};


/**
 * Opacity effect class
 */
jsEffect.Opacity = function (elmid, fps, transition) { this.Core(elmid, fps, transition) }
jsEffect.Opacity.prototype	= {
	startStyle :	function(value) {
		this.setStyle(value);
		this.element.style.visibility	= "visible";
	},

	setStyle :		function(value) {
		this.element.style.opacity		= value / 100;
		this.element.style.filter		= "alpha(opacity=" + value + ")";
	},

	finishStyle :	function(value) {
		if (value == 0)
			this.element.style.visibility	= "hidden";
		this.setStyle(value);
	},

	show :			function(duration) {
		return this.custom(0, 100, duration);
	},

	hide :			function(duration) {
		var current = !this.current ? 100 : this.current;
		return this.custom(current, 0, duration);
	}
};
copyPrototype(jsEffect.Opacity, jsEffect.Core);


/**
 * Height slide effect class
 */
jsEffect.Height = function (elmid, fps, transition) { this.Core(elmid, fps, transition) }
jsEffect.Height.prototype	= {
	startStyle :	function(value) {
		this.overflow	= this.element.style.overflow;
		this.setStyle(value);
		this.element.style.overflow		= "hidden"
		this.element.style.visibility	= "visible";
	},

	setStyle :		function(value) {
		this.element.style.height	= value + this.unit;
	},

	finishStyle :	function(value) {
		this.setStyle(value);
		this.element.style.overflow		= this.overflow;
		if (value == 0)
			this.element.style.visibility	= "hidden";
	},

	show :			function(duration) {
		if (this.unit == "%")
			var height	= 100;
		else
			var height	= this.element.clip ? this.element.clip.height : this.element.offsetHeight;
		return this.custom(0, height, duration);
	},

	hide :			function(duration) {
		if (this.unit == "%")
			var height	= 100;
		else
			var height	= this.element.clip ? this.element.clip.height : this.element.offsetHeight;
		return this.custom(height, 0, duration);
	}
};
copyPrototype(jsEffect.Height, jsEffect.Core);


/**
 * Width slide effect class
 */
jsEffect.Width = function (elmid, fps, transition) { this.Core(elmid, fps, transition) }
jsEffect.Width.prototype	= {
	startStyle :	function(value) {
		this.overflow	= this.element.style.overflow;
		this.setStyle(value);
		this.element.style.overflow	= "hidden"
		this.element.style.visibility	= "visible";
	},

	setStyle :		function(value) {
		this.element.style.width	= value + this.unit;
	},

	finishStyle :	function(value) {
		this.setStyle(value);
		this.element.style.overflow		= this.overflow;
		if (value == 0)
			this.element.style.visibility	= "hidden";
	},

	show :			function(duration) {
		if (this.unit == "%")
			var height	= 100;
		else
			var width	= this.element.clip ? this.element.clip.width : this.element.offsetWidth;
		return this.custom(0, width, duration);
	},

	hide :			function(duration) {
		if (this.unit == "%")
			var height	= 100;
		else
			var width	= this.element.clip ? this.element.clip.width : this.element.offsetWidth;
		alert(height);
		return this.custom(width, 0, duration);
	}
};
copyPrototype(jsEffect.Width, jsEffect.Core);


/**
 * Horizontal slide effect class
 */
jsEffect.Horizontal = function (elmid, fps, transition) { this.Core(elmid, fps, transition) }
jsEffect.Horizontal.prototype	= {
	startStyle :	function(value) {
		this.overflow	= this.element.style.overflow;
		this.setStyle(value);
	},

	setStyle :		function(value) {
		this.element.style.marginLeft	= value + this.unit;
	},

	finishStyle :	function(value) {
		this.setStyle(value);
		this.element.style.overflow		= this.overflow;
	},

	show :			function(duration) {
		if (this.unit == "%")
			return alert('Unsupported unit.');
		else
			var left	= this.element.clip ? this.element.clip.width : this.element.offsetWidth;
		return this.custom(left, 0, duration);
	},

	hide :			function(duration) {
		if (this.unit == "%")
			return alert('Unsupported unit.');
		else
			var left	= this.element.clip ? this.element.clip.width : this.element.offsetWidth;
		return this.custom(0, -left, duration);
	}
};
copyPrototype(jsEffect.Horizontal, jsEffect.Core);


/**
 * Transitions Class with all available transitions
 */
jsEffect.Transitions	= {
	bounceIn :		function(t, b, c, d) {
		return c - jsEffect.Transitions.bounceOut(d - t, 0, c, d) + b;
	},

	bounceOut :		function(t, b, c, d) {
		if ((t /= d) < (1 / 2.75))
			return c * (7.5625 * t * t) + b;
		else if (t < (2 / 2.75))
			return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
		else if (t < (2.5 / 2.75))
			return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
		else
			return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
	},

	bounceInOut :	function(t, b, c, d) {
		if (t < d / 2) return jsEffect.Transitions.bounceIn(t * 2, 0, c, d) * .5 + b;
		return jsEffect.Transitions.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
	},

	linear :		function linear(t, b, c, d) {
		return c * t / d + b;
	},

	smoothIn :		function(t, b, c, d) {
		return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
	},

	smoothOut :		function(t, b, c, d) {
		return c * Math.sin(t / d * (Math.PI / 2)) + b;
	},

	smoothInOut :	function smoothInOut(t, b, c, d) {
		return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
	}
};

/** File: ./datepicker.js */

var clickdate	= new Array();

function buildDatepicker(obj, inputfield, startyear, endyear, simple) {
	var realdate	= new Date();

	// Does the DIV already exist in the document?
	if (document.getElementById('datepicker') == null) {
		// No, so this is the first time we create the datapicker table

		var year		= realdate.getFullYear();
		var month		= realdate.getMonth();
		if (!startyear)	startyear = year - 100;
		if (!endyear)	endyear = year + 10;

		// Table body
		var datepicker	= document.createElement('table');
		var tablebody	= document.createElement('tbody');
		datepicker.appendChild(tablebody);
		obj.appendChild(datepicker);
		obj.style.position	= 'relative';

		// Month selection
		var tablerow	= document.createElement('tr');
		var tablecell	= document.createElement('th');
		tablecell.setAttribute("align", "center");
		tablecell.setAttribute("colSpan", "7");
		tablecell.setAttribute("nowrap", "nowrap");
		var months	= new Array('januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december');
		var monthselect	= document.createElement('select');
		monthselect.setAttribute("id", "datepicker_month");
		monthselect.onchange	= function() { buildDatepicker(obj, inputfield, startyear, endyear, simple); }
		for (var i = 0; i < 12; i++) {
			var option	= document.createElement('option');
			option.setAttribute("value", i);
			if (i == month) option.setAttribute("selected", "selected");
			option.appendChild(document.createTextNode(months[i]));
			monthselect.appendChild(option);
		}
		tablecell.appendChild(monthselect);
		tablecell.appendChild(document.createTextNode(" "));

		// Year selection
		var yearselect	= document.createElement('select');
		yearselect.setAttribute("id", "datepicker_year");
		yearselect.onchange	= function() { buildDatepicker(obj, inputfield, startyear, endyear, simple); }
		for (var i = endyear; i >= startyear; i--) {
			var option	= document.createElement('option');
			option.setAttribute("value", i);
			if (i == year) option.setAttribute("selected", "selected");
			option.appendChild(document.createTextNode(i));
			yearselect.appendChild(option);
		}
		tablecell.appendChild(yearselect);
		tablecell.appendChild(document.createTextNode(" "));

		// Close buttion
		var closeBtn	= document.createElement('button');
		closeBtn.appendChild(document.createTextNode('X'));
		closeBtn.style.width	= '30px';
		closeBtn.onclick = function () { closeDatepicker(inputfield, true); }
		tablecell.appendChild(closeBtn);
		tablerow.appendChild(tablecell);
		tablebody.appendChild(tablerow);

		// Weekdays
		var tablerow	= document.createElement('tr');
		var weekdays	= new Array('zo','ma','di','wo','do','vr','za');
		var curdate		= new Date(year, month, 14);
		var newdate		= new Date(year, month, 1);
		var weekday		= curdate.getDay();
		var shift		= weekday > 0 ? 1 - weekday : -6;
		for (var i = 0; i < 7; i++) {
			newdate.setDate(curdate.getDate()+shift+i);
			var tablecell	= document.createElement('td');
			tablecell.setAttribute('class', 'weekdays');
			tablecell.setAttribute('className', 'weekdays');
			tablecell.setAttribute("width", "14%");
			var boldtext	= document.createElement('b');
			boldtext.appendChild(document.createTextNode(weekdays[newdate.getDay()]));
			tablecell.appendChild(boldtext);
			tablerow.appendChild(tablecell);
		}
		tablebody.appendChild(tablerow);
	}
	else {
		// Yes, so we reuse the already existing one

		var monthp	= document.getElementById('datepicker_month');
		var yearp	= document.getElementById('datepicker_year');

		var month	= monthp.options[monthp.selectedIndex].value;
		var year	= yearp.options[yearp.selectedIndex].value;
		var curdate	= new Date(year, month, 14);
		var newdate	= new Date(year, month, 14);

		var datepicker	= obj;
		var tablebody	= datepicker.getElementsByTagName('tbody')[0];
		for (i = 0; i < 6; i++) {
			tablebody.removeChild(tablebody.lastChild);
		}
	}

	// Day selection
	newdate.setMonth(month);
	newdate.setDate(14);
	var monthday	= 14;
	var weekday		= newdate.getDay();
	var shift		= (weekday > 0 ? 1 - weekday : -6) - monthday;
	for (var i = 0; i < 6; i++) {
		var tablerow	= document.createElement('tr');
		for (var j = 0; j < 7; j++) {
			newdate	= new Date(year, month, monthday+shift);
			var datelink	= document.createElement('a');
			assignLinkClick(datelink, inputfield, newdate, simple);
			datelink.setAttribute("href", "#");
			datelink.appendChild(document.createTextNode(newdate.getDate()));

			var tablecell	= document.createElement('td');
			tablecell.setAttribute("align", "center");
			tablecell.setAttribute("width", "14%");

			if (newdate.toLocaleDateString() == realdate.toLocaleDateString()) {
				var temp	= document.createElement('span');
				temp.setAttribute('class', 'active');
				temp.setAttribute('className', 'active');
				temp.appendChild(datelink);
				datelink	= temp;
			}

			if (curdate.getMonth() != newdate.getMonth()) {
				tablecell.setAttribute('class', 'inactive');
				tablecell.setAttribute('className', 'inactive');
			}
			else if (newdate.getDay() == 6) {
				tablecell.setAttribute('class', 'weekend');
				tablecell.setAttribute('className', 'weekend');
			}

			tablecell.appendChild(datelink);
			tablerow.appendChild(tablecell);

			shift++;
		}
		tablebody.appendChild(tablerow);
	}

	monthselect.focus();
}

function assignLinkClick(datelink, inputfield, date, simple) {
	datelink.onclick	= function () { getDatepicker(inputfield, date, simple); return false; };
}

function showDatepicker(inputfield, startyear, endyear, simple) {
	if (!startyear || !endyear) {
		var realdate	= new Date();
		var year		= realdate.getFullYear();
		if (!startyear)	startyear = year - 100;
		if (!endyear)	endyear = year + 10;
	}
	if (!simple) simple = false;

	if (datepicker = document.getElementById('datepicker')) return false;
	var datepicker	= document.createElement('div');
	datepicker.setAttribute("id", "datepicker");
	buildDatepicker(datepicker, inputfield, startyear, endyear, simple);
	inputfield.style.visibility	= "hidden";
	inputfield.parentNode.insertBefore(datepicker, inputfield);
	datepicker.style.display	= "block";

	document.getElementById('datepicker_month').focus();
}

function closeDatepicker(inputfield, emptyvalue) {
	var datepicker = document.getElementById('datepicker')
	if (datepicker && inputfield) {
		datepicker.parentNode.removeChild(datepicker);
		inputfield.style.visibility	= "visible";
	}
	if (emptyvalue && inputfield) {
		inputfield.value = "";
	}
}

function getDatepicker(inputfield, date, simple) {
	closeDatepicker(inputfield);
	if (!simple)
		inputfield.value	= date.toLocaleDateString();
	else {
		var day		= date.getDate().toString();
		var month	= (date.getMonth() + 1).toString();
		var year	= date.getFullYear().toString();
		inputfield.value	= (day.length == 1 ? "0" :"") + day +"-"+ (month.length == 1 ? "0" :"") + month +"-"+ year;
	}

	if (inputfield.nextSibling) {
		var timestamp		= Date.parse(date).toString();
		inputfield.nextSibling.value	= timestamp.substr(0, timestamp.length - 3);
	}

	return false;
}

/** File: ./embed.js */

/**
 * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
 */

function writeFlash(p) {
	writeEmbed(
		'D27CDB6E-AE6D-11cf-96B8-444553540000',
		'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
		'application/x-shockwave-flash',
		p
	);
}

function writeShockWave(p) {
	writeEmbed(
	'166B1BCA-3F9C-11CF-8075-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
	'application/x-director',
		p
	);
}

function writeQuickTime(p) {
	writeEmbed(
		'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
		'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
		'video/quicktime',
		p
	);
}

function writeRealMedia(p) {
	writeEmbed(
		'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
		'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
		'audio/x-pn-realaudio-plugin',
		p
	);
}

function writeWindowsMedia(p) {
	p.url = p.src;
	writeEmbed(
		'6BF52A52-394A-11D3-B153-00C04F79FAA6',
		'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
		'application/x-mplayer2',
		p
	);
}

function writeEmbed(cls, cb, mt, p) {
	var h = '', n;

	h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
	h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
	h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
	h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
	h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
	h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
	h += '>';

	for (n in p)
		h += '<param name="' + n + '" value="' + p[n] + '">';

	h += '<embed type="' + mt + '"';

	for (n in p)
		h += n + '="' + p[n] + '" ';

	h += '></embed></object>';

	document.write(h);
}

/** File: ./httprequest.js */

function requestObject(verbose) {
	if (verbose != null) this.verbose = verbose;

	this.rObject	= null;
	if (window.ActiveXObject) {
		var aVersions	= [
			"Msxml2.XMLHTTP.7.0",
			"Msxml2.XMLHTTP.6.0",
			"Msxml2.XMLHTTP.5.0",
			"Msxml2.XMLHTTP.4.0",
			"MSXML2.XMLHTTP.3.0",
			"MSXML2.XMLHTTP",
			"Microsoft.XMLHTTP"
		];

		for (var i = 0; i < aVersions.length; i++) {
			try {
				this.rObject	= new ActiveXObject(aVersions[i]);
				break;
			}
			catch (e) {	}
		}
	}
	else if (window.XMLHttpRequest) {
		try {
			this.rObject	= new XMLHttpRequest();
		}
		catch (e) { }
	}
	else if (window.createRequest) {
		try {
			this.rObject	= window.createRequest();
		}
		catch (e) { }
	}

	return true;
};

requestObject.prototype = {
	rObject			: null,

	errors			: new Array(),
	isActive		: false,
	verbose			: false,

	onLoad			: null,
	onData			: null,
	onError			: null,

	handleRequest	: function() {
		var state	= null;

		switch (this.rObject.readyState) {
			case 1:
				if (this.onLoad != null) this.onLoad(this.rObject);
			break;

			case 4:
				this.isActive	= false;

				document.body.style.cursor = "default";

				if (this.rObject.status == 200) {
					try {
						eval("var result = " + this.rObject.responseText);
						if (typeof result == "object") {
							if (result["systemerror"]) {
								alert(result["systemerror"]);
								return;
							}
							if (this.onData != null) {
								this.onData(result);
							}
						}
						else if (this.onData != null) {
							this.onData(this.rObject);
						}
					}
					catch (ex) {
						if (this.onData != null)
							this.onData(this.rObject);
					}
				}
				else {
					if (this.onError != null)
						this.onError(this.rObject);
					else
						this.triggerError('Could not retrieve data.');
				}
			break;
		}

		if (this.verbose) {
			var msg	= "* State: \n" + this.rObject.readyState;

			if (this.rObject.readyState == 4)
				msg	+= "\n\n* Status: \n" + this.rObject.status
					+ "\n\n* Headers: \n" + this.rObject.getAllResponseHeaders();
					+ "\n\n* Response: \n" + this.rObject.responseText;

			 alert(msg);
		 }
	},

	requestData		: function(dataurl, method, query, ctype) {
		// Nodig om deze objectinstantie te kunnen aanroepen
		var _this	= this;

		if (this.rObject != null) {
			if (!this.isActive) {
				this.isActive	= true;

				document.body.style.cursor = "progress";

				if (ctype == null) var ctype = 'application/x-www-form-urlencoded';
				if (method == 'post') {
					this.rObject.open(method, dataurl);
					this.rObject.onreadystatechange	= function() { _this.handleRequest() };
					this.rObject.setRequestHeader('Content-Type', ctype);
					this.rObject.setRequestHeader('Content-length', query.length);
					this.rObject.setRequestHeader('Connection', 'close');
					this.rObject.send(query);
				}
				else {
					this.rObject.open(method, dataurl+'?'+query);
					this.rObject.onreadystatechange	= function() { _this.handleRequest() };
					this.rObject.send('');
				}
			}
			else {
				return this.triggerError('This object is still busy.');
			}
		}
		else {
			return this.triggerError('The XMLHttpRequest Object could not be initialised.');
		}

		return true;
	},

	triggerError	: function(msg) {
		this.errors.push(msg);
		alert("* Error:\n"+msg);
		return false;
	},

	getLastError	: function() {
		var error	= this.errors[this.errors.length-1];

		if (error != 'null')
			return error;
		else if (this.verbose)
			return "No errors occured.";
		else
			return false;
	}
};

function postForm(url, form, ispopup) {
	if (ispopup)
		var loader	= createLoader('popup');
	else
		var loader	= createLoader('content');

	setTimeout(function() {
		var fields	= document.getElementById(form).getElementsByTagName('input');
		var getstr = "";
		for (i = 0; i < fields.length; i++) {
			var sel	= fields[i];
			switch (sel.type) {
				case "file":
					return true;

				case "hidden":
				case "password":
				case "text":
					var value	= escape(sel.value);
					value		= value.replace(/\+/g, '%2B');
					value		= value.replace(/\#/g, '%23');
					getstr += sel.name + "=" + value + "&";
				break;

				case "checkbox":
					if (sel.checked)
						getstr += sel.name + "=on&";
				break;

				case "radio":
					if (sel.checked) {
						var value	= escape(sel.value);
						value		= value.replace(/\+/g, '%2B');
						value		= value.replace(/\#/g, '%23');
						getstr += sel.name + "=" + value + "&";
					}
				break;
			}
		}

		var fields	= document.getElementById(form).getElementsByTagName('textarea');
		for (i = 0; i < fields.length; i++) {
			var sel 	= fields[i];
			var value	= escape(sel.value);
			value		= value.replace(/\+/g, '%2B');
			value		= value.replace(/\#/g, '%23');
			getstr += sel.name + "=" + value + "&";
		}

		var fields	= document.getElementById(form).getElementsByTagName('select');
		for (i = 0; i < fields.length; i++) {
			var sel 	= fields[i];
			sel.disabled	= false; // Voor TinyMCE
			var value	= escape(sel.options[sel.selectedIndex].value);
			value		= value.replace(/\+/g, '%2B');
			value		= value.replace(/\#/g, '%23');
			getstr += sel.name + "=" + value + "&";
		}

		getstr += "ajaxreq=true";

		formsubm			= new requestObject(false);
		formsubm.onError	= function(response) {
			alert("Het formulier kon niet verzonden worden, probeer het nogmaals.");
			hideLoader();
		}
		formsubm.onData 	= function(response) {
			if (ispopup) {
				hideLoader();
				closePopup();
			}
			else {
				if (response.responseText.length > 0) {
					// Zoeken naar scripttags voor niet-geoptimaliseerde scripts
					parseScript(response.responseText);
				}
				hideLoader();
			}
		}
		formsubm.requestData(url, 'post', getstr);
	}, 500);

	return false;
};

function loadPage(menuid) {
	if (!document.getElementById('content')) return true;
	var loader	= createLoader('content');

	setTimeout(function() {
		getcontent	= new requestObject(false);
		getcontent.onError	= function(response) {
			return true;
		}
		getcontent.onData	= function(response) {
			var title	= document.getElementById('pagetitle');
			var content	= document.getElementById('content');

			var tstart	= response.responseText.indexOf('[[[') + 3;
			var tend	= response.responseText.indexOf(']]]', tstart);
			var responseTitle	= response.responseText.substring(tstart, tend);
			var responseText	= response.responseText.substring(tend + 3);

			if (title) title.innerHTML = responseTitle
			content.innerHTML = responseText;

			hideLoader();
		}
		getcontent.requestData('index.php', 'get', 'id='+menuid+'&ajaxreq=true');
	}, 100);

	return false;
};

function parseScript(text) {
	var re	= /<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi, match;
	while (match = re.exec(text)) {
		if (window.execScript)
			window.execScript(match[2], 'javascript');
		else
			setTimeout(match[2], 0);
	}
};
/** File: ./menu.js */

var menuitems	= new Array();
var timer		= null;

// Wrapperfunctie welke een timer om het dichtklappen van het menu zet
function hideSubMenu(level, timeout) {
	if (timeout == null || timeout == 0)
		forceHideSubMenu(level);

	timer	= setTimeout(function () {
		forceHideSubMenu(level);
	}, timeout);
};

// Functie om te voorkomen dat het menu dichtgeklapt wordt als de muis terug naar het menu beweegt
function cancelHide() {
	if (timer != null) clearTimeout(timer);
	timer	= null;
};

function forceHideSubMenu(level) {
	// Van het laagste gewenste level, tot het hoogste beschikbare dichtklappen
	for (var i = level; i <= menuitems.length; i++) {
		if (menuitems[i] == null) continue;
		var curid	= i.toString() + menuitems[i].toString();

		if (SubMenu = document.getElementById('submenu'+curid)) {
			SubMenu.style.display	= "none";
			menuitems[i]			= null;
			setListStyle(SubMenu.parentNode, 'closed');
		}
	}
};

function showSubMenu(curid) {
	var level	= parseInt(curid.substr(0, 1));
	var menuid	= curid.substr(1);

	// Eerst bepalen of er wat dichtgeklapt moet worden
	if (menuitems[level] != null) {
		if (menuitems[level] != menuid)
			forceHideSubMenu(level);
		else return;
	}

	// Dan het betreffende submenu open gooien
	if (SubMenu = document.getElementById('submenu'+curid)) {
		SubMenu.style.display	= "";
		menuitems[level]		= menuid;
		setListStyle(SubMenu.parentNode, 'opened');
	}
};

var toggling = false;
function switchWizardMenu(elmid) {
	if (toggling) return;
	toggling	= true;

	elm	= document.getElementById(elmid);

	if (elm.style.display != 'none') {
		elm.style.display	= 'none';
		setListStyle(elm.parentNode, 'closed');
	}
	else {
		setListStyle(elm.parentNode, 'opened');
		elm.style.display	= '';
	}

	setTimeout(function () { toggling = false}, 250);
};

function setToggling() {
	toggling	= true;
	setTimeout(function () { toggling = false}, 250);
}

function setListStyle(listitem, style) {
	if (curStyle = listitem.getAttribute("class") ? listitem.getAttribute("class") : listitem.getAttribute("className")) {
		if (curStyle.indexOf('last') > -1 || curStyle.indexOf('last') > -1) {
			listitem.setAttribute("class", "last" + style);
			listitem.setAttribute("className", "last" + style);
		}
		else {
			listitem.setAttribute("class", style);
			listitem.setAttribute("className", style);
		}
	}
};

/** File: ./overlibmws.js */

/*
 Do not remove or change this notice.
 overlibmws.js core module - Copyright Foteos Macrides 2002-2005. All rights reserved.
   Initial: August 18, 2002 - Last Revised: February 10, 2005
 This module is subject to the same terms of usage as for Erik Bosrup's overLIB,
 though only a minority of the code and API now correspond with Erik's version.
 See the overlibmws Change History and Command Reference via:

	http://www.macridesweb.com/oltest/

 Published under an open source license: http://www.macridesweb.com/oltest/license.html
 Give credit on sites that use overlibmws and submit changes so others can use them as well.
 You can get Erik's version via: http://www.bosrup.com/web/overlib/
*/

// PRE-INIT -- Ignore these lines, configuration is below.
var OLloaded=0,pmCnt=1,pMtr=new Array(),OLv,OLudf,OLrefXY;
var OLpct=new Array("83%","67%","83%","100%","117%","150%","200%","267%");
var OLbubblePI=0,OLcrossframePI=0,OLdebugPI=0,OLdraggablePI=0,OLexclusivePI=0,OLfilterPI=0;
var OLfunctionPI=0,OLhidePI=0,OLiframePI=0,OLovertwoPI=0,OLscrollPI=0,OLshadowPI=0;
if(typeof OLgateOK=='undefined')var OLgateOK=1;
OLregCmds(
 'inarray,caparray,caption,sticky,nofollow,background,noclose,mouseoff,offdelay,right,left,'
+'center,offsetx,offsety,fgcolor,bgcolor,cgcolor,textcolor,capcolor,closecolor,width,wrap,'
+'wrapmax,height,border,base,status,autostatus,autostatuscap,snapx,snapy,fixx,fixy,relx,rely,'
+'midx,midy,ref,refc,refp,refx,refy,fgbackground,bgbackground,cgbackground,padx,pady,fullhtml,'
+'below,above,vcenter,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,'
+'timeout,delay,hauto,vauto,nojustx,nojusty,closetext,closeclick,closetitle,fgclass,bgclass,'
+'cgclass,capbelow,textpadding,textfontclass,captionpadding,captionfontclass,closefontclass,'
+'label,donothing');

function OLud(v){return eval('typeof ol_'+v+'=="undefined"')?1:0;}

// DEFAULT CONFIGURATION -- See overlibConfig.txt for descriptions.
if(OLud('fgcolor'))var ol_fgcolor="#CCCCFF";
if(OLud('bgcolor'))var ol_bgcolor="#333399";
if(OLud('cgcolor'))var ol_cgcolor="#333399";
if(OLud('textcolor'))var ol_textcolor="#000000";
if(OLud('capcolor'))var ol_capcolor="#FFFFFF";
if(OLud('closecolor'))var ol_closecolor="#EEEEFF";
if(OLud('textfont'))var ol_textfont="Verdana,Arial,Helvetica";
if(OLud('captionfont'))var ol_captionfont="Verdana,Arial,Helvetica";
if(OLud('closefont'))var ol_closefont="Verdana,Arial,Helvetica";
if(OLud('textsize'))var ol_textsize=1;
if(OLud('captionsize'))var ol_captionsize=1;
if(OLud('closesize'))var ol_closesize=1;
if(OLud('fgclass'))var ol_fgclass="";
if(OLud('bgclass'))var ol_bgclass="";
if(OLud('cgclass'))var ol_cgclass="";
if(OLud('textpadding'))var ol_textpadding=2;
if(OLud('textfontclass'))var ol_textfontclass="";
if(OLud('captionpadding'))var ol_captionpadding=2;
if(OLud('captionfontclass'))var ol_captionfontclass="";
if(OLud('closefontclass'))var ol_closefontclass="";
if(OLud('close'))var ol_close="Close";
if(OLud('closeclick'))var ol_closeclick=0;
if(OLud('closetitle'))var ol_closetitle="Click to Close";
if(OLud('text'))var ol_text="Default Text";
if(OLud('cap'))var ol_cap="";
if(OLud('capbelow'))var ol_capbelow=0;
if(OLud('background'))var ol_background="";
if(OLud('width'))var ol_width=200;
if(OLud('wrap'))var ol_wrap=0;
if(OLud('wrapmax'))var ol_wrapmax=0;
if(OLud('height'))var ol_height= -1;
if(OLud('border'))var ol_border=1;
if(OLud('base'))var ol_base=0;
if(OLud('offsetx'))var ol_offsetx=10;
if(OLud('offsety'))var ol_offsety=10;
if(OLud('sticky'))var ol_sticky=0;
if(OLud('nofollow'))var ol_nofollow=0;
if(OLud('noclose'))var ol_noclose=0;
if(OLud('mouseoff'))var ol_mouseoff=0;
if(OLud('offdelay'))var ol_offdelay=300;
if(OLud('hpos'))var ol_hpos=RIGHT;
if(OLud('vpos'))var ol_vpos=BELOW;
if(OLud('status'))var ol_status="";
if(OLud('autostatus'))var ol_autostatus=0;
if(OLud('snapx'))var ol_snapx=0;
if(OLud('snapy'))var ol_snapy=0;
if(OLud('fixx'))var ol_fixx= -1;
if(OLud('fixy'))var ol_fixy= -1;
if(OLud('relx'))var ol_relx=null;
if(OLud('rely'))var ol_rely=null;
if(OLud('midx'))var ol_midx=null;
if(OLud('midy'))var ol_midy=null;
if(OLud('ref'))var ol_ref="";
if(OLud('refc'))var ol_refc='UL';
if(OLud('refp'))var ol_refp='UL';
if(OLud('refx'))var ol_refx=0;
if(OLud('refy'))var ol_refy=0;
if(OLud('fgbackground'))var ol_fgbackground="";
if(OLud('bgbackground'))var ol_bgbackground="";
if(OLud('cgbackground'))var ol_cgbackground="";
if(OLud('padxl'))var ol_padxl=1;
if(OLud('padxr'))var ol_padxr=1;
if(OLud('padyt'))var ol_padyt=1;
if(OLud('padyb'))var ol_padyb=1;
if(OLud('fullhtml'))var ol_fullhtml=0;
if(OLud('capicon'))var ol_capicon="";
if(OLud('frame'))var ol_frame=self;
if(OLud('timeout'))var ol_timeout=0;
if(OLud('delay'))var ol_delay=0;
if(OLud('hauto'))var ol_hauto=0;
if(OLud('vauto'))var ol_vauto=0;
if(OLud('nojustx'))var ol_nojustx=0;
if(OLud('nojusty'))var ol_nojusty=0;
if(OLud('label'))var ol_label="";
// ARRAY CONFIGURATION - See overlibConfig.txt for descriptions.
if(OLud('texts'))var ol_texts=new Array("Text 0","Text 1");
if(OLud('caps'))var ol_caps=new Array("Caption 0","Caption 1");
// END CONFIGURATION -- Don't change anything below, all configuration is above.

// INIT -- Runtime variables.
var o3_text="",o3_cap="",o3_sticky=0,o3_nofollow=0,o3_background="",o3_noclose=0,o3_mouseoff=0;
var o3_offdelay=300,o3_hpos=RIGHT,o3_offsetx=10,o3_offsety=10,o3_fgcolor="",o3_bgcolor="";
var o3_cgcolor="",o3_textcolor="",o3_capcolor="",o3_closecolor="",o3_width=200,o3_wrap=0;
var o3_wrapmax=0,o3_height= -1,o3_border=1,o3_base=0,o3_status="",o3_autostatus=0,o3_snapx=0;
var o3_snapy=0,o3_fixx= -1,o3_fixy= -1,o3_relx=null,o3_rely=null,o3_midx=null,o3_midy=null;
var o3_ref="",o3_refc='UL',o3_refp='UL',o3_refx=0,o3_refy=0,o3_fgbackground="";
var o3_bgbackground="",o3_cgbackground="",o3_padxl=0,o3_padxr=0,o3_padyt=0,o3_padyb=0;
var o3_fullhtml=0,o3_vpos=BELOW,o3_capicon="",o3_textfont="Verdana,Arial,Helvetica";
var o3_captionfont="Verdana,Arial,Helvetica",o3_closefont="Verdana,Arial,Helvetica";
var o3_textsize=1,o3_captionsize=1,o3_closesize=1,o3_frame=self,o3_timeout=0,o3_delay=0;
var o3_hauto=0,o3_vauto=0,o3_nojustx=0,o3_nojusty=0,o3_close="Close",o3_closeclick=0;
var o3_closetitle="",o3_fgclass="",o3_bgclass="",o3_cgclass="",o3_textpadding=2;
var o3_textfontclass="",o3_captionpadding=2,o3_captionfontclass="",o3_closefontclass="";
var o3_capbelow=0,o3_label="",CSSOFF=DONOTHING,CSSCLASS=DONOTHING;
var OLx=0,OLy=0,OLshowingsticky=0,OLallowmove=0,OLremovecounter=0;
var OLdelayid=0,OLtimerid=0,OLshowid=0,OLndt=0;
var over=null,OLfnRef="",OLhover=0;
var OLua=navigator.userAgent.toLowerCase();
var OLns4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4);
var OLns6=(document.getElementById)?1:0;
var OLie4=(document.all)?1:0;
var OLgek=(OLv=OLua.match(/gecko\/(\d{8})/i))?parseInt(OLv[1]):0;
var OLmac=(OLua.indexOf('mac')>=0)?1:0;
var OLsaf=(OLua.indexOf('safari')>=0)?1:0;
var OLkon=(OLua.indexOf('konqueror')>=0)?1:0;
var OLkht=(OLsaf||OLkon)?1:0;
var OLopr=(OLua.indexOf('opera')>=0)?1:0;
var OLop7=(OLopr&&document.createTextNode)?1:0;
if(OLopr){OLns4=OLns6=0;if(!OLop7)OLie4=0;}
var OLieM=((OLie4&&OLmac)&&!(OLkht||OLopr))?1:0;
var OLie5=0,OLie55=0;if(OLie4&&!OLop7){
if((OLv=OLua.match(/msie (\d\.\d+)\.*/i))&&(OLv=parseFloat(OLv[1]))>=5.0){
OLie5=1;OLns6=0;if(OLv>=5.5)OLie55=1;}if(OLns6)OLie4=0;}
if(OLns4)window.onresize=function(){location.reload();}
var OLchkMh=1,OLdw;
if(OLns4||OLie4||OLns6)OLmh();
else{overlib=nd=cClick=OLpageDefaults=no_overlib;}

/*
 PUBLIC FUNCTIONS
*/
// Loads defaults then args into runtime variables.
function overlib(){
if(!(OLloaded&&OLgateOK))return;
if((OLexclusivePI)&&OLisExclusive(overlib.arguments))return true;
if(OLchkMh)OLmh();
if(OLndt&&!OLtimerid)OLndt=0;if(over)cClick();
OLloadP1or2();OLload('close,closeclick,closetitle,noclose,mouseoff,offdelay,sticky,'
+'closecolor,closefont,closesize,closefontclass,frame,label');OLfnRef="";OLhover=0;
OLsetRunTimeVar();
OLparseTokens('o3_',overlib.arguments);
if(!(over=OLmkLyr()))return false;
if(OLbubblePI)OLchkForBubbleEffect();
if(OLdebugPI)OLsetDebugCanShow();
if(OLshadowPI)OLinitShadow();
if(OLiframePI)OLinitIfs();
if(OLfilterPI)OLinitFilterLyr();
if(OLexclusivePI&&o3_exclusive&&o3_exclusivestatus!="")o3_status=o3_exclusivestatus;
else if(o3_autostatus==2&&o3_cap!="")o3_status=o3_cap;
else if(o3_autostatus==1&&o3_text!="")o3_status=o3_text;
if(o3_delay==0){return OLmain();
}else{OLdelayid=setTimeout("OLmain()",o3_delay);
if(o3_status!=""){self.status=o3_status;return true;}
else if(!(OLop7&&event&&event.type=='mouseover'))return false;}
}

// Clears popups if appropriate
function nd(time){
if(!(OLloaded&&OLgateOK))return;
if((OLexclusivePI)&&OLisExclusive())return true;
if(time&&over&&!o3_delay){if(OLtimerid>0)clearTimeout(OLtimerid);
OLtimerid=(OLhover&&o3_frame==self&&!OLcursorOff())?0:
setTimeout("cClick()",(o3_timeout=OLndt=time));
}else{if(OLremovecounter>=1)OLshowingsticky=0;if(!OLshowingsticky){
OLallowmove=0;if(over)OLhideObject(over);}else{OLremovecounter++;}}
return true;
}

// Close function for stickies
function cClick(){
if(OLloaded&&OLgateOK){OLhover=0;if(over)OLhideObject(over);OLshowingsticky=0;}
return false;
}

// Sets page-specific defaults.
function OLpageDefaults(){
OLparseTokens('ol_',OLpageDefaults.arguments);
}

// For unsupported browsers.
function no_overlib(){return false;}

/*
 OVERLIB MAIN FUNCTION SET
*/
function OLmain(){
o3_delay=0;
if(o3_frame==self){if(o3_noclose)OLoptMOUSEOFF(0);else if(o3_mouseoff)OLoptMOUSEOFF(1);}
OLdoLyr();
OLallowmove=0;if(o3_timeout>0){
if(OLtimerid>0)clearTimeout(OLtimerid);OLtimerid=setTimeout("cClick()",o3_timeout);}
if(o3_ref){OLrefXY=OLgetRefXY(o3_ref);if(OLrefXY[0]==null){o3_ref="";o3_midx=0;o3_midy=0;}}
OLdisp(o3_status);
if(OLdraggablePI)OLcheckDrag();
if(o3_status!="")return true;else if(!(OLop7&&event&&event.type=='mouseover'))return false;
}

// Loads defaults for primaries or secondaries
function OLloadP1or2(){
OLload('text,cap,capbelow,textpadding,captionpadding,border,base,status,autostatus,nofollow,'
+'width,wrap,wrapmax,height,hpos,vpos,offsetx,offsety,snapx,snapy,relx,rely,midx,midy,ref,'
+'refc,refp,refx,refy,fixx,fixy,nojustx,nojusty,hauto,vauto,timeout,delay,fgcolor,bgcolor,'
+'cgcolor,textcolor,capcolor,textfont,captionfont,textsize,captionsize,fgbackground,'
+'bgbackground,cgbackground,capicon,background,padxl,padxr,padyt,padyb,fullhtml,fgclass,'
+'bgclass,cgclass,textfontclass,captionfontclass');
}
function OLload(c){var i,m=c.split(',');for(i=0;i<m.length;i++)eval('o3_'+m[i]+'=ol_'+m[i]);}

// Chooses LGF 
function OLdoLGF(){
return (o3_background!=''||o3_fullhtml)?OLcontentBackground(o3_text,o3_background,o3_fullhtml):
(o3_cap=="")?OLcontentSimple(o3_text):
(o3_sticky)?OLcontentCaption(o3_text,o3_cap,o3_close):OLcontentCaption(o3_text,o3_cap,'');
}

// Makes Layer
function OLmkLyr(id,f,z){
id=(id||'overDiv');f=(f||o3_frame);z=(z||1000);var fd=f.document,d=OLgetRefById(id,fd);
if(!d){if(OLns4)d=fd.layers[id]=new Layer(1024,f);else if(OLie4&&!document.getElementById){
fd.body.insertAdjacentHTML('BeforeEnd','<div id="'+id+'"></div>');d=fd.all[id];
}else{d=fd.createElement('div');if(d){d.id=id;fd.body.appendChild(d);}}if(!d)return null;
if(OLns4)d.zIndex=z;else{var o=d.style;o.position='absolute';o.visibility='hidden';o.zIndex=z;}}
return d;
}

// Creates and writes layer content
function OLdoLyr(){
if(o3_background==''&&!o3_fullhtml){
if(o3_fgbackground!='')o3_fgbackground=' background="'+o3_fgbackground+'"';
if(o3_bgbackground!='')o3_bgbackground=' background="'+o3_bgbackground+'"';
if(o3_cgbackground!='')o3_cgbackground=' background="'+o3_cgbackground+'"';
if(o3_fgcolor!='')o3_fgcolor=' bgcolor="'+o3_fgcolor+'"';
if(o3_bgcolor!='')o3_bgcolor=' bgcolor="'+o3_bgcolor+'"';
if(o3_cgcolor!='')o3_cgcolor=' bgcolor="'+o3_cgcolor+'"';
if(o3_height>0)o3_height=' height="'+o3_height+'"';else o3_height='';}
if(!OLns4)OLrepositionTo(over,(OLns6?20:0),0);var lyrHtml=OLdoLGF();
if(o3_sticky){if(OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}
OLshowingsticky=1;OLremovecounter=0;}
if(o3_wrap&&!o3_fullhtml){OLlayerWrite(lyrHtml);
o3_width=(OLns4?over.clip.width:over.offsetWidth);
if(OLns4&&o3_wrapmax<1)o3_wrapmax=o3_frame.innerWidth-40;
o3_wrap=0;if(o3_wrapmax>0&&o3_width>o3_wrapmax)o3_width=o3_wrapmax;lyrHtml=OLdoLGF();}
OLlayerWrite(lyrHtml);o3_width=(OLns4?over.clip.width:over.offsetWidth);
if(OLbubblePI)OLgenerateBubble(lyrHtml);
}

/*
 LAYER GENERATION FUNCTIONS
*/
// Makes simple table without caption
function OLcontentSimple(txt){
var t=OLbgLGF()+OLfgLGF(txt)+OLbaseLGF();
OLsetBackground('');return t;
}

// Makes table with caption and optional close link
function OLcontentCaption(txt,title,close){
var closing='',closeevent='onmouseover',caption,t;
if(o3_closeclick==1)closeevent=(o3_closetitle?'title="'+o3_closetitle+'" ':'')+'onclick';
if(o3_capicon!='')o3_capicon='<img src="'+o3_capicon+'" /> ';
if(close!=''){closing='<td align="right"><a href="javascript:return '+OLfnRef+'cClick();" '
+closeevent+'="return '+OLfnRef+'cClick();"'+(o3_closefontclass?' class="'+o3_closefontclass
+'">':'>'+OLlgfUtil(0,'','span',o3_closecolor,o3_closefont,o3_closesize))+close
+(o3_closefontclass?'':OLlgfUtil(1,'','span'))+'</a></td>';}
caption='<table'+OLwd(0)+' border="0" cellpadding="'+o3_captionpadding+'" cellspacing="0"'
+(o3_cgclass?' class="'+o3_cgclass+'"':o3_cgcolor+o3_cgbackground)+'><tr><td'+OLwd(0)
+(o3_cgclass?' class="'+o3_cgclass+'">':'>')+(o3_captionfontclass?'<div class="'
+o3_captionfontclass+'">':'<strong>'
+OLlgfUtil(0,'','div',o3_capcolor,o3_captionfont,o3_captionsize))+o3_capicon+title
+OLlgfUtil(1,'','div')+(o3_captionfontclass?'':'</strong>')+'</td>'+closing+'</tr></table>';
t=OLbgLGF()+(o3_capbelow?OLfgLGF(txt)+caption:caption+OLfgLGF(txt))+OLbaseLGF();
OLsetBackground('');return t;
}

// For BACKGROUND and FULLHTML commands
function OLcontentBackground(txt, image, hasfullhtml){
var t;if(hasfullhtml){t=txt;}else{t='<table'+OLwd(1)
+' border="0" cellpadding="0" cellspacing="0" '+'height="'+o3_height
+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'
+o3_padxl+'"></td><td valign="top"'+OLwd(2)+'>'
+OLlgfUtil(0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+txt+
OLlgfUtil(1,'','div')+'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'
+o3_padyb+'"></td></tr></table>';}
OLsetBackground(image);return t;
}

// LGF utilities
function OLbgLGF(){
return '<table'+OLwd(1)+o3_height+' border="0" cellpadding="'+o3_border+'" cellspacing="0"'
+(o3_bgclass?' class="'+o3_bgclass+'"':o3_bgcolor+o3_bgbackground)+'><tr><td>';
}
function OLfgLGF(t){
return '<table'+OLwd(0)+o3_height+' border="0" cellpadding="'+o3_textpadding
+'" cellspacing="0"'+(o3_fgclass?' class="'+o3_fgclass+'"':o3_fgcolor+o3_fgbackground)
+'><tr><td valign="top"'+(o3_fgclass?' class="'+o3_fgclass+'"':'')+'>'
+OLlgfUtil(0,o3_textfontclass,'div',o3_textcolor,o3_textfont,o3_textsize)+t
+OLlgfUtil(1,'','div')+'</td></tr></table>';
}
function OLlgfUtil(end,tfc,ele,col,fac,siz){
if(end)return ('</'+(OLns4?'font':ele)+'>');else return (tfc?'<div class="'+tfc+'">':
('<'+(OLns4?'font color="'+col+'" face="'+OLquoteMultiNameFonts(fac)+'" size="'+siz:ele
+' style="color:'+col+';font-family:'+OLquoteMultiNameFonts(fac)+';font-size:'+siz+';'
+(ele=='span'?'text-decoration:underline;':''))+'">'));
}
function OLquoteMultiNameFonts(f){
var i,v,pM=f.split(',');
for(i=0;i<pM.length;i++){v=pM[i];v=v.replace(/^\s+/,'').replace(/\s+$/,'');
if(/\s/.test(v) && !/['"]/.test(v)){v="\'"+v+"\'";pM[i]=v;}}
return pM.join();
}
function OLbaseLGF(){
return ((o3_base>0&&!o3_wrap)?('<table width="100%" border="0" cellpadding="0" cellspacing="0"'
+(o3_bgclass?' class="'+o3_bgclass+'"':'')+'><tr><td height="'+o3_base
+'"></td></tr></table>'):'')+'</td></tr></table>';
}
function OLwd(a){
return(o3_wrap?'':' width="'+(!a?'100%':(a==1?o3_width:(o3_width-o3_padxl-o3_padxr)))+'"');
}

// Loads image into the div.
function OLsetBackground(i){
if(i==''){if(OLns4)over.background.src=null;
else{if(OLns6)over.style.width='';over.style.backgroundImage='none';}
}else{if(OLns4)over.background.src=i;
else{if(OLns6)over.style.width=o3_width+'px';over.style.backgroundImage='url('+i+')';}}
}

/*
 HANDLING FUNCTIONS
*/
// Displays layer
function OLdisp(s){
if(OLallowmove==0){if(OLshadowPI)OLdispShadow();if(OLiframePI)OLdispIfs();OLplaceLayer();
if(OLndt)OLshowObject(over);else OLshowid=setTimeout("OLshowObject(over)",1);
OLallowmove=(o3_sticky||o3_nofollow)?0:1;}OLndt=0;if(s!="")self.status=s;
}

// Decides placement of layer.
function OLplaceLayer(){
var snp,X,Y,pgLeft,pgTop,pWd=o3_width,pHt,iWd=100,iHt=100,SB=0,LM=0,CX=0,TM=0,BM=0,CY=0;
var o=OLfd(),nsb=(OLgek>=20010505&&!o3_frame.scrollbars.visible)?1:0;
if(!OLkht&&o&&o.clientWidth)iWd=o.clientWidth;
else if(o3_frame.innerWidth){SB=Math.ceil(1.4*(o3_frame.outerWidth-o3_frame.innerWidth));
if(SB>20)SB=20;iWd=o3_frame.innerWidth;}
pgLeft=(OLie4)?o.scrollLeft:o3_frame.pageXOffset;
if(OLie55&&OLfilterPI&&o3_filtershadow)SB=CX=5;else
if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){SB+=((o3_shadowx>0)?o3_shadowx:0);
LM=((o3_shadowx<0)?Math.abs(o3_shadowx):0);CX=Math.abs(o3_shadowx);}
if(o3_ref!=""||o3_fixx> -1||o3_relx!=null||o3_midx!=null){
if(o3_ref!=""){
X=OLrefXY[0];if(OLie55&&OLfilterPI&&o3_filtershadow){if(o3_refp=='UR'||o3_refp=='LR')X -= 5;}
else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowx){  
if(o3_shadowx<0&&(o3_refp=='UL'||o3_refp=='LL'))X += o3_shadowx;
else if(o3_shadowx>0&&(o3_refp=='UR'||o3_refp=='LR'))X -= o3_shadowx;}
}else{if(o3_midx!=null){
X=parseInt(pgLeft+((iWd-pWd-SB-LM)/2)+o3_midx);
}else{if(o3_relx!=null){
if(o3_relx>=0)X=pgLeft+o3_relx+LM;else X=pgLeft+o3_relx+iWd-pWd-SB;
}else{
X=o3_fixx+LM;}}}
}else{
if(o3_hauto){
if(o3_hpos==LEFT&&OLx-pgLeft<iWd/2&&OLx-pWd-o3_offsetx<pgLeft+LM)o3_hpos=RIGHT;else
if(o3_hpos==RIGHT&&OLx-pgLeft>iWd/2&&OLx+pWd+o3_offsetx>pgLeft+iWd-SB)o3_hpos=LEFT;}
X=(o3_hpos==CENTER)?parseInt(OLx-((pWd+CX)/2)+o3_offsetx):
(o3_hpos==LEFT)?OLx-o3_offsetx-pWd:OLx+o3_offsetx;
if(o3_snapx>1){
snp=X % o3_snapx;
if(o3_hpos==LEFT){X=X-(o3_snapx+snp);}else{X=X+(o3_snapx-snp);}}}
if(!o3_nojustx&&X+pWd>pgLeft+iWd-SB)
X=iWd+pgLeft-pWd-SB;if(!o3_nojustx&&X-LM<pgLeft)X=pgLeft+LM;
pgTop=OLie4?o.scrollTop:o3_frame.pageYOffset;
if(!OLkht&&!nsb&&o&&o.clientHeight)iHt=o.clientHeight;
else if(o3_frame.innerHeight)iHt=o3_frame.innerHeight;
if(OLbubblePI&&o3_bubble)pHt=OLbubbleHt;else pHt=OLns4?over.clip.height:over.offsetHeight;
if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){TM=(o3_shadowy<0)?Math.abs(o3_shadowy):0;
if(OLie55&&OLfilterPI&&o3_filtershadow)BM=CY=5;else
BM=(o3_shadowy>0)?o3_shadowy:0;CY=Math.abs(o3_shadowy);}
if(o3_ref!=""||o3_fixy> -1||o3_rely!=null||o3_midy!=null){
if(o3_ref!=""){
Y=OLrefXY[1];if(OLie55&&OLfilterPI&&o3_filtershadow){if(o3_refp=='LL'||o3_refp=='LR')Y -= 5;}
else if((OLshadowPI)&&bkdrop&&o3_shadow&&o3_shadowy){
if(o3_shadowy<0&&(o3_refp=='UL'||o3_refp=='UR'))Y+=o3_shadowy;else
if(o3_shadowy>0&&(o3_refp=='LL'||o3_refp=='LR'))Y-=o3_shadowy;}
}else{if(o3_midy!=null){
Y=parseInt(pgTop+((iHt-pHt-CY)/2)+o3_midy);
}else{if(o3_rely!=null){
if(o3_rely>=0)Y=pgTop+o3_rely+TM;else Y=pgTop+o3_rely+iHt-pHt-BM;}else{
Y=o3_fixy+TM;}}}
}else{
if(o3_vauto){
if(o3_vpos==ABOVE&&OLy-pgTop<iHt/2&&OLy-pHt-o3_offsety<pgTop)o3_vpos=BELOW;else
if(o3_vpos==BELOW&&OLy-pgTop>iHt/2&&OLy+pHt+o3_offsety+((OLns4||OLkht)?17:0)>pgTop+iHt-BM)
o3_vpos=ABOVE;}Y=(o3_vpos==VCENTER)?parseInt(OLy-((pHt+CY)/2)+o3_offsety):
(o3_vpos==ABOVE)?OLy-(pHt+o3_offsety+BM):OLy+o3_offsety+TM;
if(o3_snapy>1){
snp=Y % o3_snapy;
if(pHt>0&&o3_vpos==ABOVE){Y=Y-(o3_snapy+snp);}else{Y=Y+(o3_snapy-snp);}}}
if(!o3_nojusty&&Y+pHt+BM>pgTop+iHt)Y=pgTop+iHt-pHt-BM;if(!o3_nojusty&&Y-TM<pgTop)Y=pgTop+TM;
OLrepositionTo(over,X,Y);
if(OLshadowPI)OLrepositionShadow(X,Y);if(OLiframePI)OLrepositionIfs(X,Y);
if(OLns6&&o3_frame.innerHeight){iHt=o3_frame.innerHeight;OLrepositionTo(over,X,Y);}
if(OLscrollPI)OLchkScroll(X-pgLeft,Y-pgTop);
}

// Chooses body or documentElement
function OLfd(f){
var fd=((f)?f:o3_frame).document,fdc=fd.compatMode,fdd=fd.documentElement;
return (!OLop7&&fdc&&fdc!='BackCompat'&&fdd&&fdd.clientWidth)?fd.documentElement:fd.body;
}

// Gets location of REFerence object
function OLgetRefXY(r){
var mn=r,mr=OLgetRef(mn),o,of,rXY;
if(!mr)return [null,null];
o=mr;rXY=[o3_refx,o3_refy];
if(OLns4){if(typeof mr.length!='undefined'&&mr.length>1){
o=mr[0];rXY[0]+=mr[0].x+mr[1].pageX;rXY[1]+=mr[0].y+mr[1].pageY;
}else{if((mr.toString().indexOf('Image')!= -1)||(mr.toString().indexOf('Anchor')!= -1)){
rXY[0]+=mr.x;rXY[1]+=mr.y;}else{rXY[0]+=mr.pageX;rXY[1]+=mr.pageY;}}
}else{rXY[0]+=OLpageLoc(mr,'Left');rXY[1]+=OLpageLoc(mr,'Top');}
of=OLgetRefOffsets(o);rXY[0]+=of[0];rXY[1]+=of[1];
return rXY;
}
function OLgetRef(l){var r=OLgetRefById(l);return (r)?r:OLgetRefByName(l);}

// Seeks REFerence by id
function OLgetRefById(l,d){
var r="",j;l=(l||'overDiv');d=(d||o3_frame.document);
if(OLie4&&d.all){return d.all[l];}else if(d.getElementById){return d.getElementById(l);
}else if(d.layers&&d.layers.length>0){if(d.layers[l])return d.layers[l];
for(j=0;j<d.layers.length;j++){r=OLgetRefById(l,d.layers[j].document);if(r)return r;}}
return null;
}

// Seeks REFerence by name (for img and a)
function OLgetRefByName(l,d){
var r=null,j;d=(d||o3_frame.document);
if(typeof d.images[l]!='undefined'&&d.images[l]){return d.images[l];
}else if(typeof d.anchors[l]!='undefined'&&d.anchors[l]){return d.anchors[l];
}else if(d.layers&&d.layers.length>0){
for(j=0;j<d.layers.length;j++){r=OLgetRefByName(l,d.layers[j].document);
if(r&&r.length>0)return r;else if(r)return [r,d.layers[j]];}}
return null;
}

// Gets layer vs REFerence offsets
function OLgetRefOffsets(o){
var mc=o3_refc.toUpperCase(),mp=o3_refp.toUpperCase(),mW=0,mH=0,pW=0,pH=0,off=[0,0];
pW=(OLbubblePI&&o3_bubble)?o3_width:OLns4?over.clip.width:over.offsetWidth;
pH=(OLbubblePI&&o3_bubble)?OLbubbleHt:OLns4?over.clip.height:over.offsetHeight;
if((!OLop7)&&o.toString().indexOf('Image')!= -1){mW=o.width;mH=o.height;
}else if((!OLop7)&&o.toString().indexOf('Anchor')!= -1){mc=o3_refc='UL';}else{
mW=(OLns4)?o.clip.width:o.offsetWidth;mH=(OLns4)?o.clip.height:o.offsetHeight;}
if(mc=='UL'){off=(mp=='UR')?[-pW,0]:(mp=='LL')?[0,-pH]:(mp=='LR')?[-pW,-pH]:[0,0];
}else if(mc=='UR'){off=(mp=='UR')?[mW-pW,0]:(mp=='LL')?[mW,-pH]:(mp=='LR')?[mW-pW,-pH]:[mW,0];
}else if(mc=='LL'){off=(mp=='UR')?[-pW,mH]:(mp=='LL')?[0,mH-pH]:(mp=='LR')?[-pW,mH-pH]:[0,mH];
}else if(mc=='LR'){off=(mp=='UR')?[mW-pW,mH]:(mp=='LL')?[mW,mH-pH]:(mp=='LR')?[mW-pW,mH-pH]:
[mW,mH];}
return off;
}

// Gets x or y location of object
function OLpageLoc(o,t){
var l=0;while(o.offsetParent&&o.offsetParent.tagName.toLowerCase()!='html'){
l+=o['offset'+t];o=o.offsetParent;}l+=o['offset'+t];
return l;
} 

// Moves layer
function OLmouseMove(e){
var e=(e||event);
OLx=(e.pageX||e.clientX+OLfd().scrollLeft);OLy=(e.pageY||e.clientY+OLfd().scrollTop);
if((OLallowmove&&over)&&(o3_frame==self||over==OLgetRefById())){
OLplaceLayer();if(OLhidePI)OLhideUtil(0,1,1,0,0,0);}
if(OLhover&&over&&o3_frame==self&&OLcursorOff())if(o3_offdelay<1)cClick();else
{if(OLtimerid>0)clearTimeout(OLtimerid);OLtimerid=setTimeout("cClick()",o3_offdelay);}
}

// Capture mouse and chain other scripts.
function OLmh(){
var fN,f,j,k,s,mh=OLmouseMove,w=(OLns4&&window.onmousemove),re=/function[ ]*(\w*)\(/;
OLdw=document;if(document.onmousemove||w){if(w)OLdw=window;f=OLdw.onmousemove.toString();
fN=f.match(re);if(!fN||fN[1]=='anonymous'||fN[1]=='OLmouseMove'){OLchkMh=0;return;}
if(fN[1])s=fN[1]+'(e)';else{j=f.indexOf('{');k=f.lastIndexOf('}')+1;s=f.substring(j,k);}
s+=';OLmouseMove(e);';mh=new Function('e',s);}
OLdw.onmousemove=mh;if(OLns4)OLdw.captureEvents(Event.MOUSEMOVE);
}

/*
 PARSING
*/
function OLparseTokens(pf,ar){
var i,v,md= -1,par=(pf!='ol_'),e=eval,p=OLpar,q=OLparQuo,t=OLtoggle;OLudf=(par&&!ar.length?1:0);
for(i=0;i< ar.length;i++){if(md<0){if(typeof ar[i]=='number'){OLudf=(par?1:0);i--;}
else{switch(pf){case 'ol_':ol_text=ar[i];break;default:o3_text=ar[i];}}md=0;
}else{
if(ar[i]==INARRAY){OLudf=0;e(pf+'text=ol_texts['+ar[++i]+']');continue;}
if(ar[i]==CAPARRAY){e(pf+'cap=ol_caps['+ar[++i]+']');continue;}
if(ar[i]==CAPTION){q(ar[++i],pf+'cap');continue;}
if(Math.abs(ar[i])==STICKY){t(ar[i],pf+'sticky');continue;}
if(Math.abs(ar[i])==NOFOLLOW){t(ar[i],pf+'nofollow');continue;}
if(ar[i]==BACKGROUND){q(ar[++i],pf+'background');continue;}
if(Math.abs(ar[i])==NOCLOSE){t(ar[i],pf+'noclose');continue;}
if(Math.abs(ar[i])==MOUSEOFF){t(ar[i],pf+'mouseoff');continue;}
if(ar[i]==OFFDELAY){p(ar[++i],pf+'offdelay');continue;}
if(ar[i]==RIGHT||ar[i]==LEFT||ar[i]==CENTER){p(ar[i],pf+'hpos');continue;}
if(ar[i]==OFFSETX){p(ar[++i],pf+'offsetx');continue;}
if(ar[i]==OFFSETY){p(ar[++i],pf+'offsety');continue;}
if(ar[i]==FGCOLOR){q(ar[++i],pf+'fgcolor');continue;}
if(ar[i]==BGCOLOR){q(ar[++i],pf+'bgcolor');continue;}
if(ar[i]==CGCOLOR){q(ar[++i],pf+'cgcolor');continue;}
if(ar[i]==TEXTCOLOR){q(ar[++i],pf+'textcolor');continue;}
if(ar[i]==CAPCOLOR){q(ar[++i],pf+'capcolor');continue;}
if(ar[i]==CLOSECOLOR){q(ar[++i],pf+'closecolor');continue;}
if(ar[i]==WIDTH){p(ar[++i],pf+'width');continue;}
if(Math.abs(ar[i])==WRAP){t(ar[i],pf+'wrap');continue;}
if(ar[i]==WRAPMAX){p(ar[++i],pf+'wrapmax');continue;}
if(ar[i]==HEIGHT){p(ar[++i],pf+'height');continue;}
if(ar[i]==BORDER){p(ar[++i],pf+'border');continue;}
if(ar[i]==BASE){p(ar[++i],pf+'base');continue;}
if(ar[i]==STATUS){q(ar[++i],pf+'status');continue;}
if(Math.abs(ar[i])==AUTOSTATUS){v=pf+'autostatus';
e(v+'=('+ar[i]+'<0)?('+v+'==2?2:0):('+v+'==1?0:1)');continue;}
if(Math.abs(ar[i])==AUTOSTATUSCAP){v=pf+'autostatus';
e(v+'=('+ar[i]+'<0)?('+v+'==1?1:0):('+v+'==2?0:2)');continue;}
if(ar[i]==CLOSETEXT){q(ar[++i],pf+'close');continue;}
if(ar[i]==SNAPX){p(ar[++i],pf+'snapx');continue;}
if(ar[i]==SNAPY){p(ar[++i],pf+'snapy');continue;}
if(ar[i]==FIXX){p(ar[++i],pf+'fixx');continue;}
if(ar[i]==FIXY){p(ar[++i],pf+'fixy');continue;}
if(ar[i]==RELX){p(ar[++i],pf+'relx');continue;}
if(ar[i]==RELY){p(ar[++i],pf+'rely');continue;}
if(ar[i]==MIDX){p(ar[++i],pf+'midx');continue;}
if(ar[i]==MIDY){p(ar[++i],pf+'midy');continue;}
if(ar[i]==REF){q(ar[++i],pf+'ref');continue;}
if(ar[i]==REFC){q(ar[++i],pf+'refc');continue;}
if(ar[i]==REFP){q(ar[++i],pf+'refp');continue;}
if(ar[i]==REFX){p(ar[++i],pf+'refx');continue;}
if(ar[i]==REFY){p(ar[++i],pf+'refy');continue;}
if(ar[i]==FGBACKGROUND){q(ar[++i],pf+'fgbackground');continue;}
if(ar[i]==BGBACKGROUND){q(ar[++i],pf+'bgbackground');continue;}
if(ar[i]==CGBACKGROUND){q(ar[++i],pf+'cgbackground');continue;}
if(ar[i]==PADX){p(ar[++i],pf+'padxl');p(ar[++i],pf+'padxr');continue;}
if(ar[i]==PADY){p(ar[++i],pf+'padyt');p(ar[++i],pf+'padyb');continue;}
if(Math.abs(ar[i])==FULLHTML){t(ar[i],pf+'fullhtml');continue;}
if(ar[i]==BELOW||ar[i]==ABOVE||ar[i]==VCENTER){p(ar[i],pf+'vpos');continue;}
if(ar[i]==CAPICON){q(ar[++i],pf+'capicon');continue;}
if(ar[i]==TEXTFONT){q(ar[++i],pf+'textfont');continue;}
if(ar[i]==CAPTIONFONT){q(ar[++i],pf+'captionfont');continue;}
if(ar[i]==CLOSEFONT){q(ar[++i],pf+'closefont');continue;}
if(ar[i]==TEXTSIZE){q(ar[++i],pf+'textsize');continue;}
if(ar[i]==CAPTIONSIZE){q(ar[++i],pf+'captionsize');continue;}
if(ar[i]==CLOSESIZE){q(ar[++i],pf+'closesize');continue;}
if(ar[i]==TIMEOUT){p(ar[++i],pf+'timeout');continue;}
if(ar[i]==DELAY){p(ar[++i],pf+'delay');continue;}
if(Math.abs(ar[i])==HAUTO){t(ar[i],pf+'hauto');continue;}
if(Math.abs(ar[i])==VAUTO){t(ar[i],pf+'vauto');continue;}
if(Math.abs(ar[i])==NOJUSTX){t(ar[i],pf+'nojustx');continue;}
if(Math.abs(ar[i])==NOJUSTY){t(ar[i],pf+'nojusty');continue;}
if(Math.abs(ar[i])==CLOSECLICK){t(ar[i],pf+'closeclick');continue;}
if(ar[i]==CLOSETITLE){q(ar[++i],pf+'closetitle');continue;}
if(ar[i]==FGCLASS){q(ar[++i],pf+'fgclass');continue;}
if(ar[i]==BGCLASS){q(ar[++i],pf+'bgclass');continue;}
if(ar[i]==CGCLASS){q(ar[++i],pf+'cgclass');continue;}
if(ar[i]==TEXTPADDING){p(ar[++i],pf+'textpadding');continue;}
if(ar[i]==TEXTFONTCLASS){q(ar[++i],pf+'textfontclass');continue;}
if(ar[i]==CAPTIONPADDING){p(ar[++i],pf+'captionpadding');continue;}
if(ar[i]==CAPTIONFONTCLASS){q(ar[++i],pf+'captionfontclass');continue;}
if(ar[i]==CLOSEFONTCLASS){q(ar[++i],pf+'closefontclass');continue;}
if(Math.abs(ar[i])==CAPBELOW){t(ar[i],pf+'capbelow');continue;}
if(ar[i]==LABEL){q(ar[++i],pf+'label');continue;}
if(ar[i]==DONOTHING){continue;}
i=OLparseCmdLine(pf,i,ar);}}
if((OLfunctionPI)&&OLudf&&o3_function)o3_text=o3_function();
if(pf=='o3_')OLfontSize();
}
function OLpar(a,v){eval(v+'='+a);}
function OLparQuo(a,v){eval(v+"='"+OLescSglQt(a)+"'");}
function OLescSglQt(s){return s.toString().replace(/'/g,"\\'");}
function OLtoggle(a,v){eval(v+'=('+v+'==0&&'+a+'>=0)?1:0');}
function OLhasDims(s){return /[%\-a-z]+$/.test(s);}
function OLfontSize(){
var i;if(OLhasDims(o3_textsize)){if(OLns4)o3_textsize="2";}else
if(!OLns4){i=parseInt(o3_textsize);o3_textsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}
if(OLhasDims(o3_captionsize)){if(OLns4)o3_captionsize="2";}else
if(!OLns4){i=parseInt(o3_captionsize);o3_captionsize=(i>0&&i<8)?OLpct[i]:OLpct[0];}
if(OLhasDims(o3_closesize)){if(OLns4)o3_closesize="2";}else
if(!OLns4){i=parseInt(o3_closesize);o3_closesize=(i>0&&i<8)?OLpct[i]:OLpct[0];}
}

/*
 LAYER FUNCTIONS
*/
// Writes to layer
function OLlayerWrite(t){
t+="\n";
if(OLns4){over.document.write(t);over.document.close();
}else if(typeof over.innerHTML!='undefined'){if(OLieM)over.innerHTML='';over.innerHTML=t;
}else{range=o3_frame.document.createRange();range.setStartAfter(over);
domfrag=range.createContextualFragment(t);
while(over.hasChildNodes()){over.removeChild(over.lastChild);}
over.appendChild(domfrag);}
}

// Makes object visible
function OLshowObject(o){
OLshowid=0;o=(OLns4)?o:o.style;
if(((OLfilterPI)&&!OLchkFilter(o))||!OLfilterPI)o.visibility="visible";
if(OLshadowPI)OLshowShadow();if(OLiframePI)OLshowIfs();if(OLhidePI)OLhideUtil(1,1,0);
}

// Hides object
function OLhideObject(o){
if(OLshowid>0){clearTimeout(OLshowid);OLshowid=0;}
if(OLtimerid>0)clearTimeout(OLtimerid);if(OLdelayid>0)clearTimeout(OLdelayid);
OLtimerid=0;OLdelayid=0;self.status="";o3_label=ol_label;
if(o3_frame!=self)o=OLgetRefById();
if(o){if(o.onmouseover)o.onmouseover=null;
if(OLscrollPI&&o==over)OLclearScroll();
if(OLdraggablePI)OLclearDrag();
if(OLfilterPI)OLcleanupFilter(o);if(OLshadowPI)OLhideShadow();
var os=(OLns4)?o:o.style;os.visibility="hidden";
if(OLhidePI&&o==over)OLhideUtil(0,0,1);if(OLiframePI)OLhideIfs(o);}
}

// Moves layer
function OLrepositionTo(o,xL,yL){
o=(OLns4)?o:o.style;
o.left=(OLns4?xL:xL+'px');
o.top=(OLns4?yL:yL+'px');
}

// Handle NOCLOSE-MOUSEOFF
function OLoptMOUSEOFF(c){
if(!c)o3_close="";
over.onmouseover=function(){OLhover=1;if(OLtimerid>0){clearTimeout(OLtimerid);OLtimerid=0;}}
}
function OLcursorOff(){
if(OLovertwoPI&&over==over2)return false;
var o=(OLns4?over:over.style),pHt=OLns4?over.clip.height:over.offsetHeight;
var left=parseInt(o.left),top=parseInt(o.top);
var right=left+o3_width,bottom=top+((OLbubblePI&&o3_bubble)?OLbubbleHt:pHt);
if(OLx<left||OLx>right||OLy<top||OLy>bottom)return true;
return false;
}

/*
 REGISTRATION
*/
var OLcmdLine=null,OLrunTime=null;
function OLsetRunTimeVar(){
if(OLrunTime&&OLrunTime.length)for(var k=0;k<OLrunTime.length;k++)OLrunTime[k]();
}
function OLparseCmdLine(pf,i,ar){
if(OLcmdLine&&OLcmdLine.length){for(var k=0;k<OLcmdLine.length;k++){
var j=OLcmdLine[k](pf,i,ar);if(j>-1){i=j;break;}}}
return i;
}
function OLisFunc(f){
var r=1;
if(typeof f=='object'){for(var i=0;i<f.length;i++){
if(typeof f[i]=='function')continue;r=0;break;}
}else if(typeof f!='function')r=0;
return r;
}
function OLregCmds(c){
if(typeof c!='string')return;
var pM=c.split(',');pMtr=pMtr.concat(pM);
for(var i=0;i<pM.length;i++)eval(pM[i].toUpperCase()+'='+pmCnt++);
}
function OLregRunTimeFunc(f){
if(OLisFunc(f)){
if(!OLrunTime)OLrunTime=new Array();
if(typeof f=='object')OLrunTime=OLrunTime.concat(f);
else OLrunTime[OLrunTime.length++]=f;}
}
function OLregCmdLineFunc(f){
if(OLisFunc(f)){
if(!OLcmdLine)OLcmdLine=new Array();
if(typeof f=='object')OLcmdLine=OLcmdLine.concat(f);
else OLcmdLine[OLcmdLine.length++]=f;}
}

OLloaded=1;

/** File: ./popup.js */

function getPageSize() {
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	}
	else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	}
	else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}

	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	}
	else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}

	// for small pages with total height less then height of the viewport
	if (yScroll < windowHeight)
		pageHeight = windowHeight;
	else
		pageHeight = yScroll;

	// for small pages with total width less then width of the viewport
	if (xScroll < windowWidth)
		pageWidth = windowWidth;
	else
		pageWidth = xScroll;

	arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight)
	return arrayPageSize;
};

function getYScroll() {
	var yScroll;

	if (self.pageYOffset)
		yScroll = self.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)	// Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	else if (document.body)	// all other Explorers
		yScroll = document.body.scrollTop;

	return yScroll;
};

function createLoader(elmid) {
	if (elmid == "content")
		var element = document.getElementsByTagName('body')[0];
	else
		var element	= document.getElementById(elmid);

	var fields	= element.getElementsByTagName('select');
	for (i = 0; i < fields.length; i++) {
		fields[i].style.visibility = "hidden";
	}

	var loader	= document.createElement("div");
	loader.setAttribute("id", "loader");
	element.appendChild(loader);
	return loader
};

function hideLoader() {
	var loader	= document.getElementById('loader');
	var element	= loader.parentNode;
	if (loader && element)
		element.removeChild(loader);

	var fields	= element.getElementsByTagName('select');
	for (i = 0; i < fields.length; i++) {
		fields[i].style.visibility = "visible";
	}
};

var activePopup = false;

function Popup(adres) {
	popup(adres, 470, 550);
};

function popup(mypage, w, h) {
	if (activePopup) return false;

	var objBody = document.getElementsByTagName("body").item(0);
	window.onresize	= function() { sizePopup(overlay, popup, w, h) };

	 // Selectielijsten onzichtbaar maken
	var fields	= document.getElementsByTagName('select');
	for (i = 0; i < fields.length; i++) {
		fields[i].style.visibility = "hidden";
	}

	if (!document.getElementById('overlay')) {
		var overlay	= document.createElement("div");
		overlay.setAttribute("id", "overlay");
		objBody.appendChild(overlay);

		var popup	= document.createElement("div");
		popup.setAttribute("id", "popup");
		objBody.appendChild(popup);

		var close	= document.createElement("div");
		close.setAttribute("id", "closebtn");
		popup.appendChild(close);

		var link		= document.createElement("div");
		link.onclick	= function() { closePopup() };
		link.setAttribute("id", "closelink");
		close.appendChild(link);

		var loader		= createLoader('popup');

		httpreq	= new requestObject();
	}
	else {
		var overlay	= document.getElementById('overlay');
		var popup	= document.getElementById('popup');
		var loader	= createLoader('popup');
	}

	activePopup	= true;
	sizePopup(overlay, popup, w, h);

	new jsEffect.Opacity(overlay, 50).custom(0,60,300).setElm(popup).show(300).execute(function() {
		var urlparts	= mypage.split('?');
		httpreq.onError = function(response) {
			alert("De gegevens konden niet worden opgehaald, probeer het nogmaals.");
			closePopup();
		}
		httpreq.onData 	= function(response) {
			var temp	= document.createElement('div');
			popup.appendChild(temp);
			temp.innerHTML	= response.responseText;
			parseScript(response.responseText);
			hideLoader();
		}
		httpreq.requestData(urlparts[0], 'GET', urlparts[1]);
	});
};

function sizePopup(overlay, popup, w, h) {
	h += 18;
	var yscroll	= getYScroll();
	popup.style.height		= h+"px";
	popup.style.width		= w+"px";

	var sizeAr	= getPageSize();
	var top = (sizeAr[3]/2)+yscroll-(h/2);
	if (top < 0) top = 0;
	popup.style.top			= top+"px";
	popup.style.marginLeft	= -(w/2)+"px";

	overlay.style.height	= sizeAr[1]+"px";
	overlay.style.width		= "100%";
}

function closePopup() {
	if (document.getElementById('overlay')) {
		var popup	= document.getElementById('popup');
		try { if (popup.lastChild) popup.removeChild(popup.childNodes[popup.childNodes.length-1]); } catch (ex) {}

		new jsEffect.Opacity(popup, 50).hide(300).setElm('overlay').custom(60,0,300).execute(function() {
			activePopup	= false;

			// Selectielijsten weer zichtbaar maken
			var fields	= document.getElementsByTagName('select');
			for (i = 0; i < fields.length; i++) {
				fields[i].style.visibility = "visible";
			}
		});
	}
};

/** File: ./script.js */

function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) {
	if ((!highlightStartTag) || (!highlightEndTag)) {
		highlightStartTag = "<span id='highlight'>";
		highlightEndTag = "</span>";
	}

	var newText = "";
	var i = -1;
	var lcSearchTerm = searchTerm.toLowerCase();
	var lcBodyText = bodyText.toLowerCase();

	while (bodyText.length > 0) {
		i = lcBodyText.indexOf(lcSearchTerm, i+1);
		if (i < 0) {
			newText += bodyText;
			bodyText = "";
		}
		else {
			if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
				if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
					newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;
					bodyText = bodyText.substr(i + searchTerm.length);
					lcBodyText = bodyText.toLowerCase();
					i = -1;
				}
			}
		}
	}
	return newText;
}

function highlight(htxt) {
	var divContent = document.getElementById("content");

	if (!divContent || typeof(divContent) == "undefined") {
		window.alert("Er is geen contentblok aangegeven in de template.\nGeef deze fout door aan een ontwikkelaar als U de kans heeft.");
	}
	else {
		var searchArray = htxt.split(" ");
		var bodyText = divContent.innerHTML;
		for (var i = 0; i < searchArray.length; i++) {
			bodyText = doHighlight(bodyText, searchArray[i], "", "");
		}
		divContent.innerHTML = bodyText;
	}
}

function trim(str, chars) {
	return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

function addslashes(str) {
	str=str.replace(/\\/g,'\\\\');
	str=str.replace(/\'/g,'\\\'');
	str=str.replace(/\"/g,'\\"');
	str=str.replace(/\0/g,'\\0');
	return str;
}
function stripslashes(str) {
	str=str.replace(/\\\\/g,'\\');
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	return str;
}

function selectRadio(rbutton) {
	document.getElementById(rbutton).checked = "checked";
}

function disableFields(field) {
	if (field == null) return false;

	var value = field.options[field.selectedIndex].value;
	if (trim(value) == "" || value == "integer" || value == "real") {
		document.getElementById('minlen').disabled = false;
		document.getElementById('maxlen').disabled = false;
	}
	else {
		document.getElementById('minlen').disabled = true;
		document.getElementById('maxlen').disabled = true;
	}
}

function toggleDisplay(elm) {
	if (document.getElementById(elm).style.display != 'none')
		document.getElementById(elm).style.display	= 'none';
	else
		document.getElementById(elm).style.display	= '';
}

function confirmForm() {
	return confirm('Weet u het zeker?');
}

function confirmGoto(url) {
	if (url != "" && url != "none") {
		if (confirm("Weet je zeker dat je door wilt gaan?")) {
			window.location.href = url;
			return true;
		}
	}
	return false;
}


var editorBM = null;

function defaultPopup(poptype, page, id, tab) {
	editorBM	= tinyMCE.activeEditor.selection.getBookmark();

	switch (poptype) {
		case 'intern':	var height	= 280; break;
		case 'extern':	var height	= 230; break;
	}

	popup('index.php?page=' + page + '&tab=' + tab + '&mode=' + poptype + '&ajaxreq=true', 440, height);
}

function insertLink(url, name, title, target) {
	if (editorBM)
		tinyMCE.activeEditor.selection.moveToBookmark(editorBM);

	var txt	= tinyMCE.activeEditor.selection.getContent();
	if (trim(txt) == "") txt = name;
	if (!target) target = "";

	tinyMCE.execCommand('mceInsertRawHTML', false, '<a href="'+url+'" title="'+title+'" target="'+target+'">'+txt+'</a>');
	editorBM	= null;
}

function defaultInsert(type) {
	switch (type) {
		case 'print':
			insertLink("javascript:window.print();", "Pagina afdrukken", "Pagina afdrukken");
			break;

		case 'back':
			insertLink("javascript:history.back(-1);", "Vorige pagina", "Vorige pagina");
			break;
	}
}

function openReply(page, id, fotoid) {
	window.open('index.php?id=' + id + '&page=' + page + '&fid=' + fotoid + '&mode=reply','replyform','height=500,width=300,scrollbars=yes');
}
function openMail(page, id, fotoid) {
	window.open('index.php?id=' + id + '&page=' + page + '&fid=' + fotoid + '&mode=mail','replyform','height=500,width=400,scrollbars=yes');
}

function setTeam() {
	var lijst	= document.standenmotorform.afdeling;
	var index	= lijst.selectedIndex;
	var value	= lijst.options[index].text;

	document.standenmotorform.team.value	= value;
}

// Following 2 functions have been added by Bjorn Smit
function resizeIFrame(elem)
{
	var frameWidth, frameHeight;

	if (parent.document.innerWidth)
	{
		frameWidth = parent.document.innerWidth;
		frameHeight = parent.document.innerHeight;
	}
	else if (parent.document.documentElement && parent.document.documentElement.clientWidth)
	{
		frameWidth = parent.document.documentElement.clientWidth;
		frameHeight = parent.document.documentElement.clientHeight;
	}
	else if (parent.document.body)
	{
		frameWidth = parent.document.body.clientWidth;
		frameHeight = parent.document.body.clientHeight;
	}

	eval('document.getElementById(\'' + elem + '\').style.height = (frameHeight - 150);\n');
}

function decodehtml(string) {
	string = string.replace(/&lt;/g, '<');
	string = string.replace(/&gt;/g, '>');
	string = string.replace(/&quot;/g, '"');
	string = string.replace(/&#0?39;/g, '\'');
	string = string.replace(/&amp;/g, '&');

	return string;
}
/** File: ./validator.js */

// Title: Tigra Form Validator
// URL: http://www.softcomplex.com/products/tigra_form_validator/
// Version: 1.3
// Date: 25-08-2005 (dd-mm-yyyy)
// Notes: This script is free. Visit official site for further details.

// regular expressions or function to validate the format
var re_dt		= /^(\d{1,2})\-(\d{1,2})\-(\d{4})$/,
	re_tm		= /^(\d{1,2})\:(\d{1,2})(\:(\d{1,2}))?$/,

	date_check	= function(s_date) {
		// check format
		if (!re_dt.test(s_date))
			return false;
		// check allowed ranges
		if (RegExp.$1 > 31 || RegExp.$2 > 12)
			return false;
		// check number of day in month
		var dt_test = new Date(RegExp.$3, Number(RegExp.$2-1), RegExp.$1);
		if (dt_test.getMonth() != Number(RegExp.$2-1))
			return false;
		return true;
	},

	time_check = function(s_time) {
		// check format
		if (!re_tm.test(s_time))
			return false;
		// check allowed ranges
		if (RegExp.$1 > 23 || RegExp.$2 > 59 || RegExp.$1.toString().length < 2 || RegExp.$2.toString().length < 2)
			return false;
		if (RegExp.$3 && (RegExp.$4 > 59 || RegExp.$3.toString().length < 2))
			return false;
		return true;
	},

	a_formats	= {
		'alpha'		: /^[a-zA-Z\.\-]*$/,
		'alphanum'	: /^\w+$/,
		'unsigned'	: /^\d+$/,
		'integer'	: /^[\+\-]?\d*$/,
		'real'		: /^[\+\-]?\d*\.?\d*$/,
		'email'		: /^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/,
		'phone'		: /^[\d\.\s\-\+]+$/,
		'postcode'	: /^[1-9][0-9]{3} ?[a-zA-Z]{2}$/,
		'uri'		: /^(http(s?):\/\/)?(www\.)?([a-z0-9_-]+\.([a-z0-9_-]+)+)/,
		'date'		: date_check,
		'cm_date'	: date_check,
		'time'		: time_check,
		'cm_time'	: time_check
	},

	a_messages	= [
		'No form name passed to validator construction routine',
		'No array of "%form%" form fields passed to validator construction routine',
		'Form "%form%" can not be found in this document',
		'Incomplete "%n%" form field descriptor entry. "l" attribute is missing',
		'Can not find form field "%n%" in the form "%form%"',
		'Can not find label tag (id="%t%")',
		'Can not verify match. Field "%m%" was not found',
		'"%l%" is een verplicht veld.',
		'"%l%" moet minstens %mn% karakters lang zijn.',
		'"%l%" mag maximaal %mx% karakters lang zijn.',
		'"%v%" is geen geldige invoer voor "%l%".',
		'"%l%" moet overeenkomen met "%ml%".'
	];

// validator counstruction routine
function validator(s_form, a_fields, o_cfg) {
	this.f_error = validator_error;
	this.f_alert = o_cfg && o_cfg.alert
		? function(s_msg) { alert(s_msg); return false }
		: function() { return false };

	// check required parameters
	if (!s_form)
		return this.f_alert(this.f_error(0));
	this.s_form = s_form;

	if (!a_fields || typeof(a_fields) != 'object')
		return this.f_alert(this.f_error(1));
	this.a_fields = a_fields;

	this.a_2disable = o_cfg && o_cfg['to_disable'] && typeof(o_cfg['to_disable']) == 'object'
		? o_cfg['to_disable']
		: [];

	this.exec = validator_exec;
}

// validator execution method
function validator_exec() {
	var o_form = document.forms[this.s_form];
	if (!o_form)
		return this.f_alert(this.f_error(2));

	b_dom = document.body && document.body.innerHTML;

	// check integrity of the form fields description structure
	for (var n_key in this.a_fields) {
		// check input description entry
		this.a_fields[n_key]['n'] = n_key;
		if (!this.a_fields[n_key]['l'])
			return this.f_alert(this.f_error(3, this.a_fields[n_key]));
		o_input = o_form.elements[n_key];
		if (!o_input)
			return this.f_alert(this.f_error(4, this.a_fields[n_key]));
		this.a_fields[n_key].o_input = o_input;
	}

	// reset labels highlight
	if (b_dom)
		for (var n_key in this.a_fields)
			if (this.a_fields[n_key]['t']) {
				var s_labeltag = this.a_fields[n_key]['t'], e_labeltag = get_element(s_labeltag);
				if (!e_labeltag)
					return this.f_alert(this.f_error(5, this.a_fields[n_key]));
				this.a_fields[n_key].o_tag = e_labeltag;

				// normal state parameters assigned here
				e_labeltag.className = 'tfvNormal';
			}

	// collect values depending on the type of the input
	for (var n_key in this.a_fields) {
		var s_value = '';
		o_input = this.a_fields[n_key].o_input;
		if (o_input.type == 'checkbox') // checkbox
			s_value = o_input.checked ? o_input.value : '';
		else if (o_input.value) // text, password, hidden
			s_value = o_input.value;
		else if (o_input.options) // select
			s_value = o_input.selectedIndex > -1
				? o_input.options[o_input.selectedIndex].value
				: null;
		else if (o_input.length > 0) // radiobuton
			for (var n_index = 0; n_index < o_input.length; n_index++)
				if (o_input[n_index].checked) {
					s_value = o_input[n_index].value;
					break;
				}
		this.a_fields[n_key]['v'] = s_value.replace(/(^\s+)|(\s+$)/g, '');
	}

	// check for errors
	var n_errors_count = 0,
		n_another, o_format_check;
	for (var n_key in this.a_fields) {
		o_format_check = this.a_fields[n_key]['f'] && a_formats[this.a_fields[n_key]['f']]
			? a_formats[this.a_fields[n_key]['f']]
			: null;

		// reset previous error if any
		this.a_fields[n_key].n_error = null;

		// check reqired fields
		if (this.a_fields[n_key]['r'] && !this.a_fields[n_key]['v']) {
			this.a_fields[n_key].n_error = 1;
			n_errors_count++;
		}
		// check length
		else if (this.a_fields[n_key]['mn'] && this.a_fields[n_key]['v'] != '' && String(this.a_fields[n_key]['v']).length < this.a_fields[n_key]['mn']) {
			this.a_fields[n_key].n_error = 2;
			n_errors_count++;
		}
		else if (this.a_fields[n_key]['mx'] && String(this.a_fields[n_key]['v']).length > this.a_fields[n_key]['mx']) {
			this.a_fields[n_key].n_error = 3;
			n_errors_count++;
		}
		// check format
		else if (this.a_fields[n_key]['v'] && this.a_fields[n_key]['f'] && (
			(typeof(o_format_check) == 'function'
			&& !o_format_check(this.a_fields[n_key]['v']))
			|| (typeof(o_format_check) != 'function'
			&& !o_format_check.test(this.a_fields[n_key]['v'])))
			) {
			this.a_fields[n_key].n_error = 4;
			n_errors_count++;
		}
		// check match
		else if (this.a_fields[n_key]['m']) {
			for (var n_key2 in this.a_fields)
				if (n_key2 == this.a_fields[n_key]['m']) {
					n_another = n_key2;
					break;
				}
			if (n_another == null)
				return this.f_alert(this.f_error(6, this.a_fields[n_key]));
			if (this.a_fields[n_another]['v'] != this.a_fields[n_key]['v']) {
				this.a_fields[n_key]['ml'] = this.a_fields[n_another]['l'];
				this.a_fields[n_key].n_error = 5;
				n_errors_count++;
			}
		}

	}

	// collect error messages and highlight captions for errorneous fields
	var s_alert_message = '',
		e_first_error;

	if (n_errors_count) {
		for (var n_key in this.a_fields) {
			var n_error_type = this.a_fields[n_key].n_error,
				s_message = '';

			if (n_error_type)
				s_message = this.f_error(n_error_type + 6, this.a_fields[n_key]);

			if (s_message) {
				if (!e_first_error)
					e_first_error = o_form.elements[n_key];
				s_alert_message += s_message + "\n";
				// highlighted state parameters assigned here
				if (b_dom && this.a_fields[n_key].o_tag)
					this.a_fields[n_key].o_tag.className = 'tfvHighlight';
			}
		}
		alert(s_alert_message);
		// set focus to first errorneous field
		if (e_first_error.focus && e_first_error.type != 'hidden'  && !e_first_error.disabled)
			eval("e_first_error.focus()");
		// cancel form submission if errors detected
		return false;
	}

	for (n_key in this.a_2disable)
		if (o_form.elements[this.a_2disable[n_key]])
			o_form.elements[this.a_2disable[n_key]].disabled = true;

	return true;
}

function validator_error(n_index) {
	var s_ = a_messages[n_index], n_i = 1, s_key;
	for (; n_i < arguments.length; n_i ++)
		for (s_key in arguments[n_i])
			s_ = s_.replace('%' + s_key + '%', arguments[n_i][s_key]);
	s_ = s_.replace('%form%', this.s_form);
	return s_
}

function get_element (s_id) {
	return (document.all ? document.all[s_id] : (document.getElementById ? document.getElementById(s_id) : null));
}
