document.writeln("<table id=Container width=100% height=100% cellpadding=2 cellspacing=0><tr><td align=left><select onChange=\"FormatText('FormatBlock',this[this.selectedIndex].value);\"><option selected>段落</option><option value=\"&lt;P&gt;\">正文</option><option value=\"&lt;H1&gt;\">标题一</option><option value=\"&lt;H2&gt;\">标题二</option><option value=\"&lt;H3&gt;\">标题三</option><option value=\"&lt;H4&gt;\">标题四</option><option value=\"&lt;H5&gt;\">标题五</option><option value=\"&lt;H6&gt;\">标题六</option><option value=\"&lt;PRE&gt;\">预设格式</option></select> <select name=\"selectFont\" onChange=\"FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);\"><option selected>字体<option value=\"removeFormat\">默认字体<option value=\"宋体\">宋体<option value=\"黑体\">黑体<option value=\"隶书\">隶书<option value=\"幼圆\">幼圆<option value=\"楷体_GB2312\">楷体<option value=\"仿宋_GB2312\">仿宋<option value=\"新宋体\">新宋体<option value=\"华文彩云\">华文彩云<option value=\"华文仿宋\">华文仿宋<option value=\"华文新魏\">华文新魏<option value=\"Arial\">Arial<option value=\"Arial Black\">Arial Black<option value=\"Arial Narrow\">Arial Narrow<option value=\"Century\">Century<option value=\"Courier New\">Courier New<option value=\"Georgia\">Georgia<option value=\"Impact\">Impact<option value=\"Lucida Console\">Lucida Console<option value=\"MS Sans Serif\">MS Sans Serif<option value=\"System\">System<option value=\"Symbol\">Symbol<option value=\"Tahoma\">Tahoma<option value=\"Times New Roman\">Times New Roman&nbsp; &nbsp;<option value=\"Verdana\">Verdana<option value=\"Webdings\">Webdings<option value=\"Wingdings\">Wingdings</option></select> <select onChange=\"FormatText('fontsize',this[this.selectedIndex].value);\" name=\"D2\"><option class=\"heading\" selected>字体大小<option value=1>一号<option value=2>二号<option value=3>三号<option value=4>四号<option value=5>五号<option value=6>六号<option value=7>七号</option></select>");


{document.write("<br>");}






document.writeln("</td></tr><tr><td height=100%><iframe ID=HtmlEditor MARGINHEIGHT=5 MARGINWIDTH=5 width=80% height=90%></iframe></td></tr><tr></tr></table>");
var IframeID=frames["HtmlEditor"];
if(navigator.appVersion.indexOf("MSIE 6.0",0)==-1){IframeID.document.designMode="On"}
IframeID.document.open();
IframeID.document.write ('<script>i=0;function ctlent(eventobject){if(event.ctrlKey && window.event.keyCode==13 && i==0){i=1;parent.document.yuziform.content.value=document.body.innerHTML;parent.document.yuziform.submit();parent.document.yuziform.submit1.disabled=true;}}<\/script><body background=\"images/inputbg-1.gif\" onkeydown=ctlent()>');



IframeID.document.close();
IframeID.document.body.contentEditable = "True";
IframeID.document.body.innerHTML=document.getElementById("content").value;
IframeID.document.body.style.fontSize="10pt";


function FormatText(command,option){frames.HtmlEditor.focus();frames.HtmlEditor.document.execCommand(command,true,option);}

function CheckLength(){alert("最大字符为 "+50000+ " 字节\n您的内容已有 "+IframeID.document.body.innerHTML.length+" 字节");}

function emoticon(theSmilie){
frames.HtmlEditor.focus();
sel=frames.HtmlEditor.document.selection.createRange();
sel.pasteHTML("<img src=images/Emotions/"+theSmilie+".gif>");
}




function DoTitle(addTitle) {
var revisedTitle;var currentTitle = document.yuziform.topic.value;revisedTitle = addTitle+currentTitle;document.yuziform.topic.value=revisedTitle;document.yuziform.topic.focus();
}

function CheckForm(form){
form.content.value=frames.HtmlEditor.document.body.innerHTML;
MessageLength=document.yuziform.content.value.length;
if(MessageLength<2){alert("文章内容不能小于2个字符！");return false;}
if(MessageLength>50000){alert("文章内容不能超过50000个字符！");return false;}
document.yuziform.submit1.disabled = true;
}

function Gopreview()
{
document.preview.content.value=IframeID.document.body.innerHTML; 
window.open('', 'preview_page', 'resizable,scrollbars,width=750,height=450');
document.preview.submit()
}



