function featuredcontentslider_init(a){featuredcontentslider.init(a)}var featuredcontentslider={settingcaches:{},init:function(a){if(this.$(a.id)==null){return}this.settingcaches[a.id]=a;a.contentdivs=[];a.toclinks=[];a.topzindex=0;a.currentpage=a.playtab||1;a.prevpage=a.currentpage;a.etype="on"+(a.revealtype||"click");a.onChange=a.onChange||function(){};a.curopacity=0;a.overflow=a.overflow||"hidden";a.delay=a.delay==undefined?(a.revealtype=="mouseover"?150:0):a.delay;a.link=a.link||false;a.contentclass=a.contentclass||"contentdiv";this.buildpaginate(a)},buildpaginate:function(p){this.buildcontentdivs(p);var h=this.$(p.id),m=this.$("paginate-"+p.id),k="",d=p.toc,a=p.nextprev;if(typeof d=="string"&&d!="markup"&&d!="scroll"||typeof d=="object"){for(var e=1;e<=p.contentdivs.length;e++){k+='<i class="iToc iToc'+e+'"><a href="#'+e+'" class="toc">'+(typeof d=="string"?d.replace(/#increment/,e):d[e-1])+"</a></i> "}k=(a[0]!=""?'<i class="iToc iToc'+e+'"><a href="#prev" class="prev">'+a[0]+"</a></i> ":"")+k+(a[1]!=""?'<i class="iToc iToc'+e+'"><a href="#next" class="next">'+a[1]+"</a></i>":"");m.innerHTML='<i class="subLineTab"></i><span class="subPageTab">'+k+"</span>"}var g=[],b=m.getElementsByTagName("*");for(var e=0;e<b.length;e++){if(b[e].nodeType==1&&!b[e].getAttribute("disabled")){g.push(b[e])}}var j=0,n=this;for(var e=0;e<g.length;e++){if(this.css(g[e],"toc","check")){if(j>p.contentdivs.length-1){g[e].style.display="none";continue}if(d=="scroll"){if(!j){var f=m.getElementsByTagName("div");this.masker=f[0];this.maskee=f[1];this.thumbWidth=[0]}var l=this.thumbWidth,c=g[e];c.style.styleFloat=c.style.cssFloat="left";l.push(l[l.length-1]+c.offsetWidth+this.style(c,"marginLeft",true)+this.style(c,"marginRight",true)+this.style(c,"borderLeftWidth",true)+this.style(c,"borderRightWidth",true))}g[e].setAttribute("rel",++j);g[e]["onclick"]=function(){return p.link||false};g[e][p.etype]=function(){var i=this.getAttribute("rel");if(n.delayTimer){window.clearTimeout(n.delayTimer)}n.delayTimer=window.setTimeout(function(){featuredcontentslider.turnpage(p,i)},p.delay);p.link||false};g[e]["onmouseout"]=function(){if(n.delayTimer){window.clearTimeout(n.delayTimer)}};p.toclinks.push(g[e])}else{if(this.css(g[e],"prev","check")||this.css(g[e],"next","check")){g[e].onclick=function(){featuredcontentslider.turnpage(p,this.className);return false}}}}this.turnpage(p,p.currentpage,true);if(p.autorotate[0]){m[p.etype]=function(){return false};h.onmouseover=m.onmouseover=function(){featuredcontentslider.cleartimer(p,window["fcsautorun"+p.id]);return true};h.onmouseout=m.onmouseout=function(){featuredcontentslider.autorotate(p);return true};p.autorotate[1]=p.autorotate[1]+(1/p.enablefade[1]*80);this.autorotate(p)}},buildcontentdivs:function(b){var c=this.$(b.id).getElementsByTagName("div");for(var a=0;a<c.length;a++){if(this.css(c[a],b.contentclass,"check")){b.contentdivs.push(c[a]);c[a].style.display="none";c[a].style.overflow=b.overflow}}},jumpTo:function(b,a){this.turnpage(this.settingcaches[b],a)},turnpage:function(r,i,p){var e=r.currentpage,g=r.contentdivs,j=g.length,m=(/prev/i.test(i))?e-1:(/next/i.test(i))?e+1:i|0;m=(m<1)?j:(m>j)?1:m;if(m==r.currentpage&&typeof p=="undefined"){return}r.currentpage=m;g[r.prevpage-1].style.display="none";g[m-1].style.zIndex=++r.topzindex;this.cleartimer(r,window["fcsfade"+r.id]);r.cacheprevpage=r.prevpage;if(r.enablefade[0]){r.curopacity=0;this.fadeup(r)}if(r.enablefade[0]==false){r.onChange(r.prevpage,r.currentpage)}g[m-1].style.visibility="visible";g[m-1].style.display="block";if(r.prevpage<=r.toclinks.length){this.css(r.toclinks[r.prevpage-1],"selected","remove")}if(m<=r.toclinks.length){this.css(r.toclinks[m-1],"selected","add")}r.prevpage=m;if(r.toc=="scroll"){var a=this,c=0.25,n=20,l=a.masker.clientWidth,h=r.contentdivs.length,d=r.toclinks[m-1],q=this.thumbWidth[this.thumbWidth.length-1],m=l/2-d.offsetWidth/2-this.thumbWidth[m-1],k=a.maskee.currentStyle?a.maskee.currentStyle.marginLeft:window.getComputedStyle(a.maskee,"").getPropertyValue("margin-left");k=k.substr(0,k.length-2)|0;m=m<=l-q?l-q:m;m=m>0?0:m;function b(){k+=(m-k)*c;if(Math.round(m-k)==0){window.clearInterval(a.thumbTimer);return}a.maskee.style.marginLeft=Math.ceil(k)+"px"}if(a.thumbTimer){window.clearInterval(a.thumbTimer)}a.thumbTimer=window.setInterval(b,n)}},setopacity:function(a,c){var b=a.contentdivs[a.currentpage-1];b.className=a.contentclass+" sliderfilter";b.style.cssText+=";filter:alpha(opacity="+c*100+");-moz-opacity:"+c+";opacity:"+c;a.curopacity=c},fadeup:function(a){if(a.curopacity<=0.95){this.setopacity(a,a.curopacity+a.enablefade[1]);window["fcsfade"+a.id]=setTimeout(function(){featuredcontentslider.fadeup(a)},25)}else{this.setopacity(a,1);var b=a.contentdivs[a.currentpage-1];b.className="contentdiv";if(a.cacheprevpage!=a.currentpage){a.contentdivs[a.cacheprevpage-1].style.display="none"}a.onChange(a.cacheprevpage,a.currentpage)}},cleartimer:function(a,b){if(b){clearTimeout(b);clearInterval(b);if(a.cacheprevpage!=a.currentpage){a.contentdivs[a.cacheprevpage-1].style.display="none"
}}},css:function(b,a,c){var d=new RegExp("(^|\\s+)"+a+"($|\\s+)","ig");if(c=="check"){return d.test(b.className)}else{if(c=="remove"){b.className=b.className.replace(d,"")}else{if(c=="add"){b.className+=" "+a}}}},style:function(c,d,b){var a;if(c.currentStyle){a=c.currentStyle[d]}else{if(window.getComputedStyle){d=d.replace(/([A-Z])/g,"-$1");d=d.toLowerCase();a=window.getComputedStyle(c,"").getPropertyValue(d)}}return !b?a:a.substr(0,a.length-2)|0},autorotate:function(a){window["fcsautorun"+a.id]=setInterval(function(){featuredcontentslider.turnpage(a,"next")},a.autorotate[1])},$:function(a){return document.getElementById(a)}};var pc_={$:function(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval("document.all."+objName)}},isIE:navigator.appVersion.indexOf("MSIE")!=-1?true:false,addEvent:function(a,c,b){if(a.attachEvent){a.attachEvent("on"+c,b)}else{a.addEventListener(c,b,false)}},delEvent:function(a,c,b){if(a.detachEvent){a.detachEvent("on"+c,b)}else{a.removeEventListener(c,b,false)}},readCookie:function(d){var e="",a=d+"=";if(document.cookie.length>0){var c=document.cookie.indexOf(a);if(c!=-1){c+=a.length;var b=document.cookie.indexOf(";",c);if(b==-1){b=document.cookie.length}e=unescape(document.cookie.substring(c,b))}}return e},writeCookie:function(d,a,f,g){var e="",b="";if(f!=null){e=new Date((new Date).getTime()+f*3600000);e="; expires="+e.toGMTString()}if(g!=null){b=";domain="+g}document.cookie=d+"="+escape(a)+e+b},readStyle:function(b,a){if(b.style[a]){return b.style[a]}else{if(b.currentStyle){return b.currentStyle[a]}else{if(document.defaultView&&document.defaultView.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null);return c.getPropertyValue(a)}else{return null}}}}};function ScrollPic(b,g,f,e){this.scrollContId=b;this.arrLeftId=g;this.arrRightId=f;this.dotListId=e;this.dotClassName="dotItem";this.dotOnClassName="dotItemOn";this.dotObjArr=[];this.pageWidth=0;this.frameWidth=0;this.speed=10;this.space=10;this.pageIndex=0;this.autoPlay=true;this.autoPlayTime=5;var a,d,c="ready";this.stripDiv=document.createElement("DIV");this.listDiv01=document.createElement("DIV");this.listDiv02=document.createElement("DIV");if(!ScrollPic.childs){ScrollPic.childs=[]}this.ID=ScrollPic.childs.length;ScrollPic.childs.push(this);this.initialize=function(){if(!this.scrollContId){throw new Error("");return}this.scrollContDiv=pc_.$(this.scrollContId);if(!this.scrollContDiv){throw new Error("");return}this.scrollContDiv.style.width=this.frameWidth+"px";this.scrollContDiv.style.overflow="hidden";this.listDiv01.innerHTML=this.listDiv02.innerHTML=this.scrollContDiv.innerHTML;this.scrollContDiv.innerHTML="";this.scrollContDiv.appendChild(this.stripDiv);this.stripDiv.appendChild(this.listDiv01);this.stripDiv.appendChild(this.listDiv02);this.stripDiv.style.overflow="hidden";this.stripDiv.style.zoom="1";this.stripDiv.style.width="32766px";if("cssFloat" in this.listDiv01.style){this.listDiv01.style.cssFloat="left";this.listDiv02.style.cssFloat="left"}else{this.listDiv01.style.styleFloat="left";this.listDiv02.style.styleFloat="left"}pc_.addEvent(this.scrollContDiv,"mouseover",Function("ScrollPic.childs["+this.ID+"].stop()"));pc_.addEvent(this.scrollContDiv,"mouseout",Function("ScrollPic.childs["+this.ID+"].play()"));if(this.arrLeftId){this.arrLeftObj=pc_.$(this.arrLeftId);if(this.arrLeftObj){pc_.addEvent(this.arrLeftObj,"mousedown",Function("ScrollPic.childs["+this.ID+"].rightMouseDown()"));pc_.addEvent(this.arrLeftObj,"mouseup",Function("ScrollPic.childs["+this.ID+"].rightEnd()"));pc_.addEvent(this.arrLeftObj,"mouseout",Function("ScrollPic.childs["+this.ID+"].rightEnd()"))}}if(this.arrRightId){this.arrRightObj=pc_.$(this.arrRightId);if(this.arrRightObj){pc_.addEvent(this.arrRightObj,"mousedown",Function("ScrollPic.childs["+this.ID+"].leftMouseDown()"));pc_.addEvent(this.arrRightObj,"mouseup",Function("ScrollPic.childs["+this.ID+"].leftEnd()"));pc_.addEvent(this.arrRightObj,"mouseout",Function("ScrollPic.childs["+this.ID+"].leftEnd()"))}}if(this.dotListId){this.dotListObj=pc_.$(this.dotListId);if(this.dotListObj){var h=Math.round(this.listDiv01.offsetWidth/this.frameWidth+0.4),k,j;for(k=0;k<h;k++){j=document.createElement("span");this.dotListObj.appendChild(j);this.dotObjArr.push(j);if(k==this.pageIndex){j.className=this.dotClassName}else{j.className=this.dotOnClassName}j.title="µÚ"+(k+1)+"Ò³";pc_.addEvent(j,"click",Function("ScrollPic.childs["+this.ID+"].pageTo("+k+")"))}}}if(this.autoPlay){this.play()}};this.leftMouseDown=function(){if(c!="ready"){return}c="floating";d=setInterval("ScrollPic.childs["+this.ID+"].moveLeft()",this.speed)};this.rightMouseDown=function(){if(c!="ready"){return}c="floating";d=setInterval("ScrollPic.childs["+this.ID+"].moveRight()",this.speed)};this.moveLeft=function(){if(this.scrollContDiv.scrollLeft+this.space>=this.listDiv01.scrollWidth){this.scrollContDiv.scrollLeft=this.scrollContDiv.scrollLeft+this.space-this.listDiv01.scrollWidth
}else{this.scrollContDiv.scrollLeft+=this.space}this.accountPageIndex()};this.moveRight=function(){if(this.scrollContDiv.scrollLeft-this.space<=0){this.scrollContDiv.scrollLeft=this.listDiv01.scrollWidth+this.scrollContDiv.scrollLeft-this.space}else{this.scrollContDiv.scrollLeft-=this.space}this.accountPageIndex()};this.leftEnd=function(){if(c!="floating"){return}c="stoping";clearInterval(d);var h=this.pageWidth-this.scrollContDiv.scrollLeft%this.pageWidth;this.move(h)};this.rightEnd=function(){if(c!="floating"){return}c="stoping";clearInterval(d);var h=-this.scrollContDiv.scrollLeft%this.pageWidth;this.move(h)};this.move=function(i,j){var k=i/5;if(!j){if(k>this.space){k=this.space}if(k<-this.space){k=-this.space}}if(Math.abs(k)<1&&k!=0){k=k>=0?1:-1}else{k=Math.round(k)}var h=this.scrollContDiv.scrollLeft+k;if(k>0){if(this.scrollContDiv.scrollLeft+k>=this.listDiv01.scrollWidth){this.scrollContDiv.scrollLeft=this.scrollContDiv.scrollLeft+k-this.listDiv01.scrollWidth}else{this.scrollContDiv.scrollLeft+=k}}else{if(this.scrollContDiv.scrollLeft-k<=0){this.scrollContDiv.scrollLeft=this.listDiv01.scrollWidth+this.scrollContDiv.scrollLeft-k}else{this.scrollContDiv.scrollLeft+=k}}i-=k;if(Math.abs(i)==0){c="ready";if(this.autoPlay){this.play()}this.accountPageIndex();return}else{this.accountPageIndex();setTimeout("ScrollPic.childs["+this.ID+"].move("+i+","+j+")",this.speed)}};this.next=function(){if(c!="ready"){return}c="stoping";this.move(this.pageWidth,true)};this.play=function(){if(!this.autoPlay){return}clearInterval(a);a=setInterval("ScrollPic.childs["+this.ID+"].next()",this.autoPlayTime*1000)};this.stop=function(){clearInterval(a)};this.pageTo=function(h){if(c!="ready"){return}c="stoping";var i=h*this.frameWidth-this.scrollContDiv.scrollLeft;this.move(i,true)};this.accountPageIndex=function(){this.pageIndex=Math.round(this.scrollContDiv.scrollLeft/this.frameWidth);if(this.pageIndex>Math.round(this.listDiv01.offsetWidth/this.frameWidth+0.4)-1){this.pageIndex=0}var h;for(h=0;h<this.dotObjArr.length;h++){if(h==this.pageIndex){this.dotObjArr[h].className=this.dotClassName}else{this.dotObjArr[h].className=this.dotOnClassName}}}};
