<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>17k-刘卿-千烨-翼</title>
<meta http-equiv=content-type content="text/html; charset=utf-8">
<style>
body,img,ol,ul{margin:0;padding:0;}
li{list-style-type:none;}
.roll {display: inline-block;overflow: hidden;width: 702px;}
.roll .LeftBotton,.roll .RightBotton  {display: inline; float: left; margin: 61px 0px 0px; overflow: hidden; width: 14px; cursor: pointer; height: 51px;background:#f00}
.roll .RightBotton {display: inline;float: right; margin: 61px 0px 0px; overflow: hidden; width: 14px; cursor: pointer; height: 51px}
.roll .Cont {padding-right: 0px; padding-left: 0px; float: left; padding-bottom: 6px; overflow: hidden; width: 660px; padding-top: 16px}
.roll .ScrCont {width: 10000000px}
.roll .Cont li {float: left; width: 131px; text-align: center}
.roll .Cont li img{border-right: #666666 1px solid; border-top: #666666 1px solid; display: block; background: #fff; margin: 0px auto; border-left: #666666 1px solid; border-bottom: #666666 1px solid;width:123px}
.roll .Cont li p {color: #505050; line-height: 30px}
.roll .Cont A:link {color: #505050; text-decoration: none}
.blk_05 .Cont A:visited {color: #505050; text-decoration: none}
.roll .Cont A:hover {color: #f00; text-decoration: none}
.roll #List1 {float: left}
.roll #List2 {float: left}
</style>
</head>
<body>
<div class="roll">
<div onmouseup="ISL_StopUp()" class="LeftBotton" onmousedown="ISL_GoUp()" onmouseout="ISL_StopUp()"></div>
                    <div class="Cont" id="ISL_Cont">
                      <div class="ScrCont">
                        <div id="List1">
                          <!-- 图片列表 begin -->
                          <ul>
                           <li><img src="http://img.17k.com/channel/ebook/27346_17.jpg" /></li>
                            <li><img src="http://img.17k.com/channel/ebook/25684_3.jpg" /></li>
                            <li><img src="http://img.17k.com/channel/ebook/30488_55.jpg" /></li>
                           <li><img src="http://img.17k.com/channel/ebook/27346_17.jpg" /></li>
                            <li><img src="http://img.17k.com/ebook/bookcover/10315.jpg" /></li>
                            <li><img src="http://img.17k.com/channel/ebook/30488_55.jpg" /></li>
                            <li><img src="http://img.17k.com/ebook/bookcover/10315.jpg" /></li>
                          </ul>                      
                          <!-- 图片列表 end -->
                        </div>
                        <div id="List2"></div>
                      </div>
                    </div>
                    <div onmouseup="ISL_StopDown()" class="RightBotton" onmousedown="ISL_GoDown()"
id="RightBotton" onmouseout="ISL_StopDown()"></div> </div>
<script language=javascript type=text/javascript> <!--//--><![CDATA[//><!--
//图片滚动列表 mengjia 070927
var Speed = 10; //速度(毫秒)
var Space = 5; //每次移动(px)
var PageWidth = 131; //翻页宽度
var fill = -5; //整体移位
var MoveLock = false;
var MoveTimeObj;
var Comp = 0;
var AutoPlayObj = null;
GetObj("List2").innerHTML = GetObj("List1").innerHTML;
GetObj('ISL_Cont').scrollLeft = fill>=0?fill:GetObj('List1').scrollWidth - Math.abs(fill);
GetObj("ISL_Cont").onmouseover = function(){clearInterval(AutoPlayObj);}
GetObj("ISL_Cont").onmouseout = function(){AutoPlay();}
AutoPlay();
function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function AutoPlay(){ //自动滚动
 clearInterval(AutoPlayObj);
 AutoPlayObj = setInterval('ISL_GoDown();ISL_StopDown();',5000); //间隔时间
}
function ISL_GoUp(){ //上翻开始
 if(MoveLock) return;
 clearInterval(AutoPlayObj);
 MoveLock = true;
 MoveTimeObj = setInterval('ISL_ScrUp();',Speed);
}
function ISL_StopUp(){ //上翻停止
 clearInterval(MoveTimeObj);
 if((GetObj('ISL_Cont').scrollLeft - fill) % PageWidth != 0){

  Comp = fill - (GetObj('ISL_Cont').scrollLeft % PageWidth);
  CompScr();
 }else{
  MoveLock = false;
 }
 AutoPlay();
}
function ISL_ScrUp(){ //上翻动作
 if(GetObj('ISL_Cont').scrollLeft <= 0){GetObj('ISL_Cont').scrollLeft = GetObj('ISL_Cont').scrollLeft + GetObj('List1').offsetWidth}
 GetObj('ISL_Cont').scrollLeft -= Space ;
}


function ISL_GoDown(){ //下翻
 clearInterval(MoveTimeObj);
 if(MoveLock) return;
 clearInterval(AutoPlayObj);
 MoveLock = true;
 ISL_ScrDown();
 MoveTimeObj = setInterval('ISL_ScrDown()',Speed);
}
function ISL_StopDown(){ //下翻停止
 clearInterval(MoveTimeObj);
 if(GetObj('ISL_Cont').scrollLeft % PageWidth - (fill>=0?fill:fill+1) != 0 ){
  Comp = PageWidth - GetObj('ISL_Cont').scrollLeft % PageWidth + fill;
  CompScr();
 }else{
  MoveLock = false;
 }
 AutoPlay();
}
function ISL_ScrDown(){ //下翻动作
 if(GetObj('ISL_Cont').scrollLeft >= GetObj('List1').scrollWidth){GetObj('ISL_Cont').scrollLeft = GetObj('ISL_Cont').scrollLeft - GetObj('List1').scrollWidth;}
 GetObj('ISL_Cont').scrollLeft += Space ;
}

function CompScr(){
 var num;
 if(Comp == 0){MoveLock = false;return;}
 if(Comp < 0){ //上翻
  if(Comp < -Space){
   Comp += Space;
   num = Space;
  }else{
   num = -Comp;
   Comp = 0;
  }
  GetObj('ISL_Cont').scrollLeft -= num;
  setTimeout('CompScr()',Speed);
 }else{ //下翻
  if(Comp > Space){
   Comp -= Space;
   num = Space;
  }else{
   num = Comp;
   Comp = 0;
  }
  GetObj('ISL_Cont').scrollLeft += num;
  setTimeout('CompScr()',Speed);
 }
}
//--><!]]> </script>  <!-- Left end --> </DIV>
</BODY></HTML>

 posted on 2008-10-06 16:27  刘卿  阅读(3036)  评论(3编辑  收藏  举报