tinyMCE.init({
    mode : "textareas",
	editor_selector : "mceSimple",
    theme : "advanced",
	language : "sk",
	relative_urls : true,
	document_base_url : "/",
	valid_elements : "a[href|target],strong/b,div[align],br,em,u,img[src|border|alt=|title|width|height|align],p",
	apply_source_formatting : true,
	plugins : "advlink,emotions,nonbreaking,visualchars",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,removeformat,separator,undo,redo,separator,link,unlink,separator,emotions,nonbreaking,separator,code",
    theme_advanced_buttons2 : "",
	theme_advanced_buttons3: "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "center",
	theme_advanced_path_location : "bottom",
	content_css : "images/Appstyle.css",
	convert_newlines_to_brs : false,	
	entity_encoding : "raw",
	theme_advanced_resizing : true
	});
	
tinyMCE.init({
	    mode : "textareas",
		editor_selector : "mceAdvanced",
		theme : "advanced",
		language : "sk",
		relative_urls : true,
		apply_source_formatting : true,
		document_base_url : "/",
		plugins : "advimage,advlink,preview,searchreplace,table,fullscreen,noneditable,emotions,nonbreaking,visualchars",
		theme_advanced_fonts : "Arial=arial",
//		theme_advanced_fonts : "Arial=arial;TeleLogo=telelogo;Tele-AntiquaEE=tele-antiquaee;Tele-GroteskEEBlack=tele-groteskeeblack;Tele-GroteskEEBold=tele-groteskeebold;Tele-GroteskEEHeavy=tele-groteskeeheavy;Tele-GroteskEERegular=tele-groteskeeregular",
		theme_advanced_buttons1 : "paste,cut,copy,separator,undo,redo,separator,link,unlink,image,removeformat,cleanup,forecolor,backcolor,separator,emotions,preview,hr,nonbreaking,charmap,visualchars,separator,bullist,numlist,outdent,indent,separator,visualaid",
		theme_advanced_buttons2 : "styleselect,formatselect,fontsizeselect,separator,bold,italic,underline,strikethrough,sup,sub,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,code",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "center",
		theme_advanced_path_location : "bottom",
		content_css : "images/Appstyle.css",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		external_link_list_url : "example_link_list.js",
		flash_external_list_url : "example_flash_list.js",
		media_external_list_url : "example_media_list.js",
		external_image_list_url : "browse_img.php?t=java",
		file_browser_callback : "fileBrowserCallBack",
		theme_advanced_resize_horizontal : false,
		convert_newlines_to_brs : false,
		entity_encoding : "raw",
		theme_advanced_resizing : true
	});


var fileBrowserReturnURL = "";
var fileBrowserWin;
var fileBrowserFieldName;
function fileBrowserCallBack(field_name, url, type, win) {
  newWindow=window.open('../../../../browse_img.php','add_image','resizable,scrollbars,height=650,width=1000,top=0,left=0');newWindow.focus() ; 
  fileBrowserWin = win;
  fileBrowserFieldName = field_name;
}

function fileBrowserReturn(url) {
  fileBrowserWin.document.forms[0].elements[fileBrowserFieldName].value = url;
}
