<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>the aconia casting company</title>
<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="entities/modaldialog.js"></script>
<script language="javascript" type="text/javascript">

	var winref,field;
// One object tracks the current modal dialog opened from this window.
var dialogWin = new Object()

// Function to run upon closing the dialog with "OK".
function setPrefs(obj) {
	// We're just displaying the returned value in a text box.
	winref.document.forms[0].elements[fieldname].value=dialogWin.returnedValue;
}


	tinyMCE.init({
		mode: "textareas",
		theme: "advanced",
		elements: "ce",
		plugins: "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",
		theme_advanced_disable: "styleselect,formatselect,bullist,numlist,separator,outdent,indent,separator,undo,redo,anchor,removeformat,cleanup,visualaid,hr,sub,sup,charmap,justifyleft,justifycenter,justifyright,justifyfull,help",
		//theme_advanced_buttons1_add_before: "save,newdocument,separator",
		//theme_advanced_buttons1_add: "fontselect,fontsizeselect",
		theme_advanced_buttons1_add: "separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,hr,sub,sup,charmap",
		//theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
		theme_advanced_buttons2_add_before: "tablecontrols,separator",
		//theme_advanced_buttons3_add: "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
		theme_advanced_toolbar_location: "top",
		theme_advanced_toolbar_align: "left",
		theme_advanced_path_location: "bottom",
	    plugin_insertdate_dateFormat: "%Y-%m-%d",
	    plugin_insertdate_timeFormat: "%H:%M:%S",
		extended_valid_elements: "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		file_browser_callback: "fileBrowserCallBack",
		relative_urls: false,
		remove_script_host: false
	});
	
	function fileBrowserCallBack(field_name, url, type,win) {
		// This is where you insert your custom filebrowser logic
		winref=win; //browser window
		fieldname=field_name;//file src field name
		openDGDialog('http://192.168.0.2/tejash/texteditor/FileBrowser.php', 710, 480, setPrefs);
		//win.document.forms[0].elements[field_name].value = 'my browser value';
		
	}
	
</script>
</head>

<body ><form name="form1" method="post" action="">
<table width="100%" border="1" cellspacing="0">
  <tr>
    <td width="19%" height="323">&nbsp;</td>
    <td width="81%">
      <textarea name="ce" id="ce" style="width:500px; height:400px" ></textarea>
   </td>
  </tr>
</table> </form>
</body>
</html>
