Array.implement({count:function(){return this.length}});Number.implement({zeroise:function(a){return String(this).zeroise(a)}});Array.implement({count:function(){return this.length}});String.implement({strip_tags:function(){return(this.stripScripts()).replace(/<\/?[^>]+>/gmi,"")},reverse:function(){return((this.split("")).reverse()).join("")},lcfirst:function(){return this.replace(/\b([A-Z])/,function(a){return a.toLowerCase()})},ucfirst:function(){return this.replace(/\b([a-z])/,function(a){return a.toUpperCase()})},ltrim:function(){return this.replace(/^\s*/,"")},rtrim:function(){return this.replace(/\s*$/,"")},nl2br:function(){return(this.replace(/\r/g,"")).replace(/\n/g,"<br />")},number_format:function(a,b,c){var d=String((this.toFloat()).toFixed(a||2));d=(d.reverse()).replace(/((?:\d(?!\d+?\.)(?=\d)){3})/g,"$1"+(c||","));return(d.replace(/\./,(b||"."))).reverse()},repeat:function(c){var a=[];for(var b=0;b<c;b++){a.push(this)}return a.join("")},zeroise:function(a){return"0".repeat(a-this.length)+this}});Element.implement({getSelectedValue:function(){if(this.tagName.toLowerCase()!="select"){return null}return $splat(new Elements($A(this.options).filter(function(a){return a.selected})).map(function(a){return a.value.clean()}))},getSelectedIndex:function(){if(this.tagName.toLowerCase()!="select"){return null}return $splat(new Elements($A(this.options).filter(function(a){return a.selected})).map(function(a){return a.index}))},getSelectedFull:function(){if(this.tagName.toLowerCase()!="select"){return null}return $splat(new Elements($A(this.options).filter(function(a){return a.selected})).map(function(a){return{index:a.index,value:a.value.clean()}}))},setSelected:function(a,b){if(this.tagName.toLowerCase()!="select"){return null}if(!b){this.clearSelect()}var a=$splat(a);Array.each(this.options,function(d,c){if(a.contains(d.getProperty("value"))||a.contains(c)){d.set("selected","selected")}});return},clearSelect:function(b){if(this.tagName.toLowerCase()!="select"){return null}var a=this.getSelectedFull();Array.each(this.options,function(c){c.set("selected",(c.defaultSelected&&b)?"selected":"")});return a}});(function(){var b;var a=function(f){var d=$(f.target);var c=d.getParents();b.each(function(g){var e=g.element;if(e!=d&&!c.contains(e)){g.fn.call(e,f)}})};Element.Events.outerClick={onAdd:function(c){if(!b){document.addEvent("click",a);b=[]}b.push({element:this,fn:c})},onRemove:function(c){b=b.filter(function(d){return d.element!=this||d.fn!=c},this);if(!b.length){document.removeEvent("click",a);b=null}}}})();Element.Events.pressEnter={base:"keydown",condition:function(a){return(a.key=="enter")}};Browser.combine({getHost:function(a){a=$pick(a,window.location.href);var b=a;if(a.test("http://")){a=a.substring(a.indexOf("http://")+7,a.length);if(a.test(":")){a=a.substring(0,a.indexOf(":"))}if(a.test("/")){return a.substring(0,a.indexOf("/"))}return a}return false},getQueryStringValue:function(b,a){try{return Browser.getQueryStringValues(a)[b]}catch(c){return null}},getQueryStringValues:function(b){var a=$pick(b,window.location.search,"").split("?")[1];if(!$chk(a)){return{}}if(a.test("#")){a=a.substring(0,a.indexOf("#"))}try{if(a){return a.parseQuery()}}catch(c){return null}return{}},getPort:function(c){c=$pick(c,window.location.href);var d=new RegExp(":([0-9]{4})");var a=d.exec(c);if(a==null){return false}else{var b=false;a.each(function(e){if($chk(parseInt(e))){b=e}})}return b}});window.addEvent("domready",function(){var b=0;function a(){function c(){b++;if(b<20){a.delay(50)}}try{if(!Browser.set("qs",Browser.getQueryStringValues())){c()}}catch(d){c()}}a()});Browser.combine({fixPNG:function(a){if($type(a)=="array"){return $$(a).each(Browser.fixPNG)}if($(a)){a=$(a).get("tag")}window.addEvent("domready",function(){if(document.all&&/MSIE (5\.5|6)/.test(navigator.userAgent)&&document.styleSheets&&document.styleSheets[0]&&document.styleSheets[0].addRule){if(!$("iepngfix_tilebg_js")){new Element("script",{src:Browser.iepngFixJs,id:"iepngfix_tilebg_js",type:"text/javascript"}).inject(document.head)}if(!document.styleSheets[0]){new Element("style").inject(document.head)}document.styleSheets[0].addRule(a||".fixPNG","behavior: url("+Browser.iepngfixUrl+")")}})},iepngFixJs:"/resources/base/scripts/plugin/fixpng/iepngfix_tilebg.js",iepngfixUrl:"/resources/base/scripts/plugin/fixpng/iepngfix.htc"});Browser.fixPNG();var IframeShim=new Class({Implements:[Options,Events],options:{name:"",className:"iframeShim",display:false,zindex:null,margin:0,offset:{x:0,y:0},browsers:(Browser.Engine.trident4||(Browser.Engine.gecko&&!Browser.Engine.gecko19&&Browser.Platform.mac))},initialize:function(b,a){this.setOptions(a);if(this.options.offset&&this.options.offset.top){this.options.offset.y=this.options.offset.top}if(this.options.offset&&this.options.offset.left){this.options.offset.x=this.options.offset.left}this.element=$(b);this.makeShim();return},makeShim:function(){this.shim=new Element("iframe");this.id=this.options.name||new Date().getTime()+"_shim";if(this.element.getStyle("z-Index").toInt()<1||isNaN(this.element.getStyle("z-Index").toInt())){this.element.setStyle("z-Index",5)}var b=this.element.getStyle("z-Index")-1;if($chk(this.options.zindex)&&this.element.getStyle("z-Index").toInt()>this.options.zindex){b=this.options.zindex}this.shim.setStyles({position:"absolute",zIndex:b,border:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"}).setProperties({src:"javascript:void(0);",frameborder:"0",scrolling:"no",id:this.id}).addClass(this.options.className);this.element.store("shim",this);var a=function(){this.shim.inject(this.element,"after");if(this.options.display){this.show()}else{this.hide()}this.fireEvent("onInject")};if(this.options.browsers){if(Browser.Engine.trident&&!IframeShim.ready){window.addEvent("load",a.bind(this))}else{a.run(null,this)}}},position:function(c){if(!this.options.browsers||!IframeShim.ready){return this}var b=this.element.getStyles("display","visibility","position");this.element.setStyles({display:"block",position:"absolute",visibility:"hidden"});var a=this.element.getSize();this.element.setStyles(b);if($type(this.options.margin)){a.x=a.x-(this.options.margin*2);a.y=a.y-(this.options.margin*2);this.options.offset.x+=this.options.margin;this.options.offset.y+=this.options.margin}this.shim.setStyles({width:a.x,height:a.y}).setPosition({relativeTo:this.element,offset:this.options.offset});return this},hide:function(){if(this.options.browsers){this.shim.setStyle("display","none")}return this},show:function(){if(!this.options.browsers){return this}this.shim.setStyle("display","block");return this.position()},dispose:function(){if(this.options.browsers){this.shim.dispose()}return this}});window.addEvent("load",function(){IframeShim.ready=true});Browser.set("Popup",new Class({Implements:[Options,Events],options:{width:500,height:300,x:50,y:50,toolbar:0,location:0,directories:0,status:0,scrollbars:"auto",resizable:1,name:"popup"},initialize:function(b,a){this.url=b||false;this.setOptions(a);if(this.url){this.openWin()}},openWin:function(b){b=b||this.url;var a="toolbar="+this.options.toolbar+",location="+this.options.location+",directories="+this.options.directories+",status="+this.options.status+",scrollbars="+this.options.scrollbars+",resizable="+this.options.resizable+",width="+this.options.width+",height="+this.options.height+",top="+this.options.y+",left="+this.options.x;this.window=window.open(b,this.options.name,a);if(!this.window){this.window=window.open("",this.options.name,a);this.window.location.href=b}this.focus.delay(100,this);return this},focus:function(){if(this.window){this.window.focus()}else{if(this.focusTries<10){this.focus.delay(100,this)}else{this.blocked=true;this.fireEvent("onBlock")}}return this},focusTries:0,blocked:null,close:function(){this.window.close();return this}}));Hash.implement({getFromPath:function(a){var b=this.getClean();a.replace(/\[([^\]]+)\]|\.([^.[]+)|[^[.]+/g,function(c){if(!b){return}var d=arguments[2]||arguments[1]||arguments[0];b=(d in b)?b[d]:null;return c});return b},cleanValues:function(a){a=a||$defined;this.each(function(c,b){if(!a(c)){this.erase(b)}},this);return this}});String.implement({stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},parseQuery:function(c,a){c=$pick(c,true);a=$pick(a,true);var d=this.split(/[&;]/);var b={};if(d.length){d.each(function(f){var e=f.split("=");if(e.length&&e.length==2){b[(c)?encodeURIComponent(e[0]):e[0]]=(a)?encodeURIComponent(e[1]):e[1]}})}return b},tidy:function(){var a=this.toString();$each({"[\xa0\u2002\u2003\u2009]":" ","\xb7":"*","[\u2018\u2019]":"'","[\u201c\u201d]":'"',"\u2026":"...","\u2013":"-","\u2014":"--","\uFFFD":"&raquo;"},function(c,b){a=a.replace(new RegExp(b,"g"),c)});return a},cleanQueryString:function(a){return this.split("&").filter(a||function(b){return $chk(b.split("=")[1])}).join("&")}});Element.implement({expose:function(){if(this.getStyle("display")!="none"){return $empty}var b={};var a={visibility:"hidden",display:"block",position:"absolute"};$each(a,function(d,c){b[c]=this.style[c]||""},this);this.setStyles(a);return(function(){this.setStyles(b)}).bind(this)},getDimensions:function(a){a=$merge({computeSize:false},a);var f={};function d(g,e){return(e.computeSize)?g.getComputedSize(e):g.getSize()}if(this.getStyle("display")=="none"){var b=this.expose();f=d(this,a);b()}else{try{f=d(this,a)}catch(c){}}return $chk(f.x)?$extend(f,{width:f.x,height:f.y}):$extend(f,{x:f.width,y:f.height})},getComputedSize:function(a){a=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},a);var c={width:0,height:0};switch(a.mode){case"vertical":delete c.width;delete a.plains.width;break;case"horizontal":delete c.height;delete a.plains.height;break}var b=[];$each(a.plains,function(g,f){g.each(function(h){a.styles.each(function(i){b.push((i=="border")?i+"-"+h+"-width":i+"-"+h)})})});var e=this.getStyles.apply(this,b);var d=[];$each(a.plains,function(g,f){c["total"+f.capitalize()]=0;c["computed"+f.capitalize()]=0;g.each(function(h){c["computed"+h.capitalize()]=0;b.each(function(k,j){if(k.test(h)){e[k]=e[k].toInt();if(isNaN(e[k])){e[k]=0}c["total"+f.capitalize()]=c["total"+f.capitalize()]+e[k];c["computed"+h.capitalize()]=c["computed"+h.capitalize()]+e[k]}if(k.test(h)&&f!=k&&(k.test("border")||k.test("padding"))&&!d.contains(k)){d.push(k);c["computed"+f.capitalize()]=c["computed"+f.capitalize()]-e[k]}})})});if($chk(c.width)){c.width=c.width+this.offsetWidth+c.computedWidth;c.totalWidth=c.width+c.totalWidth;delete c.computedWidth}if($chk(c.height)){c.height=c.height+this.offsetHeight+c.computedHeight;c.totalHeight=c.height+c.totalHeight;delete c.computedHeight}return $extend(e,c)}});Element.implement({setPosition:function(n){$each(n||{},function(p,o){if(!$defined(p)){delete n[o]}});n=$merge({relativeTo:document.body,position:{x:"center",y:"center"},edge:false,offset:{x:0,y:0},returnPos:false,relFixedPosition:false,ignoreMargins:false},n);var a={x:0,y:0};var f=false;var g=this.expose();var b=this.getOffsetParent();g();if(b&&b!=this.getDocument().body){var g=b.expose();a=b.getPosition();g();f=true;n.offset.x=n.offset.x-a.x;n.offset.y=n.offset.y-a.y}function m(o){if($type(o)!="string"){return o}o=o.toLowerCase();var p={};if(o.test("left")){p.x="left"}else{if(o.test("right")){p.x="right"}else{p.x="center"}}if(o.test("upper")||o.test("top")){p.y="top"}else{if(o.test("bottom")){p.y="bottom"}else{p.y="center"}}return p}n.edge=m(n.edge);n.position=m(n.position);if(!n.edge){if(n.position.x=="center"&&n.position.y=="center"){n.edge={x:"center",y:"center"}}else{n.edge={x:"left",y:"top"}}}this.setStyle("position","absolute");var l=$(n.relativeTo)||document.body;var k=(l==document.body)?window.getScroll().y:l.getPosition().y;var e=(l==document.body)?window.getScroll().x:l.getPosition().x;if(k<0){k=0}if(e<0){e=0}var h=this.getDimensions({computeSize:true,styles:["padding","border","margin"]});if(n.ignoreMargins){n.offset.x=n.offset.x-a.x-b.getStyle("border-left-width").toInt()||0;n.offset.y=n.offset.y-a.y-b.getStyle("border-top-width").toInt()||0}var j={};var c=n.offset.y.toInt();var d=n.offset.x.toInt();switch(n.position.x){case"left":j.x=e+d;break;case"right":j.x=e+d+l.offsetWidth;break;default:j.x=e+(((l==document.body)?window.getSize().x:l.offsetWidth)/2)+d;break}switch(n.position.y){case"top":j.y=k+c;break;case"bottom":j.y=k+c+l.offsetHeight;break;default:j.y=k+(((l==document.body)?window.getSize().y:l.offsetHeight)/2)+c;break}if(n.edge){var i={};switch(n.edge.x){case"left":i.x=0;break;case"right":i.x=-h.x-h.computedRight-h.computedLeft;break;default:i.x=-(h.x/2);break}switch(n.edge.y){case"top":i.y=0;break;case"bottom":i.y=-h.y-h.computedTop-h.computedBottom;break;default:i.y=-(h.y/2);break}j.x=j.x+i.x;j.y=j.y+i.y}j={left:((j.x>=0||f)?j.x:0).toInt(),top:((j.y>=0||f)?j.y:0).toInt()};if(l.getStyle("position")=="fixed"||n.relFixedPosition){j.top=j.top.toInt()+window.getScroll().y;j.left=j.left.toInt()+window.getScroll().x}if(n.returnPos){return j}else{this.setStyles(j)}return this}});Element.implement({isVisible:function(){return this.getStyle("display")!="none"},toggle:function(){return this[this.isVisible()?"hide":"show"]()},hide:function(){var b;try{b=this.getStyle("display")}catch(a){}this.store("originalDisplay",b||"block");this.setStyle("display","none");return this},show:function(a){original=this.retrieve("originalDisplay")?this.retrieve("originalDisplay"):this.get("originalDisplay");this.setStyle("display",(a||original||"block"));return this},swapClass:function(a,b){return this.removeClass(a).addClass(b)},fxOpacityOk:function(){return !Browser.Engine.trident4}});Fx.Reveal=new Class({Extends:Fx.Morph,options:{styles:["padding","border","margin"],transitionOpacity:true,mode:"vertical",heightOverride:null,widthOverride:null},dissolve:function(){try{if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true;this.showing=false;this.hidden=true;var c=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});var f=this.element.style.height===""||this.element.style.height=="auto";this.element.setStyle("display","block");if(this.element.fxOpacityOk()&&this.options.transitionOpacity){c.opacity=1}var a={};$each(c,function(g,e){a[e]=[g,0]},this);var d=this.element.getStyle("overflow");this.element.setStyle("overflow","hidden");if(!this.$chain){this.$chain=[]}this.$chain.unshift(function(){if(this.hidden){this.hiding=false;$each(c,function(g,e){c[e]=g},this);this.element.setStyles($merge({display:"none",overflow:d},c));if(f){this.element.setStyle("height","auto")}}this.callChain()}.bind(this));this.start(a)}else{this.callChain.delay(10,this);this.fireEvent("onComplete",this.element)}}}catch(b){this.hiding=false;this.element.hide();this.callChain.delay(10,this);this.fireEvent("onComplete",this.element)}return this},reveal:function(){try{if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.showing=true;this.hiding=false;this.hidden=false;var b=this.element.getStyles("visibility","display","position");this.element.setStyles({visibility:"hidden",display:"block",position:"absolute"});var g=this.element.style.height===""||this.element.style.height=="auto";if(this.element.fxOpacityOk()&&this.options.transitionOpacity){this.element.setStyle("opacity",0)}var d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});this.element.setStyles(b);$each(d,function(h,e){d[e]=h},this);if($chk(this.options.heightOverride)){d.height=this.options.heightOverride.toInt()}if($chk(this.options.widthOverride)){d.width=this.options.widthOverride.toInt()}if(this.element.fxOpacityOk()&&this.options.transitionOpacity){d.opacity=1}var a={height:0,display:"block"};$each(d,function(h,e){a[e]=0},this);var f=this.element.getStyle("overflow");this.element.setStyles($merge(a,{overflow:"hidden"}));this.start(d);if(!this.$chain){this.$chain=[]}this.$chain.unshift(function(){if(!this.options.heightOverride&&g){if(["vertical","both"].contains(this.options.mode)){this.element.setStyle("height","auto")}if(["width","both"].contains(this.options.mode)){this.element.setStyle("width","auto")}}if(!this.hidden){this.showing=false}this.element.setStyle("overflow",f);this.callChain()}.bind(this))}else{this.callChain();this.fireEvent("onComplete",this.element)}}}catch(c){this.element.setStyles({display:"block",visiblity:"visible",opacity:1});this.showing=false;this.callChain.delay(10,this);this.fireEvent("onComplete",this.element)}return this},toggle:function(){try{if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.reveal()}else{this.dissolve()}}catch(a){this.show()}return this}});Element.Properties.reveal={set:function(a){var b=this.retrieve("reveal");if(b){b.cancel()}return this.eliminate("reveal").store("reveal:options",$extend({link:"cancel"},a))},get:function(a){if(a||!this.retrieve("reveal")){if(a||!this.retrieve("reveal:options")){this.set("reveal",a)}this.store("reveal",new Fx.Reveal(this,this.retrieve("reveal:options")))}return this.retrieve("reveal")}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(a){this.get("reveal",a).reveal();return this},dissolve:function(a){this.get("reveal",a).dissolve();return this}});var Waiter=new Class({Implements:[Options,Events,Chain],options:{baseHref:"http://www.cnet.com/html/rb/assets/global/waiter/",containerProps:{styles:{position:"absolute","text-align":"center"},"class":"waiterContainer"},containerPosition:{},msg:false,msgProps:{styles:{"text-align":"center",fontWeight:"bold"},"class":"waiterMsg"},img:{src:"waiter.gif",styles:{width:24,height:24},"class":"waiterImg"},layer:{styles:{width:0,height:0,position:"absolute",zIndex:999,display:"none",opacity:0.9,background:"#fff"},"class":"waitingDiv"},useIframeShim:true,fxOptions:{}},initialize:function(c,a){this.target=$(c)||$(document.body);this.setOptions(a);this.waiterContainer=new Element("div",this.options.containerProps).inject(document.body);if(this.options.msg){this.msgContainer=new Element("div",this.options.msgProps);this.waiterContainer.adopt(this.msgContainer);if(!$(this.options.msg)){this.msg=new Element("p").appendText(this.options.msg)}else{this.msg=$(this.options.msg)}this.msgContainer.adopt(this.msg)}if(this.options.img){this.waiterImg=$(this.options.img.id)||new Element("img").injectInside(this.waiterContainer)}this.waiterOverlay=$(this.options.layer.id)||new Element("div").injectInside(document.body).adopt(this.waiterContainer);try{if(this.options.useIframeShim){this.shim=new IframeShim(this.waiterOverlay,this.options.iframeShimOptions)}}catch(b){this.options.useIframeShim=false}this.waiterFx=this.waiterFx||new Fx.Elements($$(this.waiterContainer,this.waiterOverlay),this.options.fxOptions)},toggle:function(b,a){b=$(b)||$(this.active)||$(this.target);if(!$(b)){return this}if(this.active&&b!=this.active){return this.stop(this.start.bind(this,b))}if((!this.active||a)&&a!==false){this.start(b)}else{if(this.active&&!a){this.stop()}}return this},reset:function(){this.waiterFx.cancel().set({0:{opacity:[0]},1:{opacity:[0]}})},start:function(a){this.reset();a=$(a)||$(this.target);if(this.options.img){this.waiterImg.set($merge(this.options.img,{src:this.options.baseHref+this.options.img.src}))}this.waiterOverlay.set(this.options.layer);var b=function(){var c=a.getComputedSize();this.active=a;this.waiterOverlay.setStyles({width:this.options.layer.width||c.totalWidth,height:this.options.layer.height||c.totalHeight,display:"block"}).setPosition({relativeTo:a,position:"upperLeft"});this.waiterContainer.setPosition({relativeTo:this.waiterOverlay});if(this.options.useIframeShim){this.shim.show()}this.waiterFx.start({0:{opacity:[1]},1:{opacity:[this.options.layer.styles.opacity]}}).chain(function(){if(this.active==a){this.fireEvent("onShow",a)}this.callChain()}.bind(this))}.bind(this);if(this.active&&this.active!=a){this.stop(b)}else{b()}return this},stop:function(a){if(!this.active){if($type(a)=="function"){a.attempt()}return this}this.waiterFx.cancel();this.waiterFx.clearChain();this.waiterFx.start({0:{opacity:[0]},1:{opacity:[0]}}).chain(function(){this.active=null;this.waiterOverlay.hide();if(this.options.useIframeShim){this.shim.hide()}this.fireEvent("onHide",this.active);this.callChain();this.clearChain();if($type(a)=="function"){a.attempt()}}.bind(this));return this}});if(typeof Request!="undefined"&&Request.HTML){Request.HTML=new Class({Extends:Request.HTML,options:{useWaiter:false,waiterOptions:{},waiterTarget:false},initialize:function(a){this._send=this.send;this.send=function(b){if(this.waiter){this.waiter.start().chain(this._send.bind(this,b))}else{this._send(b)}return this};this.parent(a);if(this.options.useWaiter&&($(this.options.update)||$(this.options.waiterTarget))){this.waiter=new Waiter(this.options.waiterTarget||this.options.update,this.options.waiterOptions);["onComplete","onException","onCancel"].each(function(b){this.addEvent(b,this.waiter.stop.bind(this.waiter))},this)}}})}var Confirmer=new Class({Implements:[Options,Events],options:{reposition:true,positionOptions:{relativeTo:false,position:"upperRight",offset:{x:-225,y:0},zIndex:9999},msg:"your changes have been saved",msgContainerSelector:".body",delay:250,pause:1000,effectOptions:{duration:500},prompterStyle:{padding:"2px 6px",border:"1px solid #9f0000",backgroundColor:"#f9d0d0",fontWeight:"bold",color:"#000",width:210}},initialize:function(a){this.setOptions(a);this.options.positionOptions.relativeTo=$(this.options.positionOptions.relativeTo)||document.body;this.prompter=($(this.options.msg))?$(this.options.msg):this.makePrompter(this.options.msg);if(this.options.reposition){this.prompter.setStyles({position:"absolute",display:"none",zIndex:this.options.positionOptions.zIndex});if(this.prompter.fxOpacityOk()){this.prompter.setStyle("opacity",0)}}else{if(this.prompter.fxOpacityOk()){this.prompter.setStyle("opacity",0)}else{this.prompter.setStyle("visibility","hidden")}}if(!this.prompter.getParent()){window.addEvent("domready",function(){this.prompter.inject(document.body)}.bind(this))}try{this.msgHolder=this.prompter.getElement(this.options.msgContainerSelector);if(!this.msgHolder){this.msgHolder=this.prompter}}catch(b){}},makePrompter:function(a){return new Element("div").setStyles(this.options.prompterStyle).appendText(a)},prompt:function(a){if(!this.paused){this.stop()}var b=(a)?a.msg:false;a=$merge(this.options,{saveAsDefault:false},a||{});if($(a.msg)&&b){this.msgHolder.empty().adopt(a.msg)}else{if(!$(a.msg)&&a.msg){this.msgHolder.empty().appendText(a.msg)}}if(!this.paused){if(a.reposition){this.position(a.positionOptions)}(function(){this.timer=this.fade(a.pause)}).delay(a.delay,this)}if(a.saveAsDefault){this.setOptions(a)}return this},fade:function(a){this.paused=true;a=$pick(a,this.options.pause);if(!this.fx&&this.prompter.fxOpacityOk()){this.fx=new Fx.Tween(this.prompter,$merge({property:"opacity"},this.options.effectOptions))}if(this.options.reposition){this.prompter.setStyle("display","block")}if(this.prompter.fxOpacityOk()){this.prompter.setStyle("visibility","visible");this.fx.start(0,1).chain(function(){this.timer=(function(){this.fx.start(0).chain(function(){if(this.options.reposition){this.prompter.hide()}this.paused=false}.bind(this))}).delay(a,this)}.bind(this))}else{this.prompter.setStyle("visibility","visible");this.timer=(function(){this.prompter.setStyle("visibility","hidden");this.fireEvent("onComplete");this.paused=false}).delay(a+this.options.effectOptions.duration,this)}return this},stop:function(){this.paused=false;$clear(this.timer);if(this.fx){this.fx.set(0)}if(this.options.reposition){this.prompter.hide()}return this},position:function(a){this.prompter.setPosition($merge(this.options.positionOptions,a));return this}});