var mods 	= $('#main_type').val();
var action = $('#main_action').val(); 
	if(mods=="pricelist" && action=="view"){
		var red = true;
	}else{
		var red = false;
	} 
tinymce.init({
    selector: ".tinymce",
    theme: "modern",
	readonly: red,
    plugins: [
        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
        "searchreplace wordcount visualblocks visualchars code fullscreen",
        "insertdatetime media nonbreaking save table contextmenu directionality",
        "emoticons template paste textcolor colorpicker textpattern"
    ],
	menubar: false,
    toolbar1: "insertfile undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | fontselect fontsizeselect" 
});