function addSmiley(smileycode) {
	var bericht = document.getElementById("bericht");
	bericht.focus();
	bericht.value += " " + smileycode + " ";
	//bericht.selectionStart = bericht.text.length;	
}
function addBB(BB1, BB2, BB3) {
	var bericht = document.getElementById("bericht");
	var link = "";
	bericht.focus();
	if (BB1.match("img")) {
		link = prompt("Please, specify the url of the image...", "http://");
		bericht.value += " " + BB1 + link + BB2 + " ";
	} else if (BB1.match("url")) {
		link = prompt("Please, specify the url...", "http://");
		tekst = prompt("Please, specify the text to display for the link...", "");
		bericht.value += " " + BB1 + link + BB2 + tekst + BB3 + " ";
	} else {
			bericht.value += " " + BB1 + BB2 + " ";
	}
	bericht.value.substr(bericht.value.length - 7, 1);
}