<HTML><HEAD><TITLE>插入图片M</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=pragma content=no-cache>
<META http-equiv=cache-control content=no-cache>
<META http-equiv=expires content=0><LINK href="sn.css" type=text/css rel=stylesheet>
<script language="javascript">
function checkForm(){
var strFileName=document.forms[0].nlFile.value;
var strFileType;
var intImgWidth;
if(strFileName.length == 0){
alert('请选择一张图片再上传');
//self.location='sNewLogo.asp?a=1';
return false;
}
else
   {
strFileType=strFileName.substr(strFileName.indexOf(".")+1)
strFileType=strFileType.toLowerCase();
if(strFileType=="jpg" || strFileType=="bmp" || strFileType=="gif" || strFileType=="png" || strFileType=="jpeg")
{
//nothing
}
else if(strFileType=="swf")
{
intImgWidth=prompt("请输入FLASH文件的宽度和高度,中间用英文的逗号隔开:","500,350");
if (intImgWidth==null)
{
//document.forms[0].ImgWidth.value=0;
//document.forms[0].ImgHeight.value=0;
return false;
}
else
{
document.forms[0].ImgWidth.value=intImgWidth.substr(0,ImgWH.indexOf(","));
document.forms[0].ImgHeight.value=intImgWidth.substr(intImgWidth.indexOf(",")+1);
}
}
else{
alert("不允许输入此种类型的文件!请重新选择上传文件。");
return false;
}
   }
}
</script>
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE cellSpacing=0 cellPadding=8 width="100%">
  <FORM onsubmit="return checkForm(this);" action="sSaveImg.asp?a=3" method="post" encType="multipart/form-data" target="iframe_upload">
  <TBODY>
    <TR align="center"> 
      <TD> <FIELDSET><LEGEND>上传图片</LEGEND> <br>
        <INPUT type=file size=45 name=nlFile>
        <br>
        <br>
        </FIELDSET></TD>
    </TR>
  <TR>
    <TD align=right>
<INPUT  type=submit value=上传 name=sAction> 
<INPUT onclick="javascript: window.close();" type=button value=取消>
</TD>
  </TR>
  </FORM>
  <iframe id="iframe_upload" name="iframe_upload" style="display:none"></iframe>
</TABLE>
</BODY>
</HTML>