    function gbcount(message,total,used,remain)
    {
	var max;
	max = total.value;
	if (message.value.length > max) {
	message.value = message.value.substring(0,max);
	used.value = max;
	remain.value = 0;
	alert("内容超限!");
	}
	else {
	used.value = message.value.length;
	remain.value = max - used.value;
	}
    }
function insertHTMLToEditor(codeStr,I)
{
  	var oEditor = CKEDITOR.instances[I];
 	if ( oEditor.mode == 'wysiwyg' )
	{
 		oEditor.insertHtml( codeStr );
	}
	else
		alert( '未定义' );
}
function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:yes;help:no;scroll:yes;');
	if (ReturnStr!='') SetObj.value=ReturnStr;
	return ReturnStr;
}