var Editor;

function Format(action)
{
	Editor.execCommand(action, false, null);
}

function Colour(colour)
{		
	Editor.execCommand("forecolor",false, colour);
}

window.onload = function()
{
	Editor = document.getElementById('textbox').contentWindow.document;
	Editor.designMode = "on";
	document.forms[0].messaggio.value = 
	document.forms[0].onsubmit = function()
	{
		var text = document.getElementById('text');
		document.forms[0].messaggio.value = text;
		text.value = Editor.body.innerHTML;
	}
}
