RadEditorNamespace.IMAGE_MANAGER_DIALOG_NAME = "MCMSImageManager";

function checkLocalImageSubmissionConditions()
{
	var imageFileControl = document.getElementById(localImageFileUploadID);
	if (trim(imageFileControl.value) == "")
	{
		alert(localization["AlertImage"]);
		imageFileControl.focus();
		return false;
	}
	else
	{
		document.getElementById("LocalLoader").innerHTML = localization["Uploading"];
		showObject("LocalLoader");
		return true;
	}
}

function checkLocalAttachmentSubmissionConditions()
{
	var fileControl = document.getElementById(LocalFileUploadID);
	if (trim(fileControl.value) == "")
	{
		alert(localization["Alertfile"]);
		fileControl.focus();
		return false;
	}
	else
	{
		document.getElementById("LocalLoader").innerHTML = localization["Uploading"];
		showObject("LocalLoader");
		return true;
	}
}

function changeLocalTarget(control, elementId)
{
	document.getElementById(elementId).value = control.value;
	control.selectedIndex = 0;
}

LinkManager.prototype.BrowseLinks = function(internalLinksDialogLocation)
{
	if (window.showModalDialog)
	{
		var linkUrlString = this.LinkUrlHolder.value;	
		var result = window.showModalDialog(internalLinksDialogLocation + "?NRMODE=Unpublished&wbc_caller=IEModal", linkUrlString, IDS_IEWIN_INTLINKS_FEATURES);
		this.SetLinkUrlHolderValue(result);
	}
	else
	{
		var dialogObject = window.open(internalLinksDialogLocation + "?NRMODE=Unpublished&wbc_caller=Mozilla", "_blank", "status=no,toolbar=no,location=no,resizable=yes,menubar=no,modal=yes, width=550, height=600");
	}
}
LinkManager.prototype.SetLinkUrlHolderValue = function(urlValue)
{
	if (urlValue != "Cancel")
	{
		if ((this.LinkTextHolder.value == "") || (this.LinkUrlHolder.value == this.LinkTextHolder.value))
		{
			this.LinkTextHolder.value = urlValue;
		}
		this.LinkUrlHolder.value = urlValue;
	}
}