{assign var="page_title" value=#add_market#}
{assign var="nav_id" value="7"}
{include file="header.html"}
<style type="text/css">
@import url({$theme_img_path}general.css);
@import url({$theme_img_path}style.css);
</style>
<script src="data/cache/{$JsLanguage}/locale.js" charset="{$charset}"></script>
<div class="wrapper">
  <div class="content">
    <div class="tips"><span>{$position}</span></div>
    <div class="add_info">
      <div class="add_infoleft"> 
        <div class="add_infoleft_con">
         <div class="title_bar_s4">
          <span class="title_top_s4"><span></span></span>
          <h3>{lang recommended_market}</h3>
       </div>
          <ul class="add_infoleft_conlist">
          {pb:market row=10 name="item"}
          <li><a href="index.php?do=market&action=detail&id={$item.id}">{$item.title}</a></li>
          {/pb:market}
          </ul>
        </div>
      </div>
      <div class="add_inforight">
       <div class="base_title">
        <h2><span class="corner_t_l"></span><span class="corner_t_m title_mouse">{lang added_market}</span><span class="corner_t_r"></span></h2>
	</div>        
        <div class="add_inforight_con">
				<form name="marketfrm" id="marketFrm" action="{$smarty.server.PHP_SELF}" method="post">
				<input type="hidden" name="do" value="add_market" />
				<input type="hidden" name="formhash" value="{$smarty.const.FORMHASH}" />
				<table border="0" id="table_con">
              <tr>
                <td width="113" align="center" valign="middle">{lang market_name}</td>
                <td height="30"><label>
                  <input type="text" name="data[market][name]" id="MarketName" value="">
                </label></td>
              </tr>
              <tr>
                <td align="center" valign="middle">{lang area}</td>
                <td height="30" align="left" valign="middle">
				<p id="dataArea">
					<select name="data[market][area_id1]" id="dataMarketAreaId1" class="level_1" style="width:120px;" ></select>
					<select name="data[market][area_id2]" id="dataMarketAreaId2" class="level_2" style="width:120px;"></select>
					<select name="data[market][area_id3]" id="dataMarketAreaId3" class="level_3" style="width:120px;"></select>
				</p>
                 </td>
              </tr>
              <tr>
                <td align="center" valign="middle">{lang belong_industry}</td>
                <td height="30" align="left" valign="middle">
				<p id="dataIndustry">
					<select name="data[market][industry_id1]" id="dataMarketIndustryId1" class="level_1" style="width:120px;" ></select>
					<select name="data[market][industry_id2]" id="dataMarketIndustryId2" class="level_2" style="width:120px;"></select>
					<select name="data[market][industry_id3]" id="dataMarketIndustryId3" class="level_3" style="width:120px;"></select>
				</p>                
                </td>
              </tr>
              <tr>
                <td align="center" valign="middle">{lang market_introduction}</td>
                <td><label>
                  <textarea name="data[market][content]" rows="5" cols="35"></textarea>
                  </label></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td height="30" valign="middle">
                  <input name="image_button" type="button" id="addmarket" alt="{lang submit}" onclick="return checkFrm();" class="submit_w118" value="{lang submit_market}" />
                </td>
              </tr>
            </table>
          </form>
        </div>
      </div>
    </div>
    <div class="clear"></div>
</div>
<script>
var app_language = '{$AppLanguage}';
var input_market_name = '{#input_market_name#}';
</script>
<script src="static/scripts/jquery.js"></script>
<script src="static/scripts/multi_select.js" charset="{$Charset}"></script>
<script src="static/scripts/script_area.js"></script>
<script src="static/scripts/script_industry.js"></script>
<!-- {literal} -->
<script>
$("#MarketName").focus();
function checkFrm(){
	if($("#MarketName").val()==""){
		alert(input_market_name);
		$("#MarketName").focus();
		return false;
	}else{
		$("#marketFrm").submit();
		return true;
	}
}
</script>
<!-- {/literal} -->
{include file="footer.html"}