/************************************************************************
* Use this file for any custom dialog scripts for the r.a.d.editor		*
* toolbar.																*
************************************************************************/

/************************************************************************
* showAcronymDialog														*
* Places a button on the toolbar which allows authors to insert acronyms*
* into content.															*
* Uses CustomDialog.aspx which should be placed in the					*
* RadControls\Editor\Dialogs folder										*
* dialogUrl must be the fullpath to the dialog itself. If the dialog	*
* moves then this variable must be updated								*
*																		*
*																		*
* showFootnoteDialog (LB 18/07/2006)									*
* Places a button on the toolbar which allows authors to insert			*
* paragraphs with the footnote class									*
* Uses CustomDialog.aspx which should be placed in the					*
* RadControls\Editor\Dialogs folder										*
* dialogUrl must be the fullpath to the dialog itself. If the dialog	*
* moves then this variable must be updated								*
************************************************************************/
function showAcronymDialog(RadEditorContentArea, editorID)
{
	var dialogUrl = "/www.usc.edu.au/UserControls/RadControls/Editor/USC/customDialogs/AcronymCustomDialog.html?editorID=" + editorID;
	var result = radEditorShowDialog(editorID, dialogUrl, null, 300, 200);
	if (document.all)
	{
		if (result != null)
		{
			//Making the r.a.d.editor content area active.
			RadEditorContentArea.setActive();
			var range = document.selection.createRange();
			//Here we paste the HTML generated by the Custom Dialog.
			range.pasteHTML(result);
		}
	}
}
function showFootnoteDialog(RadEditorContentArea, editorID)
{
	var dialogUrl = "/www.usc.edu.au/UserControls/RadControls/Editor/USC/customDialogs/FootnoteCustomDialog.html?editorID=" + editorID;
	var result = radEditorShowDialog(editorID, dialogUrl, null, 400, 200);
	if (document.all)
	{
		if (result != null)
		{
			//Making the r.a.d.editor content area active.
			RadEditorContentArea.setActive();
			var range = document.selection.createRange();
			//Here we paste the HTML generated by the Custom Dialog.
			range.pasteHTML(result);
		}
	}
}
function showDirectoryListDialog(RadEditorContentArea, editorID)
{
	var dialogUrl = "/www.usc.edu.au/UserControls/RadControls/Editor/USC/customDialogs/DirectoryListDialog.html?editorID=" + editorID;
	var result = radEditorShowDialog(editorID, dialogUrl, null, 400, 250);
	if (document.all)
	{
		if (result != null)
		{
			//Making the r.a.d.editor content area active.
			RadEditorContentArea.setActive();
			var range = document.selection.createRange();
			//Here we paste the HTML generated by the Custom Dialog.
			range.pasteHTML(result);
		}
	}
}
