<? if (!defined('ROOT')) exit('Can\'t Access !'); ?>

<!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=utf-8" />
<title><?=config::get('keywords')?> - <?=config::get('sitename')?></title>
<meta name="Keywords" content="<?=config::get('keywords')?>" />
<meta name="Description" content="<?=config::get('description')?>" />
<link href="<?=$this->tempdir?>style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=$this->tempdir?>js/common.js"></script>
<script type="text/javascript" src="<?=$this->tempdir?>js/index.js"></script>
</head>
<body >
<? include template('header','wjgw'); ?>
<div class="block clearfix">
  <div class="AreaL">
    <div class="my_left_category">
      <h1>
        <div class="blank" style="height:3px;"></div>
        商品分类</h1>
      <div class="my_left_cat_list">
        <div class="blank"></div>        <? if(is_array($this->getshoptype(17))) { foreach($this->getshoptype(17) as $val) { ?>       
        <div class="h2_cat" onmouseover="this.className='h2_cat active_cat'" onmouseout="this.className='h2_cat'">
          <h4> <img width="16" height="16" src="<?=$this->tempdir?>images/<?=$val['id']?>.gif" align="absmiddle" style="margin-left:14px;">&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?=$val['url']?>"><?=$val['typename']?></a> </h4>
        </div><? } } ?> 
        <div class="blank"></div>
      </div>
    </div>
  </div>
  <div class="AreaR">
    <div id="focus">
<style type="text/css"> 
.slide {
float:left;
position:relative;
width:578px;
/* width:563px; */
/* width:576px; */
/* width:579px; */
margin:0px 0px 0px 0px;
height:247px;
}
.slide div a img {
width:578px;
FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0);
}
.slide .bigon{
background:#9B040D;
color:white;
border:1px solid #9B040D;
height:15px;
line-height:15px;
/* 
filter: alpha(opacity=80); 
-moz-opacity: .8;
KhtmlOpacity: .8;
opacity: .8;
*/
}
.slide .bigoff{
background:white;
color:#FF0066;
border:1px solid #FF3300;
height:15px;
line-height:15px;
/*
filter: alpha(opacity=70);
-moz-opacity: .7;
KhtmlOpacity: .7;
opacity: .7;
*/
}
.slide .bigoff a{
background:#333;
color:#fff;
height:15px;
line-height:15px;
}
.slide .bigon a{
background:#fff;
color:#666;
height:15px;
line-height:15px;
}
.slide .focusimg_number{
position:absolute;
right:15px;
bottom:7px;
z-index:6;
font-size:14px;
}
</style>
<script type="text/javascript"> 
/* 加载：my namespace  */
if(!myApp)	{var myApp = {};}
if(!myApp.tab){myApp.tab = {};}
if(!myApp.instance){myApp.instance = {};}
myApp.onload_source = [	'object_beget', 'add_method' ];
myApp.object_beget =  function() {
if(typeof Object.beget !== 'function') {
Object.beget = function(o) {
var F = function(){};
F.prototype = o;
return new F();
};
}
};
myApp.add_method = function(){
Function.prototype.method = function (name, func) {
if(!this.prototype[name]) {
this.prototype[name] = func;
}
};
};
myApp.onload =  function() {
for(var i = 0; i < this.onload_source.length; i++){
this[this.onload_source[i]]();
}
};
myApp.onload();
myApp.slide = {
index:0,
total:3,

set_interval:3000,
set_tmp_auto_object:{},
next:function(){
this.index = this.index > this.total - 1 ? 0 : this.index;
this.doAnything();
this.index++;
},
doAnything:function(){},
setAuto:function()	{},
clearAuto:function(k){
clearInterval(this.set_tmp_auto_object);
if(k != null){
this.index = k;
this.next();
}
}
};
</script>
      <div id="f_a" class="slide">
         <? $i = 0; ?>         <? if(is_array($this->getfocus(10))) { foreach($this->getfocus(10) as $value) { ?>       
         <? if($i==1) { ?>
          <div style="display:block;">
          <a href="<?=$value['url']?>" target="_blank" border="0" onmouseout="myApp.instance.slide.setAuto();" onmouseover="myApp.instance.slide.clearAuto(<?=$i?>);" style="FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0)"><img src="<?=$value['pic']?>"  width="578"  height="254" /></a>
          </div>
         <? } else { ?>
          <div style="display:none;">
          <a href="<?=$value['url']?>" target="_blank" border="0" onmouseout="myApp.instance.slide.setAuto();" onmouseover="myApp.instance.slide.clearAuto(<?=$i?>);" style="FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0)"><img src="<?=$value['pic']?>"  width="578"  height="254" /></a>
          </div>
         <? } ?> 
         <? $i++; ?>                  
         <? } } ?> 
      

<script type="text/javascript"> 
myApp.instance.slide = Object.beget(myApp.slide);
myApp.instance.slide.total = <?=$i?>;
</script>

        <div class="focusimg_number">
          <table id="num_tag" cellspacing="1" cellpadding="0" border="0" align="right" height="19px">
            <tr>
         <? $i=0; ?>         <? if(is_array($this->getfocus(10))) { foreach($this->getfocus(10) as $value) { ?>       
<td align="center" style="cursor:pointer;font-size:12px;width:15px;height:15px;" onmouseout="myApp.instance.slide.setAuto();" onmouseover="myApp.instance.slide.clearAuto(<?=$i?>);" class="bigoff"><?=$i+1;; ?></td>
         <? $i++; ?>         <? } } ?> 
            </tr>
          </table>
        </div>
      </div>
      <script type="text/javascript"> 
myApp.instance.slide.doAnything = function(){
var showNum=document.getElementById("num_tag");
for(var i=0;i<this.total;i++){
if(this.index==i){
showNum.getElementsByTagName("td")[i].className='bigon';
}else{
showNum.getElementsByTagName("td")[i].className='bigoff';
}
}
try{
with(f_a){
children[this.index].getElementsByTagName("img")[0].filters[0].Apply();
for(i=0;i<this.total;i++)
i==this.index?children[i].style.display="block":children[i].style.display="none";
children[this.index].getElementsByTagName("img")[0].filters[0].Play();
}
}catch(e){
var divlist=document.getElementById("f_a").getElementsByTagName("div");
for(i=0;i<this.total;i++){
i==this.index?divlist[i].style.display="block":divlist[i].style.display="none";
}
}
};
myApp.instance.slide.setAuto = function()	{
this.set_tmp_auto_object = setInterval("myApp.instance.slide.next()", myApp.instance.slide.set_interval);
};
myApp.instance.slide.setAuto();
</script>
    </div>
    <div id="mallNews" class="f_r">
      <ul>
        <div class="tit"><img src="<?=$this->tempdir?>images/gonggao_tit1.gif"></div>
              <? if(is_array($this->getnews(1,8,22))) { foreach($this->getnews(1,8,22) as $value) { ?>                          
<li> <a href="<?=$value['url']?>"><?=$value['title']?>...</a> </li>          
             <? } } ?>         
      </ul>
    </div>
    <div class="blank"></div>
    <div class="hot_list">
      <div class="hot_list_in">
        <div class="tit"><img src="<?=$this->tempdir?>images/sale_tit.gif"></div>
        <div class="hot_list_box">
<script language="javascript"> 
function Marquee()
{
this.ID = document.getElementById(arguments[0]);
this.Direction = arguments[1];
this.Step = arguments[2];
this.Width = arguments[3];
this.Height = arguments[4];
this.Timer = arguments[5];
this.WaitTime = arguments[6];
this.StopTime = arguments[7];
if(arguments[8])
this.ScrollStep = arguments[8]
else
this.ScrollStep = this.Direction>1 ? this.Width : this.Height;
this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
this.ID.noWrap = true;
this.ID.style.width = this.Width;
this.ID.style.height = this.Height;
this.ClientScroll = this.Direction>1 ? this.ID.scrollWidth : this.ID.scrollHeight;
this.ID.innerHTML += this.ID.innerHTML;
this.Start(this,this.Timer,this.WaitTime,this.StopTime);
}
Marquee.prototype.Start = function(msobj,timer,waittime,stoptime)
{
msobj.StartID = function(){msobj.Scroll()}
msobj.Continue = function()
{
if(msobj.MouseOver == 1)
{
setTimeout(msobj.Continue,waittime);
}
else
{	clearInterval(msobj.TimerID);
msobj.CTL = msobj.Stop = 0;
msobj.TimerID = setInterval(msobj.StartID,timer);
}
}
msobj.Pause = function()
{
msobj.Stop = 1;
clearInterval(msobj.TimerID);
setTimeout(msobj.Continue,waittime);
}
msobj.Begin = function()
{
msobj.TimerID = setInterval(msobj.StartID,timer);
msobj.ID.onmouseover = function()
{
msobj.MouseOver = 1;
clearInterval(msobj.TimerID);
}
msobj.ID.onmouseout = function()
{
msobj.MouseOver = 0;
if(msobj.Stop == 0)
{
clearInterval(msobj.TimerID);
msobj.TimerID = setInterval(msobj.StartID,timer);
}
}
}
setTimeout(msobj.Begin,stoptime);
}
Marquee.prototype.Scroll = function()
{
switch(this.Direction)
{
case 0:
this.CTL += this.Step;
if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
{
this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL;
this.Pause();
return;
}
else
{   
if(this.ID.scrollTop >= this.ClientScroll)
{
this.ID.scrollTop -= this.ClientScroll;
}
this.ID.scrollTop += this.Step;
}
break;
case 1:
this.CTL += this.Step;
if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
{
this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL;
this.Pause();
return;
}
else
{
if(this.ID.scrollTop <= 0)
{
this.ID.scrollTop += this.ClientScroll;
}
this.ID.scrollTop -= this.Step;
}
break;
case 2:
this.CTL += this.Step;
if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
{
this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL;
this.Pause();
return;
}
else
{
if(this.ID.scrollLeft >= this.ClientScroll)
{
this.ID.scrollLeft -= this.ClientScroll;
}
this.ID.scrollLeft += this.Step;
}
break;
case 3:
this.CTL += this.Step;
if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
{
this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL;
this.Pause();
return;
}
else
{
if(this.ID.scrollLeft <= 0)
{
this.ID.scrollLeft += this.ClientScroll;
}
this.ID.scrollLeft -= this.Step;
}
break;
}
}
-->
</script>
          <DIV id=textdiv style="margin-top:-4px; overflow:hidden; height:183px;">
            <DIV id=lr>
              <div>
                <div class="cxtj2">
                   
       <? if(is_array($this->getshop(0,12))) { foreach($this->getshop(0,12) as $value) { ?>        
                  <div class="goodsItem" > <a href="<?=$value['url']?>"><img src="<?=$value['pic']?>" class="goodsimg" /></a><br />
                    <p class="name"><a href="<?=$value['url']?>"><?=$value['name']?></a></p>
                    <font class="market">市场价： ￥<?=$value['market']?>元</font><br />
                    <img src="<?=$this->tempdir?>images/pic1.gif"><font class="f1">￥<?=$value['money']?>元 </font> </div>
       <? } } ?>    
                    
                    
                </div>
              </div>
            </DIV>
          </DIV>
<script defer> 
  new Marquee("textdiv",0,4,567,183,1,3000,1)
</script>
        </div>
      </div>
    </div>
    <div class="f_r new_right">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td>
            <div style="width:197px;height:108px;border:1px solid #ccc;"><?=$this->getads('首页新品右_1'); ?></div>
            <div style="width:197px;height:108px;border:1px solid #ccc;margin-top:6px;"><?=$this->getads('首页新品右_2'); ?></div>
           </td>
        </tr>
      </table>
    </div>
  </div>
</div>
<div class="blank"></div>
<div class="block clearfix">
  <table width="985" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="222" align="center" valign="top" class="bk"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="29" align="left" valign="bottom"><img src="<?=$this->tempdir?>images/index_74.jpg" width="99" height="22" /></td>
          </tr>
        </table>
        <table width="960" border="0" cellpadding="0" cellspacing="0" align="center">
          <tr>
            <td height="191"><div id="demo" style="OVERFLOW: hidden; WIDTH: 960px; COLOR: #000000">
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                    <TR>
                      <TD id=demo1 vAlign=top align=middle><TABLE cellSpacing=5 cellPadding=2 border=0>
                          <TBODY>
                            <TR id=scroll_body align=middle>
                            <? if(is_array($this->getcompany(0,30))) { foreach($this->getcompany(0,30) as $value) { ?>                  
                              <TD class=kuang align=middle><table width="34%" border="0" cellpadding="5" cellspacing="0" class="bk">
                                  <tr>
                                    <td align="center"><a href="<?=$value['url']?>"><img src="<?=$value['pic']?>" width="161" height="125" class="tc5" /></a></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="center"><?=$value['name']?></td>
                                  </tr>
                                </table></TD>
                              <? } } ?>  
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                      <TD id=demo2 vAlign=top></TD>
                    </TR>
                  </TBODY>
                </TABLE>
              </div>
<script language=javascript type="text/javascript">
 function rightA(){ 
 if(demo.scrollLeft<=0) 
 demo.scrollLeft+=demo2.offsetWidth 
 else{ 
 demo.scrollLeft-- 
 } 
 } 
 function Hright() 
 { 
   ouringht=setInterval(Marquee,speed); 
 } 
 var speed=1 
 demo2.innerHTML=demo1.innerHTML 
 function Marquee(){ 
 if(demo2.offsetWidth-demo.scrollLeft<=0) 
 demo.scrollLeft-=demo1.offsetWidth; 
 else{ 
 demo.scrollLeft++; 
 } 
 } 
 var MyMar=setInterval(Marquee,speed) 
 demo.onmouseover=function() {clearInterval(MyMar)} 
 demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
 function abcd() 
  { 
  clearInterval(MyMar); 
   MyMar=setInterval(rightA,speed) 
  } 
  function abcde() 
  { 
  clearInterval(MyMar); 
   MyMar=setInterval(Marquee,speed) 
}
var i=0;
</script></td>
          </tr>
        </table></td>
    </tr>
  </table>
</div>
<div class="blank"></div>
<div class="block clearfix">
  <div class="AreaL">
    <div class="box">
      <h3>
        <div class="h3_l">
          <div class="h3_r"><span>商品排行榜</span></div>
        </div>
      </h3>
      <div class="box_1" style="padding:0px">
        <div class="top10List" style="padding-top:4px">

       <? if(is_array($this->getshop(1,6))) { foreach($this->getshop(1,6) as $value) { ?> 
          <ul class="clearfix" style="overflow:hidden;padding-left:0px;margin-left:0px;height:84px;" >
            <li class="topimg" style="overflow:hidden;padding-left:0px;margin-left:0px;" > <a href="<?=$value['url']?>"><img src="<?=$value['pic']?>" width="70" height="70" style="border:1px solid #e2e2e2;"/></a> </li>
            <li style="float:left; width:105px; padding:0; margin-left:5px;"> <a href="<?=$value['url']?>"><?=$value['name']?></a> <br />
              <strong> <font class="f1">市场价：<?=$value['market']?>元</font><br />
              <font class="f1">会员价：<?=$value['money']?>元 </font><br />
              <font class="f1"></font><br />
              </strong> </li>
          </ul>
       <? } } ?>              
          
        </div>
      </div>
    </div>

    <div class="blank"></div>
    <div class="box">
      <h3>
        <div class="h3_l">
          <div class="h3_r"><span>合作品牌</span></div>
        </div>
      </h3>
      <div class="box_1" style="height:510px">
        <div class="brands_in_box">
          <div class="blank" style="height:0px; overflow:hidden"></div>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1309295463823311197.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1307653321573975853.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1318533303882677454.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295463595514964596.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1318532230697477918.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295477032151546473.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1322677593262447298.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1279725754637886647.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1318029049823407749.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1323793209364562172.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1322688778834683493.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1318184646255655339.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1307500099368092975.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295476970422929802.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295477372353299148.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1298325252307085039.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295474232089957138.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295477051918842337.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1274465570136907450.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1307502557981266514.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1322676939784232962.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1298480133504846262.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1309728970150275674.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1322677223470681384.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1279640387616304182.jpg"/>
          <img class="img_li" src="<?=$this->tempdir?>images/brandlogo/1295474530259194787.jpg"/>
         </div>
      </div>
    </div>
    <div class="blank"></div>
    <div class="box">
      <h3>
        <div class="h3_l">
          <div class="h3_r"><span>选择我们六大理由</span></div>
        </div>
      </h3>
      <div class="box_1"  style="height:519px; overflow:hidden;padding:0px;">
        <div class="brands_in_box" style="padding-top:3px;padding-bottom:0px;"><img src="<?=$this->tempdir?>images/1021.jpg"></div>
      </div>
    </div>
  </div>
  <div class="AreaR">
  <? $i=0; if(is_array($this->getshoptype(6))) { foreach($this->getshoptype(6) as $val) { ?>     <? $i++; ?>  
    <? if($i>1) { ?><div class="blank"></div><? } ?>
    <div class="goods_cat goods_cat_<?=$i?>">
      <dl class="tit">
        <dt> <span><?=$i?>F.</span> <a href="<?=Purl("?mod=shop&act=main&typeid=".$i); ?>"><?=$val['typename']?></a> </dt>
        <div class="more"><a href="<?=Purl("?mod=shop&act=main&typeid=".$i); ?>">更多商品>></a></div>
      </dl>
      <div class="goods_cat_box clearfix">
      
        <div class="f_r">
          <table cellpadding="0" cellspacing="0">
            <tr>
              <td><?=$this->getads('首页产品左_'.$i); ?></td>
            </tr>
          </table>
        </div>
      
        <div class="f_l">        
       <? if(is_array($this->getshop(0,4,$val['id']))) { foreach($this->getshop(0,4,$val['id']) as $value) { ?>        
          <div class="goodsItem"  style="background:url(<?=$this->tempdir?>images/line_1.gif) right center no-repeat;"> 
              <a href="<?=$value['url']?>"><img src="<?=$value['pic']?>" class="goodsimg" /></a><br />
            <p class="name"><a href="<?=$value['url']?>"><?=$value['name']?></a></p>
            <font class="market">市场价： ￥<?=$value['market']?>元</font> <br />
            <font class="f1">会员价：<strong>￥<?=$value['money']?>元</strong></font> </div>                    
       <? } } ?>   
        </div>
      </div>
    </div>
    <? } } ?> 
  </div>
</div>
<? include template('footer','wjgw'); ?>
