<?php
/*Fix for qtranslate*/
if (has_filter('the_editor', 'qtrans_modifyRichEditor')) { remove_filter('the_editor', 'qtrans_modifyRichEditor'); }


echo "<style type=\"text/css\">
.theEditor { color: black !important; }
#editorcontainer, #quicktags { width: 720px; }";

if ($_GET['wcttab'] == "content") {
	echo "#quicktags { visibility:hidden !important; display:none; }
	#ed_toolbar { visibility:hidden !important; display:none; }
	textarea { width:720px !important;}";
}
else {
	echo "#edButtonHTML { visibility:hidden !important; }
	#edButtonPreview { visibility:hidden !important; }";
}
echo ".ed_button2 { background-image: url(\"".plugins_url('custom-tables/img/fade-butt.png')."\") !important; }
.ed_button3 { background-image: url(\"".plugins_url('custom-tables/img/fade-butt2.png')."\") !important; }
</style>";

add_filter('admin_head','ShowTinyMCE');
function ShowTinyMCE() {
	wp_enqueue_script( 'common' );
	wp_enqueue_script( 'jquery-color' );
	wp_print_scripts('editor');
	if (function_exists('add_thickbox')) add_thickbox();
	wp_print_scripts('media-upload');
	if (function_exists('wp_tiny_mce')) wp_tiny_mce();
	wp_admin_css();
	wp_enqueue_script('utils');
	do_action("admin_print_styles-post-php");
	do_action('admin_print_styles');
}

?>