var SLIDETIMER=6;var SLIDESPEED=6;var SCROLLTIMER=9;var SCROLLSPEED=3;var STARTINGOPACITY=30;function slideContent(e,b,d){var c=document.getElementById(e);var a=c.parentNode;clearInterval(a.timer);a.section=parseInt(e.replace(/\D/g,""));a.target=c.offsetTop;a.style.top=a.style.top||"0px";a.current=a.style.top.replace("px","");a.direction=(Math.abs(a.current)>a.target)?1:-1;a.style.opacity=STARTINGOPACITY*0.01;a.style.filter="alpha(opacity="+STARTINGOPACITY+")";a.timer=setInterval(function(){slideAnimate(a,b,d)},SLIDETIMER)}function slideAnimate(c,d,g){var e=Math.abs(c.current);var a=Math.abs(c.target);var b=c.direction;if((a-e<=SLIDESPEED&&b==-1)||(e-a<=SLIDESPEED&&b==1)){c.style.top=(c.target*-1)+"px";c.style.opacity=1;c.style.filter="alpha(opacity=100)";clearInterval(c.timer);if(c.autoscroll){setTimeout(function(){autoScroll(c.id,d,g)},g*1000)}}else{var f=(b==1)?parseInt(c.current)+SLIDESPEED:c.current-SLIDESPEED;c.current=f;c.style.top=f+"px"}}function scrollContent(f,b){var e=document.getElementById(f);clearInterval(e.timer);var d=e.getElementsByTagName("div");var c=d.length;var a;if(b==-1){a=0}else{if(c>1){a=d[c-1].offsetTop}else{a=d[c-1].offsetHeight-e.parentNode.offsetHeight+20}}e.style.opacity=STARTINGOPACITY*0.01;e.style.filter="alpha(opacity="+STARTINGOPACITY+")";e.timer=setInterval(function(){scrollAnimate(e,b,a)},SCROLLTIMER)}function scrollAnimate(d,b,a){d.style.top=d.style.top||"0px";var c=d.style.top.replace("px","");if(b==1){if(a-Math.abs(c)<=SCROLLSPEED){cancelScroll(d.id);d.style.top="-"+a+"px"}else{d.style.top=c-SCROLLSPEED+"px"}}else{if(Math.abs(c)-a<=SCROLLSPEED){cancelScroll(d.id);d.style.top=a+"px"}else{d.style.top=parseInt(c)+SCROLLSPEED+"px"}}}function cancelScroll(b){var a=document.getElementById(b);a.style.opacity=1;a.style.filter="alpha(opacity=100)";clearTimeout(a.timer)}function autoScroll(g,c,f,a){var e=document.getElementById(g);e.autoscroll=(!e.autoscroll&&!a)?false:true;if(e.autoscroll){var d=e.getElementsByTagName("div");var b=d.length;e.section=(e.section&&e.section<b)?e.section+1:1;slideContent(c+"-"+e.section,c,f)}}function cancelAutoScroll(b){var a=document.getElementById(b);a.autoscroll=false};
