<%@ Page Language="VB" AutoEventWireup="false" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_Info_manage_add" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="inc/admin_style.css" rel="stylesheet" type="text/css" /><link href="inc/style.css" rel="stylesheet" type="text/css" /><script type="Text/JavaScript" language="javascript" src="inc/title.js"></script>
<title><%=AppConst.SiteName%></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FF0000}
.M {FONT: 14px 宋体
}
.style2 {	font-size: 10pt;
	font-weight: bold;
}
.style2 {color: <%=AppConst.Skincolor%>}
.lh15 {LINE-HEIGHT: 150%
}
-->
</style>
<script type="Text/JavaScript" language="JavaScript"> 
var subval2 = new Array();
<%=GetSmallClassArray("subval2")%>
var subval3 = new Array(); 
<%=GetThreeClassArray("subval3") %>
function changeselect1(locationid) 
{ 
      document.form.s2.length = 0; 
      document.form.s2.options[0] = new Option('==请选择二级分类==',''); 
      document.form.s3.length = 0; 
      document.form.s3.options[0] = new Option('==请选择三级分类==',''); 
      for (i=0; i<subval2.length; i++) 
      { 
          if (subval2[i][0] == locationid) 
          {document.form.s2.options[document.form.s2.length] = new Option(subval2[i][1],subval2[i][2]);} 
      } 
} 

function changeselect2(locationid) 
{ 
      document.form.s3.length = 0; 
      document.form.s3.options[0] = new Option('==请选择三级分类==',''); 
      for (i=0; i<subval3.length; i++) 
      { 
          if (subval3[i][0] == locationid) 
          {document.form.s3.options[document.form.s3.length] = new Option(subval3[i][1],subval3[i][2]);} 
      } 
} 
//--> 

//不同按钮提交到不同地方
function formsubmit(){
	if(document.form.I_title.value==""){
		alert("信息主题不能为空！");
		document.form.I_title.focus();
		return false;
	}
	
		if(document.form.s1.value==""){
		alert("请选择行业一级分类！");
		document.form.s1.focus();
		return false;
	}
	if(document.form.s2.value==""){
		alert("请选择行业二级分类！");
		document.form.s2.focus();
		return false;
	}
	
//	if(document.form.s3.options.count > 0 && document.form.s3.value==""){
//		alert("请选择行业三级分类！");
//		document.form.s3.focus();
//		return false;
//	}
	
//关键词验证
	var I_Keyword=document.form.I_Keyword.value;
	var I_KeywordB=document.form.I_KeywordB.value;
	var I_KeywordC=document.form.I_KeywordC.value;
	if(I_Keyword=="" && I_KeywordB=="" && I_KeywordC==""){
		alert("在关键词的三个输入框中最少要输入一个！\n这样可以大大的提高您发布的信的被检索到的机会！");
		document.form.I_Keyword.focus();
		return false;
	}
	if(document.form.I_explain.value==""){
		alert("详细说明及属性不能为空！");
		document.form.I_explain.focus();
		return false;
	}
}
//从图库中选择图片弹出框
function SelectPic(strnum){
	window.open("OpenMyPic.aspx?userid=<%=Request.QueryString("u")%>&strnum="+strnum,"B","width=770,height=400,resizable=yes,status=no,titlebar=no,location=no,scrollbars=yes,left=150,top=110")
}
//返回图片
function Images(catName,catName_small,catbigpic,catsmallpic,catpicname){
	if (catpicname=="I_PicB"){
		document.form.I_Pic.value=catName;
		document.form.I_smallPic.value=catName_small;
		document.form.I_PicB.src="../upload/Info/"+catName;
	}
	if (catpicname=="I_PicB2"){
		document.form.I_Pic2.value=catName;
		document.form.I_smallPic2.value=catName_small;
		document.form.I_PicB2.src="../upload/Info/"+catName;
	}
	if (catpicname=="I_PicB3"){
		document.form.I_Pic3.value=catName;
		document.form.I_smallPic3.value=catName_small;
		document.form.I_PicB3.src="../upload/Info/"+catName;
	}
}
//删除图片
function DelImages(num){
if (num==1){
	document.form.I_Pic.value="";
	document.form.I_smallPic.value="";
	document.form.I_PicB.src="../<%=AppConst.Userpath%>/images/NoPICB.gif";
}else if (num==2){
	document.form.I_Pic2.value="";
	document.form.I_smallPic2.value="";
	document.form.I_PicB2.src="../<%=AppConst.Userpath%>/images/NoPICB.gif";
}else if (num==3){
	document.form.I_Pic3.value="";
	document.form.I_smallPic3.value="";
	document.form.I_PicB3.src="../<%=AppConst.Userpath%>/images/NoPICB.gif";
}
}
</script>
</head>
<body>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table style="height:22; width:100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="topbg">
        <td style="height:22" align="center" class="topbg"><strong>商 业 机 会 录 入</strong></td>
      </tr>
    </table>
      <table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td style="width:25"><div align="center"><img src="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/gojump01.gif" width="16" height="16" /></div></td>
        <td><a href="info_manage.aspx?I_type=1">供应</a> | <a href="info_manage.aspx?I_type=2">求购</a> | <a href="info_manage.aspx?I_type=3">合作</a> | <a href="info_manage.aspx?I_type=4">代理</a> | <a href="info_manage.aspx?I_type=5">库存</a> | <a href="info_manage.aspx?I_type=6">加工</a> </td>
        <td style="width:400"><table style="width:400"  border="0" align="right" cellpadding="2" cellspacing="0">
            <form name="form1" method="get">
              <tr>
                <td style="height:25" align="right">搜索关键字：</td>
                <td style="width:90" align="center">
                  <input name="keyword" type="text" id="keyword" size="10" style="width:80" /></td>
                <td><div align="center"> 类别：
                        <select name="I_type" id="I_type">
                          <option value="" selected="selected">请选择类别</option>
                          <option value="1">供应</option>
                          <option value="2">求购</option>
                          <option value="3">合作</option>
                          <option value="4">代理</option>
                          <option value="5">库存</option>
                          <option value="6">加工</option>
                        </select>
                </div></td>
                <td style="width:10%"><input type="submit" name="Submit" value="  搜索 " /></td>
              </tr>
            </form>
        </table></td>
      </tr>
    </table>
      <table style="height:436; width:100%" border="0" cellpadding="4" cellspacing="1" class="border">
        <form method="POST" action="" onsubmit="return formsubmit();" name="form">
          <tr>
            <td style="background-color:#C4E4FF; width:40%" align="right">类别：</td>
            <td style="background-color:#F1F9FF; height:20" colspan="2"><font color="#000000">
<select name="I_type" id="I_type">
                  <option value="1">供应</option>
				  <option value="2">求购</option>
				  <option value="3">合作</option>
				  <option value="4">代理</option>
				  <option value="5">库存</option>
				  <option value="6">加工</option>
              </select>
            </font></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">* 信息标题：</td>
            <td style="background-color:#F1F9FF; height:20" colspan="2"><font color="#000000">
              <input name="I_title" type="text" id="I_title"  size="30" maxlength="20"  >
            </font></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">*行业大类：</td>
            <td style="background-color:#F1F9FF; height:8" colspan="2">
            <select name="s1" id="s1" onchange="changeselect1(this.value)"> 
                <option>==请选择一级分类==</option> 
                <%=GetBigClassOptions()%> 
            </select> 
            <select name="s2" id="s2" onchange="changeselect2(this.value)"> 
            <option>==请选择二级分类==</option> 
            </select> 
            <select name="s3" id="s3" style="visibility:hidden"> 
            <option>==请选择三级分类==</option> 
            </select> 
            <!-- 三级联动菜单 结束 --></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">*关键字：</td>
            <td style="background-color:#F1F9FF; height:5" colspan="2"><input name="I_Keyword" id="I_Keyword" value = "" size="10" maxLength="8"> , <input name=I_KeywordB id="I_KeywordB" value = "" size=10 maxLength=8> , <input name="I_KeywordC" id="I_KeywordC" value="" size="10" maxlength="8" /></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">有效期：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><input name="I_JzTime" type="radio" value="10" id="A1" />
              <label for="A1" style="cursor:hand">10天</label>
              <input name="I_JzTime" type="radio" value="20" id="A2" />
              <label for="A2" style="cursor:hand">20天</label>
              <input name="I_JzTime" type="radio" value="30" id="A3" />
              <label for="A3" style="cursor:hand">一个月</label>
              <input name="I_JzTime" type="radio" id="A4" value="90" checked="checked" />
              <label for="A4" style="cursor:hand">三个月</label></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">规 格：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><input name="I_specification" type="text" id="I_specification"  size="30" maxlength="20" /></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">数 量：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><span class="S" id="PreAddress" name="PreAddress">
              <input name="I_CountNumber" type="text" id="I_CountNumber" size="30" maxlength="20" >
            </span></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">价 格：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><span class="S" id="PreAddress" name="PreAddress">
              <input name="I_price" type="text" id="I_price"  size="20" maxlength="30" />
            </span>            </td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">上传图片：</td>
            <td style="background-color:#F1F9FF; height:27" colspan="2"><table style="width:429" border="0" cellpadding="0" cellspacing="0">
              <tr>
			  <script type="Text/JavaScript" language="javascript">
													function upload(strinfo){
													if (strinfo=="Info1"){
															info1.style.display="none";
															uploadinfo1.style.display="inline";
														}else if (strinfo=="Info2"){
															info2.style.display="none";
															uploadinfo2.style.display="inline";
														}else if (strinfo=="Info3"){
															info3.style.display="none";
															uploadinfo3.style.display="inline";
														}
													}
												</script>
                <td style="width:98"><img src="../<%=AppConst.Userpath%>/images/NoPICB.gif" name="I_PicB" width="88" height="88" id="I_PicB" /></td>
                <td style="width:331"><div id="info1">
												
                                                    <br>
                                                    <input name="I_Pic" type="hidden" id="I_Pic" />
                                                    <input name="I_smallPic" type="hidden"  id="I_smallPic" />
                                                    <br>
                                                    <input type="button" name="Submit32" value="从图库中选择图片" onclick="SelectPic('I_PicB');" />
                                                    <input type="button" name="Submit322" value="删除图片" onclick="DelImages(1)" />
                                                    <br>
													</div>
													<div id="uploadinfo1" style="display:none">
													<iframe id="upload" src="../upload/upload_iframe_infoadd_cn.aspx" width="300" height="30" scrolling="no" frameborder="0"></iframe>
													<br>
													</div>
                                                    <span class="style5">您发布的商机中附上图片这将大大提高商业机会成功的机</span>				  </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">包装说明：</td>
            <td style="background-color:#F1F9FF; height:28" colspan="2"><textarea name="I_packageexplain" cols="40" rows="5" id="I_packageexplain"></textarea></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">信息说明：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><textarea name="I_explain" cols="40" rows="5" id="I_explain"></textarea></td>
          </tr>
          <tr>
            <td style="background-color:#C4E4FF" align="right">发布人：</td>
            <td style="background-color:#F1F9FF; height:14" colspan="2"><input name="I_Userid" type="text" id="I_Userid" value="<%=Request.QueryString("u")%>"  size="30" maxlength="50" readonly="readonly" />
                <input name="send" type="hidden" id="send" value="isok" />
                <input name="page" type="hidden" id="page" value="<%=request("page")%>" />
                <input name="usertype" type="hidden" id="usertype" value="<%=request("usertype")%>" />
                <input name="keyword" type="hidden" id="keyword" value="<%=request("keyword")%>" />
          </td>
          </tr>
          <div id='CompanyInfo'>          </div>
     <tr>
            <td style="height:35" colspan="3" align="center">
             
             <input type="submit" name="Submit3" value="添 加" onclick="return formsubmit()" />               <input type="button" name="Submit22" value="返 回" onclick="history.go(-1)" />            </td>
          </tr>
        </form>
    </table>
    </td>
  </tr>
</table>
</body><%Page_Loaded()%>
</html>
