var Clientcide={version:"2.0.3",setAssetLocation:function(C){var B=function(D){return D.replace(/\/\//g,"/")
};
if(window.StickyWin&&StickyWin.UI){StickyWin.UI.implement({options:{baseHref:B(C+"/stickyWinHTML/")}});
if(StickyWin.alert){var A=StickyWin.alert.bind(window);
StickyWin.alert=function(F,E,D){return A(F,E,D||B(C+"/simple.error.popup"))
}
}if(StickyWin.UI.Pointy){StickyWin.UI.Pointy.implement({options:{baseHref:B(C+"/PointyTip/")}})
}}if(window.TagMaker){TagMaker.implement({options:{baseHref:B(C+"/tips/")}})
}if(window.ProductPicker){ProductPicker.implement({options:{baseHref:B(C+"/Picker")}})
}if(window.Autocompleter){Autocompleter.Base.implement({options:{baseHref:B(C+"/autocompleter/")}})
}if(window.Lightbox){Lightbox.implement({options:{assetBaseUrl:B(C+"/slimbox/")}})
}if(window.Waiter){Waiter.implement({options:{baseHref:B(C+"/waiter/")}})
}},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(){(A.debug||A.log).apply(A,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=$(D);
if(!D){return D
}if(D.get("tag")=="img"&&D.get("src").test(".png")){var G=D.isDisplayed();
try{dim=D.getSize()
}catch(H){}if(!G){var F={};
["visibility","display","position"].each(function(I){F[I]=this.style[I]||""
},this);
this.setStyles({visibility:"hidden",display:"block",position:"absolute"});
dim=D.getSize();
this.setStyles(F);
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:G?"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 E={};
var B=D.style.cssText.split(";");
B.each(function(I){var J=I.split(":");
E[J[0]]=J[1]
});
C.setStyle(E)
}catch(H){dbug.log("fixPNG1: ",H)
}}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(H){dbug.log("fixPNG2: ",H)
}},pngTest:/\.png$/,scanForPngs:function(C,B){B=B||"fixPNG";
if(document.getElements){C=$(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:"auto",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
}});
$E=document.getElement.bind(document);
$G=function(A){return $splat($(A)||$$(A))
};
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=$(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($(A)&&$(A).hasClass("fxMarquee")){var B=$(A)
}else{var B=new Element("span",{"class":"fxMarquee",styles:{position:"relative"}});
if($(A)){B.grab($(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=$(this.element);
this.current=$(this.current);
this.message=$(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=$(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,$(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=$(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(I,J){if(G){return J<D&&I.offset<A&&I.offset>=A-F
}else{return J>=D&&I.offset+I.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(){$(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 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 $(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)
})
}}});
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=$(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:{},stickyWinToUse:StickyWin,showNow:false,htmlResponse:false,regExp:/\\?%([^%]+)%/g},initialize:function(C,A,B){this.setOptions(B);
this.observer=$(A);
this.html=($(C))?$(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($(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($(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"],Implements:[Options,Events,StyleWriter,Class.ToElement],options:{closeClassName:"closeSticky",pinClassName:"pinSticky",content:"",zIndex:10000,className:"",width:false,height:false,timeout:-1,allowMultipleByClass:false,allowMultiple:true,showNow:true,useIframeShim:true,iframeShimSelector:"",destroyOnClose:false},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.id=this.options.id||"StickyWin_"+new Date().getTime();
this.makeWindow();
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))
}if(this.options.showNow){this.show()
}this.createStyle(this.css,"StickyWinClearFix");
if(this.options.destroyOnClose){this.addEvent("close",this.destroy)
}},makeWindow:function(){this.destroyOthers();
if(!$(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=$(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("onDisplay")
}if(this.options.useIframeShim){this.showIframeShim()
}this.visible=true;
return this
},showWin:function(){if(!this.positioned){this.position()
}this.win.show()
},hide:function(A){if($type(A)=="event"||!A){this.fireEvent("onClose")
}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($(A)){this.win.adopt(A)
}}this.win.getElements("."+this.options.closeClassName).each(function(B){B.addEvent("click",this.hide.bind(this))
},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.win){this.win.destroy()
}if(this.options.useIframeShim&&this.shim){this.shim.destroy()
}if($("modalOverlay")){$("modalOverlay").destroy()
}}});
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(A){this.previous(A);
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,Implements:[Modalizer],initialize:function(A){A=A||{};
this.setModalOptions($merge(A.modalOptions||{},{onModalHide:function(){this.hide(false)
}.bind(this)}));
this.parent(A)
},show:function(A){if($pick(A,true)){this.modalShow();
if(this.modalOptions.elementsToHide){this.win.getElements(this.modalOptions.elementsToHide).setStyle("opacity",1)
}}this.parent()
},hide:function(A){if($pick(A,true)){this.modalHide()
}else{this.parent()
}}});
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)
}}},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=function(D,C,B){B=B||"http://www.cnet.com/html/rb/assets/global/simple.error.popup";
C='<p class="errorMsg SWclearfix" style="margin: 0px;min-height:10px"><img src="'+B+'/icon_problems_sm.gif" class="bang clearfix" style="float: left; width: 30px; height: 30px; margin: 3px 5px 5px 0px;">'+C+"</p>";
var A=StickyWin.ui(D,C,{width:250});
return new StickyWin.Modal({destroyOnClose:true,modalOptions:{modalStyle:{zIndex:11000}},zIndex:110001,content:A,position:"center",onClose:function(){this.destroy()
}})
};
StickyWin.UI=new Class({Implements:[Options,Class.ToElement,StyleWriter],options:{width:300,css:"div.DefaultStickyWin div.body{font-family:verdana; font-size:11px; line-height: 13px;}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 30px 8px 0px !important; margin-left:5px !important; position:relative; right:-20px !important;}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: 0px 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:"",baseHref:"http://www.cnet.com/html/rb/assets/global/stickyWinHTML/",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},/\\?\{%([^}]+)%\}/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
},makeCaption:function(A){if(!A){return this.destroyCaption()
}this.caption=A;
var B=this.options;
var C=new Element("h1").addClass("caption");
if(B.width){C.setStyle("width",(B.width-(B.cornerHandle?55:40)-(B.closeButton?10:0)))
}if($(this.caption)){C.adopt(this.caption)
}else{C.set("html",this.caption)
}this.top_ur.adopt(C);
this.h1=C;
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;
if(this.h1){this.destroyCaption()
}this.makeCaption(B);
if($(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;
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 $(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 {position: relative}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;} 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:4px 0px 0px !important; cursor:pointer; z-index: 1; top: 0px;}",baseHref:"http://github.com/anutron/clientcide/raw/master/Assets/PointyTip/",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.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.options.divot=this.options.divot.substitute(this.options,/\\?\{%([^}]+)%\}/g);
if(Browser.Engine.trident4){this.options.divot=this.options.divot.replace(/png/g,"gif")
}this.parent(A.caption,A.body,this.options);
if(this.id){$(this).set("id","pointy_"+this.id)
}},build:function(){this.parent();
var C=this.options;
this.pointyWrapper=new Element("div",{"class":"pointyWrapper"}).inject($(this));
$(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({background:"url("+C.divot+") no-repeat",width:A,height:D,overflow:"hidden"},B()),"class":"pointyDivot pointy_"+C.direction}).inject(this.pointyWrapper)
},expose:function(){if($(this).getStyle("display")!="none"&&$(document.body).hasChild($(this))){return $empty
}$(this).setStyles({visibility:"hidden",position:"absolute"});
var A;
if(!document.body.hasChild($(this))){$(this).inject(document.body);
A=true
}return(function(){if(A){$(this).dispose()
}$(this).setStyles({visibility:"visible",position:"relative"})
}).bind(this)
},positionPointer:function(A){if(!this.pointer){return 
}var B=A||this.options;
var E;
var D=B.direction;
switch(D){case 12:case 1:case 11:E={edge:{x:"center",y:"bottom"},position:{x:D==12?"center":D==1?"right":"left",y:"top"},offset:{x:(D==12?0:D==1?-1:1)*B.divotSize,y:1}};
break;
case 2:case 3:case 4:E={edge:{x:"left",y:"center"},position:{x:"right",y:D==3?"center":D==2?"top":"bottom"},offset:{x:-1,y:(D==3?0:D==4?-1:1)*B.divotSize}};
break;
case 5:case 6:case 7:E={edge:{x:"center",y:"top"},position:{x:D==6?"center":D==5?"right":"left",y:"bottom"},offset:{x:(D==6?0:D==5?-1:1)*B.divotSize,y:-1}};
break;
case 8:case 9:case 10:E={edge:{x:"right",y:"center"},position:{x:"left",y:D==9?"center":D==10?"top":"bottom"},offset:{x:1,y:(D==9?0:D==8?-1:1)*B.divotSize}};
break
}var C=this.expose();
this.pointer.position($extend({relativeTo:this.pointyWrapper},E,A));
C()
},setContent:function(B,A){this.parent(B,A);
this.top[this.h1?"removeClass":"addClass"]("noCaption");
if(Browser.Engine.trident4){$(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 $(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 D=B.direction;
if(!D){var C={left:9,right:3,up:12,down:6};
D=C[this.options.point];
if(!D){D=this.options.point
}B.direction=D
}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(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 B=this.options.point;
switch(B){case"left":case 8:case 9:case 10:return{edge:{x:"left",y:B==10?"top":B==8?"bottom":"center"},position:{x:"right",y:"center"},offset:{x:A}};
case"right":case 2:case 3:case 4:return{edge:{x:"right",y:B==2?"top":B==4?"bottom":"center"},position:{x:"left",y:"center"},offset:{x:-A}};
case"up":case 11:case 12:case 1:return{edge:{x:B==11?"left":B==1?"right":"center",y:"top"},position:{x:"center",y:"bottom"},offset:{y:A,x:B==11?-A:B==1?A:0}};
case"down":case 5:case 6:case 7:return{edge:{x:B==7?"left":B==5?"right":"center",y:"bottom"},position:{x:"center",y:"top"},offset:{y:-A,x:B==7?-A:B==5?A: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){$(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",[$(this.tip),this.tip])
},hide:function(){this.fireEvent("hide",[$(this.tip),this.tip])
}});
var Waiter=new Class({Implements:[Options,Events,Chain],options:{baseHref:"http://www.cnet.com/html/rb/assets/global/waiter/",containerProps:{styles:{position:"absolute","text-align":"center"},"class":"waiterContainer"},containerPosition:{},msg:false,msgProps:{styles:{"text-align":"center",fontWeight:"bold"},"class":"waiterMsg"},img:{src:"waiter.gif",styles:{width:24,height:24},"class":"waiterImg"},layer:{styles:{width:0,height:0,position:"absolute",zIndex:999,display:"none",opacity:0.9,background:"#fff"},"class":"waitingDiv"},useIframeShim:true,fxOptions:{},injectWhere:null},initialize:function(C,A){this.target=$(C)||$(document.body);
this.setOptions(A);
this.waiterContainer=new Element("div",this.options.containerProps);
if(this.options.msg){this.msgContainer=new Element("div",this.options.msgProps);
this.waiterContainer.adopt(this.msgContainer);
if(!$(this.options.msg)){this.msg=new Element("p").appendText(this.options.msg)
}else{this.msg=$(this.options.msg)
}this.msgContainer.adopt(this.msg)
}if(this.options.img){this.waiterImg=$(this.options.img.id)||new Element("img").inject(this.waiterContainer)
}this.waiterOverlay=$(this.options.layer.id)||new Element("div").adopt(this.waiterContainer);
this.waiterOverlay.set(this.options.layer);
this.place(C);
try{if(this.options.useIframeShim){this.shim=new IframeShim(this.waiterOverlay,this.options.iframeShimOptions)
}}catch(B){dbug.log("Waiter attempting to use IframeShim but failed; did you include IframeShim? Error: ",B);
this.options.useIframeShim=false
}this.waiterFx=this.waiterFx||new Fx.Elements($$(this.waiterContainer,this.waiterOverlay),this.options.fxOptions)
},place:function(B,A){var A=A||this.options.injectWhere||B==document.body?"inside":"after";
this.waiterOverlay.inject(B,A)
},toggle:function(B,A){B=$(B)||$(this.active)||$(this.target);
this.place(B);
if(!$(B)){return this
}if(this.active&&B!=this.active){return this.stop(this.start.bind(this,B))
}if((!this.active||A)&&A!==false){this.start(B)
}else{if(this.active&&!A){this.stop()
}}return this
},reset:function(){this.waiterFx.cancel().set({0:{opacity:[0]},1:{opacity:[0]}})
},start:function(A){this.reset();
A=$(A)||$(this.target);
this.place(A);
if(this.options.img){this.waiterImg.set($merge(this.options.img,{src:this.options.baseHref+this.options.img.src}))
}var B=function(){var C=A.getComputedSize();
this.active=A;
this.waiterOverlay.setStyles({width:this.options.layer.width||C.totalWidth,height:this.options.layer.height||C.totalHeight,display:"block"}).position({relativeTo:A,position:"upperLeft"});
this.waiterContainer.position($merge({relativeTo:this.waiterOverlay},this.options.containerPosition));
if(this.options.useIframeShim){this.shim.show()
}this.waiterFx.start({0:{opacity:[1]},1:{opacity:[this.options.layer.styles.opacity]}}).chain(function(){if(this.active==A){this.fireEvent("onShow",A)
}this.callChain()
}.bind(this))
}.bind(this);
if(this.active&&this.active!=A){this.stop(B)
}else{B()
}return this
},stop:function(A){if(!this.active){if($type(A)=="function"){A.attempt()
}return this
}this.waiterFx.cancel();
this.waiterFx.clearChain();
this.waiterFx.start({0:{opacity:[0]},1:{opacity:[0]}}).chain(function(){this.active=null;
this.waiterOverlay.hide();
if(this.options.useIframeShim){this.shim.hide()
}this.fireEvent("onHide",this.active);
this.callChain();
this.clearChain();
if($type(A)=="function"){A.attempt()
}}.bind(this));
return this
}});
if(typeof Request!="undefined"&&Request.HTML){Request.HTML=Class.refactor(Request.HTML,{options:{useWaiter:false,waiterOptions:{},waiterTarget:false},initialize:function(A){this._send=this.send;
this.send=function(B){if(this.waiter){this.waiter.start().chain(this._send.bind(this,B))
}else{this._send(B)
}return this
};
this.previous(A);
if(this.options.useWaiter&&($(this.options.update)||$(this.options.waiterTarget))){this.waiter=new Waiter(this.options.waiterTarget||this.options.update,this.options.waiterOptions);
["onComplete","onException","onCancel"].each(function(B){this.addEvent(B,this.waiter.stop.bind(this.waiter))
},this)
}}})
}Element.Properties.waiter={set:function(A){var B=this.retrieve("waiter");
return this.eliminate("waiter").store("waiter:options",A)
},get:function(A){if(A||!this.retrieve("waiter")){if(A||!this.retrieve("waiter:options")){this.set("waiter",A)
}this.store("waiter",new Waiter(this,this.retrieve("waiter:options")))
}return this.retrieve("waiter")
}};
Element.implement({wait:function(A){this.get("waiter",A).start();
return this
},release:function(){var A=Array.link(arguments,{options:Object.type,callback:Function.type});
this.get("waiter",A.options).stop(A.callback);
return this
}});
var Collapsable=new Class({Extends:Fx.Reveal,initialize:function(A,C,B){this.clicker=$(A);
this.section=$(C);
this.parent(this.section,B);
this.addEvents()
},addEvents:function(){this.clicker.addEvent("click",this.toggle.bind(this))
}});
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=$G(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)
})
}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 HtmlTable=new Class({Implements:[Options],options:{properties:{cellpadding:0,cellspacing:0,border:0},rows:[]},initialize:function(A){this.setOptions(A);
this.table=new Element("table").setProperties(this.options.properties);
this.table.store("HtmlTable",this);
this.tbody=new Element("tbody").inject(this.table);
this.options.rows.each(this.push.bind(this));
["adopt","inject","wraps","grab","replaces","empty","dispose"].each(function(B){this[B]=this.table[B].bind(this.table)
},this)
},toElement:function(){return this.table
},push:function(C){var B=new Element("tr").inject(this.tbody);
var A=C.map(function(F){F=F||"";
var E=new Element("td").inject(B);
if(F.properties){E.setProperties(F.properties)
}function D(G){if($(G)){E.adopt($(G))
}else{E.set("html",G)
}}if($defined(F.content)){D(F.content)
}else{D(F)
}return E
},this);
return{tr:B,tds:A}
}});
var MenuSlider=new Class({Implements:[Options,Events],Binds:["slideIn","slideOut"],options:{fxOptions:{duration:400,transition:"expo:out",link:"cancel"},useIframeShim:true},initialize:function(C,A,B){this.menu=$(C);
this.subMenu=$(A);
this.setOptions(B);
this.makeSlider();
this.hoverGroup=new HoverGroup($merge(this.options.hoverGroupOptions,{elements:[this.menu,this.subMenu],onEnter:this.slideIn,onLeave:this.slideOut}))
},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));
return this
},slideOut:function(){this.hide();
this.fireEvent("out");
if(this.shim){this.shim.hide()
}return this
},hide:function(){$clear(this.hoverGroup.assertion);
this.hoverGroup.active=false;
this.slider.cancel();
this.slider.hide();
if(this.shim){this.shim.hide()
}return this
}});
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(D,A,B){this.setOptions(B);
this.horz=(this.options.mode=="horizontal");
this.content=$(D).setStyle("overflow","hidden");
this.knob=$(A);
this.track=this.knob.getParent();
this.setPositions();
if(this.horz&&this.options.width){this.wrapper=new Element("div");
this.content.getChildren().each(function(E){this.wrapper.adopt(E)
},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();
var C=function(){$clear(this.scrolling)
}.bind(this);
["forward","back"].each(function(E){var F=$(this.options.scrollLinks[E]);
if(F){F.addEvents({mousedown:function(){this.scrolling=this[E].periodical(50,this)
}.bind(this),mouseup:C.bind(this),click:C.bind(this)})
}},this);
this.knob.addEvent("click",C.bind(this));
window.addEvent("domready",function(){try{$(document.body).addEvent("mouseup",C.bind(this))
}catch(E){}}.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)
},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=$(D);
C=$(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=$(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){$(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){$(this.buttons[D]).swapClass(this.options.buttonOffClass,this.options.buttonOnClass);
A[D.toString()]={opacity:1}
}else{$(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($(this.options.currentIndexContainer)){$(this.options.currentIndexContainer).set("html",this.now+1)
}if($(this.options.maxContainer)){$(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($(this.options.nextLink)){$(this.options.nextLink).addEvent("click",function(){this.forward()
}.bind(this))
}if($(this.options.prevLink)){$(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=$(this.options.prevLink);
var C=$(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=$(A);
this.element=new Element("div").wraps(this.container).setStyles({width:this.container.getSize().x,overflow:"hidden"});
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:$(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,{property:"left"});
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=$(D.container)||(D.options?$(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=$(C);
A=$(A);
D=$(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(E){E.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||(Browser.Engine.trident4&&!Browser.Engine.trident4));
if(this.now!=A){if(!E.retrieve("tabFx")){E.store("tabFx",new Fx.Morph(B,this.options.effectOptions))
}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.setStyle("height","auto")
}.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=$(this.options.positionOptions.relativeTo)||document.body;
this.prompter=($(this.options.msg))?$(this.options.msg):this.makePrompter(this.options.msg);
if(this.options.reposition){this.prompter.setStyles({position:"absolute",display:"none",zIndex:this.options.positionOptions.zIndex});
if(!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($(A.msg)&&B){this.msgHolder.empty().adopt(A.msg)
}else{if(!$(A.msg)&&A.msg){this.msgHolder.empty().appendText(A.msg)
}}if(!this.paused){if(A.reposition){this.position(A.positionOptions)
}(function(){this.timer=this.fade(A.pause)
}).delay(A.delay,this)
}if(A.saveAsDefault){this.setOptions(A)
}return this
},fade:function(A){this.paused=true;
A=$pick(A,this.options.pause);
if(!this.fx&&!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($(B)){this.inputs=$H({start:$(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 FormValidator");
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){$(B).addEvent("click",this.show.bind(this))
},this)
},getDates:function(D,C){var E={};
if(!C){D=D||this.selectedDates
}var B=function(F){var G=this.inputs.get(F);
if(G){E[F]=this.validDate(G.get("value"))
}}.bind(this);
this.whens.each(function(F){switch($type(D)){case"object":if(D){E[F]=D[F]?D[F]:D
}if(!E[F]&&!E[F].format){B(F)
}break;
default:B(F);
break
}if(!E[F]){E[F]=this.selectedDates[F]||new Date()
}},this);
return E
},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(I){var J=new Element("td").inject(H).set("html","&nbsp;")
})
});
var 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));
this.container.setStyle("z-index",this.stickyWin.win.getStyle("z-index").toInt()+1)
}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);
B.setTime((B.getTime()-(Date.units.day()*(B.getDay())))+(Date.units.day()*this.options.weekStartOffset));
var D=new Element("span",{html:Date.getMsg("months")[E.getMonth()]+" "+E.getFullYear()});
$(this.rows[0].getElements("td")[1]).empty().adopt(D);
var F=B.clone();
this.rows.each(function(H,G){if(G<2){return 
}H.getElements("td").each(function(I){F.set("hours",C);
I.firstChild.data=F.getDate();
I.refDate=F.getTime();
F.setTime(F.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($(A))=="element"){this.inputs=$H({start:$(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)
}}});
FormValidator.Tips=new Class({Extends:FormValidator.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);
$(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")){if(B){B.show()
}}if(this.options.serial){var A=this.element.getElements(".validation-failed, .warning");
if(A.length){A.each(function(J,I){var H=this.getAdvice(J);
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,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"));
A[A.reveal?"reveal":"show"]();
B.msgs[D]=A
},insertAdvice:function(A,D){var B=D.get("validatorProps");
if(!B.msgPos||!$(B.msgPos)){switch(D.type.toLowerCase()){case"radio":var C=D.getParent().adopt(A);
break;
default:$(A).inject($(D),"after")
}}else{$(B.msgPos).grab(A)
}A.position()
}});
var Fupdate;
(function(){Fupdate=new Class({Implements:[Options,Events,Class.Occlude,Class.ToElement],options:{requestOptions:{evalScripts:true,useWaiter:true,link:"ignore"},extraData:{},resetForm:true},property:"fupdate",initialize:function(B,C,A){this.element=$(B);
if(this.occlude()){return this.occluded
}this.update=$(C);
this.setOptions(A);
this.makeRequest();
if(this.options.resetForm){this.request.addEvent("success",function(){$try(function(){$(this).reset()
}.bind(this));
if(window.OverText){OverText.update()
}}.bind(this))
}this.addFormEvent()
},makeRequest:function(){this.request=new Request.HTML($merge({url:$(this).get("action"),update:this.update,emulation:false,waiterTarget:$(this),method:$(this).get("method")||"post"},this.options.requestOptions)).addEvents({success:function(B,A){["success","complete"].each(function(C){this.fireEvent(C,[this.update,B,A])
},this)
}.bind(this),failure:function(A){this.fireEvent("failure",A)
}.bind(this),exception:function(){this.fireEvent("failure",xhr)
}.bind(this)})
},addFormEvent:function(){var A=$(this).retrieve("validator");
if(A){A.addEvent("onFormValidate",function(C,B,D){if(C||!A.options.stopOnFailure){if(D&&D.stop){D.stop()
}this.send()
}}.bind(this))
}else{$(this).addEvent("submit",function(B){B.stop();
this.send()
}.bind(this))
}},send:function(){var B=$(this).toQueryString().trim();
formData=B.parseQueryString();
var A=$H(this.options.extraData).combine(formData);
this.fireEvent("send",[$(this),A]);
this.request.send({data:A});
return this
}});
Element.Properties.fupdate={set:function(){var B=Array.link(arguments,{options:Object.type,update:Element.type,updateId:String.type});
var C=B.update||B.updateId;
var A=this.retrieve("fupdate");
if(C){if(A){A.update=$(C)
}this.store("fupdate:update",C)
}if(B.options){if(A){A.setOptions(B.options)
}this.store("fupdate:options",B.options)
}return this
},get:function(){var A=Array.link(arguments,{options:Object.type,update:Element.type,updateId:String.type});
var B=A.update||A.updateId;
if(A.options||B||!this.retrieve("fupdate")){if(A.options||!this.retrieve("fupdate:options")){this.set("fupdate",A.options)
}if(B){this.set("fupdate",B)
}this.store("fupdate",new Fupdate(this,this.retrieve("fupdate:update"),this.retrieve("fupdate:options")))
}return this.retrieve("fupdate")
}};
Element.implement({fupdate:function(B,A){this.get("fupdate",B,A).send();
return this
}})
})();
Fupdate.Append=new Class({Extends:Fupdate,options:{useReveal:true,revealOptions:{},inject:"bottom"},makeRequest:function(){this.request=new Request.HTML($merge({url:$(this).get("action"),waiterTarget:$(this)},this.options.requestOptions,{evalScripts:false})).addEvents({success:function(B,G,F,A){var C=new Element("div").set("html",F).hide();
var D=C.getChildren();
if(D.length==1){C=D[0]
}C.inject(this.update,this.options.inject);
if(this.options.requestOptions.evalScripts){$exec(A)
}this.fireEvent("beforeEffect",C);
var E=function(){this.fireEvent("success",[C,this.update,B,G,F,A])
}.bind(this);
if(this.options.useReveal){C.set("reveal",this.options.revealOptions).get("reveal").chain(E);
C.reveal()
}else{E()
}}.bind(this),failure:function(A){this.fireEvent("failure",A)
}.bind(this)})
}});
(function(){var A=function(C){return{Extends:C,options:{stickyWinToUse:StickyWin.Modal,stickyWinOptions:{},useUi:true,stickyWinUiOptions:{width:500},useWaiter:true},initialize:function(E,F,D){this.setOptions(D);
this.update=$(F);
this.makeStickyWin(E);
this.swin.addEvent("close",function(){if(this.request&&this.request.waiter){this.request.waiter.stop()
}});
this.addEvent("success",this.hide.bind(this))
},makeStickyWin:function(D){if($(D)){D=$(D)
}this.swin=new this.options.stickyWinToUse({content:this.options.useUi?StickyWin.ui("Update Info",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:{useWaiter:this.options.useWaiter,waiterTarget:$(this),waiterOptions:{layer:{styles:{zIndex:10001}}}}});
this.makeRequest();
this.addFormEvent();
$(this).store("fupdate",this)
}}
};
Fupdate.Prompt=new Class(A(Fupdate));
if(Fupdate.Append){Fupdate.Append.Prompt=new Class(A(Fupdate.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("Update Info",E,this.options.stickyWinUiOptions):E;
this.swin.setContent(G);
this.element=this.swin.win.getElement("form");
this.initAfterUpdate();
this.swin.show();
if(this.options.requestOptions.evalScripts){$exec(F)
}}.bind(this)},this.options.stickyWinOptions));
return this.swin
},prompt:function(){this.makeStickyWin().update();
return this
}}
};
Fupdate.AjaxPrompt=new Class(B(Fupdate.Prompt));
if(Fupdate.Append){Fupdate.Append.AjaxPrompt=new Class(B(Fupdate.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=$(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){$(this).set("hideFocus",true)
}else{$(this).setStyle("outline","0")
}}).delay(500,this)
}$(this).addClass(this.options.focusedClass)
},blur:function(){$(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,baseHref:"http://www.cnet.com/html/rb/assets/global/Picker",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=$(B);
if(!this.input){return 
}this.picklets=A;
this.setUpObservers()
},writeCss:function(){var B=this.options.baseHref;
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(E){this.getResults(E.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(G,C){try{var E=($type(G.style))?G.style:{};
var B=(Browser.Engine.trident)?new Element("<"+G.tagName+' name="'+C+'" />'):new Element(G.tagName,{name:C});
B.setStyles(E);
if(G.type){B.set("type",G.type)
}if(G.tip&&Tips){B.set("title",G.tip);
new Tips([B],{onShow:function(I){this.shown=true;
(function(){if(!this.shown){return 
}$(I).setStyles({display:"block",opacity:0});
new Fx.Tween(I,{property:"opacity",duration:300}).start(0,0.9)
}).delay(500,this)
},onHide:function(I){I.setStyle("visibility","hidden");
this.shown=false
}})
}if(G.tagName=="select"){G.value.each(function(K,I){var J=new Element("option",{value:K});
J.text=(G.optionNames&&G.optionNames[I])?$pick(G.optionNames[I],K):K;
B.adopt(J)
})
}else{B.set("value",$pick(G.value,""))
}var D=new Element("tr");
var H=0;
if(G.instructions){D.adopt(new Element("td").set("html",G.instructions))
}else{H=2
}var A=new Element("td").adopt(B);
if(H){A.set("colspan",H)
}D.adopt(A);
return{holder:D,input:B}
}catch(F){dbug.log(F);
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(F){this.preview=true;
this.sliderContent.empty();
var E=this.getPreview(B);
if($type(E)=="string"){this.sliderContent.set("html",E)
}else{if($(E)){this.sliderContent.adopt(E)
}}this.showPreview.delay(200,this)
}.bind(this));
A.addEvent("mouseleave",function(E){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){$(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=$(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=$(B);
if(this.occlude()){return this.occluded
}this.commands=new Hash($extend(SimpleEditor.commands,A||{}));
this.buttons=$$(C);
this.buttons.each(function(D){dbug.log(D,D.addEvent);
D.addEvent("click",function(){this.exec(D.get("rel"))
}.bind(this))
}.bind(this));
$(this).addEvent("keydown",function(E){if(E.control||E.meta){var D=this.shortCutToKey(E.key,E.shift);
if(D){E.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($(this).scrollTop||$(this).scrollLeft){B={scrollTop:$(this).getScroll().y,scrollLeft:$(this).getScroll().x}
}if(this.commands.has(A)){this.commands.get(A).command($(this))
}if(B){$(this).set("scrollTop",B.getScroll().y);
$(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,baseHref:"http://www.cnet.com/html/rb/assets/global/tips",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,"g"),"defaultTagBuilderStyle")
},prompt:function(D){this.target=$(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){if(this.options.selectLists[G]){var 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{var 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=B.table;
this.body=new Element("div",{styles:{overflow:"auto",maxHeight:this.options.maxHeight}}).adopt(this.form);
this.validator=new FormValidator(this.form);
this.validator.insertAdvice=function(C,E){var D=$(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){simpleErrorPopup("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:", ",separatorSplit:/\s*[,;]\s*/,autoTrim:true,allowDupes:false,cache:true,relative:false},initialize:function(B,A){this.element=$(B);
this.setOptions(A);
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($(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(B){var A=new RegExp(((this.options.filterSubset)?"":"^")+this.queryValue.escapeRegExp(),(this.options.filterCase)?"":"i");
return(B||this.tokens).filter(A.test,A)
},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=$(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=$(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))
};
var Lightbox=new Class({Implements:[Options,Events,Modalizer],Binds:["click","keyboardListener","addHtmlElements"],options:{resizeDuration:400,initialWidth:250,initialHeight:250,zIndex:5000,animateCaption:true,showCounter:true,autoScanLinks:true,relString:"lightbox",useDefaultCss:true,assetBaseUrl:"http://www.cnet.com/html/rb/assets/global/slimbox/",overlayStyles:{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.setModalOptions({onModalHide:this.close.bind(this)});
this.overlay=this.layer().addClass("lbOverlay");
this.setModalStyle($merge(this.options.overlayStyles,{opacity:0}));
this.popup=new Element("div",{"class":"lbPopup"}).inject(this.container);
this.overlay.inject(this.popup);
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.overlay.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={overlay:new Fx.Tween(this.overlay,{property:"opacity",duration:500}).set(0),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($("LightboxCss")){return 
}new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:this.options.assetBaseUrl+"slimbox.css",id:"LightboxCss"}).inject(document.head)
}.bind(this))
},click:function(E){link=$(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.modalShow();
this.fx.overlay.start(0,this.options.overlayStyles.opacity);
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("+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){$(this.preloadPrev).set("src",this.images[this.activeImage-1][0])
}if(this.activeImage!=(this.images.length-1)){$(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.fx.overlay.chain(this.setup.pass(false,this)).start(0);
return 
}});
window.addEvent("domready",function(){if($(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"});
(function(){var F=function(G,I){if(G==I.target||G.hasChild(I.target)){var H=I.relatedTarget;
if(H==undefined){return true
}if(H===false){return false
}return($type(G)!="document"&&H!=G&&H.prefix!="xul"&&!G.hasChild(H))
}};
var B=function(M,N){var L=M.target;
var H=/^(mouseover|mouseout)$/.test(M.type);
var J=this.getElements(N);
var G=J.indexOf(L);
if(G>=0){return J[G]
}for(var I=J.length;
I--;
){var K=J[I];
if(K==L||K.hasChild(L)){return(!H||F(K,M))?K:false
}}};
var C={test:/^.*:relay?\(.*?\)$/,event:/.*?(?=:relay\()/,selector:/^.*?:relay\((.*)\)$/,warn:/^.*?\(.*?\)$/};
var E=function(G){if(G.test(C.test)){return{event:G.match(C.event),selector:G.replace(C.selector,"$1")}
}else{if(G.test(/^.*?\(.*?\)$/)){if(window.console&&console.warn){console.warn("The selector "+G+" could not be delegated; the syntax has changed. Check the documentation.")
}}}return{event:G}
};
var A=Element.prototype.addEvent,D=Element.prototype.removeEvent;
Element.implement({addEvent:function(J,I){var K=E(J);
if(K.selector){var H=this.retrieve("$moo:delegateMonitors",{});
if(!H[J]){var G=function(M){var L=B.call(this,M,K.selector);
if(L){this.fireEvent(J,[M,L],0,L)
}}.bind(this);
H[J]=G;
A.call(this,K.event,G)
}}return A.apply(this,arguments)
},removeEvent:function(J,I){var K=E(J);
if(K.selector){var H=this.retrieve("events");
if(!H||!H[J]||(I&&!H[J].keys.contains(I))){return this
}if(I){D.apply(this,[J,I])
}else{D.apply(this,J)
}var H=this.retrieve("events");
if(H&&H[J]&&H[J].length==0){var G=this.retrieve("$moo:delegateMonitors",{});
D.apply(this,[K.event,G[J]]);
delete G[J]
}return this
}return D.apply(this,arguments)
},fireEvent:function(J,H,G,K){var I=this.retrieve("events");
if(!I||!I[J]){return this
}I[J].keys.each(function(L){L.create({bind:K||this,delay:G,"arguments":H})()
},this);
return this
}})
})();
var PostEditor=new Class({Implements:[Options],tab:"\t",options:{snippets:{},smartTypingPairs:{},selections:{}},initialize:function(B,A){if(Browser.Engine.trident){return 
}this.element=$(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 E=this.options.smartTypingPairs[A];
if(E){if($type(E)=="string"){E={pair:E}
}if(!E.scope||this.scope(E.scope)){var B=this.ss(),C=this.se(),F=this.getStart();
if(B==C){this.value([F,E.pair,this.getEnd()]);
this.selectRange(F.length,0)
}else{D.preventDefault();
this.ssKey=B;
this.seKey=C;
this.value([F,A,this.slice(B,C),E.pair,this.getEnd()]);
this.selectRange(B+1,C-B)
}}E=null;
return true
}return false
},filterBySelect:function(G){var B=String.fromCharCode(G.charCode);
if(G.ctrlKey&&G.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(),F=this.se(),E=D.apply(this,[this.slice(C,F)]);
if(E){var H=this.getStart();
if($type(E)=="array"){this.value([H,E.join(""),this.getEnd()]);
this.selectRange(H.length+E[0].length,E[1].length)
}else{if(E.selection){if(E.snippet){H=this.slice(0,E.selection[0]);
var A=this.slice(E.selection[1],this.element.value.length);
this.value([H,E.snippet.join(""),A]);
this.selectRange(H.length+E.snippet[0].length,E.snippet[1].length)
}else{this.selectRange(E.selection[0],E.selection[1])
}}else{this.value([H,E.snippet.join(""),this.getEnd()]);
this.selectRange(H.length+E.snippet[0].length,E.snippet[1].length)
}}}}}}},filterByTab:function(E){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(E.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(E){this.updateScroll();
var B=this.ss();
var D=this.se();
var F=this.getStart();
if(B==D){var A=F.split("\n").pop(),C=A.match(/^\s+/gi);
if(C){E.preventDefault();
C=C.join("");
this.value([F,"\n",C,this.getEnd()]);
this.selectRange(B+1+C.length,0)
}}},onBackspace:function(E){var C=this.ss();
var D=this.se();
if(C==D&&this.slice(C-this.tabl,C)==this.tab){E.preventDefault();
var H=this.getStart(this.tab),B=this.slice(C,this.element.value.length);
if(H.match(/\n$/g)&&B.match(/^\n/g)){this.value([H,this.slice(C-1,this.element.value.length)])
}else{this.value([H,B])
}this.selectRange(C-this.tabl,0)
}else{if(C==D){var A=this.slice(C-1,C),G=this.slice(C,C+1),F=this.options.smartTypingPairs[A];
if($type(F)=="string"){F={pair:F}
}if(F&&F.pair==G){this.value([this.getStart(F.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(J){J.preventDefault();
var Q=this.ss(),K=this.se(),D=this.slice(Q,K),O=this.getStart();
if(this.filterCompletion(J,Q,K)){return 
}if(this.filterAutoTab(J,Q,K)){return 
}if(Q!=K&&D.indexOf("\n")!=-1){var B=D.replace(/\n/g,"\n"+this.tab);
this.value([O,this.tab,B,this.getEnd()]);
this.selectRange(Q+this.tabl,K+(this.tabl*D.split("\n").length)-Q-this.tabl)
}else{var I=null;
for(var N in this.options.snippets){var M=this.options.snippets[N];
if($type(M)=="function"){continue
}if(O.length-N.length==-1){continue
}if(O.length-N.length==O.lastIndexOf(N)){if($type(M)=="array"){M={snippet:M}
}I=Object.extend({},M);
break
}}if(I&&(!I.scope||this.scope(I.scope))){if(I.command){var G=I.command.apply(this,[N]);
if($type(G)=="array"){I.snippet=G
}else{I=G
}}var A=I.snippet.copy(),E=O.split("\n").pop().match(/^\s+/gi);
var C=this.getStart(I.key||N);
if(E){E=E.join("");
A[0]=A[0].replace(/\n/g,"\n"+E);
A[1]=A[1].replace(/\n/g,"\n"+E);
A[2]=A[2].replace(/\n/g,"\n"+E)
}this.value([C,A[0],A[1],A[2],this.getEnd()]);
if(I.tab){this.autoTab={tab:I.tab.copy(),snippet:A.copy(),start:I.start};
var P=this.autoTab.tab.shift();
this.autoTab.ss=A[1].indexOf(P);
if(this.autoTab.ss>-1){this.autoTab.ssLast=C.length+A[0].length+this.autoTab.ss;
this.ssKey=this.autoTab.ssLast;
this.seKey=this.ssKey+P.length;
this.completion=null;
if(I.completion){this.autoTab.completion=I.completion;
this.autoTab.item=P;
this.autoTab.loop=true;
if(typeof I.loop=="boolean"){this.autoTab.loop=I.loop
}var F=this.autoTab.completion[P];
if(F){var H=[P].extend(F);
var L=F.copy().extend([""]);
this.autoTab.index=P;
this.completion=L.associate(H)
}}this.selectRange(C.length+A[0].length+this.autoTab.ss,P.length)
}else{this.autoTab=null;
this.selectRange(C.length+A[0].length,A[1].length)
}}else{this.selectRange(C.length+A[0].length,A[1].length)
}A=null
}else{this.value([O,this.tab,this.slice(Q,this.element.value.length)]);
if(Q==K){this.selectRange(Q+this.tabl,0)
}else{this.selectRange(Q+this.tabl,K-Q)
}}}},filterAutoTab:function(F,J,G){if(this.autoTab){var A=this.autoTab.tab.length;
if(A){if(this.autoTab.ssLast<=J){var I=this.autoTab.tab.shift();
var E=this.slice(J,J+this.autoTab.snippet[1].length-this.autoTab.ss).indexOf(I);
if(A==1&&!I){var C=this.autoTab.snippet[2].length;
if($type(this.autoTab.start)=="number"){C=this.autoTab.start
}else{if(this.autoTab.start){C=0
}}this.selectRange(G+this.getEnd().indexOf(this.autoTab.snippet[2])+C,0);
this.completion=null;
return true
}else{if(E>-1){this.autoTab.ss=E;
this.autoTab.ssLast=E+J;
this.ssKey=this.autoTab.ssLast;
this.seKey=this.ssKey+I.length;
this.autoTab.item=I;
if(this.completion){var B=this.autoTab.completion[I];
if(B){var D=[I].extend(B);
var H=B.copy().extend([""]);
this.autoTab.index=I;
this.completion=H.associate(D)
}else{this.completion=null
}}this.selectRange(J+E,I.length);
return true
}else{this.onTab(F);
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:["$('","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;"),""]
}}}});