// JavaScript Editor de Textos EUNANET
		contenido_textarea = ""
		num_caracteres_permitidos = 60000
		textovar = ""
		function valida_longitud(){
			textovar = document.formpost.conteudo_pst.value;
			textovar = textovar.replace(/(\r\n|\r|\n)/igm, '<br/>');
			num_caracteres = document.formpost.conteudo_pst.value.length
			
			if (num_caracteres <= num_caracteres_permitidos){
				contenido_textarea = document.formpost.conteudo_pst.value	
			}else{
				document.formpost.conteudo_pst.value = contenido_textarea
			}
			
			if (num_caracteres >= num_caracteres_permitidos){
				document.formpost.caracteres.style.color="#ff0000";
			}else{
				document.formpost.caracteres.style.color="#000000";
			}
			
			cuenta()
		}
		function cuenta(){
			document.formpost.caracteres.value=document.formpost.conteudo_pst.value.length
		}
		function Post_msg(){
			document.formpost.submit();
			return false;
		}
		function insert_tag(var_tag){
			if (document.formpost.conteudo_pst.createTextRange) {
			    var sRange = document.selection.createRange();
				alert(sRange.text);
	    		txt_selecionado = sRange.text;
			} else {					
				inicio = document.formpost.conteudo_pst.selectionStart;
				fim = document.formpost.conteudo_pst.selectionEnd;
				txt_selecionado = document.formpost.conteudo_pst.value.substring(inicio,fim);
			}		
			if (var_tag == "yt") {
				tag_txt = "Cole_aqui_o_ID_do_Video";
				tag_ini = "[yt]";
				tag_fim = "[/yt]";
			} else if (var_tag == "n") {
				tag_txt = "Cole_aqui_seu_Texto";
				tag_ini = "[n]";
				tag_fim = "[/n]";			
			} else if (var_tag == "ruim") {
				tag_txt = "";
				tag_ini = "[ruim]";
				tag_fim = "";			
			} else if (var_tag == "legal") {
				tag_txt = "";
				tag_ini = "[legal]";
				tag_fim = "";
			} else if (var_tag == "i") {
				tag_txt = "Cole_aqui_seu_Texto";
				tag_ini = "[i]";
				tag_fim = "[/i]";
			} else if (var_tag == "tg") {
				tag_txt = "Cole_aqui_seu_Texto";
				tag_ini = "[tg]";
				tag_fim = "[/tg]";
			} else if (var_tag == "tm") {
				tag_txt = "Cole_aqui_seu_Texto";
				tag_ini = "[tm]";
				tag_fim = "[/tm]";								
			} else if (var_tag == "img") {
				tag_txt = "img";
				tag_ini = "[";
				tag_fim = "]";
			} else if (var_tag == "lk") {
				tag_txt = "Cole_aqui_Endereço_do_Link";
				tag_ini = "[lk]";
				tag_fim = "[lt]Cole_Aqui_o_Texto[/lk]";
			} else if (var_tag == "azul") {
				tag_txt = "Cole_aqui_o_Texto";
				tag_ini = "[azul]";
				tag_fim = "[/azul]";
			} else if (var_tag == "vermelho") {
				tag_txt = "Cole_aqui_o_Texto";
				tag_ini = "[vermelho]";
				tag_fim = "[/vermelho]";
			} else if (var_tag == "verde") {
				tag_txt = "Cole_aqui_o_Texto";
				tag_ini = "[verde]";
				tag_fim = "[/verde]";
			} else if (var_tag == "amarelo") {
				tag_txt = "Cole_aqui_o_Texto";
				tag_ini = "[amarelo]";
				tag_fim = "[/amarelo]";	
			} else if (var_tag == "magenta") {
				tag_txt = "Cole_aqui_o_Texto";
				tag_ini = "[magenta]";
				tag_fim = "[/magenta]";	
			} else {	
				tag_txt = "";
				tag_ini = "";
				tag_fim = "";		
			}
			if (txt_selecionado == "") {
				document.formpost.conteudo_pst.value=document.formpost.conteudo_pst.value+tag_ini+tag_txt+tag_fim;
			} else {
				document.formpost.conteudo_pst.value=document.formpost.conteudo_pst.value.replace(txt_selecionado,tag_ini+txt_selecionado+tag_fim);
			}
			document.formpost.conteudo_pst.focus();
			return false;
		}

