var isIE6=Browser.Engine.trident&&Browser.Engine.version==4;function objFadeIn(b,a,c,e){if(!$defined(b)){return false}if(!$chk(a)){a=1}if(!$chk(c)){c=500}if(!$chk(e)){e=30}$(b).setStyle("display","block");var d=new Fx.Tween(b,{property:"opacity",duration:c,fps:e});d.start("0",a)}function objFadeOut(b,a,c,e){if(!$defined(b)){return false}if(!$chk(a)){a=1}if(!$chk(c)){c=500}if(!$chk(e)){e=30}var d=new Fx.Tween(b,{property:"opacity",duration:c,fps:e});d.start(a,"0");setTimeout(function(){$(b).setStyle("display","none")},c)}function loadClip(f,e,d,b,a){if(!$defined(f)||!$(f)){return false}if(!$chk(b)){b=512}if(!$chk(a)){a=384}var c="";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553544400" width="'+b+'" height="'+a+'" id="fplayer" ';c+='codebase="http://download.macromedia.com/pub/shockwave/cabs/content/swflash.cab#version=8,0,0,0">';c+='<param name="allowFullScreen" value="true" />';c+='<param name="movie" value="content/fplayer.swf" />';c+='<param name="FlashVars" value="moviefile=clips/'+e+"&clipframe=content/clips/"+d+'" />';c+='<param name="quality" value="high" />';c+='<param name="wmode" value="transparent" />';c+='<param name="bgcolor" value="#ffffff" />';c+='<param name="scale" value="exactFit" />';c+='<embed src="content/fplayer.swf" ';c+='FlashVars="moviefile=clips/'+e+"&clipframe=content/clips/"+d+'" ';c+='quality="high" scale="exactFit" wmode="transparent" ';c+='bgcolor="#ffffff" width="'+b+'" height="'+a+'" name="fplayer" ';c+='allowFullScreen="true" type="application/x-shockwave-flash" ';c+='pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';$(f).set("html",c)}function setupScrollbox(l,c,d,f,i,k,j){var g=$(l);var a=$(c);var e=$(d);if(!g||!a||!e){console.error("One of these objects wasn't found - #%s, #%s, #%s",l,c,d);return false}var b=new Fx.Scroll(g,{wait:false,duration:i,transition:Fx.Transitions.Quad.easeInOut,wheelStops:false,fps:30});var h=0;a.addEvent("click",function(m){if(j&&h==k){objFadeIn(e)}if(h>0){h=h-1;b.start(f*h,0);if(j&&h==0){setTimeout(function(){objFadeOut(a)},i/2)}}return false});e.addEvent("click",function(m){if(j&&h==0){objFadeIn(a)}if(h<k){h=h+1;b.start(f*h,0);if(j&&h==k){setTimeout(function(){objFadeOut(e)},i/2)}}return false});return true}function setCharAt(b,a,c){if(a>b.length-1){return b}return b.substr(0,a)+c+b.substr(a+1)}function getRatedState(b,a){if(!$defined(b)||isIE6){return false}return Cookie.read(a).charAt(b.charAt(6).toInt()-1)==1}function setRatedState(c,b){if(!$defined(c)||isIE6){return false}var a=Cookie.read(b);if(!a){return false}Cookie.dispose(b);a=setCharAt(a,c.charAt(6).toInt()-1,"1");Cookie.write(b,a,{path:"/",duration:365})};