$x=function(){};function setListeners(){inputList=document.getElementsByTagName("INPUT");for(i=0;i<inputList.length;i++){inputList[i].attachEvent("onpropertychange",restoreStyles);inputList[i].style.backgroundColor=""}selectList=document.getElementsByTagName("SELECT");for(i=0;i<selectList.length;i++){selectList[i].attachEvent("onpropertychange",restoreStyles);selectList[i].style.backgroundColor=""}}function restoreStyles(){if(event.srcElement.style.backgroundColor!=""){event.srcElement.style.backgroundColor=""}}if(window.attachEvent){window.attachEvent("onload",setListeners)}var _js_loaded=[];function requireJS(h,d){if(!h){return false}if(typeof d!="object"){d=[d]}var g=[];for(var b=0;b<d.length;b++){g[b]=false;for(var f=0;f<_js_loaded.length;f++){if(_js_loaded[f]==d[b]){g[b]=true;break}}}for(var b=0;b<d.length;b++){if(!g[b]){var c;if(document.createElement&&(c=document.createElement("script"))){c.src=d[b];c.type="text/javascript";var e=document.getElementsByTagName("head")[0];if(e){e.appendChild(c);_js_loaded.push(d[b])}}}}return false}function timeStampUri(a){return a+(a.indexOf("?")!==-1?"&":"?")+"--no-cache="+(new Date().getTime())}function onContent(j){var p=onContent,n=navigator.userAgent,l=document,q=window,m="onContent",k="addEventListener",h="opera",g="readyState",t="<scr".concat("ipt defer src='//:' on",g,"change='if(this.",g,'=="complete"){this.parentNode.removeChild(this);',m,".",m,"()}'></scr","ipt>");p[m]=(function(a){return function(){p[m]=function(){};for(p=arguments.callee;!p.done;p.done=1){j(a?a():a)}}})(p[m]);if(l[k]){l[k]("DOMContentLoaded",p[m],false)}if(/WebKit|Khtml/i.test(n)||(q[h]&&parseInt(q[h].version())<9)){(function(){/loaded|complete/.test(l[g])?p[m]():setTimeout(arguments.callee,1)})()}else{if(/MSIE/i.test(n)){l.write(t)}}}_css_loaded=[];requireCSS=function(a){if(!_css_loaded.inArray(a)){var c;if(document.createElement&&(c=document.createElement("link"))){c.href=a;c.rel="stylesheet";c.type="text/css";var b=document.getElementsByTagName("head")[0];if(b){b.appendChild(c);_css_loaded.push(a)}}}};_js_loaded=[];requireJS=function(b,d){if(!d&&typeof d!=="undefined"){return false}if(!_js_loaded.inArray(b)){var a;if(document.createElement&&(a=document.createElement("script"))){a.src=b;a.type="text/javascript";var c=document.getElementsByTagName("head")[0];if(c){c.appendChild(a);_js_loaded.push(b)}}}};function timeStampUri(a){return a+(a.indexOf("?")!==-1?"&":"?")+"--no-cache="+(new Date().getTime())}function writeFlash(j){var h={};if(j.flashVars){var g=j.flashVars.split("&");for(var f=0,d=g.length;f<d;f++){var c=g[f].split("=");h[c[0]]=c[1]}}if(j.src.indexOf("http://www.pixielott.com/dev/")!=-1){h.baseURL="http://www.pixielott.com/dev/"}var e=new PluginObject(j.src,{width:j.width,height:j.height,version:8,quality:"high",use_plugin:"flash",bgcolor:j.bgcolor,variables:h})}function writeShockWave(a){writeEmbed("166B1BCA-3F9C-11CF-8075-444553540000","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0","application/x-director",a)}function writeQuickTime(a){writeEmbed("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0","video/quicktime",a)}function writeRealMedia(a){writeEmbed("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0","audio/x-pn-realaudio-plugin",a)}function writeWindowsMedia(a){a.url=a.src;writeEmbed("6BF52A52-394A-11D3-B153-00C04F79FAA6","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701","application/x-mplayer2",a)}function writeEmbed(b,a,c,e){var d="",f;d+='<object classid="clsid:'+b+'" codebase="'+a+'"';d+=typeof(e.id)!="undefined"?'id="'+e.id+'"':"";d+=typeof(e.name)!="undefined"?'name="'+e.name+'"':"";d+=typeof(e.width)!="undefined"?'width="'+e.width+'"':"";d+=typeof(e.height)!="undefined"?'height="'+e.height+'"':"";d+=typeof(e.align)!="undefined"?'align="'+e.align+'"':"";d+=">";for(f in e){d+='<param name="'+f+'" value="'+e[f]+'">'}d+='<embed type="'+c+'"';for(f in e){d+=f+'="'+e[f]+'" '}d+="></embed></object>";document.write(d)}function getRadioSetValue(b){for(var a=0;a<b.length;a++){if(b[a].checked){return b[a].value}}return false}function toTop(){new Effect.ScrollTo("pagecontent",{offset:-250,duration:1,transition:Effect.Transitions.linear})}function MediaPlayer(a){this.states={player_ready:false,win:false,id:false,loaded:false,play:0};this.auto_play=!a?true:false;this.cookie_value="yes";this.do_not_close_popup=false}MediaPlayer.prototype.getCookie=function(b){if(document.cookie.length>0){var c=document.cookie.indexOf(b+"=");if(c!=-1){var c=c+b.length+1,a=document.cookie.indexOf(";",c);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(c,a))}}return""};MediaPlayer.prototype.memorisePlayerChoice=function(a){var c=new Date(),b=new Date(),d=a?"yes":"no";b.setTime(c.getTime()+3600000*24*365);document.cookie="popupremember="+escape(a?"yes":"no")+";expires="+b.toGMTString();this.cookie_value=d;$$('input[type="checkbox"].openinpopup').each(function(e){e.checked=a?true:false})};MediaPlayer.prototype.resetLaunchButton=function(){};MediaPlayer.prototype.doCallback=function(b){if(this.states.player_ready){this._playFile(b)}else{var a=this;(function(d,c){c.doCallback(d)}).delay(0.1,b,a)}};MediaPlayer.prototype.checkPlaylistItemExists=function(c,f){var d=this.getMovie("mediaplayer-swf",f);if(!this.states.player_ready){return -1}var a=d.getLength();for(var b=0;b<a;b++){var e=d.itemData(b);if(e.file==c){return b}}return false};MediaPlayer.prototype.getMovie=function(a,b){if(b){return Prototype.Browser.IE?b[a]:b.document[a]}else{return Prototype.Browser.IE?window[a]:document[a]}};MediaPlayer.prototype.writePlayer=function(b,c,a){if(this.states.win!==false&&this.states.win.closed){this.states.win=this.states.loaded=this.states.player_ready=false}if(this.states.loaded&&c!=="force"){if(this.states.win!==false){if(b=="popup"||b==null){if(this.states.win.closed){this.states.player_ready=false;win=this.popup();if(a){a.push(win)}}else{if(this.cookie_value=="no"&&!this.do_not_close_popup){this.states.win.close();this.states.win=false;this.states.player_ready=false;this.embed()}else{this.states.win.focus();if(a){a.push(this.states.win)}}}}else{if(!this.do_not_close_popup){this.states.win.close();this.states.win=false;this.states.player_ready=false;this.embed()}}}else{if(b==null){if(this.cookie_value=="yes"){b="popup"}}if(b==null||b=="inline"){if(!this.getMovie("mediaplayer-swf")){this.embed()}}else{this.resetLaunchButton();win=this.popup();if(win===false){return false}if(a){a.push(win)}}}}else{if(b==null){if(this.cookie_value=="yes"){b="popup"}}if(b==null||b=="inline"){if(!this.getMovie("mediaplayer-swf")){this.embed()}}else{if((win=this.popup())===false){return false}if(a){a.push(win)}}}if(c&&c!=="force"){this.doCallback(a)}return false};MediaPlayer.prototype.popup=function(){if(this.states.win!==false&&!this.states.win.closed){return this.states.win}var a=window.open("http://www.pixielott.com/dev/player?c="+country,"mediaplayer_win","status=no,width=320,height=435,resizeable=no,scrollbars=no,menubar=no,location=no,directories=no,toolbar=no");if(!a){alert("Error: Your popup blocker seems to have blocked the popup mediaplayer.");return false}this.states.win=a;if(this.getMovie("mediaplayer-swf",this.states.win)){this.states.win.focus();this.sendEvent("playpause",0,this.states.win);return this.states.win}this.states.id=false;return this.states.win};MediaPlayer.prototype._popup=function(b){this.states.player_ready=false;var a=new PluginObject("http://www.pixielott.com/dev/assets/flash/common/mediaplayer.swf",{width:320,height:435,version:8,id:"mediaplayer-swf",auto_embed:false,params:{allowscriptaccess:"always",allowfullscreen:"true"},bgcolor:"#FFFFFF",variables:{height:"435",width:"320",displayheight:"210",displaywidth:"320",overstretch:"true",file:"http://www.pixielott.com/dev/"+country+"/playlist.xml",backcolor:"0x327797",frontcolor:"0x000000",lightcolor:"0x193D4D",screencolor:"0x000000",bufferlength:"10",volume:"60",javascriptid:"mediaplayer-swf",searchbar:"false",showstop:"true",autoscroll:"false",autostart:"true",repeat:"list",enablejs:"true"}});b.document.getElementById("mediaplayer-div").innerHTML=a._getHTML()};MediaPlayer.prototype.embed=function(b){this.states.player_ready=false;$("mediaplayer-div-container").setStyle({width:"310px",height:"438px",padding:"0px"});var a=new PluginObject("http://www.pixielott.com/dev/assets/flash/common/mediaplayer.swf?1=1",{width:310,height:435,version:8,embed_id:"mediaplayer-div",id:"mediaplayer-swf",force_into_id:"media-div",bgcolor:"#FFFFFF",params:{allowscriptaccess:"always",allowfullscreen:"true",wmode:"transparent"},variables:{height:"435",width:"310",displayheight:"210",displaywidth:"310",overstretch:"true",file:"http://www.pixielott.com/dev/"+country+"/playlist.xml",backcolor:"0x327797",frontcolor:"0x000000",lightcolor:"0x193D4D",screencolor:"0x000000",bufferlength:"10",volume:"60",javascriptid:"mediaplayer-swf",searchbar:"false",showstop:"true",autoscroll:"false",autostart:this.auto_play?"true":"false",repeat:"list",enablejs:"true"}});this.states.loaded=true;this.states.win=false};MediaPlayer.prototype.sendEvent=function(c,a,d){var b=this.getMovie("mediaplayer-swf",d);if(b&&this.states.player_ready){b.sendEvent(c,a)}};MediaPlayer.prototype.playFile=function(a,e,d,b,c){this.writePlayer(null,true,[a,e,d,b,c])};MediaPlayer.prototype._playFile=function(h){var b=h[0],j=h[1],g=h[2],c=h[3],k=h[4],f=h[5];var d={file:b,title:j},a=this.getMovie("mediaplayer-swf",f),l=this;if(!a){(function(n,m){m._playFile(n)}).delay(0.2,h,l);return}var e=this.checkPlaylistItemExists(b,f);if(e===-1){(function(n,m){m._playFile(n)}).delay(0.2,h,l);return}if(e!==false){this.sendEvent("stop",null,f);this.sendEvent("playitem",e,f);return}if(g!=""){d.image=g}else{d.image="http://www.pixielott.com/dev/assets/images/default/mediaplayer/player-default.jpg"}if(k!=""){d.info=k}d.author=(c=="")?"{# PROJECT_LONGNAME #}":c;a.addItem(d,0);this.sendEvent("stop",null,f);this.sendEvent("playitem",0,f)};MP=new MediaPlayer();function getUpdate(d,c,a,b){if(!MP.states.player_ready&&b=="mediaplayer-swf"){MP.states.player_ready=true}}function openWindow(){MP.writePlayer("popup")}var Prototype={Version:"1.6.0.2",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&document.createElement("div").__proto__!==document.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var e=null,d=$A(arguments);if(Object.isFunction(d[0])){e=d.shift()}function a(){this.initialize.apply(this,arguments)}Object.extend(a,Class.Methods);a.superclass=e;a.subclasses=[];if(e){var b=function(){};b.prototype=e.prototype;a.prototype=new b;e.subclasses.push(a)}for(var c=0;c<d.length;c++){a.addMethods(d[c])}if(!a.prototype.initialize){a.prototype.initialize=Prototype.emptyFunction}a.prototype.constructor=a;return a}};Class.Methods={addMethods:function(g){var c=this.superclass&&this.superclass.prototype;var b=Object.keys(g);if(!Object.keys({toString:true}).length){b.push("toString","valueOf")}for(var a=0,d=b.length;a<d;a++){var f=b[a],e=g[f];if(c&&Object.isFunction(e)&&e.argumentNames().first()=="$super"){var h=e,e=Object.extend((function(j){return function(){return c[j].apply(this,arguments)}})(f).wrap(h),{valueOf:function(){return h},toString:function(){return h.toString()}})}this.prototype[f]=e}return this}};var Abstract={};Object.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};Object.extend(Object,{inspect:function(a){try{if(Object.isUndefined(a)){return"undefined"}if(a===null){return"null"}return a.inspect?a.inspect():String(a)}catch(b){if(b instanceof RangeError){return"..."}throw b}},toJSON:function(a){var c=typeof a;switch(c){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}if(a.toJSON){return a.toJSON()}if(Object.isElement(a)){return}var b=[];for(var e in a){var d=Object.toJSON(a[e]);if(!Object.isUndefined(d)){b.push(e.toJSON()+": "+d)}}return"{"+b.join(", ")+"}"},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a){b.push(c)}return b},values:function(b){var a=[];for(var c in b){a.push(b[c])}return a},clone:function(a){return Object.extend({},a)},isElement:function(a){return a&&a.nodeType==1},isArray:function(a){return a!=null&&typeof a=="object"&&"splice" in a&&"join" in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var a=this,c=$A(arguments),b=c.shift();return function(){return a.apply(b,c.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,c=$A(arguments),b=c.shift();return function(d){return a.apply(b,[d||window.event].concat(c))}},curry:function(){if(!arguments.length){return this}var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1000;return window.setTimeout(function(){return a.apply(a,b)},c)},wrap:function(b){var a=this;return function(){return b.apply(this,[a.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(e,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(e)){a+=d.slice(0,b.index);a+=String.interpret(c(b));d=d.slice(b.index+b[0].length)}else{a+=d,d=""}}return a},sub:function(c,a,b){a=this.gsub.prepareReplacement(a);b=Object.isUndefined(b)?1:b;return this.gsub(c,function(d){if(--b<0){return d[0]}return a(d)})},scan:function(b,a){this.gsub(b,a);return String(this)},truncate:function(b,a){b=b||30;a=Object.isUndefined(a)?"...":a;return this.length>b?this.slice(0,b-a.length)+a:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,"img");var a=new RegExp(Prototype.ScriptFragment,"im");return(this.match(b)||[]).map(function(c){return(c.match(a)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(e,f){if((f=f.split("="))[0]){var c=decodeURIComponent(f.shift());var d=f.length>1?f.join("="):f[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in e){if(!Object.isArray(e[c])){e[c]=[e[c]]}e[c].push(d)}else{e[c]=d}}return e})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":new Array(a+1).join(this)},camelize:function(){var d=this.split("-"),a=d.length;if(a==1){return d[0]}var c=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<a;b++){c+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(c){var d=String.specialChar[c[0]];return d?d:"\\u00"+c[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;if(a.blank()){return false}a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(b){if(Object.isFunction(b)){return b}var a=new Template(b);return function(c){return a.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return""}var f=d[1]||"";if(f=="\\"){return d[2]}var b=a,g=d[3];var e=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=e.exec(g);if(d==null){return f}while(d!=null){var c=d[1].startsWith("[")?d[2].gsub("\\\\]","]"):d[1];b=b[c];if(null==b||""==d[3]){break}g=g.substring("["==d[3]?d[1].length:d[0].length);d=e.exec(g)}return f+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(c,b){var a=0;c=c.bind(b);try{this._each(function(e){c(e,a++)})}catch(d){if(d!=$break){throw d}}return this},eachSlice:function(d,c,b){c=c?c.bind(b):Prototype.K;var a=-d,e=[],f=this.toArray();while((a+=d)<f.length){e.push(f.slice(a,a+d))}return e.collect(c,b)},all:function(c,b){c=c?c.bind(b):Prototype.K;var a=true;this.each(function(e,d){a=a&&!!c(e,d);if(!a){throw $break}});return a},any:function(c,b){c=c?c.bind(b):Prototype.K;var a=false;this.each(function(e,d){if(a=!!c(e,d)){throw $break}});return a},collect:function(c,b){c=c?c.bind(b):Prototype.K;var a=[];this.each(function(e,d){a.push(c(e,d))});return a},detect:function(c,b){c=c.bind(b);var a;this.each(function(e,d){if(c(e,d)){a=e;throw $break}});return a},findAll:function(c,b){c=c.bind(b);var a=[];this.each(function(e,d){if(c(e,d)){a.push(e)}});return a},grep:function(d,c,b){c=c?c.bind(b):Prototype.K;var a=[];if(Object.isString(d)){d=new RegExp(d)}this.each(function(f,e){if(d.match(f)){a.push(c(f,e))}});return a},include:function(a){if(Object.isFunction(this.indexOf)){if(this.indexOf(a)!=-1){return true}}var b=false;this.each(function(c){if(c==a){b=true;throw $break}});return b},inGroupsOf:function(b,a){a=Object.isUndefined(a)?null:a;return this.eachSlice(b,function(c){while(c.length<b){c.push(a)}return c})},inject:function(a,c,b){c=c.bind(b);this.each(function(e,d){a=c(a,e,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.map(function(c){return c[b].apply(c,a)})},max:function(c,b){c=c?c.bind(b):Prototype.K;var a;this.each(function(e,d){e=c(e,d);if(a==null||e>=a){a=e}});return a},min:function(c,b){c=c?c.bind(b):Prototype.K;var a;this.each(function(e,d){e=c(e,d);if(a==null||e<a){a=e}});return a},partition:function(d,b){d=d?d.bind(b):Prototype.K;var c=[],a=[];this.each(function(f,e){(d(f,e)?c:a).push(f)});return[c,a]},pluck:function(b){var a=[];this.each(function(c){a.push(c[b])});return a},reject:function(c,b){c=c.bind(b);var a=[];this.each(function(e,d){if(!c(e,d)){a.push(e)}});return a},sortBy:function(b,a){b=b.bind(a);return this.map(function(d,c){return{value:d,criteria:b(d,c)}}).sort(function(f,e){var d=f.criteria,c=e.criteria;return d<c?-1:d>c?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var b=Prototype.K,a=$A(arguments);if(Object.isFunction(a.last())){b=a.pop()}var c=[this].concat(a).map($A);return this.map(function(e,d){return b(c.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(c){if(!c){return[]}if(c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}if(Prototype.Browser.WebKit){$A=function(c){if(!c){return[]}if(!(Object.isFunction(c)&&c=="[object NodeList]")&&c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(b){for(var a=0,c=this.length;a<c;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(Object.isArray(a)?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(d,c,b){if(0==b||(a?d.last()!=c:!d.include(c))){d.push(c)}return d})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(c){return b===c})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];this.each(function(b){var c=Object.toJSON(b);if(!Object.isUndefined(c)){a.push(c)}});return"["+a.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){a||(a=0);var b=this.length;if(a<0){a=b+a}for(;a<b;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(b,a){a=isNaN(a)?this.length:(a<0?this.length+a:a)+1;var c=this.slice(0,a).reverse().indexOf(b);return(c<0)?c:a-c-1}}Array.prototype.toArray=Array.prototype.clone;function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var e=[];for(var b=0,c=this.length;b<c;b++){e.push(this[b])}for(var b=0,c=arguments.length;b<c;b++){if(Object.isArray(arguments[b])){for(var a=0,d=arguments[b].length;a<d;a++){e.push(arguments[b][a])}}else{e.push(arguments[b])}}return e}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this},toPaddedString:function(c,b){var a=this.toString(b||10);return"0".times(c-a.length)+a},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)}var Hash=Class.create(Enumerable,(function(){function a(b,c){if(Object.isUndefined(c)){return b}return b+"="+encodeURIComponent(String.interpret(c))}return{initialize:function(b){this._object=Object.isHash(b)?b.toObject():Object.clone(b)},_each:function(c){for(var b in this._object){var d=this._object[b],e=[b,d];e.key=b;e.value=d;c(e)}},set:function(b,c){return this._object[b]=c},get:function(b){return this._object[b]},unset:function(b){var c=this._object[b];delete this._object[b];return c},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(c){var b=this.detect(function(d){return d.value===c});return b&&b.key},merge:function(b){return this.clone().update(b)},update:function(b){return new Hash(b).inject(this,function(c,d){c.set(d.key,d.value);return c})},toQueryString:function(){return this.map(function(d){var c=encodeURIComponent(d.key),b=d.value;if(b&&typeof b=="object"){if(Object.isArray(b)){return b.map(a.curry(c)).join("&")}}return a(c,b)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(b){return b.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(c,a,b){this.start=c;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start){return false}if(this.exclusive){return a<this.end}return a<=this.end}});var $R=function(c,a,b){return new ObjectRange(c,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(d,b,c,a){this.each(function(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,a){$super(a);this.transport=Ajax.getTransport();this.request(b)},request:function(b){this.url=b;this.method=this.options.method;var d=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){d._method=this.method;this.method="post"}this.parameters=d;if(d=Object.toQueryString(d)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+d}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_="}}}try{var a=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a)}Ajax.Responders.dispatch("onCreate",this,a);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||d):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b<d;b+=2){e[c[b]]=c[b+1]}}else{$H(c).each(function(f){e[f.key]=f.value})}}for(var a in e){this.transport.setRequestHeader(a,e[a])}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(d){this.dispatchException(d)}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON)}catch(d){this.dispatchException(d)}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON()}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null}a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(e,f){this.updateContent(e.responseText);if(Object.isFunction(d)){d(e,f)}}).bind(this);$super(c,b)},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts()}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b)}else{a.insertion(c,d)}}else{c.update(d)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(b){if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($(arguments[a]))}return d}if(Object.isString(b)){b=document.getElementById(b)}return Element.extend(b)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(f,a){var c=[];var e=document.evaluate(f,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=e.snapshotLength;b<d;b++){c.push(Element.extend(e.snapshotItem(b)))}return c}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var a=this.Element;this.Element=function(d,c){c=c||{};d=d.toLowerCase();var b=Element.cache;if(Prototype.Browser.IE&&c.name){d="<"+d+' name="'+c.name+'">';delete c.name;return Element.writeAttribute(document.createElement(d),c)}if(!b[d]){b[d]=Element.extend(document.createElement(d))}return Element.writeAttribute(b[d].cloneNode(false),c)};Object.extend(this.Element,a||{})}).call(window);Element.cache={};Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){$(a).style.display="none";return a},show:function(a){$(a).style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){a=$(a);if(b&&b.toElement){b=b.toElement()}if(Object.isElement(b)){return a.update().insert(b)}b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a},replace:function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}else{if(!Object.isElement(c)){c=Object.toHTML(c);var a=b.ownerDocument.createRange();a.selectNode(b);c.evalScripts.bind(c).defer();c=a.createContextualFragment(c.stripScripts())}}b.parentNode.replaceChild(c,b);return b},insert:function(c,e){c=$(c);if(Object.isString(e)||Object.isNumber(e)||Object.isElement(e)||(e&&(e.toElement||e.toHTML))){e={bottom:e}}var d,f,b,g;for(var a in e){d=e[a];a=a.toLowerCase();f=Element._insertionTranslations[a];if(d&&d.toElement){d=d.toElement()}if(Object.isElement(d)){f(c,d);continue}d=Object.toHTML(d);b=((a=="before"||a=="after")?c.parentNode:c).tagName.toUpperCase();g=Element._getContentFromAnonymousElement(b,d.stripScripts());if(a=="top"||a=="after"){g.reverse()}g.each(f.curry(c));d.evalScripts.bind(d).defer()}return c},wrap:function(b,c,a){b=$(b);if(Object.isElement(c)){$(c).writeAttribute(a||{})}else{if(Object.isString(c)){c=new Element(c,a)}else{c=new Element("div",c)}}if(b.parentNode){b.parentNode.replaceChild(c,b)}c.appendChild(b);return c},inspect:function(b){b=$(b);var a="<"+b.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(f){var e=f.first(),c=f.last();var d=(b[e]||"").toString();if(d){a+=" "+c+"="+d.inspect(true)}});return a+">"},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a))}}return b},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling}return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[]}while(a&&a.nodeType!=1){a=a.nextSibling}if(a){return[a].concat($(a).nextSiblings())}return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(b,a){if(Object.isString(a)){a=new Selector(a)}return a.match($(b))},up:function(b,d,a){b=$(b);if(arguments.length==1){return $(b.parentNode)}var c=b.ancestors();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},down:function(b,c,a){b=$(b);if(arguments.length==1){return b.firstDescendant()}return Object.isNumber(c)?b.descendants()[c]:b.select(c)[a||0]},previous:function(b,d,a){b=$(b);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(b))}var c=b.previousSiblings();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},next:function(c,d,b){c=$(c);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(c))}var a=c.nextSiblings();return Object.isNumber(d)?a[d]:Selector.findElement(a,d,b)},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(b){b=$(b);var c=b.readAttribute("id"),a=arguments.callee;if(c){return c}do{c="anonymous_element_"+a.counter++}while($(c));b.writeAttribute("id",c);return c},readAttribute:function(c,a){c=$(c);if(Prototype.Browser.IE){var b=Element._attributeTranslations.read;if(b.values[a]){return b.values[a](c,a)}if(b.names[a]){a=b.names[a]}if(a.include(":")){return(!c.attributes||!c.attributes[a])?null:c.attributes[a].value}}return c.getAttribute(a)},writeAttribute:function(e,c,f){e=$(e);var b={},d=Element._attributeTranslations.write;if(typeof c=="object"){b=c}else{b[c]=Object.isUndefined(f)?true:f}for(var a in b){c=d.names[a]||a;f=b[a];if(d.values[a]){c=d.values[a](e,f)}if(f===false||f===null){e.removeAttribute(c)}else{if(f===true){e.setAttribute(c,c)}else{e.setAttribute(c,f)}}}return e},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a))){return}var c=a.className;return(c.length>0&&(c==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(c)))},addClassName:function(a,b){if(!(a=$(a))){return}if(!a.hasClassName(b)){a.className+=(a.className?" ":"")+b}return a},removeClassName:function(a,b){if(!(a=$(a))){return}a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a},toggleClassName:function(a,b){if(!(a=$(a))){return}return a[a.hasClassName(b)?"removeClassName":"addClassName"](b)},cleanWhitespace:function(b){b=$(b);var c=b.firstChild;while(c){var a=c.nextSibling;if(c.nodeType==3&&!/\S/.test(c.nodeValue)){b.removeChild(c)}c=a}return b},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(f,d){f=$(f),d=$(d);var h=d;if(f.compareDocumentPosition){return(f.compareDocumentPosition(d)&8)===8}if(f.sourceIndex&&!Prototype.Browser.Opera){var g=f.sourceIndex,c=d.sourceIndex,b=d.nextSibling;if(!b){do{d=d.parentNode}while(!(b=d.nextSibling)&&d.parentNode)}if(b&&b.sourceIndex){return(g>c&&g<b.sourceIndex)}}while(f=f.parentNode){if(f==h){return true}}return false},scrollTo:function(a){a=$(a);var b=a.cumulativeOffset();window.scrollTo(b[0],b[1]);return a},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c.camelize();var d=b.style[c];if(!d){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}if(c=="opacity"){return d?parseFloat(d):1}return d=="auto"?null:d},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(b,c){b=$(b);var e=b.style,a;if(Object.isString(c)){b.style.cssText+=";"+c;return c.include("opacity")?b.setOpacity(c.match(/opacity:\s*(\d?\.?\d*)/)[1]):b}for(var d in c){if(d=="opacity"){b.setOpacity(c[d])}else{e[(d=="float"||d=="cssFloat")?(Object.isUndefined(e.styleFloat)?"cssFloat":"styleFloat"):d]=c[d]}}return b},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;return a},getDimensions:function(c){c=$(c);var g=$(c).getStyle("display");if(g!="none"&&g!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var f=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var h=c.clientWidth;var e=c.clientHeight;b.display=a;b.position=d;b.visibility=f;return{width:h,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(window.opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow){return a}a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden"){a.style.overflow="hidden"}return a},undoClipping:function(a){a=$(a);if(!a._overflow){return a}a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},cumulativeOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent}while(b);return Element._returnOffset(c,a)},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){if(b.tagName=="BODY"){break}var c=Element.getStyle(b,"position");if(c!=="static"){break}}}while(b);return Element._returnOffset(d,a)},absolutize:function(b){b=$(b);if(b.getStyle("position")=="absolute"){return}var d=b.positionedOffset();var f=d[1];var e=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=e-parseFloat(b.style.left||0);b._originalTop=f-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=f+"px";b.style.left=e+"px";b.style.width=c+"px";b.style.height=a+"px";return b},relativize:function(a){a=$(a);if(a.getStyle("position")=="relative"){return}a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(b){var a=0,c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode}while(b);return Element._returnOffset(c,a)},getOffsetParent:function(a){if(a.offsetParent){return $(a.offsetParent)}if(a==document.body){return $(a)}while((a=a.parentNode)&&a!=document.body){if(Element.getStyle(a,"position")!="static"){return $(a)}}return $(document.body)},viewportOffset:function(d){var a=0,c=0;var b=d;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&Element.getStyle(b,"position")=="absolute"){break}}while(b=b.offsetParent);b=d;do{if(!Prototype.Browser.Opera||b.tagName=="BODY"){a-=b.scrollTop||0;c-=b.scrollLeft||0}}while(b=b.parentNode);return Element._returnOffset(c,a)},clonePosition:function(b,d){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var e=d.viewportOffset();b=$(b);var f=[0,0];var c=null;if(Element.getStyle(b,"position")=="absolute"){c=b.getOffsetParent();f=c.viewportOffset()}if(c==document.body){f[0]-=document.body.offsetLeft;f[1]-=document.body.offsetTop}if(a.setLeft){b.style.left=(e[0]-f[0]+a.offsetLeft)+"px"}if(a.setTop){b.style.top=(e[1]-f[1]+a.offsetTop)+"px"}if(a.setWidth){b.style.width=d.offsetWidth+"px"}if(a.setHeight){b.style.height=d.offsetHeight+"px"}return b}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(d,b,c){switch(c){case"left":case"top":case"right":case"bottom":if(d(b,"position")==="static"){return null}case"height":case"width":if(!Element.visible(b)){return null}var e=parseInt(d(b,c),10);if(e!==b["offset"+c.capitalize()]){return e+"px"}var a;if(c==="height"){a=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{a=["border-left-width","padding-left","padding-right","border-right-width"]}return a.inject(e,function(f,g){var h=d(b,g);return h===null?f:f-parseInt(h,10)})+"px";default:return d(b,c)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(c,a,b){if(b==="title"){return a.title}return c(a,b)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,b){b=$(b);var a=b.getStyle("position");if(a!=="static"){return c(b)}b.setStyle({position:"relative"});var d=c(b);b.setStyle({position:a});return d});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(e,c){c=$(c);var b=c.getStyle("position");if(b!=="static"){return e(c)}var d=c.getOffsetParent();if(d&&d.getStyle("position")==="fixed"){d.setStyle({zoom:1})}c.setStyle({position:"relative"});var f=e(c);c.setStyle({position:b});return f})});Element.Methods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b]}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100}}return 1}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+b.capitalize()]+"px"}return null}return c};Element.Methods.setOpacity=function(b,e){function f(g){return g.replace(/alpha\([^\)]*\)/gi,"")}b=$(b);var a=b.currentStyle;if((a&&!a.hasLayout)||(!a&&b.style.zoom=="normal")){b.style.zoom=1}var d=b.getStyle("filter"),c=b.style;if(e==1||e===""){(d=f(d))?c.filter=d:c.removeAttribute("filter");return b}else{if(e<0.00001){e=0}}c.filter=f(d)+"alpha(opacity="+(e*100)+")";return b};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,c){var b=a.getAttributeNode(c);return b?b.value:""},_getEv:function(a,b){b=a.getAttribute(b);return b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==="")?"":(b<0.00001)?0:b;return a}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;if(b==1){if(a.tagName=="IMG"&&a.width){a.width++;a.width--}else{try{var d=document.createTextNode(" ");a.appendChild(d);a.removeChild(d)}catch(c){}}}return a};Element.Methods.cumulativeOffset=function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,"position")=="absolute"){break}}b=b.offsetParent}while(b);return Element._returnOffset(c,a)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}if(Object.isElement(c)){return b.update().insert(c)}c=Object.toHTML(c);var a=b.tagName.toUpperCase();if(a in Element._insertionTranslations.tags){$A(b.childNodes).each(function(d){b.removeChild(d)});Element._getContentFromAnonymousElement(a,c.stripScripts()).each(function(d){b.appendChild(d)})}else{b.innerHTML=c.stripScripts()}c.evalScripts.bind(c).defer();return b}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(c,e){c=$(c);if(e&&e.toElement){e=e.toElement()}if(Object.isElement(e)){c.parentNode.replaceChild(e,c);return c}e=Object.toHTML(e);var d=c.parentNode,b=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[b]){var f=c.next();var a=Element._getContentFromAnonymousElement(b,e.stripScripts());d.removeChild(c);if(f){a.each(function(g){d.insertBefore(g,f)})}else{a.each(function(g){d.appendChild(g)})}}else{c.outerHTML=e.stripScripts()}e.evalScripts.bind(e).defer();return c}}Element._returnOffset=function(b,c){var a=[b,c];a.left=b;a.top=c;return a};Element._getContentFromAnonymousElement=function(c,b){var d=new Element("div"),a=Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];a[2].times(function(){d=d.firstChild})}else{d.innerHTML=b}return $A(d.childNodes)};Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(a,c){c=Element._attributeTranslations.has[c]||c;var b=$(a).getAttributeNode(c);return b&&b.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var a={},b=Element.Methods.ByTag;var c=Object.extend(function(f){if(!f||f._extendedByPrototype||f.nodeType!=1||f==window){return f}var d=Object.clone(a),e=f.tagName,h,g;if(b[e]){Object.extend(d,b[e])}for(h in d){g=d[h];if(Object.isFunction(g)&&!(h in f)){f[h]=g.methodize()}}f._extendedByPrototype=Prototype.emptyFunction;return f},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(a,Element.Methods);Object.extend(a,Element.Methods.Simulated)}}});c.refresh();return c})();Element.hasAttribute=function(a,b){if(a.hasAttribute){return a.hasAttribute(b)}return Element.Methods.Simulated.hasAttribute(a,b)};Element.addMethods=function(c){var h=Prototype.BrowserFeatures,d=Element.Methods.ByTag;if(!c){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var b=c;c=arguments[1]}if(!b){Object.extend(Element.Methods,c||{})}else{if(Object.isArray(b)){b.each(g)}else{g(b)}}function g(k){k=k.toUpperCase();if(!Element.Methods.ByTag[k]){Element.Methods.ByTag[k]={}}Object.extend(Element.Methods.ByTag[k],c)}function a(m,l,k){k=k||false;for(var o in m){var n=m[o];if(!Object.isFunction(n)){continue}if(!k||!(o in l)){l[o]=n.methodize()}}}function e(m){var k;var l={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(l[m]){k="HTML"+l[m]+"Element"}if(window[k]){return window[k]}k="HTML"+m+"Element";if(window[k]){return window[k]}k="HTML"+m.capitalize()+"Element";if(window[k]){return window[k]}window[k]={};window[k].prototype=document.createElement(m).__proto__;return window[k]}if(h.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(h.SpecificElementExtensions){for(var j in Element.Methods.ByTag){var f=e(j);if(Object.isUndefined(f)){continue}a(d[j],f.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var a={};var b=Prototype.Browser;$w("width height").each(function(e){var c=e.capitalize();a[e]=(b.WebKit&&!document.evaluate)?self["inner"+c]:(b.Opera)?document.body["client"+c]:document.documentElement["client"+c]});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip();this.compileMatcher()},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var a=this.expression;if(Prototype.Browser.WebKit&&(a.include("-of-type")||a.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(this.expression)){return false}return true},compileMatcher:function(){if(this.shouldUseXPath()){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var f=this.expression,g=Selector.patterns,b=Selector.xpath,d,a;if(Selector._cache[f]){this.xpath=Selector._cache[f];return}this.matcher=[".//*"];while(f&&d!=f&&(/\S/).test(f)){d=f;for(var c in g){if(a=f.match(g[c])){this.matcher.push(Object.isFunction(b[c])?b[c](a):new Template(b[c]).evaluate(a));f=f.replace(a[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;if(this.xpath){return document._getElementsByXPath(this.xpath,a)}return this.matcher(a)},match:function(j){this.tokens=[];var o=this.expression,a=Selector.patterns,f=Selector.assertions;var b,d,g;while(o&&b!==o&&(/\S/).test(o)){b=o;for(var k in a){d=a[k];if(g=o.match(d)){if(f[k]){this.tokens.push([k,Object.clone(g)]);o=o.replace(g[0],"")}else{return this.findElements(document).include(j)}}}}var n=true,c,l;for(var k=0,h;h=this.tokens[k];k++){c=h[0],l=h[1];if(!Selector.assertions[c](j,l)){n=false;break}}return n},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return""}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return new Template("[@#{1}]").evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b){return""}if(Object.isFunction(b)){return b(a)}return new Template(Selector.xpath.pseudos[a[1]]).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(b){var j=b[6],h=Selector.patterns,a=Selector.xpath,f,c;var g=[];while(j&&f!=j&&(/\S/).test(j)){f=j;for(var d in h){if(b=j.match(h[d])){c=Object.isFunction(a[d])?a[d](b):new Template(a[d]).evaluate(b);g.push("("+c.substring(1,c.length-1)+")");j=j.replace(b[0],"");break}}}return"[not("+g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(g,e){var h,j=e[6],d;if(j=="even"){j="2n+0"}if(j=="odd"){j="2n+1"}if(h=j.match(/^(\d+)$/)){return"["+g+"= "+h[1]+"]"}if(h=j.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(h[1]=="-"){h[1]=-1}var f=h[1]?Number(h[1]):1;var c=h[2]?Number(h[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:g,a:f,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(a)},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(b,c){var a=Element.readAttribute(b,c[1]);return a&&Selector.operators[c[2]](a,c[5]||c[6])}},handlers:{concat:function(d,c){for(var e=0,f;f=c[e];e++){d.push(f)}return d},mark:function(a){var d=Prototype.emptyFunction;for(var b=0,c;c=a[b];b++){c._countedByPrototype=d}return a},unmark:function(a){for(var b=0,c;c=a[b];b++){c._countedByPrototype=undefined}return a},index:function(a,d,g){a._countedByPrototype=Prototype.emptyFunction;if(d){for(var b=a.childNodes,e=b.length-1,c=1;e>=0;e--){var f=b[e];if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}else{for(var e=0,c=1,b=a.childNodes;f=b[e];e++){if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}},unique:function(b){if(b.length==0){return b}var d=[],e;for(var c=0,a=b.length;c<a;c++){if(!(e=b[c])._countedByPrototype){e._countedByPrototype=Prototype.emptyFunction;d.push(Element.extend(e))}}return Selector.handlers.unmark(d)},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,e.getElementsByTagName("*"))}return b},child:function(a){var e=Selector.handlers;for(var d=0,c=[],f;f=a[d];d++){for(var b=0,g;g=f.childNodes[b];b++){if(g.nodeType==1&&g.tagName!="!"){c.push(g)}}}return c},adjacent:function(a){for(var c=0,b=[],e;e=a[c];c++){var d=this.nextElementSibling(e);if(d){b.push(d)}}return b},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,Element.nextSiblings(e))}return b},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return null},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a}}return null},tagName:function(a,j,c,b){var k=c.toUpperCase();var e=[],g=Selector.handlers;if(a){if(b){if(b=="descendant"){for(var f=0,d;d=a[f];f++){g.concat(e,d.getElementsByTagName(c))}return e}else{a=this[b](a)}if(c=="*"){return a}}for(var f=0,d;d=a[f];f++){if(d.tagName.toUpperCase()===k){e.push(d)}}return e}else{return j.getElementsByTagName(c)}},id:function(b,a,j,f){var g=$(j),d=Selector.handlers;if(!g){return[]}if(!b&&a==document){return[g]}if(b){if(f){if(f=="child"){for(var c=0,e;e=b[c];c++){if(g.parentNode==e){return[g]}}}else{if(f=="descendant"){for(var c=0,e;e=b[c];c++){if(Element.descendantOf(g,e)){return[g]}}}else{if(f=="adjacent"){for(var c=0,e;e=b[c];c++){if(Selector.handlers.previousElementSibling(g)==e){return[g]}}}else{b=d[f](b)}}}}for(var c=0,e;e=b[c];c++){if(e==g){return[g]}}return[]}return(g&&Element.descendantOf(g,a))?[g]:[]},className:function(b,a,c,d){if(b&&d){b=this[d](b)}return Selector.handlers.byClassName(b,a,c)},byClassName:function(c,b,f){if(!c){c=Selector.handlers.descendant([b])}var h=" "+f+" ";for(var e=0,d=[],g,a;g=c[e];e++){a=g.className;if(a.length==0){continue}if(a==f||(" "+a+" ").include(h)){d.push(g)}}return d},attrPresence:function(c,b,a,g){if(!c){c=b.getElementsByTagName("*")}if(c&&g){c=this[g](c)}var e=[];for(var d=0,f;f=c[d];d++){if(Element.hasAttribute(f,a)){e.push(f)}}return e},attr:function(a,j,h,k,c,b){if(!a){a=j.getElementsByTagName("*")}if(a&&b){a=this[b](a)}var l=Selector.operators[c],f=[];for(var e=0,d;d=a[e];e++){var g=Element.readAttribute(d,h);if(g===null){continue}if(l(g,k)){f.push(d)}}return f},pseudo:function(b,c,e,a,d){if(b&&d){b=this[d](b)}if(!b){b=a.getElementsByTagName("*")}return Selector.pseudos[c](b,e,a)}},pseudos:{"first-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.previousElementSibling(e)){continue}c.push(e)}return c},"last-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.nextElementSibling(e)){continue}c.push(e)}return c},"only-child":function(b,g,a){var e=Selector.handlers;for(var d=0,c=[],f;f=b[d];d++){if(!e.previousElementSibling(f)&&!e.nextElementSibling(f)){c.push(f)}}return c},"nth-child":function(b,c,a){return Selector.pseudos.nth(b,c,a)},"nth-last-child":function(b,c,a){return Selector.pseudos.nth(b,c,a,true)},"nth-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,false,true)},"nth-last-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,true,true)},"first-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,false,true)},"last-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,true,true)},"only-of-type":function(b,d,a){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,d,a),d,a)},getIndices:function(d,c,e){if(d==0){return c>0?[c]:[]}return $R(1,e).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b)}return a})},nth:function(c,s,u,r,e){if(c.length==0){return[]}if(s=="even"){s="2n+0"}if(s=="odd"){s="2n+1"}var q=Selector.handlers,p=[],d=[],g;q.mark(c);for(var o=0,f;f=c[o];o++){if(!f.parentNode._countedByPrototype){q.index(f.parentNode,r,e);d.push(f.parentNode)}}if(s.match(/^\d+$/)){s=Number(s);for(var o=0,f;f=c[o];o++){if(f.nodeIndex==s){p.push(f)}}}else{if(g=s.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(g[1]=="-"){g[1]=-1}var v=g[1]?Number(g[1]):1;var t=g[2]?Number(g[2]):0;var w=Selector.pseudos.getIndices(v,t,c.length);for(var o=0,f,k=w.length;f=c[o];o++){for(var n=0;n<k;n++){if(f.nodeIndex==w[n]){p.push(f)}}}}}q.unmark(c);q.unmark(d);return p},empty:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.tagName=="!"||(e.firstChild&&!e.innerHTML.match(/^\s*$/))){continue}c.push(e)}return c},not:function(a,d,k){var g=Selector.handlers,l,c;var j=new Selector(d).findElements(k);g.mark(j);for(var f=0,e=[],b;b=a[f];f++){if(!b._countedByPrototype){e.push(b)}}g.unmark(j);return e},enabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(!e.disabled){c.push(e)}}return c},disabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.disabled){c.push(e)}}return c},checked:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.checked){c.push(e)}}return c}},operators:{"=":function(b,a){return b==a},"!=":function(b,a){return b!=a},"^=":function(b,a){return b.startsWith(a)},"$=":function(b,a){return b.endsWith(a)},"*=":function(b,a){return b.include(a)},"~=":function(b,a){return(" "+b+" ").include(" "+a+" ")},"|=":function(b,a){return("-"+b.toUpperCase()+"-").include("-"+a.toUpperCase()+"-")}},split:function(b){var a=[];b.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){a.push(c[1].strip())});return a},matchElements:function(f,g){var e=$$(g),d=Selector.handlers;d.mark(e);for(var c=0,b=[],a;a=f[c];c++){if(a._countedByPrototype){b.push(a)}}d.unmark(e);return b},findElement:function(b,c,a){if(Object.isNumber(c)){a=c;c=false}return Selector.matchElements(b,c||"*")[a||0]},findChildElements:function(e,g){g=Selector.split(g.join(","));var d=[],f=Selector.handlers;for(var c=0,b=g.length,a;c<b;c++){a=new Selector(g[c].strip());f.concat(d,a.findElements(e))}return(b>1)?f.unique(d):d}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var e=0,f;f=c[e];e++){if(f.tagName!=="!"){d.push(f)}}return d},unmark:function(a){for(var b=0,c;c=a[b];b++){c.removeAttribute("_countedByPrototype")}return a}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(g,b){if(typeof b!="object"){b={hash:!!b}}else{if(Object.isUndefined(b.hash)){b.hash=true}}var c,f,a=false,e=b.submit;var d=g.inject({},function(h,j){if(!j.disabled&&j.name){c=j.name;f=$(j).getValue();if(f!=null&&(j.type!="submit"||(!a&&e!==false&&(!e||c==e)&&(a=true)))){if(c in h){if(!Object.isArray(h[c])){h[c]=[h[c]]}h[c].push(f)}else{h[c]=f}}}return h});return b.hash?d:Object.toQueryString(d)}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(b,c){if(Form.Element.Serializers[c.tagName.toLowerCase()]){b.push(Element.extend(c))}return b})},getInputs:function(g,c,d){g=$(g);var a=g.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var e=0,h=[],f=a.length;e<f;e++){var b=a[e];if((c&&b.type!=c)||(d&&b.name!=d)){continue}h.push(Element.extend(b))}return h},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(b){var c=$(b).getElements().findAll(function(d){return"hidden"!=d.type&&!d.disabled});var a=c.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0}).sortBy(function(d){return d.tabIndex}).first();return a?a:c.find(function(d){return["input","select","textarea"].include(d.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams()}Object.extend(a.parameters,d)}if(b.hasAttribute("method")&&!a.method){a.method=b.method}return new Ajax.Request(c,a)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type))){a.select()}}catch(b){}return a},disable:function(a){a=$(a);a.blur();a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b)){return a.checked?a.value:null}else{a.checked=!!b}},textarea:function(a,b){if(Object.isUndefined(b)){return a.value}else{a.value=b}},select:function(d,a){if(Object.isUndefined(a)){return this[d.type=="select-one"?"selectOne":"selectMany"](d)}else{var c,f,g=!Object.isArray(a);for(var b=0,e=d.length;b<e;b++){c=d.options[b];f=this.optionValue(c);if(g){if(f==a){c.selected=true;return}}else{c.selected=a.include(f)}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null},selectMany:function(d){var a,e=d.length;if(!e){return null}for(var c=0,a=[];c<e;c++){var b=d.options[c];if(b.selected){a.push(this.optionValue(b))}}return a},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b);this.element=$(a);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(b){var a;switch(b.type){case"mouseover":a=b.fromElement;break;case"mouseout":a=b.toElement;break;default:return null}return Element.extend(a)}});Event.Methods=(function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(d,c){return d.button==b[c]}}else{if(Prototype.Browser.WebKit){a=function(d,c){switch(c){case 0:return d.which==1&&!d.metaKey;case 1:return d.which==1&&d.metaKey;default:return false}}}else{a=function(d,c){return d.which?(d.which===c+1):(d.button===c)}}}return{isLeftClick:function(c){return a(c,0)},isMiddleClick:function(c){return a(c,1)},isRightClick:function(c){return a(c,2)},element:function(d){var c=Event.extend(d).target;return Element.extend(c.nodeType==Node.TEXT_NODE?c.parentNode:c)},findElement:function(d,f){var c=Event.element(d);if(!f){return c}var e=[c].concat(c.ancestors());return Selector.findElement(e,f,0)},pointer:function(c){return{x:c.pageX||(c.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y:c.pageY||(c.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}},pointerX:function(c){return Event.pointer(c).x},pointerY:function(c){return Event.pointer(c).y},stop:function(c){Event.extend(c);c.preventDefault();c.stopPropagation();c.stopped=true}}})();Event.extend=(function(){var a=Object.keys(Event.Methods).inject({},function(b,c){b[c]=Event.Methods[c].methodize();return b});if(Prototype.Browser.IE){Object.extend(a,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(b){if(!b){return false}if(b._extendedByPrototype){return b}b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),pageX:c.x,pageY:c.y});return Object.extend(b,a)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,a);return Prototype.K}})();Object.extend(Event,(function(){var b=Event.cache;function c(k){if(k._prototypeEventID){return k._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return k._prototypeEventID=[++arguments.callee.id]}function g(k){if(k&&k.include(":")){return"dataavailable"}return k}function a(k){return b[k]=b[k]||{}}function f(m,k){var l=a(m);return l[k]=l[k]||[]}function h(l,k,m){var p=c(l);var o=f(p,k);if(o.pluck("handler").include(m)){return false}var n=function(q){if(!Event||!Event.extend||(q.eventName&&q.eventName!=k)){return false}Event.extend(q);m.call(l,q)};n.handler=m;o.push(n);return n}function j(n,k,l){var m=f(n,k);return m.find(function(o){return o.handler==l})}function d(n,k,l){var m=a(n);if(!m[k]){return false}m[k]=m[k].without(j(n,k,l))}function e(){for(var l in b){for(var k in b[l]){b[l][k]=null}}}if(window.attachEvent){window.attachEvent("onunload",e)}return{observe:function(m,k,n){m=$(m);var l=g(k);var o=h(m,k,n);if(!o){return m}if(m.addEventListener){m.addEventListener(l,o,false)}else{m.attachEvent("on"+l,o)}return m},stopObserving:function(m,k,n){m=$(m);var p=c(m),l=g(k);if(!n&&k){f(p,k).each(function(q){m.stopObserving(k,q.handler)});return m}else{if(!k){Object.keys(a(p)).each(function(q){m.stopObserving(q)});return m}}var o=j(p,k,n);if(!o){return m}if(m.removeEventListener){m.removeEventListener(l,o,false)}else{m.detachEvent("on"+l,o)}d(p,k,n);return m},fire:function(m,l,k){m=$(m);if(m==document&&document.createEvent&&!m.dispatchEvent){m=document.documentElement}var n;if(document.createEvent){n=document.createEvent("HTMLEvents");n.initEvent("dataavailable",true,true)}else{n=document.createEventObject();n.eventType="ondataavailable"}n.eventName=l;n.memo=k||{};if(document.createEvent){m.dispatchEvent(n)}else{m.fireEvent(n.eventType,n)}return Event.extend(n)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});

(function() {
  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
     Matthias Miller, Dean Edwards, John Resig and Diego Perini. */

  var timer;

  function fireContentLoadedEvent() {
    if (document.loaded) return;
    if (timer) window.clearInterval(timer);
    document.loaded = true;
    document.fire("dom:loaded");
  }

  function isCssLoaded() {
    return true;
  }

  if (document.addEventListener) {
    if (Prototype.Browser.Opera) {
      isCssLoaded = function() {
         var sheets = document.styleSheets, length = sheets.length;
         while (length--) if (sheets[length].disabled) return false;
         return true;
      };
      // Force check to end when window loads
      Event.observe(window, "load", function() { isCssLoaded = function() { return true } });
    }
    else if (Prototype.Browser.WebKit) {
      isCssLoaded = function() {
        var length = document.getElementsByTagName('style').length,
        links = document.getElementsByTagName('link');
        for (var i=0, link; link = links[i]; i++)
          if(link.getAttribute('rel') == "stylesheet") length++;
        return document.styleSheets.length >= length;
      };
    }
    document.addEventListener("DOMContentLoaded", function() {
      // Ensure all stylesheets are loaded, solves Opera/Safari issue
      if (!isCssLoaded()) return arguments.callee.defer();
      fireContentLoadedEvent();
    }, false);

  } else {
    document.attachEvent("onreadystatechange", function() {
      if (document.readyState == "complete") {
        document.detachEvent("onreadystatechange", arguments.callee);
        fireContentLoadedEvent();
      }
    });

    if (window == top) {
      timer = setInterval(function() {
        try {
          document.documentElement.doScroll("left");
        } catch(e) { return }
        fireContentLoadedEvent();
      }, 10);
    }
  }

  // Safari <3.1 doesn't support DOMContentLoaded
  if (Prototype.Browser.WebKit && (navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1] < 525)) {
    timer = setInterval(function() {
      if (/loaded|complete/.test(document.readyState) && isCssLoaded())
        fireContentLoadedEvent();
    }, 10);
  }

  // Worst case fallback...
  Event.observe(window, "load", fireContentLoadedEvent);
})();

Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c)}this.xcomp=a;this.ycomp=c;this.offset=Element.cumulativeOffset(b);return(c>=this.offset[1]&&c<this.offset[1]+b.offsetHeight&&a>=this.offset[0]&&a<this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,d){var c=Element.cumulativeScrollOffset(b);this.xcomp=a+c[0]-this.deltaX;this.ycomp=d+c[1]-this.deltaY;this.offset=Element.cumulativeOffset(b);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+b.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(b,c,a){a=a||{};return Element.clonePosition(c,b,a)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(b){function a(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]"}b.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,e){e=e.toString().strip();var d=/\s/.test(e)?$w(e).map(a).join(""):a(e);return d?document._getElementsByXPath(".//*"+d,c):[]}:function(e,f){f=f.toString().strip();var g=[],h=(/\s/.test(f)?$w(f):null);if(!h&&!f){return g}var c=$(e).getElementsByTagName("*");f=" "+f+" ";for(var d=0,k,j;k=c[d];d++){if(k.className&&(j=" "+k.className+" ")&&(j.include(f)||(h&&h.all(function(l){return !l.toString().blank()&&j.include(" "+l+" ")})))){g.push(Element.extend(k))}}return g};return function(d,c){return $(c||document.body).getElementsByClassName(d)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();Object.extend(Number.prototype,{roundTo:function(c){var b="1";for(var a=0;a<c;a++){b+="0"}b=parseInt(b);return Math.round((this*b))/b},ceilTo:function(c){var b="1";for(var a=0;a<c;a++){b+="0"}b=parseInt(b);return Math.ceil((this*b))/b},isOdd:function(){return(this%2)==1},isEven:function(){return !(this%2)}});Object.extend(Array.prototype,{inArray:function(b){for(var a=0;a<this.length;a++){if(this[a]==b){return true}}return false},merge:function(a){this.push(a);return this.flatten()},shuffle:function(){for(var b,a,c=this.length;c;b=parseInt(Math.random()*c),a=this[--c],this[c]=this[b],this[b]=a){}return this}});var STR_PAD_LEFT="1";var STR_PAD_RIGHT="-1";Object.extend(String.prototype,{pad:function(d,e,a){var f=this;a=typeof a=="undefined"?STR_PAD_LEFT:a;if(f.length<d){var b=d-f.length;for(var c=0;c<b;c++){if(a==STR_PAD_LEFT){f=e+f}else{f=f+e}}}return f},multiReplace:function(a){var c=this;for(var b in a){c=c.replacer(b,a[b])}return c},replacer:function(b,a){return this.split(b).join(a)},inString:function(a){return this.indexOf(a)!=-1},ucFirst:function(){var b=this;var a=b.split("").shift();return a.toUpperCase()+b.substr(1)},getContents:function(b,a){var c=this.substr(this.indexOf(b));return c.substr(1,c.indexOf(a)-1)},countOccurences:function(a){return this.split(a).length-1}});Object.extend(Event,{KEY_SHIFT:-1,KEY_ALT:-2,KEY_CTRL:-3});Object.extend(Position,{windowPosition:function(){return{x:window.screenX?window.screenX:window.screenLeft,y:window.screenY?window.screenY:window.screenTop}},windowBounds:function(){if(document.layers||(document.getElementById&&!document.all)){winW=window.outerWidth;winH=window.outerHeight}else{if(document.all){winW=document.body.clientWidth;winH=document.body.clientHeight}}return{width:winW,height:winH}},withinWindowBounds:function(a){var b=Position.windowBounds();var c=Position.page(a);return c[0]<b.width&&c[1]<b.height},boundsWithinWindowBounds:function(a){var c=Element.getDimensions(a);var b=Position.windowBounds();var d=Position.page(a);return d[0]+c.width<b.width&&d[1]+c.height<b.height},getPageSize:function(d){d=typeof d=="undefined"?true:d;var c,a;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}var b,e;if(self.innerHeight){b=self.innerWidth;e=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;e=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;e=document.body.clientHeight}}}if(a<e){pageHeight=e}else{pageHeight=a}if(c<b){pageWidth=b}else{pageWidth=c}if(d){if(Prototype.Browser.Gecko){if(e<pageHeight){pageWidth-=15}}}return{width:pageWidth,height:pageHeight,windowWidth:b,windowHeight:e}},getPageScroll:function(){var a;if(self.pageYOffset){a=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}}return{_x:0,_y:a}}});Object.extend(Math,{roundTo:function(a,b){a*=Math.pow(10,b);a=(Math.round(a)/Math.pow(10,b))+"";if(a.indexOf(".")==-1){a+="."}while(a.length-a.indexOf(".")-1<b){a+="0"}return a}});Object.extend(Element,{getOuterHTML:function(a){var b=document.createElement("div");var d=$(a).cloneNode(true);b.appendChild(d);var c=b.innerHTML;delete b;delete d;return c}});Element.addMethods({toHTML:function(a){if(typeof a=="string"){a=$(a)}return Try.these(function(){var b=new XMLSerializer();return a.nodeType==4?a.nodeValue:b.serializeToString(a)},function(){return a.xml||a.outerHTML||$(a).clone().wrap().up().innerHTML})||""},getStyles:function(a){a=$(a);return $A(a.style).inject({},function(c,b){c[b.camelize()]=a.getStyle(b);return c})},clone:function(a){var b=new Element(a.tagName);$A(a.attributes).each(function(c){if(c.name!="style"){b[c.name]=c.value}});b.setStyle(a.getStyles());b.update(a.innerHTML);return b}});isset=function(d,c){var b=c.split(".");for(var a=0;a<b.length;a++){if(typeof d[b[a]]=="undefined"){return false}d=d[b[a]]}return true};APPEND_BOTTOM=1;APPEND_TOP=2;INSERT_AFTER=3;INSERT_BEFORE=4;REPLACE=5;function write(b,c,a){switch(a){case APPEND_TOP:new Insertion.Top(b,c);break;case APPEND_BOTTOM:new Insertion.Bottom(b,c);break;case INSERT_BEFORE:new Insertion.Before(b,c);break;case INSERT_AFTER:new Insertion.After(b,c);break;case REPLACE:default:$(id).update(c);break}}validate=function(b,c,a){if(c.inArray(b)){return b}return a};Form.Element.DelayedObserver=Class.create();Form.Element.DelayedObserver.prototype={initialize:function(b,a,c){this.delay=a||0.5;this.element=$(b);this.callback=c;this.timer=null;this.lastValue=$(this.element).value;Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))},delayedListener:function(a){if(this.lastValue==$(this.element).value){return}if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);this.lastValue=$(this.element).value},onTimerEvent:function(){this.timer=null;this.callback(this.element,$(this.element).value)},deleteListener:function(){Event.stopObserving(this.element,"keyup",this.delayedListener)}};Element.addMethods({ajax:function(c,b,a){new Ajax.Updater(c,b,a)}});function $RF(b,a){if($(b).type&&$(b).type.toLowerCase()=="radio"){var a=$(b).name;var b=$(b).form}else{if($(b).tagName.toLowerCase()!="form"){return false}}var c=$(b).getInputs("radio",a).find(function(d){return d.checked});return(c)?$F(c):null}String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(",");var b=0;do{a+=parseInt(c[b]).toColorPart()}while(++b<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var b=1;b<4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};Array.prototype.call=function(){var a=arguments;this.each(function(b){b.apply(this,a)})};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(a){if(typeof Builder=="undefined"){throw ("Effect.tagifyText requires including script.aculo.us' builder.js library")}var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(Builder.node("span",{style:b},d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,c){var e;if(((typeof b=="object")||(typeof b=="function"))&&(b.length)){e=b}else{e=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(e).each(function(g,f){new c(g,Object.extend(a,{delay:f*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,a)}};var Effect2=Effect;Effect.Transitions={linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return(a>1?1:a)},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(b,a){a=a||5;return(Math.round((b%(1/a))*a)==0?((b*a*2)-Math.floor(b*a*2)):1-((b*a*2)-Math.floor(b*a*2)))},none:function(a){return 0},full:function(a){return 1}};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var c=new Date().getTime();var a=(typeof b.options.queue=="string")?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(typeof a!="string"){return a}if(!this.instances[a]){this.instances[a]=new Effect.ScopedQueue()}return this.instances[a]}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if(this.state=="idle"){this.state="running";'+codeForEvent(options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(options,"afterSetup")+'};if(this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=Math.round(b*this.totalFrames);if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(typeof this[property]!="function"){a[property]=this[property]}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Event=Class.create();Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){var a=Object.extend({duration:0},arguments[0]||{});this.start(a)},update:Prototype.emptyFunction});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:Math.round(this.options.x*a+this.originalLeft)+"px",top:Math.round(this.options.y*a+this.originalTop)+"px"})}});Effect.MoveBy=function(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(a,e){var f={};if(this.options.scaleX){f.width=Math.round(e)+"px"}if(this.options.scaleY){f.height=Math.round(a)+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(e-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){f.top=this.originalTop-c+"px"}if(this.options.scaleX){f.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){f.top=-c+"px"}if(this.options.scaleX){f.left=-b+"px"}}}this.element.setStyle(f)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+(Math.round(this._base[d]+(this._delta[d]*a)).toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);this.start(arguments[1]||{})},setup:function(){Position.prepare();var b=Position.cumulativeOffset(this.element);if(this.options.offset){b[1]+=this.options.offset}var a=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(b[1]>a?a:b[1])-this.scrollStart},update:function(a){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(a*this.delta))}});["setOpacity","getOpacity","getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass"].each(function(a){Element.Methods[a]=Element[a]});Element.addMethods();Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:a})}},arguments[1]||{});return new Effect.Opacity(c,b)};Effect.Appear=function(b){b=$(b);var a=Object.extend({from:(b.getStyle("display")=="none"?0:b.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(b,a)};var PluginObject=function(b,a){this.options={version:1,version_fail_message:'The current version of the %PluginType% plugin is too old. You currently have version %PluginVersion% but you need at least version %PluginRequiredVersion% to view this plugin. We suggest that you upgrade %PluginType% to the latest version. To upgrade please <a href="%PluginUpgradeUrl%" target="_blank">click here</a>. However, you may wish to try running the plugin in your current version <a href="%PluginObjectNoDetectUrl%">click here</a>.',version_fail_redirect:false,detect_key:"detect_plugin",auto_embed:true,embed_id:undefined,memorise_detect_status:true,cookie_expiry:new Date().getTime()+31449600000,cookie_path:"/",cookie_domain:null,cookie_secure:false,placeholder:false,placeholder_alt:"PluginObject placeholder.",placeholder_title:"Click to view plugin.",width:100,height:100,id:null,use_plugin:null,file_extension:null,params:{},variables:{},attributes:{}};this.Controller=null;this.Plugin=null;this._id=null;this._initiate(b,a)};PluginObject.Plugins=new Object();PluginObject.Controls=new Object();PluginObject.References=new Object();RETURN_HTML=-1239876450;PluginObject.prototype={Version:"1.0.0",_events:{},registerEvent:function(b,a){this._events[b]=a},hasEvent:function(a){return typeof this._events[a]!="undefined"},dispatchEvent:function(b,a){if(this._events[b]){if(typeof this._events[b].func=="function"){return this._events[b].func.apply(this._events[b].obj,a)}}return null},removeEvent:function(a){delete this._events[a]},setMany:function(c,a){for(var b in a){this.options[c][b]=a[b]}},setAttributes:function(a){this.setMany("attributes",a)},setAttribute:function(a,b){this.options.attributes[a]=b},getAttribute:function(a){return this.options.attributes[a]},addParams:function(a){this.setMany("params",a)},addParam:function(a,b){this.options.params[a]=b},getParams:function(){return this.options.params},addVariables:function(a){this.setMany("variables",a)},addVariable:function(a,b){this.options.variables[a]=b},getVariable:function(a){return this.options.variables[a]},getVariables:function(){return this.options.variables},getVariablePairs:function(){var a=[];var b;var c=this.getVariables();for(b in c){a.push(b+"="+c[b])}return a},_initiate:function(a,n){if(!document.createElement||!document.getElementById){return}this.options.id=n.id||"PluginObject_"+PluginObject.Util.generateRandomID(20);this._id=this.options.id;PluginObject.Util.mergeObjects(this.options,n||{});var f=this.options.use_plugin!=null?this.options.use_plugin:false;this.use_plugin=PluginObject.Util.getPluginType(a,f,this.options.file_extension);this.options.detect_key+="_"+this.use_plugin.toLowerCase();var j=PluginObject.Util.getRequestParameter(this.options.detect_key);this.skip_detect=j=="false";if(j=="true"||j=="false"){if(this.options.memorise_detect_status){var l=new Date().getTime();var g=this.options.cookie_expiry;var h="PluginObject"+this.use_plugin+"Memory="+j+"; expires="+new Date((l>g?l+g:g)).toGMTString()+(this.options.cookie_path?"; path="+this.options.cookie_path:"")+(this.options.cookie_domain?"; domain="+this.options.cookie_domain:"")+(this.options.cookie_secure?"; secure":"")}}else{if(this.options.memorise_detect_status){var b=document.cookie.indexOf(escape("PluginObject"+this.use_plugin+"Memory")+"=");var d=false;if(b!=-1){var k=b+"PluginObject"+this.use_plugin+"Memory=".length;var m=document.cookie.indexOf(";",k);if(m!=-1){d=unescape(document.cookie.substring(k,m))}else{d=unescape(document.cookie.substring(k))}this.skip_detect=true}}}this.setAttribute("src",a);this.setAttribute("id",this.options.id);this.setAttribute("width",this.options.width);this.setAttribute("height",this.options.height);if(this.options.version){this.setAttribute("version",new PluginObject.Util.PlayerVersion(this.options.version.toString().split(".")))}else{this.setAttribute("version",new PluginObject.Util.PlayerVersion([1,0,0]))}this.Plugin=new PluginObject.Plugins[this.use_plugin]();this._absorbUncommonFunctions();if(typeof PluginObject.Controls[this.use_plugin]=="function"){this.Controller=new PluginObject.Controls[this.use_plugin]()}this.Plugin._initiate(this,a,this.options);this.setAttribute("classid",this.options._class_id);this.setAttribute("type",this.options._type);if(this.options.auto_embed){this.write(this.options.embed_id)}},_absorbUncommonFunctions:function(){for(var a in this.Plugin){if(a.substr(0,1)=="__"){if(typeof this.Plugin[a]=="function"){this[a]=function(){var b=arguments;b.push(this);this.Plugin[a.substr(2,a.length)].apply(this.Plugin,b)}}}}},_activateFromPlaceholder:function(){this.options.placeholder=null;var a=true;if(this.hasEvent("placeholderActivation")){a=this.dispatchEvent("placeholderActivation",[this,"PluginObject_placeholder_"+this._id,"PluginObject_wrapper_"+this._id])}if(a){this.activate()}},activate:function(){document.getElementById("PluginObject_placeholder_"+this._id).style.display="none";if(!this.options.embed_id){this.options.embed_id="PluginObject_wrapper_"+this._id}this.write(this.options.embed_id)},_getPlaceholderHTML:function(){var a;if(!(a=this.dispatchEvent("prePlaceholderHTML",[this]))){PluginObject.References[this._id]=this;if(typeof this.Plugin._getPlaceholderHTML=="function"){a=this.Plugin._getPlaceholderHTML(this)}else{a='<img id="PluginObject_placeholder_'+this._id+'" src="'+this.options.placeholder+'" width="'+this.options.width+'" height="'+this.options.height+'" title="'+this.options.placeholder_title+'" alt="'+this.options.placeholder_alt+'" style="cursor:pointer;" onclick="PluginObject.References[\''+this._id+"']._activateFromPlaceholder();\" />"}if(!this.options.element_id){a='<div id="PluginObject_wrapper_'+this._id+'">'+a+"</div>"}var b;if((b=this.dispatchEvent("postPlaceholderHTML",[a]))){a=b}}return a},write:function(a){var c;if(typeof a=="string"){if(!(c=document.getElementById(a))){throw ("PluginObject [ERROR] - PluginObject was unable to write the "+this.use_plugin+" plugin ("+this.getAttribute("src")+') to "'+a+'" because the element was not found in the DOM.')}}this.dispatchEvent("preWriteGet",[]);if(this.skip_detect||this.Plugin._detect(this,this.getAttribute("version"))){var e=false;if(this.options.placeholder){this.pluginHTML=this._getPlaceholderHTML()}else{this.pluginHTML=this._getHTML();e=true}var d;if((d=this.dispatchEvent("preWrite",[this,this.pluginHTML,(this.options.placeholder)]))){this.pluginHTML=d}if(a===RETURN_HTML){return this.pluginHTML}if(typeof c=="undefined"){if(!PluginObject.Util.document_has_loaded){document.write(this.pluginHTML)}else{throw ("PluginObject [ERROR] - PluginObject was unable to write the "+this.use_plugin+" plugin ("+this.getAttribute("src")+') because the element the page has already loaded. You must specify an "embed_id" for PluginObject to write into.')}}else{c.innerHTML=this.pluginHTML}this.dispatchEvent("postWrite",[this,a,(this.options.placeholder)]);if(e){if(this.Controller!=null){if(this.Controller._initiate){this.Controller._initiate(a,PluginObject.References[this._id])}}}return true}else{if(this.options.version_fail_redirect){document.location.replace(this.options.version_fail_redirect)}else{var f=this.options.version_fail_message;f=f.split("%PluginType%").join(this.use_plugin);f=f.split("%PluginVersion%").join(this.installedVer.toString());f=f.split("%PluginRequiredVersion%").join(this.getAttribute("version"));f=f.split("%PluginUpgradeUrl%").join(this.options.upgrade_url);var b=document.location.href;b+=(b.indexOf("?")==-1?"?":"&")+this.options.detect_key+"=false";f=f.split("%PluginObjectNoDetectUrl%").join(b);if(typeof c=="undefined"){if(!PluginObject.Util.document_has_loaded){document.write(f)}else{}}else{c.innerHTML=f}}}return false},_getHTML:function(a,e){if(typeof this.Plugin._getHTML=="function"){return this.Plugin._getHTML(this,a,e)}var c="";var d=this.getParams();if((PluginObject.Util.is_netscape&&!a)||e){this.dispatchEvent("preNetscapeBuild",[this]);c='<embed type="'+this.getAttribute("type")+'" src="'+this.getAttribute("src")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';c+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';for(var b in d){c+=[b]+'="'+d[b]+'" '}c+="/>";this.dispatchEvent("postNetscapeBuild",[this])}else{this.dispatchEvent("preExplorerBuild",[this]);c='<object id="'+this.getAttribute("id")+'" classid="'+this.getAttribute("classid")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';c+='<param name="src" value="'+this.getAttribute("src")+'" />';for(var b in d){c+='<param name="'+b+'" value="'+d[b]+'" />'}if(a){c+=this._getHTML(a,true)}c+="</object>";this.dispatchEvent("postExplorerBuild",[this])}return c},getEmbedCode:function(){return this._getHTML(true).split(' id="'+this.getAttribute("id")+'"').join("").split(' name="'+this.getAttribute("id")+'"').join("")},getMySpaceEmbedCode:function(){return this._getHTML(false,true).split(' id="'+this.getAttribute("id")+'"').join("").split(' name="'+this.getAttribute("id")+'"').join("")}};PluginObject.prototype.embed=PluginObject.prototype.write;if(Array.prototype.push==null){Array.prototype.push=function(a){this[this.length]=a;return this.length}}if(Array.prototype.inArray==null){Array.prototype.inArray=function(c){var a=this.length;for(var b=0;b<a;b++){if(this[b]==c){return true}}return false}}PluginObject.Util=new Object();PluginObject.Util={ExtensionTranslation:{},AliasTranslation:{},is_netscape:!(!(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length)),oldLoad:function(){},getRequestParameter:function(d){var b=document.location.search||document.location.hash;if(b){var c=b.indexOf(d+"=");var a=(b.indexOf("&",c)>-1)?b.indexOf("&",c):b.length;if(b.length>1&&c>-1){return b.substring(b.indexOf("=",c)+1,a)}}return""},getPluginType:function(f,a,g){if(a){var e=PluginObject.Util.AliasTranslation;var d=a}else{var e=PluginObject.Util.ExtensionTranslation;if(!g){var b=f.indexOf("?");if(b!=-1){f=f.substr(0,b)}d=f.split(".").pop().toLowerCase()}else{d=g}}for(var c in e){if(e[c].inArray(d)){return c}}if(a){throw ('PluginObject [ERROR] : "'+g+'" is not an alias of a known plugin type.')}else{throw ('PluginObject [ERROR] : There is no plugin associated with files that have the extension "'+g+'".')}return null},mergeObjects:function(a,c){for(var b in c){a[b]=c[b]}return a},observeEvent:function(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a)}else{if(d.attachEvent){d.attachEvent("on"+c,b)}}},generateRandomID:function(a){var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789012345678901234567890123456789".split("");var d=e.length;var f="";for(var c=0;c<a;c++){var b=Math.floor(Math.random()*d);f+=e[b]}return f}};PluginObject.Util.PlayerVersion=function(a){this.major=parseInt(a[0])!=null?parseInt(a[0]):0;this.minor=parseInt(a[1])||0;this.rev=parseInt(a[2])||0};PluginObject.Util.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};PluginObject.Util.PlayerVersion.prototype.toString=function(){return this.major+"."+this.minor+"."+this.rev};PluginObject.Util.document_has_loaded=false;PluginObject.Util.observeEvent(window,"load",function(){PluginObject.Util.document_has_loaded=true});var GET=PluginObject.Util.getRequestParameter;PluginObject.Util.ExtensionTranslation.Flash=["swf"];PluginObject.Util.AliasTranslation.Flash=["swf","flash"];PluginObject.Plugins.Flash=function(){};PluginObject.Plugins.Flash.prototype={options:{upgrade_url:"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash",_class_id:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",_type:"application/x-shockwave-flash",quality:"high",use_express_install:false,do_express_install:false,xi_redirect_url:window.location},_initiate:function(b,d,a){PluginObject.Util.mergeObjects(b.options,this.options||{});b.installedVer=this._getPlayerVersion(b);b.addParam("quality",b.options.quality);var c=b.options.bgcolor?b.options.bgcolor:(b.options.bgcolour?b.options.bgcolour:false);if(c){b.addParam("bgcolor",b.options.bgcolor)}b.setAttribute("useExpressInstall",b.options.use_express_install);b.setAttribute("doExpressInstall",b.options.do_express_install);b.setAttribute("xiRedirectUrl",b.options.xi_redirect_url);b.registerEvent("preExplorerBuild",{func:function(e){if(e.getAttribute("do_express_install")){e.addParam("MMplayerType","ActiveX");e.addParam("wmode","transparent")}var f=e.getVariablePairs().join("&");if(f.length>0){e.addParam("flashvars",f)}}});b.registerEvent("preNetscapeBuild",{func:function(e){if(e.getAttribute("do_express_install")){e.addVariable("MMplayerType","PlugIn")}var f=e.getVariablePairs().join("&");if(f.length>0){e.addParam("flashvars",f)}}})},_getPlayerVersion:function(f){var b=new PluginObject.Util.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){b=new PluginObject.Util.PlayerVersion(a.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var c=3;d!=null;c++){d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);b=new PluginObject.Util.PlayerVersion([c,0,0])}}catch(h){}var g=f.getAttribute("version");if(g&&b.major>g.major){return b}if(!g||((g.minor!=0||g.rev!=0)&&b.major==g.major)||b.major!=6||f.options.use_express_install){try{b=new PluginObject.Util.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","))}catch(h){}}}return b},_detect:function(b,a){return(b.installedVer.versionIsValid(a))}};var sIFR=new function(){var SIFR=this;var CSS_ACTIVE="sIFR-active";var CSS_UNLOADING="sIFR-unloading";var CSS_REPLACED="sIFR-replaced";var CSS_FLASH="sIFR-flash";var CSS_IGNORE="sIFR-ignore";var CSS_ALTERNATE="sIFR-alternate";var CSS_CLASS="sIFR-class";var CSS_LAYOUT="sIFR-layout";var CSS_FIX_FOCUS="sIFR-fixfocus";var CSS_DUMMY="sIFR-dummy";var CSS_ZOOM_DETECT="sIFR-zoomdetect";var MIN_FONT_SIZE=6;var MAX_FONT_SIZE=126;var MIN_FLASH_VERSION=8;var PREFETCH_COOKIE="SIFR-PREFETCHED";var DEFAULT_RATIOS=[];var FLASH_PADDING_BOTTOM=0;var VERSION="382";this.isActive=false;this.isEnabled=true;this.preserveSingleWhitespace=false;this.fixWrap=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.fromLocal=false;this.forceClear=false;this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.callbacks=[];var elementCount=0;var hasPrefetched=false,isInitialized=false;function DomUtil(){var XHTML_NS="http://www.w3.org/1999/xhtml";this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(selector){return window.parseSelector(selector)};this.addClass=function(name,node){if(node){node.className=((node.className||"")==""?"":node.className+" ")+name}};this.removeClass=function(name,node){if(node){node.className=node.className.replace(new RegExp("(^|\\s)"+name+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(name,node){return new RegExp("(^|\\s)"+name+"(\\s|$)").test(node.className)};this.hasOneOfClassses=function(names,node){for(var i=0;i<names.length;i++){if(this.hasClass(names[i],node)){return true}}return false};this.create=function(name){if(document.createElementNS){return document.createElementNS(XHTML_NS,name)}return document.createElement(name)};this.nodeFromHtml=function(html){var temp=this.create("div");temp.innerHTML=html;return temp.firstChild};this.getComputedStyle=function(node,property){var result;if(document.defaultView&&document.defaultView.getComputedStyle){var style=document.defaultView.getComputedStyle(node,null);result=style?style[property]:null}else{if(node.currentStyle){result=node.currentStyle[property]}}return result||""};this.getStyleAsInt=function(node,property,requirePx){var value=this.getComputedStyle(node,property);if(requirePx&&!/px$/.test(value)){return 0}value=parseInt(value);return isNaN(value)?0:value};this.getWidthFromStyle=function(node){var width=this.getStyleAsInt(node,"width",ua.ie);if(width==0){var paddingRight=this.getStyleAsInt(node,"paddingRight",true);var paddingLeft=this.getStyleAsInt(node,"paddingLeft",true);var borderRight=this.getStyleAsInt(node,"borderRightWidth",true);var borderLeft=this.getStyleAsInt(node,"borderLeftWidth",true);width=node.offsetWidth-paddingLeft-paddingRight-borderLeft-borderRight}return width};this.getHeightFromStyle=function(node){var height=this.getStyleAsInt(node,"height",ua.ie);if(height==0){var paddingTop=this.getStyleAsInt(node,"paddingTop",true);var paddingBottom=this.getStyleAsInt(node,"paddingBottom",true);var borderTop=this.getStyleAsInt(node,"borderTopHeight",true);var borderBottom=this.getStyleAsInt(node,"borderBottomHeight",true);height=node.offsetHeight-paddingBottom-paddingTop-borderBottom-borderTop}return height};this.blurElement=function(element){if(ua.gecko){element.blur();return}var input=dom.create("input");input.style.width="0px";input.style.height="0px";element.parentNode.appendChild(input);input.focus();input.blur();input.parentNode.removeChild(input)};this.getDimensions=function(node){var width=node.offsetWidth;var height=node.offsetHeight;if(width==0||height==0){for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType!=1){continue}width=Math.max(width,child.offsetWidth);height=Math.max(height,child.offsetHeight)}}return{width:width,height:height}};this.contentIsLink=function(node){var linkFound=false;for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType==3&&!child.nodeValue.match(/^\s*$/)){return false}else{if(child.nodeType!=1){continue}}var isLink=child.nodeName.toLowerCase()=="a";if(!isLink){return false}else{linkFound=true}}return linkFound};var dom=this;this.swf={create:function(builder,fixFocus,id,width,height,src,vars,wmode,backgroundColor){var obj=builder.object(fixFocus,id,src,width,height);return builder.params(obj,"flashvars",vars,"wmode",wmode,"bgcolor",backgroundColor,"allowScriptAccess","always","quality","best")},ie:{object:function(fixFocus,id,src,width,height){return'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" width="'+width+'" height="'+height+'" class="'+CSS_FLASH+'"><param name="movie" value="'+src+'"></param></object><script event=FSCommand(info,args) for='+id+">"+id+"_DoFSCommand(info, args);<\/script>"},params:function(obj){var params="";for(var i=1;i<arguments.length;i+=2){params+='<param name="'+arguments[i]+'" value="'+arguments[i+1]+'"></param>'}return obj.replace(/(<\/object>)/,params+"$1")},insert:function(node,flash){node.innerHTML=flash;return flash}},other:{object:function(fixFocus,id,src,width,height){var obj=dom.create("object");var attrs=["type","application/x-shockwave-flash","id",id,"name",id,"data",src,"width",width,"height",height];while(attrs.length){obj.setAttribute(attrs.shift(),attrs.shift())}obj.className=CSS_FLASH;if(!fixFocus){return{root:obj,obj:obj}}var node=dom.create("div");node.className=CSS_FIX_FOCUS;node.appendChild(obj);return{root:node,obj:obj}},params:function(obj){for(var i=1;i<arguments.length;i+=2){if(arguments[i]=="name"){continue}var param=dom.create("param");param.setAttribute("name",arguments[i]);param.setAttribute("value",arguments[i+1]);obj.obj.appendChild(param)}return obj.root},insert:function(node,flash){while(node.firstChild){node.removeChild(node.firstChild)}node.appendChild(flash);return flash.cloneNode(true)}}}}var dom=this.dom=new DomUtil();function UserAgentDetection(){var ua=navigator.userAgent.toLowerCase();var product=(navigator.product||"").toLowerCase();this.macintosh=ua.indexOf("mac")>-1;this.windows=ua.indexOf("windows")>-1;this.quicktime=false;this.opera=ua.indexOf("opera")>-1;this.konqueror=product.indexOf("konqueror")>-1;this.ie=false
/*@cc_on || true @*/
;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(ua)
/*@cc_on && @_jscript_version >= 5.5 @*/
;this.ieWin=this.ie&&this.windows
/*@cc_on && @_jscript_version >= 5.1 @*/
;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.ie&&this.macintosh
/*@cc_on && @_jscript_version < 5.1 @*/
;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=ua.indexOf("safari")>-1;this.webkit=ua.indexOf("applewebkit")>-1&&!this.konqueror;this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&product=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(ua)?parseFloat(RegExp.$1):0;this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(ua)?parseFloat(RegExp.$2):0;this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(ua)?parseFloat(RegExp.$1):0;this.geckoBuildDate=this.gecko&&/.*gecko\/(\d{8}).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorMajor=this.konqueror&&/.*konqueror\/(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorMinor=this.konqueror&&/.*khtml\/\d\.(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.konquerorSmall=this.konqueror&&/.*khtml\/\d\.\d\.(\d).*/.exec(ua)?parseFloat(RegExp.$1):0;this.flashVersion=0;if(this.ieWin){var axo;var stop=false;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=6;axo.AllowScriptAccess="always"}catch(e){stop=this.flashVersion==6}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}}if(!stop&&axo){this.flashVersion=parseFloat(/([\d,?]+)/.exec(axo.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var flashPlugin=navigator.plugins["Shockwave Flash"];this.flashVersion=parseFloat(/(\d+\.?\d*)/.exec(flashPlugin.description)[1]);var i=0;while(this.flashVersion>=MIN_FLASH_VERSION&&i<navigator.mimeTypes.length){var mime=navigator.mimeTypes[i];if(mime.type=="application/x-shockwave-flash"&&mime.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){this.flashVersion=0;this.quicktime=true}i++}}}this.flash=this.flashVersion>=MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||document.defaultView&&document.defaultView.getComputedStyle&&(!this.gecko||this.geckoBuildDate>=20030624);this.requiresPrefetch=this.ieWin||this.khtml;this.fixFocus=this.gecko&&this.windows&&this.geckoBuildDate>20061206;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=525||this.konqueror&&this.konquerorMajor>3||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkit<523;this.properDocument=typeof(document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&(!this.opera)&&(!this.webkit||this.webkitVersion>=412)&&(!this.konqueror)&&this.computedStyleSupport&&(!this.gecko||this.geckoBuildDate>20040804)}var ua=this.ua=new UserAgentDetection();function Util(){var UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};var SINGLE_WHITESPACE=" ";function capitalize($){return $.toUpperCase()}this.normalize=function(str){if(SIFR.preserveSingleWhitespace){return str.replace(/\s/g,SINGLE_WHITESPACE)}return str.replace(/(\n|\r)+/g,SINGLE_WHITESPACE).replace(/(\s)\s+/g,"$1").replace(/\xA0/,SINGLE_WHITESPACE)};this.textTransform=function(type,str){switch(type){case"uppercase":str=str.toUpperCase();break;case"lowercase":str=str.toLowerCase();break;case"capitalize":var strCopy=str;str=str.replace(/^\w|\s\w/g,capitalize);if(str.indexOf("function capitalize")!=-1){var substrs=strCopy.replace(/(^|\s)(\w)/g,"$1$1$2$2").split(/^\w|\s\w/g);str="";for(var i=0;i<substrs.length;i++){str+=substrs[i].charAt(0).toUpperCase()+substrs[i].substring(1)}}break}return str};this.toHexString=function(str){if(typeof(str)!="string"||!str.charAt(0)=="#"||str.length!=4&&str.length!=7){return str}str=str.replace(/#/,"");if(str.length==3){str=str.replace(/(.)(.)(.)/,"$1$1$2$2$3$3")}return"0x"+str};this.toJson=function(obj){var json="";switch(typeof(obj)){case"string":json='"'+obj+'"';break;case"number":case"boolean":json=obj.toString();break;case"object":json=[];for(var prop in obj){if(obj[prop]==Object.prototype[prop]){continue}json.push('"'+prop+'":'+util.toJson(obj[prop]))}json="{"+json.join(",")+"}";break}return json};this.convertCssArg=function(arg){if(!arg){return{}}if(typeof(arg)=="object"){if(arg.constructor==Array){arg=arg.join("")}else{return arg}}var obj={};var rules=arg.split("}");for(var i=0;i<rules.length;i++){var $=rules[i].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!$||$.length!=3){continue}if(!obj[$[1]]){obj[$[1]]={}}var properties=$[2].split(";");for(var j=0;j<properties.length;j++){var $2=properties[j].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!$2||$2.length!=3){continue}obj[$[1]][$2[1]]=$2[2].replace(/\s+$/,"")}}return obj};this.extractFromCss=function(css,selector,property,remove){var value=null;if(css&&css[selector]&&css[selector][property]){value=css[selector][property];if(remove){delete css[selector][property]}}return value};this.cssToString=function(arg){var css=[];for(var selector in arg){var rule=arg[selector];if(rule==Object.prototype[selector]){continue}css.push(selector,"{");for(var property in rule){if(rule[property]==Object.prototype[property]){continue}var value=rule[property];if(UNIT_REMOVAL_PROPERTIES[property]){value=parseInt(value,10)}css.push(property,":",value,";")}css.push("}")}return css.join("")};this.escape=function(str){return escape(str).replace(/\+/g,"%2B")};this.copyProperties=function(from,to){for(var property in from){if(to[property]===undefined){to[property]=from[property]}}return to};this.domain=function(){var domain="";try{domain=document.domain}catch(e){}return domain};this.domainMatches=function(domain,match){if(match=="*"||match==domain){return true}var wildcard=match.lastIndexOf("*");if(wildcard>-1){match=match.substr(wildcard+1);var matchPosition=domain.lastIndexOf(match);if(matchPosition>-1&&(matchPosition+match.length)==domain.length){return true}}return false};this.uriEncode=function(s){return encodeURI(decodeURIComponent(s))}}var util=this.util=new Util();var hacks={};function FragmentIdentifier(){this.fix=true;var cachedTitle;this.cache=function(){cachedTitle=document.title};function doFix(){document.title=cachedTitle}this.restore=function(){if(this.fix){setTimeout(doFix,0)}}}hacks.fragmentIdentifier=new FragmentIdentifier();function PageLoad(){var dummy=null;function pollLoad(){try{if(ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(e){return setTimeout(pollLoad,10)}afterDomLoad()}function afterDomLoad(){if(SIFR.useStyleCheck){checkStyle()}else{if(!ua.mustCheckStyle){fire(null,true)}}}function checkStyle(){dummy=dom.create("div");dummy.className=CSS_DUMMY;dom.getBody().appendChild(dummy);pollStyle()}function pollStyle(){if(dom.getComputedStyle(dummy,"marginLeft")=="42px"){afterStyle()}else{setTimeout(pollStyle,10)}}function afterStyle(){if(dummy&&dummy.parentNode){dummy.parentNode.removeChild(dummy)}dummy=null;fire(null,true)}function fire(evt,preserveReplacements){SIFR.initialize(preserveReplacements);if(evt&&evt.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",fire,false)}if(window.removeEventListener){window.removeEventListener("load",fire,false)}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",fire,false)}else{window.attachEvent("onload",fire)}if(!SIFR.useDomLoaded||ua.forcePageLoad||ua.ie&&window.top!=window){return}if(ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",afterDomLoad,false)}else{if(ua.ie||ua.khtml){pollLoad()}}}}hacks.pageLoad=new PageLoad();this.hacks={fragmentIdentifier:hacks.fragmentIdentifier};function Errors(){this.fire=function(id){if(this[id+"Alert"]){alert(this[id+"Alert"])}throw new Error(this[id])};this.isFile="sIFR: Did not activate because the page is being loaded from the filesystem.";this.isFileAlert="Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience.";this.getSource="sIFR: Could not determine appropriate source"}this.errors=new Errors();function FlashInteractor(id,vars,forceWidth,events){this.id=id;this.vars=vars;this._events=events;this._forceWidth=forceWidth;this._firedReplacementEvent=!(events.onReplacement!=null);this._rescale=false;this.html=null}FlashInteractor.prototype.getFlashElement=function(){return document.getElementById(this.id)};FlashInteractor.prototype.available=function(){var flashNode=this.getFlashElement();return flashNode&&flashNode.parentNode};FlashInteractor.prototype.handle=function(info,arg){if(!this.available()){return}switch(/(FSCommand\:)?(.+)/.exec(info)[2]){case"init":this._rescale=true;break;case"resize":var flashNode=this.getFlashElement();var $=arg.split(/\:|,/);flashNode.setAttribute($[0],$[1]);this.updateVars("renderheight",$[1]);this.storeSize($[0],$[1]);if($.length>2){flashNode.style[$[2]]=$[3]+"px";this.storeSize($[2],$[3])}if(ua.khtml){var repaint=flashNode.offsetHeight}if(!this._firedReplacementEvent){this._events.onReplacement(this);this._firedReplacementEvent=true}if(this._rescale){this._rescale=false;var cb=this;setTimeout(function(){cb.call("scale")},0)}break;case"resetmovie":this.resetMovie();break;case"blur":dom.blurElement(this.getFlashElement());break;case"event":if(this._events[arg]){this._events[arg](this)}break;default:if(this.debugHandler&&/(FSCommand\:)?debug/.test(info)){this.debugHandler(info,arg)}}};FlashInteractor.prototype.call=function(type,value){if(!this.available()){return false}var flashNode=this.getFlashElement();try{flashNode.SetVariable("callbackType",type);flashNode.SetVariable("callbackValue",value);flashNode.SetVariable("callbackTrigger",true)}catch(e){return false}return true};FlashInteractor.prototype.replaceText=function(content,alternate){var escapedContent=util.escape(content);if(this.call("replacetext",escapedContent)){this.updateVars("content",escapedContent);var node=this.getAlternate();if(alternate){while(node.firstChild){node.removeChild(node.firstChild)}for(var i=0;i<alternate.length;i++){node.appendChild(alternate[i])}}else{try{node.innerHTML=content}catch(e){}}return true}return false};FlashInteractor.prototype.updateVars=function(name,value){for(var i=0;i<this.vars.length;i++){if(this.vars[i].split("=")[0]==name){this.vars[i]=name+"="+value;break}}if(!ua.ie){this.injectVars(this.getFlashElement());this.injectVars(this.html)}};FlashInteractor.prototype.storeSize=function(type,value){if(ua.ie){this.html=this.html.replace(type=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+value+'"');this.updateVars(type,value)}else{this.html.setAttribute(type,value);this.updateVars(type,value)}};FlashInteractor.prototype.injectVars=function(flash){var params=flash.getElementsByTagName("param");for(var i=0;i<params.length;i++){if(params[i].getAttribute("name")=="flashvars"){params[i].setAttribute("value",encodeVars(this.vars));break}}};FlashInteractor.prototype.resetMovie=function(){if(!this.available()){return}var flashNode=this.getFlashElement();var node=flashNode.parentNode;if(ua.ie){this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+encodeVars(this.vars));node.replaceChild(dom.nodeFromHtml(this.html),flashNode)}else{node.replaceChild(this.html.cloneNode(true),flashNode)}};FlashInteractor.prototype.resize=function(){if(!this.available()){return}var flashNode=this.getFlashElement();var currentWidth=flashNode.offsetWidth;if(currentWidth==0){return}var originalWidth=flashNode.getAttribute("width");var originalHeight=flashNode.getAttribute("height");var ancestor=this.getAncestor();var minHeight=dom.getHeightFromStyle(ancestor);flashNode.style.width="0px";flashNode.style.height="0px";ancestor.style.minHeight=minHeight+"px";var nodes=this.getAlternate().childNodes;var clones=[];for(var i=0;i<nodes.length;i++){var node=nodes[i].cloneNode(true);clones.push(node);ancestor.appendChild(node)}var width=dom.getWidthFromStyle(ancestor);for(var i=0;i<clones.length;i++){ancestor.removeChild(clones[i])}flashNode.style.width=flashNode.style.height=ancestor.style.minHeight="";flashNode.setAttribute("width",this._forceWidth?width:originalWidth);flashNode.setAttribute("height",originalHeight);if(width!=currentWidth){if(this._forceWidth){this.storeSize("width",width)}this.call("resize",width)}};FlashInteractor.prototype.changeCSS=function(css){css=util.escape(util.cssToString(util.convertCssArg(css)));this.updateVars("css",css);return this.call("changecss",css)};FlashInteractor.prototype.getAlternate=function(){return document.getElementById(this.id+"_alternate")};FlashInteractor.prototype.getAncestor=function(){var ancestor=this.getFlashElement().parentNode;return !dom.hasClass(CSS_FIX_FOCUS,ancestor)?ancestor:ancestor.parentNode};var replaceKwargsStore={kwargs:[],replaceAll:function(preserve){for(var i=0;i<this.kwargs.length;i++){SIFR.replace(this.kwargs[i])}if(!preserve){this.kwargs=[]}}};function isValidDomain(){if(SIFR.domains.length==0){return true}var domain=util.domain();for(var i=0;i<SIFR.domains.length;i++){var match=SIFR.domains[i];if(util.domainMatches(domain,match)){return true}}return false}function isFile(){if(!SIFR.fromLocal&&document.location.protocol=="file:"){if(SIFR.debug){SIFR.errors.fire("isFile")}return true}return false}function resize(evt){var viewport=resize.viewport;resize.viewport={width:window.innerWidth||document.documentElement.clientWidth||dom.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||dom.getBody().clientHeight};if(viewport&&resize.viewport.width==viewport.width&&resize.viewport.height==viewport.height){return}if(resize.timer){clearTimeout(resize.timer)}resize.timer=setTimeout(function(){delete resize.timer;for(var i=0;i<SIFR.callbacks.length;i++){SIFR.callbacks[i].resize()}},200)}this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return}if(arguments.length>0){this.prefetch.apply(this,arguments)}this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.fix=ua.ieWin&&hacks.fragmentIdentifier.fix&&window.location.hash!="";if(hacks.fragmentIdentifier.fix){hacks.fragmentIdentifier.cache()}if(!this.autoInitialize){return}hacks.pageLoad.attach();if(ua.ie){window.attachEvent("onunload",function(){dom.addClass(CSS_UNLOADING,document.documentElement)})}};this.setFlashClass=function(){if(this.hasFlashClassSet){return}dom.addClass(CSS_ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return}dom.removeClass(CSS_ACTIVE,dom.getBody());dom.removeClass(CSS_ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(preserveReplacements){if(!this.isActive||!this.isEnabled){return}if(isInitialized){if(!preserveReplacements){replaceKwargsStore.replaceAll(false)}return}isInitialized=true;replaceKwargsStore.replaceAll(preserveReplacements);if(SIFR.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false)}else{window.attachEvent("onresize",resize)}}clearPrefetch()};function getSource(src){if(typeof(src)!="string"){if(src.src){src=src.src}if(typeof(src)!="string"){var versions=[];for(var version in src){if(src[version]!=Object.prototype[version]){versions.push(version)}}versions.sort().reverse();var result="";var i=-1;while(!result&&++i<versions.length){if(parseFloat(versions[i])<=ua.flashVersion){result=src[versions[i]]}}src=result}}if(!src&&SIFR.debug){SIFR.errors.fire("getSource")}if(ua.ie&&src.charAt(0)=="/"){src=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+src}return src}this.prefetch=function(){if((!ua.requiresPrefetch&&!this.isActive)||!ua.supported||!this.isEnabled||!isValidDomain()){return}if(this.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return}try{hasPrefetched=true;if(ua.ieWin){prefetchIexplore(arguments)}else{prefetchLight(arguments)}if(this.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+this.cookiePath}}catch(e){if(SIFR.debug){throw e}}};function prefetchIexplore(args){for(var i=0;i<args.length;i++){document.write('<script defer type="sifr/prefetch" src="'+getSource(args[i])+'"><\/script>')}}function prefetchLight(args){for(var i=0;i<args.length;i++){new Image().src=getSource(args[i])}}function clearPrefetch(){if(!ua.ieWin||!hasPrefetched){return}try{var nodes=document.getElementsByTagName("script");for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.type=="sifr/prefetch"){node.parentNode.removeChild(node)}}}catch(e){}}function getRatio(size,ratios){for(var i=0;i<ratios.length;i+=2){if(size<=ratios[i]){return ratios[i+1]}}return ratios[ratios.length-1]||1}function getFilters(obj){var filters=[];for(var filter in obj){if(obj[filter]==Object.prototype[filter]){continue}var properties=obj[filter];filter=[filter.replace(/filter/i,"")+"Filter"];for(var property in properties){if(properties[property]==Object.prototype[property]){continue}filter.push(property+":"+util.escape(util.toJson(util.toHexString(properties[property]))))}filters.push(filter.join(","))}return util.escape(filters.join(";"))}function calculate(node){var lineHeight,lines;if(!ua.ie){lineHeight=dom.getStyleAsInt(node,"lineHeight");lines=Math.floor(dom.getStyleAsInt(node,"height")/lineHeight)}else{if(ua.ie){var fontSize=dom.getComputedStyle(node,"fontSize");if(fontSize.indexOf("px")>0){lineHeight=parseInt(fontSize)}else{var html=node.innerHTML;node.style.visibility="visible";node.style.overflow="visible";node.style.position="static";node.style.zoom="normal";node.style.writingMode="lr-tb";node.style.width=node.style.height="auto";node.style.maxWidth=node.style.maxHeight=node.style.styleFloat="none";var rectNode=node;var hasLayout=node.currentStyle.hasLayout;if(hasLayout){node.innerHTML='<div class="'+CSS_LAYOUT+'">X<br />X<br />X</div>';rectNode=node.firstChild}else{node.innerHTML="X<br />X<br />X"}var rects=rectNode.getClientRects();lineHeight=rects[1].bottom-rects[1].top;lineHeight=Math.ceil(lineHeight*0.8);if(hasLayout){node.innerHTML='<div class="'+CSS_LAYOUT+'">'+html+"</div>";rectNode=node.firstChild}else{node.innerHTML=html}rects=rectNode.getClientRects();lines=rects.length;if(hasLayout){node.innerHTML=html}node.style.visibility=node.style.width=node.style.height=node.style.maxWidth=node.style.maxHeight=node.style.overflow=node.style.styleFloat=node.style.position=node.style.zoom=node.style.writingMode=""}}}return{lineHeight:lineHeight,lines:lines}}this.replace=function(kwargs,mergeKwargs){if(!ua.supported){return}if(mergeKwargs){kwargs=util.copyProperties(kwargs,mergeKwargs)}if(!isInitialized){return replaceKwargsStore.kwargs.push(kwargs)}if(SIFR.onReplacementStart){SIFR.onReplacementStart(kwargs)}var nodes=kwargs.elements;if(!nodes){nodes=dom.querySelectorAll(kwargs.selector)}if(nodes.length==0){return}var src=getSource(kwargs.src);var css=util.convertCssArg(kwargs.css);var filters=getFilters(kwargs.filters);var forceClear=(kwargs.forceClear==null)?SIFR.forceClear:kwargs.forceClear;var forceSingleLine=kwargs.forceSingleLine===true;var fitExactly=forceSingleLine||((kwargs.fitExactly==null)?SIFR.fitExactly:kwargs.fitExactly);var forceWidth=fitExactly||(kwargs.forceWidth==null?SIFR.forceWidth:kwargs.forceWidth);var preventWrap=!!(kwargs.preventWrap&&!forceSingleLine);var leading=parseInt(util.extractFromCss(css,".sIFR-root","leading"))||0;var fontSize=util.extractFromCss(css,".sIFR-root","font-size",true)||0;var backgroundColor=util.extractFromCss(css,".sIFR-root","background-color",true)||"#FFFFFF";var kerning=util.extractFromCss(css,".sIFR-root","kerning",true)||"";var gridFitType=kwargs.gridFitType||util.extractFromCss(css,".sIFR-root","text-align")=="right"?"subpixel":"pixel";var textTransform=SIFR.forceTextTransform?util.extractFromCss(css,".sIFR-root","text-transform",true)||"none":"none";var opacity=util.extractFromCss(css,".sIFR-root","opacity",true)||"100";var cursor=util.extractFromCss(css,".sIFR-root","cursor",true)||"default";var pixelFont=kwargs.pixelFont||false;var ratios=kwargs.ratios||DEFAULT_RATIOS;var tuneHeight=parseInt(kwargs.tuneHeight)||0;var events=!!kwargs.onRelease||!!kwargs.onRollOver||!!kwargs.onRollOut;if(parseInt(fontSize).toString()!=fontSize&&fontSize.indexOf("px")==-1){fontSize=0}else{fontSize=parseInt(fontSize)}if(parseFloat(opacity)<1){opacity=100*parseFloat(opacity)}var cssText="";if(fitExactly){util.extractFromCss(css,".sIFR-root","text-align",true)}if(!kwargs.modifyCss){cssText=util.cssToString(css)}var wmode=kwargs.wmode||"";if(!wmode){if(kwargs.transparent){wmode="transparent"}else{if(kwargs.opaque){wmode="opaque"}}}if(wmode=="transparent"){if(!ua.transparencySupport){wmode="opaque"}else{backgroundColor="transparent"}}for(var i=0;i<nodes.length;i++){var node=nodes[i];if(dom.hasOneOfClassses([CSS_REPLACED,CSS_IGNORE,CSS_ALTERNATE],node)){continue}var dimensions=dom.getDimensions(node);var height=dimensions.height;var width=dimensions.width;var display=dom.getComputedStyle(node,"display");if(!height||!width||display==null||display=="none"){continue}if(forceClear&&ua.gecko){node.style.clear="both"}var html=null;if(SIFR.fixWrap&&ua.ie&&display=="block"){html=node.innerHTML;node.innerHTML="X"}width=dom.getWidthFromStyle(node);if(html&&SIFR.fixWrap&&ua.ie){node.innerHTML=html}var lineHeight,lines;if(!fontSize){var calculation=calculate(node);lineHeight=Math.min(MAX_FONT_SIZE,Math.max(MIN_FONT_SIZE,calculation.lineHeight));if(pixelFont){lineHeight=Math.max(8,8*Math.round(lineHeight/8))}lines=calculation.lines;if(isNaN(lines)||!isFinite(lines)||lines==0){lines=1}if(lines>1&&leading){height+=Math.round((lines-1)*leading)}}else{lineHeight=fontSize;lines=1}height=Math.round(lines*lineHeight);if(forceClear&&ua.gecko){node.style.clear=""}var alternate=dom.create("span");alternate.className=CSS_ALTERNATE;var contentNode=node.cloneNode(true);node.parentNode.appendChild(contentNode);for(var j=0,l=contentNode.childNodes.length;j<l;j++){alternate.appendChild(contentNode.childNodes[j].cloneNode(true))}if(kwargs.modifyContent){kwargs.modifyContent(contentNode,kwargs.selector)}if(kwargs.modifyCss){cssText=kwargs.modifyCss(css,contentNode,kwargs.selector)}var fixHover=SIFR.fixHover&&dom.contentIsLink(contentNode);var content=handleContent(contentNode,textTransform,kwargs.uriEncode);contentNode.parentNode.removeChild(contentNode);if(kwargs.modifyContentString){content.text=kwargs.modifyContentString(content.text,kwargs.selector)}if(content.text==""){continue}var renderHeight=Math.round(lines*getRatio(lineHeight,ratios)*lineHeight)+FLASH_PADDING_BOTTOM+tuneHeight;var forcedWidth=forceWidth?width:"100%";var vars=["content="+util.escape(content.text),"antialiastype="+(kwargs.antiAliasType||""),"width="+width,"height="+height,"renderheight="+renderHeight,"fitexactly="+fitExactly,"tunewidth="+(kwargs.tuneWidth||0),"tuneheight="+tuneHeight,"offsetleft="+(kwargs.offsetLeft||""),"offsettop="+(kwargs.offsetTop||""),"thickness="+(kwargs.thickness||""),"sharpness="+(kwargs.sharpness||""),"kerning="+kerning,"gridfittype="+gridFitType,"flashfilters="+filters,"opacity="+opacity,"blendmode="+(kwargs.blendMode||""),"size="+lineHeight,"css="+util.escape(cssText),"selectable="+(kwargs.selectable==null?"true":kwargs.selectable),"fixhover="+fixHover,"preventwrap="+preventWrap,"forcesingleline="+forceSingleLine,"link="+util.escape(content.primaryLink[0]||""),"target="+util.escape(content.primaryLink[1]||""),"events="+events,"cursor="+cursor,"version="+VERSION];var encodedVars=encodeVars(vars);var callbackName="sIFR_callback_"+elementCount++;var callbackInfo=new FlashInteractor(callbackName,vars,forceWidth,{onReplacement:kwargs.onReplacement,onRollOver:kwargs.onRollOver,onRollOut:kwargs.onRollOut,onRelease:kwargs.onRelease});window[callbackName+"_DoFSCommand"]=(function(callbackInfo){return function(info,arg){callbackInfo.handle(info,arg)}})(callbackInfo);alternate.setAttribute("id",callbackName+"_alternate");var builder=ua.ie?dom.swf.ie:dom.swf.other;var flash=dom.swf.create(builder,ua.fixFocus&&kwargs.fixFocus,callbackName,forcedWidth,renderHeight,src,encodedVars,wmode,backgroundColor);callbackInfo.html=builder.insert(node,flash);SIFR.callbacks.push(callbackInfo);if(kwargs.selector){if(!SIFR.callbacks[kwargs.selector]){SIFR.callbacks[kwargs.selector]=[callbackInfo]}else{SIFR.callbacks[kwargs.selector].push(callbackInfo)}}node.appendChild(alternate);dom.addClass(CSS_REPLACED,node)}hacks.fragmentIdentifier.restore()};this.getCallbackByFlashElement=function(node){for(var i=0;i<SIFR.callbacks.length;i++){if(SIFR.callbacks[i].id==node.getAttribute("id")){return SIFR.callbacks[i]}}};this.redraw=function(){for(var i=0;i<SIFR.callbacks.length;i++){SIFR.callbacks[i].resetMovie()}};function encodeVars(vars){return vars.join("&").replace(/%/g,"%25")}function handleContent(source,textTransform,uriEncode){uriEncode=uriEncode||util.uriEncode;var stack=[],content=[],primaryLink=[];var nodes=source.childNodes;var i=0;while(i<nodes.length){var node=nodes[i];if(node.nodeType==3){var text=util.normalize(node.nodeValue);text=util.textTransform(textTransform,text);text=text.replace(/</g,"&lt;");content.push(text)}if(node.nodeType==1){var attributes=[];var nodeName=node.nodeName.toLowerCase();var className=node.className||"";if(/\s+/.test(className)){if(className.indexOf(CSS_CLASS)>-1){className=className.match("(\\s|^)"+CSS_CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{className=className.match(/^([^\s]+)/)[1]}}if(className!=""){attributes.push('class="'+className+'"')}if(nodeName=="a"){var href=uriEncode(node.getAttribute("href")||"");var target=node.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');if(primaryLink.length==0){primaryLink=[href,target]}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");if(node.hasChildNodes()){stack.push(i);i=0;nodes=node.childNodes;continue}else{if(!/^(br|img)$/i.test(node.nodeName)){content.push("</",node.nodeName.toLowerCase(),">")}}}if(stack.length>0&&!node.nextSibling){do{i=stack.pop();nodes=node.parentNode.parentNode.childNodes;node=nodes[i];if(node){content.push("</",node.nodeName.toLowerCase(),">")}}while(i==nodes.length-1&&stack.length>0)}i++}return{text:content.join("").replace(/\n|\r/g,""),primaryLink:primaryLink}}};var parseSelector=(function(){var b=/\s*,\s*/;var a=/\s*([\s>+~(),]|^|$)\s*/g;var l=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var e=/^[^\s>+~]/;var k=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function g(q,o){o=o||document.documentElement;var r=q.split(b),w=[];for(var t=0;t<r.length;t++){var m=[o],v=f(r[t]);for(var s=0;s<v.length;){var p=v[s++],n=v[s++],u="";if(v[s]=="("){while(v[s++]!=")"&&s<v.length){u+=v[s]}u=u.slice(0,-1)}m=h(m,p,n,u)}w=w.concat(m)}return w}function f(m){var n=m.replace(a,"$1").replace(l,"$1*$2");if(e.test(n)){n=" "+n}return n.match(k)||[]}function h(m,o,p,n){return(g.selectors[o])?g.selectors[o](m,p,n):[]}var d={toArray:function(n){var m=[];for(var o=0;o<n.length;o++){m.push(n[o])}return m}};var c={isTag:function(n,m){return(m=="*")||(m.toLowerCase()==n.nodeName.toLowerCase())},previousSiblingElement:function(m){do{m=m.previousSibling}while(m&&m.nodeType!=1);return m},nextSiblingElement:function(m){do{m=m.nextSibling}while(m&&m.nodeType!=1);return m},hasClass:function(m,n){return(n.className||"").match("(^|\\s)"+m+"(\\s|$)")},getByTag:function(m,n){return n.getElementsByTagName(m)}};var j={"#":function(m,o){for(var n=0;n<m.length;n++){if(m[n].getAttribute("id")==o){return[m[n]]}}return[]}," ":function(n,p){var m=[];for(var o=0;o<n.length;o++){m=m.concat(d.toArray(c.getByTag(p,n[o])))}return m},">":function(n,q){var m=[];for(var p=0,r;p<n.length;p++){r=n[p];for(var o=0,s;o<r.childNodes.length;o++){s=r.childNodes[o];if(s.nodeType==1&&c.isTag(s,q)){m.push(s)}}}return m},".":function(n,p){var m=[];for(var o=0,q;o<n.length;o++){q=n[o];if(c.hasClass([p],q)){m.push(q)}}return m},":":function(m,o,n){return(g.pseudoClasses[o])?g.pseudoClasses[o](m,n):[]}};g.selectors=j;g.pseudoClasses={};g.util=d;g.dom=c;return g})();var CookieJar=Class.create();CookieJar.prototype={appendString:"__CJ_",initialize:function(b){this.options={expires:3600,path:"",domain:"",secure:""};Object.extend(this.options,b||{});if(this.options.expires!=""){var a=new Date();a=new Date(a.getTime()+(this.options.expires*1000));this.options.expires="; expires="+a.toGMTString()}if(this.options.path!=""){this.options.path="; path="+escape(this.options.path)}if(this.options.domain!=""){this.options.domain="; domain="+escape(this.options.domain)}if(this.options.secure=="secure"){this.options.secure="; secure"}else{this.options.secure=""}},put:function(a,c){a=this.appendString+a;cookie=this.options;var b=typeof c;switch(b){case"undefined":case"function":case"unknown":return false;case"boolean":case"string":case"number":c=String(c.toString())}var f=a+"="+escape(Object.toJSON(c));try{document.cookie=f+cookie.expires+cookie.path+cookie.domain+cookie.secure}catch(d){return false}return true},remove:function(c){c=this.appendString+c;cookie=this.options;try{var b=new Date();b.setTime(b.getTime()-(3600*1000));var a="; expires="+b.toGMTString();document.cookie=c+"="+a+cookie.path+cookie.domain+cookie.secure}catch(d){return false}return true},get:function(a){a=this.appendString+a;var b=document.cookie.match(a+"=(.*?)(;|$)");if(b){return(unescape(b[1])).evalJSON()}else{return null}},empty:function(){keys=this.getKeys();size=keys.size();for(i=0;i<size;i++){this.remove(keys[i])}},getPack:function(){pack={};keys=this.getKeys();size=keys.size();for(i=0;i<size;i++){pack[keys[i]]=this.get(keys[i])}return pack},getKeys:function(){keys=$A();keyRe=/[^=; ]+(?=\=)/g;str=document.cookie;CJRe=new RegExp("^"+this.appendString);while((match=keyRe.exec(str))!=undefined){if(CJRe.test(match[0].strip())){keys.push(match[0].strip().gsub("^"+this.appendString,""))}}return keys}};