<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditDoc.aspx.cs" Inherits="System_EditDoc" validateRequest="false"%>
<%@ Import Namespace="Spaces" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>
    <meta name="vs_defaultClientScript" content="JavaScript">
    <style type="text/css"> <!-- A:LINK {Text-Decoration: none; color:#ffffff;}
	A:VISITED {Text-Decoration: none; color:#ffffff;}
	A:Active {Text-Decoration: none; color:#ffffff;}
	A:HOVER {Text-Decoration: none; color:#000000;}
	.txt0 { border: 0px groove; background-color: #eeeeee; FONT-FAMILY: "宋体","宋体"; font-size: 12px; letter-spacing: 1px; word-spacing: 2px; line-height: 130%; padding-left: 10px; }
	.txt1 { border: 0px groove; background-color: #eeeeee; font-family: "宋体", "宋体", "宋体"; font-size: 12px; letter-spacing: 1px; word-spacing: 2px; line-height: 130%; padding-left: 10px; }
	.txt2 { border: 0px groove; background-color: #eeeeee; FONT-FAMILY: "Georgia", "Times New Roman", "Times", "serif"; font-size: 12px; letter-spacing: 1px; word-spacing: 2px; line-height: 130%; padding-left: 10px; }
	.txt3 { border: 0px groove; background-color: #eeeeee; FONT-FAMILY: "mono","宋体", "Tahoma"; font-size: 12px; letter-spacing: 1px; word-spacing: 2px; line-height: 130%; padding-left: 10px; }
	.txt4 { border: 0px groove; background-color: #eeeeee; FONT-FAMILY: "Arial","Helvetica", "san-serif","Geneva", "宋体_GB2312"; font-size: 12px; letter-spacing: 1px; word-spacing: 2px; line-height: 130%; padding-left: 10px; }
	body,td{FONT-SIZE: 10pt;}
	--></style>

    <script language="JavaScript">
	<!--
	// 行号部分
	var rows=0;
	function addrows()
		{
		var keys=event.keyCode;
		if(keys==13)
				{rows++;
				rowsnum.innerHTML+='<font size=1 color=red>'+rows+'</font><br>';
				}
		}
	function showRowNumber()
	{
	
	 var text=window.form2.content.innerText;
	 var i=0;
	 var rows=0;
	 alert(text.length);
	  for(i=0;i<text.length;i++)
	  {
	   if(text[i]=='\n')
	   {
	   rows++;
	   rowsnum.innerHTML+=rows+'<br>';
	   }
	  }
	}
-->
    </script>

    <script language="JavaScript">
<!-- 
 function chkEncrypt()
 {
    if(window.form2.DesKey.value=='')
    {
     alert('请输入用户密匙！');
     return false;
    }
  if(window.form2.DesKey.value.length!=8)
  {
     alert('用户密匙只能是8位！');
     return false;
   }
   
   var ch=window.form2.DesKey.value;
  var Digit = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ-_";
            for (i = 0; i < ch.length; i++)
            {
                if (Digit.indexOf(ch.charAt(i)) == -1)
                {
                    alert('用户密匙只能使用数字、字母、下划线！出错字符'+ch.charAt(i));
                    return false;
                }
            }
            window.form2.OptType.value='encrypt';
            return true;

 }
function encrypt()
{
var openmenum=window.openmenu.value
	if (openmenum!="5")
		{
var info =		"   <table  cellspacing=\"0\" bordercolordark=\"#eeeeee\" cellpadding=\"0\" width=\"100%\""	+"\n"+
		"                            bgcolor=\"#D4D0c8\" bordercolorlight=\"#999999\" border=\"1\">"	+"\n"+
		"                           <TR>"	+"\n"+
		"									<TD height=\"20\" align=\"center\">加密文档:<input type=\"radio\" name=\"m\" checked value=\"1\">解密文档:<input type=\"radio\" name=\"m\" value=\"2\"></TD>"	+"\n"+
		"								</TR>"	+"\n"+
		"								<TR>"	+"\n"+
		"									<TD height=\"20\" align=\"center\">用户密匙： <INPUT class=\"lineform\" id=\"DesKey\" type=\"text\" name=\"DesKey\">  <input type=\"submit\" value=\" O K \" onclick=\"return chkEncrypt();\">&nbsp;<BR>"	+"\n"+
		"										(注:密匙只能为8位，请牢记，丢失后您将无法还原文档)</TD>"	+"\n"+
		"								</TR>"	+"\n"+
		"                        </table>";

window.replaceTEXT.innerHTML=info;
window.openmenu.value="5";
}else
{
closethis();
}
}

function popupwin()
	{
	if (document.form2.content=="")
	{window.parent.close();}
	else
	{window.parent.focus();}
	}
function Rep() //打开文本替换操作窗口
	{var openmenum=window.openmenu.value
	if (openmenum!="1")
		{
		var imgPath="<%=Globals.ApplicationPath%>/Images/<%=Globals.ApplicationPath%>/Images/Pic/";
		var info =		"<table width='100%' height='100%' border='1' align='center' cellpadding='0' cellspacing='0' bordercolorlight='#666666' bordercolordark='#eeeeee' bgcolor='#D4D0c8'>"	+"\n"+
			"      <tr> "	+"\n"+
			"        <td height='20' class=''>&nbsp;&nbsp;查找内容 :</td>"	+"\n"+
			"      </tr>"	+"\n"+
			"      <tr align='left' valign='middle'> "	+"\n"+
			"        <td align='center' valign='middle' class=''><textarea name='repLeft' class='tx' id='textarea4' style='width:95%;height:40'></textarea></td>"	+"\n"+
			"      </tr>"	+"\n"+
			"      <tr align='left' valign='middle'> "	+"\n"+
			"       <td height='20' align='left' valign='middle' class=''>&nbsp;&nbsp;替换为: </td>"	+"\n"+
			"      </tr>"	+"\n"+
			"      <tr align='left' valign='middle'> "	+"\n"+
			"        <td align='center' valign='middle' class=''><textarea name='repMid' class='tx' id='textarea5' style='width:95%;height:40'></textarea></td>"	+"\n"+
			"      </tr>"	+"\n"+
			"      <tr align='left' valign='middle'> "	+"\n"+
			"       <td height='25' valign='top' class=''>&nbsp;&nbsp;最后单词: "	+"\n"+
			"      <input type='text' name='repRight' id='repRight2' style='width:70' class='tx'> "	+"\n"+
			"      <input type='checkbox' name='isRemove' id='isRemove' value='y' checked>替换文本&nbsp;&nbsp;"	+"\n"+
			"      <img src='<%=Globals.ApplicationPath%>/Images/Pic/1rep.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep_h.gif';\"  onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep_d.gif';\" name='repss' align=absmiddle alt='执行替换' onClick='ReplaceTEXT();'>"	+"\n"+
			"      <img src='<%=Globals.ApplicationPath%>/Images/Pic/1undo.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1undo_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1undo.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1undo_d.gif';\" name='undos' align=absmiddle alt='撤消替换' onClick='Undo();'>&nbsp;"	+"\n"+
			"<img src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_d.gif';\" name='exitss' align=absmiddle alt='关闭替换' onclick='closethis();'></td>"	+"\n"+
			"      </tr>"	+"\n"+
			"    </table>";
			window.replaceTEXT.innerHTML=info;
			window.openmenu.value="1";}
	else
		{
		 closethis();
		}
	}

function selectcodepage() //选择创建代码文件类型
	{
	var openmenum=window.openmenu.value
	if (openmenum!="2")
		{var info =		"    <table width='100%' height='100%' border='1' align='center' cellpadding='0' cellspacing='0' bordercolorlight='#666666' bordercolordark='#eeeeee' bgcolor='#D4D0c8'>"	+"\n"+
				"      <tr> "	+"\n"+
				"        <td height='20' align='left' valign='middle' class=''>&nbsp;&nbsp;&nbsp;选择代码类型:(<img src=\"<%=Globals.ApplicationPath%>/Images/Pic/refreshiron.gif\" onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/refreshiron_h.gif';\" onMouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/refreshiron.gif';\" alt=\"刷新当前目录\" style=\"cursor: hand;\"  onClick='refreshframe(0);' align='absmiddle'>&nbsp;<span title=\"刷新当前目录\" onclick='refreshframe(0);' style='cursor:hand;' ><font color=#0000ff>刷新当前路径:</font></span>)</td>"	+"\n"+
				"      </tr>"	+"\n"+
				"      <tr align='left' valign='middle'> "	+"\n"+
				"        <td align='left' valign='middle' class=''>"	+"\n"+
				"		&nbsp;<input type='radio' name='radiocode' value='10' onclick=\"MkCodeFile('newtxtHTML.html','10');\">HTML Page<br>"	+"\n"+
				"         &nbsp;<input type='radio' name='radiocode' value='11' onclick=\"MkCodeFile('newtxtASPv.asp','11');\">ASP /Vbscript<br>"	+"\n"+
				"         &nbsp;<input type='radio' name='radiocode' value='12' onclick=\"MkCodeFile('newtxtASPj.asp','12');\">ASP /JavaScript<br>"	+"\n"+
				"		  &nbsp;<input type='radio' name='radiocode' value='13' onclick=\"MkCodeFile('newtxtC.aspx','13');\">ASP.NET /C#<br>"	+"\n"+
				"		  &nbsp;<input type='radio' name='radiocode' value='14' onclick=\"MkCodeFile('newtxtVB.aspx','14');\">ASP.NET /VB<br>"	+"\n"+
				"		  &nbsp;<input type='radio' name='radiocode' value='15' onclick=\"MkCodeFile('newtxtXML.xml','15');\">XML Page<br>"	+"\n"+
				"		  &nbsp;<input type='radio' name='radiocode' value='18' onclick=\"MkCodeFile('newtxt.txt','18');\">TXT document"	+"\n"+
				"&nbsp;&nbsp;&nbsp;&nbsp;<img src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_d.gif';\" name='exitss' align=absmiddle alt='关闭选择' onclick='closethis();'></td>"	+"\n"+
				"      </tr>"	+"\n"+
				"    </table>"	
				window.replaceTEXT.innerHTML=info;
				window.openmenu.value="2";}
	else
		{
		 closethis();
		}
	}

function HtmltoJS()
	{var openmenum=window.openmenu.value
	if (openmenum!="3")
		{var info = "<table align=center width='100%' height='100%' border='1' align='center' cellpadding='0' cellspacing='0' bordercolorlight='#666666' bordercolordark='#eeeeee' bgcolor='#D4D0c8'>"+"\n"+
				"<TR><TD align=center><textarea name=code id=code rows=10 style='width:90%;' class=tx>"	+"\n"+
				"&nbsp;&nbsp;</textarea>"	+"\n"+
				"</td></tr><tr><td height=26 align=center>"+"\n"+
				"<img src=\"<%=Globals.ApplicationPath%>/Images/Pic/1tojs.gif\" width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs_d.gif';\" name=\"rereloadfile\" align=absmiddle alt=\"执行转换\" onclick=toScript(document.all['code'])>&#160;"+"\n"+
				" <img src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre_d.gif';\"  name='Previews' align=absmiddle alt='运行该代码' onclick=runCode(1)>&#160;"	+"\n"+
				" <img src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif' width=22 height=22 onmouseover=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_h.gif';\" onmouseout=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit.gif';\" onmousedown=\"this.src='<%=Globals.ApplicationPath%>/Images/Pic/1exit_d.gif';\" name='exitss' align=absmiddle onclick=closethis() alt='关闭转换'>"	+"\n"+
				"</TD></TR></TABLE>";
				window.replaceTEXT.innerHTML=info;
				window.openmenu.value="3";}	
	else
		{
		 closethis();
		}
	}

function closethis() //关闭选择菜单
	{
	window.replaceTEXT.innerHTML="";
	window.openmenu.value="off";
	}

//-->
    </script>

    <script language="JavaScript">
<!--

function toScript(val)
{
	var value = val.value;
	var A="\\"+"\"";
	var B="\\"+"\'";
	value  = value.replace(/"/gi,A).replace(/'/gi,B);
	valArr = value.split("\r\n");
	value="<span id=innerCode1>&nbsp;</span>\n"
	value+="<"+"SCRIPT LANGUAGE=\"JavaScript\">\n"+"<!--"+"\n";
	
	for (i=0; i<valArr.length; i++)
	{
		value += (i==0) ? "info =" : "";
		value += "		\"" + valArr[i];
		value += (i!=valArr.length-1) ? "\"	+\"\\n\"+\n" : "\";\n" ;
	}
	value+="\n//document.write(info);";
	value+="\nwindow.innerCode1.innerHTML=info;";
	value+="\n//--> "+"\n"+"<"+"/SCRIPT>"; val.value = value; } //--> </script>

    <script language="JavaScript"> 
<!--
	function refreshframe(num) //刷新左框架目录同步当前于编辑文件位置
		{var obj=document.form2;
		if(window.parent.leftFrame)
		window.parent.leftFrame.location.href='getFolders.asp?path=/';
		if(window.parent.bottomFrame)
		window.parent.bottomFrame.location.href='getFiles.asp?path=/';
		if(!obj.content.value)return;
		if(num==1)OpenFile(); //num==1 则reload 当前文件
		}
	
	function reloadfile() //重新读入当前编辑文件,同步刷新当前编辑文件目录
		{
		var obj=document.form2;
		if(!obj.content.value)return;
		if(!confirm('确定要重载入当前文件吗?'))return;
		if(window.parent.leftFrame){window.parent.leftFrame.location.href='getFolders.asp?path=/';}
		if(window.parent.bottomFrame){window.parent.bottomFrame.location.href='getFiles.asp?path=/';}
		OpenFile();
		}
	function runCode(num)  //运行代码HTML
		{
		 // var code=event.srcElement.parentElement.children[0].value;
		  if(num==1){var code=window.form2.code.innerText;}
		  if(num==0){var code=window.form2.content.innerText;}
		  var newwin=window.open('','','');
		  newwin.opener = null
		  newwin.document.write(code);
		  newwin.document.close();
		}
 	function runASPcode() //运行ASP脚本代码 写当前目录位置，重定向当前代码文件
		{
		var obj;
		obj=document.form2;
		var runurl='';
		var str='ASPreview.asp';
		if(!str)return;
		if(obj.content.value=="")return;
		obj.action=runurl+'&Action=runASPcode&to='+str;
		obj.target='_blank'
		obj.submit();
		}
	function MkCodeFile(newdocs,op) //建立脚本文件，op制定建立类型id标识
		{
		var obj=document.form2;
		var thebaseurl='';
		var baseurldir='';
		str=prompt('新建文本文件:',newdocs)
		if(!str)return;
		if(obj.filepath1.value=="") //给定选择路径不存在为空值
			{
			obj.action=thebaseurl+'?path='+baseurldir+'&Action=MkCodeFile&Option='+op+'&to='+str;
			}
		else
			{
			obj.action=thebaseurl+'?path='+obj.filepath1.value+'&Action=MkCodeFile&Option='+op+'&to='+str;
			}
		obj.submit();
		}
 -->
    </script>

    <script language="JavaScript"> 
<!--
	function getfile()  //浏览读取文件,option=6 标识读取后返回当前窗口
		{
		//var obj=document.form2;
		if (confirm("打开新文件之前是否保存现有文档？")){
					SaveFile();
				}else{
					 window.location.href='<%=Globals.GetSiteUrls().UserDisk(Account,DirectoryID) %>';
				}
		
		}

	function aboutme()
		{
		window.showModalDialog("about:blank","","dialogWidth:300px;dialogHeight:400px;dialogleft:200;dialogtop:200;scroll:no;status:no;help:no");
		}
-->
    </script>

    <script language="JavaScript"> 
<!--
var lg_strback;
lg_strback='';

function OpenFile() //打开当前文件
	{	var obj=document.form2;
		if(!obj.filepath.value)
			{
			alert('请输入文件路径!');
			return;
			}
			alert('该版本暂不支持!');
			return false;
		//obj.action='editdoc.aspx?Action=OpenIt&name='+document.form2.filepath.value;
		obj.submit();
	}

function SaveFile() //保存当前文件
	{	var str;
		var obj=document.form2;
		obj.OptType.value='save';
		obj.submit();
		/*var filename=obj.filename1.value;
		if(!obj.filepath.value)
			{
			alert('请输入文件路径!');
			return;
			}
		else if(!filename)
			{
			if (!obj.content.value)return;
			filename='newdocument.txt';
			str=prompt('另存文件',obj.filepath1.value+filename)
			if(!str)return;
			obj.action='editdoc.aspx?Action=SaveIt&Option=5&name='+str;
			}
		else	
			{obj.action='editdoc.aspx?Action=SaveIt&Option=5&name='+document.form2.filepath.value;}
		obj.submit();
		*/
	}

function SaveItAs() //另存到当前选定的目录位置文件
	{
		var str;
		var obj=document.form2
		var filename=obj.filepath.value;
		if (filename==''){filename='新件文件.txt';}
			str=prompt('另存文件:',filename)
			if(!str)return;
			if(str==filename)
			 {
			   alert('文档没有保存，新文件名和原文件名完全一样！');
			   return;
			 }
			 obj.fileAsName.value=str;
		obj.OptType.value='saveas';
		obj.submit();
	}

function Undo() //undo替换操作
	{
	var str;
	if(lg_strback=='')
	{alert('无撤消数据，不能退回上一步');return;}
	str=window.form2.content.innerText;
	window.form2.content.innerText=lg_strback;
	lg_strback=str;
	}

function ReplaceTEXT() //编辑区文本替换
	{
	var i1,i2,str,strLeft,strRight,strMid;
	strLeft=window.form2.repLeft.innerText;
	strRight=window.form2.repRight.value;
	strMid=window.form2.repMid.innerText;
	str=window.form2.content.innerText;
	lg_strback=str;
	i1=0;
	i2=0;
	if(strLeft=='')
	return;
	if(strRight=='')
		{
		strMid=Repit(strMid,'[$]',strLeft);
		str=Repit(str,strLeft,strMid);
		}
	else
	while(1)
		{
		i1=str.indexOf(strLeft,i1);
		if(i1<0)
		break;
		i2=str.indexOf(strRight,i1+strLeft.length);
		if(i2<0)
		break;
		str1=str.substring(i1+strLeft.length,i2);
		str2=Repit(strMid,'[$]',str1);
		str1=strLeft+str1+strRight;
		if(!window.form2.isRemove.checked)
			{
			str2=strLeft+str2;
			str=str.replace(str1,str2+strRight);
			}
		else
			str=str.replace(str1,str2);
		i1+=str2.length;
		}
	window.form2.content.innerText=str;
	}

function Repit(mstr,sstr,tstr)
	{
	var i;
	i=0;
	if(mstr==''||sstr=='')
	return '';
	while(1)
		{
		i=mstr.indexOf(sstr,i);
		if(i<0)break;
		mstr=mstr.replace(sstr,tstr);
		i+=tstr.length;
		}
	return mstr;
	}
	-->
    </script>

    <script language="JavaScript"> 
<!--
function editTab() //table键缩排,Ctrl+Break 选择区域反向缩排
{if (form2.TabKeyON.value==1) 
	{
	var code, sel, tmp, r;
	var tabs="";
	event.returnValue = false;
	sel =event.srcElement.document.selection.createRange();
	r = event.srcElement.createTextRange();

	switch (event.keyCode)
	{
	case (8) :
		if (!event.ctrlKey)
			{
			event.returnValue = true;
			return;
			}
		code = sel.text;
		tmp = sel.duplicate();
		tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
		sel.setEndPoint("startToStart", tmp);
		sel.text = sel.text.replace(/^\t/gm, "");
		code = code.replace(/^\t/gm, "").replace(/\r\n/g, "\r");
		r.findText(code);
		r.select();
		break;
	case (9) :
		if (sel.getClientRects().length > 1)
			{
			code = sel.text;
			tmp = sel.duplicate();
			tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
			sel.setEndPoint("startToStart", tmp);
			sel.text = "\t"+sel.text.replace(/\r\n/g, "\r\t");
			code = code.replace(/\r\n/g, "\r\t");
			r.findText(code);
			r.select();
			}
		else
			{
			sel.text = "\t";
			sel.select();
			}
		break;
	case (13) :
		tmp = sel.duplicate();
		tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
		tmp.setEndPoint("endToEnd", sel);

		for (var i=0; tmp.text.match(/^[\t]+/g) && i<tmp.text.match(/^[\t]+/g)[0].length; i++)
		tabs += "\t";
		sel.text = "\r\n"+tabs;
		sel.select();
		break;
		default  :
		event.returnValue = true;
		break;
		}
	}
}
-->
    </script>

</head>
<body text="#000000" bottommargin="0" bgcolor="#d4d0c8" leftmargin="0" topmargin="0" scroll="no" rightmargin="0">
   <form style="margin: 0px" name="form2"  action="" method="post">  
 
   <table id="tds" height="100%" cellspacing="0" bordercolordark="#eeeeee" cellpadding="0"
        width="100%" align="center" bordercolorlight="#666666" border="0">
        
            <tbody>
                <tr>
                    <td colspan="2" height="30">
                        <table id="tds1" cellspacing="0" bordercolordark="#eeeeee" cellpadding="0" width="100%"
                            bgcolor="#cacaca" bordercolorlight="#999999" border="1">
                            <tr bgcolor="#c4c0b9">
                                <td  bgcolor="#d4d0c8" height="30">
                                    &nbsp; 文件:
                                    <input class="tx" id="filepath" style="width: 15%; height: 20px" readonly type="text"
                                        maxlength="50" size="1" name="filepath" runat="server">
                                    <input id="filepath1" type="hidden" name="filepath1" runat="server">
                                    <input id="filename1" type="hidden" name="filename1" runat="server">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1open_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1open_h.gif';"
                                        onclick="getfile();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1open.gif';" height="22" alt="浏览读取文件"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1open.gif" width="22" align="absMiddle" name="opens">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1save_d.gif';" id="saves" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1save_h.gif';"
                                        onclick="SaveFile();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1save.gif';" height="22" alt="存当前文件"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1save.gif" width="22" align="absMiddle" name="saves">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1saveas_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1saveas_h.gif';"
                                        onclick="SaveItAs();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1saveas.gif';" height="22" alt="另存新文件"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1saveas.gif" width="22" align="absMiddle" name="saveas">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre_h.gif';"
                                        onclick="runCode(0);" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre.gif';" height="22" alt="运行HTML代码"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1HtmPre.gif" width="22" align="absMiddle" name="Previews">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1Aspre_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1Aspre_h.gif';"
                                        onclick="encrypt();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1Aspre.gif';" height="22" alt="加密文件"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1Aspre.gif" width="22" align="absMiddle" name="ASPreviews">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1refresh_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1refresh_h.gif';"
                                        onclick="refreshframe(0);" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1refresh.gif';" height="22"
                                        alt="刷新当前文档目录" src="<%=Globals.ApplicationPath%>/Images/Pic/1refresh.gif" width="22" align="absMiddle" name="refreshFolder">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1reload_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1reload_h.gif';"
                                        onclick="reloadfile();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1reload.gif';" height="22"
                                        alt="重读入当前文档，刷新当前文档目录" src="<%=Globals.ApplicationPath%>/Images/Pic/1reload.gif" width="22" align="absMiddle" name="rereloadfile">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep_h.gif';"
                                        onclick="Rep();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1rep.gif';" height="22" alt="替换编辑内容"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1rep.gif" width="22" align="absMiddle" name="reps">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs_h.gif';"
                                        onclick="HtmltoJS();" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1tojs.gif';" height="22" alt="将HTML转为JS变量"
                                        src="<%=Globals.ApplicationPath%>/Images/Pic/1tojs.gif" width="22" align="absMiddle" name="rereloadfile">
                                    <img onmousedown="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1new_d.gif';" onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1new_h.gif';"
                                        onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/1new.gif';" height="22" alt="建新文件" src="<%=Globals.ApplicationPath%>/Images/Pic/1new.gif"
                                        width="22" align="absMiddle" name="opens">
                                    <select class="tx" onchange="if(this.options[this.selectedIndex].value!=''){form2.content.className=this.options[this.selectedIndex].value;}"
                                        name="FontFlag">
                                        <option value="" selected>改变字体选项</option>
                                        <option value="txt0">MS Shell Dlg</option>
                                        <option value="txt1">Courier New</option>
                                        <option value="txt2">New Roman</option>
                                        <option value="txt3">宋体</option>
                                        <option value="txt4">黑体</option>
                                    </select>
                                    &nbsp;<span title="tab正向缩进,Ctrl+breakSpace反向缩进">
                                        <input onclick="{if 
&#13;&#10;&#13;&#10;&#13;&#10;(this.value==0)this.value=1;else this.value=0}" type="checkbox" value="0" name="TabKeyON">
                                    </span><a href="javaScript:aboutme();">
                                        <img onmouseover="this.src='<%=Globals.ApplicationPath%>/Images/Pic/lfgboxlogo_h.gif'" onmouseout="this.src='<%=Globals.ApplicationPath%>/Images/Pic/lfgboxlogo.gif'"
                                            height="24" hspace="0" src="<%=Globals.ApplicationPath%>/Images/Pic/lfgboxlogo.gif" align="absMiddle" vspace="0"
                                            border="0"></a>
                                </td>
                            </tr>
                        </table>
                        <table id="tds2" cellspacing="0" bordercolordark="#eeeeee" cellpadding="0" width="100%"
                            bgcolor="#cacaca" bordercolorlight="#999999" border="1">
                            <tr>
                                <td id="replaceTEXT">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td nowrap width="25">
                        <span class="txt0" id="rowsnum" style="border-top-width: 0px; table-layout: fixed;
                            padding-right: 4px; overflow-y: hidden; padding-left: 1px; border-left-width: 0px;
                            overflow-x: hidden; border-bottom-width: 0px; overflow: scroll; width: 100%;
                            color: #dddddd; word-break: break-all; font-family: 'Tahoma','MS Shell Dlg';
                            height: 100%; background-color: #999999; text-align: right; border-right-width: 0px"
                             ></span>
                    </td>
                    <td width="100%">
                        <table id="tds3" height="100%" cellspacing="0" cellpadding="0" width="100%" align="center"
                            border="0">
                            <tr>
                                <td   width="100%" bgcolor="#d4d0c8" height="100%">
                                    <textarea class="txt0" id="content" onkeydown="addrows();editTab();" onblur="form2.TabKeyON.value=0; 
&#13;&#10;form2.TabKeyON.checked=false;" style="table-layout: fixed; width: 100%; word-break: break-all; height: 100%"
                                        onfocus="form2.TabKeyON.value=1;form2.TabKeyON.checked=true;" onscroll="rowsnum.scrollTop=this.scrollTop;"
                                        name="content" wrap="off" runat="Server"></textarea> <input id="OptType" name="OptType" type="hidden" value="save" />
                                        <input type=hidden name="fileAsName" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
       
        </TBODY></table>
  
    
    
     </form>
      <input id="openmenu" type="hidden" value="off" />
     
      <script>
     // showRowNumber();
      </script>
</body>
</html>
