    var TMwidth;
    var TMheight;
    
    TinyMceSettings = {
        // General options
        mode : "exact",
        theme : "advanced",
        //plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
        plugins : "safari,pagebreak,style,advimage,advlink,contextmenu,paste,nonbreaking,template,inlinepopups",

        // Theme options
        //theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,styleselect,formatselect,fontselect,fontsizeselect",
        //theme_advanced_buttons2 : "undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|,bold,italic,underline,strikethrough,|,bullist,numlist,outdent,indent,|,sub,sup,|,forecolor,backcolor",
        //theme_advanced_buttons3 : "link,unlink,anchor,|,image,|,hr,|,charmap,emotions,iespell,media,advhr,|,insertdate,inserttime,|,cleanup,removeformat",
        //theme_advanced_buttons4 : "tablecontrols,visualaid,|,preview,code",        
        theme_advanced_buttons1 : "cut,copy,paste,pastetext,|,formatselect,bold,italic,underline,forecolor",
        theme_advanced_buttons2 : "fontselect,fontsizeselect,|,link,unlink|,image,|,removeformat,code",
        theme_advanced_buttons3 : "",
        //theme_advanced_buttons3 : "link,unlink|,image,|,removeformat",
        //theme_advanced_buttons4 : "tablecontrols,visualaid,|,preview,code",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "none",
        theme_advanced_resize_horizontal : false,
        theme_advanced_resizing : false,
        //theme_advanced_styles: "Header1=header1, Header2=header2, Header3=header3, TableRow=tablerow1",
        width : "302px",
        height: "150px",
        // Example word content CSS (should be your site CSS) this one removes paragraph margins
        //content_css : "http://" + location.host + "/js/tinymceStory/example_advanced.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "lists/template_list.js",
        external_link_list_url : "lists/link_list.js",
        external_image_list_url : "lists/image_list.js",
        media_external_list_url : "lists/media_list.js"
    }
    
    if (TMwidth != undefined) {
        TinyMceSettings.width = TMwidth; 
    }
    
    if (TMheight  != undefined) {
        TinyMceSettings.height = TMheight; 
    }      

    tinyMCE.init(TinyMceSettings);
