function toUrl(a){return"/"+window._current_language_code+a}function toParams(a){if(typeof(a)=="string"){return a+"&authenticity_token="+window._authenticity_token}else{if(typeof a=="object"){a.authenticity_token=window._authenticity_token;return $H(a).toQueryString()}else{return"authenticity_token="+window._authenticity_token}}}function removeSelectOption(a,c){var b=$A(a.options).find(function(d){return d.value==c});b=null}function addSelectOption(a,d,c,b){a.options[a.options.length]=new Option(d,c,false,b)}function selectSelectOption(a,c){var b=$A(a.options).find(function(d){return d.value==c});b.selected=true}function attachFleurons(f){var e=51;var d=12;var g=10;var i=5;var f=$(f);var b=new Element("span",{"class":"fleuron_left_transparent"});var a=new Element("span",{"class":"fleuron_right_transparent"});var h=f.down("span");var c=h.positionedOffset();h.insert({before:b,after:a});b.setStyle({left:(c.left-e-g)+"px",top:(c.top+i)+"px"});a.setStyle({left:(c.left+h.getWidth()+g)+"px",top:(c.top+i)+"px"})}function loadScript(e,b){var d=document.getElementsByTagName("head")[0];if(d){var c=document.createElement("script");c.setAttribute("src",e);c.setAttribute("type","text/javascript");var a=function(){if(this.readyState=="complete"||this.readyState=="loaded"){b()}};c.onreadystatechange=a;c.onload=b;d.appendChild(c)}}function resizeBannerContainer(){$("banner_container").addClassName("squished")}function changeUrl(a){window.location.href=a}Event.observe(document,"dom:loaded",function(){if($("ask_us")){var a=$("ask_us").down("textarea");defaultAskUsValue=a.value;a.observe("click",function(){if(this.value==defaultAskUsValue){this.value=""}})}if($("language_selection")){$("language_selection").select("a").each(function(b){b.observe("click",function(c){Event.stop(c);var d=typeof dhtmlHistory!=="undefined"?"#"+dhtmlHistory.getCurrentLocation():"";window.location.href=this.href+d})})}});Protoload={timeUntilShow:250,opacity:0.8,startWaiting:function(a,b,d){if(typeof a=="string"){a=document.getElementById(a)}if(b==undefined){b="waiting"}if(d==undefined){d=Protoload.timeUntilShow}a._waiting=true;if(!a._loading){var c=document.createElement("div");(a.offsetParent||document.body).appendChild(a._loading=c);c.style.position="absolute";$(c).setOpacity(Protoload.opacity)}a._loading.className=b;window.setTimeout((function(){if(this._waiting){l=this._loading;$(l).clonePosition(this);l.style.display="inline"}}).bind(a),d)},stopWaiting:function(a){if(a._waiting){a._waiting=false;a._loading.parentNode.removeChild(a._loading);a._loading=null}}};if(Prototype){Element.addMethods(Protoload);Object.extend(Element,Protoload)};