function coloca_bot_tag (joid) {
	var texto = "";
	for (i in tag) {
		texto += (texto == "" ? "" : " | ") + '<a href="javascript:coloca_tag(\''+ joid + '\' , \'' + tag[i][0] + '\' , \'' + tag[i][1] + '\');" title="'+tag[i][1]+'">[' + tag[i][0] + ']</a>';
	}
	return texto;
}
function coloca_tag (oid , tag , texto) {
	if (tag == "link") {
		coloca_tag_link (oid , tag , texto);
	}
	else {
			jtexto = prompt(texto);
			if (jtexto===null) {
				document.getElementById(oid).value += '';
			} else {	
				document.getElementById(oid).value += ' [' + tag + ']' + jtexto + '[/' + tag + ']';
			}
	}
}
function coloca_tag_link (oid , tag , texto) {
		jtexto = prompt(texto , "http://");
		if (jtexto===null) {
			document.getElementById(oid).value += '';
		} else {
			document.getElementById(oid).value += ' [' + tag + ' url="' + jtexto + '"]' + prompt('digite o texto que irá aparecer') + '[/' + tag + ']';
		}
}
