var dsRTE_color=function(){this.colorcmd=null;this.ExecuteCommand=function(a,b,c){this.colorcmd=b;$('#'+a.iframe.id+'-color').slideToggle();return true};this.PrepareCommand=function(a,b,c,d){var e=this;var f='#'+a.iframe.id+'-color-table';var g='#'+a.iframe.id+'-color-value';if($(f).attr('handled')!='1'){$(f).attr('handled','1').find('td').mouseover(function(){$(g).val($(this).attr('bgcolor'))}).click(function(){e.ApplyColor(a,$(g).val());c.slideUp()});$(f)[0].dsrte=a;$(f)[0].panel=c;$(f)[0].plugin=this}return true};this.ApplyColor=function(a,b){if(a.iframe.rng)a.iframe.rng.select();if(!$.browser.msie)a.doc.execCommand('useCSS',false,false);a.frame.focus();a.doc.execCommand(this.colorcmd,false,b);if(!$.browser.msie)a.doc.execCommand('useCSS',false,true);a.frame.focus()};this.RemoveColor=function(a){var b=$('#'+a+'-color-table')[0].dsrte;var c=this.colorcmd=='forecolor'?'#000000':'#ffffff';$('#'+a+'-color-value').val(c);this.ApplyColor(b,c);$('#'+b.iframe.id+'-color').slideUp()}};var dsRTE_color_temp=new dsRTE_color();dsRTE.RegisterPlugin(dsRTE_color_temp,'fgcolor');dsRTE.RegisterPlugin(dsRTE_color_temp,'bgcolor');

