<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<!-- TemplateBeginEditable name="doctitle" --><!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
  <link rel="icon" href="favicon.ico" type="image/x-icon" />
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  <link rel="icon" href="animated_favicon.gif" type="image/gif" />
  <link rel="alternate" type="application/rss+xml" title="RSS|{$page_title}" href="{$feed_url}" />
  <link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
  <title>{$page_title}</title>
  {* 包含脚本文件 *}{insert_scripts files='common.js,index.js'}
</head>
<body>
  <div id="wrap">
    <!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
    <div class="container">
      <div class="global_l">
        <!-- TemplateBeginEditable name="左边区域" -->
<!-- #BeginLibraryItem "/library/category_tree.lbi" -->

<div class="area" id="category_tree">
  <div class="top"><span></span></div>
  <div class="content">
    <h1>Categories</h1>
    <dl>
      <!--{foreach from=$categories item=cat}-->
      <dt><font class="f1">·</font><a href="{$cat.url}">{$cat.name|escape:html}</a></dt>
      <dd>
        <!--{foreach from=$cat.children item=child}-->
        <a href="{$child.url}" onfocus="this.blur()">{$child.name|escape:html}</a>
        <!--{/foreach}-->
      </dd>
      <!--{/foreach}-->
    </dl>
  </div>
  <div class="bottom"><span></span></div>
</div>
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/new_articles.lbi" -->

<div class="module" id="notice">
  <div class="top"><span></span></div>
  <div class="content">
		<ul id="newArticleTab">
		  <li id="ECS_NOTICE" class="tabFront">{$lang.shop_notice}</li>
		  <li id="ECS_ARTICLE" class="tabBack">{$lang.new_article}</li>
		</ul>
		<div id="newArticle">
		  <div id="ECS_NOTICE_BODY">
		    {$shop_notice}
		  </div>
		  <div id="ECS_ARTICLE_BODY" style="display:none;">
		    <ul>
		      <!-- {foreach name=new_articles from=$new_articles item=article} -->
		      <!-- {if $smarty.foreach.new_articles.iteration lte 6} 限制文章显示数量 -->
		      <li>[<a href="{$article.cat_url}">{$article.cat_name}</a>] <a href="{$article.url}" title="{$article.title|escape:html}">{$article.short_title}</a></li>
		      <!-- {/if} -->
		      <!-- {/foreach} -->
		    </ul>
		  </div>
	</div>
  </div>
  <p class="bottom"><span></span></p>
</div>
<script type="text/javascript">
//<![CDATA[
{literal}
  var cycleList = ['ECS_NOTICE', 'ECS_ARTICLE'];
  var tabFront = 'tabFront';
  var tabBack = 'tabBack';
  function cycleShow(obj)
  {
    var curObj;
    var curBody;
    for (i=0; i < cycleList.length; i++)
    {
      curObj = document.getElementById(cycleList[i]);
      curBody = document.getElementById(cycleList[i] + '_BODY');
      if (obj.id == curObj.id)
      {
        curObj.className = tabFront;
        curBody.style.display = "";
      }
      else
      {
        curObj.className = tabBack;
        curBody.style.display = "none";
      }
    }
  }

  // 添加事件
  for (i=0; i< cycleList.length; i++)
  {
    document.getElementById(cycleList[i]).onmousemove = function()
    {
      cycleShow(this);
    };
  }
{/literal}
//]]>
</script>
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/top10.lbi" -->

<div id="ranking" class="area">
  <h1>
    <span>{$lang.top_goods}</span>
  </h1>
  <ul>
    <!-- {foreach name=top_goods from=$top_goods item=goods}-->
    <li><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name}</a></li>
    <!--{/foreach}-->
  </ul>
  <div class="bottom">
    <span></span>
  </div>
</div>
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/email_list.lbi" -->

<div class="module" id="email_list">
  <p class="top"><span></span></p>
  <div class="content">
  <h1>{$lang.email_subscribe}</h1>
  <div class="cont">
    <input type="text" id="user_email" class="input_1" /><br />
    <input type="button" value="{$lang.email_list_ok}" onclick="add_email_list();" class="button_1"/>
    <input type="button"  value="{$lang.email_list_cancel}" onclick="cancel_email_list();" class="button_2"/>
  </div>
  </div>
  <p class="bottom"><span></span></p>
</div>
<script type="text/javascript">
var email = document.getElementById('user_email');
function add_email_list()
{
  if (check_email())
  {
    Ajax.call('user.php?act=email_list&job=add&email=' + email.value, '', rep_add_email_list, 'GET', 'TEXT');
  }
}
function rep_add_email_list(text)
{
  alert(text);
}
function cancel_email_list()
{
  if (check_email())
  {
    Ajax.call('user.php?act=email_list&job=del&email=' + email.value, '', rep_cancel_email_list, 'GET', 'TEXT');
  }
}
function rep_cancel_email_list(text)
{
  alert(text);
}
function check_email()
{
  if (Utils.isEmail(email.value))
  {
    return true;
  }
  else
  {
    alert('{$lang.email_invalid}');
    return false;
  }
}
</script>

 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/order_query.lbi" -->

<!--{if empty($order_query)}-->
<script>var invalid_order_sn = "{$lang.invalid_order_sn}"</script>
<div class="module" id="email_list">
  <p class="top"><span></span></p>
  <div class="content">
    <h1>{$lang.order_query}</h1>
    <div class="cont">
      <form name="ecsOrderQuery">
        <input type="text" name="order_sn" class="input_1" />
        <input type="button" value="{$lang.query_order}" class="button_2" onclick="orderQuery()" />
      </form>
      <div id="ECS_ORDER_QUERY" style="margin-top:8px;">
        <!--{else}-->
              <!--{if $order_query.user_id}-->
              <b>{$lang.order_number}：</b><a href="user.php?act=order_detail&order_id={$order_query.order_id}" style="text-decoration:underline;">{$order_query.order_sn}</a><br/>
              <!--{else}-->
              <b>{$lang.order_number}：</b>{$order_query.order_sn}
              <!--{/if}-->
              <b>{$lang.order_status}：</b><br>
              <font class="f2">{$order_query.order_status}</font><br>
              <!--{if $order_query.invoice_no }-->
              <b>{$lang.consignment}：</b><font class="f3">{$order_query.invoice_no}</font>
              <!--{/if}-->
              {if $order_query.shipping_date}：{$lang.shipping_date} {$order_query.shipping_date}
              <!--{/if}-->
        <!--{/if}-->
      </div>
<!--{if empty($order_query)}-->
    </div>
  </div>
  <div class="bottom"><span></span></div>
</div>
<!--{/if}-->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/invoice_query.lbi" -->

<!--{if $invoice_list}-->
<div class="module">
  <div class="top"><span></span></div>
  <div class="content">
    <h1>{$lang.shipping_query}</h1>
    <ul style="padding:0 8px; line-height:18px; padding-bottom:5px;">
      <!-- 发货单查询{foreach from=$invoice_list item=invoice} -->
      <li>
        <span class="f2">{$lang.order_number}:</span>{$invoice.order_sn}<br/>
        <span class="f2">{$lang.consignment}:</span>{$invoice.invoice_no}
      </li>
      <!-- 结束发货单查询{/foreach}-->
    </ul>
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/recommend_promotion.lbi" -->

<!-- {if $promotion_goods} -->
<div class="module" id="specials">
  <div class="top"><span></span></div>
  <div class="content">
    <h1>{$lang.promotion_goods}</h1>
    <ul>
      <!--{foreach from=$promotion_goods item=goods name="promotion_foreach"}-->
      {if $smarty.foreach.promotion_foreach.index <= 3}
      <li>
        <a href="{$goods.url}"><img src="{$goods.thumb}" border="0" alt="{$goods.name|escape:html}"/></a>
        <p class="name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_name|escape:html}</a></p>
        <p style="color:#fe7800; font-weight:bold;">{$goods.promote_price}</p>
      </li>
     {/if}
     <!--{/foreach}-->
    </ul>
    <p class="more"><a href="../search.php?intro=promotion"><img style="float:right" src="../images/more.jpg"></a></p>
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->

 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/vote_list.lbi" -->

{insert name='vote'}
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/promotion_info.lbi" -->

<!-- {if $promotion_info} -->
 <div class="module">
   <p class="top"><span></span></p>
   <div class="content">
     <h1>{$lang.promotion_info}</h1>
     <ul class="text_list">
       <!-- {foreach from=$promotion_info item=item key=key} -->
       <li>
         <!-- {if $item.type eq "snatch"} -->
         <a href="snatch.php" title="{$lang.$item.type}">{$lang.snatch_promotion}</a>
         <!-- {elseif $item.type eq "group_buy"} -->
         <a href="group_buy.php" title="{$lang.$item.type}">{$lang.group_promotion}</a>
         <!-- {elseif $item.type eq "auction"} -->
         <a href="auction.php" title="{$lang.$item.type}">{$lang.auction_promotion}</a>
         <!-- {elseif $item.type eq "favourable"} -->
         <a href="activity.php" title="{$lang.$item.type}">{$lang.favourable_promotion}</a>
         <!-- {/if} -->
         <a href="{$item.url}" title="{$lang.$item.type} {$item.act_name}{$item.time}" style="background:none; padding-left:0px;">{$item.act_name}</a>
       </li>
       <!-- {/foreach} -->
    </ul>
   </div>
   <p class="bottom"><span></span></p>
 </div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
      </div>
      <div class="global_r">
        <div class="area" style="margin:0px;">
          <!-- focus -->
          <div class="focus_below" style="margin-bottom:10px;">
            <!-- #BeginLibraryItem "/library/index_ad.lbi" --><!-- #EndLibraryItem -->
          </div>
          <!-- end-focus -->
          <div class="focus_below" style="float:right; width:198px;">
            <!-- TemplateBeginEditable name="焦点图右侧" -->
<!-- #BeginLibraryItem "/library/cart.lbi" -->

{insert_scripts files='transport.js'}
<div class="cart" id="ECS_CARTINFO">
  {insert name='cart_info'}
</div>
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/brands.lbi" -->

<!-- {if $brand_list} -->
<div id="brands">
  <h1>{$lang.brand_list}</h1>
    <div class="content">
    <!-- {foreach from=$brand_list item=brand name="brand_foreach"} -->
      {if $smarty.foreach.brand_foreach.index <=2}
        <!-- {if $brand.brand_logo} -->
        <a href="{$brand.url}" title="{$brand.brand_name|escape:html} ({$brand.goods_num})"><img src="../data/brandlogo/{$brand.brand_logo}" alt="{$brand.brand_name|escape:html} ({$brand.goods_num})" /></a>
        <!-- {else} -->
        <p class="textLink"><a href="{$brand.url}">{$brand.brand_name|escape:html}</a>
          <!-- {if $brand.goods_num} -->
          <span class="textDesc">({$brand.goods_num})</span></p>
          <!-- {/if} -->
        <!-- {/if} -->
       {/if}
      <!-- {/foreach} -->
    </div>
    <p class="more"><a href="brand.php"><img src="../images/more.jpg"></a></p>
</div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
          </div>
        </div>
         <!-- TemplateBeginEditable name="右边区域" -->
<!-- #BeginLibraryItem "/library/recommend_best.lbi" -->

<!-- {if $best_goods} -->
<div id="goods_best" class="module goods_list">
  <div class="caption"><span style="color:#1354bf;"><img alt="{$lang.best_goods}" src="images/recommended_caption.jpg" /></span></div>
    <div class="top"><span></span></div>
    <div class="content">
      <div class="cont">
        <div class="best_l" onmouseover="moveLeft()" onmousedown="clickLeft()" onmouseup="moveLeft()" onmouseout="scrollStop()"><img src="images/best_l.jpg" /></div>
        <div class="best_r" onmouseover="moveRight()" onmousedown="clickRight()" onmouseup="moveRight()" onmouseout="scrollStop()"><img src="images/best_r.jpg" /></div>
        <div style="width:676px; float:left; overflow:hidden;">
          <div id="demo">
            <div id="demo1" style="float:left;">
              <ul class="goods_grid2">
                <!--{foreach from=$best_goods item=goods}-->
                <li>
                  <p class="img"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}"/></a></p>
                  <p class="name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
                  <p class="price">
                    <!-- {if $goods.promote_price neq ""} -->
                    {$goods.promote_price}
                    <!-- {else}-->
                    {$goods.shop_price}
                    <!--{/if}-->
                  </p>
                </li>
                <!--{/foreach}-->
              </ul>
            </div>
            <div id="demo2" style="display:inline; overflow:visible;"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="bottom"><span></span></div>
</div>
<script type="text/javascript">
      function $(id){
        return (document.getElementById) ? document.getElementById(id): document.all[id]
      }

      var boxwidth=120;//跟图片的实际尺寸相符

      var box=$("demo");
      var obox=$("demo1");
      var dulbox=$("demo2");
      obox.style.width=obox.getElementsByTagName("li").length*boxwidth+'px';
      dulbox.style.width=obox.getElementsByTagName("li").length*boxwidth+'px';
      box.style.width=obox.getElementsByTagName("li").length*boxwidth*3+'px';
      var canroll = false;
      if (obox.getElementsByTagName("li").length >= 4) {
        canroll = true;
        dulbox.innerHTML=obox.innerHTML;
      }
      var step=5;temp=1;speed=50;
      var awidth=obox.offsetWidth;
      var mData=0;
      var isStop = 1;
      var dir = 1;

      function s(){
        if (!canroll) return;
        if (dir) {
      if((awidth+mData)>=0)
      {
      mData=mData-step;
      }
      else
      {
      mData=-step;
      }
      } else {
        if(mData>=0)
        {
        mData=-awidth;
        }
        else
        {
        mData+=step;
        }
      }

      obox.style.marginLeft=mData+"px";

      if (isStop) return;

      setTimeout(s,speed)
      }


      function moveLeft() {
          var wasStop = isStop;
          dir = 1;
          speed = 50;
          isStop=0;
          if (wasStop) {
            setTimeout(s,speed);
          }
      }

      function moveRight() {
          var wasStop = isStop;
          dir = 0;
          speed = 50;
          isStop=0;
          if (wasStop) {
            setTimeout(s,speed);
          }
      }

      function scrollStop() {
        isStop=1;
      }

      function clickLeft() {
          var wasStop = isStop;
          dir = 1;
          speed = 25;
          isStop=0;
          if (wasStop) {
            setTimeout(s,speed);
          }
      }

      function clickRight() {
          var wasStop = isStop;
          dir = 0;
          speed = 25;
          isStop=0;
          if (wasStop) {
            setTimeout(s,speed);
          }
      }
      </script>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/recommend_hot.lbi" -->

<!-- {if $hot_goods} -->
<!-- {if $cat_rec_sign neq 1} -->
<div class="goods_list module" id="goods_hot">
  <div class="caption">
    <span><img alt="{$lang.hot_goods}" src="images/hot_caption.jpg" /></span>
    <div class="switchover" id="itemHot">
      {if $cat_rec[3]}
      <h2><a href="javascript:void(0)" onclick="change_tab_style('itemHot', 'h2', this);get_cat_recommend(3, 0);">{$lang.all_goods}</a></h2>
      {foreach from=$cat_rec[3] item=rec_data}
      <h2 class="h2bg">
         <a href="javascript:void(0)" onclick="change_tab_style('itemHot', 'h2', this);get_cat_recommend(3, {$rec_data.cat_id})">{$rec_data.cat_name}</a>
      </h2>
      {/foreach}
      {/if}
     </div>
  </div>
  <div class="top"><span></span></div>
  <div class="content" id="show_hot_area">
  <!-- {/if} -->

    <ul class="goods_grid2">
    <!--{foreach from=$hot_goods item=goods}-->
      <li>
        <p class="img"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}"/></a></p>
        <p class="name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
        <p class="price">
            <!-- {if $goods.promote_price neq ""} -->
            {$goods.promote_price}
            <!-- {else}-->
            {$goods.shop_price}
            <!--{/if}-->
        </p>
      </li>
    <!--{/foreach}-->
    </ul>
    <div class="more"><a href="../search.php?intro=hot"><img src="images/more.jpg" /></a></div>
    <!-- {if $cat_rec_sign neq 1} -->
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/group_buy.lbi" -->

<!-- {if $group_buy_goods} -->
<div class="goods_list module" id="group_buy">
  <div class="caption"><span><img alt="{$lang.group_buy_goods}" src="images/associates_caption.jpg" /></span></div>
  <div class="top"><span></span></div>
  <div class="content">

    <ul class="goods_grid2">
      <!--{foreach from=$group_buy_goods item=goods}-->
      <li>
        <p class="img"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}"/></a></p>
        <p class="name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
        <p class="price">{$goods.last_price}</p>
      </li>
      <!--{/foreach}-->
    </ul>
    <div class="more"><a href="group_buy.php"><img src="images/more.jpg" /></a></div>
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/recommend_new.lbi" -->

<!-- {if $new_goods} -->
<!-- {if $cat_rec_sign neq 1} -->
<div class="goods_list module" id="goods_new">
  <div class="caption">
      <span><img src="images/new_caption.jpg" alt="{$lang.new_goods}"/></span>
      <div class="switchover" id="itemNew">
        {if $cat_rec[2]}
        <h2><a href="javascript:void(0)" onclick="change_tab_style('itemNew', 'h2', this);get_cat_recommend(2, 0);">{$lang.all_goods}</a></h2>
        {foreach from=$cat_rec[2] item=rec_data}
        <h2 class="h2bg">
        <a href="javascript:void(0)" onclick="change_tab_style('itemNew', 'h2', this);get_cat_recommend(2, {$rec_data.cat_id})">{$rec_data.cat_name}</a></h2>
      {/foreach}
      {/if}
      </div>
  </div>
  <div class="top"><span></span></div>
  <div class="content" id="show_new_area">
    <!-- {/if} -->

    <ul class="goods_grid2">
      <!--{foreach from=$new_goods item=goods}-->
      <li>
       <p class="img"><a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}"/></a></p>
       <p class="name"><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
       <p class="price">
        <!-- {if $goods.promote_price neq ""} -->
        {$goods.promote_price}
        <!-- {else}-->
        {$goods.shop_price}
        <!--{/if}-->
       </p>
      </li>
      <!--{/foreach}-->
    </ul>
    <p class="more"><a href="../search.php?intro=new"><img src="images/more.jpg" /></a></p>
  <!-- {if $cat_rec_sign neq 1} -->
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/auction.lbi" -->

<!-- {if $auction_list} -->
<div class="goods_list module" id="auction">
  <div class="caption"><span><img alt="{$lang.auction_goods}" src="images/auction_caption.jpg" /></span></div>
  <div class="top"><span></span></div>
  <div class="content">

    <!--{foreach from=$auction_list item=auction}-->
    <ul class="goods_grid2">
      <li>
        <p class="img"><a href="{$auction.url}"><img src="{$auction.thumb}" alt="{$auction.goods_name|escape:html}"/></a></p>
        <p class="name"><a href="{$auction.url}">{$auction.short_style_name|escape:html}</a></p>
        <p class="price">{$auction.formated_start_price}</p>
      </li>
    </ul>
    <!--{/foreach}-->
    <div class="more"><a href="../auction.php" style="width:43px; height:13px;"><img src="images/more.jpg" /></a></div>
  </div>
  <div class="bottom"><span></span></div>
</div>
<!-- {/if} -->
 <!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
      </div>
    </div>
    <!-- #BeginLibraryItem "/library/help.lbi" --><!-- #EndLibraryItem -->
    <!-- links -->
      <!--{if $img_links  or $txt_links }-->
      <div id="links">
        <div class="top"></div>
        <div class="content">
          <p class="img">
            <!--开始图片类型的友情链接{foreach from=$img_links item=link}-->
            <a href="{$link.url}" target="_blank" title="{$link.name}"><img src="{$link.logo}" alt="{$link.name}" border="0" /></a>
            <!--结束图片类型的友情链接{/foreach}-->
          </p>
          <!-- {if $txt_links} -->
          <p class="text">
            <!--开始文字类型的友情链接{foreach from=$txt_links item=link}-->
            <span>[<a href="{$link.url}" target="_blank" title="{$link.name}">{$link.name}</a>]</span>
            <!--结束文字类型的友情链接{/foreach}-->
          </p>
          <!-- {/if} -->
        </div>
        <div class="bottom"></div>
      </div>
      <!-- {/if} -->
    <!-- end-links -->
    <!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
  </div>
</body>
</html>
