function AddSmile(SmileCode) {
	var SmileCode;
	var newMessage;
	var oldMessage = document.reaction.bericht.value;
	
	newMessage = oldMessage+SmileCode;
	document.reaction.bericht.value=newMessage;
	document.reaction.bericht.focus();
	
	return;
}



b_help = "Vette tekst: [b]text[/b]";
i_help = "Schuine tekst: [i]text[/i]";
u_help = "Onderstreepte tekst: [u]text[/u]";
a_help = "Hyperlink: [url]http://www.url.nl[/url] of [url=http://www.url.nl]URL tekst[/url]";
p_help = "Invoegen image: [img]http://image_url[/img]";
o_help = "Off Topic: [ot]offtopic[/ot]";
q_help = "Quote text: [quote]text[/quote]";
c_help = "Codehighlight: [code]text[/code] (Vak met regelnummers en colorcoding)";

bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[url]','[/url]','[img]','[/img]','[ot]','[/ot]','[quote]','[/quote]');
imageTag = false;

function helpline(help)	{
document.reaction.helpbox.value = eval(help + "_help");
}

function jump(s, location)	
{
parent.window.location=""+s+""+location+"";
}

function banip(ip, user, naam, url)	{
	
	if(confirm("Wil je "+naam+" met ip "+ip+" een ban geven?"))	{
		parent.window.location = url;
	}
}

function confirm_inbox_delete(){
	
	if( confirm('Weet je zeker dat je de door jou geselecteerde priveberichten wilt verwijderen?') ){
		document.delete_form.submit();
		
	}
	
}

function confirm_favo_delete(){
	
	if( confirm('Weet je zeker dat je de door jou geselecteerde topics uit je favorieten wilt verwijderen?') ){
		document.delete_form.submit();
	}
	
}

function confirm_pm_delete(start_url){
	
	if( confirm('Weet je zeker dat je dit privebericht wilt verwijderen?') ){
		parent.window.location = start_url;
	}
	
}

function confirm_report_delete(start_url){
	
	if( confirm('Weet je zeker dat je het topicreport wilt verwijderen?') ){
		parent.window.location = start_url;
		
	}
	
}

function confirm_report_topic_delete(start_url){
	
	if( confirm('Weet je zeker dat je alle topicreports uit dit topic wilt verwijderen?') ){
		parent.window.location = start_url;
	}
	
}

function resize_image(image_naam){
	
	var image = document.getElementById(image_naam).width;
	if( image > 640 ){
		image = 640;
	}
	
}

/* Thnx to Civil :) */
function inbox_select_all(checkbox){
	var el = checkbox.form.elements, i = el.length;
	while (i--){
		if (el[i].type == 'checkbox')
			el[i].checked = checkbox.checked;
	}
}

function toon_cat(cat_id){
	
	if( document.getElementByName(cat_id).style.display == '' ){
		document.getElementByName(cat_id).style.display = 'none';
	} else {
		document.getElementByName(cat_id).style.display = '';
	}
	
}

function sort_up(input_id){
	var oude_waarde = document.getElementById(input_id).value;
	document.getElementById(input_id).value++;
}

function sort_down(input_id){
	var oude_waarde = document.getElementById(input_id).value;
	document.getElementById(input_id).value--;
}

/* EXTRA INFO */

function toon_table(table_id){

	if(document.getElementById(table_id).style.display == 'none'){
		document.getElementById(table_id).style.display='block'
	} else {
		document.getElementById(table_id).style.display='none'
	}
}

/* DROPDOWN */

startList = function()
		{
			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", "");
						}
					}
				}
			}
		}
window.onload=startList;

function toon_field(div_id1,div_id2){
	
	if(document.getElementById(div_id1).style.display == 'none'){
		document.getElementById(div_id1).style.display='block';
		document.getElementById(div_id2).style.display='block';
	} else {
		document.getElementById(div_id1).style.display='none';
		document.getElementById(div_id2).style.display='none';
	}
	
}
