// *** 2008-10-01 (C) Copyright Matthew Xerri *** //
// *** OmniX Web Design, http://www.omnixwebdesign.com.au *** //
// *** matthew.xerri@hotmail.com, 0402-311-450 *** //

// * CONFIGURATION * // http://tinymce.moxiecode.com/wiki.php/Configuration

// * PLUGINS * // http://tinymce.moxiecode.com/wiki.php/Plugins
// "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,
// preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

// * BUTTONS * //
// "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
// "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
// "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
// "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",

// * PDW FILE BROWSER * //
function pdw_file_browser(field_name, url, type, win) {
		
	fileBrowserURL = "../pdw_file_browser/index.php?filter=" + type;
			
	tinyMCE.activeEditor.windowManager.open({
		title: "PDW File Browser",
		url: fileBrowserURL,
		width: 950,
		height: 650,
		inline: 0,
		maximizable: 1,
		close_previous: 0
	},{
		window : win,
		input : field_name
	});		
}

// * TINYCE CANCEL * //
function tinymce_cancel() {
	var question = confirm("Reset?");
	if(question) {
		document.forms[0].reset();
	} else {
	}
};

// * TINYCE SAVE * //
function tinymce_save() {
	var question = confirm("Save?");
	if(question) {
		document.forms[0].submit();
	} else {
	}
};
