function doorsturen(url, tijd)
{
	setTimeout('doorsturenUrl("'+url+'")', tijd);
	
}

function doorsturenUrl(url2)
{
	window.location = url2;
}

function bevestigen(msg)
{
	if (!confirm(msg))
	{
		return false;
	}
	return true;
}

function bevestigenForm (msg)
{
	if (document.forms['bewerken'].elements['verwijderen'].checked && !confirm(msg))
	{
		return false;
	}
	return true;
}

function toon_smilies ( form, el, url )
{
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/biggrin.gif\" onclick=\"putStr(' :D ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/clown.gif\" onclick=\"putStr(' :+ ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/cry.gif\" onclick=\"putStr(' :`( ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/devil.gif\" onclick=\"putStr(' (6) ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/frown.gif\" onclick=\"putStr(' :@ ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/frusty.gif\" onclick=\"putStr(' |:( ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/kwijl.gif\" onclick=\"putStr(' :6~ ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/loveit.gif\" onclick=\"putStr(' :7 ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/puh.gif\" onclick=\"putStr(' (K) ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/puh2.gif\" onclick=\"putStr(' :P ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/pukey.gif\" onclick=\"putStr(' :r ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/redface.gif\" onclick=\"putStr(' :o ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/sadley.gif\" onclick=\"putStr(' ;( ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/smile.gif\" onclick=\"putStr(' :) ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/wink.gif\" onclick=\"putStr(' ;) ', '"+form+"', '"+el+"');\"> ");
	document.write("<img class=\"hand\" src=\""+url+"images/smilies/yummie.gif\" onclick=\"putStr(' :9 ', '"+form+"', '"+el+"');\"><br>");
}

/* De volgende functies komen (deels) van GoT, en zijn eigendom van Crisp en Tweakers.net B.V.
   Deze scripts zijn gebruikt met toestemming van de eigenaar.
   © 2004-2005 crisp
*/

function putStr(text, form, el)
{
	putExt('plain', text, el);
}

var target = null;

function putExt(type, text, el2)
{
	if (target == null)
	{
		target = document.getElementById( el2 );
		if (target != null)
		{
			target.focus();
			storeCursor(target);
		}
	}

	if (target != null)
	{
		if (typeof target.cursorPos != 'undefined')
		{
			var cursorPos = target.cursorPos;
			if (type != 'plain') text = cursorPos.text;
			cursorPos.text = det_replace(type, text);
					}
					else if (typeof target.selectionStart != 'undefined')
					{
			// remember scrollposition
			var scrollTop = target.scrollTop;

			var sStart = target.selectionStart;
			var sEnd = target.selectionEnd;
			if (type != 'plain') text = target.value.substring(sStart, sEnd);
			text = det_replace(type, text);
			target.value = target.value.substr(0, sStart) + text + target.value.substr(sEnd);
			var nStart = sStart == sEnd ? sStart + text.length : sStart;
			var nEnd = sStart + text.length;
			target.setSelectionRange(nStart, nEnd);

			// reset scrollposition
			target.scrollTop = scrollTop;
		}
		else
		{
			if (type != 'plain') text = '';
			target.value += det_replace(type, text);
		}
		target.focus();
		storeCursor(target);
	}
}

function storeCursor(element)
{
	if ( typeof element.createTextRange != 'undefined' )
		element.cursorPos = document.selection.createRange().duplicate();
}

function det_replace(type, text)
{
	var val = '';
	switch (type)
	{
		case 'plain':
break;
	}
	return text;
}

function winopen(url, winname, width, height, extra)
{
	if (!extra) extra = ''; else extra = ',' + extra;
	var popup = window.open(url,winname,'toolbar=no,location=no,menubar=no,width='+width+',height='+height+',resizable=yes,status=no,scrollbars=yes'+extra);
	try { popup.focus(); } catch(e) {}
}
function startlist () {
		if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
		node.onmouseover=function() {
		this.className+=" over";
		  }
		  node.onmouseout=function() {
		  this.className=this.className.replace(" over", "");
		   }
		   }
		  }
		 }
}
function hoogte ()
{
	var userAgent = navigator.userAgent.toLowerCase(); 
	
	/* Gecko (Mozilla en familie) browser? */
	if ( userAgent.indexOf ( 'gecko' ) != -1 )
	{
		hoogte = document.documentElement.scrollHeight;
	}
	else
	{
		hoogte = document.body.scrollHeight;
	}


	document.getElementById('bottom').style.height = hoogte + 'px';
	/*window.alert ( 'document.documentElement.scrollHeight: ' + test + "\n" + 'document.body.scrollHeight: ' + test2 + "\n" + 'Hoogte: ' + blaat  );*/
}
