function geef(doen,lang) {
    var nBericht;
    var oBericht = document.fr.bericht.value;
    
	if (doen == "url") {
		var URL = null;
		var titel = null;
		if (lang == "en") {
			URL = prompt("Please insert the address that you want to add.", "http://");
			if(typeof URL == 'string')
				titel = prompt("Please insert the title of the website.", "Page title");
		} else {
			URL = prompt("Plaats het internet adres dat u wil toevoegen.", "http://");
			if(typeof URL == 'string')
				titel = prompt("Plaats hier de titel van die website", "Pagina titel");
		}	
		if(typeof URL == 'string' && typeof titel == 'string') {
			if(URL.length > 0 && titel.length > 0) {
				var Code = "[url="+URL+"]"+titel+"[/url]";
				nBericht = oBericht + Code;
				document.fr.bericht.value = nBericht;
			}
		}
		document.fr.bericht.focus();
		return;
	}    

    if (doen == "b") {
		var tonen = null;
		if (lang == "en") {
			tonen = prompt("Please insert the text that you want to be bold.", "");
		} else {
			tonen = prompt("Plaats de tekst die u dik gedrukt wil hebben.", "");
		}
		if (typeof tonen == 'string' && tonen.length > 0) {
			var Code = "[b]"+tonen+"[/b]";
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}
		
	if (doen == "i") {
		var tonen = null;
		if (lang == "en") {
			tonen = prompt("Please insert the text that you want to be italic.", "");
		} else {	  
			tonen = prompt("Plaats de tekst die u schuin gedrukt wil hebben.", "");
		}
		if (typeof tonen == 'string' && tonen.length > 0) {
	        var Code = "[i]"+tonen+"[/i]";
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}  
	
	if (doen == "u") {
		var tonen = null;
		if (lang == "en") {
			tonen = prompt("Please insert the text that you want to be underlined.", "");
		} else {
			tonen = prompt("Plaats de tekst die u wil onderstrepen.", "");
		}
		if (typeof tonen == 'string' && tonen.length > 0) {
			var Code = "[u]"+tonen+"[/u]";
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}
			
	if (doen == "s") {
		var tonen = null;
		if (lang == "en") {
			tonen = prompt("Please insert the text that you want to be striked.", "");
		} else {
			tonen = prompt("Plaats de tekst die u wil doorstrepen.", "");
		}
		if (typeof tonen == 'string' && tonen.length > 0) {
			var Code = "[s]"+tonen+"[/s]";		
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}

	if (doen == "m") {
		var tonen = null;
		if (lang == "en") {
			tonen = prompt("Please insert the text you want to be moving.", "");
		} else {
			tonen = prompt("Plaats de tekst die u wil laten bewegen.", "");
		}
		if (typeof tonen == 'string' && tonen.length > 0) {
			var Code = "[m]"+tonen+"[/m]";
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}
			
	if (doen == "img") {
		var thisImage = null;
		if (lang == "en") {
			thisImage = prompt("Please insert the url of the image you want to add.", "http://");
		} else {
			thisImage = prompt("Plaats het internetadres van het plaatje", "http://");
		}
		if (typeof thisImage == 'string' && thisImage.length > 0) {
			var Code = "[img]"+thisImage+"[/img]";
			nBericht = oBericht+Code;
			document.fr.bericht.value=nBericht;
		}
		document.fr.bericht.focus();
		return;
	}
	
}

