
var TinyText = new Class({

		initialize: function(selector, width, height, options){

			var params = {
				mode : "textareas",
				theme : "advanced",
				editor_selector : selector,
				plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking",
				theme_advanced_buttons1 : "bold,italic,underline,|,link,unlink,|,removeformat,|,code",
				theme_advanced_buttons2 : "",
				theme_advanced_buttons3 : "",
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				width: width+"px", 
				height: height+"px",
				theme_advanced_resizing : true,
				auto_reset_designmode : true
			};
						
			if (options == 'complet'){
				params.theme_advanced_buttons2 = "tablecontrols";
			} else if (options == 'style'){
				params.theme_advanced_buttons2 = "|,styleselect,|";
			} else if (options == 'simple' || options == ''){
				
			}
			
			
			tinyMCE.init(params);
			
		}

});