	// @TODO: these scripts may eventually be included in a separate js file..

	/*
	helper cookie functions
	*/
	function getCookie(c_name) {
		if (document.cookie.length>0) {
			c_start=document.cookie.indexOf(c_name + "=")
			if (c_start!=-1) {
				c_start=c_start + c_name.length+1
				c_end=document.cookie.indexOf(";",c_start)
				if (c_end==-1) c_end=document.cookie.length
				return unescape(document.cookie.substring(c_start,c_end))
			}
		}
		return null
	}

	function setCookie(c_name,value,expiredays) {
		var exdate=new Date()
		exdate.setDate(exdate.getDate()+expiredays)
		document.cookie=c_name+ "=" +escape(value)
	}

	/*
	A font size is remembered in a cookie. Determine the font size here and load the appropriate stylesheet;
	a function is provided to switch and automatically store/remember a new size.
	*/

	var currentSize = 2;
	// 1st, see if the cookie holds a previously selected size..
	var cookieFontSize = getCookie("fontsize");
	if ((cookieFontSize >= 1) && (cookieFontSize <= 3)) {
		currentSize = cookieFontSize;
	}

	switch (currentSize) {
		case "1":
			tag = '<link id="sizesheet" href="/static/project/css/small.css" rel="stylesheet" type="text/css" />';
			break;
		case "3":
			tag = '<link id="sizesheet" href="/static/project/css/large.css" rel="stylesheet" type="text/css" />';
			break;
		case "2":
		default:
			tag = '<link id="sizesheet" href="/static/project/css/normal.css" rel="stylesheet" type="text/css" />';
		break;
	}
	document.write(tag);

	function switchFontSize(size) {
		var cssFile = "normal.css";
		switch (size) {
			case 1:
				cssFile = "/static/project/css/small.css";
			break;
			case 2:
				cssFile = "/static/project/css/normal.css";
			break;
			case 3:
				cssFile = "/static/project/css/large.css";
			break;
		}
		if (!document.styleSheets) {
			window.alert("Uw browser ondersteunt het veranderen van de paginagrootte helaas niet.");
			return;
		}
		currentSize = size;
		if (document.getElementById){
			var oStyleSheet = document.getElementById('sizesheet');
			if (oStyleSheet) {
				oStyleSheet.setAttribute("href", cssFile);
				setCookie("fontsize", size, 999);
			} else {
				// error.
			}
		}
	}

	function toggleFontSize() {
		var size = parseInt(currentSize) + 1;
		if (size > 3) {
			size = 1;
		}
		switchFontSize(size);
	}

	/*
	print functionality. This may be linked with a specific stylesheet for media=print if desired.
	*/
	function printPage() {
		if (window.print) {
			window.print();
		} else {
			window.alert("Uw browser ondersteunt de print functionaliteit helaas niet.");
		}
	}

	/**
	 * mail a friend popup..
	 */
	function openPopUp(url) {
		var w = window.open(url, "servex_popup", "width=400, height=350, scrollbars=auto, status=yes");
		if (w) {
			w.focus();
		}
	}