var _BROWSER_IS_IE=(document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);var _BROWSER_IS_OPERA=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);CookieManager=Class.create();CookieManager.prototype={userDataForIE:false,initialize:function(_1){this.cookieShelfLife=365;this.userDataForIE=_1;if(_BROWSER_IS_IE&&this.userDataForIE){this.IE_CACHE_NAME="storage";if($(this.IE_CACHE_NAME)==null){var _2=document.createElement("DIV");_2.id=this.IE_CACHE_NAME;document.body.appendChild(_2)}this.store=$(this.IE_CACHE_NAME);this.store.style.behavior="url('#default#userData')"}},getCookie:function(_3){var _4=null;if(_BROWSER_IS_IE&&this.userDataForIE){this.store.load(this.IE_CACHE_NAME);_4=this.store.getAttribute(_3)}else{var _5=document.cookie.split("; ");var _6=_5.length;for(var i=0;i<_6;i++){var _8=_5[i].split("=");if(_8[0]==_3&&_8[1]!=null){_4=_8[1];break}}}if(_BROWSER_IS_OPERA&&_4!=null){_4=_4.replace(/%22/g,"\"")}return _4},setCookie:function(_9,_a){if(_BROWSER_IS_IE&&this.userDataForIE){this.store.setAttribute(_9,_a);this.store.save(this.IE_CACHE_NAME)}else{if(_BROWSER_IS_OPERA){_a=_a.replace(/"/g,"%22")}var _b=new Date();_b.setTime(_b.getTime()+(this.cookieShelfLife*86400000));var _c="; expires="+_b.toGMTString();document.cookie=_9+"="+_a+_c+"; path=/"}},clearCookie:function(_d){if(_BROWSER_IS_IE&&this.userDataForIE){this.store.load(this.IE_CACHE_NAME);this.store.removeAttribute(_d);this.store.save(this.IE_CACHE_NAME)}else{document.cookie=_d+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/"}}};Object.extend(Event,{wheel:function(_e){var _f=0;if(!_e){_e=window.event}if(_e.wheelDelta){_f=_e.wheelDelta/120;if(window.opera){_f=-_f}}else{if(_e.detail){_f=-_e.detail/3}}return Math.round(_f)}});FontChanger=Class.create();FontChanger.prototype={id:null,target:null,cookieManager:null,cookieName:"body.style.fontSize",initialize:function(id,_11){this.id=id||"fontChanger";this.cookieManager=new CookieManager();this.setCookieShelfLife(30);this.target=($(_11)||document.body).style;this.target.fontSize=(this.round(this.cookieManager.getCookie(this.cookieName))||100)+"%"},setCookieShelfLife:function(_12){this.cookieManager.cookieShelfLife=_12},change:function(num){var _14;var num=this.str2int(num);_14=num==0?100:this.round(this.str2int(this.target.fontSize)+num);this.target.fontSize=_14+"%";this.cookieManager.setCookie(this.cookieName,_14+"");this.showsize()},reset:function(){this.target.fontSize="";this.cookieManager.clearCookie(this.cookieName)},str2int:function(num){var num=parseInt(num,10);if(isNaN(num)){return 0}return num},round:function(num){var num=this.str2int(num);if(num==0){return 100}if(num<=40){return 40}else{if(num>=200){return 200}}return num},show:function(){var id=this.id;document.writeln(["<div id=\""+id+"\">","<span style=\"font-weight: normal;\" id=\""+id+"-size\"></span> :","<span style=\"cursor: pointer; font-size: 80% ;color: #F55;\" id=\""+id+"-minus\">A</span>","<span style=\"cursor: pointer; font-size: 120%;color: #55F;\" id=\""+id+"-plus\" >A</span>","<span style=\"cursor: pointer; font-size: 100%;color: #5F5;\" id=\""+id+"-clear\">c</span>","</div>"].join("\n"));Event.observe($(id+"-clear"),"click",this.onClickClear.bind(this));Event.observe($(id+"-plus"),"click",this.onClickPlus.bind(this));Event.observe($(id+"-minus"),"click",this.onClickMinus.bind(this));Event.observe($(id),"mousewheel",this.MouseWheel.bind(this));Event.observe($(id),"DOMMouseScroll",this.MouseWheel.bind(this));this.showsize()},showsize:function(){$(this.id+"-size").innerHTML=this.target.fontSize+""},onClickClear:function(e){this.change(0)},onClickPlus:function(e){this.change(+10)},onClickMinus:function(e){this.change(-10)},MouseWheel:function(e){this.change((Event.wheel(e)<0)?-10:+10)}};FontChanger.start=function(id,_1d){var _1e=new FontChanger(id,_1d);_1e.show()};AddFragment=Class.create();AddFragment.prototype={tags:[],target:"",className:"frag",initialize:function(_1f,_20){this.addTag(_1f);this.target=$(_20)||document},addTag:function(_21){if(typeof(_21)=="string"){this.tags.push(_21)}},start:function(_22,_23){var _24=this.tags;var n=_24.length;if(n==0){return null}for(var i=0;i<n;i++){this.convert(_24[i])}},convert:function(_27){var _28=this.target.getElementsByTagName(_27);var _29=[];var i,n;n=_28.length;if(n<2){return null}for(i=0;i<n;i++){var id="_"+_27+"_"+i;if(_28[i].id!=""){_29[i]=_28[i].id}else{_29[i]=id}}var _2d,tmp;for(i=0;i<n;i++){_2d="";if(i>0){_2d+="<a href=\"#"+_29[i-1]+"\">&#9650;</a>"}if(i<n-1){_2d+="<a href=\"#"+_29[i+1]+"\">&#9660;</a>"}tmp=document.createElement("span");tmp.setAttribute("class",this.className);tmp.innerHTML=_2d;_28[i].appendChild(tmp);_28[i].id=_29[i]}}};AddFragment.start=function(_2f,_30){var _31=new AddFragment(_2f,_30);_31.addTag("h2");_31.start()};var fdScroller={offset:0,speed:20,posY:0,lastY:-1,UP:-1,init:function(){AddFragment.start("h3","content");var _32=document.getElementsByTagName("a");var Loc=window.location+" ";if(Loc.indexOf("#")!=-1){Loc=Loc.substr(0,Loc.indexOf("#"))}else{Loc=Loc.substr(0,Loc.length-1)}var n=_32.length;for(i=0;i<n;i++){if(_32[i].href.replace(Loc,"").charAt(0)=="#"&&!_32[i].onclick){_32[i].onclick=fdScroller.initScroll}}},setOffset:function(_35){this.offset=_35},setSpeed:function(_36){this.speed=_36},getWindowHeight:function(){return(typeof(window.innerHeight)=="number")&&window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getDocumentHeight:function(){return(document.body.offsetHeight==document.documentElement.scrollHeight)?document.body.scrollHeight:(document.documentElement.scrollHeight||document.body.scrollHeight)},getScrollTop:function(){return document.documentElement&&document.documentElement.scrollTop||document.body&&document.body.scrollTop||window.pageYOffset||window.scrollY||0},getElementYpos:function(el){var y=0;while(el.offsetParent){y+=el.offsetTop;el=el.offsetParent}return y},initScroll:function(e){var _3a;if(!e){var e=window.event}if(e.target){_3a=e.target}else{if(e.srcElement){_3a=e.srcElement}}if(_3a.nodeType==3){_3a=_3a.parentNode}_3a=_3a.href;if(_3a&&_3a.indexOf("#")!=-1){var _3b=$(_3a.substr(_3a.indexOf("#")+1,_3a.length));if(!_3b){return}var _3c=fdScroller.getDocumentHeight();var _3d=fdScroller.getWindowHeight();var _3e=fdScroller.getElementYpos(_3b);if(_3e>_3c-_3d){_3e=_3c-_3d}else{_3e-=fdScroller.offset}fdScroller.posY=(_3e<=0)?0:_3e;fdScroller.lastY=-1;fdScroller.UP=(fdScroller.posY<fdScroller.getScrollTop())?1:0;fdScroller.scroll()}return false},scroll:function(){var top=fdScroller.getScrollTop();if(fdScroller.lastY!=-1&&(fdScroller.UP&&fdScroller.lastY<top||!fdScroller.UP&&fdScroller.lastY>top)){return false}if(Math.abs(top-fdScroller.posY)<=1){window.scrollTo(0,fdScroller.posY)}else{fdScroller.lastY=top;window.scrollBy(0,Math.round((fdScroller.posY-top)/2));setTimeout(fdScroller.scroll,fdScroller.speed)}}};