var config={'image-path':'/test/r/','cache-list':['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg','7.jpg','8.jpg','9.jpg','10.jpg','11.jpg','12.jpg']};var settings=function()
{var lang={'view-slide':'View Slide %n','current-slide':'Slide %n (now showing)','increment-slide':'View %inc Slide','next':'Next','previous':'Previous'};Behaviors.init(config,lang);if(Behaviors.get('#banner-rotator-image'))
{var banner_rotator=new Behaviors.Rotator({'image-id':'banner-rotator-image','info-id':'banner-rotator-info','panel-id':'banner-rotator-panel','transition-speed':1.5,'transition-resolution':30,'playback-speed':7,'show-controls':false,'show-dots':false,'change_info':false,'slides':[{'src':'1.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'2.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'3.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'4.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'5.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'6.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'7.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'8.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'9.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'10.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'11.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""},{'src':'12.jpg','alt':'','href':'','button-src':'','button-alt':'','heading':"",'text':""}]});}
Behaviors.MegaMenu.init({'rotators':[],'menu-open-pause':0.05,'menu-close-pause':10.5});};function Behaviors(){}
(function()
{var THIS=this;this.init=function(config,lang)
{if(!this.supported){return null;}
this.config=config;this.lang=lang;};this.trim=function(s)
{try{return s.replace(/^\s+|\s+$/g,'');}
catch(err){return null;}};this.defined=function(testvalue,controlvalue)
{if(typeof testvalue=='undefined')
{return false;}
if(typeof controlvalue=='undefined')
{return true;}
return testvalue!==controlvalue;};this.forevery=function(dataobject,oninstance)
{if(dataobject instanceof Array)
{for(var l=dataobject.length,i=0;i<l;i++)
{if(this.defined(oninstance(i,dataobject[i]))){break;}}}
else
{for(var i in dataobject)
{if(dataobject.hasOwnProperty(i))
{if(this.defined(oninstance(i,dataobject[i]))){break;}}}}};this.get=function(find,context,conditions)
{if(find.indexOf('#')!=-1)
{return document.getElementById(find.split('#')[1]);}
else
{if(!this.defined(context))
{context=document;}
var nodes=this.arrayifize(context.getElementsByTagName(find));if(!this.defined(conditions))
{return nodes;}
var filtered=[];this.forevery(nodes,function(i,node)
{var add=true;THIS.forevery(conditions,function(c,condition)
{var unmatch=false;if(c.charAt(0)=='!')
{unmatch=true;c=c.substr(1,c.length-1);}
var attr=c=='class'?node.className:c=='for'?node.htmlFor:node.getAttribute(c);if(attr==null||attr==''||new RegExp('(^| )\\b('+condition+')\\b( |$)','').test(attr)==unmatch)
{add=false;}});if(add==true)
{filtered.push(node);}});return filtered;}};this.arrayifize=function(nodelist)
{for(var ary=[],i=0,l=nodelist.length;i<l;i++)
{ary.push(nodelist[i]);}
return ary;};this.listen=function(element,eventname,userhandler)
{function eventhandler(e)
{if(!userhandler(e))
{try{e.preventDefault();}catch(err){}
return false;}
return true;}
if(this.defined(document.addEventListener))
{return element.addEventListener(eventname,eventhandler,false);}
else if(this.defined(document.attachEvent))
{return element.attachEvent('on'+eventname,eventhandler);}};this.appendHTML=function(html,parent)
{var tmp=document.createElement('div');tmp.innerHTML=html;return parent.appendChild(tmp.firstChild);};this.contains=function(primary,target)
{if(target==primary){return true;}
if(target==null){return false;}
else{return this.contains(primary,target.parentNode);}};this.getViewportSize=function()
{var size={'x':0,'y':0},body=Behaviors.get('body')[0];if(Behaviors.defined(window.innerWidth))
{size={'x':window.innerWidth,'y':window.innerHeight};}
else if(Behaviors.defined(document.documentElement)&&Behaviors.defined(document.documentElement.clientWidth,0))
{size={'x':document.documentElement.clientWidth,'y':document.documentElement.clientHeight};}
else
{size={'x':body.clientWidth,'y':body.clientHeight};}
return size;};this.getScrollingPosition=function()
{var scrolling={'x':0,'y':0},body=Behaviors.get('body')[0];if(Behaviors.defined(window.pageYOffset))
{scrolling={'x':window.pageXOffset,'y':window.pageYOffset};}
else if(Behaviors.defined(document.documentElement)&&Behaviors.defined(document.documentElement.scrollTop,0))
{scrolling={'x':document.documentElement.scrollLeft,'y':document.documentElement.scrollTop};}
else
{scrolling={'x':body.scrollLeft,'y':body.scrollTop};}
return scrolling;};this.getPosition=function(node)
{var position={'x':node.offsetLeft,'y':node.offsetTop};node=node.offsetParent;while(node!=null)
{position.x+=node.offsetLeft;position.y+=node.offsetTop;node=node.offsetParent;}
return position;};this.hasClass=function(element,value)
{if(element.className==null){return false;}
return new RegExp('(^| )\\b'+value+'\\b( |$)').test(element.className);};this.setClass=function(element,value)
{element.className=value;};this.addClass=function(element,value)
{if(element.className==null){element.className='';}
element.className+=(element.className==''?'':' ')+value;};this.removeClass=function(element,value)
{if(element.className==null){return;}
element.className=element.className.replace(new RegExp('[ ]?'+value,'g'),'');};this.replaceClass=function(element,oldvalue,newvalue)
{if(element.className==null){return;}
element.className=element.className.replace(new RegExp('([ ]?)'+oldvalue,'g'),'$1'+newvalue);};this.supported=false;if
(!(!this.defined(document.getElementById)||!this.defined(document.styleSheets)))
{this.supported=true;}
this.browsers={ie:this.defined(document.uniqueID)};this.browsers.ie6=this.browsers.ie&&navigator.userAgent.indexOf('MSIE 6')!=-1;this.browsers.opera=this.defined(window.opera);this.browsers.webkit=/applewebkit/i.test(navigator.userAgent);if(Behaviors.defined(config['cache-list']))
{var n=0,cache=[];Behaviors.forevery(config['cache-list'],function(i,src)
{if(Behaviors.defined(src))
{cache[n]=new Image;cache[n++].src=config['image-path']+src;}});}}).apply(Behaviors);Behaviors.MegaMenu=function(){};(function()
{var THIS=this;this.init=function(config)
{if(!Behaviors.supported){return null;}
this.config=config;this.config.intermode='specification';this.navbar=Behaviors.get('#mm');this.megamenu=null;this.pausetimer=null;this.mousetarget=null;if(Behaviors.defined(this.navbar,null))
{Behaviors.listen(this.navbar,'mouseover',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;THIS.mousetarget=getTarget(e);if(!THIS.mousetarget||!/nav\-/.test(THIS.mousetarget.id)){return true;}
if(THIS.megamenu&&THIS.mousetarget!=THIS.megamenu.navbarTarget)
{if(Behaviors.get('#'+THIS.mousetarget.id.replace('nav-','links-')))
{THIS.reset();THIS.navbarItemHandler(THIS.mousetarget,THIS.navbar);return true;}}
THIS.pausetimer=window.setTimeout(function()
{THIS.navbarItemHandler(THIS.mousetarget,THIS.navbar);},(THIS.config['menu-open-pause']*1000));return true;});Behaviors.listen(this.navbar,'mouseout',function(e)
{var related=e.relatedTarget?e.relatedTarget:e.toElement;if(!Behaviors.contains(THIS.navbar,related))
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;THIS.pausetimer=window.setTimeout(function()
{THIS.reset();},(THIS.config['menu-close-pause']*1000));}
return true;});Behaviors.listen(this.navbar,'click',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;return true;});Behaviors.listen(this.navbar,'mousedown',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;return true;});var keytype=Behaviors.browsers.webkit||Behaviors.browsers.ie?'keydown':'keypress';Behaviors.listen(this.navbar,keytype,function(e)
{var target=getTarget(e);if(!target){return true;}
return THIS.keyHandlers[THIS.config.intermode](e,target);});}
Behaviors.listen(document,'mouseup',function(e)
{if(THIS.megamenu)
{var target=e.target?e.target:e.srcElement;if(!(Behaviors.contains(THIS.megamenu,target)||Behaviors.contains(THIS.megamenu.navbarTarget,target)))
{THIS.reset();}}});var emailtrigger=Behaviors.get('#nav-emailsignup');if(Behaviors.defined(emailtrigger,null)&&Behaviors.defined(this.quicklinks,null))
{Behaviors.listen(emailtrigger,'click',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;var target=getTarget(e);if(!target){return true;}
if(THIS.megamenu&&THIS.megamenu.navbarTarget==target){THIS.reset();}
else{THIS.navbarItemHandler(target,THIS.quicklinks);}
return false;});Behaviors.listen(this.quicklinks,'mouseover',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;THIS.mousetarget=getTarget(e);if(!THIS.mousetarget||!/nav\-/.test(THIS.mousetarget.id)){return true;}
THIS.pausetimer=window.setTimeout(function()
{THIS.navbarItemHandler(THIS.mousetarget,THIS.quicklinks);},(THIS.config['menu-open-pause']*1000));return true;});Behaviors.listen(emailtrigger,'mouseout',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;return true;});Behaviors.listen(emailtrigger,'mousedown',function(e)
{window.clearTimeout(THIS.pausetimer);THIS.pausetimer=null;return true;});}};this.keyHandlers={};this.keyHandlers.prototype=function(e,target)
{document.title='keyCode = ['+e.keyCode+'] -- {'+new Date().getSeconds()+'.'+new Date().getMilliseconds()+'}';};this.keyHandlers.specification=function(e,target)
{switch(e.keyCode)
{case 40:if(!THIS.megamenu||(/nav\-/.test(target.id)&&THIS.megamenu.navbarTarget!=target))
{return THIS.navbarItemHandler(target,THIS.navbar);}
else if(!Behaviors.contains(THIS.megamenu,target))
{Behaviors.get('a',THIS.megamenu)[0].focus();return false;}
else{return doTabAction(e,target,'nextSibling');}
break;case 38:if(THIS.megamenu&&Behaviors.contains(THIS.megamenu,target))
{return doTabAction(e,target,'previousSibling');}
else{return true;}
break;case 39:if(THIS.megamenu&&Behaviors.contains(THIS.megamenu,target))
{if(Behaviors.browsers.opera&&e.shiftKey){return true;}
target=THIS.megamenu.navbarTarget;Behaviors.get('a',target)[0].focus();}
return doTabCommandAction(e,target,'nextSibling');break;case 37:if(THIS.megamenu&&Behaviors.contains(THIS.megamenu,target))
{if(Behaviors.browsers.opera&&e.shiftKey){return true;}
target=THIS.megamenu.navbarTarget;Behaviors.get('a',target)[0].focus();}
return doTabCommandAction(e,target,'previousSibling');break;}
return true;};this.navbarItemHandler=function(target,appendTo)
{if(this.megamenu&&this.megamenu.navbarTarget==target){return false;}
else if(this.megamenu){this.reset();}
var datalinks=Behaviors.get('#'+target.id.replace('nav-','links-'));if(!datalinks){return true;}
if(Behaviors.defined(this.config.rotators))
{Behaviors.forevery(this.config.rotators,function(i,rotator)
{rotator.stop();});}
var megamenu=datalinks.cloneNode(true);megamenu.navbarTarget=target;Behaviors.addClass(target,'selected');megamenu.id=target.id.replace('nav-','m_m-');Behaviors.setClass(megamenu,'m_m hidden');var h3=Behaviors.get('h3',megamenu);if(h3.length>0){Behaviors.addClass(h3[0],'structural');}
megamenu=appendTo.appendChild(megamenu);megamenu.style.left=target.offsetLeft+'px';megamenu.style.top=(target.offsetTop+target.offsetHeight-5)+'px';if(/emailsignup/.test(megamenu.id))
{megamenu.style.left=(megamenu.offsetLeft-(megamenu.offsetWidth-target.offsetWidth))+'px';}
else if(/action\-groups/.test(megamenu.id))
{var viewsize=Behaviors.getViewportSize(),scrolling=Behaviors.getScrollingPosition(),position=Behaviors.getPosition(megamenu),size={'x':megamenu.offsetWidth,'y':megamenu.offsetHeight};var diff=(position.y+size.y)-(viewsize.y+scrolling.y);if(diff>0)
{megamenu.style.top='-'+(size.y+11)+'px';}}
if(/emailsignup/.test(megamenu.id)&&Behaviors.defined(Behaviors.utilsconfig))
{Behaviors.initFormUtilities(Behaviors.utilsconfig,Behaviors.get('input',megamenu,{'type':'text'}));}
Behaviors.removeClass(megamenu,'hidden');this.megamenu=megamenu;return false;};this.reset=function()
{if(this.megamenu)
{Behaviors.removeClass(this.megamenu.navbarTarget,'selected');if(Behaviors.browsers.ie)
{this.megamenu.navbarTarget.innerHTML=this.megamenu.navbarTarget.innerHTML;}
this.megamenu.parentNode.removeChild(this.megamenu);this.megamenu=null;}};function getTarget(e)
{var target=e.target?e.target:e.srcElement;while(!/^li/i.test(target.nodeName))
{target=target.parentNode;if(!target||/^(ul)$/i.test(target.nodeName))
{return null;}}
return target;}
function getTypeSibling(node,dirSibling)
{var sibling=node[dirSibling];if(sibling)
{while(sibling&&sibling.nodeName!=node.nodeName)
{sibling=sibling[dirSibling];}
if(!sibling){return null;}
return sibling;}
return null;}
function doTabAction(e,target,dirSibling)
{if(Behaviors.browsers.opera&&e.shiftKey){return true;}
var links=Behaviors.get('a',THIS.megamenu),targetlink=Behaviors.get('a',target)[0],targetindex=-1;Behaviors.forevery(links,function(i,link)
{if(link==targetlink)
{targetindex=i;return false;}});if(targetindex==-1){return false;}
if(targetindex==0&&dirSibling=='previousSibling')
{Behaviors.get('a',THIS.megamenu.navbarTarget)[0].focus();return false;}
else if(targetindex==links.length-1&&dirSibling=='nextSibling')
{return false;}
if(dirSibling=='previousSibling'){targetindex--;}
else{targetindex++;}
links[targetindex].focus();return false;}
function doTabCommandAction(e,target,dirSibling)
{var sibling=getTypeSibling(target,dirSibling);if(!sibling)
{THIS.reset();return true;}
else
{if(!(Behaviors.browsers.opera&&e.shiftKey))
{Behaviors.get('a',sibling)[0].focus();return THIS.navbarItemHandler(sibling,THIS.navbar);}
else
{THIS.navbarItemHandler(sibling,THIS.navbar);return true;}}}}).apply(Behaviors.MegaMenu);;Behaviors.Rotator=function(specs)
{if(!Behaviors.supported){return null;}
this.specs=specs;this.image={container:Behaviors.get('#'+this.specs['image-id'])};this.image.link=Behaviors.get('*',this.image.container,{'class':'link'})[0];this.image.img=Behaviors.get('img',this.image.container)[0];Behaviors.addClass(this.image.container,'rotator-container');this.slidecounter=0;this.timer=null;this.transitioning=false;this.otype='none';if(typeof this.image.container.style.opacity!='undefined')
{this.otype='w3c';}
else if(typeof this.image.container.filters=='object')
{this.otype=(this.image.container.filters.length>0&&typeof this.image.container.filters.alpha=='object'&&typeof this.image.container.filters.alpha.opacity=='number')?'ie':'none';}
if(this.specs['playback-speed']>0)
{this.playtimer=null;this.play();}};Behaviors.Rotator.prototype={play:function()
{var self=this;this.playtimer=window.setInterval(function()
{self.goToSlide('next');},(this.specs['playback-speed']*1000));},stop:function()
{window.clearInterval(this.playtimer);this.playtimer=null;if(this.transitioning)
{window.clearInterval(this.timer);this.timer=null;this.fadeoff([this.image.container],true);}},goToSlide:function(select)
{if(select=='previous')
{var index=this.slidecounter-1;if(index<0){index=this.specs.slides.length-1;}}
else if(select=='next')
{index=this.slidecounter+1;if(index==this.specs.slides.length){index=0;}}
else{index=select;}
if(index!=this.slidecounter)
{this.doSlideTransition(index);}},doSlideTransition:function(index)
{var self=this;this.transitioning=true;var newslide=this.specs.slides[index];this.fade(false,[this.image.container],function()
{if(Behaviors.defined(newslide.href,null))
{self.image.link.href=newslide.href;}
if(Behaviors.defined(newslide.src,null))
{self.image.img.src=Behaviors.config['image-path']+newslide.src;}
if(Behaviors.defined(newslide.alt,null))
{self.image.img.alt=newslide.alt;}
self.fade(true,[self.image.container],function()
{self.slidecounter=index;self.transitioning=false;});});},fade:function(fadein,elements,oncomplete)
{var self=this;if(this.otype!='none')
{var opacity=fadein?0:1;this.timer=window.setInterval(function()
{opacity=fadein?(opacity+(1/self.specs['transition-resolution'])):(opacity-(1/self.specs['transition-resolution']));opacity=(Math.floor(opacity*100)/100);Behaviors.forevery(elements,function(i,element)
{switch(self.otype)
{case'ie':element.filters.alpha.opacity=opacity*100;break;default:element.style.opacity=opacity;}});if((fadein&&(opacity>(1-(1/self.specs['transition-resolution']))))||(!fadein&&(opacity<(0+(1/self.specs['transition-resolution'])))))
{window.clearInterval(self.timer);self.timer=null;self.fadeoff(elements,fadein);oncomplete();}},((this.specs['transition-speed']/2)*1000)/self.specs['transition-resolution']);}
else
{oncomplete();}},fadeoff:function(elements,fadein)
{Behaviors.forevery(elements,function(i,element)
{switch(self.otype)
{case'ie':element.filters.alpha.opacity=(fadein?100:0);break;default:element.style.opacity=(fadein?1:0);}});}};;Behaviors.RichScroller=function(){};(function()
{var THIS=this;this.init=function(config)
{if(!Behaviors.supported){return null;}
this.config=config;this.scrolloffset=0;this.autoscrolltimer=null;this.autoscrolltimerdelay=null;this.scroller=Behaviors.get('#scroller');Behaviors.addClass(this.scroller,'rich-scroller');this.scroller.content=Behaviors.get('*',this.scroller)[0];Behaviors.addClass(this.scroller.content,'scrolling-content');this.scroller.contentHeight=this.scroller.content.offsetHeight;this.scroller.viewportHeight=this.scroller.offsetHeight;var links=Behaviors.get('a',this.scroller.content);Behaviors.forevery(links,function(i,link)
{Behaviors.listen(link,'focus',function(e)
{var scrolloffset=(0-THIS.scroller.scrollTop);THIS.scroller.scrollTop=0;THIS.scrolloffset=scrolloffset;THIS.doContentScroll(THIS.scroller);});});this.addScrollControls(this.scroller);};function RichScrollerInstance(scroller)
{};RichScrollerInstance.prototype={};this.addScrollControls=function(scroller)
{var buttondata={'up':'scrollbar-button-up','track':'scrollbar-track','down':'scrollbar-button-down'},html='<ol class="scrollbar-controls">';Behaviors.forevery(buttondata,function(key,data)
{html+='<li class="'+data+'">'
+'<a class="'+(key=='track'?'scrollbar\-scrollbar':data)+'" href="javascript:void(\''+key+'\')">';if(key!='track'){html+='<img src="'+Behaviors.config['image-path']+data+'.png" alt="'+key+'" title="">';}
else{html+='\u00a0';}
html+='</a></li>';});html+='</ol>';scroller.controls=Behaviors.appendHTML(html,scroller);scroller.up=scroller.controls.childNodes[0];scroller.track=scroller.controls.childNodes[1];scroller.scrollbar=scroller.track.firstChild;scroller.down=scroller.controls.childNodes[2];scroller.controls.style.height=scroller.viewportHeight+'px';scroller.track.style.height=(scroller.viewportHeight-scroller.up.offsetHeight-scroller.down.offsetHeight)+'px';var barheight=(scroller.viewportHeight/scroller.contentHeight)*scroller.track.offsetHeight;if(barheight<this.config['scrollbar-minheight']){barheight=this.config['scrollbar-minheight'];}
scroller.scrollbar.style.height=barheight+'px';scroller.trackHeight=(scroller.track.offsetHeight-scroller.scrollbar.offsetHeight-1);Behaviors.listen(scroller.controls,'mousedown',function(e)
{var target=getTarget(e);if(!target){return true;}
return THIS.scrollbarActionHandler(e,target,scroller);});Behaviors.listen(document,'mouseup',function(e)
{window.clearInterval(THIS.autoscrolltimer);THIS.autoscrolltimer=null;window.clearTimeout(THIS.autoscrolldelaytimer);THIS.autoscrolldelaytimer=null;THIS.mouseposition=null;return true;});Behaviors.listen(document,'mousemove',function(e)
{if(!Behaviors.defined(THIS.mouseposition,null)){return true;}
var mouseposition={'x':e.clientX,'y':e.clientY};var diff=(mouseposition.y-THIS.mouseposition.y);var trackproportion=diff/scroller.trackHeight;var scrolloffset=THIS.scrollposition
+(0-((scroller.contentHeight-scroller.viewportHeight)*trackproportion));var dirClass=scrolloffset<=THIS.scrolloffset?'scrollbar-button-down':'scrollbar-button-up';if(distanceToExtent(scroller,dirClass)>0)
{THIS.scrolloffset=scrolloffset;THIS.doContentScroll(scroller);}
else
{THIS.scrolloffset=/up/.test(dirClass)?0:(scroller.viewportHeight-scroller.contentHeight);THIS.doContentScroll(scroller);}
return false;});this.keyisdown=false;var keytype=Behaviors.browsers.webkit||Behaviors.browsers.ie?'keydown':'keypress';Behaviors.listen(scroller.controls,keytype,function(e)
{var target=getTarget(e);if(!target){return true;}
if(Behaviors.browsers.opera&&e.shiftKey&&/^(38|40)$/.test(e.keyCode.toString())){return true;}
if(THIS.keyisdown==true){return false;}
THIS.keyisdown=true;if((/(up|down)/.test(target.className)&&e.keyCode==13)||(/scrollbar/.test(target.className)&&/^(38|40)$/.test(e.keyCode.toString())))
{THIS.scrollbarActionHandler(e,target,scroller);return false;}
return true;});Behaviors.listen(document,'keyup',function(e)
{window.clearInterval(THIS.autoscrolltimer);THIS.autoscrolltimer=null;window.clearTimeout(THIS.autoscrolldelaytimer);THIS.autoscrolldelaytimer=null;THIS.keyisdown=false;return true;});};this.scrollbarActionHandler=function(e,target,scroller)
{switch(target.className)
{case'scrollbar-button-up':case'scrollbar-button-down':if(distanceToExtent(scroller,target.className)>0)
{if(/up/.test(target.className)){this.scrolloffset+=this.config['increment'];}
else{this.scrolloffset-=this.config['increment'];}
this.doContentScroll(scroller);this.autoscrolldelaytimer=window.setTimeout(function()
{THIS.autoscrolltimer=window.setInterval(function()
{if(/up/.test(target.className)){THIS.scrolloffset+=THIS.config['increment'];}
else{THIS.scrolloffset-=THIS.config['increment'];}
THIS.doContentScroll(scroller);if(distanceToExtent(scroller,target.className)<=0)
{window.clearInterval(THIS.autoscrolltimer);THIS.autoscrolltimer=null;THIS.scrolloffset=/up/.test(target.className)?0:(scroller.viewportHeight-scroller.contentHeight);THIS.doContentScroll(scroller);}},(1000/THIS.config['auto-scroll-speed']));},(this.config['auto-scroll-delay']*1000));}
break;case'scrollbar-scrollbar':if(e.type=='keypress'||e.type=='keydown')
{THIS.scrollbarActionHandler(e,scroller[e.keyCode==40?'down':'up'],scroller);return false;}
else
{THIS.mouseposition={'x':e.clientX,'y':e.clientY};THIS.scrollposition=THIS.scrolloffset;}
break;}
return false;};this.doContentScroll=function(scroller)
{scroller.content.style.top=this.scrolloffset+'px';var diff=(scroller.contentHeight-scroller.viewportHeight);var trackproportion=(scroller.trackHeight)*((0-this.scrolloffset)/diff);scroller.scrollbar.style.top=trackproportion+'px';};function getTarget(e)
{var target=e.target?e.target:e.srcElement;while(!target.className&&!/scrollbar\-/.test(target.className))
{target=target.parentNode;if(!target||/^(ol)$/i.test(target.nodeName))
{return null;}}
return target;}
function distanceToExtent(scroller,dir)
{if(/up/.test(dir)){return 0-THIS.scrolloffset;}
else
{return scroller.contentHeight-scroller.viewportHeight-Math.abs(THIS.scrolloffset);}}}).apply(Behaviors.RichScroller);
