var imgArr='/UploadFiles/2010-11/admin/2010112712511954789.jpg|/UploadFiles/2010-11/admin/2010112712512514447.jpg|/UploadFiles/2010-11/admin/2010112712512910155.jpg|/UploadFiles/2010-11/admin/2010112911401916539.jpg|/UploadFiles/2010-11/admin/201011291140269638.jpg|'.split('|');
var introArr='|||||'.split('|');
var currPage=1;
function showImg(n){
if (n<=0) return;
if (n>5) n=1;
currPage=n;
$("#scrool_wrap").find("a").attr("class","normalthumb");
$("#t"+n).addClass("currthumb");
$("#currpa").html(n);
$("#currp").html(n);
$("#ShowLargeImg").hide().attr("src",imgArr[n-1]).fadeIn('slow');
$(".imageintro").html(introArr[n-1]);
}
function prev(){
showImg(currPage-1);
}
function next(){
showImg(currPage+1);
}
function upNext(bigimg){
var imgurl = 1;
var width = bigimg.width;
var height = bigimg.height;
bigimg.onmousemove=function(){
if(event.offsetX
=interval/1000) num=-1;
}
function playNextPic(stat) {
if(stat || replay) {
derId = window.setInterval('derivativeNum();', 1000);
$$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
$$('playid').onclick = function (){replay = false;playNextPic(false);};
$$('playid').innerHTML = '停止播放';
timerId = window.setInterval('next();', interval);
} else {
replay = true;
num = 0;
$$('playid').innerHTML = '幻灯播放';
$$('playid').onclick = function (){playNextPic(true);};
$$('displayNum').innerHTML = '';
window.clearInterval(timerId);
window.clearInterval(derId);
}
}
var initnum=4;//每次显示张数,根据页面滚动宽度可适当调整
var scrollWrapW=130;//每次滚动距离
var iss=1;//当前张数
var l;
$(document).ready(function () {
l=$('#scrool_wrap li').length;
iss=iss-1;
$("#left").bind("click",ole);
$("#right").bind("click",ori);
var total = $('#scrool_wrap li').length;
$("#zys").html(total);
$('#scrool_wrap li').eq(iss).find('img').eq(0).addClass('curimg');
if(iss>0&&iss0){
var temscr=-scrollWrapW*(iss-1);
$("#scrool_wrap").animate({left:temscr},1000);
iss--;
}else {
olend();
}
}
function olend(){
//到底后的跳方法
alert("您已浏览完全部缩略图");
}
function orend(){
//到底后的跳方法
alert("您已浏览完全部缩略图");
}