function switchFontSize(c,b){var a=$E("body");switch(b){case"inc":if(CurrentFontSize+1<7){a.removeClass("fs"+CurrentFontSize);CurrentFontSize++;a.addClass("fs"+CurrentFontSize)}break;case"dec":if(CurrentFontSize-1>0){a.removeClass("fs"+CurrentFontSize);CurrentFontSize--;a.addClass("fs"+CurrentFontSize)}break;default:a.removeClass("fs"+CurrentFontSize);CurrentFontSize=b;a.addClass("fs"+CurrentFontSize)}Cookie.set(c,CurrentFontSize,{duration:365})}function switchTool(b,a){createCookie(b,a,365);window.location.reload()}function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{a=""}document.cookie=c+"="+d+a+"; path=/"}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function jaAddEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,false);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}function equalHeight(){if($("ja-botsl1")){var a=$$(getElementsByClass("ja-boxct-wrap",$("ja-botsl1"),"div"));if(a&&a.length>1){makeEqualHeight(a)}}}function makeEqualHeight(b,c){if(!c){c=0}if(!b||b.length<2){return}var a=0;b.each(function(f,d){var e=f.getCoordinates().height;a=(a<e)?e:a},this);a+=c;b.each(function(e,d){e.setStyle("height",a-e.getStyle("padding-top").toInt()-e.getStyle("padding-bottom").toInt())},this)}function getDeepestDiv(a){while(a.getChildren().length==1&&(a.getChildren()[0].tagName=="DIV")){a=a.getChildren()[0]}return a}function preloadImages(){var c=new Array();for(var a=0;a<arguments.length;a++){var b=arguments[a];c[a]=new Image();c[a].src=b}}function addSpanToTitle(){var a=getElementsByClass("module.*",null,"div");if(!a){return}for(var c=0;c<a.length;c++){var b=a[c];var d=b.getElementsByTagName("h3")[0];if(d){text=d.innerHTML;d.innerHTML="<span>"+text+"</span>"}}}function addSpanToTitle3(){var a=getElementsByClass("moduletable.*",null,"div");if(!a){return}for(var c=0;c<a.length;c++){var b=a[c];var d=b.getElementsByTagName("h3")[0];if(d){text=d.innerHTML;d.innerHTML="<span>"+text+"</span>"}}}function addSpanToTitle2(){var a=$$(getElementsByClass("module.*",null,"div"));var b=null;if($("ja-productwrap")){b=$$(getElementsByClass("module.*",$("ja-productwrap"),"div"))}if(!a){return}a.each(function(c){var f=c.getElement("h3");if(!f){return}var e=f.getText();if(b&&b.contains(c)){var d=e.split(" ");d[d.length-1]="<span>"+d[d.length-1]+"</span>";f.setHTML(d.join(" "))}else{f.setHTML("<span>"+e+"</span>")}})}function makeTransBg(b,g,f,a,e){var d=b;if(!d){return}if($type(d)!="array"){d=[d]}if(!f){f="crop"}if(!e){e=0}var c=siteurl+"images/blank.png";d.each(function(k){var i=g;if(k.tagName=="IMG"){if(!i){i=k.src}if(!(/\.png$/i).test(i)||(/blank\.png$/i).test(i)){return}k.setStyle("height",k.offsetHeight);k.setStyle("width",k.offsetWidth);k.src=c;k.setStyle("visibility","visible");k.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+i+", sizingMethod='"+f+"')")}else{if(!i){i=k.getStyle("backgroundImage")}var j=new RegExp("urls*[(\"']*([^'\")]*)['\")]*");if((m=j.exec(i))){i=m[1]}if(!(/\.png$/i).test(i)||(/blank\.png$/i).test(i)){return}if(!a){k.setStyles({background:"none"});if(k.getStyle("position")!="absolute"&&k.getStyle("position")!="relative"){k.setStyle("position","relative")}k.getChildren().each(function(l){if(l.getStyle("position")!="absolute"&&l.getStyle("position")!="relative"){l.setStyle("position","relative")}l.setStyle("z-index",2)});var h=new Element("IMG");h.src=c;h.width=k.offsetWidth-e;h.height=k.offsetHeight-e;h.setStyles({position:"absolute",top:0,left:-k.getStyle("padding-left").toInt()});h.className="TransBG";h.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+i+", sizingMethod='"+f+"')");h.inject(k,"top")}else{k.setStyle("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+i+", sizingMethod='"+f+"')")}}}.bind(this))}function isIE6(){version=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1])}return(version&&(version<7))}function getElementsByClass(f,b,k){var h=new Array();var d=0;if(b==null){b=document}if(k==null){k="*"}var c=b.getElementsByTagName(k);var a=c.length;var g=new RegExp("(^|\\s)"+f+"(\\s|$)");for(var e=0;e<a;e++){if(g.test(c[e].className)){h[d]=c[e];d++}}return h}jaAddFirstItemToTopmenu=function(){li=$E("#ja-topnav ul li");if(li){li.addClass("ja-firstitem")}};jaAddFirstItemToMainlevelmenu=function(){li=$E("ul#mainlevel-nav li");if(li){li.addClass("ja-firstitem")}};jaRemoveLastContentSeparator=function(){var a=$$("#ja-content .article_separator");if(a&&a.length){a[a.length-1].remove()}};jaRemoveLastTrBg=function(){var a=$$("#ja-topsl3 tr");if(!a||a.length<1){return}var b=a[a.length-1];if(a[a.length-1].innerHTML.trim()==""&&a.length>2){b.remove();b=a[a.length-2]}if(b){b.setStyle("background","none")}};fixMenuWidth=function(){if(!$("ja-splitmenu")){return}var b=$("ja-splitmenu").getElement("ul").getChildren();if(b.length){var a=Math.floor($("ja-mainnav").offsetWidth/b.length);b.setStyle("width",a)}};moveReadmore=function(){var a=$$(".contentpaneopen");if(!a){return}a.each(function(d){var b=d.getElement(".readon");var c=d.getElement(".article-content");if(b&&c){b.remove().inject(c)}})};addIEHover=function(){if(!window.ie6){return}var a=$("ja-topsl");if(!a||!a.getChildren()){return}a.getChildren().each(function(c){var b="topsl-hover-center";if(c.className.test("ja-box-left")){b="topsl-hover-left"}if(c.className.test("ja-box-right")){b="topsl-hover-right"}c.addEvent("mouseenter",function(){c.addClass(b)}.bind(this));c.addEvent("mouseleave",function(){c.removeClass(b)}.bind(this))})};window.addEvent("load",function(){equalHeight()});var boxes=[];showBox=function(d,b,a){d=$(d);if(!d){return}if($(a)){d._caller=$(a)}boxes.include(d);if(d.getStyle("display")=="none"){d.setStyles({display:"block",opacity:0})}if(d.status=="show"){d.status="hide";var c=new Fx.Style(d,"opacity");c.stop();c.start(d.getStyle("opacity"),0);if(d._caller){d._caller.removeClass("show")}}else{boxes.each(function(e){if(e!=d&&e.status=="show"){e.status="hide";var f=new Fx.Style(e,"opacity");f.stop();f.start(e.getStyle("opacity"),0);if(e._caller){e._caller.removeClass("show")}}},this);d.status="show";var c=new Fx.Style(d,"opacity",{onComplete:function(){if($(b)){$(b).focus()}}});c.stop();c.start(d.getStyle("opacity"),1);if(d._caller){d._caller.addClass("show")}}};slideshowOnWalk=function(){if(window.JaSlideshow){var d=JaSlideshow.options.images.length;var a=0.4;for(var c=0;c<d;c++){var b=$("jsnav"+c);if(!b||b.className.test("active")){continue}b.setStyle("opacity",a)}JaSlideshow.mask=new Element("div",{id:"ja-slideshow-mask"}).inject(JaSlideshow.elementdiv);if(JaSlideshow.options.urls){JaSlideshow.mask.setStyle("cursor","pointer");JaSlideshow.mask.onclick=function(){location.href=JaSlideshow.options.urls[0]}}JaSlideshow.onWalk=function(h){var g={duration:JaSlideshow.options.duration[0],wait:false};var f=$("jsnav"+h[2]);thumb1fx=new Fx.Style(f,"opacity",g);thumb1fx.start(a);var e=$("jsnav"+h[0]);thumb2fx=new Fx.Style(e,"opacity",g);thumb2fx.start(1);if(JaSlideshow.options.urls){JaSlideshow.mask.onclick=function(){location.href=JaSlideshow.options.urls[h[2]]}}}}};jaMenuIcon=function(){var a=$$("#ja-splitmenu img");var b=$$("#ja-splitmenu li.active img");if(!a){return}a.each(function(c){var e=c.src;if(!(pos=e.lastIndexOf("."))){return}c.ext=e.substr(pos);c.src_on=e.substr(0,pos)+"-on"+e.substr(pos);c.src_off=e;if(c.ext==".png"&&window.ie6){c.src_on="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c.src_on+"', sizingMethod='image')";c.src_off="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c.src+"', sizingMethod='image')";c.src=siteurl+"images/blank.png";c.setStyle("filter",c.src_off)}var d=new Image();d.src=c.src_on;if(b&&b.contains(c)){if(c.ext==".png"&&window.ie6){c.setStyle("filter",c.src_on)}else{c.src=c.src_on}return}c.getParent().addEvent("mouseenter",function(){if(c.ext==".png"&&window.ie6){c.setStyle("filter",c.src_on)}else{c.src=c.src_on}},this);c.getParent().addEvent("mouseleave",function(){if(c.ext==".png"&&window.ie6){c.setStyle("filter",c.src_off)}else{c.src=c.src_off}},this)})};ja_topsl_button=function(){var a=$("ja-topsl-button");if(a){a.el=$("ja-topslwrap");a.el.setStyles({position:"relative",overflow:"hidden"});a.fx=new Fx.Style(a.el,"height");a._maxh=a.el.offsetHeight;a._status=true;a._alt=a.title;a.title=a.getText();a.addEvent("click",function(){var b=this._status?0:(this.el.scrollHeight-20);this.fx.start(b);this._status=!this._status;this.setText(this._alt);this._alt=this.title;this.title=this.getText();return false})}};
