tinyMCE.init({
		  mode : "exact",
		  elements : "grafikform",
		  theme : "advanced",
		  language : "cs",
		  relative_urls : "false",
		  convert_urls : "false",
		  plugins : "advimage,emotions",
		  theme_advanced_buttons1 : "fontselect,fontsizeselect,fontsize, bold,italic,underline,forecolor,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,undo,redo",
		  theme_advanced_buttons2 : "",
		  theme_advanced_buttons3 : "",
		  theme_advanced_toolbar_location : "bottom",
		  theme_advanced_toolbar_align : "left",
		  theme_advanced_path_location : "",
		  entity_encoding : "raw",
		  apply_source_formatting : true,
		  extended_valid_elements : "a[class|href|title|onclick],img[class|src|alt|title|width|height],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
		});

		function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = "../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
			var fileBrowserWindow = new Array();
			fileBrowserWindow["file"] = ajaxfilemanagerurl;
			fileBrowserWindow["title"] = "Ajax File Manager";
			fileBrowserWindow["width"] = "782";
			fileBrowserWindow["height"] = "440";
			fileBrowserWindow["close_previous"] = "no";
			tinyMCE.openWindow(fileBrowserWindow, {
			  window : win,
			  input : field_name,
			  resizable : "yes",
			  inline : "yes",
			  editor_id : tinyMCE.getWindowArg("editor_id")
			});
			
			return false;
		}
