// This function is executed when the user clicks the custom tool's icon
// defined using the ToolsFile. It shows the Custom Dialog or the Custom
// Dropdown depending on the function's second parameter - isDialog.
// It is used in both CustomDialog.xml and CustomDropdown.xml toolsfiles
// but a different isDialog parameter is passed in both cases.
function showDialog(RadEditorContentArea) {
	//var result = window.showModalDialog("sites/FIFF/ctrl/RichtextFileUpload.aspx", null, "status:yes; center:yes; help:no; minimize:no; maximize:no; scroll:yes; border:thin; statusbar:yes; dialogWidth:370px; dialogHeight:280px");
	var result = window.open('sites/FIFF/ctrl/RichtextFileUpload.aspx',null,'left=400, top=100, height=250, width=350, status=yes, resizable=yes, scrollbars=no, toolbar=no,location=yes, menubar=no');

//	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.
// alert(result);
//		range.pasteHTML(result);
//	}
}

function returnValuesToRadEditorFromUploadDialog(html)
{
	// 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.
	//alert(html);
	range.pasteHTML(html);
}
