<%guidedisplay=1%>
<!--#include file="admin_start.asp" -->
<!--#include file="edit/fonts.asp" -->
<!--#include file="edit/edit_html.asp" -->
<%
session("FB_EM_1_SQL_c")=request.form("c")
%>
<scrip src="edit/edit_html.js" type="text/javascript"></script>

<body style="background-color:#f7f7f7 ">
<form name='form1' method="post" action=admin_edit_html_prev.asp target=_blank>
<table cellpadding="3" cellspacing="1" border="0" width="100%" align=center style='background-color:#ffffff;border:1px dashed #808080 '>
    <tr> 
      <td>
	  <select name="selectFont" onChange="FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);document.form1.selectFont.options[0].selected = true;"  style="font-family: 宋体; font-size: 9pt" onMouseOver="window.status='选择选定文字的字体。';return true;" onMouseOut="window.status='';return true;">
         <option selected>选择字体</option>
		 <%font%>
      </select> 

	  <select name="selectColour" onChange="FormatText('ForeColor',selectColour.options[selectColour.selectedIndex].value);document.form1.selectColour.options[0].selected = true;" onMouseOver="window.status='选择选定文字的颜色。';return true;" onMouseOut="window.status='';return true;">
         <option value="0" selected>选择文字颜色</option>
		 <%color%>
      </select> 
	  
	  <select name="selectbgColour" onChange="FormatText('BackColor',selectbgColour.options[selectbgColour.selectedIndex].value);document.form1.selectbgColour.options[0].selected = true;" onMouseOver="window.status='选择选定文字的背景颜色。';return true;" onMouseOut="window.status='';return true;">
         <option value="0" selected>选择文字背景颜色</option>
		 <%color%>
      </select> 
	  
	  <select language="javascript"  id="FontSize" title="字号大小" onChange="FormatText('fontsize',this[this.selectedIndex].value);" name="select" onMouseOver="window.status='选择选定文字的字号大小。';return true;" onMouseOut="window.status='';return true;">
         <option selected>文字字号 
          <option value="7">一号 
          <option value="6">二号 
          <option value="5">三号 
          <option value="4">四号 
          <option value="3">五号 
          <option value="2">六号 
          <option value="1">七号</option>
      </select>
	  
      </td>
    </tr> 
	
    <tr> 
      <td>
<!-- edit bar start //-->
		<img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/selectall.gif" align="absmiddle" border="0" alt="全部选择" onClick="FormatText('selectall')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/cut.gif"  align="absmiddle" onClick="FormatText('cut')" style="cursor: hand;" alt="剪切"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)"src="images/edit/copy.gif"  align="absmiddle" onClick="FormatText('copy')" style="cursor: hand;" alt="复制"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/paste.gif"  align="absmiddle" onClick="FormatText('paste')" style="cursor: hand;" alt="粘贴"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/DELETE.gif" align="absmiddle" border="0" alt="删除" onClick="FormatText('DELETE')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/undo.gif" align="absmiddle" border="0" alt="撤消" onClick="FormatText('undo')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/redo.gif" align="absmiddle" border="0" alt="恢复" onClick="FormatText('redo')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/bold.gif" align="absmiddle" alt="粗体" onClick="FormatText('bold', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/italic.gif" align="absmiddle" alt="斜体" onClick="FormatText('italic', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/underline.gif" align="absmiddle" alt="下划线" onClick="FormatText('underline', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/ALEFT.gif" align="absmiddle" onClick="FormatText('Justifyleft', '')" style="cursor: hand;" alt="左对齐"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/center.gif" align="absmiddle" border="0" alt="居中" onClick="FormatText('JustifyCenter', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/aright.gif" align="absmiddle" onClick="FormatText('JustifyRight', '')" style="cursor: hand;" alt="右对齐"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/list.gif" align="absmiddle" border="0" alt="项目符号" onClick="FormatText('InsertUnorderedList', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/number.gif" align="absmiddle" alt="编号" border="0" onClick="FormatText('insertorderedlist', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/outdent.gif" align="absmiddle" onClick="FormatText('Outdent', '')" style="cursor: hand;" alt="回退"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/indent.gif" align="absmiddle" border="0" alt="缩进" onClick="FormatText('indent', '')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/line.gif" align="absmiddle" alt="普通水平线" border="0" onClick="FormatText('InsertHorizontalRule', '')"  style="cursor: hand;"> 
		<img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/line.gif" align="absmiddle" alt="特殊水平线" border="0" onClick="hr()"  style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/link.gif" align="absmiddle" border="0" alt="超级链接" onClick="FormatText('createLink')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/unlink.gif" align="absmiddle" border="0" alt="取消超级链接" onClick="FormatText('unLink')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/sup.gif" align="absmiddle" border="0" alt="上标" onClick="FormatText('superscript')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/sub.gif" align="absmiddle" border="0" alt="下标" onClick="FormatText('subscript')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/clear.gif" align="absmiddle" border="0" alt="删除文字格式" onClick="FormatText('RemoveFormat')" style="cursor: hand;"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/FIELDSET.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入栏目框" language="javascript" onClick="FIELDSET()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/iframe.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入网页" language="javascript" onClick="iframe()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/table.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入表格" language="javascript" onClick="fortable()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/swf.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入FLASH" language="javascript" onClick="swf()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/mp.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入视频文件，支持格式为：avi、wmv、asf" language="javascript" onClick="wmv()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/real.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入RealPlay文件，支持格式为：rm、ra、ram" language="javascript" onClick="rm()"> 
        <img vspace='2' hspace="2" onMouseDown="Check(this,2)" onMouseOver="Check(this,1)" onMouseOut="Check(this,0)" onMouseUp="Check(this,1)" src="images/edit/image.gif" align="absmiddle" border="0" style="cursor:hand;" alt="插入网上图片，支持格式为：gif、jpg、png、bmp" language="javascript" onClick="pic()">	
<!-- edit bar end //-->
     </td>
    </tr> 
</table>
<br>
<table cellpadding="3" cellspacing="1" border="0" width="100%" align=center style='border:1px dashed #808080 '>
    <tr> 
      <td>
	<iframe src="../admin_edit_html_ini.asp" name="source" id="message" width="100%" height="400" onload='source.document.designMode = "On";'></iframe>
	<script language="javascript" >

	//frames.message.document.designMode = "On";

	function replaceAll(text,replacement,target){ 
		if(text==null || text=="") return text;//如果text无内容,返回text 
		if(replacement==null || replacement=="") return text;//如果replacement无内容,返回text 
		if(target==null) target="";//如果target无内容,设置为空串 
		var returnString="";//定义返回值变量,并初始化 
		var index=text.indexOf(replacement);//定义查找replacement的索引下标,并进行第一次查找 
		while(index!=-1) 
		{//直至未找到replacement,要么进行下面的处理 
		//alert(index); 
		//alert(returnString); 
		returnString+=text.substring(0,index)+target;//如果找到的replacement前有字符,累加到返回值中,并加上target 
		text=text.substring(index+replacement.length);//取掉找到的replacement及前边的字符 
		index=text.indexOf(replacement);//进行查询,准备下一次处理 
		} 
		if(text!="") returnString+=text;//如果找到的最后一个replacement后有字符,累加到返回值中 
		return returnString;//返回 
	} 

	///////////////////////////////////////////////////////////////
	<%
	n=Request.ServerVariables("SERVER_NAME")
	p=split(request.servervariables("PATH_INFO"),"/")
	for ii=0 to ubound(p)-2
	if ii=0 then pp=p(ii) else pp=pp&"/"&p(ii)
	next
	pp=n+pp
	%>
	
	function send(){
	    //var dd;
		if(checkdata()){
				
		dd=frames.message.document.body.innerHTML;
		
		opener.document.<%=request("formname")%>.<%=request("inputname")%>.value=replaceAll(dd,'http://<%=pp%>/','');
		//alert(opener.<%=request("formname")%>.<%=request("inputname")%>.value)
		
		opener.focus();
		window.close();
		}
	}
	</script>
      </td>
    </tr>
	 
    <tr> 
      <td>
	  <input onClick="setMode(this.checked);" name="viewhtml" type="checkbox" value="ON">
        查看HTML源代码
      </td>
    </tr>
</table>
<table cellpadding="3" cellspacing="1" border="0" width="100%" align=center >
    <tr> 
      <td align=center>
	  <input type="hidden" name=content >
	  <input type="submit" value="预览效果！" onclick='javascript:document.form1.content.value=frames.message.document.body.innerHTML;form1.submit'>
	  <input type="button" value="提 交！" onclick='send()'>
	  <input type="reset" value="重置">
      </td>
    </tr>
</table>
</form>
</body>
<!--#include file="admin_end.asp" -->