
	// table width fix Netscape 4.x
	function checkResize() {
		if ((window.innerWidth!=iw) || (window.innerHeight!=ih))
			history.go(0);
	}
	if (navigator.userAgent.substr(0,10) == "Mozilla/4.") {
		iw=window.innerWidth;
		ih=window.innerHeight;
		window.onresize = checkResize;
	}

	function popup() {
		return false;
	}

	function enquetepopup() {
		var url="http://enquete.widexs.nl/";
		var target="enquete";
		var options="width=550,height=500,scrollbars=YES";

		handle=window.open(url,target,options);
		// return handle;
	}

	// todo: cookie check
	handle=null;


		// returns anchor name
		function findhash() {
			return document.location.hash.substr(1);
		}
//		window.status=findhash();
var hash=findhash();

		// returns first anchor element in another element (id) DOM & MSIE only
		function findlink(id) {
			var link=null;
			if (document.getElementById) { // jeej DOM supported
				element=document.getElementById(id);
				link=element.getElementsByTagName("A")[0];
			} else if (document.all) {		// old MSIE
				element=document.all[id];
				for (i in document.all[id].children)
					if (document.all[id].children[i].tagName)
						if (document.all[id].children[i].tagName=="A")
							link=document.all[id].children[i];
			}
			return link;
		}

		// changes background-color in element (id) and textcolor of the first anchor element (textcolor) DOM & MSIE only
		function bgcolor(id, bgcolor, textcolor) {
			var element=null;
			if (document.getElementById) { // jeej DOM supported
				element=document.getElementById(id);
			} else if (document.all) {		// old MSIE
				element=document.all[id];
			}
			if ((bgcolor!=null) && (element!=null)) {
				element.style.backgroundColor=bgcolor;
			}
			var link=findlink(id);
			if (link!=null)
				window.status=unescape(link.href);
			// fix: reset status on mouseout
			if (textcolor!=null && link!=null) {
				link.style.color=textcolor;
			}
		}

		// function for opening windows, can be used with TD's (id is NOT the id of the link itself but from a parentelement)
		function windowopen(id) {
			var link=findlink(id);
			if (link!=null) {
				if (!link.target) link.target="_self";
				window.open(link.href, link.target);
				// theory: should only open window if onlick did work ?!
				return true;
			} else return false;
		}

		// function for opening popups
		function popup(id) {
			var link=null;
			if (document.getElementById) { // jeej DOM supported
				link=document.getElementById(id);
			} else if (document.all) {		// old MSIE
				link=document.links[id];
			}
			if (link) {
				if (!link.target) link.target="_self";
				window.open(link.href, link.target, "width=600, height=500, scrollbars=yes, directories=no, location=no, menubar=no, status=yes, toolbar=no, resizable=yes");
				return false;
			}
			return true;
		}

		// v1.0 write content in layer (c) Gerben Versluis
		function settext(id, exporttext) {
			if (document.getElementById)	// DOM1
				document.getElementById(id).innerHTML=exporttext
			else if (document.all)		// ie
				document.all[id].innerHTML=exporttext
			else if (document.layers) {	// ns
				with(document.layers[id].document) {
					open();
					write(exporttext);
					close();
				}
			}
		}

		function getimgMSIE(checkdoc, name) {
			for (i in checkdoc) {
				if (checkdoc[i].tagName=="IMG") {
					if (checkdoc[i].id==name) return checkdoc[i];
				} else if (checkdoc[i].children) {
					link=getimgMSIE(checkdoc[i].children);
					if (link) return link;
				}
			} return false;
		}

		// returns first anchor element in another element (id) DOM & MSIE only
		function findimg(id, name) {
			if (document.getElementById) { // jeej DOM supported
				element=document.getElementById(id);
				for (i=0; i<element.getElementsByTagName("IMG").length; i++) {
					link=element.getElementsByTagName("IMG")[i];
					if (link.id==name) break;
				}
			} else if (document.all) {		// old MSIE
				link=getimgMSIE(document.all[id].children,name);
			}
			return link;
		}


		function ceinit(id) {
			if (document.getElementById) {	// DOM1
				document.getElementById(id).style.heightoriginal=document.getElementById(id).style.height;
			} else if (document.all) {		// ie
				if (document.all[id].style)
					document.all[id].style.heightoriginal=document.all[id].style.height;
			}
		}

		function ceinverse(id) {
			if (document.getElementById || document.all) {
				var img=findimg(id, "arrowdown");
				if (img) {	// not false or null
//					alert(img.style.visibility);
					if (img.style.visibility!="hidden") {
						cedown(id);
					} else {
						ceup(id);
					}
				}
			}
		}

		function cedown(id) {
			if (document.getElementById) {	// DOM1
				document.getElementById(id).style.height="";
//				alert(""+document.getElementById(id).style.height+" : "+document.getElementById(id).style.heightoriginal);
				findimg(id, "arrowdown").style.visibility="hidden";
			} else if (document.all) {		// ie
				if (document.all[id].style) {
					document.all[id].style.height=document.all[id].style.scrollHeight;
					var img=findimg(id, "arrowdown");
					if (img) img.style.visibility="hidden";
				}
			}
		}

		function ceup(id) {
			if (document.getElementById) {
				document.getElementById(id).style.height="34px";
				findimg(id, "arrowdown").style.visibility="visible";
			} else if (document.all) {		// ie
				if (document.all[id].style) {
					document.all[id].style.height="34px";
					var img=findimg(id, "arrowdown");
					if (img) img.style.visibility="visible";
				}
			}
		}

        // (c) Gerben Versluis / WideXS, 2003-2004


function getHandle(name) {
	if (document.getElementById) return document.getElementById(name);
	else if (document.layers) return document.layers[name];
	else if (document.all) return document.all[name];
}


function layersetvisibility (handle, show) { // show = visible || hidden
	if (document.getElementById)	// DOM1
		handle.style.visibility=show
	else if (document.all)		// ie
		handle.style.visibility=show
	else if (document.layers)	// ns
		handle.visibility=show;
}

function layersettop (idname, toppx) {
	if (document.getElementById)	// DOM1
		handle.style.top=toppx
	else if (document.all)		// ie
		handle.style.top=toppx
	else if (document.layers)	// ns
		handle.top=toppx;
}

function writeballoon(handle, text) {
	text='\
			<table width="260" height="60" cellpadding="0" cellspacing="0" border="0">     \
				<tr>                                                                        \
					<td align="center" valign="middle" bgcolor="#000000">                   \
			<table width="258" height="58" cellpadding="5" cellspacing="0" border="0">      \
				<tr>                                                                        \
					<td align="left" valign="middle" bgcolor="#FFFFFF">						\
						'+text+'															\
					</td>                                                                   \
				</tr>                                                                       \
			</table>                                                                        \
					</td>                                                                   \
				</tr>                                                                       \
			</table>';

	if (document.getElementById)
		handle.innerHTML=text;
	else if (document.all)
		handle.innerHTML=text;
	else if (document.layers) {
		handle.document.open();
		handle.document.write(text);
		handle.document.close();
	}
	else return false;
	return true;
}

function mw(tg,opt){return window.open('',tg,opt);}
function wwc(wh,et){with(wh.document){open();write(et);close();}}
function op(strMO){mO=eval(strMO);if(!mO){alert(strMO+" = "+mO);return 1}awt=new String();wt=strMO+"<br />\n";for(var i in mO){wt=(wt+"<br />"+i+" = "+mO[i]+"\n");}return wt;}

function setstatuscoords(e) {
	window.status="coord: "+(e.clientX+document.body.scrollLeft)+" "+(e.clientY+document.body.scrollTop);
}

function moveLayerToLink(handle, link, e) {
	if (document.getElementById) {
//		if (document.all) wwc(window.open('','test',''),op(e));
		handle.style.left=(e.clientX+document.body.scrollLeft)+10;	// (parseInt(link.offsetLeft)+10)+"px";
		handle.style.top=(e.clientY+document.body.scrollTop)-60;		// (parseInt(link.offsetTop)-55)+"px";
	} else if (document.all) {
		handle.style.left=(e.clientX+document.body.scrollLeft-e.offsetX)+10;	// (parseInt(link.offsetLeft)+10)+"px";
		handle.style.top=(e.clientY+document.body.scrollTop-e.offsetY)-60;		// (parseInt(link.offsetTop)-55)+"px";
/*
		handle.style.left=(link.offsetLeft+10);
		handle.style.top=(link.offsetTop-45);
*/
	} else if (document.layers)
		handle.moveTo(link.x+10,link.y-60);
}

// (c) Gerben / raw.scene.org, 2002

