
//打开资源窗口
window.toinsertRes = function()
{

	if(window.resSelWin == null || window.resSelWin.closed)
	{
		window.resSelWin = window.open("","msgsel","height=450, width=700, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no");
		window.resSelWin.location = "../../../App.do?Service=page&PageName=ressel";
		window.resSelWin.focus();
	}
	else
	{
		window.resSelWin.focus();
	}
}

//在fckeditor中打开插入图片窗口
function addImage()
{

	if(window.resSelWin == null || window.resSelWin.closed)
	{
		window.resSelWin = window.open("","msgsel","height=450, width=700, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no");
		window.resSelWin.location = "App.do?Service=page&PageName=ressel";
		window.resSelWin.focus();
	}
	else
	{
		window.resSelWin.focus();
	}
}


//FCKedtor加载完后的析构方法
function FCKeditor_OnComplete(editorInstance)
{
	
}
//获得Body的值
window.getBodyHtml = function()
{
	var oEditor = FCKeditorAPI.GetInstance('Msg.body') ;
	return oEditor.EditorDocument.body.innerHTML;
}
//得到FCKedtor实例
window.getEditorInstance = function()
{
	return FCKeditorAPI.GetInstance('Msg.body') ;
}
//插入Body的值
window.insertHtml = function(content)
{
	var oEditor = getEditorInstance();
	if(oEditor != null)
	{
		oEditor.InsertHtml(content);
	}

}