var Clientcide={version:"%build%",assetLocation:"http://github.com/anutron/clientcide/raw/master/Assets",setAssetLocation:function(a){Clientcide.assetLocation=a;if(Clientcide.preloaded){Clientcide.preLoadCss()}},preLoadCss:function(){if(window.StickyWin&&StickyWin.ui){StickyWin.ui()}if(window.StickyWin&&StickyWin.pointy){StickyWin.pointy()}Clientcide.preloaded=true;return true},preloaded:false};(function(){if(!window.addEvent){return}var a=function(){if(window.dbug){dbug.log("preloading clientcide css")}if(!Clientcide.preloaded){Clientcide.preLoadCss()}};window.addEvent("domready",a);window.addEvent("load",a)})();setCNETAssetBaseHref=Clientcide.setAssetLocation;var dbug={logged:[],timers:{},firebug:false,enabled:false,log:function(){dbug.logged.push(arguments)},nolog:function(a){dbug.logged.push(arguments)},time:function(a){dbug.timers[a]=new Date().getTime()},timeEnd:function(b){if(dbug.timers[b]){var a=new Date().getTime()-dbug.timers[b];dbug.timers[b]=false;dbug.log("%s: %s",b,a)}else{dbug.log("no such timer: %s",b)}},enable:function(b){var a=window.firebug?firebug.d.console.cmd:window.console;if((!!window.console&&!!window.console.warn)||window.firebug){try{dbug.enabled=true;dbug.log=function(){try{(a.debug||a.log).apply(a,arguments)}catch(f){console.log(Array.slice(arguments))}};dbug.time=function(){a.time.apply(a,arguments)};dbug.timeEnd=function(){a.timeEnd.apply(a,arguments)};if(!b){dbug.log("enabling dbug")}for(var c=0;c<dbug.logged.length;c++){dbug.log.apply(a,dbug.logged[c])}dbug.logged=[]}catch(d){dbug.enable.delay(400)}}},disable:function(){if(dbug.firebug){dbug.enabled=false}dbug.log=dbug.nolog;dbug.time=function(){};dbug.timeEnd=function(){}},cookie:function(d){var c=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var b=c?unescape(c[1]):false;if((!$defined(d)&&b!="true")||($defined(d)&&d)){dbug.enable();dbug.log("setting debugging cookie");var a=new Date();a.setTime(a.getTime()+(24*60*60*1000));document.cookie="jsdebug=true;expires="+a.toGMTString()+";path=/;"}else{dbug.disableCookie()}},disableCookie:function(){dbug.log("disabling debugging cookie");document.cookie="jsdebug=false;path=/;"}};(function(){var d=!!window.console||!!window.firebug;var b=window.firebug?window.firebug.d.console.cmd:window.console;var c=["debug","info","warn","error","assert","dir","dirxml"];var a=["trace","group","groupEnd","profile","profileEnd","count"];function e(h,f){for(var g=0;g<h.length;g++){dbug[h[g]]=(d&&b[h[g]])?b[h[g]]:f}}e(c,dbug.log);e(a,function(){})})();if((!!window.console&&!!window.console.warn)||window.firebug){dbug.firebug=true;var value=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var debugCookie=value?unescape(value[1]):false;if(window.location.href.indexOf("jsdebug=true")>0||debugCookie=="true"){dbug.enable()}if(debugCookie=="true"){dbug.log("debugging cookie enabled")}if(window.location.href.indexOf("jsdebugCookie=true")>0){dbug.cookie();if(!dbug.enabled){dbug.enable()}}if(window.location.href.indexOf("jsdebugCookie=false")>0){dbug.disableCookie()}}Class.ToElement=new Class({toElement:function(){return this.element}});var ToElement=Class.ToElement;$extend(Browser,{fixPNG:function(d){try{if(Browser.Engine.trident4){d=document.id(d);if(!d){return d}if(d.get("tag")=="img"&&d.get("src").test(".png")){var h=d.isDisplayed();try{dim=d.getSize()}catch(i){}if(!h){var g={};["visibility","display","position"].each(function(e){g[e]=this.style[e]||""},this);this.setStyles({visibility:"hidden",display:"block",position:"absolute"});dim=d.getSize();this.setStyles(g);d.hide()}var c=new Element("span",{id:(d.id)?d.id:"","class":(d.className)?d.className:"",title:(d.title)?d.title:(d.alt)?d.alt:"",styles:{display:h?"inline-block":"none",width:dim.x,height:dim.y,filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader (src='"+d.src+"', sizingMethod='scale');"},src:d.src});if(d.style.cssText){try{var f={};var b=d.style.cssText.split(";");b.each(function(e){var j=e.split(":");f[j[0]]=j[1]});c.setStyle(f)}catch(i){dbug.log("fixPNG1: ",i)}}if(c.cloneEvents){c.cloneEvents(d)}c.replaces(d)}else{if(d.get("tag")!="img"){var a=d.getStyle("background-image");if(a.test(/\((.+)\)/)){d.setStyles({background:"",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src="+a.match(/\((.+)\)/)[1]+")"})}}}}}catch(i){dbug.log("fixPNG2: ",i)}},pngTest:/\.png$/,scanForPngs:function(c,b){b=b||"fixPNG";if(document.getElements){c=document.id(c||document.body);c.getElements("img[src$=.png]").addClass(b)}else{var a=$$("img").each(function(d){if(Browser.pngTest(d.src)){d.addClass(b)}})}}});if(Browser.Engine.trident4){window.addEvent("domready",function(){$$("img.fixPNG").each(Browser.fixPNG)})}Browser.Popup=new Class({Implements:[Options,Events],options:{width:500,height:300,x:50,y:50,toolbar:0,location:0,directories:0,status:0,scrollbars:"yes",resizable:1,name:"popup"},initialize:function(b,a){this.url=b||false;this.setOptions(a);if(this.options.x=="center"){this.options.x=Math.floor((screen.availWidth-this.options.width)/2)}if(this.options.y=="center"){this.options.y=Math.floor((screen.availHeight-this.options.height)/2)}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}});Fx.Marquee=new Class({Extends:Fx.Morph,options:{mode:"horizontal",message:"",revert:true,delay:5000,cssClass:"msg",showEffect:{opacity:1},hideEffect:{opacity:0},revertEffect:{opacity:[0,1]},currentMessage:null},initialize:function(a,b){a=document.id(a);var c=this.options.currentMessage||(a.getChildren().length==1)?a.getFirst():"";var d=new Element("div",{styles:{position:"relative"},"class":"fxMarqueeWrapper"}).inject(a);this.parent(d,b);this.current=this.wrapMessage(c)},wrapMessage:function(a){if(document.id(a)&&document.id(a).hasClass("fxMarquee")){var b=document.id(a)}else{var b=new Element("span",{"class":"fxMarquee",styles:{position:"relative"}});if(document.id(a)){b.grab(document.id(a))}else{if($type(a)=="string"){b.set("html",a)}}}return b.inject(this.element)},announce:function(a){this.setOptions(a).showMessage();return this},showMessage:function(a){(function(){var b=this.$chain?$A(this.$chain):[];this.clearChain();this.element=document.id(this.element);this.current=document.id(this.current);this.message=document.id(this.message);this.start(this.options.hideEffect).chain(function(){if(a){this.message.hide();if(this.current){this.current.show()}}else{if(this.message){this.message.dispose()}this.message=this.wrapMessage(this.options.message);if(this.current){this.current.hide()}}this.start((a)?this.options.revertEffect:this.options.showEffect).chain(function(){if(this.$chain){this.$chain.combine(b)}else{this.$chain=b}this.fireEvent((a)?"onRevert":"onMessage");if(!a&&this.options.revert){this.showMessage(true)}else{this.callChain.delay(this.options.delay,this)}}.bind(this))}.bind(this))}).delay((a)?this.options.delay:10,this);return this}});var IconMenu=new Class({Implements:[Options,Events],options:{container:document,images:".iconImgs",captions:".iconCaptions",removeLinks:false,clearLinks:false,useAxis:"x",onFocusDelay:0,initialFocusDelay:250,onBlurDelay:0,length:"auto",iconPadding:1,scrollFxOptions:{duration:1800,transition:"cubic:in:out"},backScrollButtons:"#scrollLeft",forwardScrollButtons:"#scrollRight",onSelect:function(b,a){a.morph({"border-top-color":"#00A0C6","border-left-color":"#00A0C6","border-right-color":"#00A0C6","border-bottom-color":"#00A0C6"})},onDeSelect:function(b,a){a.morph({"border-top-color":"#555","border-left-color":"#555","border-right-color":"#555","border-bottom-color":"#555"})}},imgs:[],selected:[],initialize:function(b){this.setOptions(b);this.container=document.id(this.options.container);var a=($type(this.options.captions)=="string")?this.container.getElements(this.options.captions):this.options.captions;var c=($type(this.options.images)=="string")?this.container.getElements(this.options.images):this.options.images;c.each(function(d,e){this.addItem(d,a[e],null)},this);this.fireEvent("onItemsAdded",this.imgs,50);this.side=(this.options.useAxis=="x")?"left":"top";this.container.setStyle(this.side,this.container.getStyle(this.side).toInt()||0);this.onFocusDelay=this.options.initialFocusDelay;this.setupEvents()},toElement:function(){return this.container},bound:{mouseover:{},mouseout:{}},scrollTo:function(c,d){d=$pick(d,true);var a=this.calculateRange();if(c==a.start){return this}var b=this.calculateRange(c);if(!b.elements.length){return this}if(this.container.getStyle("position")=="static"){this.container.setStyle("position","relative")}if(!this.scrollerFx){this.scrollerFx=new Fx.Tween(this.container,$merge(this.options.scrollFxOptions,{property:this.side,wait:false}))}if(d){this.scrollerFx.start(-b.elements[0].offset).chain(function(){this.fireEvent("onScroll",[c,b])}.bind(this))}else{this.scrollerFx.set(-b.elements[0].offset);this.fireEvent("onScroll",[c,b])}this.currentOffset=c;return this},pageForward:function(b){var a=this.calculateRange();return this.scrollTo(($type(b)=="number")?a.start+b:a.end)},pageBack:function(a){return this.scrollTo(($type(a)=="number")?this.currentOffset-a:this.calculateRange(this.currentOffset,true).start)},addItem:function(b,a,c){if(a){b.store("caption",a);a.store("image",b)}c=($defined(c))?c:this.imgs.length;if(this.imgs.contains(b)){this.removeItems([b],true)}this.imgs.splice(c,0,document.id(b));this.setupIconEvents(b,a);this.fireEvent("onAdd",[b,a]);return this},removeItems:function(d,a){var e=this.calculateRange();if(!d.length){return this}d=$A(d);a=$pick(a,true);var c=[];var j=[];var l={width:0,"border-width":0};var k={};var b={before:[],beforeImgs:[],after:[],afterImgs:[]};var f=[];d.each(function(n){var m=this.imgs.indexOf(n);if(m>=e.end){b.after.push(n.getParent());b.afterImgs.push(n)}else{if(m<e.start){b.before.push(n.getParent());b.beforeImgs.push(n)}else{c.push(n.getParent());j.push(n);k[c.length-1]=$unlink(l)}}this.selected.erase(n);f.push(m)},this);this.imgs=this.imgs.filter(function(m,n){return !f.contains(n)});var h=[];if(b.before.length){var g=this.imgs.indexOf(e.elements[0].image);b.before.each(function(o,n){this.fireEvent("onRemoveItem",[o]);var m=b.beforeImgs[n];h.push(m);try{o.dispose()}catch(p){dbug.log("before: error removing element %o, %o",o,p)}},this);this.scrollTo(g,false)}b.after.each(function(n,m){this.fireEvent("onRemoveItem",[n]);h.push(b.afterImgs[m]);try{n.dispose()}catch(o){dbug.log("after: error removing element %o, %o",n,o)}});function i(n,o){var m=[];c.each(function(q,p){this.fireEvent("onRemoveItem",[q]);m.push(j[p]);try{q.dispose()}catch(r){dbug.log("fade: error removing element %o, %o",q,r)}},this);m.combine(o);this.fireEvent("onRemoveItems",[m]);n=this.calculateRange();if(n.elements==0&&n.start>0){this.pageBack()}if(!this.imgs.length){this.fireEvent("onEmpty")}}if(a){new Fx.Elements(c).start(k).chain(i.bind(this,[e,h]))}else{i.apply(this,[e,h])}return this},removeSelected:function(a){this.removeItems(this.selected,a);return this},empty:function(b){var c={};var a=[];this.imgs.each(function(d,e){a.push(d.getParent());c[e]={opacity:0}});new Fx.Elements(a).start(c).chain(function(){this.removeItems(this.imgs,false);if(!b){this.fireEvent("onEmpty")}}.bind(this));return this},selectItem:function(c,a){var b=this.imgs[c];if($defined(a)){if(a){b.addClass("selected")}else{b.removeClass("selected")}}else{b.toggleClass("selected")}if(b.hasClass("selected")){this.selected.push(b);this.fireEvent("select",[c,b])}else{this.selected.erase(b);this.fireEvent("onDeSelect",[c,b])}return this},getDefaultWidth:function(){if($type(this.options.length)=="number"){return this.options.length}var a=document.id(this.options.length);if(!a){a=this.container.getParent()}return a.getSize()[this.options.useAxis]},getIconPositions:function(){var c=[];var a=0;var b;this.imgs.each(function(d,e){var f=d.getParent();a+=(b)?d["offset"+this.side.capitalize()]-b["offset"+this.side.capitalize()]:0;b=d;c.push({image:d,size:f.getSize()[this.options.useAxis],offset:a,container:f})},this);return c},calculateRange:function(d,g){if(!this.imgs.length){return{start:0,end:0,elements:[]}}d=$pick(d,this.currentOffset||0);if(d<0){d=0}var f=this.getDefaultWidth();var b=this.getIconPositions();var a;if(b[d]){a=b[d].offset}else{var e=this.imgs.getLast().getParent();var h=e.getCoordinates();a=h.width+h.left-e.getParent().getPosition().x}var c=b.filter(function(j,k){if(g){return k<d&&j.offset<a&&j.offset>=a-f}else{return k>=d&&j.offset+j.size<=f+b[d].offset}});return(g)?{start:d-c.length,end:d,elements:c}:{start:d,end:c.length+d,elements:c}},inRange:function(b){var a=this.calculateRange();return b<a.end&&b>=a.start},setupEvents:function(){document.id(this.options.container).addEvents({mouseleave:function(){if(this.inFocus){this.inFocus=null}this.imgOut(null,true)}.bind(this)});$$(this.options.backScrollButtons).each(function(a){a.addEvents({click:this.pageBack.bind(this),mouseover:function(){this.addClass("hover")},mouseout:function(){this.removeClass("hover")}})},this);$$(this.options.forwardScrollButtons).each(function(a){a.addEvents({click:this.pageForward.bind(this),mouseover:function(){this.addClass("hover")},mouseout:function(){this.removeClass("hover")}})},this);$$(this.options.clearLinks).each(function(a){a.addEvent("click",this.empty.bind(this))},this);$$(this.options.removeLinks).each(function(a){a.addEvent("click",this.removeSelected.bind(this))},this)},imgOver:function(a){this.inFocus=a;$clear(this.overTimeout);this.overTimeout=(function(){this.onFocusDelay=this.options.onFocusDelay;if(this.inFocus==a){this.fireEvent("onFocus",[a,this.imgs.indexOf(a)])}}).delay(this.onFocusDelay,this)},imgOut:function(a,b){if(!$defined(a)&&b){a=this.prevFocus||this.imgs[0]}if(this.inFocus==a&&a){this.inFocus=null;$clear(this.outTimeout);this.outTimeout=(function(){this.prevFocus=a;if(this.inFocus!=a||(a==null&&b)){this.fireEvent("onBlur",[a,this.imgs.indexOf(a)])}if(!this.inFocus){this.onFocusDelay=this.options.initialFocusDelay}}).delay(this.options.onBlurDelay,this)}},setupIconEvents:function(b,a){b.addEvents({click:function(c){if(c.control||c.meta){this.selectItem(this.imgs.indexOf(b));c.stop()}}.bind(this)});b.getParent().addEvents({mouseover:this.imgOver.bind(this,b),mouseout:this.imgOver.bind(this,b)})}});var ObjectBrowser=new Class({Implements:[Options,Events],options:{onBranchClick:function(a){this.showLevel(a.path?a.path+"."+a.key:a.key,a.nodePath)},initPath:"",buildOnInit:true,data:{},excludeKeys:[],includeKeys:[]},initialize:function(a,b){this.container=document.id(a);this.setOptions(b);this.data=$H(this.options.data);this.levels={};this.elements={};if(this.options.buildOnInit){this.showLevel(this.options.initPath,this.container)}},toElement:function(){return this.container},getMemberByPath:function(c,b){if(c===""||c=="top"){return this.data.getClean()}var a=b?$H(b):this.data;return a.getFromPath(c)},replaceMemberByPath:function(c,b){if(c===""||c=="top"){return this.data=$H(b)}var a=this.getMemberByPath(c,true);a[c.split(".").pop()]=b;return this.data},getPathByNode:function(a){return $H(this.elements).keyOf(a)},validLevel:function(a){return(!this.options.excludeKeys.contains(a)&&(!this.options.includeKeys.length||this.options.includeKeys.contains(a)))},buildLevel:function(b){if(b.test(".$")){b=b.substring(0,b.length)}var c=this.getMemberByPath(b);if(this.levels[b]){return this.levels[b]}var a=new Element("ul");switch($type(c)){case"function":this.buildNode(c,"function()",a,b,true);break;case"string":case"number":this.buildNode(c,null,a,b,true);break;case"array":c.each(function(e,d){this.buildNode(e,d,a,b,["string","function"].contains($type(e)))}.bind(this));break;default:$H(c).each(function(g,f){var e=false;if(f=="element_dimensions"){e=true}if(e){dbug.log(f)}if(this.validLevel(f)){if(e){dbug.log("is valid level")}var d;if($type(g)=="object"){d=false;$each(g,function(i,h){if(this.validLevel(h)){if(e){dbug.log("not a leaf!")}d=false}else{d=true}},this);if(d){g=false}}if(e){dbug.log(g,f,a,b,$chk(d)?d:null)}this.buildNode(g,f,a,b,$chk(d)?d:null)}},this)}this.levels[b]=a;return a},getParentFromPath:function(a){return this.elements[(a||"top")+"NODE"]},showLevel:function(b,a,c){a=a||b;if(!this.elements[b]){this.elements[b]=this.buildLevel(b)[c||"inject"](this.elements[a]||this.container)}else{this.elements[b].toggle()}dbug.log("toggle class");this.elements[b].getParent().toggleClass("collapsed");return this},buildNode:function(e,d,g,f,b){if(d===""||e===""){b=true}if(!this.validLevel(d)){return null}var c=(f?f+"."+d:d)+"NODE";var h=this.buildLink((b)?e||d:$chk(d)?d:e,b);var a=new Element("li").addClass((b)?"leaf":"branch collapsed").adopt(h).inject(g);h.addEvent("click",function(i){i.stopPropagation();if(b){this.fireEvent("onLeafClick",{li:a,key:d,value:e,path:f,nodePath:c,event:i})}else{this.fireEvent("onBranchClick",{li:a,key:d,value:e,path:f,nodePath:c,event:i})}}.bind(this));this.elements[c]=a;return a},buildLink:function(a){if($type(a)=="function"){a=a.toString();a=a.substring(0,a.indexOf("{")+1)+"..."}return new Element("a",{href:"javascript: void(0);"}).set("html",a)}});var PopupDetail=new Class({Implements:[Options,Events],visible:false,observed:false,hasData:false,options:{observerAction:"mouseenter",closeOnMouseOut:true,linkPopup:false,data:{},templateOptions:{},useAjax:false,ajaxOptions:{method:"get"},ajaxLink:false,ajaxCache:{},delayOn:100,delayOff:100,stickyWinOptions:{},showNow:false,htmlResponse:false,regExp:/\\?%([^%]+)%/g},initialize:function(c,a,b){this.setOptions({stickyWinToUse:StickyWin},b);this.observer=document.id(a);this.html=(document.id(c))?document.id(c).get("html"):c||"";if(this.options.showNow){this.show.delay(this.options.delayOn,this)}this.setUpObservers()},setUpObservers:function(){var a=this.options;this.observer.addEvent(a.observerAction,function(){this.observed=true;this.show.delay(a.delayOn,this)}.bind(this));if((a.observerAction=="mouseenter"||a.observerAction=="mouseover")&&this.options.closeOnMouseOut){this.observer.addEvent("mouseleave",function(){this.observed=false;this.hide.delay(a.delayOff,this)}.bind(this))}return this},parseTemplate:function(b,a){return b.substitute(a,this.options.regExp)},makePopup:function(){if(!this.stickyWin){var a=this.options;if(a.htmlResponse){this.content=this.data}else{this.content=this.parseTemplate(this.html,a.data)}this.stickyWin=new a.stickyWinToUse($merge(a.stickyWinOptions,{relativeTo:this.observer,showNow:false,content:this.content,allowMultipleByClass:true}));if(document.id(a.linkPopup)||$type(a.linkPopup)=="string"){this.stickyWin.win.setStyle("cursor","pointer").addEvent("click",function(){window.location.href=($type(url)=="string")?url:url.src})}this.stickyWin.win.addEvent("mouseenter",function(){this.observed=true}.bind(this));this.stickyWin.win.addEvent("mouseleave",function(){this.observed=false;if(a.closeOnMouseOut){this.hide.delay(a.delayOff,this)}}.bind(this))}return this},getContent:function(){try{new Request($merge(this.options.ajaxOptions,{url:this.options.ajaxLink||this.observer.href,onSuccess:this.show.bind(this)})).send()}catch(a){dbug.log("ajax error on PopupDetail: %s",a)}},show:function(b){var a=this.options;if(b){this.data=b}if(this.observed&&!this.visible){if(a.useAjax&&!this.data){var c=a.ajaxCache[this.options.ajaxLink]||a.ajaxCache[this.observer.href];if(c){this.fireEvent("onPopupShow",this);return this.show(c)}this.cursorStyle=this.observer.getStyle("cursor");this.observer.setStyle("cursor","wait");this.getContent();return false}else{if(this.cursorStyle){this.observer.setStyle("cursor",this.cursorStyle)}if(a.useAjax&&!a.htmlResponse){a.data=JSON.decode(this.data)}this.makePopup();this.fireEvent("onPopupShow",this);this.stickyWin.show();this.visible=true;return this}}return this},hide:function(){if(!this.observed){this.fireEvent("onPopupHide");if(this.stickyWin){this.stickyWin.hide()}this.visible=false}return this}});var PopupDetailCollection=new Class({Implements:[Options],options:{details:{},links:[],ajaxLinks:[],useCache:true,template:"",popupDetailOptions:{}},cache:{},initialize:function(c,a){this.observers=$$(c);this.setOptions(a);var b=this.options.ajaxLinks.length;if(b<=0){b=this.options.details.length}if(this.observers.length!=b){dbug.log("warning: observers and details are out of sync.")}this.makePopupDetails()},makePopupDetails:function(){this.popupDetailObjs=this.observers.map(function(b,c){var d=this.options.popupDetailOptions;var a=new PopupDetail(this.options.template,b,$merge(d,{data:$pick(this.options.details[c],{}),linkItem:$pick(this.options.links[c],$pick(d.linkItem,false)),ajaxLink:$pick(this.options.ajaxLinks[c],false),ajaxCache:(this.options.useCache)?this.cache:{},useAjax:this.options.ajaxLinks.length>0}));return a},this)}});var StyleWriter=new Class({createStyle:function(a,b){window.addEvent("domready",function(){try{if(document.id(b)&&b){return}var c=new Element("style",{id:b||""}).inject($$("head")[0]);if(Browser.Engine.trident){c.styleSheet.cssText=a}else{c.set("text",a)}}catch(d){dbug.log("error: %s",d)}}.bind(this))}});var StickyWin=new Class({Binds:["destroy","hide","togglepin","esc"],Implements:[Options,Events,StyleWriter,Class.ToElement],options:{closeClassName:"closeSticky",pinClassName:"pinSticky",content:"",zIndex:10000,className:"",width:false,height:false,timeout:-1,allowMultipleByClass:true,allowMultiple:true,showNow:true,useIframeShim:true,iframeShimSelector:"",destroyOnClose:false,closeOnClickOut:false,closeOnEsc:false,getWindowManager:function(){return StickyWin.WM}},css:'.SWclearfix:after {content: "."; display: block; height: 0; clear: both; visibility: hidden;}.SWclearfix {display: inline-table;} * html .SWclearfix {height: 1%;} .SWclearfix {display: block;}',initialize:function(a){this.options.inject=this.options.inject||{target:document.body,where:"bottom"};this.setOptions(a);this.windowManager=this.options.getWindowManager();this.id=this.options.id||"StickyWin_"+new Date().getTime();this.makeWindow();if(this.windowManager){this.windowManager.add(this)}if(this.options.content){this.setContent(this.options.content)}if(this.options.timeout>0){this.addEvent("onDisplay",function(){this.hide.delay(this.options.timeout,this)}.bind(this))}this.createStyle(this.css,"StickyWinClearFix");if(this.options.closeOnClickOut||this.options.closeOnEsc){this.attach()}if(this.options.destroyOnClose){this.addEvent("close",this.destroy)}if(this.options.showNow){this.show()}},attach:function(a){var c=$pick(a,true)?"addEvents":"removeEvents";var b={};if(this.options.closeOnClickOut){b.click=this.esc}if(this.options.closeOnEsc){b.keyup=this.esc}document[c](b)},esc:function(a){if(a.key=="esc"){this.hide()}if(a.type=="click"&&this.element!=a.target&&!this.element.hasChild(a.target)){this.hide()}},makeWindow:function(){this.destroyOthers();if(!document.id(this.id)){this.win=new Element("div",{id:this.id}).addClass(this.options.className).addClass("StickyWinInstance").addClass("SWclearfix").setStyles({display:"none",position:"absolute",zIndex:this.options.zIndex}).inject(this.options.inject.target,this.options.inject.where).store("StickyWin",this)}else{this.win=document.id(this.id)}this.element=this.win;if(this.options.width&&$type(this.options.width.toInt())=="number"){this.win.setStyle("width",this.options.width.toInt())}if(this.options.height&&$type(this.options.height.toInt())=="number"){this.win.setStyle("height",this.options.height.toInt())}return this},show:function(a){this.showWin();if(!a){this.fireEvent("display")}if(this.options.useIframeShim){this.showIframeShim()}this.visible=true;return this},showWin:function(){if(this.windowManager){this.windowManager.focus(this)}if(!this.positioned){this.position()}this.win.show()},hide:function(a){if($type(a)=="event"||!a){this.fireEvent("close")}this.hideWin();if(this.options.useIframeShim){this.hideIframeShim()}this.visible=false;return this},hideWin:function(){this.win.setStyle("display","none")},destroyOthers:function(){if(!this.options.allowMultipleByClass||!this.options.allowMultiple){$$("div.StickyWinInstance").each(function(a){if(!this.options.allowMultiple||(!this.options.allowMultipleByClass&&a.hasClass(this.options.className))){a.retrieve("StickyWin").destroy()}},this)}},setContent:function(a){if(this.win.getChildren().length>0){this.win.empty()}if($type(a)=="string"){this.win.set("html",a)}else{if(document.id(a)){this.win.adopt(a)}}this.win.getElements("."+this.options.closeClassName).each(function(b){b.addEvent("click",this.hide)},this);this.win.getElements("."+this.options.pinClassName).each(function(b){b.addEvent("click",this.togglepin)},this);return this},position:function(a){this.positioned=true;this.setOptions(a);this.win.position({allowNegative:$pick(this.options.allowNegative,this.options.relativeTo!=document.body),relativeTo:this.options.relativeTo,position:this.options.position,offset:this.options.offset,edge:this.options.edge});if(this.shim){this.shim.position()}return this},pin:function(a){if(!this.win.pin){dbug.log("you must include element.pin.js!");return this}this.pinned=$pick(a,true);this.win.pin(a);return this},unpin:function(){return this.pin(false)},togglepin:function(){return this.pin(!this.pinned)},makeIframeShim:function(){if(!this.shim){var a=(this.options.iframeShimSelector)?this.win.getElement(this.options.iframeShimSelector):this.win;this.shim=new IframeShim(a,{display:false,name:"StickyWinShim"})}},showIframeShim:function(){if(this.options.useIframeShim){this.makeIframeShim();this.shim.show()}},hideIframeShim:function(){if(this.shim){this.shim.hide()}},destroy:function(){if(this.windowManager){this.windowManager.remove(this)}if(this.win){this.win.destroy()}if(this.options.useIframeShim&&this.shim){this.shim.destroy()}if(document.id("modalOverlay")){document.id("modalOverlay").destroy()}this.fireEvent("destroy")}});StickyWin.Stacker=new Class({Implements:[Options,Events],Binds:["click"],instances:[],options:{zIndexBase:9000},initialize:function(a){this.setOptions(a);this.zIndex=this.options.zIndex},add:function(a){this.instances.include(a);$(a).addEvent("mousedown",this.click)},click:function(a){this.instances.each(function(b){var c=$(b);if(c==a.target||c.hasChild($(a.target))){this.focus(b)}},this)},focus:function(a){if(this.focused==a){return}this.focused=a;if(a){this.instances.erase(a).push(a)}this.instances.each(function(c,b){$(c).setStyle("z-index",this.options.zIndexBase+b)},this);this.focused=a},remove:function(a){this.instances.erase(a);$(a).removeEvent("click",this.click)}});StickyWin.WM=new StickyWin.Stacker();StickyWin=Class.refactor(StickyWin,{options:{fade:true,fadeDuration:150},hideWin:function(){if(this.options.fade){this.fade(0)}else{this.previous()}},showWin:function(){if(this.options.fade){this.fade(1)}else{this.previous()}},hide:function(){this.previous(this.options.fade)},show:function(){this.previous(this.options.fade)},fade:function(b){if(!this.fadeFx){this.win.setStyles({opacity:0,display:"block"});var a={property:"opacity",duration:this.options.fadeDuration};if(this.options.fadeTransition){a.transition=this.options.fadeTransition}this.fadeFx=new Fx.Tween(this.win,a)}if(b>0){this.win.setStyle("display","block");this.position()}this.fadeFx.clearChain();this.fadeFx.start(b).chain(function(){if(b==0){this.win.setStyle("display","none");this.fireEvent("onClose")}else{this.fireEvent("onDisplay")}}.bind(this));return this}});StickyWin.Fx=StickyWin;StickyWin=Class.refactor(StickyWin,{options:{draggable:false,dragOptions:{},dragHandleSelector:".dragHandle",resizable:false,resizeOptions:{},resizeHandleSelector:""},setContent:function(){this.previous.apply(this,arguments);if(this.options.draggable){this.makeDraggable()}if(this.options.resizable){this.makeResizable()}return this},makeDraggable:function(){var c=this.toggleVisible(true);if(this.options.useIframeShim){this.makeIframeShim();var b=(this.options.dragOptions.onComplete||$empty);this.options.dragOptions.onComplete=function(){b();this.shim.position()}.bind(this)}if(this.options.dragHandleSelector){var a=this.win.getElement(this.options.dragHandleSelector);if(a){a.setStyle("cursor","move");this.options.dragOptions.handle=a}}this.win.makeDraggable(this.options.dragOptions);if(c){this.toggleVisible(false)}},makeResizable:function(){var c=this.toggleVisible(true);if(this.options.useIframeShim){this.makeIframeShim();var b=(this.options.resizeOptions.onComplete||$empty);this.options.resizeOptions.onComplete=function(){b();this.shim.position()}.bind(this)}if(this.options.resizeHandleSelector){var a=this.win.getElement(this.options.resizeHandleSelector);if(a){this.options.resizeOptions.handle=this.win.getElement(this.options.resizeHandleSelector)}}this.win.makeResizable(this.options.resizeOptions);if(c){this.toggleVisible(false)}},toggleVisible:function(a){if(!this.visible&&Browser.Engine.webkit&&$pick(a,true)){this.win.setStyles({display:"block",opacity:0});return true}else{if(!$pick(a,false)){this.win.setStyles({display:"none",opacity:1});return false}}return false}});StickyWin.Fx=StickyWin;StickyWin.Modal=new Class({Extends:StickyWin,options:{modalize:true,maskOptions:{style:{"background-color":"#333",opacity:0.8}},hideOnClick:true,getWindowManager:function(){return StickyWin.ModalWM}},initialize:function(a){this.options.maskTarget=this.options.maskTarget||document.body;this.setOptions(a);this.mask=new Mask(this.options.maskTarget,this.options.maskOptions).addEvent("click",function(){if(this.options.hideOnClick){this.hide()}}.bind(this));this.parent(a)},show:function(a){if($pick(a,this.options.modalize)){this.mask.show()}this.parent()},hide:function(a){if($pick(a,true)){this.mask.hide()}this.parent()}});StickyWin.ModalWM=new StickyWin.Stacker({zIndexBase:11000});if(StickyWin.Fx){StickyWin.Fx.Modal=StickyWin.Modal}(function(){var a=function(c){return{Extends:c,options:{url:"",showNow:false,requestOptions:{method:"get",evalScripts:true},wrapWithUi:false,caption:"",uiOptions:{},handleResponse:function(d){var e="";this.Request.response.text.stripScripts(function(f){e+=f});if(this.options.wrapWithUi){d=StickyWin.ui(this.options.caption,d,this.options.uiOptions)}this.setContent(d);this.show();if(this.evalScripts){$exec(e)}this.fireEvent("update")}},initialize:function(e){var d;if(e&&e.showNow){d=true;e.showNow=false}this.parent(e);this.evalScripts=this.options.requestOptions.evalScripts;this.options.requestOptions.evalScripts=false;this.createRequest();if(d){this.update()}},createRequest:function(){this.Request=new Request(this.options.requestOptions).addEvent("onSuccess",this.options.handleResponse.bind(this))},update:function(e,d){this.Request.setOptions(d).send({url:e||this.options.url});return this}}};try{StickyWin.Ajax=new Class(a(StickyWin))}catch(b){}try{StickyWin.Modal.Ajax=new Class(a(StickyWin.Modal))}catch(b){}})();StickyWin.Alert=new Class({Implements:Options,Extends:StickyWin.Modal,options:{destroyOnClose:true,modalOptions:{modalStyle:{zIndex:11000}},zIndex:110001,uiOptions:{width:250,buttons:[{text:"Ok"}]},getWindowManager:$empty},initialize:function(a,c,b){this.message=c;this.caption=a;this.setOptions(b);this.setOptions({content:this.build()});this.parent(b)},makeMessage:function(){return new Element("p",{"class":"errorMsg SWclearfix",styles:{margin:0,minHeight:10},html:this.message})},build:function(){return StickyWin.ui(this.caption,this.makeMessage(),this.options.uiOptions)}});StickyWin.Error=new Class({Extends:StickyWin.Alert,makeMessage:function(){var a=this.parent();new Element("img",{src:(this.options.baseHref||Clientcide.assetLocation+"/simple.error.popup")+"/icon_problems_sm.gif","class":"bang clearfix",styles:{"float":"left",width:30,height:30,margin:"3px 5px 5px 0px"}}).inject(a,"top");return a}});StickyWin.alert=function(a,c,b){if($type(b)=="string"){b={baseHref:b}}return new StickyWin.Alert(a,c,b)};StickyWin.error=function(a,c,b){return new StickyWin.Error(a,c,b)};StickyWin.Confirm=new Class({Extends:StickyWin.Alert,options:{uiOptions:{width:250}},build:function(a){this.setOptions({uiOptions:{buttons:[{text:"Cancel"},{text:"Ok",onClick:a||function(){this.fireEvent("confirm")}.bind(this)}]}});return this.parent()}});StickyWin.confirm=function(a,c,d,b){return new StickyWin.Confirm(a,c,b).addEvent("confirm",d)};StickyWin.Prompt=new Class({Extends:StickyWin.Confirm,options:{defaultValue:""},initialize:function(b,c,a){this.addEvent("display",function(){this.input.select()}.bind(this));this.parent.apply(this,arguments)},makeMessage:function(){this.input=new Element("input",{value:this.options.defaultValue,type:"text",id:"foo",styles:{width:"100%"},events:{keyup:function(a){if(a.key=="enter"){this.fireEvent("confirm",this.input.get("value"));this.hide()}}.bind(this)}});return new Element("div").adopt(this.parent()).adopt(this.input)},build:function(){return this.parent(function(){this.fireEvent("confirm",this.input.get("value"))}.bind(this))}});StickyWin.prompt=function(a,c,d,b){return new StickyWin.Prompt(a,c,b).addEvent("confirm",d)};StickyWin.UI=new Class({Implements:[Options,Class.ToElement,StyleWriter],options:{width:300,css:"div.DefaultStickyWin {font-family:verdana; font-size:11px; line-height: 13px;position: relative;}div.DefaultStickyWin div.top{-moz-user-select: none;-khtml-user-select: none;}div.DefaultStickyWin div.top_ul{background:url({%baseHref%}full.png) top left no-repeat; height:30px; width:15px; float:left}div.DefaultStickyWin div.top_ur{position:relative; left:0px !important; left:-4px; background:url({%baseHref%}full.png) top right !important; height:30px; margin:0px 0px 0px 15px !important; margin-right:-4px; padding:0px}div.DefaultStickyWin h1.caption{clear: none !important; margin:0px !important; overflow: hidden; padding:0 !important; font-weight:bold; color:#555; font-size:14px !important; position:relative; top:8px !important; left:5px !important; float: left; height: 22px !important;}div.DefaultStickyWin div.middle, div.DefaultStickyWin div.closeBody {background:url({%baseHref%}body.png) top left repeat-y; margin:0px 20px 0px 0px !important;	margin-bottom: -3px; position: relative;	top: 0px !important; top: -3px;}div.DefaultStickyWin div.body{background:url({%baseHref%}body.png) top right repeat-y; padding:8px 23px 8px 0px !important; margin-left:5px !important; position:relative; right:-20px !important; z-index: 1;}div.DefaultStickyWin div.bottom{clear:both;}div.DefaultStickyWin div.bottom_ll{background:url({%baseHref%}full.png) bottom left no-repeat; width:15px; height:15px; float:left}div.DefaultStickyWin div.bottom_lr{background:url({%baseHref%}full.png) bottom right; position:relative; left:0px !important; left:-4px; margin:0px 0px 0px 15px !important; margin-right:-4px; height:15px}div.DefaultStickyWin div.closeButtons{text-align: center; background:url({%baseHref%}body.png) top right repeat-y; padding: 4px 30px 8px 0px; margin-left:5px; position:relative; right:-20px}div.DefaultStickyWin a.button:hover{background:url({%baseHref%}big_button_over.gif) repeat-x}div.DefaultStickyWin a.button {background:url({%baseHref%}big_button.gif) repeat-x; margin: 2px 8px 2px 8px; padding: 2px 12px; cursor:pointer; border: 1px solid #999 !important; text-decoration:none; color: #000 !important;}div.DefaultStickyWin div.closeButton{width:13px; height:13px; background:url({%baseHref%}closebtn.gif) no-repeat; position: absolute; right: 0px; margin:10px 15px 0px 0px !important; cursor:pointer;top:0px}div.DefaultStickyWin div.dragHandle {	width: 11px;	height: 25px;	position: relative;	top: 5px;	left: -3px;	cursor: move;	background: url({%baseHref%}drag_corner.gif); float: left;}",cornerHandle:false,cssClass:"",buttons:[],cssId:"defaultStickyWinStyle",cssClassName:"DefaultStickyWin",closeButton:true},initialize:function(){var a=this.getArgs(arguments);this.setOptions(a.options);this.legacy();var b=this.options.css.substitute({baseHref:this.options.baseHref||Clientcide.assetLocation+"/stickyWinHTML/"},/\\?\{%([^}]+)%\}/g);if(Browser.Engine.trident4){b=b.replace(/png/g,"gif")}this.createStyle(b,this.options.cssId);this.build();if(a.caption||a.body){this.setContent(a.caption,a.body)}},getArgs:function(){return StickyWin.UI.getArgs.apply(this,arguments)},legacy:function(){var a=this.options;if(a.confirmTxt){a.buttons.push({text:a.confirmTxt,onClick:a.onConfirm||$empty})}if(a.closeTxt){a.buttons.push({text:a.closeTxt,onClick:a.onClose||$empty})}},build:function(){var b=this.options;var a=new Element("div",{"class":b.cssClassName});if(b.width){a.setStyle("width",b.width)}this.element=a;this.element.store("StickyWinUI",this);if(b.cssClass){a.addClass(b.cssClass)}var c=new Element("div").addClass("body");this.body=c;var e=new Element("div").addClass("top_ur");this.top_ur=e;this.top=new Element("div").addClass("top").adopt(new Element("div").addClass("top_ul")).adopt(e);a.adopt(this.top);if(b.cornerHandle){new Element("div").addClass("dragHandle").inject(e,"top")}a.adopt(new Element("div").addClass("middle").adopt(c));if(b.buttons.length>0){var d=new Element("div").addClass("closeButtons");b.buttons.each(function(g){if(g.properties&&g.properties.className){g.properties["class"]=g.properties.className;delete g.properties.className}var f=$merge({"class":"closeSticky"},g.properties);new Element("a").addEvent("click",g.onClick||$empty).appendText(g.text).inject(d).set(f).addClass("button")});a.adopt(new Element("div").addClass("closeBody").adopt(d))}a.adopt(new Element("div").addClass("bottom").adopt(new Element("div").addClass("bottom_ll")).adopt(new Element("div").addClass("bottom_lr")));if(this.options.closeButton){a.adopt(new Element("div").addClass("closeButton").addClass("closeSticky"))}return this},setCaption:function(a){this.caption=a;if(!this.h1){this.makeCaption(a)}else{if(document.id(a)){this.h1.adopt(a)}else{this.h1.set("html",a)}}return this},makeCaption:function(a){if(!a){return this.destroyCaption()}var b=this.options;this.h1=new Element("h1").addClass("caption");if(b.width){this.h1.setStyle("width",(b.width-(b.cornerHandle?55:40)-(b.closeButton?10:0)))}this.setCaption(a);this.top_ur.adopt(this.h1);if(!this.options.cornerHandle){this.h1.addClass("dragHandle")}return this},destroyCaption:function(){if(this.h1){this.h1.destroy();this.h1=null}return this},setContent:function(){var c=this.getArgs.apply(this,arguments);var b=c.caption;var a=c.body;this.setCaption(b);if(document.id(a)){this.body.empty().adopt(a)}else{this.body.set("html",a)}return this}});StickyWin.UI.getArgs=function(){var a=$type(arguments[0])=="arguments"?arguments[0]:arguments;if(Browser.Engine.presto&&1===a.length){a=a[0]}var d=a[0],c=a[1];var b=Array.link(a,{options:Object.type});if(a.length==3||(!b.options&&a.length==2)){b.caption=d;b.body=c}else{if(($type(c)=="object"||!c)&&d&&$type(d)!="object"){b.body=d}}return b};StickyWin.ui=function(b,a,c){return document.id(new StickyWin.UI(b,a,c))};StickyWin.UI.Pointy=new Class({Extends:StickyWin.UI,options:{theme:"dark",themes:{dark:{bgColor:"#333",fgColor:"#ddd",imgset:"dark"},light:{bgColor:"#ccc",fgColor:"#333",imgset:"light"}},css:"div.DefaultPointyTip {vertical-align: auto; position: relative;}div.DefaultPointyTip * {text-align:left !important}div.DefaultPointyTip .pointyWrapper div.body{background: {%bgColor%}; color: {%fgColor%}; left: 0px; right: 0px !important;padding:  0px 10px !important;margin-left: 0px !important;font-family: verdana;font-size: 11px;line-height: 13px;position: relative;}div.DefaultPointyTip .pointyWrapper div.top {position: relative;height: 25px; overflow: visible;}div.DefaultPointyTip .pointyWrapper div.top_ul{background: url({%baseHref%}{%imgset%}_back.png) top left no-repeat;width: 8px;height: 25px; position: absolute; left: 0px;}div.DefaultPointyTip .pointyWrapper div.top_ur{background: url({%baseHref%}{%imgset%}_back.png) top right !important;margin: 0 0 0 8px !important;height: 25px;position: relative;left: 0px !important;padding: 0;}div.DefaultPointyTip .pointyWrapper h1.caption{color: {%fgColor%};left: 0px !important;top: 4px !important;clear: none !important;overflow: hidden;font-weight: 700;font-size: 12px !important;position: relative;float: left;height: 22px !important;margin: 0 !important;padding: 0 !important;}div.DefaultPointyTip .pointyWrapper div.middle, div.DefaultPointyTip .pointyWrapper div.closeBody{background:  {%bgColor%};margin: 0 0px 0 0 !important;position: relative;top: 0 !important;}div.DefaultPointyTip .pointyWrapper div.bottom {clear: both; width: 100% !important; background: none; height: 6px} div.DefaultPointyTip .pointyWrapper div.bottom_ll{font-size:1; background: url({%baseHref%}{%imgset%}_back.png) bottom left no-repeat;width: 6px;height: 6px;position: absolute; left: 0px;}div.DefaultPointyTip .pointyWrapper div.bottom_lr{font-size:1; background: url({%baseHref%}{%imgset%}_back.png) bottom right;height: 6px;margin: 0 0 0 6px !important;position: relative;left: 0 !important;}div.DefaultPointyTip .pointyWrapper div.noCaption{ height: 6px; overflow: hidden}div.DefaultPointyTip .pointyWrapper div.closeButton{width:13px; height:13px; background:url({%baseHref%}{%imgset%}_x.png) no-repeat; position: absolute; right: 0px; margin:0px !important; cursor:pointer; z-index: 1; top: 4px;}div.DefaultPointyTip .pointyWrapper div.pointyDivot {background: url({%divot%}) no-repeat;}",divot:"{%baseHref%}{%imgset%}_divot.png",divotSize:22,direction:12,cssId:"defaultPointyTipStyle",cssClassName:"DefaultPointyTip"},initialize:function(){var a=this.getArgs(arguments);this.setOptions(a.options);$extend(this.options,this.options.themes[this.options.theme]);this.options.baseHref=this.options.baseHref||Clientcide.assetLocation+"/PointyTip/";this.options.divot=this.options.divot.substitute(this.options,/\\?\{%([^}]+)%\}/g);if(Browser.Engine.trident4){this.options.divot=this.options.divot.replace(/png/g,"gif")}this.options.css=this.options.css.substitute(this.options,/\\?\{%([^}]+)%\}/g);if(a.options&&a.options.theme){while(!this.id){var c=$random(0,999999999);if(!StickyWin.UI.Pointy[c]){StickyWin.UI.Pointy[c]=this;this.id=c}}this.options.css=this.options.css.replace(/div\.DefaultPointyTip/g,"div#pointy_"+this.id);this.options.cssId="pointyTipStyle_"+this.id}if($type(this.options.direction)=="string"){var b={left:9,right:3,up:12,down:6};this.options.direction=b[this.options.direction]}this.parent(a.caption,a.body,this.options);if(this.id){document.id(this).set("id","pointy_"+this.id)}},build:function(){this.parent();var c=this.options;this.pointyWrapper=new Element("div",{"class":"pointyWrapper"}).inject(document.id(this));document.id(this).getChildren().each(function(f){if(f!=this.pointyWrapper){this.pointyWrapper.grab(f)}},this);var a=c.divotSize;var d=a;var e=(c.width-c.divotSize)/2;var b=function(){switch(c.direction){case 12:case 1:case 11:return{height:d/2};case 5:case 6:case 7:return{height:d/2,backgroundPosition:"0 -"+d/2+"px"};case 8:case 9:case 10:return{width:a/2};case 2:case 3:case 4:return{width:a/2,backgroundPosition:"100%"}}};this.pointer=new Element("div",{styles:$extend({width:a,height:d,overflow:"hidden"},b()),"class":"pointyDivot pointy_"+c.direction}).inject(this.pointyWrapper)},expose:function(){if(document.id(this).getStyle("display")!="none"&&document.id(document.body).hasChild(document.id(this))){return $empty}document.id(this).setStyles({visibility:"hidden",position:"absolute"});var a;if(!document.body.hasChild(document.id(this))){document.id(this).inject(document.body);a=true}return(function(){if(a){document.id(this).dispose()}document.id(this).setStyles({visibility:"visible",position:"relative"})}).bind(this)},positionPointer:function(a){if(!this.pointer){return}var b=a||this.options;var f;var e=b.direction;switch(e){case 12:case 1:case 11:f={edge:{x:"center",y:"bottom"},position:{x:e==12?"center":e==1?"right":"left",y:"top"},offset:{x:(e==12?0:e==1?-1:1)*b.divotSize,y:1}};break;case 2:case 3:case 4:f={edge:{x:"left",y:"center"},position:{x:"right",y:e==3?"center":e==2?"top":"bottom"},offset:{x:-1,y:(e==3?0:e==4?-1:1)*b.divotSize}};break;case 5:case 6:case 7:f={edge:{x:"center",y:"top"},position:{x:e==6?"center":e==5?"right":"left",y:"bottom"},offset:{x:(e==6?0:e==5?-1:1)*b.divotSize,y:-1}};break;case 8:case 9:case 10:f={edge:{x:"right",y:"center"},position:{x:"left",y:e==9?"center":e==10?"top":"bottom"},offset:{x:1,y:(e==9?0:e==8?-1:1)*b.divotSize}};break}var c=this.expose();this.pointer.position($extend({relativeTo:this.pointyWrapper},f,a));c()},setContent:function(b,a){this.parent(b,a);this.top[this.h1?"removeClass":"addClass"]("noCaption");if(Browser.Engine.trident4){document.id(this).getElements(".bottom_ll, .bottom_lr").setStyle("font-size",1)}if(this.options.closeButton){this.body.setStyle("margin-right",6)}this.positionPointer();return this},makeCaption:function(a){this.parent(a);if(this.options.width&&this.h1){this.h1.setStyle("width",(this.options.width-(this.options.closeButton?25:15)))}}});StickyWin.UI.pointy=function(b,a,c){return document.id(new StickyWin.UI.Pointy(b,a,c))};StickyWin.ui.pointy=StickyWin.UI.pointy;StickyWin.PointyTip=new Class({Extends:StickyWin,options:{point:"left",pointyOptions:{}},initialize:function(){var a=this.getArgs(arguments);this.setOptions(a.options);var b=this.options.pointyOptions;var e=b.direction;if(!e){var c={left:9,right:3,up:12,down:6};e=c[this.options.point];if(!e){e=this.options.point}b.direction=e}if(!b.width){b.width=this.options.width}this.pointy=new StickyWin.UI.Pointy(a.caption,a.body,b);this.options.content=null;this.setOptions(a.options,this.getPositionSettings());this.parent(this.options);this.win.empty().adopt(document.id(this.pointy));this.attachHandlers(this.win);if(this.options.showNow){this.position()}},getArgs:function(){return StickyWin.UI.getArgs.apply(this,arguments)},getPositionSettings:function(){var a=this.pointy.options.divotSize;var c=this.options.point;var b=this.options.offset||{};switch(c){case"left":case 8:case 9:case 10:return{edge:{x:"left",y:c==10?"top":c==8?"bottom":"center"},position:{x:"right",y:"center"},offset:{x:a+(b.x||0),y:b.y||0}};case"right":case 2:case 3:case 4:return{edge:{x:"right",y:(c==2?"top":c==4?"bottom":"center")+(b.y||0)},position:{x:"left",y:"center"},offset:{x:-a+(b.x||0),y:b.y||0}};case"up":case 11:case 12:case 1:return{edge:{x:c==11?"left":c==1?"right":"center",y:"top"},position:{x:"center",y:"bottom"},offset:{y:a+(b.y||0),x:(c==11?-a:c==1?a:0)+(b.x||0)}};case"down":case 5:case 6:case 7:return{edge:{x:(c==7?"left":c==5?"right":"center")+(b.x||0),y:"bottom"},position:{x:"center",y:"top"},offset:{y:-a+(b.y||0),x:(c==7?-a:c==5?a:0)+(b.x||0)}}}},setContent:function(){var a=this.getArgs(arguments);this.pointy.setContent(a.caption,a.body);[this.pointy.h1,this.pointy.body].each(this.attachHandlers,this);if(this.visible){this.position()}return this},showWin:function(){this.parent();this.pointy.positionPointer()},position:function(a){this.parent(a);this.pointy.positionPointer()},attachHandlers:function(a){if(!a){return}a.getElements("."+this.options.closeClassName).addEvent("click",function(){this.hide()}.bind(this));a.getElements("."+this.options.pinClassName).addEvent("click",function(){this.togglepin()}.bind(this))}});Tips.Pointy=new Class({Extends:Tips,options:{onShow:function(a,b){b.show()},onHide:function(a,b){b.hide()},pointyTipOptions:{point:11,width:150,pointyOptions:{closeButton:false}}},initialize:function(){var a=Array.link(arguments,{options:Object.type,elements:$defined});this.setOptions(a.options);this.tip=new StickyWin.PointyTip($extend(this.options.pointyTipOptions,{showNow:false}));if(this.options.className){document.id(this.tip).addClass(this.options.className)}if(a.elements){this.attach(a.elements)}},elementEnter:function(b,a){var d=a.retrieve("tip:title");var c=a.retrieve("tip:text");this.tip.setContent(d,c);this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);this.position(a)},elementLeave:function(a){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this)},elementMove:function(a){return},position:function(a){this.tip.setOptions({relativeTo:a});this.tip.position()},show:function(){this.fireEvent("show",[document.id(this.tip),this.tip])},hide:function(){this.fireEvent("hide",[document.id(this.tip),this.tip])}});var Collapsible=new Class({Extends:Fx.Reveal,initialize:function(a,c,b){this.clicker=document.id(a);this.section=document.id(c);this.parent(this.section,b);this.boundtoggle=this.toggle.bind(this);this.attach()},attach:function(){this.clicker.addEvent("click",this.boundtoggle)},detach:function(){this.clicker.removeEvent("click",this.boundtoggle)}});var Collapsable=Collapsible;var HoverGroup=new Class({Implements:[Options,Events],Binds:["enter","leave","remain"],options:{elements:[],delay:300,start:["mouseenter"],remain:[],end:["mouseleave"]},initialize:function(a){this.setOptions(a);this.attachTo(this.options.elements);this.addEvents({leave:function(){this.active=false},enter:function(){this.active=true}})},elements:[],attachTo:function(d,e){var b={},c={},a={};d=$splat(document.id(d)||$$(d));this.options.start.each(function(f){b[f]=this.enter},this);this.options.end.each(function(f){a[f]=this.leave},this);this.options.remain.each(function(f){c[f]=this.remain},this);if(e){d.each(function(f){f.removeEvents(b).removeEvents(a).removeEvents(c);this.elements.erase(f)},this)}else{d.each(function(f){f.addEvents(b).addEvents(a).addEvents(c)});this.elements.combine(d)}return this},detachFrom:function(a){this.attachTo(a,true)},enter:function(a){this.isMoused=true;this.assert(a)},leave:function(a){this.isMoused=false;this.assert(a)},remain:function(a){if(this.active){this.enter(a)}},assert:function(a){$clear(this.assertion);this.assertion=(function(){if(!this.isMoused&&this.active){this.fireEvent("leave",a)}else{if(this.isMoused&&!this.active){this.fireEvent("enter",a)}}}).delay(this.options.delay,this)}});var MenuSlider=new Class({Implements:[Options,Events],Binds:["slideIn","hide","slideOut"],options:{fxOptions:{duration:400,transition:"expo:out",link:"cancel"},outFx:false,useIframeShim:true},initialize:function(c,a,b){this.menu=document.id(c);this.subMenu=document.id(a);this.setOptions(b);this.makeSlider();this.hoverGroup=new HoverGroup($merge(this.options.hoverGroupOptions,{elements:[this.menu,this.subMenu],onEnter:this.slideIn,onLeave:this.options.outFx?this.slideOut:this.hide}))},makeSlider:function(){this.slider=new Fx.Slide(this.subMenu,this.options.fxOptions).hide();if(this.options.useIframeShim&&window.IframeShim){this.shim=new IframeShim(this.subMenu)}},slideIn:function(){this.fireEvent("inStart");this.slider.slideIn().chain(function(){if(this.shim){this.shim.show()}this.fireEvent("in")}.bind(this));this.visible=true;return this},slideOut:function(a){this.hoverGroup.active=true;this.slider.slideOut().chain(this.hide);return this},hide:function(){$clear(this.hoverGroup.assertion);this.hoverGroup.active=false;this.slider.cancel();this.slider.hide();this.fireEvent("out");if(this.shim){this.shim.hide()}this.visible=false;return this},isVisible:function(){return this.visible}});var MooScroller=new Class({Implements:[Options,Events],options:{maxThumbSize:10,mode:"vertical",width:0,scrollSteps:10,wheel:true,scrollLinks:{forward:"scrollForward",back:"scrollBack"},hideWhenNoOverflow:true},initialize:function(c,a,b){this.setOptions(b);this.horz=(this.options.mode=="horizontal");this.content=document.id(c).setStyle("overflow","hidden");this.knob=document.id(a);this.track=this.knob.getParent();this.setPositions();if(this.horz&&this.options.width){this.wrapper=new Element("div");this.content.getChildren().each(function(d){this.wrapper.adopt(d)},this);this.wrapper.inject(this.content).setStyle("width",this.options.width)}this.bound={start:this.start.bind(this),end:this.end.bind(this),drag:this.drag.bind(this),wheel:this.wheel.bind(this),page:this.page.bind(this)};this.position={};this.mouse={};this.update();this.attach();this.clearScroll=function(){$clear(this.scrolling)}.bind(this);["forward","back"].each(function(d){var e=document.id(this.options.scrollLinks[d]);if(e){e.addEvents({mousedown:function(){this.scrolling=this[d].periodical(50,this)}.bind(this),mouseup:this.clearScroll.bind(this),click:this.clearScroll.bind(this)})}},this);this.knob.addEvent("click",this.clearScroll.bind(this));window.addEvent("domready",function(){try{document.id(document.body).addEvent("mouseup",this.clearScroll)}catch(d){}}.bind(this))},setPositions:function(){[this.track,this.knob].each(function(a){if(a.getStyle("position")=="static"){a.setStyle("position","relative")}})},toElement:function(){return this.content},update:function(){var a=this.horz?"Width":"Height";this.contentSize=this.content["offset"+a];this.contentScrollSize=this.content["scroll"+a];this.trackSize=this.track["offset"+a];this.contentRatio=this.contentSize/this.contentScrollSize;this.knobSize=(this.trackSize*this.contentRatio).limit(this.options.maxThumbSize,this.trackSize);if(this.options.hideWhenNoOverflow){this.hidden=this.knobSize==this.trackSize;this.track.setStyle("opacity",this.hidden?0:1)}this.scrollRatio=this.contentScrollSize/this.trackSize;this.knob.setStyle(a.toLowerCase(),this.knobSize);this.updateThumbFromContentScroll();this.updateContentFromThumbPosition()},updateContentFromThumbPosition:function(){this.content[this.horz?"scrollLeft":"scrollTop"]=this.position.now*this.scrollRatio},updateThumbFromContentScroll:function(){this.position.now=(this.content[this.horz?"scrollLeft":"scrollTop"]/this.scrollRatio).limit(0,(this.trackSize-this.knobSize));this.knob.setStyle(this.horz?"left":"top",this.position.now)},attach:function(){this.knob.addEvent("mousedown",this.bound.start);if(this.options.scrollSteps){this.content.addEvent("mousewheel",this.bound.wheel)}this.track.addEvent("mouseup",this.bound.page)},detach:function(){this.knob.removeEvent("mousedown",this.bound.start);if(this.options.scrollSteps){this.content.removeEvent("mousewheel",this.bound.wheel)}this.track.removeEvent("mouseup",this.bound.page);document.id(document.body).removeEvent("mouseup",this.clearScroll)},wheel:function(a){if(this.hidden){return}this.scroll(-(a.wheel*this.options.scrollSteps));this.updateThumbFromContentScroll();a.stop()},scroll:function(a){a=a||this.options.scrollSteps;this.content[this.horz?"scrollLeft":"scrollTop"]+=a;this.updateThumbFromContentScroll();this.fireEvent("onScroll",a)},forward:function(a){this.scroll(a)},back:function(a){a=a||this.options.scrollSteps;this.scroll(-a)},page:function(c){var b=this.horz?"x":"y";var a=(c.page[b]>this.knob.getPosition()[b]);this.scroll((a?1:-1)*this.content["offset"+(this.horz?"Width":"Height")]);this.updateThumbFromContentScroll();this.fireEvent("onPage",a);c.stop()},start:function(b){var a=this.horz?"x":"y";this.mouse.start=b.page[a];this.position.start=this.knob.getStyle(this.horz?"left":"top").toInt();document.addEvent("mousemove",this.bound.drag);document.addEvent("mouseup",this.bound.end);this.knob.addEvent("mouseup",this.bound.end);b.stop()},end:function(a){document.removeEvent("mousemove",this.bound.drag);document.removeEvent("mouseup",this.bound.end);this.knob.removeEvent("mouseup",this.bound.end);a.stop()},drag:function(b){var a=this.horz?"x":"y";this.mouse.now=b.page[a];this.position.now=(this.position.start+(this.mouse.now-this.mouse.start)).limit(0,(this.trackSize-this.knobSize));this.updateContentFromThumbPosition();this.updateThumbFromContentScroll();b.stop()}});var MultipleOpenAccordion=new Class({Implements:[Options,Events,Chain],options:{togglers:[],elements:[],openAll:false,firstElementsOpen:[0],fixedHeight:false,fixedWidth:false,height:true,opacity:true,width:false},togglers:[],elements:[],initialize:function(b){var a=Array.link(arguments,{options:Object.type,elements:Array.type});this.setOptions(a.options);elements=$$(this.options.elements);$$(this.options.togglers).each(function(d,c){this.addSection(d,elements[c],c)},this);if(this.togglers.length){if(this.options.openAll){this.showAll()}else{this.toggleSections(this.options.firstElementsOpen,false,true)}}this.openSections=this.showSections.bind(this);this.closeSections=this.hideSections.bind(this)},addSection:function(d,c){d=document.id(d);c=document.id(c);var f=this.togglers.contains(d);var b=this.togglers.length;this.togglers.include(d);this.elements.include(c);var a=this.togglers.indexOf(d);d.addEvent("click",this.toggleSection.bind(this,a));var e;if(this.options.height&&this.options.width){e="both"}else{e=(this.options.height)?"vertical":"horizontal"}c.store("reveal",new Fx.Reveal(c,{transitionOpacity:this.options.opacity,mode:e,heightOverride:this.options.fixedHeight,widthOverride:this.options.fixedWidth}));return this},onComplete:function(a,b){this.fireEvent(this.elements[a].isDisplayed()?"onActive":"onBackground",[this.togglers[a],this.elements[a]]);this.callChain();return this},showSection:function(a,b){this.toggleSection(a,b,true)},hideSection:function(a,b){this.toggleSection(a,b,false)},toggleSection:function(a,d,b,e){var f=b?"reveal":$defined(b)?"dissolve":"toggle";e=$pick(e,true);var c=this.elements[a];if($pick(d,true)){c.retrieve("reveal")[f]().chain(this.onComplete.bind(this,[a,e]))}else{if(f=="toggle"){c.togglek()}else{c[f=="reveal"?"show":"hide"]()}this.onComplete(a,e)}return this},toggleAll:function(b,a){var d=a?"reveal":$chk(a)?"disolve":"toggle";var c=this.elements.getLast();this.elements.each(function(f,e){this.toggleSection(e,b,a,f==c)},this);return this},toggleSections:function(c,b,a){last=c.getLast();this.elements.each(function(e,d){this.toggleSection(d,b,c.contains(d)?a:!a,d==last)},this);return this},showSections:function(b,a){b.each(function(c){this.showSection(c,a)},this)},hideSections:function(b,a){b.each(function(c){this.hideSection(c,a)},this)},showAll:function(a){return this.toggleAll(a,true)},hideAll:function(a){return this.toggleAll(a,false)}});var SimpleCarousel=new Class({Implements:[Options,Events],options:{slideInterval:4000,transitionDuration:700,startIndex:0,buttonOnClass:"selected",buttonOffClass:"off",rotateAction:"none",rotateActionDuration:100,autoplay:true},initialize:function(b,d,e,c){this.container=document.id(b);var a=this.container.retrieve("SimpleCarouselInstance");if(a){return a}this.container.store("SimpleCarouselInstance",this);this.setOptions(c);this.container.addClass("hasCarousel");this.slides=$$(d);this.buttons=$$(e);this.createFx();this.showSlide(this.options.startIndex);if(this.options.autoplay){this.autoplay()}if(this.options.rotateAction!="none"){this.setupAction(this.options.rotateAction)}return this},toElement:function(){return this.container},setupAction:function(a){this.buttons.each(function(c,b){document.id(c).addEvent(a,function(){this.slideFx.setOptions(this.slideFx.options,{duration:this.options.rotateActionDuration});if(this.currentSlide!=b){this.showSlide(b)}this.stop()}.bind(this))},this)},createFx:function(){if(!this.slideFx){this.slideFx=new Fx.Elements(this.slides,{duration:this.options.transitionDuration})}this.slides.each(function(a){a.setStyle("opacity",0)})},showSlide:function(b){var a={};this.slides.each(function(c,d){if(d==b&&d!=this.currentSlide){if(document.id(this.buttons[d])){document.id(this.buttons[d]).swapClass(this.options.buttonOffClass,this.options.buttonOnClass)}a[d.toString()]={opacity:1}}else{if(document.id(this.buttons[d])){document.id(this.buttons[d]).swapClass(this.options.buttonOnClass,this.options.buttonOffClass)}a[d.toString()]={opacity:0}}},this);this.fireEvent("onShowSlide",b);this.currentSlide=b;this.slideFx.start(a);return this},autoplay:function(){this.slideshowInt=this.rotate.periodical(this.options.slideInterval,this);this.fireEvent("onAutoPlay");return this},stop:function(){$clear(this.slideshowInt);this.fireEvent("onStop");return this},rotate:function(){var b=this.currentSlide;var a=(b+1>=this.slides.length)?0:b+1;this.showSlide(a);this.fireEvent("onRotate",a);return this}});var SimpleSlideShow=new Class({Implements:[Events,Options,Chain],options:{startIndex:0,slides:[],currentSlideClass:"currentSlide",currentIndexContainer:false,maxContainer:false,nextLink:false,prevLink:false,wrap:true,disabledLinkClass:"disabled",crossFadeOptions:{}},initialize:function(a){this.setOptions(a);var b=this.options.slides;this.makeSlides(b);this.setCounters();this.setUpNav();this.now=this.options.startIndex;if(this.slides.length>0){this.show(this.now)}},slides:[],setCounters:function(){if(document.id(this.options.currentIndexContainer)){document.id(this.options.currentIndexContainer).set("html",this.now+1)}if(document.id(this.options.maxContainer)){document.id(this.options.maxContainer).set("html",this.slides.length)}},makeSlides:function(a){a.each(function(b,c){if(c!=this.now){b.setStyle("display","none")}else{b.setStyle("display","block")}this.makeSlide(b)},this)},makeSlide:function(a){a.addEvent("click",function(){this.fireEvent("onSlideClick")}.bind(this));this.slides.include(a)},setUpNav:function(){if(document.id(this.options.nextLink)){document.id(this.options.nextLink).addEvent("click",function(){this.forward()}.bind(this))}if(document.id(this.options.prevLink)){document.id(this.options.prevLink).addEvent("click",function(){this.back()}.bind(this))}},disableLinks:function(b){if(this.options.wrap){return}b=$pick(b,this.now);var d=document.id(this.options.prevLink);var c=document.id(this.options.nextLink);var a=this.options.disabledLinkClass;if(b>0){if(d){d.removeClass(a)}if(b===this.slides.length-1&&c){c.addClass(a)}else{if(c){c.removeClass(a)}}}else{if(this.slides.length>0&&c){c.removeClass(a)}if(d){d.addClass(a)}}},forward:function(){if($type(this.now)&&this.now<this.slides.length-1){this.show(this.now+1)}else{if($type(this.now)&&this.options.wrap){this.show(0)}else{if(!$type(this.now)){this.show(this.options.startIndex)}}}this.fireEvent("next");return this},back:function(){if(this.now>0){this.show(this.now-1);this.fireEvent("onPrev")}else{if(this.options.wrap&&this.slides.length>1){this.show(this.slides.length-1);this.fireEvent("prev")}}return this},show:function(c){if(this.showing){return this.chain(this.show.bind(this,c))}var b=this.now;var d=this.slides[c];function a(f,g){f.setStyle("display","block");if(!Browser.Engine.trident4){if(g){f.setStyle("opacity",0)}f.set("tween",this.options.crossFadeOptions).get("tween").start("opacity",1).chain(function(){this.showing=false;this.disableLinks();this.callChain();this.fireEvent("onSlideDisplay",c)}.bind(this))}}if(d){if($type(this.now)&&this.now!=c){if(!Browser.Engine.trident4){var e=this.slides[this.now].get("tween");e.setOptions(this.options.crossFadeOptions);this.showing=true;e.start("opacity",0).chain(function(){this.slides[b].setStyle("display","none");d.addClass(this.options.currentSlideClass);a.run([d,true],this);this.fireEvent("onSlideDisplay",c)}.bind(this))}else{this.slides[this.now].setStyle("display","none");a.run(d,this)}}else{a.run(d,this)}this.now=c;this.setCounters()}},slideClick:function(){this.fireEvent("onSlideClick",[this.slides[this.now],this.now])}});SimpleSlideShow.Carousel=new Class({Extends:SimpleSlideShow,Implements:[Class.ToElement],Binds:["makeSlide"],options:{sliderWidth:999999},initialize:function(a,b){this.setOptions(b);this.container=document.id(a);this.element=new Element("div").wraps(this.container).setStyles({width:this.container.getSize().x,overflow:"hidden",position:"relative"});this.container.setStyles({width:this.options.sliderWidth,position:"relative"});this.parent(b)},makeSlides:function(a){this.slides=[];a.each(this.makeSlide)},makeSlide:function(a){if(a.retrieve("slideSetup")){return}a.store("slideSetup",true);a.show();var b=new Element("div",{styles:{"float":"left",width:document.id(this).getSize().x}}).wraps(a);this.parent(b);this.slides.erase(a);this.setCounters();b.show();b.inject(this.container)},show:function(b){if(!this.container){return}this.fx=this.fx||new Fx.Tween(this.container.setStyle("left",0),$merge({property:"left"},this.options.crossFadeOptions));if(this.showing){return this.chain(this.show.bind(this,b))}var a=this.now;var c=this.slides[b];if(c){if(this.now!=b){this.fx.start(-c.getPosition(this.container).x).chain(function(){c.addClass(this.options.currentSlideClass);this.showing=false;this.disableLinks();this.callChain();this.fireEvent("onSlideDisplay",b)}.bind(this))}this.now=b;this.setCounters()}}});var SimpleImageSlideShow;(function(){var a=function(c,b){return{Extends:c,Implements:Class.ToElement,options:{imgUrls:[],imgClass:"screenshot",container:false},initialize:function(){var d=Array.link(arguments,{options:Object.type,container:$defined});this.container=document.id(d.container)||(d.options?document.id(d.options.container):false);if(b){this.parent(this.container,d.options)}else{this.parent(d.options)}this.options.imgUrls.each(function(e){this.addImg(e)},this);this.show(this.options.startIndex)},addImg:function(e){if(this.container){var d=new Element("img",{src:e,id:this.options.imgClass+this.slides.length}).addClass(this.options.imgClass).setStyle("display","none").inject(this.container).addEvent("click",this.slideClick.bind(this));this.slides.push(d);this.makeSlide(d);this.setCounters()}return this}}};SimpleImageSlideShow=new Class(a(SimpleSlideShow));SimpleImageSlideShow.Carousel=new Class(a(SimpleSlideShow.Carousel,true))})();var TabSwapper=new Class({Implements:[Options,Events],options:{selectedClass:"tabSelected",mouseoverClass:"tabOver",deselectedClass:"",rearrangeDOM:true,initPanel:0,smooth:false,smoothSize:false,maxSize:null,effectOptions:{duration:500},cookieName:null,cookieDays:999},tabs:[],sections:[],clickers:[],sectionFx:[],initialize:function(a){this.setOptions(a);var b=this.setup();if(b){return b}if(this.options.cookieName&&this.recall()){this.show(this.recall().toInt())}else{this.show(this.options.initPanel)}},setup:function(){var a=this.options;sections=$$(a.sections);tabs=$$(a.tabs);if(tabs[0]&&tabs[0].retrieve("tabSwapper")){return tabs[0].retrieve("tabSwapper")}clickers=$$(a.clickers);tabs.each(function(c,b){this.addTab(c,sections[b],clickers[b],b)},this)},addTab:function(c,d,a,b){c=document.id(c);a=document.id(a);d=document.id(d);if(this.tabs.indexOf(c)>=0&&c.retrieve("tabbered")&&this.tabs.indexOf(c)!=b&&this.options.rearrangeDOM){this.moveTab(this.tabs.indexOf(c),b);return this}if(!$defined(b)){b=this.tabs.length}if(b>0&&this.tabs[b-1]&&this.options.rearrangeDOM){c.inject(this.tabs[b-1],"after");d.inject(this.tabs[b-1].retrieve("section"),"after")}this.tabs.splice(b,0,c);a=a||c;c.addEvents({mouseout:function(){c.removeClass(this.options.mouseoverClass)}.bind(this),mouseover:function(){c.addClass(this.options.mouseoverClass)}.bind(this)});a.addEvent("click",function(f){f.preventDefault();this.show(b)}.bind(this));c.store("tabbered",true);c.store("section",d);c.store("clicker",a);this.hideSection(b);return this},removeTab:function(b){var a=this.tabs[this.now];if(this.now==b){if(b>0){this.show(b-1)}else{if(b<this.tabs.length){this.show(b+1)}}}this.now=this.tabs.indexOf(a);return this},moveTab:function(h,g){var c=this.tabs[h];var b=c.retrieve("clicker");var e=c.retrieve("section");var a=this.tabs[g];var f=a.retrieve("clicker");var d=a.retrieve("section");this.tabs.erase(c).splice(g,0,c);c.inject(a,"before");b.inject(f,"before");e.inject(d,"before");return this},show:function(a){if(!$chk(this.now)){this.tabs.each(function(c,b){if(a!=b){this.hideSection(b)}},this)}this.showSection(a).save(a);return this},save:function(a){if(this.options.cookieName){Cookie.write(this.options.cookieName,a,{duration:this.options.cookieDays})}return this},recall:function(){return(this.options.cookieName)?$pick(Cookie.read(this.options.cookieName),false):false},hideSection:function(a){var c=this.tabs[a];if(!c){return this}var b=c.retrieve("section");if(!b){return this}if(b.getStyle("display")!="none"){this.lastHeight=b.getSize().y;b.setStyle("display","none");c.swapClass(this.options.selectedClass,this.options.deselectedClass);this.fireEvent("onBackground",[a,b,c])}return this},showSection:function(a){var e=this.tabs[a];if(!e){return this}var b=e.retrieve("section");if(!b){return this}var f=this.options.smooth&&!Browser.Engine.trident4;if(this.now!=a){if(!e.retrieve("tabFx")){e.store("tabFx",new Fx.Morph(b,this.options.effectOptions))}var h=b.getStyle("overflow");var g={display:"block",overflow:"hidden"};if(f){g.opacity=0}var d=false;if(f){d={opacity:1}}else{if(b.getStyle("opacity").toInt()<1){b.setStyle("opacity",1);if(!this.options.smoothSize){this.fireEvent("onActiveAfterFx",[a,b,e])}}}if(this.options.smoothSize){var c=b.getDimensions().height;if($chk(this.options.maxSize)&&this.options.maxSize<c){c=this.options.maxSize}if(!d){d={}}d.height=c}if($chk(this.now)){this.hideSection(this.now)}if(this.options.smoothSize&&this.lastHeight){g.height=this.lastHeight}b.setStyles(g);if(d){e.retrieve("tabFx").start(d).chain(function(){this.fireEvent("onActiveAfterFx",[a,b,e]);b.setStyles({height:this.options.maxSize==d.height?this.options.maxSize:"auto",overflow:h});b.getElements("input, textarea").setStyle("opacity",1)}.bind(this))}this.now=a;this.fireEvent("onActive",[a,b,e])}e.swapClass(this.options.deselectedClass,this.options.selectedClass);return 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=document.id(this.options.positionOptions.relativeTo)||document.body;this.prompter=(document.id(this.options.msg))?document.id(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(!Browser.Engine.trident4){this.prompter.setStyle("opacity",0)}}else{if(!Browser.Engine.trident4){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){dbug.log(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(document.id(a.msg)&&b){this.msgHolder.empty().adopt(a.msg)}else{if(!document.id(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&&!Browser.Engine.trident4){this.fx=new Fx.Tween(this.prompter,$merge({property:"opacity"},this.options.effectOptions))}if(this.options.reposition){this.prompter.setStyle("display","block")}if(!Browser.Engine.trident4){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.position($merge(this.options.positionOptions,a));return this}});var DatePicker;(function(){var a=function(){if(DatePicker.pickers){return}DatePicker.pickers=[];DatePicker.hideAll=function(){DatePicker.pickers.each(function(b){b.hide()})}};DatePicker=new Class({Implements:[Options,Events,StyleWriter],options:{format:"%x",defaultCss:'div.calendarHolder {height:177px;position: absolute;top: -21px !important;top: -27px;left: -3px;width: 100%;}div.calendarHolder table.cal {margin-right: 15px !important;margin-right: 8px;width: 205px;}div.calendarHolder td {text-align:center;}div.calendarHolder tr.dayRow td {padding: 2px;width: 22px;cursor: pointer;}div.calendarHolder table.datePicker * {font-size:11px;line-height:16px;}div.calendarHolder table.datePicker {margin: 0;padding:0 5px;float: left;}div.calendarHolder table.datePicker table.cal td {cursor:pointer;}div.calendarHolder tr.dateNav {font-weight: bold;height:22px;margin-top:8px;}div.calendarHolder tr.dayNames {height: 23px;}div.calendarHolder tr.dayNames td {color:#666;font-weight:700;border-bottom:1px solid #ddd;}div.calendarHolder table.datePicker tr.dayRow td:hover {background:#ccc;}div.calendarHolder table.datePicker tr.dayRow td {margin: 1px;}div.calendarHolder td.today {color:#bb0904;}div.calendarHolder td.otherMonthDate {border:1px solid #fff;color:#ccc;background:#f3f3f3 !important;margin: 0px !important;}div.calendarHolder td.selectedDate {border: 1px solid #20397b;background:#dcddef;margin: 0px !important;}div.calendarHolder a.leftScroll, div.calendarHolder a.rightScroll {cursor: pointer; color: #000}div.datePickerSW div.body {height: 160px !important;height: 149px;}div.datePickerSW .clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}div.datePickerSW .clearfix {display: inline-table;}* html div.datePickerSW .clearfix {height: 1%;}div.datePickerSW .clearfix {display: block;}',calendarId:false,stickyWinOptions:{draggable:true,dragOptions:{},position:"bottomLeft",offset:{x:10,y:10},fadeDuration:400},stickyWinUiOptions:{},updateOnBlur:true,additionalShowLinks:[],showOnInputFocus:true,useDefaultCss:true,hideCalendarOnPick:true,weekStartOffset:0,showMoreThanOne:true,stickyWinToUse:StickyWin},initialize:function(b,c){a();if(document.id(b)){this.inputs=$H({start:document.id(b)})}this.today=new Date();this.setOptions(c);if(this.options.useDefaultCss){this.createStyle(this.options.defaultCss,"datePickerStyle")}if(!this.inputs){return}this.whens=this.whens||["start"];if(!this.calendarId){this.calendarId="popupCalendar"+new Date().getTime()}this.setUpObservers();this.getCalendar();this.formValidatorInterface();DatePicker.pickers.push(this)},formValidatorInterface:function(){this.inputs.each(function(b){var c;if(b.get("validatorProps")){c=b.get("validatorProps")}if(c&&c.dateFormat){dbug.log("using date format specified in validatorProps property of element to play nice with Form.Validator");this.setOptions({format:c.dateFormat})}else{if(!c){c={}}c.dateFormat=this.options.format;b.set("validatorProps",c)}},this)},calWidth:280,inputDates:{},selectedDates:{},setUpObservers:function(){this.inputs.each(function(b){if(this.options.showOnInputFocus){b.addEvent("focus",this.show.bind(this))}b.addEvent("blur",function(c){if(c){this.selectedDates=this.getDates(null,true);this.fillCalendar(this.selectedDates.start);if(this.options.updateOnBlur){this.updateInput()}}}.bind(this))},this);this.options.additionalShowLinks.each(function(b){document.id(b).addEvent("click",this.show.bind(this))},this)},getDates:function(e,c){var f={};if(!c){e=e||this.selectedDates}var b=function(d){var g=this.inputs.get(d);if(g){f[d]=this.validDate(g.get("value"))}}.bind(this);this.whens.each(function(d){switch($type(e)){case"object":if(e){f[d]=e[d]?e[d]:e}if(!f[d]&&!f[d].format){b(d)}break;default:b(d);break}if(!f[d]){f[d]=this.selectedDates[d]||new Date()}},this);return f},updateInput:function(){var b={};$each(this.getDates(),function(e,d){var c=this.inputs.get(d);if(!c){return}c.set("value",(e)?this.formatDate(e)||"":"")},this);return this},validDate:function(c){if(!$chk(c)){return null}var b=Date.parse(c.trim());return isNaN(b)?null:b},formatDate:function(b){return b.format(this.options.format)},getCalendar:function(){if(!this.calendar){var f=new Element("table",{id:this.options.calendarId||"",border:"0",cellpadding:"0",cellspacing:"0","class":"datePicker"});var b=new Element("tbody").inject(f);var e=[];(8).times(function(g){var h=new Element("tr").inject(b);(7).times(function(j){var k=new Element("td").inject(h).set("html","&nbsp;")})});e=b.getElements("tr");e[0].addClass("dateNav");e[1].addClass("dayNames");(6).times(function(g){e[g+2].addClass("dayRow")});this.rows=e;var c=e[1].getElements("td");c.each(function(g,h){g.firstChild.data=Date.getMsg("days")[(h+this.options.weekStartOffset)%7].substring(0,3)},this);[6,5,4,3].each(function(g){e[0].getElements("td")[g].dispose()});this.prevLnk=e[0].getElement("td").setStyle("text-align","right");this.prevLnk.adopt(new Element("a").set("html","&lt;").addClass("rightScroll"));this.month=e[0].getElements("td")[1];this.month.set("colspan",5);this.nextLnk=e[0].getElements("td")[2].setStyle("text-align","left");this.nextLnk.adopt(new Element("a").set("html","&gt;").addClass("leftScroll"));f.addEvent("click",this.clickCalendar.bind(this));this.calendar=f;this.container=new Element("div").adopt(f).addClass("calendarHolder");this.content=StickyWin.ui("",this.container,$merge(this.options.stickyWinUiOptions,{cornerHandle:this.options.stickyWinOptions.draggable,width:this.calWidth}));var d=$merge(this.options.stickyWinOptions,{content:this.content,className:"datePickerSW",allowMultipleByClass:true,showNow:false,relativeTo:this.inputs.get("start")});this.stickyWin=new this.options.stickyWinToUse(d);this.stickyWin.addEvent("onDisplay",this.positionClose.bind(this))}return this.calendar},positionClose:function(){if(this.closePositioned){return}var b=this.content.getElement("div.closeButton");if(b){b.inject(this.container,"after").setStyle("z-index",this.stickyWin.win.getStyle("z-index").toInt()+2);(function(){this.content.setStyle("width",this.calendar.getSize().x+(this.options.time?240:40));b.position({relativeTo:this.stickyWin.win.getElement(".top"),position:"upperRight",edge:"upperRight"})}).delay(3,this)}this.closePositioned=true},hide:function(){this.stickyWin.hide();this.fireEvent("onHide");return this},hideOthers:function(){DatePicker.pickers.each(function(b){if(b!=this){b.hide()}});return this},show:function(){this.selectedDates={};var b=this.getDates(null,true);this.whens.each(function(c){this.inputDates[c]=b[c]?b[c].clone():b.start?b.start.clone():this.today;this.selectedDates[c]=!this.inputDates[c]||isNaN(this.inputDates[c])?this.today:this.inputDates[c].clone();this.getCalendar(c)},this);this.fillCalendar(this.selectedDates.start);if(!this.options.showMoreThanOne){this.hideOthers()}this.stickyWin.show();this.fireEvent("onShow");return this},handleScroll:function(c){if(c.target.hasClass("rightScroll")||c.target.hasClass("leftScroll")){var b=c.target.hasClass("rightScroll")?this.rows[2].getElement("td").refDate-Date.units.day():this.rows[7].getElements("td")[6].refDate+Date.units.day();this.fillCalendar(new Date(b));return true}return false},setSelectedDates:function(c,b){this.selectedDates.start=b},onPick:function(){this.updateSelectors();this.inputs.each(function(b){b.fireEvent("change");b.fireEvent("blur")});this.fireEvent("onPick");if(this.options.hideCalendarOnPick){this.hide()}},clickCalendar:function(c){if(this.handleScroll(c)){return}if(!c.target.firstChild||!c.target.firstChild.data){return}var d=c.target.firstChild.data;if(c.target.refDate){var b=new Date(c.target.refDate);this.setSelectedDates(c,b);this.updateInput();this.onPick()}},fillCalendar:function(e){if($type(e)=="string"){e=new Date(e)}var b=(e)?new Date(e.getTime()):new Date();var c=b.get("hours");b.setDate(1);var f=b.getDay();if(f<this.options.weekStartOffset){f+=7}b.setTime((b.getTime()-(Date.units.day()*(f)))+(Date.units.day()*this.options.weekStartOffset));var d=new Element("span",{html:Date.getMsg("months")[e.getMonth()]+" "+e.getFullYear()});document.id(this.rows[0].getElements("td")[1]).empty().adopt(d);var g=b.clone();this.rows.each(function(j,h){if(h<2){return}j.getElements("td").each(function(i){g.set("hours",c);i.firstChild.data=g.getDate();i.refDate=g.getTime();g.setTime(g.getTime()+Date.units.day())},this)},this);this.updateSelectors()},updateSelectors:function(){var b;var c=new Date(this.rows[5].getElement("td").refDate).getMonth();this.rows.each(function(e,d){if(d<2){return}e.getElements("td").each(function(f){f.className="";b=new Date(f.refDate);if(b.format("%x")==this.today.format("%x")){f.addClass("today")}this.whens.each(function(g){var h=this.selectedDates[g];if(h&&b.format("%x")==h.format("%x")){f.addClass("selectedDate");this.fireEvent("selectedDateMatch",[f,g])}},this);this.fireEvent("rowDateEvaluated",[b,f]);if(b.getMonth()!=c){f.addClass("otherMonthDate")}b.setTime(b.getTime()+Date.units.day())},this)},this)}})})();DatePicker=Class.refactor(DatePicker,{options:{extraCSS:"a.finish {position: relative;height: 13px !important;top: -31px !important;left: 85px !important;top: -34px;left: 77px;height: 16px;display:block;float: left;padding: 1px 12px 3px !important;}div.calendarHolder div.time {border: #999 1px solid;width: 55px;position: relative;left: 3px;height: 17px;}div.calendarHolder td.timeTD {width: 140px;} div.calendarHolder td.label{width:35px; text-align:right}div.calendarHolder div.time select {font-size: 10px !important; font-size: 15px;padding: 0px;left:60px;position:absolute;top:-1px !important; width: auto !important;}div.calendarHolder div.time input {width: 16px !important;width: 12px;padding: 2px;height: 13px;border: none !important;border: 1px solid #fff;}div.calendarHolder div.timeSub {clear:both;position: relative;width: 65px;}div.calendarHolder div.timeSub span {text-align: center;color: #999;margin: 5px;}div.calendarHolder span.seperator {position:relative;top:-3px;}div.calendarHolder table.stamp {position:relative;top: 35px !important;top: 50px;left: 0px;}div.calendarHolder table.stamp a {left:123px;position:relative;top:9px;}div.calendarHolder table.stamp td {border: none !important;}div.calendarHolder td.selected_end {border-width: 1px 1px 1px 0px !important;margin: 0px 0px 0px 1px !important;}div.calendarHolder td.selected_start {border-width: 1px 0px 1px 1px !important;margin: 0px 1px 0px 0px !important;}div.calendarHolder table.datePicker td.range {background: #dcddef;border: solid #20397b;border-width: 1px 0px;margin: 0px 1px !important;}",range:false,time:false},initialize:function(a,b){if(b&&(b.range||b.time)){b=$merge({hideCalendarOnPick:false},b)}if(b&&b.time&&!b.format){b.format="%x %X"}this.setOptions(b);this.whens=(this.options.range)?["start","end"]:["start"];if($type(a)=="object"){this.inputs=$H(a)}else{if($type(document.id(a))=="element"){this.inputs=$H({start:document.id(a)})}else{if($type(a)=="array"){a=$$(a);this.inputs=$H({});this.whens.each(function(c,d){this.inputs.set(c,a[d])},this)}}}if(this.options.time){this.calWidth=460}this.previous(a,this.options);this.createStyle(this.options.extraCSS,"datePickerPlusStyle");this.addEvent("rowDateEvaluated",function(c,d){if(this.options.range&&this.selectedDates.start.diff(c,"minute")>0&&this.selectedDates.end.diff(c,"minute")<0){d.addClass("range")}}.bind(this));this.addEvent("selectedDateMatch",function(d,c){if(this.options.range){d.addClass("selected_"+c)}}.bind(this))},updateInput:function(){this.previous();if(this.options.time){this.updateView()}},updateView:function(){this.whens.each(function(a){var c=this.stamps[a];var b=this.getDates()[a];c.date.set("html",b?b.format("%b. %d, %Y"):"");if(c.hr){c.hr.set("value",b?b.format("%I"):"");c.min.set("value",b?b.format("%M"):"")}},this)},stamps:{},setupWideView:function(){var a={hr:"%I",min:"%M"};timeSetMap={hr:"setHours",min:"setMinutes"};var b=this.getDates();if(!this.options.range&&!this.options.time){return}this.stamps.table=new Element("table",{"class":"stamp"}).inject(this.container);this.stamps.tbody=new Element("tbody").inject(this.stamps.table);this.whens.each(function(c){this.stamps[c]={};var d=this.stamps[c];d.container=new Element("tr").addClass(c+"_stamp").inject(this.stamps.tbody);d.label=new Element("td").inject(d.container).addClass("label");if(this.whens.length==1){d.label.set("html","date:")}else{d.label.set("html",c=="start"?"from:":"to:")}d.date=new Element("td").inject(d.container);if(this.options.time){currentWhen=b[c]||new Date();d.time=new Element("tr").inject(this.stamps.tbody);new Element("td").inject(d.time);d.timeTD=new Element("td").inject(d.time);d.timeInputs=new Element("div").addClass("time clearfix").inject(d.timeTD);d.timeSub=new Element("div",{"class":"timeSub"}).inject(d.timeTD);["hr","min"].each(function(f,e){d[f]=new Element("input",{type:"text","class":f,name:f,events:{focus:function(){this.select()},change:function(){this.selectedDates[c][timeSetMap[f]](d[f].get("value"));this.selectedDates[c].setAMPM(d.ampm.get("value"));this.updateInput()}.bind(this)}}).inject(d.timeInputs);d[f].set("value",currentWhen.format(a[f]));if(e<1){d.timeInputs.adopt(new Element("span",{"class":"seperator"}).set("html",":"))}new Element("span",{"class":f}).set("html",f).inject(d.timeSub)},this);d.ampm=new Element("select").inject(d.timeInputs);["AM","PM"].each(function(e){var f=new Element("option",{value:e,text:e.toLowerCase()}).set("html",e).inject(d.ampm);if(e==currentWhen.format("%p")){f.selected=true}});d.ampm.addEvent("change",function(){var f=this.getDates()[c];var e=d.ampm.get("value");if(e!=f.format("%p")){f.setAMPM(e);this.updateInput()}}.bind(this))}},this);new Element("tr").inject(this.stamps.tbody).adopt(new Element("td",{colspan:2}).adopt(new Element("a",{"class":"closeSticky button",events:{click:function(){this.hide()}.bind(this)}}).set("html","Ok")))},show:function(){this.previous();if(this.options.time){if(!this.stamps.table){this.setupWideView()}this.updateView()}},startSet:false,onPick:function(){if((this.options.range&&this.selectedDates.start&&this.selectedDates.end)||!this.options.range){this.previous()}},setSelectedDates:function(b,a){if(this.options.range){if(this.selectedDates.start&&this.startSet){if(this.selectedDates.start.getTime()>a.getTime()){this.selectedDates.end=new Date(this.selectedDates.start);this.selectedDates.start=a}else{this.selectedDates.end=a}this.startSet=false}else{this.selectedDates.start=a;if(this.selectedDates.end&&this.selectedDates.start.getTime()>this.selectedDates.end.getTime()){this.selectedDates.end=new Date(a)}this.startSet=true}}else{this.previous(b,a)}if(this.options.time){this.whens.each(function(c){var d=this.stamps[c].hr.get("value").toInt();if(this.stamps[c].ampm.get("value")=="PM"&&d<12){d+=12}this.selectedDates[c].setHours(d);this.selectedDates[c].setMinutes(this.stamps[c]["min"].get("value")||"0");this.selectedDates[c].setAMPM(this.stamps[c].ampm.get("value")||"AM")},this)}}});Form.Validator.Tips=new Class({Extends:Form.Validator.Inline,options:{pointyTipOptions:{point:"left",width:250}},showAdvice:function(b,c){var a=this.getAdvice(c);if(a&&!a.visible){a.show();a.position();a.pointy.positionPointer()}},hideAdvice:function(b,c){var a=this.getAdvice(c);if(a&&a.visible){a.show()}},getAdvice:function(a,b){var c=Array.link(arguments,{field:Element.type});return c.field.retrieve("PointyTip")},advices:[],makeAdvice:function(e,f,d,h){if(!d&&!h){return}var c=f.retrieve("PointyTip");if(!c){var b=h?"warning-advice":"validation-advice";var g=new Element("ul",{styles:{margin:0,padding:0,listStyle:"none"}});var a=this.makeAdviceItem(e,f);if(a){g.adopt(a)}f.store("validationMsgs",g);c=new StickyWin.PointyTip(this.options.tipCaption,g,$merge(this.options.pointyTipOptions,{showNow:false,relativeTo:f,inject:{target:this.element}}));this.advices.push(c);c.msgs={};f.store("PointyTip",c);document.id(c).addClass(b).set("id","advice-"+e+"-"+this.getFieldId(f))}f.store("advice-"+e,c);this.appendAdvice(e,f,d,h);c.pointy.positionPointer();return c},validateField:function(f,e){var b=this.getAdvice(f);var d=this.advices.some(function(h){return h.visible});if(d&&this.options.serial){if(b&&b.visible){var g=this.parent(f,e);if(!f.hasClass("validation-failed")){b.hide()}}return g}var c=f.retrieve("validationMsgs");if(c){c.getChildren().hide()}if((f.hasClass("validation-failed")||f.hasClass("warning"))&&b){b.show()}if(this.options.serial){var a=this.element.getElements(".validation-failed, .warning");if(a.length){a.each(function(k,j){var h=this.getAdvice(k);if(h){h.hide()}},this)}}return this.parent(f,e)},makeAdviceItem:function(c,e,b,f){if(!b&&!f){return}var a=this.getAdvice(e);var d=this.makeAdviceMsg(e,b,f);if(a&&a.msgs[c]){return a.msgs[c].set("html",d)}return new Element("li",{html:d,style:{display:"none"}})},makeAdviceMsg:function(c,a,d){var b=(d)?this.warningPrefix:this.errorPrefix;b+=(this.options.useTitles)?c.title||a:a;return b},appendAdvice:function(d,e,c,f){var b=this.getAdvice(e);if(b.msgs[d]){return b.msgs[d].set("html",this.makeAdviceMsg(e,c,f)).show()}var a=this.makeAdviceItem(d,e,c,f);if(!a){return}a.inject(e.retrieve("validationMsgs")).show();b.msgs[d]=a},insertAdvice:function(a,d){var b=d.get("validatorProps");if(!b.msgPos||!document.id(b.msgPos)){switch(d.type.toLowerCase()){case"radio":var c=d.getParent().adopt(a);break;default:document.id(a).inject(document.id(d),"after")}}else{document.id(b.msgPos).grab(a)}a.position()}});if(window.FormValidator){FormValidator.Tips=Form.Validator.Tips}(function(){var a=function(c){return{Extends:c,options:{stickyWinToUse:StickyWin.Modal,stickyWinOptions:{},caption:"Update Info",useUi:true,stickyWinUiOptions:{width:500},useSpinner:true},initialize:function(e,f,d){this.setOptions(d);this.update=document.id(f);this.makeStickyWin(e);this.swin.addEvent("close",function(){if(this.request&&this.request.spinner){this.request.spinner.hide()}});this.addEvent("success",this.hide.bind(this))},makeStickyWin:function(d){if(document.id(d)){d=document.id(d)}this.swin=new this.options.stickyWinToUse({content:this.options.useUi?StickyWin.ui(this.options.caption,d,this.options.stickyWinUiOptions):d,showNow:false});this.element=this.swin.win.getElement("form");this.initAfterUpdate()},hide:function(){this.swin.hide();return this},prompt:function(){this.swin.show();return this},initAfterUpdate:function(){this.setOptions({requestOptions:{useSpinner:this.options.useWaiter||this.options.useSpinner,spinnerTarget:document.id(this),spinnerOptions:{layer:{styles:{zIndex:10001}}}}});this.makeRequest();this.attach();document.id(this).store("form.request",this)}}};Form.Request.Prompt=new Class(a(Form.Request));if(Form.Request.Append){Form.Request.Append.Prompt=new Class(a(Form.Request.Append))}var b=function(c){return{Extends:c,options:{stickyWinToUse:StickyWin.Modal.Ajax},makeStickyWin:function(d){if(this.swin){return this.swin}this.swin=new this.options.stickyWinToUse($merge({showNow:false,requestOptions:this.options.requestOptions,onHide:function(){this.win.empty()},url:d,handleResponse:function(e){var f="";this.swin.Request.response.text.stripScripts(function(h){f+=h});var g=this.options.useUi?StickyWin.ui(this.options.caption,e,this.options.stickyWinUiOptions):e;this.swin.setContent(g);if(this.options.requestOptions.evalScripts){$exec(f)}this.element=this.swin.win.getElement("form");this.initAfterUpdate();this.swin.show()}.bind(this)},this.options.stickyWinOptions));return this.swin},prompt:function(){this.makeStickyWin().update();return this}}};Form.Request.AjaxPrompt=new Class(b(Form.Request.Prompt));if(Form.Request.Append){Form.Request.Append.AjaxPrompt=new Class(b(Form.Request.Append.Prompt))}})();var InputFocus=new Class({Implements:[Options,Class.Occlude,Class.ToElement],Binds:["focus","blur"],options:{focusedClass:"focused",hideOutline:false},initialize:function(a,b){this.element=document.id(a);if(this.occlude("focuser")){return this.occluded}this.setOptions(b);this.element.addEvents({focus:this.focus,blur:this.blur})},focus:function(){if(this.options.hideOutline){(function(){if(Browser.Engine.trident){document.id(this).set("hideFocus",true)}else{document.id(this).setStyle("outline","0")}}).delay(500,this)}document.id(this).addClass(this.options.focusedClass)},blur:function(){document.id(this).removeClass(this.options.focusedClass)}});var Picklet=new Class({Implements:[Options,Events],inputElements:{},initialize:function(b,a){this.setOptions(a);this.className=b;this.getQuery=this.options.getQuery}});var ProductPicker=new Class({Implements:[Options,Events,StyleWriter],options:{title:"Product picker",showOnFocus:true,additionalShowLinks:[],stickyWinToUse:StickyWin,stickyWinOptions:{fadeDuration:200,draggable:true,width:450},moveIntoView:true,css:"div.productPickerProductDiv div.results { overflow: 'auto'; width: 100%; margin-top: 4px }div.productPickerProductDiv select { margin: 4px 0px 4px 0px}div.pickerPreview div.sliderContent img {border: 1px solid #000}div.pickerPreview div.sliderContent a {color: #0d63a0}div.productPickerProductDiv * {color: #000}.tool-tip { color: #fff; width: 172px; z-index: 13000; }.tool-title { font: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 11px; margin: 0; padding: 8px 8px 4px; background: url(%tipsArt%/bubble.png) top left !important; background: url(%tipsArt%/bubble.gif) top left; }.tool-text {font-size: 11px; margin: 0px; padding: 4px 8px 8px; background: url(%tipsArt%/bubble.png) bottom right !important; background: url(%tipsArt%/bubble.gif) bottom right; }"},initialize:function(b,a,c){this.setOptions(c);this.writeCss();this.input=document.id(b);if(!this.input){return}this.picklets=a;this.setUpObservers()},writeCss:function(){var b=this.options.baseHref||Clientcide.assetLocation+"/Picker";var a=b.replace("Picker","tips");this.createStyle(this.options.css.replace("%tipsArt%",a,"g"),"pickerStyles")},getPickletList:function(){if(this.picklets.length>1){var a=new Element("select").setStyle("width",399);this.picklets.each(function(d,b){var c=new Element("option").set("value",b);c.text=d.options.descriptiveName;a.adopt(c)},this);a.addEvent("change",function(){this.showForm(this.picklets[a.getSelected()[0].get("value")]);this.focusInput(true)}.bind(this));return a}else{return false}},buildPicker:function(c){var b=new Element("div");this.formBody=new Element("div");this.pickletList=this.getPickletList();if(this.pickletList){b.adopt(this.pickletList)}b.adopt(this.formBody);var a=StickyWin.ui(this.options.title,b,{width:this.options.stickyWinOptions.width,closeTxt:"close"}).addClass("productPickerProductDiv");this.showForm();return a},showForm:function(a){this.form=this.makeSearchForm(a||this.picklets[0]);this.formBody.empty().adopt(this.form);(a||this.picklets[0]).fireEvent("onShow");this.results=new Element("div").addClass("results");this.formBody.adopt(this.results);this.sliderFx=null;this.fireEvent("onShow")},makeSlider:function(){var a=(Browser.Engine.trident)?"gif":"png";this.slider=new Element("div",{styles:{background:"url("+this.options.baseHref+"/slider."+a+") top right no-repeat",display:"none",height:250,left:this.options.stickyWinOptions.width-11,position:"absolute",top:25,width:0,overflow:"hidden"}}).addClass("pickerPreview").inject(this.swin.win).addEvents({mouseover:function(){this.previewHover=true}.bind(this),mouseout:function(){this.previewHover=false;(function(){if(!this.previewHover){this.hidePreview()}}).delay(400,this)}.bind(this)});this.sliderContent=new Element("div",{styles:{width:130,height:200,padding:10,margin:"10px 10px 0px 0px",overflow:"auto",cssFloat:"right"}}).inject(this.slider).addClass("sliderContent")},makeSearchForm:function(d){this.currentPicklet=d;var b=new Element("table",{styles:{width:"100%",cellpadding:"0",cellspacing:"0"}});var a=new Element("tbody").inject(b);var c=new Element("form").addEvent("submit",function(f){this.getResults(f.target,d)}.bind(this)).adopt(b).set("action","javascript:void(0);");$each(d.options.inputs,function(g,f){var e=this.getSearchInputTr(g,f);a.adopt(e.holder);d.inputElements[f]=e.input},this);return c},getSearchInputTr:function(h,c){try{var f=($type(h.style))?h.style:{};var b=(Browser.Engine.trident)?new Element("<"+h.tagName+' name="'+c+'" />'):new Element(h.tagName,{name:c});b.setStyles(f);if(h.type){b.set("type",h.type)}if(h.tip&&Tips){b.set("title",h.tip);new Tips([b],{onShow:function(e){this.shown=true;(function(){if(!this.shown){return}document.id(e).setStyles({display:"block",opacity:0});new Fx.Tween(e,{property:"opacity",duration:300}).start(0,0.9)}).delay(500,this)},onHide:function(e){e.setStyle("visibility","hidden");this.shown=false}})}if(h.tagName=="select"){h.value.each(function(k,e){var j=new Element("option",{value:k});j.text=(h.optionNames&&h.optionNames[e])?$pick(h.optionNames[e],k):k;b.adopt(j)})}else{b.set("value",$pick(h.value,""))}var d=new Element("tr");var i=0;if(h.instructions){d.adopt(new Element("td").set("html",h.instructions))}else{i=2}var a=new Element("td").adopt(b);if(i){a.set("colspan",i)}d.adopt(a);return{holder:d,input:b}}catch(g){dbug.log(g);return false}},getResults:function(a,c){if(a.get("tag")!="form"){a=$$("form").filter(function(d){return d.hasChild(a)})[0]}if(!a){dbug.log("error computing form");return null}var b=c.getQuery(unescape(a.toQueryString()).parseQueryString());b.addEvent("onComplete",this.showResults.bind(this));b.send();return this},showResults:function(b){var a=false;if(this.results.innerHTML==""){a=true;this.results.setStyles({height:0,border:"1px solid #666",padding:0,overflow:"auto",opacity:0})}else{this.results.empty()}this.items=this.currentPicklet.options.resultsList(b);if(this.items&&this.items.length>0){this.items.each(function(e,d){var c=this.currentPicklet.options.listItemName(e);var f=this.currentPicklet.options.listItemValue(e);this.results.adopt(this.makeProductListEntry(c,f,d))},this)}else{this.results.set("html","Sorry, there don't seem to be any items for that search")}this.results.morph({height:200,opacity:1});this.listStyles();this.getOnScreen.delay(500,this)},getOnScreen:function(){if(document.compatMode=="BackCompat"){return}var a=this.swin.win.getCoordinates();if(a.top<window.getScroll().y){this.swin.win.tween("top",window.getScroll().y+50);return}if(a.top+a.height>window.getScroll().y+window.getSize().y&&window.getSize().y>a.height){this.swin.win.tween("top",window.getScroll().y+window.getSize().y-a.height-100);return}try{this.swin.shim.show.delay(500,this.swin.shim)}catch(b){}return},listStyles:function(){var c={cursor:"pointer",borderBottom:"1px solid #ddd",padding:"2px 8px 2px 8px",backgroundColor:"#fff",color:"#000",fontWeight:"normal"};var b={backgroundColor:"#fcfbd1",color:"#d56a00"};var a=$extend(c,{color:"#D00000",fontWeight:"bold",backgroundColor:"#eee"});this.results.getElements("div.productPickerProductDiv").each(function(e){var d=(this.input.value.toInt()==e.get("val").toInt())?a:c;e.setStyles(d);if(!Browser.Engine.trident){e.addEvent("mouseover",function(){e.setStyles(b)}.bind(this));e.addEvent("mouseout",function(){e.setStyles(d)})}},this)},makeProductListEntry:function(c,d,b){var a=new Element("div").addClass("productPickerProductDiv").adopt(new Element("div").set("html",c)).set("val",d);a.addEvent("mouseenter",function(g){this.preview=true;this.sliderContent.empty();var f=this.getPreview(b);if($type(f)=="string"){this.sliderContent.set("html",f)}else{if(document.id(f)){this.sliderContent.adopt(f)}}this.showPreview.delay(200,this)}.bind(this));a.addEvent("mouseleave",function(f){this.preview=false;(function(){if(!this.previewHover){this.hidePreview()}}).delay(400,this)}.bind(this));a.addEvent("click",function(){this.currentPicklet.options.updateInput(this.input,this.items[b]);this.fireEvent("onPick",[this.input,this.items[b],this]);this.hide();this.listStyles.delay(200,this)}.bind(this));return a},makeStickyWin:function(){if(document.compatMode=="BackCompat"){this.options.stickyWinOptions.relativeTo=this.input}this.swin=new this.options.stickyWinToUse($merge(this.options.stickyWinOptions,{draggable:true,content:this.buildPicker()}))},focusInput:function(a){if((!this.focused||$pick(a,false))&&this.form.getElement("input")){this.focused=true;try{this.form.getElement("input").focus()}catch(b){}}},show:function(){if(!this.swin){this.makeStickyWin()}if(!this.slider){this.makeSlider()}if(!this.swin.visible){this.swin.show()}this.focusInput();return this},hide:function(){$$(".tool-tip").hide();this.swin.hide();this.focused=false;return this},setUpObservers:function(){try{if(this.options.showOnFocus){this.input.addEvent("focus",this.show.bind(this))}if(this.options.additionalShowLinks.length>0){this.options.additionalShowLinks.each(function(b){document.id(b).addEvent("click",this.show.bind(this))},this)}}catch(a){dbug.log(a)}},showPreview:function(a){width=this.currentPicklet.options.previewWidth||150;this.sliderContent.setStyle("width",(width-30));if(!this.sliderFx){this.sliderFx=new Fx.Elements([this.slider,this.swin.win])}this.sliderFx.clearChain();this.sliderFx.setOptions({duration:1000,transition:"elastic:out"});if(this.preview&&this.slider.getStyle("width").toInt()<width-5){this.slider.show("block");this.sliderFx.start({"0":{width:width},"1":{width:width+this.options.stickyWinUiOptions.width}})}},hidePreview:function(){if(!this.preview){this.sliderFx.setOptions({duration:250,transition:"back:in"});this.sliderFx.clearChain();this.sliderFx.start({"0":{width:[this.slider.getStyle("width").toInt(),0]},"1":{width:[this.swin.win.getStyle("width").toInt(),this.options.stickyWinUiOptions]}}).chain(function(){this.slider.hide()}.bind(this))}},getPreview:function(a){return this.currentPicklet.options.previewHtml(this.items[a])}});$extend(ProductPicker,{picklets:[],add:function(a){if(!a.className){dbug.log("error: cannot add Picklet %o; missing className: %s",a,a.className);return}this.picklets[a.className]=a},addAllThese:function(a){a.each(function(b){this.add(b)},this)},getPicklet:function(a){return ProductPicker.picklets[a]||false}});var FormPickers=new Class({Implements:[Options],options:{inputs:"input",additionalShowLinkClass:"openPicker",pickletOptions:{}},initialize:function(b,a){this.setOptions(a);this.form=document.id(b);this.inputs=this.form.getElements(this.options.inputs);this.setUpInputs()},setUpInputs:function(a){a=$pick(a,this.inputs);a.each(this.addPickers.bind(this))},addPickers:function(b){var a=[];b.className.split(" ").each(function(c){if(ProductPicker.getPicklet(c)){a.push(ProductPicker.getPicklet(c))}},this);if(b.getNext()&&b.getNext().hasClass(this.options.additionalShowLinkClass)){this.options.pickletOptions.additionalShowLinks=[b.getNext()]}if(a.length>0){new ProductPicker(b,a,this.options.pickletOptions)}}});var SimpleEditor=new Class({Implements:[Class.ToElement,Class.Occlude],property:"SimpleEditor",initialize:function(b,c,a){this.element=document.id(b);if(this.occlude()){return this.occluded}this.commands=new Hash($extend(SimpleEditor.commands,a||{}));this.buttons=$$(c);this.buttons.each(function(d){d.addEvent("click",function(){this.exec(d.get("rel"))}.bind(this))}.bind(this));document.id(this).addEvent("keydown",function(f){if(f.control||f.meta){var d=this.shortCutToKey(f.key,f.shift);if(d){f.stop();this.exec(d)}}}.bind(this))},shortCutToKey:function(b,c){var a=false;this.commands.each(function(f,d){var e=(f.shortcut?f.shortcut.toLowerCase():f.shortcut);if(f.shortcut==b||(c&&e==b)){a=d}});return a},addCommand:function(b,c,a){this.commands.set(b,{command:c,shortcut:a})},addCommands:function(a){this.commands.extend(a)},exec:function(a){var b;if(document.id(this).scrollTop||document.id(this).scrollLeft){b={scrollTop:document.id(this).getScroll().y,scrollLeft:document.id(this).getScroll().x}}if(this.commands.has(a)){this.commands.get(a).command(document.id(this))}if(b){document.id(this).set("scrollTop",b.getScroll().y);document.id(this).set("scrollLeft",b.getScroll().x)}}});$extend(SimpleEditor,{commands:{},addCommand:function(b,c,a){SimpleEditor.commands[b]={command:c,shortcut:a}},addCommands:function(a){$extend(SimpleEditor.commands,a)}});SimpleEditor.addCommands({bold:{shortcut:"b",command:function(a){a.insertAroundCursor({before:"<strong>",after:"</strong>"})}},underline:{shortcut:"u",command:function(a){a.insertAroundCursor({before:'<span style="text-decoration:underline">',after:"</span>"})}},anchor:{shortcut:"l",command:function(b){if(window.TagMaker){if(!this.linkBuilder){this.linkBuilder=new TagMaker.anchor()}this.linkBuilder.prompt(b)}else{var a=window.prompt(SimpleEditor.getMsg("linkURL"));var c={before:'<a href="'+a+'">',after:"</a>"};if(!b.getSelectedText()){c.defaultMiddle=window.prompt(SimpleEditor.getMsg("linkText"))}b.insertAroundCursor(c)}}},hr:{shortcut:"-",command:function(a){a.insertAtCursor("\n<hr/>\n")}},img:{shortcut:"g",command:function(b){if(window.TagMaker){if(!this.anchorBuilder){this.anchorBuilder=new TagMaker.image()}this.anchorBuilder.prompt(b)}else{var a=window.prompt(SimpleEditor.getMsg("imgURL"));var c=window.prompt(SimpleEditor.getMsg("imgAlt"));b.insertAtCursor('<img src="'+a+'" alt="'+c.replace(/"/g,"")+'" />')}}},stripTags:{shortcut:"\\",command:function(a){a.insertAtCursor(a.getSelectedText().stripTags())}},sup:{shortcut:false,command:function(a){a.insertAroundCursor({before:"<sup>",after:"</sup>"})}},sub:{shortcut:false,command:function(a){a.insertAroundCursor({before:"<sub>",after:"</sub>"})}},blockquote:{shortcut:false,command:function(a){a.insertAroundCursor({before:"<blockquote>",after:"</blockquote>"})}},paragraph:{shortcut:"enter",command:function(a){a.insertAroundCursor({before:"\n<p>\n",after:"\n</p>\n"})}},strike:{shortcut:"k",command:function(a){a.insertAroundCursor({before:"<strike>",after:"</strike>"})}},italics:{shortcut:"i",command:function(a){a.insertAroundCursor({before:"<em>",after:"</em>"})}},bullets:{shortcut:"8",command:function(a){a.insertAroundCursor({before:"<ul>\n	<li>",after:"</li>\n</ul>"})}},numberList:{shortcut:"=",command:function(a){a.insertAroundCursor({before:"<ol>\n	<li>",after:"</li>\n</ol>"})}},clean:{shortcut:false,command:function(a){a.tidy()}},preview:{shortcut:false,command:function(a){try{if(!this.container){this.container=new Element("div",{styles:{border:"1px solid black",padding:8,height:300,overflow:"auto"}});this.preview=new StickyWin.Modal({content:StickyWin.ui("preview",this.container,{width:600,buttons:[{text:"close",onClick:function(){this.container.empty()}.bind(this)}]}),showNow:false})}this.container.set("html",a.get("value"));this.preview.show()}catch(b){dbug.log("you need StickyWin.Modal and StickyWin.ui")}}}});SimpleEditor.getMsg=function(a,b){return MooTools.lang.get("SimpleEditor",a,args)};var TagMaker=new Class({Implements:[Options,Events,StyleWriter],options:{name:"Tag Builder",output:"",picklets:{},help:{},example:{},"class":{},selectLists:{},width:400,maxHeight:500,clearOnPrompt:true,css:"table.trinket {	width: 98%;	margin: 0px auto;	font-size: 10px; }table.trinket td {	vertical-align: top;	padding: 4px;}table.trinket td a.button {	position: relative;	top: -2px;}table.trinket td.example {	font-size: 9px;	color: #666;	text-align: right;	border-bottom: 1px solid #ddd;padding-bottom: 6px;}table.trinket div.validation-advice {	background-color: #a36565;	font-weight: bold;	color: #fff;	padding: 4px;margin-top: 3px;}table.trinket input.text {width: 100%;}.tagMakerTipElement { 	cursor: help; }.tagMaker .tip {	color: #fff;	width: 172px;	z-index: 13000; }.tagMaker .tip-title {	font-weight: bold;	font-size: 11px;	margin: 0;	padding: 8px 8px 4px;background: url(%baseHref%/bubble.png) top left;}.tagMaker .tip-text { font-size: 11px; 	padding: 4px 8px 8px; background: url(%baseHref%/bubble.png) bottom right; }.tagMaker { z-index:10001 }"},initialize:function(a){this.setOptions(a);this.buttons=[{text:"Paste",onClick:function(){if(this.validator.validate()){this.insert()}}.bind(this),properties:{"class":"tip",title:"Paste::Insert the html into the field you are editing"}},{text:"Close",properties:{"class":"closeSticky tip",title:"Close::Close this popup"}}];this.createStyle(this.options.css.replace("%baseHref%",this.options.baseHref||Clientcide.assetLocation+"/tips","g"),"defaultTagBuilderStyle")},prompt:function(d){this.target=document.id(d);var b=this.getContent();if(this.options.clearOnPrompt){this.clear()}if(b){var a=(document.compatMode=="BackCompat"&&this.target)?this.target:document.body;if(!this.win){this.win=new StickyWin({content:b,draggable:true,relativeTo:a,onClose:function(){$$(".tagMaker-tip").hide()}})}if(!this.win.visible){this.win.show()}}var c=this.getInnerTextInput();this.range=d.getSelectedRange();if(c){c.set("value",d.getTextInRange(this.range.start,this.range.end)||"")}return this.fireEvent("onPrompt")},clear:function(){this.body.getElements("input").each(function(a){a.erase("value")})},getKeys:function(a){return a.split("%").filter(function(c,b){return b%2})},getInnerTextInput:function(){return this.body.getElement("input[name=Inner-Text]")},getContent:function(){var a=this.options;if(!this.form){this.form=new Element("form");var b=new HtmlTable({properties:{"class":"trinket"}});this.getKeys(a.output).each(function(g){var e;if(this.options.selectLists[g]){e=new Element("select").setProperties({name:g.replace(" ","-","g")}).addEvent("change",this.createOutput.bind(this));this.options.selectLists[g].each(function(h){var i=new Element("option").inject(e);if(h.selected){i.set("selected",true)}i.set("value",h.value);i.set("text",h.key)},this);b.push([g,e])}else{e=new Element("input",{type:"text",name:g.replace(/ /g,"-"),title:g+"::"+a.help[g],"class":"text tip "+((a["class"])?a["class"][g]||"":""),events:{keyup:this.createOutput.bind(this),focus:function(){this.select()},change:this.createOutput.bind(this)}});if(a.picklets[g]){var d=new Element("a").addClass("button").set("html","choose");var f=new Element("div").adopt(e.setStyle("width",160)).adopt(d);var c=($type(a.picklets[g])=="array")?a.picklets[g]:[a.picklets[g]];new ProductPicker(e,c,{showOnFocus:false,additionalShowLinks:[d],onPick:function(i,k,j){try{var h=this.getInnerTextInput();if(h&&!h.get("value")){try{h.set("value",j.currentPicklet.options.listItemName(k))}catch(l){dbug.log("set value error: ",l)}}var m=i.value;if(g=="Full Path"&&m.test(/^http:/)){i.set("value",m.substring(m.indexOf("/",7),m.length))}this.createOutput()}catch(l){dbug.log(l)}}.bind(this)});b.push([g,f])}else{b.push([g,e])}}if(this.options.example[g]){b.push([{content:"eg. "+this.options.example[g],properties:{colspan:2,"class":"example"}}])}},this);this.resultInput=new Element("input",{type:"text",title:"HTML::This is the resulting tag html.","class":"text result tip"}).addEvent("focus",function(){this.select()});b.push(["HTML",this.resultInput]).tr;this.form.adopt($(b));this.body=new Element("div",{styles:{overflow:"auto",maxHeight:this.options.maxHeight}}).adopt(this.form);this.validator=new Form.Validator.Inline(this.form);this.validator.insertAdvice=function(c,e){var d=document.id(e.parentNode);if(d){d.adopt(c)}}}if(!this.content){this.content=StickyWin.ui(this.options.name,this.body,{buttons:this.buttons,width:this.options.width.toInt()});new Tips(this.content.getElements(".tip"),{showDelay:700,maxTitleChars:50,maxOpacity:0.9,className:"tagMaker"})}return this.content},createOutput:function(){var a=this.form.getElements("input, select");var b=this.options.output;a.each(function(c){if(!c.hasClass("result")){b=b.replace(new RegExp("%"+c.get("name").replace("-"," ","g").toLowerCase()+"%","ig"),(c.get("tag")=="select"?c.getSelected()[0]:c).get("value"));b=b.replace(/\s\w+\=""/g,"")}});return this.resultInput.value=b},insert:function(){if(!this.target){StickyWin.alert("Cannot Paste","This tag builder was not launched with a target input specified; you'll have to copy the tag yourself. Sorry!");return}var b=(this.target)?this.target.value:this.target;var a=this.body.getElement("input.result");var c;if(this.target.scrollTop||this.target.scrollLeft){c={scrollTop:this.target.getScroll().y,scrollLeft:this.target.getScroll().x}}this.target.value=b.substring(0,this.range.start)+a.value+b.substring((this.range.end-this.range.start)+this.range.start,b.length);if(c){this.target.scrollTop=c.getScroll().y;this.target.scrollLeft=c.getScroll().x}this.target.selectRange(this.range.start,a.value.length+this.range.start);this.fireEvent("onChoose");$$(".tagMaker-tip").hide();this.win.hide();return}});TagMaker.image=new Class({Extends:TagMaker,options:{name:"Image Builder",output:'<img src="%Full Url%" width="%Width%" height="%Height%" alt="%Alt Text%" style="%Alignment%"/>',help:{"Full Url":"Enter the external URL (http://...) to the image",Width:"Enter the width in pixels.",Height:"Enter the height in pixels.","Alt Text":"Enter the alternate text for the image.",Alignment:"Choose how to float the image."},example:{"Full Url":"http://i.i.com.com/cnwk.1d/i/hdft/redball.gif"},"class":{"Full Url":"validate-url required",Width:"validate-digits",Height:"validate-digits","Alt Text":""},selectLists:{Alignment:[{key:"left",value:"float: left"},{key:"right",value:"float: right"},{key:"none",value:"float: none",selected:true},{key:"center",value:"margin-left: auto; margin-right: auto;"}]}}});TagMaker.anchor=new Class({Extends:TagMaker,options:{name:"Anchor Builder",output:'<a href="%Full Url%">%Inner Text%</a>',help:{"Full Url":"Enter the external URL (http://...)","Inner Text":"Enter the text for the link body"},example:{"Full Url":"http://www.microsoft.com","Inner Text":"Microsoft"},"class":{"Full Url":"validate-url"}}});var Autocompleter={};var OverlayFix=IframeShim;Autocompleter.Base=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:"inherit",maxChoices:10,className:"autocompleter-choices",zIndex:42,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:", ",autoTrim:true,allowDupes:false,cache:true,relative:false},initialize:function(b,a){this.element=document.id(b);this.setOptions(a);this.options.separatorSplit=new RegExp("s*["+this.options.separator.trim()+"]s*/");this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({delay:this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter){this.filter=this.options.filter.bind(this)}var c=this.options.selectMode;this.typeAhead=(c=="type-ahead");this.selectMode=(c===true)?"selection":c;this.cached=[]},build:function(){if(document.id(this.options.customChoices)){this.choices=this.options.customChoices}else{this.choices=new Element("ul",{"class":this.options.className,styles:{zIndex:this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative||this.element.getOffsetParent()!=document.body){this.choices.inject(this.element,"after");this.relative=this.element.getOffsetParent()}this.fix=new OverlayFix(this.choices)}if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator}this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({property:"opacity",link:"cancel",duration:200},this.options.fxOptions)).addEvent("onStart",Chain.prototype.clearChain).set(0);this.element.setProperty("autocomplete","off").addEvent((Browser.Engine.trident||Browser.Engine.webkit)?"keydown":"keypress",this.onCommand.bind(this)).addEvent("click",this.onCommand.bind(this,[false])).addEvent("focus",this.toggleFocus.create({bind:this,arguments:true,delay:100}));document.addEvent("click",function(a){if(a.target!=this.choices){this.toggleFocus(false)}}.bind(this))},destroy:function(){if(this.fix){this.fix.dispose()}this.choices=this.selected=this.choices.destroy()},toggleFocus:function(a){this.focussed=a;if(!a){this.hideChoices(true)}this.fireEvent((a)?"onFocus":"onBlur",[this.element])},onCommand:function(b){if(!b&&this.focussed){return this.prefetch()}if(b&&b.key&&!b.shift){switch(b.key){case"enter":if(this.element.value!=this.opted){return true}if(this.selected&&this.visible){this.choiceSelect(this.selected);return !!(this.options.autoSubmit)}break;case"up":case"down":if(!this.prefetch()&&this.queryValue!==null){var a=(b.key=="up");this.choiceOver((this.selected||this.choices)[(this.selected)?((a)?"getPrevious":"getNext"):((a)?"getLast":"getFirst")](this.options.choicesMatch),true)}return false;case"esc":case"tab":this.hideChoices(true);break}}return true},setSelection:function(g){var h=this.selected.inputValue,i=h;var b=this.queryValue.length,d=h.length;if(h.substr(0,b).toLowerCase()!=this.queryValue.toLowerCase()){b=0}if(this.options.multiple){var f=this.options.separatorSplit;i=this.element.value;b+=this.queryIndex;d+=this.queryIndex;var c=i.substr(this.queryIndex).split(f,1)[0];i=i.substr(0,this.queryIndex)+h+i.substr(this.queryIndex+c.length);if(g){var a=/[^\s,]+/;var e=i.split(this.options.separatorSplit).filter(a.test,a);if(!this.options.allowDupes){e=[].combine(e)}var j=this.options.separator;i=e.join(j)+j;d=i.length}}this.observer.setValue(i);this.opted=i;if(g||this.selectMode=="pick"){b=d}this.element.selectRange(b,d);this.fireEvent("onSelection",[this.element,this.selected,i,h])},showChoices:function(){var c=this.options.choicesMatch,g=this.choices.getFirst(c);this.selected=this.selectedValue=null;if(this.fix){var h=this.element.getCoordinates(this.relative),d=this.options.width||"auto";this.choices.setStyles({left:h.left,top:h.bottom,width:(d===true||d=="inherit")?h.width:d})}if(!g){return}if(!this.visible){this.visible=true;this.choices.setStyle("display","");if(this.fx){this.fx.start(1)}this.fireEvent("onShow",[this.element,this.choices])}if(this.options.selectFirst||this.typeAhead||g.inputValue==this.queryValue){this.choiceOver(g,this.typeAhead)}var b=this.choices.getChildren(c),a=this.options.maxChoices;var f={overflowY:"hidden",height:""};this.overflown=false;if(b.length>a){var e=b[a-1];f.overflowY="scroll";f.height=e.getCoordinates(this.choices).bottom;this.overflown=true}this.choices.setStyles(f);this.fix.show()},hideChoices:function(a){if(a){var c=this.element.value;if(this.options.forceSelect){c=this.opted}if(this.options.autoTrim){c=c.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator)}this.observer.setValue(c)}if(!this.visible){return}this.visible=false;this.observer.clear();var b=function(){this.choices.setStyle("display","none");this.fix.hide()}.bind(this);if(this.fx){this.fx.start(0).chain(b)}else{b()}this.fireEvent("onHide",[this.element,this.choices])},prefetch:function(){var f=this.element.value,e=f;if(this.options.multiple){var c=this.options.separatorSplit;var a=f.split(c);var b=this.element.getCaretPosition();var g=f.substr(0,b).split(c);var d=g.length-1;b-=g[d].length;e=a[d]}if(e.length<this.options.minLength){this.hideChoices()}else{if(e===this.queryValue||(this.visible&&e==this.selectedValue)){if(this.visible){return false}this.showChoices()}else{this.queryValue=e;this.queryIndex=b;if(!this.fetchCached()){this.query()}}}return true},fetchCached:function(){return false;if(!this.options.cache||!this.cached||!this.cached.length||this.cached.length>=this.options.maxChoices||this.queryValue){return false}this.update(this.filter(this.cached));return true},update:function(a){this.choices.empty();this.cached=a;if(!a||!a.length){this.hideChoices()}else{if(this.options.maxChoices<a.length&&!this.options.overflow){a.length=this.options.maxChoices}a.each(this.options.injectChoice||function(c){var b=new Element("li",{html:this.markQueryValue(c)});b.inputValue=c;this.addChoiceEvents(b).inject(this.choices)},this);this.showChoices()}},choiceOver:function(c,d){if(!c||c==this.selected){return}if(this.selected){this.selected.removeClass("autocompleter-selected")}this.selected=c.addClass("autocompleter-selected");this.fireEvent("onSelect",[this.element,this.selected,d]);if(!d){return}this.selectedValue=this.selected.inputValue;if(this.overflown){var f=this.selected.getCoordinates(this.choices),e=this.options.overflowMargin,g=this.choices.scrollTop,a=this.choices.offsetHeight,b=g+a;if(f.top-e<g&&g){this.choices.scrollTop=Math.max(f.top-e,0)}else{if(f.bottom+e>b){this.choices.scrollTop=Math.min(f.bottom-a+e,b)}}}if(this.selectMode){this.setSelection()}},choiceSelect:function(a){if(a){this.choiceOver(a)}this.setSelection(true);this.queryValue=false;this.hideChoices()},filter:function(a){return(a||this.tokens).filter(function(b){return this.test(b)},new RegExp(((this.options.filterSubset)?"":"^")+this.queryValue.escapeRegExp(),(this.options.filterCase)?"":"i"))},markQueryValue:function(a){return(!this.options.markQuery||!this.queryValue)?a:a.replace(new RegExp("("+((this.options.filterSubset)?"":"^")+this.queryValue.escapeRegExp()+")",(this.options.filterCase)?"":"i"),'<span class="autocompleter-queried">$1</span>')},addChoiceEvents:function(a){return a.addEvents({mouseover:this.choiceOver.bind(this,[a]),click:this.choiceSelect.bind(this,[a])})}});Autocompleter.Local=new Class({Extends:Autocompleter.Base,options:{minLength:0,delay:200},initialize:function(b,c,a){this.parent(b,a);this.tokens=c},query:function(){this.update(this.filter())}});Autocompleter.Ajax={};Autocompleter.Ajax.Base=new Class({Extends:Autocompleter.Base,options:{postVar:"value",postData:{},ajaxOptions:{},onRequest:$empty,onComplete:$empty},initialize:function(c,b){this.parent(c,b);var a=document.id(this.options.indicator);if(a){this.addEvents({onRequest:a.show.bind(a),onComplete:a.hide.bind(a)},true)}},query:function(){var a=$unlink(this.options.postData);a[this.options.postVar]=this.queryValue;this.fireEvent("onRequest",[this.element,this.request,a,this.queryValue]);this.request.send({data:a})},queryResponse:function(){this.fireEvent("onComplete",[this.element,this.request,this.response])}});Autocompleter.Ajax.Json=new Class({Extends:Autocompleter.Ajax.Base,initialize:function(c,b,a){this.parent(c,a);this.request=new Request.JSON($merge({url:b,link:"cancel"},this.options.ajaxOptions)).addEvent("onComplete",this.queryResponse.bind(this))},queryResponse:function(a){this.parent();this.update(a)}});Autocompleter.Ajax.Xhtml=new Class({Extends:Autocompleter.Ajax.Base,initialize:function(c,b,a){this.parent(c,a);this.request=new Request.HTML($merge({url:b,link:"cancel",update:this.choices},this.options.ajaxOptions)).addEvent("onComplete",this.queryResponse.bind(this))},queryResponse:function(a,b){this.parent();if(!b||!b.length){this.hideChoices()}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(c){var d=c.innerHTML;c.inputValue=d;this.addChoiceEvents(c.set("html",this.markQueryValue(d)))},this);this.showChoices()}}});Autocompleter.JSONP=new Class({Extends:Autocompleter.Ajax.Json,options:{postVar:"query",jsonpOptions:{},minLength:1},initialize:function(c,b,a){this.url=b;this.setOptions(a);this.parent(c,a)},query:function(){var a=$unlink(this.options.jsonpOptions.data||{});a[this.options.postVar]=this.queryValue;this.jsonp=new Request.JSONP($merge({url:this.url,data:a},this.options.jsonpOptions));this.jsonp.addEvent("onComplete",this.queryResponse.bind(this));this.fireEvent("onRequest",[this.element,this.jsonp,a,this.queryValue]);this.jsonp.send()},queryResponse:function(a){this.parent();var b=(this.options.filter)?this.options.filter.run([a],this):a;this.update(b)}});Autocompleter.JsonP=Autocompleter.JSONP;var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(c,a,b){this.setOptions(b);this.addEvent("onFired",a);this.element=document.id(c)||$$(c);this.boundChange=this.changed.bind(this);this.resume()},changed:function(){var a=this.element.get("value");if($equals(this.value,a)){return}this.clear();this.value=a;this.timeout=this.onFired.delay(this.options.delay,this)},setValue:function(a){this.value=a;this.element.set("value",a);return this.clear()},onFired:function(){this.fireEvent("onFired",[this.value,this.element])},clear:function(){$clear(this.timeout||null);return this},pause:function(){$clear(this.timeout);$clear(this.timer);this.element.removeEvent("keyup",this.boundChange);return this},resume:function(){this.value=this.element.get("value");if(this.options.periodical){this.timer=this.changed.periodical(this.options.periodical,this)}else{this.element.addEvent("keyup",this.boundChange)}return this}});var $equals=function(b,a){return(b==a||JSON.encode(b)==JSON.encode(a))};(function(){Autocompleter.Base=Class.refactor(Autocompleter.Base,{initialize:function(b,a,c){this.previous(b,a,c);this.writeStyle()},writeStyle:function(){window.addEvent("domready",function(){if(document.id("AutocompleterCss")){return}new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:(this.options.baseHref||Clientcide.assetLocation+"/autocompleter")+"/Autocompleter.css",id:"AutocompleterCss"}).inject(document.head)}.bind(this))}})})();var Lightbox=new Class({Implements:[Options,Events],Binds:["click","keyboardListener","addHtmlElements"],options:{resizeDuration:400,initialWidth:250,initialHeight:250,zIndex:5000,animateCaption:true,showCounter:true,autoScanLinks:true,relString:"lightbox",useDefaultCss:true,overlayStyles:{"background-color":"#333",opacity:0.8}},initialize:function(){var a=Array.link(arguments,{options:Object.type,links:Array.type});this.setOptions(a.options);var b=a.links||this.options.anchors;if(this.options.autoScanLinks&&!b){b=$$("a[rel^="+this.options.relString+"]")}if(!$$(b).length){return}this.addAnchors(b);if(this.options.useDefaultCss){this.addCss()}window.addEvent("domready",this.addHtmlElements.bind(this))},anchors:[],addAnchors:function(a){$$(a).each(function(b){if(!b.retrieve("lightbox")){b.store("lightbox",this);this.attach(b)}}.bind(this))},attach:function(a){a.addEvent("click",this.click.pass(a,this));this.anchors.include(a)},addHtmlElements:function(){this.container=new Element("div",{"class":"lbContainer"}).inject(document.body);this.mask=new Mask(document.body,{onHide:this.close.bind(this),style:this.options.overlayStyles,hideOnClick:true});this.popup=new Element("div",{"class":"lbPopup"}).inject(this.container);this.center=new Element("div",{styles:{width:this.options.initialWidth,height:this.options.initialHeight,marginLeft:(-(this.options.initialWidth/2)),display:"none",zIndex:this.options.zIndex+1}}).inject(this.popup).addClass("lbCenter");this.image=new Element("div",{"class":"lbImage"}).inject(this.center);this.prevLink=new Element("a",{"class":"lbPrevLink",href:"javascript:void(0);",styles:{display:"none"}}).inject(this.image);this.nextLink=this.prevLink.clone().removeClass("lbPrevLink").addClass("lbNextLink").inject(this.image);this.prevLink.addEvent("click",this.previous.bind(this));this.nextLink.addEvent("click",this.next.bind(this));this.bottomContainer=new Element("div",{"class":"lbBottomContainer",styles:{display:"none",zIndex:this.options.zIndex+1}}).inject(this.popup);this.bottom=new Element("div",{"class":"lbBottom"}).inject(this.bottomContainer);new Element("a",{"class":"lbCloseLink",href:"javascript:void(0);"}).inject(this.bottom).addEvent("click",this.close.bind(this));this.caption=new Element("div",{"class":"lbCaption"}).inject(this.bottom);this.number=new Element("div",{"class":"lbNumber"}).inject(this.bottom);new Element("div",{styles:{clear:"both"}}).inject(this.bottom);var a=this.nextEffect.bind(this);this.fx={resize:new Fx.Morph(this.center,$extend({duration:this.options.resizeDuration,onComplete:a},this.options.resizeTransition?{transition:this.options.resizeTransition}:{})),image:new Fx.Tween(this.image,{property:"opacity",duration:500,onComplete:a}),bottom:new Fx.Tween(this.bottom,{property:"margin-top",duration:400,onComplete:a})};this.preloadPrev=new Element("img");this.preloadNext=new Element("img")},addCss:function(){window.addEvent("domready",function(){if(document.id("LightboxCss")){return}new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:(this.options.assetBaseUrl||Clientcide.assetLocation+"/slimbox")+"/slimbox.css",id:"LightboxCss"}).inject(document.head)}.bind(this))},click:function(e){link=document.id(e);var b=link.get("rel")||this.options.relString;if(b==this.options.relString){return this.show(link.get("href"),link.get("title"))}var d,c,a=[];this.anchors.each(function(f){if(f.get("rel")==link.get("rel")){for(d=0;d<a.length;d++){if(a[d][0]==f.get("href")){break}}if(d==a.length){a.push([f.get("href"),f.get("title")]);if(f.get("href")==link.get("href")){c=d}}}},this);return this.open(a,c)},show:function(a,b){return this.open([[a,b]],0)},open:function(a,b){this.fireEvent("onDisplay");this.images=a;this.setup(true);this.top=(window.getScroll().y+(window.getSize().y/15)).toInt();this.center.setStyles({top:this.top,display:""});this.mask.show();return this.changeImage(b)},setup:function(a){var c=$$("iframe");c.extend($$(Browser.Engine.trident?"select":"embed, object"));c.reverse().each(function(d){if(a){d.store("lbBackupStyle",d.getStyle("visibility")||"visible")}var e=(a?"hidden":d.retrieve("lbBackupStyle")||"visible");d.setStyle("visibility",e)});var b=a?"addEvent":"removeEvent";document[b]("keydown",this.keyboardListener);this.step=0},keyboardListener:function(a){switch(a.code){case 27:case 88:case 67:this.close();break;case 37:case 80:this.previous();break;case 39:case 78:this.next()}},previous:function(){return this.changeImage(this.activeImage-1)},next:function(){return this.changeImage(this.activeImage+1)},changeImage:function(a){this.fireEvent("onImageShow",[a,this.images[a]]);if(this.step||(a<0)||(a>=this.images.length)){return false}this.step=1;this.activeImage=a;this.center.setStyle("backgroundColor","");this.bottomContainer.setStyle("display","none");this.prevLink.setStyle("display","none");this.nextLink.setStyle("display","none");this.fx.image.set(0);this.center.addClass("lbLoading");this.preload=new Element("img",{events:{load:function(){this.nextEffect.delay(100,this)}.bind(this)}});this.preload.set("src",this.images[a][0]);return false},nextEffect:function(){switch(this.step++){case 1:this.image.setStyle("backgroundImage","url("+escape(this.images[this.activeImage][0])+")");this.image.setStyle("width",this.preload.width);this.bottom.setStyle("width",this.preload.width);this.image.setStyle("height",this.preload.height);this.prevLink.setStyle("height",this.preload.height);this.nextLink.setStyle("height",this.preload.height);this.caption.set("html",this.images[this.activeImage][1]||"");this.number.set("html",(!this.options.showCounter||(this.images.length==1))?"":"Image "+(this.activeImage+1)+" of "+this.images.length);if(this.activeImage){document.id(this.preloadPrev).set("src",this.images[this.activeImage-1][0])}if(this.activeImage!=(this.images.length-1)){document.id(this.preloadNext).set("src",this.images[this.activeImage+1][0])}if(this.center.clientHeight!=this.image.offsetHeight){this.fx.resize.start({height:this.image.offsetHeight});break}this.step++;case 2:if(this.center.clientWidth!=this.image.offsetWidth){this.fx.resize.start({width:this.image.offsetWidth,marginLeft:-this.image.offsetWidth/2});break}this.step++;case 3:this.bottomContainer.setStyles({top:(this.top+this.center.getSize().y),height:0,marginLeft:this.center.getStyle("margin-left"),display:""});this.fx.image.start(1);break;case 4:this.center.style.backgroundColor="#000";if(this.options.animateCaption){this.fx.bottom.set(-this.bottom.offsetHeight);this.bottomContainer.setStyle("height","");this.fx.bottom.start(0);break}this.bottomContainer.style.height="";case 5:if(this.activeImage){this.prevLink.setStyle("display","")}if(this.activeImage!=(this.images.length-1)){this.nextLink.setStyle("display","")}this.step=0}},close:function(){this.fireEvent("onHide");if(this.step<0){return}this.step=-1;if(this.preload){this.preload.destroy()}for(var a in this.fx){this.fx[a].cancel()}this.center.setStyle("display","none");this.bottomContainer.setStyle("display","none");this.mask.hide();this.setup(false);return}});window.addEvent("domready",function(){if(document.id(document.body).get("html").match(/rel=?.lightbox/i)){new Lightbox()}});MooTools.lang.set("en-US","SimpleEditor",{woops:"Woops",linkURL:"The URL for the link",linkText:"The link text",imgURL:"The URL to the image",imgAlt:"The title (alt) for the image"});MooTools.lang.set("nl-NL","SimpleEditor",{woops:"Oeps",nopeCtrlC:"Sorry, deze functie werkt niet; gebruik ctrl+c.",nopeCtrlX:"Sorry, deze functie werkt niet; gebruik ctrl+x.",linkURL:"De URL voor de snelkoppeling",linkText:"De tekst van de snelkoppeling",imgURL:"De URL van de afbeelding",imgAlt:"De titel (alt) voor de afbeelding"});MooTools.lang.set("fr-FR","SimpleEditor",{woops:"Oops",nopeCtrlC:"DÃ©solÃ©, cette fonction ne fonctionne pas ici. Utilisez ctrl+c.",nopeCtrlX:"DÃ©solÃ©, cette fonction ne fonctionne pas ici. Utilisez ctrl+x.",linkURL:"L'URL pour le lien",linkText:"Texte du lien",imgURL:"L'URL de l'image",imgAlt:"Le titre (alt) de l'image"});MooTools.lang.set("it","SimpleEditor",{woops:"Oops!",linkURL:"La URL del link",linkText:"Il testo del link",imgURL:"La URL dell'immagine",imgAlt:"Il titolo (alt) dell'immagine"});MooTools.lang.set("pt-PT","SimpleEditor",{woops:"Opa",nopeCtrlC:"Desculpe, esta funÃ§Ã£o nÃ£o funciona aqui. Use ctrl+c.",nopeCtrlX:"Desculpe, esta funÃ§Ã£o nÃ£o funciona aqui. Use ctrl+x.",linkURL:"O URL para o link",linkText:"Texto do link",imgURL:"A URL para a imagem",imgAlt:"O tÃtulo (alt) para a imagem"});MooTools.lang.set("es-ES","SimpleEditor",{woops:"Â¡Vaya!",nopeCtrlC:"Lo sentimos, esta funciÃ³n no funciona aquÃ.  Uso ctrl+c.",nopeCtrlX:"Lo sentimos, esta funciÃ³n no funciona aquÃ.  Uso ctrl+x.",linkURL:"La URL para el enlace",linkText:"Texto de enlace",imgURL:"La URL de la imagen",imgAlt:"El tÃtulo (alt) de la imagen"});var PostEditor=new Class({Implements:[Options],tab:"\t",options:{snippets:{},smartTypingPairs:{},selections:{}},initialize:function(b,a){if(Browser.Engine.trident){return}this.element=document.id(b);this.setOptions(a);this.styles={line_height:this.element.getStyle("line-height").toInt()||14,font_size:this.element.getStyle("font-size").toInt()||11,height:this.element.getStyle("height").toInt()};this.autoTab=null;this.ssKey=0;this.seKey=0;this.completion=null;this.tabl=this.tab.length;this.element.onkeypress=this.onKeyPress.bind(this)},changeSnippets:function(a){this.options.snippets=a||{}},changeSmartTypingPairs:function(a){this.options.smartTypingPairs=a||{}},changeSelections:function(a){this.options.selections=a||{}},ss:function(){return this.element.selectionStart},se:function(){return this.element.selectionEnd},slice:function(b,a){return this.element.value.slice(b,a)},value:function(a){this.element.value=a.join("")},getStart:function(a){a=a?a.length:0;return this.slice(0,this.ss()-a)},getEnd:function(a){a=a?a.length:0;return this.element.value.slice(this.se()-a)},selectRange:function(b,a){this.element.selectionStart=b;this.element.selectionEnd=b+a},focus:function(a,b){if(b){this.scrollTop=this.element.scrollTop;this.scrollLeft=this.element.scrollLeft}else{this.element.scrollTop=this.scrollTop;this.element.scrollLeft=this.scrollLeft}if(a){this.element.focus()}},updateScroll:function(){var b=this.getStart().split("\n").length;var a=(b-Math.round(this.element.scrollTop/this.styles.line_height))*this.styles.line_height;a+=this.styles.line_height;if(a>=this.styles.height){this.element.scrollTop+=this.styles.line_height}this.focus(true,1)},onKeyPress:function(a){if(this.filterByPairs(a)){return}this.filterBySelect(a);if(this.filterByTab(a)){return}if([13,9,8,46].contains(a.keyCode)){this.focus(false,true)}switch(a.keyCode){case 27:this.completion=null;this.autoTab=null;break;case 39:this.onKeyRight(a);break;case 13:this.onEnter(a);break;case 9:this.onTab(a);break;case 8:this.onBackspace(a);break;case 46:this.onDelete(a);break}if([13,9,8,46].contains(a.keyCode)){this.focus(true,false)}},filterByPairs:function(d){var a=String.fromCharCode(d.charCode);var f=this.options.smartTypingPairs[a];if(f){if($type(f)=="string"){f={pair:f}}if(!f.scope||this.scope(f.scope)){var b=this.ss(),c=this.se(),g=this.getStart();if(b==c){this.value([g,f.pair,this.getEnd()]);this.selectRange(g.length,0)}else{d.preventDefault();this.ssKey=b;this.seKey=c;this.value([g,a,this.slice(b,c),f.pair,this.getEnd()]);this.selectRange(b+1,c-b)}}f=null;return true}return false},filterBySelect:function(h){var b=String.fromCharCode(h.charCode);if(h.ctrlKey&&h.shiftKey){if([0,1,2,3,4,5,6,7,8,9].contains(b)){var d=this.options.selections[b];if(d){var c=this.ss(),g=this.se(),f=d.apply(this,[this.slice(c,g)]);if(f){var i=this.getStart();if($type(f)=="array"){this.value([i,f.join(""),this.getEnd()]);this.selectRange(i.length+f[0].length,f[1].length)}else{if(f.selection){if(f.snippet){i=this.slice(0,f.selection[0]);var a=this.slice(f.selection[1],this.element.value.length);this.value([i,f.snippet.join(""),a]);this.selectRange(i.length+f.snippet[0].length,f.snippet[1].length)}else{this.selectRange(f.selection[0],f.selection[1])}}else{this.value([i,f.snippet.join(""),this.getEnd()]);this.selectRange(i.length+f.snippet[0].length,f.snippet[1].length)}}}}}}},filterByTab:function(f){if(this.autoTab){var c=this.ss();var d=this.se();var b=this.ssKey;var a=this.seKey;if(![b+1,b,b-1,a].contains(c)){this.completion=null;this.autoTab=null}if(this.autoTab&&[38,39].contains(f.keyCode)&&c==d){this.completion=null;this.autoTab=null}this.ssKey=c;this.seKey=d}else{this.ssKey=0;this.seKey=0}return false},scope:function(d){var c=this.ss();var f=this.getStart();for(var b in d){if(!b){return true}var a=f.lastIndexOf(b);if(a>-1){var e=this.slice(a+b.length,c).lastIndexOf(d[b]);if(e==-1){return true}}}return false},onKeyRight:function(c){var a=this.ss();var b=this.se();var d=this.getStart();if(a!=b){c.preventDefault();this.selectRange(b,0)}},onEnter:function(f){this.updateScroll();var b=this.ss();var d=this.se();var g=this.getStart();if(b==d){var a=g.split("\n").pop(),c=a.match(/^\s+/gi);if(c){f.preventDefault();c=c.join("");this.value([g,"\n",c,this.getEnd()]);this.selectRange(b+1+c.length,0)}}},onBackspace:function(f){var c=this.ss();var d=this.se();if(c==d&&this.slice(c-this.tabl,c)==this.tab){f.preventDefault();var i=this.getStart(this.tab),b=this.slice(c,this.element.value.length);if(i.match(/\n$/g)&&b.match(/^\n/g)){this.value([i,this.slice(c-1,this.element.value.length)])}else{this.value([i,b])}this.selectRange(c-this.tabl,0)}else{if(c==d){var a=this.slice(c-1,c),h=this.slice(c,c+1),g=this.options.smartTypingPairs[a];if($type(g)=="string"){g={pair:g}}if(g&&g.pair==h){this.value([this.getStart(g.pair),this.slice(c,this.element.value.length)]);this.selectRange(c,0)}}}},onDelete:function(c){var a=this.ss(),b=this.se();if(a==b&&this.slice(a,a+this.tabl)==this.tab){c.preventDefault();this.value([this.getStart(),this.slice(a+this.tabl,this.element.value.length)]);this.selectRange(a,0)}},onTab:function(m){m.preventDefault();var t=this.ss(),n=this.se(),f=this.slice(t,n),r=this.getStart();if(this.filterCompletion(m,t,n)){return}if(this.filterAutoTab(m,t,n)){return}if(t!=n&&f.indexOf("\n")!=-1){var c=f.replace(/\n/g,"\n"+this.tab);this.value([r,this.tab,c,this.getEnd()]);this.selectRange(t+this.tabl,n+(this.tabl*f.split("\n").length)-t-this.tabl)}else{var l=null;for(var q in this.options.snippets){var p=this.options.snippets[q];if($type(p)=="function"){continue}if(r.length-q.length==-1){continue}if(r.length-q.length==r.lastIndexOf(q)){if($type(p)=="array"){p={snippet:p}}l=Object.extend({},p);break}}if(l&&(!l.scope||this.scope(l.scope))){if(l.command){var j=l.command.apply(this,[q]);if($type(j)=="array"){l.snippet=j}else{l=j}}var b=l.snippet.copy(),g=r.split("\n").pop().match(/^\s+/gi);var d=this.getStart(l.key||q);if(g){g=g.join("");b[0]=b[0].replace(/\n/g,"\n"+g);b[1]=b[1].replace(/\n/g,"\n"+g);b[2]=b[2].replace(/\n/g,"\n"+g)}this.value([d,b[0],b[1],b[2],this.getEnd()]);if(l.tab){this.autoTab={tab:l.tab.copy(),snippet:b.copy(),start:l.start};var s=this.autoTab.tab.shift();this.autoTab.ss=b[1].indexOf(s);if(this.autoTab.ss>-1){this.autoTab.ssLast=d.length+b[0].length+this.autoTab.ss;this.ssKey=this.autoTab.ssLast;this.seKey=this.ssKey+s.length;this.completion=null;if(l.completion){this.autoTab.completion=l.completion;this.autoTab.item=s;this.autoTab.loop=true;if(typeof l.loop=="boolean"){this.autoTab.loop=l.loop}var h=this.autoTab.completion[s];if(h){var k=[s].extend(h);var o=h.copy().extend([""]);this.autoTab.index=s;this.completion=o.associate(k)}}this.selectRange(d.length+b[0].length+this.autoTab.ss,s.length)}else{this.autoTab=null;this.selectRange(d.length+b[0].length,b[1].length)}}else{this.selectRange(d.length+b[0].length,b[1].length)}b=null}else{this.value([r,this.tab,this.slice(t,this.element.value.length)]);if(t==n){this.selectRange(t+this.tabl,0)}else{this.selectRange(t+this.tabl,n-t)}}}},filterAutoTab:function(h,m,j){if(this.autoTab){var b=this.autoTab.tab.length;if(b){if(this.autoTab.ssLast<=m){var l=this.autoTab.tab.shift();var g=this.slice(m,m+this.autoTab.snippet[1].length-this.autoTab.ss).indexOf(l);if(b==1&&!l){var d=this.autoTab.snippet[2].length;if($type(this.autoTab.start)=="number"){d=this.autoTab.start}else{if(this.autoTab.start){d=0}}this.selectRange(j+this.getEnd().indexOf(this.autoTab.snippet[2])+d,0);this.completion=null;return true}else{if(g>-1){this.autoTab.ss=g;this.autoTab.ssLast=g+m;this.ssKey=this.autoTab.ssLast;this.seKey=this.ssKey+l.length;this.autoTab.item=l;if(this.completion){var c=this.autoTab.completion[l];if(c){var f=[l].extend(c);var k=c.copy().extend([""]);this.autoTab.index=l;this.completion=k.associate(f)}else{this.completion=null}}this.selectRange(m+g,l.length);return true}else{this.onTab(h);return true}}}}this.autoTab=null}return false},filterCompletion:function(d,a,c){if(this.completion&&a==this.ssKey&&c==this.seKey&&this.autoTab.item.length==c-a){var b=this.completion[this.autoTab.item];if(b){this.seKey=this.ssKey+b.length;this.autoTab.item=b;this.value([this.getStart(),b,this.getEnd()]);this.selectRange(a,b.length);return true}else{if(this.autoTab.loop){b=this.autoTab.index;this.autoTab.item=b;this.seKey=this.ssKey+b.length;this.value([this.getStart(),b,this.getEnd()]);this.selectRange(a,b.length);return true}}}this.completion=null;return false}});PostEditor.Forum=new Class({Extends:PostEditor,options:{snippets:{strong:["<strong>\n		","something here","\n</strong>"],em:["<em>\n		","something here","\n</em>"],blockquote:["<blockquote>\n		","something here","\n</blockquote>"],code:["<code>\n		","something here","\n</code>"],javascript:["<javascript>\n		","something here","\n</javascript>"],html:["<html>\n		","something here","\n</html>"],bq:["<blockquote>\n		","something here","\n</blockquote>"],js:["<javascript>\n		","something here","\n</javascript>"],"$":{snippet:["document.id('","id')","."],tab:["id",""]},ul:{snippet:["<ul>\n		<li>","something here","</li>\n</ul>"],tab:["something here",""],start:5},ol:{snippet:["<ol>\n		<li>","something here","</li>\n</ol>"],tab:["something",""],completion:{something:["text","snippet"]},loop:true,start:5},li:{snippet:["<li>","something here","</li>"],tab:["something here",""]},"</li>":{snippet:["</li>\n<li>","something here","</li>"],tab:["something here",""]},"new Class":{scope:{"<javascript>":"</javascript>"},snippet:["new Class({\n		initialize: function(value){\n				","this.key = value;","\n		}\n});"],tab:["this.key","key","value"]},".extend":{snippet:[".extend({\n		","initialize: function(value){\n				","\n		}\n});"],tab:["initialize","value",""],start:true},date:{command:function(a){var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"],c=new Date(),d=c.getYear();if(d<1000){d+=1900}return{snippet:["",e[c.getDay()]+", "+b[c.getMonth()]+" "+c.getDate()+", "+d," "],tab:[e[c.getDay()]+", "+b[c.getMonth()]+" "+c.getDate()+", "+d,""]}}},a:{snippet:['<a href="','http://" title="desc">text',"</a> "],tab:["http://",' title="desc"',"desc","text",""]},"{":["{\n		","","\n"]},smartTypingPairs:{'"':'"',"(":")","{":"}","[":"]","<":">","`":"`","'":{scope:{"<javascript>":"</javascript>","<code>":"</code>","<html>":"</html>"},pair:"'"}},selections:{"0":function(a){return["<strong>",a,"</strong>"]},"1":function(a){return["<em>",a,"</em>"]},"2":function(a){return["<blockquote>",a,"</blockquote>"]},"3":function(a){return["<code>",a,"</code>"]},"4":function(a){return["<javascript>",a,"</javascript>"]},"5":function(a){return["<html>",a,"</html>"]},"6":function(a){return['<a href="">',a,"</a>"]},"7":function(a){return{selection:[this.ss(),this.se()],snippet:["",a.toLowerCase(),""]}},"8":function(a){return["",a.toUpperCase(),""]},"9":function(b){var a=/<([^<>]*)>/g;return["",b.replace(a,"&lt;$1&gt;"),""]}}}});$extend(Browser,{getHost:function(a){return new URI(a).get("host")},getQueryStringValue:function(b,a){return new URI(a).getData(b)},getQueryStringValues:function(a){return new URI(a).getData()},getPort:function(a){return new URI(a).get("port")},redraw:function(a){var b=document.createTextNode(" ");this.adopt(b);(function(){b.dispose()}).delay(1);return this}});window.addEvent("domready",function(){var b=0;function a(){function c(){b++;if(b<20){a.delay(50)}}try{if(!Browser.getQueryStringValues()){c()}else{Browser.qs=Browser.getQueryStringValues()}}catch(d){c()}}a()});$extend(Class.prototype,{refactor:function(a){this.prototype=Class.refactor(this,a).prototype;return this}});Number.implement({zeroise:function(a){return String(this).zeroise(a)}});String.implement({zeroise:function(a){return"0".repeat(a-this.length)+this}});Date.prototype.compare=Date.prototype.diff;Date.prototype.strftime=Date.prototype.format;$E=document.getElement.bind(document);$G=function(a){return $splat(document.id(a)||$$(a))};Element.Properties.inputValue={get:function(){switch(this.get("tag")){case"select":vals=this.getSelected().map(function(c){var b=$pick(c.get("value"),c.get("text"));return(b=="")?c.get("text"):b});return this.get("multiple")?vals:vals[0];case"input":switch(this.get("type")){case"checkbox":return this.get("checked")?this.get("value"):false;case"radio":var a;if(this.get("checked")){return this.get("value")}document.id(this.getParent("form")||document.body).getElements("input").each(function(b){if(b.get("name")==this.get("name")&&b.get("checked")){a=b.get("value")}},this);return a||null}case"input":case"textarea":return this.get("value");default:return this.get("inputValue")}},set:function(a){switch(this.get("tag")){case"select":this.getElements("option").each(function(c){var b=$pick(c.get("value"),c.get("text"));if(b==""){b=c.get("text")}c.set("selected",$splat(a).contains(b))});break;case"input":if(["radio","checkbox"].contains(this.get("type"))){this.set("checked",$type(a)=="boolean"?a:$splat(a).contains(this.get("value")));break}case"textarea":case"input":this.set("value",a);break;default:this.set("inputValue",a)}return this},erase:function(){switch(this.get("tag")){case"select":this.getElements("option").each(function(a){a.erase("selected")});break;case"input":if(["radio","checkbox"].contains(this.get("type"))){this.set("checked",false);break}case"input":case"textarea":this.set("value","");break;default:this.set("inputValue","")}return this}};Element.implement({autoMouseOvers:function(a){a=$extend({outString:"_out",overString:"_over",cssOver:"hover",cssOut:"hoverOut",subSelector:"",applyToBoth:false},a);el=this;if(a.subSelector){el=this.getElements(a.subSelector);if(el.every(function(b){return b.retrieve("autoMouseOverSetup")})){return this}}el.store("autoMouseOverSetup",true);return el.addEvents({mouseenter:function(){this.swapClass(a.cssOut,a.cssOver);if(this.src&&this.src.contains(a.outString)){this.src=this.src.replace(a.outString,a.overString)}if(a.applyToBoth&&a.subSelector){this.getElements(a.subSelector).each(function(b){b.swapClass(a.cssOut,a.cssOver)})}}.bind(this),mouseleave:function(){this.swapClass(a.cssOver,a.cssOut);if(this.src&&this.src.contains(a.overString)){this.src=this.src.replace(a.overString,a.outString)}if(a.applyToBoth&&a.subSelector){this.getElements(a.subSelector).each(function(b){b.swapClass(a.cssOver,a.cssOut)})}}.bind(this)}).swapClass(a.cssOver,a.cssOut);el=null}});window.addEvent("domready",function(){$$("img.autoMouseOver").each(function(a){a.autoMouseOvers()})});(function(){var a=Element.prototype.setPosition;Element.implement({setPosition:function(b){if(b&&($defined(b.x)||$defined(b.y))){return a.apply(this,arguments)}else{return this.position(b)}}})})();Element.alias("isDisplayed","isVisible");IframeShim=Class.refactor(IframeShim,{initialize:function(b,a){if(a&&a.zindex){a.zIndex=a.zindex}this.previous(b,a)}});var JsonP=Class.refactor(Request.JSONP,{initialize:function(){var a=Array.link(arguments,{url:String.type,options:Object.type});options=(a.options||{});options.url=options.url||a.url;if(options.callBackKey){options.callbackKey=options.callBackKey}this.previous(options)},getScript:function(b){var c=b.queryString||this.options.queryString;if(b.url&&c){b.url+=(b.url.indexOf("?")>=0?"&":"?")+c}var a=this.previous(b);if($chk(b.globalFunction)){window[b.globalFunction]=function(d){JsonP.requestors[index].handleResults(d)}}return a},request:function(a){this.send({url:a||this.options.url})}});var Modalizer=new Class({defaultModalStyle:{display:"block",position:"fixed",top:0,left:0,"z-index":5000,"background-color":"#333",opacity:0.8},setModalOptions:function(a){this.modalOptions=$merge({width:(window.getScrollSize().x),height:(window.getScrollSize().y),elementsToHide:"select, embed"+(Browser.Engine.trident?"":", object"),hideOnClick:true,modalStyle:{},updateOnResize:true,layerId:"modalOverlay",onModalHide:$empty,onModalShow:$empty},this.modalOptions,a);return this},layer:function(){if(!this.modalOptions.layerId){this.setModalOptions()}return document.id(this.modalOptions.layerId)||new Element("div",{id:this.modalOptions.layerId}).inject(document.body)},resize:function(){if(this.layer()){this.layer().setStyles({width:(window.getScrollSize().x),height:(window.getScrollSize().y)})}},setModalStyle:function(a){this.modalOptions.modalStyle=a;this.modalStyle=$merge(this.defaultModalStyle,{width:this.modalOptions.width,height:this.modalOptions.height},a);if(this.layer()){this.layer().setStyles(this.modalStyle)}return(this.modalStyle)},modalShow:function(a){this.setModalOptions(a);this.layer().setStyles(this.setModalStyle(this.modalOptions.modalStyle));if(Browser.Engine.trident4){this.layer().setStyle("position","absolute")}this.layer().removeEvents("click").addEvent("click",function(){this.modalHide(this.modalOptions.hideOnClick)}.bind(this));this.bound=this.bound||{};if(!this.bound.resize&&this.modalOptions.updateOnResize){this.bound.resize=this.resize.bind(this);window.addEvent("resize",this.bound.resize)}if($type(this.modalOptions.onModalShow)=="function"){this.modalOptions.onModalShow()}this.togglePopThroughElements(0);this.layer().setStyle("display","block");return this},modalHide:function(a,b){if(a===false){return false}this.togglePopThroughElements(1);if($type(this.modalOptions.onModalHide)=="function"){this.modalOptions.onModalHide()}this.layer().setStyle("display","none");if(this.modalOptions.updateOnResize){this.bound=this.bound||{};if(!this.bound.resize){this.bound.resize=this.resize.bind(this)}window.removeEvent("resize",this.bound.resize)}return this},togglePopThroughElements:function(a){if(Browser.Engine.trident4||(Browser.Engine.gecko&&Browser.Platform.mac)){$$(this.modalOptions.elementsToHide).each(function(b){b.setStyle("opacity",a)})}}});OverText=Class.refactor(OverText,{initialize:function(a,b){this.instances=[];if(["array","string"].contains($type(a))){this.setOptions(b);$$(a).each(this.addElement,this)}else{return this.previous.apply(this,arguments)}},addElement:function(a){this.instances.push(new OverText(a,this.options))},startPolling:function(){if(!this.instances||!this.instances.length){return this.previous.apply(this,arguments)}this.instances.each(function(a){a.startPolling()})},stopPolling:function(){if(!this.instances.length){return this.previous.apply(this,arguments)}this.instances.each(function(a){a.stopPolling()})},hideTxt:function(a){var b=a.retrieve("OverText");if(b){b.hide()}},showTxt:function(a){var b=a.retrieve("OverText");if(b){b.show()}},testOverTxt:function(a){var b=a.retrieve("OverText");if(b){b.test()}},repositionAll:function(){this.instances.each(function(a){a.reposition()})},repositionOverTxt:function(a){var b=a.retrieve("OverText");if(b){b.reposition()}}});Request.Queue=Class.refactor(Request.Queue,{initialize:function(a){if(a){$each({onRequestStart:"onRequest",onRequestSuccess:"onSuccess",onRequestComplete:"onComplete",onRequestCancel:"onCancel",onRequestException:"onException",onRequestFailure:"onFailure"},function(c,b){if(a[b]){a[c]=a[b]}})}this.previous(a)}});String.implement({findAllEmails:function(){return this.match(new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","gi"))||[]}});String.alias("parseQueryString","parseQuery");var Waiter=new Class({Extends:Spinner,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:{},injectWhere:null},render:function(){this.parent();this.waiterContainer=this.element.set(this.options.containerProps);if(this.msgContainer){this.msgContainer=this.content.set(this.options.msgProps)}if(this.options.img){this.waiterImg=document.id(this.options.img.id)||new Element("img",$merge(this.options.img,{src:this.options.baseHref+this.options.img.src})).inject(this.img)}this.element.set(this.options.layer)},place:function(){this.inject.apply(this,arguments)},reset:function(){return this.hide()},start:function(a){return this.show()},stop:function(a){return this.hide()}});if(window.Request){Request=Class.refactor(Request,{options:{useWaiter:false,waiterOptions:{},waiterTarget:false},initialize:function(a){if(a){if(a.useWaiter){a.useSpinner=a.useWaiter}if(a.waiterOptions){a.spinnerOptions=a.waiterOptions}if(a.waiterTarget){a.spinnerTarget=a.waiterTarget}}this.previous(a)}})}Element.Properties.waiter={set:function(a){return this.set("spinner",a)},get:function(a){return this.get("spinner",a)}};Element.implement({wait:function(a){return this.spin(a)},release:function(){return this.unspin(options)}});Clientcide.setAssetLocation("/salsa_javascripts/clientcide_assets");
