function upNext(bigimg){
var lefturl = '#';
var righturl = '/html/wangzhanxiangce_62_758759079202821_2.html';
var imgurl = righturl;
var width = bigimg.width;
var height = bigimg.height;
bigimg.onmousemove=function(){
if(event.offsetX
0){//为0时不设定过期时间,浏览器关闭时cookie自动消失
var date = new Date();
var ms = objHours*3600*1000;
date.setTime(date.getTime() + ms);
str += "; expires=" + date.toGMTString();
}
document.cookie = str;
}
function getCookie(objName){//获取指定名称的cookie的值
var arrStr = document.cookie.split("; ");
for(var i = 0;i < arrStr.length;i ++){
var temp = arrStr[i].split("=");
if(temp[0] == objName) return unescape(temp[1]);
}
}
var interval = 5000;
var timerId = -1;
var derId = -1;
var replay = false;
var num = 0;
function forward() {
window.location.href = '/html/wangzhanxiangce_62_758759079202821_2.html';
}
function $$(o){
return document.getElementById(o);
}
function derivativeNum() {
num++;
$$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
}
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('forward();', interval);
addCookie("photoautoplayer", true,0);
} else {
addCookie("photoautoplayer", false,0);
replay = true;
num = 0;
$$('playid').innerHTML = '幻灯播放';
$$('playid').onclick = function (){playNextPic(true);};
$$('displayNum').innerHTML = '';
window.clearInterval(timerId);
window.clearInterval(derId);
}
}
window.onload=function(){
if (getCookie("photoautoplayer")=='true') playNextPic(true);
}
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("您已浏览完全部缩略图");
}