	//<![CDATA[

	/**
	* @version $Id: include.js 12 2005-10-28 9:31:02Z  $
	* @package Sonneveld
	* @copyright (C) 2005 Arco Iris
	* @creator Christian Boer
	*/

	function on_resize()
	{
		var windowWidth = (window.innerWidth ? window.innerWidth : document.body.clientWidth);
		var windowWidth = (window.innerWidth ? window.innerWidth : document.body.clientWidth);
		var windowHeight = (window.innerHeight ? window.innerHeight : document.body.clientHeight);
	}

	function popUpFullscreen(page)
	{
		var wind = window.open (page,'popup','fullscreen=yes, channelmode=no, titlebar=no, status=no, scrollbars=no, directories=no');
	}

	function popUp(page)
	{
		width = screen.width - 10;
		height = screen.height - 55;
		window.open (""+page+"","","location=0,status=0,statusbar=0,scrollbars=0,resizable=0,width="+width+",height="+height+"");
	}

	function change_lang(obj) {
		lang = obj.options[obj.selectedIndex].value;
		switch (lang) {
			case '' :
				break;
			case 'hu_hu' :
				window.open('http://www.sonneveld.hu/');
				break;
			case 'en_global' :
				winPopLang('uk');
				break;
			case 'en_gl' :
				winPopLang('uk');
				break;
			case 'pl_pl' :
				document.location='../site/index.php?lang=en_global';
				//winPopLang('uk');
				break;
			case 'en_sc' :
				winPopLang('uk');
				break;
			case 'fr_be' :
				winPopLang('fr');
				break;
			case 'fr_fr' :
				winPopLang('fr');
				break;
			case 'de_de' :
				winPopLang('de');
				break;
			default :
				document.location = lang;
				break;
		}
	}

	function winPopLang(lang)
	{
		var winWidth = 800;
		var winHeight = 552;
		var scrWidth = screen.availWidth;
		var scrHeight = screen.availHeight;

		if (scrWidth <= 800 || scrHeight <= 600) {
			var winX = 0;
			var winY = 0;
		}
		else {
			var winX = (scrWidth - winWidth)/2;
			var winY = (scrHeight - winHeight)/2;
		}
		var Sizewindow = "scrollbars=no,screenX="+winX+",left="+winX+",screenY="+winY+",top="+winY+",width="+winWidth+",height="+winHeight;
		var base = 'http://www.sonneveld.com/sonneveld/';
		window.open(base + lang + '/index_frame.htm','Sonneveld',Sizewindow);
	}

	var compensation_frontpage = 0;
	function on_load() {
		try {
			if (typeof iFrameHeight != 'undefined') iFrameHeight();
		}
		catch (er) {}
		//houtje
		try {
			var agt = navigator.userAgent.toLowerCase();
			var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
			var is_ie7 = ((agt.indexOf("msie 7.") != -1) && (agt.indexOf("opera") == -1));

			/* BUG001 : 2005/08/19 : bug gefikst indien menu korter dan content */
			/* BUG002 : 2005/09/09 : hoogte in variable gegooid */
			/* BUG003 : 2005/09/12 : IE only bug */
			/* BUG004 : 2005/09/14 : update op BUG003: ook voor andere browsers dus... */
			/* BUG005 : 2005/09/14 : mogelijk verhoogde navigatiebalk vergeten */

			var heightright = 292 + compensation_frontpage; /* BUG002 */
			var heightleft = 330; /* BUG002 */
			var debug = false;
			
			if (debug) alert(agt);

			/*if (is_ie7) {
				if (debug) alert('intern explorer 7');
				if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudLinks').scrollHeight <= document.getElementById('boxInhoudRechts').scrollHeight + (heightleft-heightright)) {
					if (compensation_frontpage > 0) compensation_frontpage = compensation_frontpage - 1;
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight + 32 - compensation_frontpage + "px";
					if (debug) alert('ie_1');
				}
				else if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudRechts').scrollHeight > document.getElementById('boxInhoudLinks').scrollHeight) {
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight + (heightleft-heightright) - 6 + "px";
					if (debug) alert('ie_2');
				}
				else if (document.getElementById('boxInhoudLinks').scrollHeight > heightleft) {
					document.getElementById('boxInhoudRechts').style.height = document.getElementById('boxInhoudLinks').scrollHeight - (heightleft-heightright) + 6 + "px";
					if (debug) alert('ie_3');
				}

				if (document.getElementById('navigatiebalk') != null) {
					var compensate_navigatiebalk = document.getElementById('navigatiebalk').scrollHeight - 26;
					if (compensate_navigatiebalk > 0) {
						document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudLinks').offsetHeight - 4 + compensate_navigatiebalk + "px";
						if (debug) alert('ie_compensate');
					}
				}
			}
			else */if (is_ie) {
				if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudLinks').scrollHeight <= document.getElementById('boxInhoudRechts').scrollHeight + (heightleft-heightright)) {
					if (compensation_frontpage > 0) compensation_frontpage = compensation_frontpage - 1;
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight + 32 - compensation_frontpage + "px";
					if (debug) alert('ie_1');
				}
				/* -> BUG001 */
				else if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudRechts').scrollHeight > document.getElementById('boxInhoudLinks').scrollHeight) {
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight + (heightleft-heightright) - 6 + "px";
					if (debug) alert('ie_2');
				}
				/* <- BUG001 */
				else if (document.getElementById('boxInhoudLinks').scrollHeight > heightleft) {
					document.getElementById('boxInhoudRechts').style.height = document.getElementById('boxInhoudLinks').scrollHeight - (heightleft-heightright) + 6 + "px";
					if (debug) alert('ie_3');
				}

				/* -> BUG005 */
				if (document.getElementById('navigatiebalk') != null) {
					var compensate_navigatiebalk = document.getElementById('navigatiebalk').scrollHeight - 26;
					if (compensate_navigatiebalk > 0) {
						document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudLinks').offsetHeight - 4 + compensate_navigatiebalk + "px";
						if (debug) alert('ie_compensate');
					}
				}
				/* <- BUG005 */
			}
			else if (!is_ie) {
				if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudLinks').scrollHeight <= document.getElementById('boxInhoudRechts').scrollHeight + (heightleft-heightright)) {
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight + 27 - compensation_frontpage + "px";
				}
				/* -> BUG001 */
				else if (document.getElementById('boxInhoudRechts').scrollHeight > heightright && document.getElementById('boxInhoudRechts').scrollHeight > document.getElementById('boxInhoudLinks').scrollHeight) {
					document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudRechts').scrollHeight - 11 + (heightleft-heightright) + "px";
				}
				/* <- BUG001 */
				else if (document.getElementById('boxInhoudLinks').scrollHeight > heightleft) {
					document.getElementById('boxInhoudRechts').style.height = document.getElementById('boxInhoudLinks').scrollHeight - (heightleft-heightright) + "px";
				}

				if (document.getElementById('navigatiebalk') != null) {
					var compensate_navigatiebalk = document.getElementById('navigatiebalk').scrollHeight - 26;
					if (compensate_navigatiebalk > 0) {
						document.getElementById('boxInhoudLinks').style.height = document.getElementById('boxInhoudLinks').offsetHeight - 6 + compensate_navigatiebalk + "px";
					}
				}
			}
		}
		catch (er) {}
		//touwtje
	}

	function history_back() {
		try {
			if (document.getElementById('blockrandom') != null) {
				frames['blockrandom'].history.back();
			}
			else {
				history.back();
			}
		}
		catch (er) {}
		return false;
	}

	function setcookie(doc, cookieName, cookieValue, nDays) {
		var today = new Date();
		var expire = new Date();
		if (nDays == null || nDays == 0) nDays = 1;
		expire.setTime(today.getTime() + 3600000*24*nDays);
		doc.cookie = cookieName + "=" + escape(cookieValue) + ";expires=" + expire.toGMTString();
	}

	function zoek(to, val) {
		try {
			if (!e) var e = window.event;
			var code = e.keyCode ? e.keyCode:e.which;
			if (code==13) {
				document.location = to + val;
			}
		}
		catch (er) {}
	}
	//]]>
