var browse = window.navigator.appName.toLowerCase();
var MyMar;
var speed = 1; //速度,越大越慢
var spec = 1; //每次滾動(dòng)的間距, 越大滾動(dòng)越快
var minOpa = 100; //濾鏡最小值
var maxOpa = 100; //濾鏡最大值
var spa = 2; //縮略圖區(qū)域補(bǔ)充數(shù)值
var w = 0;
spec = (browse.indexOf("microsoft") > -1) ? spec : ((browse.indexOf("opera") > -1) ? spec*10 : spec*20);
function $(e) {return document.getElementById(e);}
function goleft() {$('photos').scrollLeft -= spec;}
function goright() {$('photos').scrollLeft += spec;}
function setOpacity(e, n) {
if (browse.indexOf("microsoft") > -1) e.style.filter = 'alpha(opacity=' + n + ')';
else e.style.opacity = n/100;
}
$('goleft').style.cursor = 'pointer';
$('goright').style.cursor = 'pointer';
$('mainphoto').onmouseover = function() {setOpacity(this, maxOpa);}
$('mainphoto').onmouseout = function() {setOpacity(this, minOpa);}
$('mainphoto').onclick = function() {location = this.getAttribute('name');}
$('goleft').onmouseover = function() {this.src = 'http://download.makewing.com/lanren/code/jsphotobook/images/goleft2.gif'; MyMar=setInterval(goleft, speed);}
$('goleft').onmouseout = function() {this.src = 'http://download.makewing.com/lanren/code/jsphotobook/images/goleft.gif'; clearInterval(MyMar);}
$('goright').onmouseover = function() {this.src = 'http://download.makewing.com/lanren/code/jsphotobook/images/goright2.gif'; MyMar=setInterval(goright,speed);}
$('goright').onmouseout = function() {this.src = 'http://download.makewing.com/lanren/code/jsphotobook/images/goright.gif'; clearInterval(MyMar);}
window.onload = function() {
setOpacity($('mainphoto'), minOpa);
var rHtml = '';
var p = $('showArea').getElementsByTagName('img');
for (var i=0; i
';
}
$('showArea').style.width = parseInt(w) + 'px';
var rLoad = document.createElement("div");
$('photos').appendChild(rLoad);
rLoad.style.width = "0px";
rLoad.style.height = "1px";
rLoad.style.overflow = "hidden";
rLoad.innerHTML = rHtml;
}