	function Enviar(){
	document.FormTextos.txtTexto.value = editor.document.body.innerHTML;
	document.forms[0].action="stuff.asp?acao=gravacapitulo";
	document.forms[0].submit();
	}

	function Iniciar() {
		editor.document.designMode = 'On';
	}

	function recortar() {
		editor.document.execCommand('cut', false, null);
	}

	function copiar() {
		editor.document.execCommand('copy', false, null);
	}
	
	function colar() {
		editor.document.execCommand('paste', false, null);
	}

	function desfazer() {
		editor.document.execCommand('undo', false, null);
	}
	function insertlink() {
		editor.document.execCommand("InsertImage", false-true, "url_imagen"); 
	}
	function insertimg() {
		editor.document.execCommand("CreateLink", false-true, "http://tuweb.com/tupagin.htm");
	}




	function refazer() {
		editor.document.execCommand('redo', false, null);
	}

	function negrito() {
		editor.document.execCommand('bold', false, null);
	}

	function italico() {
		editor.document.execCommand('italic', false, null);
	}

	function sublinhado() {
		editor.document.execCommand('underline', false, null);
	}

	function alinharEsquerda() {
		editor.document.execCommand('justifyleft', false, null);
	}

	function centralizado()	{
		editor.document.execCommand('justifycenter', false, null);
	}

	function alinharDireita() {
		editor.document.execCommand('justifyright', false, null);
	}

	function numeracao() {
		editor.document.execCommand('insertorderedlist', false, null);
	}

	function marcadores() {
		editor.document.execCommand('insertunorderedlist', false, null);
	}

	function fonte(fonte) {
		if(fonte != '')
			editor.document.execCommand('fontname', false, fonte);
	}

	function tamanho(tamanho) {
		if(tamanho != '')
			editor.document.execCommand('fontsize', false, tamanho);
	}

	function gravacapitulo(){
		if(document.getElementById("editor").contentDocument) {
document.getElementById("txtTexto").value = document.getElementById("editor").contentDocument.body.innerHTML;
  }else{
 document.getElementById("txtTexto").value = editor.document.body.innerHTML;
  }
	document.FormTextos.action="stuff.asp?acao=gravacapitulo";
	document.FormTextos.submit();
	}