function writeStateToolbar( isMaximized, showDocumentLibrary )
{
	/* todo */

	/*
		pre
		quote (cite)
		h2-h6
	*/

	document.write('<div id="toolbar">');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[strong]\',\'[/strong]\');" src="img/icons/toolbar/bold.gif" title="Leg sterk de nadruk op deze tekst">');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[em]\',\'[/em]\');" src="img/icons/toolbar/italic.gif" title="Leg de nadruk op deze tekst">');
	//document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[u]\',\'[/u]\');" src="img/icons/toolbar/underline.gif" title="Onderstreep de geselecteerde tekst. Sneltoets: ctrl-shift-u">');
	//document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[s]\',\'[/s]\');" src="img/icons/toolbar/strike.gif" title="Doorstreep de geselecteerde tekst. Sneltoets: ctrl-shift-s">');
	//document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[sup]\',\'[/sup]\');" src="img/icons/toolbar/sup.gif" title="Zet de tekst in subscript">');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelection(document.getElementById(\'messageBox\'),\'[sub]\',\'[/sub]\');" src="img/icons/toolbar/sub.gif" title="Zet de tekst in superscript">');
	document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="placeList(document.getElementById(\'messageBox\'),\'*\');" src="img/icons/toolbar/list_bullet.gif" title="Maak lijst van tekst">');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="placeList(document.getElementById(\'messageBox\'),\'1\');" src="img/icons/toolbar/list_num.gif" title="Maak genummerde lijst van tekst">');

	document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="wrapSelectionWithLink(document.getElementById(\'messageBox\'));" src="img/icons/toolbar/link.gif" width=18 height=18 title="Maak een hyperlink van de tekst">');
	document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="placeImage(document.getElementById(\'messageBox\'));" src="img/icons/toolbar/image.gif" width=18 height=18 title="Voeg een afbeelding toe aan de tekst">');
	document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');
	//document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="doUndo(document.getElementById(\'messageBox\'));" src="img/icons/toolbar/undo.gif" width=18 height=18 title="Maak laatste actie ongedaan">');
	//document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="doRedo(document.getElementById(\'messageBox\'));" src="img/icons/toolbar/redo.gif" width=18 height=18 title="Maak laatste actie gedaan">');

	if ( isMaximized )
		document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="setContentToOriginal();window.close();" src="img/icons/toolbar/minimize.gif" width=18 height=18 title="Sluit venster en voeg tekst in">');
	else
		document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="openLargeEditWindow();" src="img/icons/toolbar/maximize.gif" width=18 height=18 title="Open een groot tekst invulveld">');

	if ( showDocumentLibrary )
	{
		//document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');
		document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="openStateDocumentLibrary();" src="img/icons/toolbar/documentlibrary.gif" width=18 height=18 title="Open de documentverzameling">');
		document.write('<img class="tb-buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" onmousedown="mousedown(this);" onmouseup="mouseup(this);" onclick="openStreamingLibrary();" src="img/icons/toolbar/stream.gif" width=18 height=18 title="Open de streamverzameling">');
	}
	document.write('<img class="tb-line" src="img/icons/toolbar/hline.gif" width=4 height=18>');

	document.write('<select onchange="wrapSelection(document.getElementById(\'messageBox\'),\'[\'+this.options[this.selectedIndex].value+\']\',\'[/\'+this.options[this.selectedIndex].value+\']\');"><option value="h2">Kop 2</option><option value="h3">Kop 3</option><option value="h4">Kop 4</option><option value="h5">Kop 5</option><option value="h6">Kop 6</option></select>');


	document.write('</div>');
}


var doclibaction = '';
function openStateDocumentLibrary()
{
	doclibaction = 'toolbar';
	window.open(board_script_url+'/list_documents_small','DocumentLibrary','width=900,height=500,resizable=yes,scrollbars=yes');
}