function logout_confirm() {
	var r=confirm("Weet u zeker dat u wilt uitloggen?")
	if (r==true)
	{
		window.location="login.php?act=logout"
	}
}

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 limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}


function checkText(fld, str)
{
	if (fld.value == "") {
		return str;
	}
	else {
		return "";
	}
}

function checkForm(oForm)
{
	var sReport = "";
	sReport += checkText(oForm.email, "Uw email adres\n");
	sReport += checkText(oForm.onderwerp, "Het onderwerp\n");
	sReport += checkText(oForm.bericht, "Het bericht zelf\n");
	if (sReport != "") {
		alert("Graag de volgende velden ook invullen:\n\n" + sReport);
		return false;
	}
	else {
		return true;
	}
}



function InstaSmilie () {
return;
}
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 acti_prompt()
  {
  var name=prompt("Vul je activaticode in alstublieft","")
  if (name!=null && name!="")
    {
	    window.location="register.php?act=activate&get="+ name
    }
  }
  
  
  
function show_hide(name_id, value) 
 { 
    var bloeb1 = document.getElementById(name_id); 

    if (bloeb1.style.display == 'block') 
    { 
       bloeb1.style.display = 'none';
    } 
    else 
    { 
       bloeb1.style.display = 'block'; 
       var new_value = '<br><center><div style="background: #FFFFFF; width: 680px;"><center><br><a href="#" onclick="javascript:show_hide(\'large\');"><img src="' + value + '" alt="' + value + '" border="0" /></a><br><br><a href="#" onclick="javascript:show_hide(\'large\');">Close</a><br><br></center></div></center>';
       document.getElementById(name_id).innerHTML=new_value;
    } 
 } 
 
 function avatar_redir(type) {
	 var accept = confirm('Weet u zeker dat u zeker?');
	 if( accept == true ) {	 
		 window.location='profiel_wijzigen.php?get=avatar&act=' + type;
	 }
 }
