	tinyMCE.init({
		mode : "specific_textareas",
		editor_selector : "mceEditor",
		language : "pt",
		theme : "advanced",
		theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,image",
		theme_advanced_buttons2 : "cut,copy,paste,cleanup,separator,bullist,numlist,separator,undo,redo,link,unlink",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "bottom",
		theme_advanced_toolbar_align : "center",
		theme_advanced_path : false,
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"

});

	// Custom insert link callback, extends the link function
	function customInsertLink(href, target) {
		var result = new Array();

		alert("customInsertLink called href: " + href + " target: " + target);

		result['href'] = "http://www.solicitador.net";
		result['target'] = '_blank';

		return result;
	}

	// Custom insert image callback, extends the image function
	function customInsertImage(src, alt, border, hspace, vspace, width, height, align) {
		var result = new Array();

		var debug = "CustomInsertImage called:\n"
		debug += "src: " + src + "\n";
		debug += "alt: " + alt + "\n";
		debug += "border: " + border + "\n";
		debug += "hspace: " + hspace + "\n";
		debug += "vspace: " + vspace + "\n";
		debug += "width: " + width + "\n";
		debug += "height: " + height + "\n";
		debug += "align: " + align + "\n";
		alert(debug);

		result['src'] = "logo.jpg";
		result['alt'] = "test description";
		result['border'] = "2";
		result['hspace'] = "5";
		result['vspace'] = "5";
		result['width'] = width;
		result['height'] = height;
		result['align'] = "right";

		return result;
	}
	

	// Custom save callback, gets called when the contents is to be submitted
	function customSave(id, content) {
		//alert(id + "=" + content);
	}
