var slideShow;$(document).ready(function(){try{slideShow=function(){var n,w,v,c,r,b,f,p,m,o,q,d,e,k,u,j,l,s,h;var g=0;f=document.getElementById(thumbid);p=document.getElementById(imgid);l=f.getElementsByTagName("li");m=document.all?true:false;o=3;q=3;d=10;e=5;k,u=0;return{init:function(){document.onmousemove=this.pos;window.onresize=function(){setTimeout("slideShow.lim()",500)};r=this.toppos(f);b=r+f.offsetHeight;len=l.length;s=[];for(i=0;i<len;i++){var t=l[i].getAttribute("rel");s[i]=t;l[i].onclick=new Function("slideShow.getimg('"+t+"')");if(i==0){this.getimg(t)}}h=s.length},scrl:function(x){clearInterval(f.timer);var t=(x==-1)?0:(l[h-1].offsetLeft-(f.parentNode.offsetWidth-l[h-1].offsetWidth)+10);f.timer=setInterval(function(){slideShow.mv(x,t)},o)},mv:function(y,t){f.style.left=f.style.left||"0px";var x=f.style.left.replace("px","");if(y==1){if(t-Math.abs(x)<=q){this.cncl(f.id);f.style.left="-"+t+"px"}else{f.style.left=x-q+"px"}}else{if(Math.abs(x)-t<=q){this.cncl(f.id);f.style.left=t+"px"}else{f.style.left=parseInt(x)+q+"px"}}},cncl:function(){clearTimeout(f.timer)},getimg:function(C){if(auto){clearTimeout(p.timer)}if(j!=null){var z,B,t;z=p.getElementsByTagName("img");B=z.length;t=0;for(t;t<B;t++){if(j.id!=C){var A=z[t];clearInterval(A.timer);A.timer=setInterval(function(){slideShow.fdout(A)},e)}}}if(!document.getElementById(C)){var y=document.createElement("img");p.appendChild(y);y.id=C;y.av=0;y.style.opacity=0;y.style.filter="alpha(opacity=0)";y.src=C+imgext}else{y=document.getElementById(C);clearInterval(y.timer)}y.timer=setInterval(function(){slideShow.fdin(y)},e)},nav:function(t){if(g==0){g=1;var x=0;for(key in s){if(s[key]==j.id){x=key}}if(s[parseInt(x)+t]){this.getimg(s[parseInt(x)+t])}else{if(t==1){this.getimg(s[0])}else{this.getimg(s[h-1])}}}},auto:function(){p.timer=setInterval(function(){slideShow.nav(1)},autodelay*1000)},fdin:function(t){if(t.complete){t.av=t.av+e;t.style.opacity=t.av/100;t.style.filter="alpha(opacity="+t.av+")"}if(t.av>=100){if(auto){this.auto()}clearInterval(t.timer);g=0;j=t}},fdout:function(t){t.av=t.av-e;t.style.opacity=t.av/100;t.style.filter="alpha(opacity="+t.av+")";if(t.av<=0){clearInterval(t.timer);if(t.parentNode){t.parentNode.removeChild(t)}}},lim:function(){var y,x,t;y=f.parentNode.offsetWidth;x=y/4;n=slideShow.leftpos(f);w=n+x;c=n+y;v=c-x},pos:function(t){k=m?event.clientX+document.documentElement.scrollLeft:t.pageX;u=m?event.clientY+document.documentElement.scrollTop:t.pageY;if(k>n&&k<w&&u>r&&u<b){slideShow.scrl(-1)}else{if(k>v&&k<c&&u>r&&u<b){slideShow.scrl(1)}else{slideShow.cncl()}}},leftpos:function(y){var x=0;if(y.offsetParent){while(1){x+=y.offsetLeft;if(!y.offsetParent){break}y=y.offsetParent}}else{if(y.x){x+=y.x}}return x},toppos:function(x){var y=0;if(x.offsetParent){while(1){y+=x.offsetTop;if(!x.offsetParent){break}x=x.offsetParent}}else{if(x.y){y+=x.y}}return y}}}();window.onload=function(){slideShow.init();slideShow.lim()}}catch(a){}});
