<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!-- #include file="Inc/Head.asp" -->
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_New order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.addNEWS.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

function CheckForm()
{
     document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);     
     document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
     document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;

	if (document.addNEWS.title.value.length == 0) {
		alert("信息标题没有填写.");
		document.addNEWS.title.focus();
		return false;
	}
	if (document.addNEWS.remark.value.length == 0) {
		alert("信息内容提要没有填写.");
		document.addNEWS.remark.focus();
		return false;
	}
	if (document.addNEWS.user.value.length == 0) {
		alert("信息来源没有填写.");
		document.addNEWS.user.focus();
		return false;
	}
	return true;
}
</script>

<Script Language=JavaScript>
//获取上传文件的文件名
function doChange(objText, objDrop){
	if (!objDrop) return;
	var str = objText.value;
	var arr = str.split("|");
	objDrop.length=0;
	for (var i=0; i<arr.length; i++){
		objDrop.options[i] = new Option(arr[i], arr[i]);
	}
}
</Script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="150" align="center" valign="top" bgcolor="#A0CCD8"><!-- #include file="info_left.asp" --></td>
    <td width="20" ></td>
	<td align="center" valign="top"><br><br>
<form name="form1" method="post" action="">
  <table width=80% border="0" align="center" cellpadding="0" cellspacing="2">
    <tr> 
      <td> <FIELDSET align=left>
        <LEGEND align=left></LEGEND>
        </fieldset></td>
      <td width=80 align="center"> <br> <br> </td>
    </tr>
    <tr> 
      <td> <FIELDSET align=left>
        <LEGEND align=left>上传本地图片</LEGEND>
        <iframe class="TBGen" height="42" style="top:2px" ID="UploadFiles" src="../upload_dialog.asp?DialogType=pic" frameborder=0 scrolling=no width="350" height="25"></iframe>
        </fieldset></td>
      <td align="center"><input name="UpFileName" type="hidden" id="UpFileName" value="None"></td>
    </tr>
    <tr> 
      <td> <div align="left">
          <legend align=left></legend>
        </div>
        <table width="100%" border="0" align=left cellpadding="0" cellspacing="3">
          <tr> 
            <td width="477">图片地址： 
              <input name="url" id="url2" value='http://' size=38 maxlength="200">
              请把该地址复制到前面对话框中的“图片地址”栏中。
			   <%if trim(session("AdminName"))<>"" then%> <input type="button" name="Submit" value="..." title="从已上传文件中选择" onClick="javascript:window.open('editor_SelectUpFile.asp?DialogType=pic', 'selupfile', 'width=800, height=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes');"> 
              <%end if%> </td>
          </tr>
        </table>
        </td>
      <td align="center">&nbsp;</td>
    </tr>
    <tr>
      <td> <div align="center">
          <input name="button" type="button" onClick="history.go(-2)" value="<<返回　" size="10">
        </div></td>
      <td align="center">&nbsp;</td>
    </tr>
  </table>
</form>
</p>
      </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->