

tinymce.create('tinymce.plugins.CustomDropDown', {
	createControl: function(n, cm) {
		switch (n) {
			case 'customdropdown': {
			  var c = cm.createMenuButton('customdropdown', {
					title : 'Custom dropdown-menu',
					image : 'http://www.floor-tiles-direct.com/modules/TinyMCE/images/customdropdown.gif',
					icons : false
				});
				c.onRenderMenu.add(function(c, m) {				
  					m.add({title : 'Start expand/collapse-area', onclick : function() {
	  					tinyMCE.activeEditor.execCommand('mceInsertContent', false, '{startExpandCollapse id=\'expand1\' title=\'This is my expandable area\'}');
					}});
  					m.add({title : 'End expand/collapse-area', onclick : function() {
	  					tinyMCE.activeEditor.execCommand('mceInsertContent', false, '{stopExpandCollapse}');
					}});
  					m.addSeparator();
  					m.add({title : 'Insert CMS version info', onclick : function() {
	  					tinyMCE.activeEditor.execCommand('mceInsertContent', false, '{cms_version} {cms_versionname}');
					}});

 				});
 				return c;
			}			
		}
		return null;
		
	}
});
// Register plugin with a short name

tinymce.PluginManager.add('customdropdown', tinymce.plugins.CustomDropDown);

		
//Creates a new plugin class and a custom listbox
tinymce.create('tinymce.plugins.CMSLinkerPlugin', {
	createControl: function(n, cm) {	
		switch (n) {
			case 'cmslinker':			
				var c = cm.createMenuButton('cmslinker', {
					title : 'Insert link to cmsms-page',
					image : 'http://www.floor-tiles-direct.com/modules/TinyMCE/images/cmsmslink.gif',
					icons : false
				});

				c.onRenderMenu.add(function(c, m) {
					var mm = m.addMenu({title : '1 Main Pages'});

					mm.add({title : '1.1 Home', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Home';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=home">'+sel+'</a>');
					}});

					mm.add({title : '1.2 FAQ', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='FAQ';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=faq">'+sel+'</a>');
					}});

					mm.add({title : '1.3 Advertise With Us', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Advertise With Us';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=advertise-with-us">'+sel+'</a>');
					}});

					mm.add({title : '1.4 Links', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Links';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=floor-tile-links">'+sel+'</a>');
					}});

					mm.add({title : '1.5 Contact Us', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Contact Us';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=contact-us">'+sel+'</a>');
					}});

					mm.add({title : '1.6 Sitemap', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Sitemap';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=sitemap">'+sel+'</a>');
					}});
					var mm = m.addMenu({title : '2 Orphan Pages'});

					mm.add({title : '2.1 PEI Floor Tile Rating System', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='PEI Floor Tile Rating System';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=pei-rating-system">'+sel+'</a>');
					}});

					mm.add({title : '2.2 Search Results', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Search Results';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=search-results">'+sel+'</a>');
					}});

					mm.add({title : '2.3 Directory Page Listing', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Directory Page Listing';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=create-directory-listing">'+sel+'</a>');
					}});

					mm.add({title : '2.4 Directory Listing Created', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Directory Listing Created';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=directory-listing-created">'+sel+'</a>');
					}});
					var mm = m.addMenu({title : '3 Side Pages'});
					var mmm = mm.addMenu({title : '3.1 Do It Yourself'});
					var mmmm = mmm.addMenu({title : '3.1.1 Installing Floor Tiles'});

					mmmm.add({title : '3.1.1 Installing Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Installing Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=installing-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.1.1.1 DIY ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='DIY ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=bullshit">'+sel+'</a>');
					}});

					mmm.add({title : '3.1.2 Floor Tile Patterns', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Floor Tile Patterns';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=floor-tile-patterns">'+sel+'</a>');
					}});

					mmm.add({title : '3.1.3 Floor Tile Design', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Floor Tile Design';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=floor-tile-design">'+sel+'</a>');
					}});

					mmm.add({title : '3.1.4 Removing Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Removing Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=removing-floor-tile">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.1.5 Tile Floor Repair'});

					mmmm.add({title : '3.1.5 Tile Floor Repair', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Tile Floor Repair';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=tile-floor-repair">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.1.5.1 Tile repair ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Tile repair ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=tile-repair-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.1.6 Cleaning Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Cleaning Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=cleaning-floor-tiles">'+sel+'</a>');
					}});
					var mmm = mm.addMenu({title : '3.2 Tiling Ideas'});
					var mmmm = mmm.addMenu({title : '3.2.1 Bathroom Floor Tile'});

					mmmm.add({title : '3.2.1 Bathroom Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Bathroom Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=bathroom-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.2.1.1 Bathroom tile ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Bathroom tile ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=bathroom-tile-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.2.2 Kitchen Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Kitchen Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=kitchen-floor-tile">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.2.3 Garage Floor Tile'});

					mmmm.add({title : '3.2.3 Garage Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Garage Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=garage-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.2.3.1 Garage tile ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Garage tile ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=garage-tile-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.2.4 Outdoor Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Outdoor Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=outdoor-floor-tiles">'+sel+'</a>');
					}});

					mmm.add({title : '3.2.5 Basement Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Basement Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=basement-floor-tiles">'+sel+'</a>');
					}});

					mmm.add({title : '3.2.6 Shower Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Shower Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=shower-floor-tiles">'+sel+'</a>');
					}});
					var mmm = mm.addMenu({title : '3.3 Local Directory'});

					mmm.add({title : '3.3.1 Local Directory', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Local Directory';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=local-directory">'+sel+'</a>');
					}});
					var mmm = mm.addMenu({title : '3.4 Discount Tile'});

					mmm.add({title : '3.4.1 Discount Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Discount Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=discount-floor-tile">'+sel+'</a>');
					}});
					var mmm = mm.addMenu({title : '3.5 Floor Tile Types'});
					var mmmm = mmm.addMenu({title : '3.5.1 Ceramic Floor Tile'});

					mmmm.add({title : '3.5.1 Ceramic Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Ceramic Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=ceramic-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.5.1.1 Ceramic tile ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Ceramic tile ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=ceramic-tile-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.2 Vinyl Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Vinyl Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=vinyl-floor-tile">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.5.3 Porcelain Floor Tile'});

					mmmm.add({title : '3.5.3 Porcelain Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Porcelain Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=porcelain-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.5.3.1 Porcelain add', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Porcelain add';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=porcelain-add">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.4 Marble Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Marble Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=marble-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.5 Laminate Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Laminate Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=laminate-floor-tile">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.5.6 Mosaic Floor Tile'});

					mmmm.add({title : '3.5.6 Mosaic Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Mosaic Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=mosaic-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.5.6.1 Mosaic ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Mosaic ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=mosaic-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.7 Rubber Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Rubber Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=rubber-floor-tiles">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.8 Interlocking Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Interlocking Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=interlocking-floor-tiles">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.9 Slate Tile Flooring', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Slate Tile Flooring';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=slate-tile-flooring">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.10 Wood Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Wood Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=wood-floor-tile">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.5.11 Travertine Floor Tile'});

					mmmm.add({title : '3.5.11 Travertine Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Travertine Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=travertine-floor-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.5.11.1 Travertine ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Travertine ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=travertine-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.12 Granite Tile Flooring', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Granite Tile Flooring';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=granite-tile-flooring">'+sel+'</a>');
					}});
					var mmmm = mmm.addMenu({title : '3.5.13 Carpet Tile'});

					mmmm.add({title : '3.5.13 Carpet Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Carpet Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=carpet-tile">'+sel+'</a>');
					}});
					mmmm.addSeparator();

					mmmm.add({title : '3.5.13.1 Carpet tile ad', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Carpet tile ad';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=carpet-tile-ad">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.14 Leather Floor Tiles', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Leather Floor Tiles';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=leather-floor-tiles">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.15 Glass Tile Flooring', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Glass Tile Flooring';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=glass-tile-flooring">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.16 Concrete Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Concrete Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=concrete-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.17 Linoleum Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Linoleum Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=linoleum-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.18 Terra Cotta Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Terra Cotta Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=terra-cotta-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.19 Plastic Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Plastic Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=plastic-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.21 Limestone Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Limestone Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=limestone-floor-tile">'+sel+'</a>');
					}});

					mmm.add({title : '3.5.21 Brick Floor Tile', onclick : function() {
						var sel=tinyMCE.activeEditor.selection.getContent();
						if (sel=='') sel='Brick Floor Tile';
						tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<a href="index.php?page=brick-floor-tile">'+sel+'</a>');
					}});

				});

				// Return the new menu button instance
				return c;
		}

		return null;
	}
});

// Register plugin with a short name
tinymce.PluginManager.add('cmslinker', tinymce.plugins.CMSLinkerPlugin);
		 tinyMCE.init({ 
    mode : "exact",
  elements : "",
  content_css : "http://www.floor-tiles-direct.com/modules/TinyMCE/stylesheet.php?templateid=&mediatype=screen&bogus=1328504401",

    entity_encoding : "raw", 
  button_tile_map : true, //performance update

		
  theme : "advanced",
  skin : "default",
  skin_variant : "",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  visual : true,
	      
  accessibility_warnings : false,
      			
  fix_list_elements : true,
  verify_html : true,
  verify_css_classes : false,
  
  plugins : "-cmslinker,-customdropdown,paste,advimage,advlink,contextmenu,inlinepopups",

    paste_auto_cleanup_on_paste : true,
  
  theme_advanced_buttons1 : "cut,paste,pastetext,pasteword,copy,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,fontselect,fontsizeselect",
  theme_advanced_buttons2 : "bold,italic,underline,strikethrough,advhr,separator,bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,cmslinker,link,unlink,anchor,image,charmap,cleanup,separator,forecolor,backcolor,separator,code,fullscreen,help",
  theme_advanced_buttons3 : "",
  theme_advanced_buttons4 : "",


  theme_advanced_blockformats : "p,div,h1,h2,h3,h4,h5,h6,div,blockquote,dt,dd,code,samp",
  document_base_url : "http://www.floor-tiles-direct.com/",

  relative_urls : true,
  remove_script_host : true,
  	
  language: "en",
  dialog_type: "modal",
  apply_source_formatting : true,

  theme_advanced_statusbar_location : 'bottom',
  theme_advanced_path : true,
			
		
	force_br_newlines : false,
  force_p_newlines : true,		
			 
  forced_root_block : false,		
		
  plugin_insertdate_dateFormat : "%Y-%m-%d",
  plugin_insertdate_timeFormat : "%H:%M:%S",			

			


    
});
  
	
  
function toggleEditor(id) {
  if (!tinyMCE.getInstanceById(id))
    tinyMCE.execCommand('mceAddControl', false, id);
  else
    tinyMCE.execCommand('mceRemoveControl', false, id);
}
  

  
