BBS里UBB的全码

原创 2006年05月23日 08:44:00

    摘要:JavaScript中正则表达函数的说明与应用     (全文共4442字)——点击此处阅读全文


    摘要:JavaScript正则表达式    (全文共7840字)——点击此处阅读全文

BBS里UBB的全码
<%
function out(str)
out=Server.HTMLEncode(str)
out=replace(out,vbcrlf,"<br>")
out=ubbcode(out,"/[img/](.*?)/[//img/]","<img src=""$1"" border=""0"">")
out=ubbcode(out,"/[img align=left/](.*?)/[//img/]","<img src=""$1"" align=""left"" border=""0"">")
out=ubbcode(out,"/[img align=right/](.*?)/[//img/]","<img src=""$1"" align=""right"" border=""0"">")
out=ubbcode(out,"/[img align=center/](.*?)/[//img/]","<div align=""center""><img src=""$1"" border=""0""></div>")
out=ubbcode(out,"/(.*?)/[//color/]","<font color=""$1"">$2</font>")
out=ubbcode(out,"/[url=(.*?)/](.*?)/[//url/]","<a href=""$1"" target=""_blank"">$2</a>")
out=ubbcode(out,"/[url/](.*?)/[//url/]","<a href=""$1"" target=""_blank"">$1</a>")
out=ubbcode(out,"/[center/](.*?)/[//center/]","<center>$1</center>")
out=ubbcode(out,"/[b/](.*?)/[//b/]","<b>$1</b>")
out=ubbcode(out,"/[i/](.*?)/[//i/]","<i>$1</i>")
out=ubbcode(out,"/[u/](.*?)/[//u/]","<u>$1</u>")
out=ubbcode(out,"/[h1/](.*?)/[//h1/]","<h1>$1</h1>")
out=ubbcode(out,"/[h2/](.*?)/[//h2/]","<h2>$1</h2>")
out=ubbcode(out,"/[h3/](.*?)/[//h3/]","<h3>$1</h3>")
out=HTMLcode(out)
end function
%>

<%
function HTMLcode(str)
Set re=new RegExp
re.IgnoreCase=True
re.Global=True
re.Pattern="(?:^|>)(?:.*?)(?:<|$)"
Set Searchs=re.Execute(str)
For Each Search In Searchs
s=replace(Search.value," ","&nbsp;")
str=replace(str,Search.value,s)
Next
HTMLcode=str
End Function
%>

<%
function ubbcode(str1,str2,str3)
Set re = new RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = str2
ubbcode = re.replace(str1,str3)
end function
%>


使用方法:
  <input type="hidden" name="ART_Body" id="ftbBody" value='<% =REC("ART_BODY") %>'>
    <td valign="top" scope="col"><!--#include file="MYBODY.ASP"-->
图片参考http://blog.csdn.net/xuandhu/admin/EditPosts.aspx
也就是一个网的发新文章了



<script language="javascript" type="text/javascript">
</script>
<script language="JavaScript">
function FTB_ForeColorPicker(editor,htmlmode) {
 if (htmlmode) return;
 script = FTB_HelperFilesPath + 'ftb.colorpicker.aspx';
 if (FTB_HelperFilesParameters != '') script += '?' + FTB_HelperFilesParameters
 color = showModalDialog(script,window,'dialogWidth:210px;dialogHeight:170px;status:0;scroll:0;help:0;');
 editor.document.execCommand('forecolor','',color);
}
</script>

 <script language="JavaScript">
    function FTB_75_75_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/75_75.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_shades_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/shades_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_72_72_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/72_72.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Outdent(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'outdent');
}
</script>

 <script language="JavaScript">
    function FTB_omg_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/omg_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_wink_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/wink_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_71_71_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/71_71.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_WordCount(editor,htmlmode) {
    if (htmlmode) return;
    var iSumWords = 0;
    var rng = editor.document.body.createTextRange();
    rng.collapse(true);
    while(rng.move("word",1)) {
     iSumWords++;
    }
    alert("大约  " + iSumWords + " 字");
}
</script>

 <script language="JavaScript">
    function FTB_star_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/star.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_present_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/present.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_InsertTable(editor,htmlmode) {
 if (htmlmode) return;
 editor.focus();

 var tablescript = FTB_HelperFilesPath + 'ftb.inserttable.aspx';
 if (FTB_HelperFilesParameters != '') tablescript += '?' + FTB_HelperFilesParameters;
 tableArr = showModalDialog(tablescript,window,'dialogWidth:350px; dialogHeight:210px;help:0;status:0;resizeable:1;');

 if (tableArr != null) {
  var newTable = editor.document.createElement('TABLE');
  for(y=0; y<tableArr['rows']; y++) {
   var newRow = newTable.insertRow();
   for(x=0; x<tableArr['cols']; x++) {
    var newCell = newRow.insertCell();    
    if (tableArr['valigncells'] != "") {
     newCell.valign = tableArr['valigncells'];
    }
    if (tableArr['haligncells'] != "") {
     newCell.align = tableArr['haligncells'];
    }    
    if (tableArr['percentcols'] == true) {     
     newCell.width = Math.round((1 / tableArr['cols']) * 100) + "%";
    }     
   }
  }
  newTable.border = tableArr['border'];
  newTable.cellspacing = tableArr['cellspacing'];
  newTable.cellpadding = tableArr['cellpadding'];  
  if (tableArr['width'] != "") newTable.width = tableArr['width'];
  if (tableArr['height'] != "") newTable.height = tableArr['height'];

  if (editor.document.selection.type=='Control') {
   sel.pasteHTML(newTable.outerHTML);
  } else {
   sel = editor.document.selection.createRange();
   sel.pasteHTML(newTable.outerHTML);
  }
 } else {
  //alert("You did not select an image");
 }
}
</script>

<script language="JavaScript">
function FTB_SetFontFace(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand('fontname','',value);
}
</script>

 <script language="JavaScript">
    function FTB_red_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/red_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_ieSpellCheck(editor,htmlmode) {
    if (htmlmode) return;
 try {
  var tspell = new ActiveXObject('ieSpell.ieSpellExtension');
  tspell.CheckAllLinkedDocuments(window.document);
 } catch (err){
  if (window.confirm('进行拼写检查需要安装 ieSpell 插件,您要安装吗?')){window.open('http://www.iespell.com/download.php');};
 };
}
</script>

 <script language="JavaScript">
function FTB_InsertRule(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'inserthorizontalrule');
}
</script>

 
<script language="javascript">
function FTB_ftbBody_onKeyDown_LineBreak() {
 editor = ftbBody_editor;
 var _TAB = 9;
 var _ENTER = 13;
 var _QUOTE = 222;
 var _OPENCURLY = '&#8220;';
 var _CLOSECURLY = '&#8221;';

 if (editor.event.keyCode == _TAB && editor.event.ctrlKey) {
  //HtmlMode to DesignMode (Ctrl+TAB)
  if (ftbBody_HtmlMode && editor.event.keyCode == _TAB && editor.event.ctrlKey) {
   FTB_SetActiveTab(document.getElementById('ftbBody_DesignModeTab'));
   ftbBody_ChangeMode(editor,document.getElementById('ftbBody_TempFrame'),'ftbBody_Toolbar',false,true);
  }
  //DesignMode to HtmlMode (Ctrl+TAB)
  if (!ftbBody_HtmlMode && editor.event.keyCode == _TAB && editor.event.ctrlKey) {
   FTB_SetActiveTab(document.getElementById('ftbBody_HtmlModeTab'));
   ftbBody_ChangeMode(editor,document.getElementById('ftbBody_TempFrame'),'ftbBody_Toolbar',true,true);
  }
  ftbBody_HtmlMode = !ftbBody_HtmlMode;
 }
 if (editor.event.keyCode == _QUOTE && editor.event.shiftKey && !ftbBody_HtmlMode) {
  var sel = editor.document.selection;
  if (sel.type == 'Control') return;
  var r = sel.createRange();
  var before = FTB_CharBefore(r);
  var after = FTB_CharAfter(r);
  var r = sel.createRange();

  if (before == 'start') {
   r.pasteHTML(_OPENCURLY);
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   return false;
  } else if (before != ' ' && after == 'end') {
   r.pasteHTML(_CLOSECURLY);
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   return false;
  } else if (before == ' ' && after == 'end') {
   r.pasteHTML(_OPENCURLY);
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   return false;
  } else if (before != ' ' && after == ' ') {
   r.pasteHTML(_CLOSECURLY);
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   return false;
  } else {
   r.pasteHTML(_OPENCURLY);
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   return false;
  }
 }
 // Ensure TAB key doesn't cause editor to loose focus
 if (editor.event.keyCode == _TAB) {
  editor.document.selection.createRange().text = '/t/t/t/t';
  editor.event.cancelBubble = true;
  editor.event.returnValue = false;
 }
 if (editor.event.keyCode == _ENTER) {
  var sel = editor.document.selection;
  if (sel.type == 'Control') {
   return;
  }
  var r = sel.createRange();
  if ((!FTB_CheckTag(r.parentElement(),'LI'))&&(!FTB_CheckTag(r.parentElement(),'H'))) {
   r.pasteHTML('<br>');
   editor.event.cancelBubble = true;
   editor.event.returnValue = false;
   r.select();
   r.collapse(false);
   return false;
  }
 }

</script>

 <script language="JavaScript">

function FTB_JustifyCenter(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'justifycenter');
}
</script>

 <script language="JavaScript">
    function FTB_thumbs_up_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/thumbs_up.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_RemoveFormat(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'removeFormat');
}
</script>

 <script language="JavaScript">
function FTB_Paste(editor,htmlmode) {
 editor.focus();
 editor.document.execCommand('paste','',null);
}
</script>

 <script language="JavaScript">
function FTB_InsertDate(editor,htmlmode) {
 editor.focus();
 var d = new Date();
 sel = editor.document.selection.createRange();
 sel.pasteHTML(d.toLocaleDateString());
}
</script>

 <script language="JavaScript">
    function FTB_snail_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/snail.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_thumbs_down_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/thumbs_down.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_tongue_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/tongue_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Cut(editor,htmlmode) {
 editor.focus();
 editor.document.execCommand('cut','',null);
}
</script>

 <script language="JavaScript">
function FTB_CreateLink(editor,htmlmode) {
 if (htmlmode) return;
 editor.focus();
    editor.document.execCommand('createlink','1',null);
}
</script>

 <script language="JavaScript">
    function FTB_pc_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/pc.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Underline(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'underline');
}
</script>

 <script language="JavaScript">
function FTB_Bold(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'bold');
}
</script>

 <script language="JavaScript">
    function FTB_51_51_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/51_51.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_what_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/what_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_InsertTime(editor,htmlmode) {
 editor.focus();
 var d = new Date();
 sel = editor.document.selection.createRange();
 sel.pasteHTML(d.toLocaleTimeString());
}
</script>

 <script language="JavaScript">
function FTB_Superscript(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'superscript');
}
</script>

 <script language="JavaScript">
    function FTB_hitwall_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/hitwall.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_BackColorPicker(editor,htmlmode) {
 if (htmlmode) return;
 script = FTB_HelperFilesPath + 'ftb.colorpicker.aspx';
 if (FTB_HelperFilesParameters != '') script += '?' + FTB_HelperFilesParameters
 color = showModalDialog(script,window,'dialogWidth:210px;dialogHeight:170px;status:0;scroll:0;help:0;');
 editor.document.execCommand('backcolor','',color);
}
</script>

 <script language="JavaScript">
    function FTB_cake_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/cake.gif'>");
    }
    </script>

 
<script language="JavaScript">
function FTB_ftbBody_onPaste() {}
</script>

 <script language="JavaScript">
function FTB_Indent(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'indent');
}
</script>

 <script language="JavaScript">
    function FTB_messenger_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/messenger.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_74_74_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/74_74.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_car_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/car.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_JustifyFull(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'justifyfull');
}
</script>

 <script language="JavaScript">
function FTB_SetFontSize(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand('fontsize','',value);
}
</script>

 <script language="JavaScript">
    function FTB_confused_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/confused_smile.gif'>");
    }
    </script>

 
<script language="javascript" type="text/javascript" src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>

 <script language="JavaScript">
    function FTB_money_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/money.gif'>");
    }
    </script>

 <script language="JavaScript">
// *******************************************
// Universal Editor Functions
// *******************************************
function FTB_CopyHtmlToHidden(editor,hiddenHtml,htmlmode) {
 if (htmlmode) {
  hiddenHtml.value = editor.document.body.innerText; 
 } else {
  hiddenHtml.value = editor.document.body.innerHTML; 
 }
 if (hiddenHtml.value == '<P>&nbsp;</P>') {
  hiddenHtml.value = '';
 }
}
function FTB_Format(editor,htmlmode,format) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand(format,'',null);

function FTB_CheckTag(item,tagName) {
 if (item.tagName.search(tagName)!=-1) {
  return item;
 }
 if (item.tagName=='BODY') {
  return false;
 }
 item=item.parentElement;
 return FTB_CheckTag(item,tagName);
}
function FTB_CharBefore(sel) {
 if (sel.move('character',-1) == -1) {
  sel.expand('character');
  return sel.text;
 } else {
  return 'start';
 }
}
function FTB_CharAfter(sel) {
 var sel2 = sel;
 if (sel.expand('character')) {
  sel2.move('character',1);
  sel2.expand('character');
  return sel2.text;
 } else {
  return 'end';
 }
}
function FTB_CharBefore(r) {
 if (r.move('character',-1) == -1) {
  r.expand('character');
  return r.text;
 } else {
  return 'start';
 }
}
function FTB_CharAfter(r) {
 var r2 = r;
 if (r.expand('character')) {
  r2.move('character',1);
  r2.expand('character');
  return r2.text;
 } else {
  return 'end';
 }
}
function FTB_GetRangeReference(editor) {
 editor.focus();
 var objReference = null;
 var RangeType = editor.document.selection.type;
 var selectedRange = editor.document.selection.createRange();

 switch(RangeType) {
  case 'Control' :
   if (selectedRange.length > 0 )  {
    objReference = selectedRange.item(0);
   }
   break;

  case 'None' :
   objReference = selectedRange.parentElement();
   break;

  case 'Text' :
   objReference = selectedRange.parentElement();
   break;
 }
 return objReference
}
// ********************************************
// Style Functions
// ********************************************
function FTB_SetButtonStyle(buttonTD,style,checkstyle) {
 if (buttonTD == null) return;
 if (buttonTD.className != checkstyle)
  buttonTD.className = style;
}
function FTB_GetClassSubName(className) {
 underscore = className.indexOf("_");
 if (underscore < 0) return className;
 return className.substring(underscore+1);
}
function FTB_ButtonOver(theTD,editorname,imageOver,imageDown) {
 FTB_SetButtonStyle(theTD,editorname+'_ButtonOver',null);
 if (eval(editorname+'_OverImage').src != '') theTD.background=eval(editorname+'_OverImage').src;
 
 if(theTD.children.length && theTD.children[0].tagName == "IMG" && imageOver){
  oldSrc = theTD.children[0].src;
  if (oldSrc.indexOf('.over.') == -1) {
   theTD.children[0].src=oldSrc.substring(0, oldSrc.length-4) + ".over.gif";
  }
 }
}
function FTB_ButtonOut(theTD,editorname,imageOver,imageDown) {
 FTB_SetButtonStyle(theTD,editorname+'_ButtonNormal',null);
 document.body.style.cursor = 'default';
 theTD.background='';
 if(theTD.children.length && theTD.children[0].tagName == "IMG"){
  oldSrc = theTD.children[0].src;
  if (oldSrc.indexOf('.over.') > 0) {
   theTD.children[0].src=oldSrc.substring(0, oldSrc.length-9) + ".gif";
  }
  if (oldSrc.indexOf('.down.') > 0) {
   theTD.children[0].src=oldSrc.substring(0, oldSrc.length-9) + ".gif";
  }
 }
}
function FTB_ButtonDown(theTD,editorname,imageOver,imageDown) {
 document.body.style.cursor = 'default';
 FTB_SetButtonStyle(theTD,editorname+'_ButtonDown',null);
 if (eval(editorname+'_DownImage').src != '') theTD.background=eval(editorname+'_DownImage').src;
 if(theTD.children.length && theTD.children[0].tagName == "IMG" && imageDown == 1){
  oldSrc = theTD.children[0].src;
  if (oldSrc.indexOf('.over.') > 0) {
   theTD.children[0].src=oldSrc.substring(0, oldSrc.length-9) + ".down.gif";
  }
 }
}
function FTB_ButtonUp(theTD,editorname,imageOver,imageDown) {
 document.body.style.cursor = 'auto';
 FTB_SetButtonStyle(theTD,editorname+'_ButtonOver',null);
 if (eval(editorname+'_OverImage').src != '') theTD.background=eval(editorname+'_OverImage').src;
 if(theTD.children.length && theTD.children[0].tagName == "IMG" && imageOver == 1){
  oldSrc = theTD.children[0].src;
  if (oldSrc.indexOf('.over.') == -1) {
   theTD.children[0].src=oldSrc.substring(0, oldSrc.length-4) + ".over.gif";
  }
 }
}
function FTB_SetActiveTab(theTD,editorname) {
 parentTR = theTD.parentElement;
 selectedTab = 1;
 totalButtons = parentTR.cells.length-1;
 for (var i=1;i< totalButtons;i++) {
  parentTR.cells[i].className = editorname + "_TabOffRight";
  if (theTD == parentTR.cells[i]) { selectedTab = i; }

 }

 if (selectedTab==1) {
  parentTR.cells[0].className = editorname + "_StartTabOn";
 } else {
  parentTR.cells[0].className = editorname + "_StartTabOff";
  parentTR.cells[selectedTab-1].className = editorname + "_TabOffLeft";
 }

 theTD.className = editorname + "_TabOn";
}
function FTB_TabOver() {
 document.body.style.cursor='default';
}
function FTB_TabOut() {
 document.body.style.cursor='auto';
}

</script>

 <script language="JavaScript">
function FTB_SetFontForeColor(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand('forecolor','',value);
}
</script>

 <script language="JavaScript">
function FTB_Subscript(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'subscript');
}
</script>

 <script language="JavaScript">
function FTB_InsertImageFromGallery_ftbBody(editor,htmlmode) {
 if (htmlmode) return;
 editor.focus();

 obj = FTB_GetRangeReference(editor);
 if (obj.tagName == 'IMG') {
  editor.document.execCommand('insertimage',1,'');
  return;
 }

 var folder = 'images/blog_csdn_net/xuandhu';
 var galleryscript = FTB_HelperFilesPath + 'ftb.imagegallery.aspx?rif='+folder+'&cif='+folder;
 if (FTB_HelperFilesParameters != '') galleryscript += '&' + FTB_HelperFilesParameters;
 imgArr = showModalDialog(galleryscript,window,'dialogWidth:560px; dialogHeight:500px;help:0;status:0;resizeable:1;');

 if (imgArr != null) {
  imagestring = '<IMG SRC="' + imgArr['filename'] + '" HEIGHT=' + imgArr['height'] + ' WIDTH=' + imgArr['width'] + ' BORDER=0>';
  sel = editor.document.selection.createRange();
  sel.pasteHTML(imagestring);
 } else {
  //alert("您没有选择图片。");
 }
}
</script>

 <script language="JavaScript">
function FTB_BulletedList(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'insertunorderedlist');
}
</script>

 <script language="JavaScript">
    function FTB_cry_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/cry_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Print(editor,htmlmode) {
 editor.document.execCommand('print','',null);
}
</script>

 <script language="JavaScript">
function FTB_Copy(editor,htmlmode) {
 editor.focus();
 editor.document.execCommand('copy','',null);
}
</script>

 <script language="JavaScript">
img_DotText_ButtonOverImage = new Image();
img_DotText_ButtonOverImage.src = "images/toolbarbutton.over.gif";
img_DotText_ButtonDownImage = new Image();
img_DotText_ButtonDownImage.src = "images/toolbarbutton.down.gif";
img_DotText_fontforecolorpicker = new Image();
img_DotText_fontforecolorpicker.src = "images/fontforecolorpicker.gif";
img_DotText_fontbackcolorpicker = new Image();
img_DotText_fontbackcolorpicker.src = "images/fontbackcolorpicker.gif";
img_DotText_bold = new Image();
img_DotText_bold.src = "images/bold.gif";
img_DotText_underline = new Image();
img_DotText_underline.src = "images/underline.gif";
img_DotText_strikethrough = new Image();
img_DotText_strikethrough.src = "images/strikethrough.gif";
img_DotText_superscript = new Image();
img_DotText_superscript.src = "images/superscript.gif";
img_DotText_subscript = new Image();
img_DotText_subscript.src = "images/subscript.gif";
img_DotText_insertimage = new Image();
img_DotText_insertimage.src = "images/insertimage.gif";
img_DotText_insertimagefromgallery = new Image();
img_DotText_insertimagefromgallery.src = "images/insertimagefromgallery.gif";
img_DotText_createlink = new Image();
img_DotText_createlink.src = "images/createlink.gif";
img_DotText_unlink = new Image();
img_DotText_unlink.src = "images/unlink.gif";
img_DotText_removeformat = new Image();
img_DotText_removeformat.src = "images/removeformat.gif";
img_DotText_justifyright = new Image();
img_DotText_justifyright.src = "images/justifyright.gif";
img_DotText_justifycenter = new Image();
img_DotText_justifycenter.src = "images/justifycenter.gif";
img_DotText_justifyfull = new Image();
img_DotText_justifyfull.src = "images/justifyfull.gif";
img_DotText_bullets = new Image();
img_DotText_bullets.src = "images/bullets.gif";
img_DotText_numberedlist = new Image();
img_DotText_numberedlist.src = "images/numberedlist.gif";
img_DotText_indent = new Image();
img_DotText_indent.src = "images/indent.gif";
img_DotText_outdent = new Image();
img_DotText_outdent.src = "images/outdent.gif";
img_DotText_cut = new Image();
img_DotText_cut.src = "images/cut.gif";
img_DotText_copy = new Image();
img_DotText_copy.src = "images/copy.gif";
img_DotText_paste = new Image();
img_DotText_paste.src = "images/paste.gif";
img_DotText_undo = new Image();
img_DotText_undo.src = "images/undo.gif";
img_DotText_redo = new Image();
img_DotText_redo.src = "images/redo.gif";
img_DotText_print = new Image();
img_DotText_print.src = "images/print.gif";
img_DotText_SpellCheck = new Image();
img_DotText_SpellCheck.src = "images/spellcheck.gif";
img_DotText_insertrule = new Image();
img_DotText_insertrule.src = "images/insertrule.gif";
img_DotText_insertdate = new Image();
img_DotText_insertdate.src = "images/insertdate.gif";
img_DotText_inserttime = new Image();
img_DotText_inserttime.src = "images/inserttime.gif";
img_DotText_inserttable = new Image();
img_DotText_inserttable.src = "images/inserttable.gif";
img_DotText_wordcount = new Image();
img_DotText_wordcount.src = "images/wordcount.gif";
img_DotText_qq = new Image();
img_DotText_qq.src = "images/qq.gif";
img_DotText_regular_smile = new Image();
img_DotText_regular_smile.src = "images/regular_smile.gif";
img_DotText_teeth_smile = new Image();
img_DotText_teeth_smile.src = "images/teeth_smile.gif";
img_DotText_omg_smile = new Image();
img_DotText_omg_smile.src = "images/omg_smile.gif";
img_DotText_tongue_smile = new Image();
img_DotText_tongue_smile.src = "images/tongue_smile.gif";
img_DotText_wink_smile = new Image();
img_DotText_wink_smile.src = "images/wink_smile.gif";
img_DotText_sad_smile = new Image();
img_DotText_sad_smile.src = "images/sad_smile.gif";
img_DotText_confused_smile = new Image();
img_DotText_confused_smile.src = "images/confused_smile.gif";
img_DotText_what_smile = new Image();
img_DotText_what_smile.src = "images/what_smile.gif";
img_DotText_cry_smile = new Image();
img_DotText_cry_smile.src = "images/cry_smile.gif";
img_DotText_red_smile = new Image();
img_DotText_red_smile.src = "images/red_smile.gif";
img_DotText_shades_smile = new Image();
img_DotText_shades_smile.src = "images/shades_smile.gif";
img_DotText_angry_smile = new Image();
img_DotText_angry_smile.src = "images/angry_smile.gif";
img_DotText_51_51 = new Image();
img_DotText_51_51.src = "images/51_51.gif";
img_DotText_71_71 = new Image();
img_DotText_71_71.src = "images/71_71.gif";
img_DotText_74_74 = new Image();
img_DotText_74_74.src = "images/74_74.gif";
img_DotText_72_72 = new Image();
img_DotText_72_72.src = "images/72_72.gif";
img_DotText_75_75 = new Image();
img_DotText_75_75.src = "images/75_75.gif";
img_DotText_77_77 = new Image();
img_DotText_77_77.src = "images/77_77.gif";
img_DotText_coffee = new Image();
img_DotText_coffee.src = "images/coffee.gif";
img_DotText_thumbs_up = new Image();
img_DotText_thumbs_up.src = "images/thumbs_up.gif";
img_DotText_thumbs_down = new Image();
img_DotText_thumbs_down.src = "images/thumbs_down.gif";
img_DotText_beer_mug = new Image();
img_DotText_beer_mug.src = "images/beer_mug.gif";
img_DotText_cake = new Image();
img_DotText_cake.src = "images/cake.gif";
img_DotText_present = new Image();
img_DotText_present.src = "images/present.gif";
img_DotText_star = new Image();
img_DotText_star.src = "images/star.gif";
img_DotText_snail = new Image();
img_DotText_snail.src = "images/snail.gif";
img_DotText_Pizza = new Image();
img_DotText_Pizza.src = "images/pizza.gif";
img_DotText_messenger = new Image();
img_DotText_messenger.src = "images/messenger.gif";
img_DotText_car = new Image();
img_DotText_car.src = "images/car.gif";
img_DotText_pc = new Image();
img_DotText_pc.src = "images/pc.gif";
img_DotText_money = new Image();
img_DotText_money.src = "images/money.gif";
img_DotText_hitwall = new Image();
img_DotText_hitwall.src = "images/hitwall.gif";

</script>

 <script language="JavaScript">
function FTB_JustifyRight(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'justifyright');
}
</script>

 <script language="JavaScript">
    function FTB_sad_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/sad_smile.gif'>");
    }
    </script>

 <style> 
div.FTB_StatusBar {
 text-align: left;
 padding:1px;
 width:100px;
 height: 100%;
 border:1 solid #808080;
 font: 8pt MS Sans Serif;
}
select.FTB_Select {
 font: 10pt Arial;
}
</style>

 <script language="JavaScript">
    function FTB_beer_mug_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/beer_mug.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_coffee_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/coffee.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_SetParagraph(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 if (value == '<body>') {
  editor.document.execCommand('formatBlock','','Normal');
  editor.document.execCommand('removeFormat');
  return;
 }
 editor.document.execCommand('formatBlock','',value);
}
</script>

 <script language="JavaScript">
    function FTB_angry_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/angry_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Unlink(editor,htmlmode) {
 if (htmlmode) return;
 editor.focus();
    editor.document.execCommand('unlink','1',null);
}
</script>

 <script language="JavaScript">
   function FTB_InsertQQEmoticon(editor,htmlmode) {
   if (htmlmode) return;
   editor.focus();

   obj = FTB_GetRangeReference(editor);
   if (obj.tagName == 'IMG')
   {
    editor.document.execCommand('insertimage',1,'');
    return;
   }

   var folder = 'Emoticons/QQ';
   var galleryscript = '../..IMAGESGallery.aspx?rif='+folder+'&cif='+folder;
   if (FTB_HelperFilesParameters != '') galleryscript += '&' + FTB_HelperFilesParameters;
   imgArr = showModalDialog(galleryscript,window,'help:0;status:0;resizeable:1;');

   if (imgArr != null)
    {
     imagestring = '<IMG SRC="' + imgArr['filename'] + '" HEIGHT=' + imgArr['height'] + ' WIDTH=' + imgArr['width'] + ' BORDER=0>';
     sel = editor.document.selection.createRange();
     sel.pasteHTML(imagestring);
    }
   else
    {
   
    }
   }
   </script>

 <script language="JavaScript">
function FTB_NumberedList(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'insertorderedlist');
}
</script>

 <script language="JavaScript">
    function FTB_regular_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/regular_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_SetFontBackColor(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand('backcolor','',value);
}
</script>

 <script language="JavaScript">
function FTB_Redo(editor,htmlmode) {
 editor.focus();
  editor.document.execCommand('redo','',null);
}
</script>

 <script language="JavaScript">
function FTB_InsertImage(editor,htmlmode) {
 if (htmlmode) return;
 editor.focus();
 editor.document.execCommand('insertimage',1,'');
}
</script>

 <script language="JavaScript">
    function FTB_Pizza_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/Pizza.gif'>");
    }
    </script>

 <script language="JavaScript">
function FTB_Strikethrough(editor,htmlmode) {
 FTB_Format(editor,htmlmode,'strikethrough');
}
</script>

 
<!--
 ********************************************
 * FreeTextBox 1.6.3.26073
 * by John Dyer
 * http://www.revjon.com/ftb/
 * 翻译:破宝<percyboy@800e.net>
 ********************************************
-->

 <script language="JavaScript">
function FTB_InsertSymbol(editor,htmlmode,name,value) {
 if (htmlmode) return;
 editor.focus();
 sel = editor.document.selection.createRange();
 sel.pasteHTML(value);
}
</script>

 
<style>
td.ftbBody_StartTabOn {
 font: 10pt MS Sans Serif;
 padding:1px;
 border-left: 1 solid Transparent;
 border-right: 1 solid #FFFFFF;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_StartTabOff {
 font: 10pt MS Sans Serif;
 padding:1px;
 border-left: 1 solid Transparent;
 border-right: 1 solid Transparent;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_TabOn {
 font: 8pt MS Sans Serif;
 padding:1px;
 padding-left:5px;
 padding-right:5px;
 border-left: 1 solid #FFFFFF;
 border-right: 1 solid Transparent;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_TabOffRight {
 font: 8pt MS Sans Serif;
 padding:1px;
 padding-left:5px;
 padding-right:5px;
 border-left: 1 solid Transparent;
 border-right: 1 solid Transparent;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_TabOffLeft {
 font: 8pt MS Sans Serif;
 padding:1px;
 padding-left:5px;
 padding-right:5px;
 border-left: 1 solid Transparent;
 border-right: 1 solid #FFFFFF;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_EndTab {
 font: 10pt MS Sans Serif;
 width: 100%;
 padding:1px;
 border-left: 1 solid Transparent;
 border-right: 1 solid Transparent;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 background-color: Transparent;
}
td.ftbBody_None {
}
td.ftbBody_ButtonNormal {
 border: 1 solid Transparent;
 background-color:  Transparent;
 font-family: MS Sans Serif;
 font-size: 10pt;
}
td.ftbBody_ButtonOver {
 border-top: 1 solid #000080; 
 border-left: 1 solid #000080;
 border-right: 1 solid #000080;
 border-bottom: 1 solid #000080;
 
 font-family: MS Sans Serif;
 font-size: 10pt;
}
td.ftbBody_ButtonDown {
 border-top: 1 solid #000080; 
 border-left: 1 solid #000080;
 border-right: 1 solid #000080;
 border-bottom: 1 solid #000080;
 
 font-family: MS Sans Serif;
 font-size: 10pt;
}
div.ftbBody_Toolbar {
 margin-bottom: 1px;
 margin-right: 2px;
 float: left;
 background-image: url(images/toolbar.background.gif);
}
iframe.ftbBody_iframe {
 width:100%;
 height:100%;
 border-right: 1 solid Transparent;
 border-left: 1 solid Transparent;
 border-top: 1 solid Transparent;
 border-bottom: 1 solid Transparent;
 frameBorder: 0;
}
body.FTB {
 scrollbar-3dlight-color: #D4D0C8;
 scrollbar-arrow-color: #000000;
 scrollbar-base-color: #D4D0C8;
 scrollbar-darkshadow-color: #D4D0C8;
 scrollbar-face-color: ##D4D0C8;
 scrollbar-highlight-color: #808080;
 scrollbar-shadow-color: #808080;
 scrollbar-track-color: #D4D0C8;
}
</style>

 <script language="JavaScript">
function FTB_Undo(editor,htmlmode) {
 editor.focus();
 editor.document.execCommand('undo','',null);
}
</script>

 <script language="JavaScript">
    function FTB_teeth_smile_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/teeth_smile.gif'>");
    }
    </script>

 <script language="JavaScript">
    function FTB_77_77_ShowFace(editor,htmlmode) {
    editor.focus();
    sel = editor.document.selection.createRange();
    sel.pasteHTML("<img src='IMAGES/77_77.gif'>");
    }
    </script>


   <table width="756" border="0" cellpadding="0" cellspacing="0" bgcolor="F5F5F5" id="BodyTable">
    
        <tr>
     <td width="10" class="NavLeftCell">&nbsp;      </td>
     <td width="768" id="Body">
      <div id="Main">
       
 <div id="Editor_Messages">

</div>

<div id="Editor_Edit">
 <div id="Editor_Edit_Header" class="CollapsibleTitle">
  
  <div id="Editor_Edit_Contents">
 <div class="Edit">
 <!-- DEBUG -->
<input type="hidden" name="art_Body" id="ftbBody">
    <!--
****************************************************************************************************************************************
*
*
*
*

*********************************************************************************************************************************
初始加入的值加到这里!!!!!!!!!!!!!!!!!!     
 <input type="hidden" name="ftbBody" id="ftbBody" value="做程序员真辛苦呀">
-->
<iframe  name="ftbBody" id="ftbBody_TempFrame" style="display:none;"></iframe>
  <table width="93%" BORDER=0 style="background-color:Transparent;width:98%;height:300px;">
    <TR><TD height="143">
 <!-- Start Toolbar -->
 <table id="ftbBody_Toolbar" border=0 cellpadding=0 cellspacing=0>
      <tr>
        <td width="556"><div id="ftbBody_Toolbar_Toolbar0" class="ftbBody_Toolbar">
            <table border=0 cellpadding=0 cellspacing=0>
              <tr>
                <td><img src="images/toolbar.start.gif" border=0 unselectable="on"></td>
                <td><table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
                    <tr>
                      <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_ParagraphMenu" onChange="FTB_SetParagraph(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                          <option value="">段落样式</option>
                          <option value="<body>">正文</option>
                          <option value="<h1>">标题 1</option>
                          <option value="<h2>">标题 2</option>
                          <option value="<h3>">标题 3</option>
                          <option value="<h4>">标题 4</option>
                          <option value="<h5>">标题 5</option>
                          <option value="<h6>">标题 6</option>
                          <option value="<pre>">带格式的</option>
                          <option value="<address>">地址</option>
                        </select>
                      </td>
                      <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_FontFacesMenu" onChange="FTB_SetFontFace(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                          <option value="">字体</option>
                          <option value="Arial">Arial</option>
                          <option value="Courier New">Courier New</option>
                          <option value="Garamond">Garamond</option>
                          <option value="Georgia">Georgia</option>
                          <option value="Tahoma">Tahoma</option>
                          <option value="Times New Roman">Times New Roman</option>
                          <option value="Verdana">Verdana</option>
                          <option value="宋体">宋体</option>
                          <option value="幼圆">幼圆</option>
                          <option value="楷体_GB2312">楷体_GB2312</option>
                          <option value="仿宋_GB2312">仿宋_GB2312</option>
                          <option value="黑体">黑体</option>
                          <option value="隶书">隶书</option>
                        </select>
                      </td>
                      <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_FontSizesMenu" onChange="FTB_SetFontSize(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                          <option value="">字号</option>
                          <option value="1">1</option>
                          <option value="2">2</option>
                          <option value="3">3</option>
                          <option value="4">4</option>
                          <option value="5">5</option>
                          <option value="6">6</option>
                        </select>
                      </td>
                      <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_FontForeColorsMenu" onChange="FTB_SetFontForeColor(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                          <option value="">字体颜色</option>
                          <option value="#000000" style="background-color: Black;color: #FFFFFF;">黑色</option>
                          <option value="#808080" style="background-color: Gray;">灰色</option>
                          <option value="#A9A9A9" style="background-color: DarkGray;">深灰色</option>
                          <option value="#D3D3D3" style="background-color: LightGrey;">浅灰色</option>
                          <option value="#FFFFFF" style="background-color: White;">白色</option>
                          <option value="#7FFFD4" style="background-color: Aquamarine;">碧绿色</option>
                          <option value="#0000FF" style="background-color: Blue;">蓝色</option>
                          <option value="#000080" style="background-color: Navy;color: #FFFFFF;">海军蓝</option>
                          <option value="#800080" style="background-color: Purple;color: #FFFFFF;">紫色</option>
                          <option value="#FF1493" style="background-color: DeepPink;">紫红色</option>
                          <option value="#EE82EE" style="background-color: Violet;">紫罗兰色</option>
                          <option value="#FFC0CB" style="background-color: Pink;">粉红色</option>
                          <option value="#006400" style="background-color: DarkGreen;color: #FFFFFF;">深绿色</option>
                          <option value="#008000" style="background-color: Green;color: #FFFFFF;">绿色</option>
                          <option value="#9ACD32" style="background-color: YellowGreen;">草绿色</option>
                          <option value="#FFFF00" style="background-color: Yellow;">黄色</option>
                          <option value="#FFA500" style="background-color: Orange;">橙色</option>
                          <option value="#FF0000" style="background-color: Red;">红色</option>
                          <option value="#A52A2A" style="background-color: Brown;">红棕色</option>
                          <option value="#DEB887" style="background-color: BurlyWood;">棕色</option>
                          <option value="#F5F5DC" style="background-color: Beige;">浅褐色</option>
                        </select>
                      </td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_ForeColorPicker(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/fontforecolorpicker.gif" alt="字体颜色" width=21px height=20px align=absmiddle></td>
                      <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_FontBackColorsMenu" onChange="FTB_SetFontBackColor(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                          <option value="">背景色</option>
                          <option value="#000000" style="background-color: Black;color: #FFFFFF;">黑色</option>
                          <option value="#808080" style="background-color: Gray;">灰色</option>
                          <option value="#A9A9A9" style="background-color: DarkGray;">深灰色</option>
                          <option value="#D3D3D3" style="background-color: LightGrey;">浅灰色</option>
                          <option value="#FFFFFF" style="background-color: White;">白色</option>
                          <option value="#7FFFD4" style="background-color: Aquamarine;">碧绿色</option>
                          <option value="#0000FF" style="background-color: Blue;">蓝色</option>
                          <option value="#000080" style="background-color: Navy;color: #FFFFFF;">海军蓝</option>
                          <option value="#800080" style="background-color: Purple;color: #FFFFFF;">紫色</option>
                          <option value="#FF1493" style="background-color: DeepPink;">紫红色</option>
                          <option value="#EE82EE" style="background-color: Violet;">紫罗兰色</option>
                          <option value="#FFC0CB" style="background-color: Pink;">粉红色</option>
                          <option value="#006400" style="background-color: DarkGreen;color: #FFFFFF;">深绿色</option>
                          <option value="#008000" style="background-color: Green;color: #FFFFFF;">绿色</option>
                          <option value="#9ACD32" style="background-color: YellowGreen;">草绿色</option>
                          <option value="#FFFF00" style="background-color: Yellow;">黄色</option>
                          <option value="#FFA500" style="background-color: Orange;">橙色</option>
                          <option value="#FF0000" style="background-color: Red;">红色</option>
                          <option value="#A52A2A" style="background-color: Brown;">红棕色</option>
                          <option value="#DEB887" style="background-color: BurlyWood;">棕色</option>
                          <option value="#F5F5DC" style="background-color: Beige;">浅褐色</option>
                        </select>
                      </td>
                      </tr>
                </table></td>
                <td><img src="images/toolbar.end.gif" border=0 unselectable="on"></td>
              </tr>
            </table>
        </div></td>
      </tr>
      <tr>
        <td><div id="ftbBody_Toolbar_Toolbar0" class="ftbBody_Toolbar">
          <table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
            <tr>
    <td class="ftbBody_None"><img unselectable="on" src="images/toolbar.start.gif" width=9 height=26></td>
     <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_BackColorPicker(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/fontbackcolorpicker.gif" alt="背景色" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_BackColorPicker(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);">&nbsp;</td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_BackColorPicker(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);">&nbsp;</td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Bold(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/bold.gif" alt="粗体" width=21px height=20px align=absmiddle></td>
              <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Underline(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/underline.gif" alt="下划线" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Strikethrough(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/strikethrough.gif" alt="删除线" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Superscript(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/superscript.gif" alt="上标" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Subscript(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/subscript.gif" alt="下标" width=21px height=20px align=absmiddle></td>
              <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertImage(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/insertimage.gif" alt="插入图片" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertImageFromGallery_ftbBody(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/insertimagefromgallery.gif" alt="插入图片(来自图片库)" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_CreateLink(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/createlink.gif" alt="插入超链接" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Unlink(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/unlink.gif" alt="去除超链接" width=21px height=20px align=absmiddle></td>
              <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_RemoveFormat(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/removeformat.gif" alt="删除格式" width=21px height=20px align=absmiddle></td>
            </tr>
          </table>
        </div></td>
      </tr>
      <tr>
        <td><table border=0 cellpadding=0 cellspacing=0>
            <tr>
              <td><img src="images/toolbar.start.gif" border=0 unselectable="on"></td>
              <td><table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
                  <tr>
                    <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_JustifyRight(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/justifyright.gif" alt="右对齐" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_JustifyCenter(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/justifycenter.gif" alt="居中对齐" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_JustifyFull(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/justifyfull.gif" alt="两端对齐" width=21px height=20px align=absmiddle></td>
                    <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_BulletedList(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/bullets.gif" alt="项目符号列表" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_NumberedList(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/numberedlist.gif" alt="数字项目列表" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Indent(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/indent.gif" alt="增加缩进" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Outdent(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/outdent.gif" alt="减少缩进" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Cut(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/cut.gif" alt="剪切" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Copy(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/copy.gif" alt="复制" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Paste(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/paste.gif" alt="粘贴" width=21px height=20px align=absmiddle></td>
                    <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Undo(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/undo.gif" alt="撤销" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Redo(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/redo.gif" alt="重做" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Print(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/print.gif" alt="打印" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_ieSpellCheck(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/spellcheck.gif" alt="拼写检查" width=21px height=20px align=absmiddle></td>
                    <td class="FTB_None" style="padding-left:4px;width: 21px;" unselectable="on"><select name="ftbBody_SymbolsMenu" onChange="FTB_InsertSymbol(ftbBody_editor,ftbBody_HtmlMode,this[this.selectedIndex].innerText,this[this.selectedIndex].value);this.selectedIndex=0;" class="FTB_Select">
                        <option value="">符号</option>
                        <option value="&amp;#162;">&#162;</option>
                        <option value="&amp;#163;">&#163;</option>
                        <option value="&amp;#165;">&#165;</option>
                        <option value="&amp;#167;">&#167;</option>
                        <option value="&amp;#191;">&#191;</option>
                        <option value="&amp;#161">&#161</option>
                        <option value="&amp;#169;">&#169;</option>
                        <option value="&amp;#174;">&#174;</option>
                        <option value="&amp;#8482;">&#8482;</option>
                        <option value="-">-</option>
                        <option value="&amp;#8211;">&#8211;</option>
                        <option value="&amp;#8212;">&#8212;</option>
                        <option value="&amp;#8216;">&#8216;</option>
                        <option value="&amp;#8217;">&#8217;</option>
                        <option value="&amp;#8220;">&#8220;</option>
                        <option value="&amp;#8221;">&#8221;</option>
                        <option value="&amp;#225;">&#225;</option>
                        <option value="&amp;#233;">&#233;</option>
                        <option value="&amp;#237;">&#237;</option>
                        <option value="&amp;#239;">&#239;</option>
                        <option value="&amp;#241;">&#241;</option>
                        <option value="&amp;#243;">&#243;</option>
                        <option value="&amp;#176;">&#176;</option>
                        <option value="&amp;#183;">&#183;</option>
                        <option value="&amp;#171;">&#171;</option>
                        <option value="&amp;#187;">&#187;</option>
                        <option value="&amp;#188;">&#188;</option>
                        <option value="&amp;#189;">&#189;</option>
                        <option value="&amp;#190;">&#190;</option>
                        <option value="&amp;#185;">&#185;</option>
                        <option value="&amp;#178;">&#178;</option>
                        <option value="&amp;#179;">&#179;</option>
                        <option value="&amp;#247;">&#247;</option>
                        <option value="&amp;#177;">&#177;</option>
                        <option value="&amp;#215;">&#215;</option>
                      </select>
                    </td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertRule(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/insertrule.gif" alt="插入水平线" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertDate(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/insertdate.gif" alt="插入日期" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertTime(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/inserttime.gif" alt="插入时间" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertTable(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/inserttable.gif" alt="插入表格" width=21px height=20px align=absmiddle></td>
                    <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_WordCount(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/wordcount.gif" alt="字数统计" width=21px height=20px align=absmiddle></td>
                  </tr>
              </table></td>
              <td><img src="images/toolbar.end.gif" border=0 unselectable="on"></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td><div id="ftbBody_Toolbar_" class="ftbBody_Toolbar">
            <table border=0 cellpadding=0 cellspacing=0>
              <tr>
                <td><img src="images/toolbar.start.gif" border=0 unselectable="on"></td>
                <td><table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
                    <tr>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_regular_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/regular_smile.gif" alt="笑脸:)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_teeth_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/teeth_smile.gif" alt="咧嘴笑脸:-D" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_omg_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/omg_smile.gif" alt="惊讶的笑脸:-O" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_tongue_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/tongue_smile.gif" alt="吐舌笑脸 :-P" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_wink_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/wink_smile.gif" alt="眨眼笑脸 ;-)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_sad_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/sad_smile.gif" alt="悲伤的脸 :-(" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_confused_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/confused_smile.gif" alt="困惑的笑脸 :-S" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_what_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/what_smile.gif" alt="失望的脸 :-|" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_cry_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/cry_smile.gif" alt="哭泣的脸 :'(" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_red_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/red_smile.gif" alt="尴尬的笑脸 :-$" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_shades_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/shades_smile.gif" alt="热烈的笑脸 (H)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_angry_smile_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/angry_smile.gif" alt="生气的脸 :-@" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_51_51_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/51_51.gif" alt="悄悄话 :-*" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_71_71_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/71_71.gif" alt="不知道 :^)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_74_74_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/74_74.gif" alt="聚会笑脸<:o)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_72_72_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/72_72.gif" alt="正在思考 *-)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_75_75_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/75_75.gif" alt="转动眼睛 8-)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_77_77_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/77_77.gif" alt="困了 |-)" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    </tr>
                </table></td>
                <td><img src="images/toolbar.end.gif" border=0 unselectable="on"></td>
              </tr>
            </table>
          </div>
            <div id="ftbBody_Toolbar_" class="ftbBody_Toolbar">
              <table border=0 cellpadding=0 cellspacing=0>
                <tr>
                  <td><img src="images/toolbar.start.gif" border=0 unselectable="on"></td>
                  <td><table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
                      <tr>
                        <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_InsertQQEmoticon(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/qq.gif" alt="插入QQ表情" width=21px height=20px align=absmiddle></td>
                      </tr>
                  </table></td>
                  <td><img src="images/toolbar.end.gif" border=0 unselectable="on"></td>
                </tr>
              </table>
          </div></td>
      </tr>
      <tr>
        <td><div id="ftbBody_Toolbar_" class="ftbBody_Toolbar">
            <table border=0 cellpadding=0 cellspacing=0>
              <tr>
                <td><img src="images/toolbar.start.gif" border=0 unselectable="on"></td>
                <td><table border=0 cellpadding=0 cellspacing=0 bgcolor="Transparent">
                    <tr>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_coffee_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/coffee.gif" alt="咖啡" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_thumbs_up_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/thumbs_up.gif" alt="太棒了" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_thumbs_down_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/thumbs_down.gif" alt="太差了" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_beer_mug_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/beer_mug.gif" alt="啤酒杯" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_cake_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/cake.gif" alt="生日蛋糕" width=17px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_present_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/present.gif" alt="礼品盒" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_star_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/star.gif" alt="星星" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_snail_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/snail.gif" alt="蜗牛" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_Pizza_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/pizza.gif" alt="比萨饼" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_messenger_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/messenger.gif" alt="messenger" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_car_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/car.gif" alt="汽车" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_pc_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/pc.gif" alt="计算机" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_money_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/money.gif" alt="金钱" width=19px height=19px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                      <td nowrap class="ftbBody_ButtonNormal" onClick="FTB_hitwall_ShowFace(ftbBody_editor, ftbBody_HtmlMode);"
   onMouseOver="FTB_ButtonOver(this,'ftbBody',0,0);"
   onMouseOut="FTB_ButtonOut(this,'ftbBody',0,0);"
   onMouseDown="FTB_ButtonDown(this,'ftbBody',0,0);"
   onMouseUp="FTB_ButtonUp(this,'ftbBody',0,0);"><img unselectable="on"  src="images/hitwall.gif" alt="撞墙" width=25px height=20px align=absmiddle></td>
                      <td class="ftbBody_None"><img unselectable="on" src="images/separator.gif" width=5 height=20></td>
                    </tr>
                </table></td>
                <td><img src="images/toolbar.end.gif" border=0 unselectable="on"></td>
              </tr>
            </table>
        </div></td>
      </tr>
   </table></TD>
    </TR><TR><TD HEIGHT="100%">
 <iframe  id="ftbBody_editor" CLASS="ftbBody_iframe" name="ftbBody_editor" onBlur="FTB_CopyHtmlToHidden(ftbBody_editor,document.getElementById('ftbBody'),ftbBody_HtmlMode);"></IFRAME>
 </TD></TR>
 <TR><TD>
 <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 STYLE="border-collapse:collapse;">
  <TR ID="mainrow">
   <TD CLASS="ftbBody_StartTabOn">&nbsp;
    
   </TD>
   <TD CLASS="ftbBody_TabOn" ID="ftbBody_DesignModeTab" onClick="if (ftbBody_HtmlMode) { if (ftbBody_ChangeMode(ftbBody_editor,ftbBody_TempFrame,'ftbBody_Toolbar',false,true)) { FTB_SetActiveTab(this,'ftbBody');ftbBody_HtmlMode = !ftbBody_HtmlMode;}}" onMouseOver="FTB_TabOver();" onMouseOut="FTB_TabOut();" nowrap="true">
    <IMG unselectable="on" SRC="images/modedesign.gif" ALIGN="absmiddle" width=21 height=20>&nbsp;设计
   </TD>
   <TD CLASS="ftbBody_TabOffRight" ID="ftbBody_HtmlModeTab" onClick="if (!ftbBody_HtmlMode) { if (ftbBody_ChangeMode(ftbBody_editor,ftbBody_TempFrame,'ftbBody_Toolbar',true,true)) { FTB_SetActiveTab(this,'ftbBody'); ftbBody_HtmlMode = !ftbBody_HtmlMode;}}" unselectable="on" onMouseOver="FTB_TabOver();" onMouseOut="FTB_TabOut();" nowrap="true">
    <IMG unselectable="on" SRC="images/modehtml.gif" ALIGN="absmiddle" width=21 height=20>&nbsp;HTML
   </TD>
   <TD CLASS="ftbBody_EndTab" ALIGN=right>
   </TD>
  </TR>
 </TABLE>
 
 </TD></TR> 
 </TABLE>
    
   
  </div>
</div>


       </div>
     </td>
    </tr>
   </table>
   <script language="javascript" type="text/javascript">
<!--
 var Page_Validators =  new Array(document.all["Editor_Edit_valTitleRequired"], document.all["Editor_Edit_valftbBodyRequired"], document.all["Editor_Edit_Requiredfieldvalidator2"], document.all["Editor_Edit_Advanced_vRegexEntryName"]);
  // -->
</script>

   
<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" && clientInformation.appName.indexOf("Explorer") != -1) {
    if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer == "125"))
        ValidatorOnLoad();
}

function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    return true;
}
// -->
</script>
       

   
<script language="JavaScript">
function ftbBody_Initialize(editor,hiddenHtml) {
 editor.document.designMode = 'On'; 
 editor.document.open();
 editor.document.write(hiddenHtml.value);
 editor.document.close();
 editor.document.contentEditable = 'True'; 
 //editor.document.body.style.margin="6 px";
 //editor.document.body.style.border="0"; 
 ftbBody_ApplyEditorStyles(editor);
}
function ftbBody_ApplyEditorStyles(editor) {
 bs = editor.document.body.style;
 bs.scrollbar3dLightColor= '#D4D0C8';
 bs.scrollbarArrowColor= '#000000';
 bs.scrollbarBaseColor= '#D4D0C8';
 bs.scrollbarDarkShadowColor= '#D4D0C8';
 bs.scrollbarFaceColor= '#D4D0C8';
 bs.scrollbarHighlightColor= '#808080';
 bs.scrollbarShadowColor= '#808080';
 bs.scrollbarTrackColor= '#D4D0C8';
 bs.border='0';
}
function ftbBody_ChangeMode(editor,tempframe,toolbarname,goToHtmlMode,autohide) {
 var toolbar = document.getElementById(toolbarname);
 var sTmp;
 if (goToHtmlMode) {
  sTmp=editor.document.body.innerHTML;    

  editor.document.body.style.fontFamily = 'Courier New, Courier New';
  editor.document.body.style.fontSize = '10pt';
  if (toolbar != null && autohide) {
   toolbar.style.display = 'none';
  }
  editor.document.body.innerText=sTmp;
  return true;
 } else {
  // go to Design Mode
  sTmp=editor.document.body.innerText;
  editor.document.body.style.fontFamily = '';
  editor.document.body.style.fontSize = '';
  if (toolbar != null && autohide) {
   toolbar.style.display = 'inline';
  }
  editor.document.body.innerHTML=sTmp;    
  ftbBody_ApplyEditorStyles(editor);
  editor.focus();
  return true;
 }
}
FTB_HelperFilesPath = '';
FTB_HelperFilesParameters = '';
ftbBody_OverImage = new Image();
ftbBody_OverImage.src = 'images/toolbarbutton.over.gif';
ftbBody_DownImage = new Image();
ftbBody_DownImage.src = 'images/toolbarbutton.down.gif';
ftbBody_Initialize(ftbBody_editor,document.getElementById('ftbBody'));
ftbBody_HtmlMode = false;
ftbBody_HasFocus = false;
ftbBody_editor.document.onkeydown = FTB_ftbBody_onKeyDown_LineBreak;
ftbBody_editor.document.body.onpaste = FTB_ftbBody_onPaste;
</script>
 


一、读者指引

  读者指引帮助你掌握本文的梗概。以免你看了大半才明白这编文章不适合你,给你造成视觉污染。
  如果你正在用ASP写程序,或者你正在写一些诸如BBS、留言溥或表单数据检查之类的东东那就值得一看。

  如果你对正则表达式已经了如指掌,那么你不必一行行的看,只要看看我写的模板,再比较一下,取其精华就行了。
  如果你还是第一次接触正则表达式,那么你最好一行行的看,并逐条试验

  当你熟练的掌握了正则表达式的用法,你就会发现其乐无穷。

二、正则表达式的概念

  什么是UBB代码?什么是正则表达式?

  UBB代码是HTML的一个变种。一般情况下,UBB论坛不允许你使用HTML代码,而只能用UBB代码替代HTML代码。
  UBB代码是一套由流行的UBB标签组成了固定代码,代码有统一的格式。用户只要遵循代码规则就可以实现用户想要的功能。如:
  想要显示粗体的how are you 字样,就应该输入 how are you而不是输入<b>how are you</b>

  你也许会问:ASP是怎样把 how are you转换为<b>how are you</b>的呢?
  回答这个问题就是:用正则表达式。

三、正则表达式的用途

有时我们在制作网站表单数据处理的时候(尤其是UBB论坛),都需要进行数据验证和字符串替代,特别是UBB论坛要进行大量的数据安全性和字符串替代

邮于一般的论坛不支持HTML语法这就使得用户不能修改字体,不能贴图等等一些功能。这样使得论坛失去了吸引用户的一个强有力的途径。可能说一个强大的论坛在吸引用户数量上还是很重要的。这样就出现了一个UBB解决方案,即在论坛不支持HTML语法的情况下用户仍然可以定制自已贴子的样式,贴图,增加链接,转贴网页等等诸多的功能,可能达到支持HTML语法同样的效果,而且这样可以使得论坛相对于HTML的论坛安全性大大提高。用户基本不能对论坛过行任何恶意攻击。

四、正则表达式的语法规则和标记

  现在我们正式进入则表达式的学习,我会根据实例结合讲解正则表达式的用法,看完后你就会觉得写UBB代码如此简单了,只要你一步一步的跟着我学 看完本文章后你就成为UBB高手了。激动人心的就是你能写出自已的UBB标签来了,再也不用到别人那里去拷贝现成的代码和模板了。 还好VBScritp5.0给我们提供了“正则表达式”对象,只要你的服务器安装了IE5.x,就可以运行了.

  字符描述:

  ^符号匹配字符串的开头。例如:
    ^abc 与“abc xyz”匹配,而不与“xyz abc”匹配

  $符号匹配字符串的结尾。例如:
    abc$ 与“xyz abc”匹配,而不与“abc xyz”匹配。
    注意:如果同时使用^符号和$符号,将进行精确匹配。例如:
       ^abc$ 只与“abc”匹配   

  *符号匹配0个或多个前面的字符。例如:
    ab* 可以匹配“ab”、“abb”、“abbb”等

  +符号匹配至少一个前面的字符。例如:
    ab+ 可以匹配“abb”、“abbb”等,但不匹配“ab”。

  ?符号匹配0个或1个前面的字符。例如:
    ab?c? 可以且只能匹配“abc”、“abbc”、“abcc”和“abbcc”

  .符号匹配除换行符以外的任何字符。例如:
    (.)+ 匹配除换行符以外的所有字符串

  x|y匹配“x”或“y”。例如:
    abc|xyz 可匹配 “abc”或 “xyz”,而“ab(c|x)yz”匹配 “abcyz”和“abxyz”

  {n}匹配恰好n次(n为非负整数)前面的字符。例如:
    a{2} 可以匹配“aa“,但不匹配“a”

  {n,}匹配至少n次(n为非负整数)前面的字符。例如:
    a{3,} 匹配“aaa”、“aaaa”等,但不匹配“a”和“aa”。
    注意:a{1,}等价于a+
       a{0,}等价于a*

  {m,n}匹配至少m个,至多n个前面的字符。例如:
    a{1,3} 只匹配“a”、“aa”和“aaa”。
    注意:a{0,1}等价于a?

  [xyz]表示一个字符集,匹配括号中字符的其中之一。例如:
    [abc] 匹配“a”、“b”和“c”

  [^xyz]表示一个否定的字符集。匹配不在此括号中的任何字符。例如:
    [^abc] 可以匹配除“a”、“b”和“c”之外的任何字符

  [a-z]表示某个范围内的字符,匹配指定区间内的任何字符。例如:
    [a-z] 匹配从“a”到“z”之间的任何一个小写字母字符

  [^m-n]表示某个范围之外的字符,匹配不在指定范围内的字符。例如:
    [m-n] 匹配除从“m”到“n”之间的任何字符

  /符号是转义操作符。例如:
    /n 换行符
    /f 分页符
    /r 回车
    /t 制表符
    /v 垂直制表符

    // 匹配“/”
    // 匹配“/”

    /s 任何白字符,包括空格、制表符、分页符等。等价于“[ /f/n/r/t/v]”
    /S 任何非空白的字符。等价于“^/f/n/r/t/v]”
    /w 任何单词字符,包括字母和下划线。等价于“[A-Za-z0-9_]”
    /W 任何非单词字符。等价于“[^A-Za-z0-9_]”

    /b匹配单词的结尾。例如:
      ve/b 匹配单词“love”等,但不匹配“very”、“even”等

    /B匹配单词的开头。例如:
      ve/B 匹配单词“very”等,但不匹配“love”等

    /d匹配一个数字字符,等价于[0-9]。例如:
      abc/dxyz 匹配“abc2xyz”、“abc4xyz”等,但不匹配“abcaxyz”、“abc-xyz”等

    /D匹配一个非数字字符,等价于[^0-9]。例如:
      abc/Dxyz 匹配“abcaxyz”、“abc-xyz”等,但不匹配“abc2xyz”、“abc4xyz”等

    /NUM匹配NUM个(其中NUM为一个正整数),引用回到记住的匹配。例如:
      (.)/1 匹配两个连续相同的字符。

    /oNUM匹配n(其中n为一个小于256的八进制换码值)。例如:
      /o011 匹配制表符

    /xNUM匹配NUM(其中NUM为一个小于256的十六进制换码值)。例如:
      /x41 匹配字符“A”


五、实例分析

1)在字符串中精确查找链接地址

((http|https|ftp):(////|////)((/w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3})(((//[/~]*|//[/~]*)
(/w)+)|[.](/w)+)*(((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*)

我们知道,链接地址一般以http或者https或者ftp等形式出现。初步总结一下就是,链接地址必须符合如下条件:

条件1
 以http://或者https://或者ftp://等开头(当然还有其它形式,这里只列出主要的)

条件2
 http://后面必须跟一个单词字符,紧接着单词字符后面的是"."(这样的组合必须出现一次或多次)。紧跟着“.”后面的是域名后缀(如net或者com或者cn等,如果是以IP地址的形式出现就可以是数字)

条件3
 出现完整的链接地址后,还可以出现下一级或者更多级的目录(还要注意个人主页的地址有可能出现"~"符号)

条件4
 链接地址末尾可以带参数。如典型的页数?PageNo=2&action=display等

现在我们用下面的代码来逐个匹配上面的条件——

1、((http|https|ftp):(////|////) 满足条件1
表示http:// http:// https:// https:// ftp:// ftp://都匹配(在这里考虑了某些用户可能把"//"输成“//”的易发性错误)
注意:"|"表示“或者”,"/"是转义字符。“////”表示"//",“////”表示"//"

2、((/w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3}) 满足条件2
“((/w)+[.]){1,}”表示一个单词字符加一个点号可以出现1次或者多次(这里考虑了某些用户喜欢省略www而将http://www.w3c.com写成http://w3c.com)
“(net|com|cn|org|cc|tv|[0-9]{1,3})”表示必须要以net或者com或者cn或者org或者cc或者tv或者三位以下的数字结束
[0-9]{1,3}表示三位以下的数字,因为ip地址的任何段不能超过255

3、(((//[/~]*|//[/~]*)(/w)+)|[.](/w)+)* 满足条件3
“(//[/~]*|//[/~]*)”表示可以出现"/~"或者是"/~",(其中“[/~]*”表示 ~ 可以出现也可以不出现),因为不是每个链接地址都有下一级目录
“(/w)+)|[.](/w)+)”表示必须出现一个单词字符(即目录或者是一个带有扩展名的文件)
注意:最后还有一个“*”表示上面括号内的可以出现也可以不出现,否则就只能匹配有下一级目录的链接地址了。

4、(((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*)满足条件4
“((([?](/w)+){1}[=]*))*((/w)+){1}”表示形如"?PageNo=2"的字符串可以出现也可以不出现,如果出现则只能出现一次(因为不可能有两个“?”号出现)。

“([/&](/w)+[/=](/w)+)*)”表示形如“&action=display”的字符串可以出现也可以不出现(因为并不是每个网页都带有两个以上的参数。

整个“((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*”表示形如“?PageNo=2&action=display”的字符串可以出现也可以不出现(即链接地址可以有参数也可以没有参数)


把上面的组合起来,我们就可以匹配一个比较全面的链接地址了。比用简单的“(http://///S+)”来匹配一个链接地址要好,读者可以自行行测试比较。当然,这段代码还有很多不足之处,希望大家能够继续改进。

2)替代典型的UBB标签:[/b]
我们的目的就是要把[b]成对的替换成<b></b>下面来看我们实现它的模板
  (/[b/])(.+)(/[//b/])
这里用了"(.+)"来配匹到之间的整个字符串,在替代的时候我们要写成这样
  str=checkexp(re,str,"<b>$2</b>")
(注意:checkexp是我自定义的函数,将在后面给出。这个函数将把[/b]按照我们提供的模板进行替代。)

也许你会问这里出现一个"$2"是什么东东,呵注意了这个$2可是很重要的,它代表了"(.+)"所配匹的整个字符串。
为什么是$2而不是$1、$3呢?因为$1代表(/[b/])所匹配的"[b]"字符串,$3代表(/[//b/])所匹配的""字符串,显然这里我们需要的是$2而不是$1$3。


六)UBB正则表达模板实例
下面是我写的一个UBB函数,这个函数基本上能使你的论坛成为一个优秀的UBB代码论坛了。当然,通过改进后,你可以得到一个更强大的UBB论坛。

Function ReThestr(face,str)
 dim re,str

 re="/>"
 str=checkexp(re,str,"&gt;")

 re="/<"
 str=checkexp(re,str,"&lt;")

 re="/n/r/n/"
 str=checkexp(re,str,"<P>")

 re=chr(32)
 str=checkexp(re,str,"&nbsp;")

 re="/r"
 str=checkexp(re,str," ")

 re="/[img/]((http:(////|////)){1}((/w)+[.]){1,3}(net|com|cn|org|cc|tv)(((//[/~]*|//[/~]*)
(/w)+)|[.](/w)+)*(/w)+[.]{1}(gif|jpg|png))/[//img/]" '查找图片地址
 str=checkexp(re,str," <img src='$1'> ")

 re="/[w/](http:(////|////)((/w)+[.]){1,}(net|com|cn|org|cc|tv)(((//[/~]*|//[/~]*)(/w)+)|[.](/w)+)*
(((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*)/[//w/]" '查找帧地址
 str=checkexp(re,str,"<iframe width='300' height='300' src='$1'></iframe>")

 re="([^('>)])(<br>)*((http|https|ftp):(////|////)((/w)+[.]){1,}(net|com|cn|org|cc|tv|([0-9]{1,3}))(((//[/~]*|//[/~]*)(/w)+)|[.](/w)+)*(((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*)" '查找链接地址
 str=checkexp(re,str,"$1$2 <a href='$3' target=_blank>$3</a> ")

 re="([^(http://|http://)])((www|cn)[.](/w)+[.]{1,}(net|com|cn|org|cc)(((//[/~]*|//[/~]*)(/w)+)|[.](/w)+)*
(((([?](/w)+){1}[=]*))*((/w)+){1}([/&](/w)+[/=](/w)+)*)*)" '查找不以http://开头的地址
 str=checkexp(re,str,"$1 <a href='http://$2' target=_blank>$2</a> ")

 re="([^(=)])((/w)+[@]{1}((/w)+[.]){1,3}(/w)+)" '查找邮件地址
 str=checkexp(re,str," <a href='mailto:$2'>$2</a> ")

 re="/[0-F]{6})/]((.)+)/[//color/]" '替换字体色彩
 str=checkexp(re,str,"<font color='$1'>$4</font>")

 re="/[size=([0-9]{1})/]((.)+)/[//size/]" '替换字体大小
 str=checkexp(re,str,"<font size='$1'>$2</font>")

 re="/((.)+)/[//font/]" '替换字体
 str=checkexp(re,str,"<font face='$1'>$3</font>")

 re="(/[b/])(.+)(/[//b/])" '加粗字体
 str=checkexp(re,str,"<b>$2</b>")

 re="(/[u/])(.+)(/[//u/])" '下画线
 str=checkexp(re,str,"<u>$2</u>")

 re="(/[li/])(.+)(/[//li/])" '列表
 str=checkexp(re,str,"<li>$2</li>")

 re="(/[QUOTE/])(.+)(/[//QUOTE/])" '引用
 str=checkexp(re,str,"<BLOCKQUOTE>引用:<HR SIZE=1>$2<HR SIZE=1></BLOCKQUOTE>")

 re="/[email=((/w)+[@]{1}((/w)+[.]){1,3}(/w)+)/](.+)(/[//email/])" '邮件
 str=checkexp(re,str,"<a href=mailto:$1>$6</a>")

 re="(/[center/])(.+)(/[//center/])" '居中
 str=checkexp(re,str,"<center>$2</center>")

 re="fuck"
 str=checkexp(re,str,"***")

 re="操"
 str=checkexp(re,str,"***")

 re="sex"
 str=checkexp(re,str,"***")

 re="TMD"
 str=checkexp(re,str,"***")

 re="shit"
 str=checkexp(re,str,"***")

 ReThestr=str
end function

UBB代码如下:[i] [/i] [u] [/u] [url] [/url] [email=] [/email] [img][/img] [li][/li] [font=impact] [color=Yellow]  [img][/img] [b][/b]

七)ASP正则表达式对像函数如下:
Function CheckExp(patrn,strng,tagstr)
 Dim regEx,Matches

 Set regEx=New RegExp'建立一个新对像
 regEx.Pattern=patrn'设置模板
 regEx.IgnoreCase=true'搜索是否区分大小写的 true表是不区分 flase表示区分
 regEx.Global=True'搜索是否应用于整个字符串

 Matches=regEx.replace(strng,tagstr)'匹配并替代字符串

 CheckExp=Matches返回函数结果
end function


把上面的两个函数存为一个页面(如ubbcode.asp),这样就组成一个完整的UBB函数了。
在你的论坛上加上这个函数,就成了支持UBB代码的论坛了。只要在用时调用这个函数就行了。调用形式如
 text=ReThestr(text)



    摘要:UBB(c#完整版)     (全文共25017字)——点击此处阅读全文

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

bbs2000燕衔泥UBB论坛.zip

  • 2012-01-11 13:26
  • 119KB
  • 下载

C#绘制条码CODE39和CODE39全码模式

http://blog.csdn.net/zgke/article/details/3503845     C#绘制Code39和Code39全码模式 BarCode:Code39.cs u...

全码输入法

  • 2006-03-16 00:00
  • 486KB
  • 下载

全码输入法

  • 2006-03-16 00:00
  • 486KB
  • 下载

C# 获取汉语拼音全码及简码

C# 获取汉语拼音全码及简码,代码如下: public static class SpellCodeHelper { public static string GetChi...

javaLiu全码

  • 2012-03-18 11:05
  • 2.06MB
  • 下载

SIM全码破解V1.8版

  • 2010-06-12 22:53
  • 397KB
  • 下载

学习struts2建bbs总结四:解决jsp/action中文传值乱码问题

我在测试的过程中,发现当发帖(前面说的postAction)时候,以及当url传值有中文时,都有乱码现象。看了许多网上的文章,大致有下面3种解决方案: 1、struts2的版本太低 2、利用前文说...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)