
   if(!dbugScripts("commerce",["commerce.tron.overview.js"])) {
   /*	commerce.tron.overview.js - packed	*/
       Element.implement({tidy:function(){try{this.set("value",this.get("value").tidy());}catch(A){dbug.log("element.tidy error: %o",A);}},getTextInRange:function(B,A){return this.get("value").substring(B,A);},getSelectedText:function(){if(Browser.Engine.trident){return document.selection.createRange().text;}return this.get("value").substring(this.getSelectionStart(),this.getSelectionEnd());},getSelectionStart:function(){if(Browser.Engine.trident){var B=(Browser.Engine.trident4)?3:2;this.focus();var A=document.selection.createRange();if(A.compareEndPoints("StartToEnd",A)!=0){A.collapse(true);}return A.getBookmark().charCodeAt(2)-B;}return this.selectionStart;},getSelectionEnd:function(){if(Browser.Engine.trident){var B=(Browser.Engine.trident4)?3:2;var A=document.selection.createRange();if(A.compareEndPoints("StartToEnd",A)!=0){A.collapse(false);}return A.getBookmark().charCodeAt(2)-B;}return this.selectionEnd;},getSelectedRange:function(){return{start:this.getSelectionStart(),end:this.getSelectionEnd()};},setCaretPosition:function(A){if(A=="end"){A=this.get("value").length;}this.selectRange(A,A);return this;},getCaretPosition:function(){return this.getSelectedRange().start;},selectRange:function(C,A){this.focus();if(Browser.Engine.trident){var B=this.createTextRange();B.collapse(true);B.moveStart("character",C);B.moveEnd("character",A-C);B.select();return this;}this.setSelectionRange(C,A);return this;},insertAtCursor:function(C,A){var D=this.getSelectionStart();var B=this.getSelectionEnd();this.set("value",this.get("value").substring(0,D)+C+this.get("value").substring(B,this.get("value").length));if($pick(A,true)){this.selectRange(D,D+C.length);}else{this.setCaretPosition(D+C.length);}return this;},insertAroundCursor:function(C,A){C=$extend({before:"",defaultMiddle:"SOMETHING HERE",after:""},C);value=this.getSelectedText()||C.defaultMiddle;var F=this.getSelectionStart();var B=this.getSelectionEnd();if(F==B){var E=this.get("value");this.set("value",E.substring(0,F)+C.before+value+C.after+E.substring(B,E.length));this.selectRange(F+C.before.length,B+C.before.length+value.length);E=null;}else{E=this.get("value").substring(F,B);this.set("value",this.get("value").substring(0,F)+C.before+E+C.after+this.get("value").substring(B,this.get("value").length));var D=F+C.before.length;if($pick(A,true)){this.selectRange(D,D+E.length);}else{this.setCaretPosition(D+E.length);}}return this;}});Element.Properties.inputValue={get:function(){switch(this.get("tag")){case"select":vals=this.getSelected().map(function(C){var B=$pick(C.get("value"),C.get("text"));return(B=="")?C.get("text"):B;});return this.get("multiple")?vals:vals[0];case"input":switch(this.get("type")){case"checkbox":return this.get("checked")?this.get("value"):false;case"radio":var A;if(this.get("checked")){return this.get("value");}$(this.getParent("form")||document.body).getElements("input").each(function(B){if(B.get("name")==this.get("name")&&B.get("checked")){A=B.get("value");}},this);return A||null;}case"input":case"textarea":return this.get("value");default:return this.get("inputValue");}},set:function(A){switch(this.get("tag")){case"select":this.getElements("option").each(function(C){var B=$pick(C.get("value"),C.get("text"));if(B==""){B=C.get("text");}C.set("selected",$splat(A).contains(B));});break;case"input":if(["radio","checkbox"].contains(this.get("type"))){this.set("checked",$type(A)=="boolean"?A:$splat(A).contains(this.get("value")));break;}case"textarea":case"input":this.set("value",A);break;default:this.set("inputValue",A);}return this;},erase:function(){switch(this.get("tag")){case"select":this.getElements("option").each(function(A){A.erase("selected");});break;case"input":if(["radio","checkbox"].contains(this.get("type"))){this.set("checked",false);break;}case"input":case"textarea":this.set("value","");break;default:this.set("inputValue","");}return this;}};window.addEvent("domready",function(){var B=new Element("div").setStyles({position:"fixed",top:0,right:0}).inject(document.body);var A=(B.offsetTop===0);B.dispose();Browser.set("supportsPositionFixed",A);});Element.implement({pin:function(B){if(this.getStyle("display")=="none"){dbug.log("cannot pin "+this+" because it is hidden");return ;}if(B!==false){var C=this.getPosition();if(!this.get("pinned")){var E={top:(C.y-window.getScroll().y),left:(C.x-window.getScroll().x)};if(Browser.get("supportsPositionFixed")){this.setStyle("position","fixed").setStyles(E);}else{this.setStyles({position:"absolute",top:C.y,left:C.x});window.addEvent("scroll",function(){if(this.get("pinned")){var F={top:(E.top.toInt()+window.getScroll().y),left:(E.left.toInt()+window.getScroll().x)};this.setStyles(F);}}.bind(this));}this.set("pinned",true);}}else{var D;if(!Browser.Engine.trident){if(this.getParent().getComputedStyle("position")!="static"){D=this.getParent();}else{D=this.getParent().getOffsetParent();}}var C=this.getPosition(D);this.set("pinned",false);var A=(Browser.get("supportsPositionFixed"))?{top:(C.y+window.getScroll().y),left:(C.x+window.getScroll().x)}:{top:(C.y),left:(C.x)};this.setStyles($merge(A,{position:"absolute"}));}return this;},unpin:function(){return this.pin(false);},togglepin:function(){this.pin(!this.get("pinned"));}});var TextFieldCounter=new Class({Implements:[Options,Events],options:{countUpdateSelector:".cnt",fieldSelector:"textarea",commonParentSelector:"dd",errorClass:"validation-advice",findCounter:function(A){return A.getParent(this.options.commonParentSelector).getElement(this.options.countUpdateSelector);}},initialize:function(B,A){this.setOptions(A);this.form=$(B);this.findCounter=this.options.findCounter;this.form.getElements(this.options.fieldSelector).each(this.setFieldValidation.bind(this));this.fireEvent("onInit");},setFieldValidation:function(D){var B=D.get("validatorProps");if(!B){return ;}if(window.MooTools&&MooTools.version=="1.2dev"){if($type(B)!="object"){B=JSON.decode(B);}else{if(typeOf(B)!="object"){B=JSON.decode(B);}}}if(!B&&!B.maxLength){return ;}try{var A=this.findCounter(D);}catch(C){var A=null;}if(!A){return ;}D.addEvent("keyup",function(){var E=D.value.trim().length;A.set("text",E);if((E<(B.minLength||0))||(E>B.maxLength)){A.addClass(this.options.errorClass);}else{A.removeClass(this.options.errorClass);}}.bind(this));},resetCounter:function(B){var A=this.findCounter(B);if(!A){return ;}A.set("text","0").removeClass(this.options.errorClass);},resetAllCounters:function(){this.form.getElements(this.options.fieldSelector).each(this.resetCounter.bind(this));}});var FormRecycler={Base:new Class({Implements:[Options,Events],options:{clone:false,findLocalData:$lambda({}),resetOnMove:true,resetOnHide:false},initialize:function(B,A){this.setOptions(A);this.shell=(this.options.clone)?$(B).clone():$(B);this.form=(this.shell.get("tag")=="form")?this.shell:this.shell.getElement("form");if(!this.form){return null;}this.findLocalData=this.options.findLocalData;this.form.store("mobileForm",this);this.fireEvent("onInitialize");return this;},relocateForm:function(A){this.removeLocalParams();if(this.options.resetOnMove){this.form.reset();this.fireEvent("onReset");}this.setLocalData(this.findLocalData(A));this.fireEvent("onRelocate",A);},removeLocalParams:function(){this.form.getElements("input").each(function(A){if(A.getProperty("local")){A.dispose();}});},setLocalData:function(A){if(!A||$type(A)!="object"){return null;}$each(A,function(C,B){new Element("input",{type:"hidden",name:B,value:C,local:"true"}).inject(this.form);},this);},move:function(A){A=$(A);if(!A){return false;}this.relocateForm(A);return A;},toElement:function(){return this.shell;}})};$extend(FormRecycler,{Inline:new Class({Extends:FormRecycler.Base,Implements:Chain,options:{hideFormsInParent:true,revealOptions:{},firstParent:null},initialize:function(B,A){A=$merge(this.options,A||{});this.parent(B,A);if(!this.form){return null;}this.form.store("mobileForm",this);this.currentParent=$(this.options.firstParent)||null;this.shell.set("reveal",$merge(this.options.revealOptions,{onComplete:this.callChain.bind(this)}));return this;},relocateForm:function(A){this.parent(A);A.adopt(this.shell);this.currentParent=A;this.callChain();},move:function(A){this.clearChain();A=$(A);if(!A){return ;}if(this.currentParent==A){if(this.options.hideFormsInParent){this.hideOthers();}this.shell.get("reveal").toggle();return ;}this.chain(this.relocateForm.pass(A,this),this.show.bind(this));this.hide();},show:function(){if(this.shell.get("reveal").hiding){this.show.delay(10,this);return ;}if(this.options.hideFormsInParent){this.hideOthers();}this.shell.reveal();this.fireEvent("onShow");},hideOthers:function(){this.currentParent.getElements("form").each(function(A){try{if(A!=this.form){A.retrieve("mobileForm").toElement().dissolve();}}catch(B){dbug.log(B);}});},hide:function(){this.shell.dissolve();this.fireEvent("onHide");}}),GlobalModal:new Class({Extends:FormRecycler.Base,options:{modalOptions:{}},initialize:function(B,A){A=$merge(this.options,A||{});this.parent(B,A);try{this.modal=new GlobalModal($merge(this.options.modalOptions||{},{content:this.shell}));}catch(C){dbug.log("Modal failure: %o",C);}},move:function(A){A=this.parent(A);if(!A){return false;}this.show();},show:function(){this.modal.show();this.fireEvent("onShow");},hide:function(){this.modal.hide();this.fireEvent("onHide");}})});var StickyWinModal,StickyWinFxModal;(function(){var A=function(C){return{Extends:C,initialize:function(D){D=D||{};this.setModalOptions($merge(D.modalOptions||{},{onModalHide:function(){this.hide(false);}.bind(this)}));this.parent(D);},show:function(D){if($pick(D,true)){this.modalShow();this.win.getElements(this.modalOptions.elementsToHide).setStyle("opacity",1);}this.parent();},hide:function(D){if($pick(D,true)){this.modalHide();}this.parent($pick(D,true));}};};StickyWinModal=new Class(A(StickyWin));StickyWinModal.implement(new Modalizer);StickyWinFxModal=(typeof StickyWinFx!="undefined")?new Class(A(StickyWinFx)):$empty;try{StickyWinFxModal.implement(new Modalizer());}catch(B){}})();var ModalImageViewer=new Class({Implements:[Options,Events],options:{viewerClass:"modalImageViewer",captionClass:"caption",imageClass:"slideImage",navContainerClass:"navContainer",slide$$:"li.carouselSlide",transitionDuration:"short",startIndex:0,indicatorContainerClass:"pagination",nextButtonClass:"carouselNext",prevButtonClass:"carouselPrev",maxScale:1.1},initialize:function(A,B){this.setOptions(B);A=$splat(A);this.createViewer();this.addImages(A);this.singleton=(this.images.length==1);if(!this.singleton){this.addNavigation();}this.showSlide(this.options.startIndex);this.modal=new StickyWinModal({content:this.viewer,showNow:false,modalStyles:{"z-index":7000}});this.fireEvent("onInitialize");this.viewer.setStyle("display","block");},addImages:function(A){if(!this.images){this.images=[];}A.each(function(D,C){if(D.src){var B=new this.Slide(D,C,this.options);this.images.push(B);B.slide.inject(this.slideContainer);}},this);},createViewer:function(){this.viewer=new Element("div",{"class":this.options.viewerClass}).inject(document.body);this.slideContainer=new Element("ul",{styles:{position:"relative"}}).inject(this.viewer);new Element("a",{"class":"closeSticky",title:"Close"}).inject(this.viewer);},addNavigation:function(){this.navContainer=new Element("div",{"class":this.options.navContainerClass}).inject(this.viewer);new Element("a",{"class":this.options.prevButtonClass,text:"previous",title:"previous",events:{click:this.showSlide.bind(this,"prev")}}).inject(this.navContainer);this.countContainer=new Element("div",{"class":this.options.indicatorContainerClass,text:"image "}).inject(this.navContainer);this.currentCount=new Element("span",{text:"1"}).inject(this.countContainer);this.countContainer.appendText(" of "+this.images.length);new Element("a",{"class":this.options.nextButtonClass,text:"next",title:"next",events:{click:this.showSlide.bind(this,"next")}}).inject(this.navContainer);},setModalSize:function(){var A=window.getSize(),C,B=0;if(!this.maxSizes){this.maxSizes={width:0,height:0};this.images.map(function(E){var D=this.maxSizes;if(E.data.get("width")*this.options.maxScale>D.width){D.width=E.data.get("width")*this.options.maxScale;}if(E.data.get("height")*this.options.maxScale>D.height){D.height=E.data.get("height")*this.options.maxScale;}},this);}$each(this.viewer.getStyles("padding-top","padding-bottom"),function(D){B+=D.toInt();});this.modalSize={width:Math.floor(A.x*0.9).limit(250,1280),height:(Math.floor(A.y*0.9)-B).limit(190,768)};C=this.getScale(this.maxSizes);if(this.modalSize.width>this.maxSizes.width*C){this.modalSize.width=this.maxSizes.width*C;}if(this.modalSize.height>this.maxSizes.height*C){this.modalSize.height=this.maxSizes.height*C;}},getScale:function(D){var C=this.modalSize.width/D.width,A=this.modalSize.height/D.height,B=1;if(C<B||A<B){B=(C<A)?C:A;}return B;},sizeAll:function(){this.setModalSize();this.images.each(function(A){if(!A.loaded){A.loadSrc();}A.setImageSize(this.modalSize,this.getScale(A.data.getClean()));},this);this.viewer.setStyles({width:this.modalSize.width,height:this.modalSize.height});if(!this.singleton){this.navContainer.setStyle("left",Math.floor((this.modalSize.width/2)-(this.navContainer.getStyle("width").toInt()/2)));}},updateCount:function(A){if(!this.singleton){this.currentCount.set("text",A);}},show:function(){this.sizeAll();this.modal.position();this.modal.show();},hide:function(){this.modal.hide();},getToIndex:function(A){if(A=="next"){return(this.currentIndex==this.images.length-1)?0:this.currentIndex+1;}return((this.currentIndex==0)?this.images.length:this.currentIndex)-1;},showSlide:function(A){if($type(A)!="number"){A=this.getToIndex(A);}if(A==this.currentIndex){return this;}$each(this.images,function(D,C){var B=D.slide;D.slide.fade((C==A)?"in":"out");}.bind(this));this.fireEvent("onShowSlide",[A,this.currentIndex]);this.currentIndex=A;return this;},Slide:new Class({Implements:Options,initialize:function(C,B,A){this.data=new Hash(C);this.setImageDims();this.data.set("loadsrc",this.data.get("src"));this.data.set("src","/b.gif");this.setOptions(A);this.createSlide(B);return this;},setImageDims:function(){var B=this.data.get("src")||"",A=B.match(/_(\d+x\d+)\./);if(!A||!A[1]){return ;}A=A[1].split("x");if(A.length!=2){return ;}this.data.set("width",A[0].toInt());this.data.set("height",A[1].toInt());},createSlide:function(A){this.slide=new Element("li",{"class":"slide",styles:{display:(A==this.options.startIndex)?"block":"none",opacity:(A==this.options.startIndex)?1:0}});this.slide.adopt(this.image=new Element("img",$merge(this.data.getClean(),{"class":this.options.imageClass})));if(this.data.get("alt")){this.caption=new Element("p",{"class":this.options.captionClass,text:this.data.get("alt")}).inject(this.slide);}this.slide.set("tween",{duration:this.options.transitionDuration,onStart:function(){if(this.slide.getStyle("opacity")<0.1){this.slide.setStyle("display","block");}}.bind(this),onComplete:function(){if(this.slide.getStyle("opacity")<1){this.slide.setStyle("display","none");}}.bind(this)});},setImageSize:function(B,C){var A={width:Math.floor(this.data.get("width")*C),height:Math.floor(this.data.get("height")*C)};A["margin-top"]=Math.floor((B.height-A.height)/2);this.image.setStyles(A);},loadSrc:function(){this.image.setProperty("src",this.data.get("loadsrc"));this.loaded=true;}})});var CommentForm=new Class({Extends:FormRecycler.Inline,commentOptions:{submitElems:false,closeElems:false,useValidator:true,validatorOptions:{},useTextFieldCounter:true,submissionType:null,textFieldCounterOptions:{}},initialize:function(B,A){this.parent(B,$merge(this.commentOptions,A));try{this.validator=(this.options.useValidator)?new FormValidator(this.form,this.options.validatorOptions):false;}catch(C){dbug.log("Validator addition failed: %o",C);this.validator=false;}this.waiter=false;this.form.set("send",{onRequest:function(){if(!this.waiter){this.waiter=new Waiter(this.form);}this.waiter.start();}.bind(this),onComplete:function(){if(this.waiter){this.waiter.stop();}}.bind(this),onSuccess:this.handlePostResponse.bind(this),onFailure:this.handleFailure.bind(this)});if(this.options.useTextFieldCounter&&window.TextFieldCounter){this.textCounters=new TextFieldCounter(this.form,this.options.textFieldCounterOptions);}if(this.options.submitElems){this.form.getElements(this.options.submitElems).addEvent("click",this.doSubmit.bind(this));}if(this.options.closeElems){this.form.getElements(this.options.closeElems).addEvent("click",this.hide.bind(this));}this.form.addEvent("submit",function(D){D.stop();this.doSubmit();}.bind(this));},doSubmit:function(){if(!UserVars.isLoggedIn()){return false;}this.form.getElements("input[type=text], textarea").each(function(A){A.set("value",A.get("value").trim());});if(this.validator&&!this.validator.validate()){return false;}this.form.send();},hide:function(){this.parent();if(this.validator){this.chain(function(){this.validator.reset();if(this.options.useTextFieldCounter){this.textCounters.resetAllCounters();}this.fireEvent("onReset");this.callChain();}.bind(this));}},handlePostResponse:function(E){this.hide();var A=(PageVars.get("siteId")==162)?UserVars.get("userName"):'<a href="http://www.cnet.com/profile/'+UserVars.get("userName").replace(" ","+")+'">'+UserVars.get("userName")+"</a>";var D=(PageVars.get("siteId")==162)?"CBS'":"CNET's";this.responseObj={"delete":{fail:"There was a problem deleting this comment, please try again.",success:"This comment has been deleted.",pending:"This comment will be deleted shortly."},rop:{fail:"There was a problem submitting this form, please try again.",success:"Your message has been submitted and will be reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!",pending:"Your message will be submitted shortly and reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!"},comment:{fail:"There was a problem submitting your comment, please try again.",success:"Thanks for your comment, "+A+".",pending:"Thanks for your comment, "+A+". It will be posted to our site shortly."},edit:{fail:"There was a problem updating your comment, please try again.",success:"This comment has been successfully updated.",pending:"This comment will be updated shortly."},email:{fail:"There was a problem submitting this email, please try again.",success:"Thank you, "+A+". Your email has been sent.",pending:"Thank you, "+A+". Your email will be sent shortly."}};this.thanks=new Element("div",{"class":"userReviewForm thankyou"}).inject(this.shell,"before");if(E.match("<status>failure</status>")){var C=this.responseObj[this.options.submissionType].fail;}else{if(E.match("<status>pending</status>")){var C=this.responseObj[this.options.submissionType].pending;}else{var C=this.responseObj[this.options.submissionType].success;}}var B=new Element("h2",{html:'<span class="thanks">'+C+"</span>"}).inject(this.thanks);new Element("a",{"class":"closeConfirm",text:"close [x]",events:{click:function(){this.thanks.dissolve();}.bind(this)}}).inject(B,"after");if(E.match("<status>success</status>")&&this.options.submissionType=="comment"){var F=E.match(/name="assetId"\ value="(\d+)"/)[1].toInt();new Element("p",{"class":"spacer",text:"or"}).inject(B,"after");if(PageVars.get("siteId")!=162){new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({communityId:this.form.getElement("input[name=communityId]").get("value"),targetCommunityId:this.form.getElement("input[name=targetCommunityId]").get("value"),assetTypeId:this.form.getElement("input[name=assetTypeId]").get("value"),blogId:PageVars.get("pageNumber"),messageId:F}).get("href"),text:"view comment","class":"readMore"}).inject(B,"after");}else{new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({assetTypeId:this.form.getElement("input[name=assetTypeId]").value,messageId:F}).get("href"),text:"view comment","class":"readMore"}).inject(B,"after");}}this.fireEvent("onCommentSuccess",arguments);},handleFailure:function(){this.writeMessage('This action was not completed. Please try again, or notify us at our <a href="http://cnet.custhelp.com/">Help Center</a>.');},writeMessage:function(A){new Element("div",{html:A}).inject(this.shell,"before");}});var HelpfulVote=new Class({launchElem:null,Implements:[Options],options:{responseKey:"response",responseSuccess:1},initialize:function(C,A){C.stop();this.setOptions(A);var B=$(C.target);this.launchElem=(B.getProperty("href"))?B:B.getParent("a[href]");if(!this.launchElem){return false;}if(this.errorDiv){this.errorDiv.empty();}if(!CURS.Manager.checkLogin({loginHed:"Log in to CNET to vote for this review",registerHed:"Join CNET to vote for this review",appId:74,nextAction:this.makeRequest.bind(this),cval:"helpful"})){return false;}},makeRequest:function(){new Request({url:this.launchElem.get("href"),method:"get",onComplete:function(A){A=JSON.decode(A);this[(A&&A.status==this.options.responseSuccess)?"success":"failure"](A);}.bind(this)}).send();if(this.launchElem.getElement("span").hasClass("thumbsUp")){helpfulness="helpful";}if(this.launchElem.getElement("span").hasClass("thumbsDown")){helpfulness="nothelpful";}new JloggerLEVT.Social.Vote({applicationTags:{eventt:helpfulness,tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:helpfulness=="helpful"?"thumbsup":"thumbsdown",wdloc:"uotext"}}).ping();new Jlogger({tag:"submitHelpful"}).ping();},success:function(A){if(A[this.options.responseKey]){var B=A[this.options.responseKey];if($type(B)=="array"){B=B[0];}this.findParent().set("html",B);}},failure:function(A){if(A&&A.errors){$each(A.errors,function(B){this.getErrorDiv().appendText(B.message);}.bind(this));}else{this.getErrorDiv().set("html",'We\'re sorry, but an error has occurred. Please try again or contact our <a href="http://cnet.custhelp.com/" target="_new">Help Center</a>.');}},findParent:function(){return(this.launchElem.hasClass("rateUR"))?this.launchElem:this.launchElem.getParent(".rateUR");},getErrorDiv:function(){if(!this.errorDiv){this.errorDiv=this.findParent().getElement("div.error")||new Element("div",{"class":"error"}).inject(this.findParent(),"top");}return this.errorDiv;}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:"left",y:"top"}},initialize:function(){var B=Array.link(arguments,{options:Object.type,element:$defined});this.element=$(B.element);this.document=this.element.getDocument();this.setOptions(B.options||{});var A=$type(this.options.handle);this.handles=(A=="array"||A=="collection")?$$(this.options.handle):$(this.options.handle)||this.element;this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection=(Browser.Engine.trident)?"selectstart":"mousedown";this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach();},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this;},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);return this;},start:function(C){if(this.options.preventDefault){C.preventDefault();}this.fireEvent("beforeStart",this.element);this.mouse.start=C.page;var A=this.options.limit;this.limit={x:[],y:[]};for(var D in this.options.modifiers){if(!this.options.modifiers[D]){continue;}if(this.options.style){this.value.now[D]=this.element.getStyle(this.options.modifiers[D]).toInt();}else{this.value.now[D]=this.element[this.options.modifiers[D]];}if(this.options.invert){this.value.now[D]*=-1;}this.mouse.pos[D]=C.page[D]-this.value.now[D];if(A&&A[D]){for(var B=2;B--;B){if($chk(A[D][B])){this.limit[D][B]=$lambda(A[D][B])();}}}}if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};}this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop);},check:function(A){if(this.options.preventDefault){A.preventDefault();}var B=Math.round(Math.sqrt(Math.pow(A.page.x-this.mouse.start.x,2)+Math.pow(A.page.y-this.mouse.start.y,2)));if(B>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("start",this.element).fireEvent("snap",this.element);}},drag:function(A){if(this.options.preventDefault){A.preventDefault();}this.mouse.now=A.page;for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue;}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B];if(this.options.invert){this.value.now[B]*=-1;}if(this.options.limit&&this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1];}else{if($chk(this.limit[B][0])&&(this.value.now[B]<this.limit[B][0])){this.value.now[B]=this.limit[B][0];}}}if(this.options.grid[B]){this.value.now[B]-=(this.value.now[B]%this.options.grid[B]);}if(this.options.style){this.element.setStyle(this.options.modifiers[B],this.value.now[B]+this.options.unit);}else{this.element[this.options.modifiers[B]]=this.value.now[B];}}this.fireEvent("drag",this.element);},cancel:function(A){this.document.removeEvent("mousemove",this.bound.check);this.document.removeEvent("mouseup",this.bound.cancel);if(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);}},stop:function(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent("mousemove",this.bound.drag);this.document.removeEvent("mouseup",this.bound.stop);if(A){this.fireEvent("complete",this.element);}}});Element.implement({makeResizable:function(A){return new Drag(this,$merge({modifiers:{x:"width",y:"height"}},A));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false},initialize:function(C,B){this.parent(C,B);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);if(this.container&&$type(this.container)!="element"){this.container=$(this.container.getDocument().body);}C=this.element;var D=C.getStyle("position");var A=(D!="static")?D:"absolute";if(C.getStyle("left")=="auto"||C.getStyle("top")=="auto"){C.position(C.getPosition(C.offsetParent));}C.setStyle("position",A);this.addEvent("start",function(){this.checkDroppables();},true);},start:function(B){if(this.container){var D=this.element,J=this.container,E=J.getCoordinates(D.offsetParent),F={},A={};["top","right","bottom","left"].each(function(K){F[K]=J.getStyle("padding-"+K).toInt();A[K]=D.getStyle("margin-"+K).toInt();},this);var C=D.offsetWidth+A.left+A.right,I=D.offsetHeight+A.top+A.bottom;var H=[E.left+F.left,E.right-F.right-C];var G=[E.top+F.top,E.bottom-F.bottom-I];this.options.limit={x:H,y:G};}this.parent(B);},checkAgainst:function(B){B=B.getCoordinates();var A=this.mouse.now;return(A.x>B.left&&A.x<B.right&&A.y<B.bottom&&A.y>B.top);},checkDroppables:function(){var A=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=A){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);}if(A){this.overed=A;this.fireEvent("enter",[this.element,A]);}else{this.overed=null;}}},drag:function(A){this.parent(A);if(this.droppables.length){this.checkDroppables();}},stop:function(A){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed]);this.overed=null;return this.parent(A);}});Element.implement({makeDraggable:function(A){return new Drag.Move(this,A);}});mediaGallery=new Class({Implements:Options,options:{inactiveClass:"deactive"},initialize:function(A){this.setOptions(A);this.bound={panUp:this.panImage.bind(this,"up"),panDown:this.panImage.bind(this,"down"),panLeft:this.panImage.bind(this,"left"),panRight:this.panImage.bind(this,"right")};this.overThumb=false;this.createStickyContent();var B={large:"#productThumbs span img.imgThumb, #productThumbs span img.spVidThumb",zoom:".mediaGallery .imgThumb.toolTipElement"};$$(B.large).each(function(D,C){D.getParent().addEvents({mouseenter:function(){D.addClass("active");this.overThumb=true;this.showImageOverlay(C);}.bind(this),mouseleave:function(){D.removeClass("active");this.overThumb=false;this.hideImageOverlay.delay(200,this,C);}.bind(this)},this);},this);$$(B.zoom).each(function(C){if(!C.getParent("a")){C.addEvent("click",this.showZoomWindow.bind(this,C));}},this);},showImageOverlay:function(A){$("imageOverlay").setStyle("left","0px");$$("#imageOverlay img")[A].setStyles({display:"block","z-index":10});if(!$("universalVideo")){$("imageOverlay").setStyle("top","0px");}},hideImageOverlay:function(A){if(this.overThumb==false){$("imageOverlay").setStyle("left","-2000px");}$$("#imageOverlay img")[A].setStyles({display:"none","z-index":0});},showZoomWindow:function(A){if(!$("imageZoom")){this.zoomSticky=new GlobalModal({content:new Element("div").adopt(this.closeModalLink,this.imageContainer,this.navigation),id:"imageZoom",showNow:true,closeClassName:"closeModal",modalOptions:{modalStyles:{"background-color":"#333333",opacity:0.6}},onDisplay:function(){this.positioned=false;},onClose:function(){this.zoomIn.removeEvent("click");this.zoomOut.removeEvent("click");}.bind(this)});this.initStickyContent.delay(20,this,A);}else{this.zoomSticky.show();this.initStickyContent(A);}new Jlogger({ctype:"zoom;click",cval:"zoom;open",tag:"product-zoom"}).ping();},createStickyContent:function(){this.closeModalLink=new Element("a",{"class":"closeModal",html:"Close"});this.imageContainer=new Element("div",{"class":"zoomContainer"});this.navigation=new Element("div",{"class":"navigation"});this.panControls=new Element("div",{"class":"pan",html:"<p>PAN:</p>"});this.zoomControls=new Element("div",{"class":"zoom",html:"<p>ZOOM:</p>"});this.panUp=new Element("a",{id:"imagePanUp","class":"panArrow deactive"});this.panDown=new Element("a",{id:"imagePanDown","class":"panArrow deactive"});this.panLeft=new Element("a",{id:"imagePanLeft","class":"panArrow deactive"});this.panRight=new Element("a",{id:"imagePanRight","class":"panArrow deactive"});this.zoomIn=new Element("a",{id:"imageZoomIn","class":"zoomBtn"});this.zoomOut=new Element("a",{id:"imageZoomOut","class":"zoomBtn deactive"});this.panControls.adopt(this.panUp,this.panLeft,this.panRight,this.panDown);this.zoomControls.adopt(this.zoomIn,this.zoomOut);this.navigation.adopt(this.panControls,this.zoomControls);},initStickyContent:function(A){this.loadInitImg(A);this.zoomIn.addEvent("click",function(){this.zoomImgIn(A);}.bind(this));this.zoomOut.addEvent("click",function(){this.zoomImgOut(A);}.bind(this));this.zoomIn.removeClass(this.options.inactiveClass);$$(this.zoomOut,this.panUp,this.panDown,this.panLeft,this.panRight).addClass(this.options.inactiveClass);},loadInitImg:function(A){this.imageContainer.set("html","");this.detailImage=new Element("img",{src:A.get("initImg")}).inject(this.imageContainer);},zoomImgIn:function(A){if(this.detailImage.get("src").contains(A.get("initImg"))){this.detailImage.set("src",A.get("lrgImg"));this.detailImage.setStyles({width:A.get("lrgWidth").toInt(),height:A.get("lrgHeight").toInt(),left:(this.imageContainer.getStyle("width").toInt()/2)-(A.get("lrgWidth")/2),top:(this.imageContainer.getStyle("height").toInt()/2)-(A.get("lrgHeight")/2)});this.dragImg(this.detailImage);this.panUp.addEvent("click",this.bound.panUp);this.panDown.addEvent("click",this.bound.panDown);this.panLeft.addEvent("click",this.bound.panLeft);this.panRight.addEvent("click",this.bound.panRight);this.zoomIn.addClass(this.options.inactiveClass);$$(this.zoomOut,this.panUp,this.panDown,this.panLeft,this.panRight).removeClass(this.options.inactiveClass);}new Jlogger({ctype:"zoom;click",cval:"zoom;zoomIn",tag:"product-zoom"}).ping();},zoomImgOut:function(A){if(this.detailImage.get("src").contains(A.get("lrgImg"))){this.detailImage.set("src",A.get("initImg"));this.detailImage.setStyles({width:440,height:330,left:0,top:0});this.panUp.removeEvent("click",this.bound.panUp);this.panDown.removeEvent("click",this.bound.panDown);this.panLeft.removeEvent("click",this.bound.panLeft);this.panRight.removeEvent("click",this.bound.panRight);this.zoomIn.removeClass(this.options.inactiveClass);$$(this.zoomOut,this.panUp,this.panDown,this.panLeft,this.panRight).addClass(this.options.inactiveClass);}new Jlogger({ctype:"zoom;click",cval:"zoom;zoomOut",tag:"product-zoom"}).ping();},dragImg:function(B){this.leftLimit=(this.imageContainer.getStyle("width").toInt()-B.getStyle("width").toInt());this.rightLimit=0;this.topLimit=(this.imageContainer.getStyle("height").toInt()-B.getStyle("height").toInt());this.bottomLimit=0;if(Browser.Engine.trident){B.ondragstart=function(){return false;};}var A=new Drag(B,{snap:0,limit:{x:[this.leftLimit,this.rightLimit],y:[this.topLimit,this.bottomLimit]},onComplete:function(){if(B.getStyle("top").toInt()==this.bottomLimit){this.panUp.addClass(this.options.inactiveClass);}else{this.panUp.removeClass(this.options.inactiveClass);}if(B.getStyle("top").toInt()==this.topLimit){this.panDown.addClass(this.options.inactiveClass);}else{this.panDown.removeClass(this.options.inactiveClass);}if(B.getStyle("left").toInt()==this.rightLimit){this.panLeft.addClass(this.options.inactiveClass);}else{this.panLeft.removeClass(this.options.inactiveClass);}if(B.getStyle("left").toInt()==this.leftLimit){this.panRight.addClass(this.options.inactiveClass);}else{this.panRight.removeClass(this.options.inactiveClass);}new Jlogger({ctype:"pan;drag",cval:"pan;drag",tag:"product-pan"}).ping();}.bind(this)},this);},panImage:function(D){switch(D){case"up":if(this.detailImage.getStyle("top").toInt()+100<this.bottomLimit){this.panDown.removeClass(this.options.inactiveClass);this.detailImage.setStyle("top",(this.detailImage.getStyle("top").toInt()+100));}else{var C=this.bottomLimit-(this.detailImage.getStyle("top").toInt()+100);if(C<=this.bottomLimit){this.detailImage.setStyle("top",this.bottomLimit);this.panUp.addClass(this.options.inactiveClass);}}break;case"down":if(this.detailImage.getStyle("top").toInt()-100>this.topLimit){this.panUp.removeClass(this.options.inactiveClass);this.detailImage.setStyle("top",(this.detailImage.getStyle("top").toInt()-100));}else{var B=this.topLimit-(this.detailImage.getStyle("top").toInt()-100);if(B>=this.topLimit){this.detailImage.setStyle("top",this.topLimit);this.panDown.addClass(this.options.inactiveClass);}}break;case"left":if(this.detailImage.getStyle("left").toInt()+100<this.rightLimit){this.panRight.removeClass(this.options.inactiveClass);this.detailImage.setStyle("left",(this.detailImage.getStyle("left").toInt()+100));}else{var E=this.rightLimit-(this.detailImage.getStyle("left").toInt()+100);if(E<=this.rightLimit){this.detailImage.setStyle("left",this.rightLimit);this.panLeft.addClass(this.options.inactiveClass);}}break;case"right":if(this.detailImage.getStyle("left").toInt()-100>this.leftLimit){this.panLeft.removeClass(this.options.inactiveClass);this.detailImage.setStyle("left",(this.detailImage.getStyle("left").toInt()-100));}else{var A=this.leftLimit-(this.detailImage.getStyle("left").toInt()-100);if(A>=this.leftLimit){this.detailImage.setStyle("left",this.leftLimit);this.panRight.addClass(this.options.inactiveClass);}}break;}new Jlogger({ctype:"pan;click",cval:"pan;click",tag:"product-pan"}).ping();},panImgUp:function(B){if(B.getStyle("top").toInt()+100<this.bottomLimit){this.panDown.removeClass(this.options.inactiveClass);B.setStyle("top",(B.getStyle("top").toInt()+100));}else{var A=this.bottomLimit-(B.getStyle("top").toInt()+100);if(A<=this.bottomLimit){B.setStyle("top",this.bottomLimit);this.panUp.addClass(this.options.inactiveClass);}}},panImgDown:function(B){if(B.getStyle("top").toInt()-100>this.topLimit){this.panUp.removeClass(this.options.inactiveClass);B.setStyle("top",(B.getStyle("top").toInt()-100));}else{var A=this.topLimit-(B.getStyle("top").toInt()-100);if(A>=this.topLimit){B.setStyle("top",this.topLimit);this.panDown.addClass(this.options.inactiveClass);}}},panImgLeft:function(A){if(A.getStyle("left").toInt()+100<this.rightLimit){this.panRight.removeClass(this.options.inactiveClass);A.setStyle("left",(A.getStyle("left").toInt()+100));}else{var B=this.rightLimit-(A.getStyle("left").toInt()+100);if(B<=this.rightLimit){A.setStyle("left",this.rightLimit);this.panLeft.addClass(this.options.inactiveClass);}}},panImgRight:function(B){if(B.getStyle("left").toInt()-100>this.leftLimit){this.panLeft.removeClass(this.options.inactiveClass);B.setStyle("left",(B.getStyle("left").toInt()-100));}else{var A=this.leftLimit-(B.getStyle("left").toInt()-100);if(A>=this.leftLimit){B.setStyle("left",this.leftLimit);this.panRight.addClass(this.options.inactiveClass);}}}});var ThumbScroller=new Class({Extends:Fx.Scroll,scrollOptions:{thumbs:".box",axis:"x",thumbContainer:null,nav:{},startIndex:0,tolerance:0},initialize:function(A,B){if(typeof (A)=="string"){if($(A).retrieve("thumbscroller")){return false;}}else{if(A.retrieve("thumbscroller")){return false;}}this.parent(A,$merge(this.scrollOptions,B));this.element.store("thumbscroller",this);this.element.setStyle("overflow","hidden");this.computeDimensions();this.initNav();this.toIndex(this.options.startIndex);this.lastScroll=null;this.fireEvent("onInitialize");return this;},computeDimensions:function(){this.thumbs=this.element.getElements(this.options.thumbs);this.setParentSize();this.positions=this.getLocations();return this;},isAtEnd:function(A){A=A||this.getRange();var B=A[A.length-1];return(B.index==this.thumbs.length-1&&(B.type!="partial"||B.tolerated));},isAtStart:function(A){A=A||this.getRange();var B=A[0];return(B.index==0&&(B.type!="partial"||B.tolerated));},getLocations:function(){return this.thumbs.map(function(B){var C=B.getComputedSize()[this.getDir("total")];var A=B.getPosition(B.getParent())[this.getDir("xy")];return{size:C,start:A,end:C+A};},this);},initNav:function(){try{if(typeof (this.options.nav.next)=="string"){$$(this.options.nav.next).addEvent("click",this.toNextScreen.bind(this));}else{if(this.options.nav.next instanceof Array){this.options.nav.next[0].addEvent("click",this.toNextScreen.bind(this));}else{this.options.nav.next.addEvent("click",this.toNextScreen.bind(this));}}if(typeof (this.options.nav.previous)=="string"){$$(this.options.nav.previous).addEvent("click",this.toPreviousScreen.bind(this));}else{if(this.options.nav.previous instanceof Array){this.options.nav.previous[0].addEvent("click",this.toPreviousScreen.bind(this));}else{this.options.nav.previous.addEvent("click",this.toPreviousScreen.bind(this));}}if(typeof (this.options.nav.start)=="string"){$$(this.options.nav.start).addEvent("click",this.toStart.bind(this));}else{if(this.options.nav.start instanceof Array){this.options.nav.start[0].addEvent("click",this.toStart.bind(this));}else{this.options.nav.start.addEvent("click",this.toStart.bind(this));}}if(typeof (this.options.nav.end)=="string"){$$(this.options.nav.end).addEvent("click",this.toEnd.bind(this));}else{if(this.options.nav.end instanceof Array){this.options.nav.end[0].addEvent("click",this.toEnd.bind(this));}else{this.options.nav.end.addEvent("click",this.toEnd.bind(this));}}}catch(A){}},getDir:function(A){switch(A){case"total":if(this.options.axis=="y"){return"totalHeight";}return"totalWidth";case"dir":if(this.options.axis=="y"){return"height";}return"width";case"xy":default:if(this.options.axis=="y"){return"y";}return"x";}},getStart:function(A){if(this.options.axis=="y"){return[0,A];}return[A,0];},getStartPx:function(A){if(!A){return 0;}return this.positions[A].start-(this.positions[A].start-this.positions[A-1].end);},setParentSize:function(){var A=(this.options.thumbContainer)?this.element.getElement(this.options.thumbContainer):this.element.getElement(this.options.thumbs).getParent();var B=0;$each(this.thumbs,function(C){B+=C.getComputedSize({styles:["padding","border","margin"]})[this.getDir("total")];},this);A.setStyle(this.getDir("dir"),B);},getRange:function(E){if(isNaN(E)){E=this.element.getScroll()[this.getDir("xy")];}var D=this.element.getComputedSize({styles:["padding"]})[this.getDir("total")];var C=[];for(var A=0;A<this.positions.length;A++){var B=this.withinRange(this.positions[A],E,E+D);if(B){C.push($merge(B,{index:A}));if(B.where=="end"){break;}}}return C;},withinRange:function(C,B,A){if(C.end>B&&C.end<=A){if(C.start>=B){return{type:"full"};}else{return{type:"partial",where:"start",tolerated:((B-C.start)<=this.options.tolerance)};}}else{if(C.start>=B&&C.start<A){return{type:"partial",where:"end",tolerated:((C.start-A)<this.options.tolerance)};}else{if(C.start<B&&C.end>A){return{type:"full"};}}}return false;},toNextScreen:function(){var A=this.getRange();if(A.getLast().type=="partial"&&!A.getLast().tolerated&&A.length>1){this.start.run(this.getStart(this.getStartPx(A.getLast().index)),this);}else{if($(this.thumbs[A.getLast().index+1])){this.start.run(this.getStart(this.getStartPx(A.getLast().index+1)),this);}else{this.toEnd();}}this.lastScroll="next";},toPreviousScreen:function(){var A=this.getRange();var C=(A[0].type=="partial"&&!A[0].tolerated&&A.length>1)?A[0].index:A[0].index-1;if(!this.positions[C]){this.toStart();return ;}var B=this.positions[C].end-this.element.getComputedSize({styles:["padding"]})[this.getDir("total")];var E=this.getRange(B);var D=(E[0].type=="partial"&&E.length>1)?E[0].index+1:E[0].index;this.start.run(this.getStart(this.getStartPx(D)),this);this.lastScroll="previous";},toIndex:function(A){this.start.run(this.getStart(this.getStartPx(parseInt(A))),this);},toStart:function(){if(this.options.axis=="y"){this.toTop();}else{this.toLeft();}},toEnd:function(){if(this.options.axis=="y"){this.toBottom();}else{this.toRight();}}});var PromoModal=new Class({Implements:[Options,Events],options:{promoPath:"/html/cnet/reviews/idleMsg.html",timeout:300000,activityReset:true,activityActions:["click","scroll","mousemove","keypress"],testSuccess:function(){return true;}},timer:false,initialize:function(A){this.setOptions(A);this.bound={timerReset:this.resetTimer.bind(this)};this.setTimer();return this;},getContent:function(){this.container=this.container||new Element("div",{id:"promoModal",styles:{display:"none",position:"absolute"}}).inject(document.body);new Request({url:this.options.promoPath,onSuccess:this.success.bind(this),onFailure:this.failure.bind(this),onComplete:this.complete.bind(this)}).send();},success:function(){if(this.options.testSuccess.run(arguments,this)){this.loadPromo.run(arguments,this);this.fireEvent("onSuccess",arguments);}else{this.failure.run(arguments);}},failure:function(){this.fireEvent("onFailure",arguments);},complete:function(){this.fireEvent("onComplete",arguments);},loadPromo:function(A){if(A){this.container.set("html",A);this.promo=new StickyWinModal({content:this.container.get("html"),closeClassName:"closeModal",allowMultiple:false,onClose:function(){this.fireEvent("onClose");}.bind(this)});this.fireEvent("onDisplay");}else{dbug.log("Response text failure");}if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(B){window.removeEvent(B,this.bound.timerReset);},this);}},setTimer:function(){this.startTimer();if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(A){window.addEvent(A,this.bound.timerReset);},this);}},startTimer:function(){this.timer=this.getContent.delay(this.options.timeout,this);},resetTimer:function(){if(this.timer){$clear(this.timer);this.startTimer();}}});PromoModal.GlobalModal=new Class({Extends:PromoModal,loadPromo:function(A){if(A){this.container.set("html",A);this.promo=new GlobalModal({content:this.container.get("html")});this.promo.show();}else{dbug.log("Response text failure");}if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(B){window.removeEvent(B,this.bound.timerReset);},this);}}});if(!UserLists){var UserLists={};UserLists.Manager={listForms:new Hash({}),getUserListModal:function(B,A){CURS.Manager.checkLogin({loginHed:"Log in to CNET to add this product to a list",registerHed:"Join CNET to add this product to a list",appId:222,cval:"userlist",nextAction:function(){if(B=="AddToList"||B=="CreateList"){UserLists.Manager.initListAssetData(A);}UserLists.Manager.getUserListFiles(B);}.bind(UserLists)});},getUserListFiles:function(A){var B;if(dbug.enabled||(Browser.qs&&Browser.qs.jsdebug)){if(CBSi.jsdebug){if(CBSi.jsdebug=="true"){B="http://publish.cnet.com:8100/html/rb/js/tron/techtracker/techtracker.tron.userlists.process.js";}else{B="http://publish.cnet.com:8100/html/rb/js/~dev/"+CBSi.jsdebug+"/techtracker/techtracker.tron.userlists.process.js";}}else{B="http://i.i.com.com/cnwk.1d/html/rb/js/tron/techtracker/techtracker.tron.userlists.process.compressed.js";}}else{B="http://i.i.com.com/cnwk.1d/html/rb/js/tron/techtracker/techtracker.tron.userlists.process.compressed.js";}if(!UserLists.Process){new Asset.javascript(B,{id:"userListsProcess",onload:(!A)?function(){}:this.getUserListModalHtml.bind(this,A)});}else{if(A){this.getUserListModalHtml(A);}}},startProcess:function(A){dbug.log("start user list process");if(UserLists.Process&&$("userListShell")){UserLists.Process.showUserListForm(A);}},getUserListModalHtml:function(B){var A=new Hash();UserLists.UserListData.listItemsToAdd.each(function(C){if(C.assetTypeId==2){A.extend({techProductId:true});}else{if(C.assetTypeId==24){A.extend({softwareProductId:true});}}});if(!document.body.getElement(".globalModal.userList")){new Element("div",{id:"userListShell",styles:{display:"none"}}).inject(document.body);new Request({url:"/8690-4_"+PageVars.get("siteId")+"-0.html?nomesh&"+$time(),data:A,method:"get",onSuccess:function(C){$("userListShell").set("html",C);if($("userHasLists")){UserLists.Manager.userHasLists=true;}UserLists.Process.showUserListForm(B);}.bind(UserLists)}).send();}else{UserLists.Process.showUserListForm(B);}},initFormValidator:function(A){UserLists.Manager.listForms[A].validator=new UserListFormValidator($(A).getElement("form"),{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false,errorPrefix:""});},initListAssetData:function(A){UserLists.UserListData.listItemsToAdd.empty();UserLists.Manager.cvalTarget=(!$$(A).getParent(".contentTools"))?"button":"link";dbug.log(A);if(!A.length){A=[A];}A.each(function(C){var B={assetId:C.getProperty("productid").toInt(),assetTypeId:C.getProperty("producttype").toInt(),name:C.getProperty("productname"),image:C.getProperty("productimage")};dbug.log(B);if(C.getProperty("productSetId")){B.productSetId=C.getProperty("productsetid").toInt();}UserLists.UserListData.listItemsToAdd.push(B);});},pingDW:function(A,B,C){new Jlogger({asId:(UserLists.UserListData.listItemsToAdd.length>0)?UserLists.UserListData.listItemsToAdd[0].assetId:PageVars.get("assetId"),tag:A,element:false,ctype:B,cval:C}).ping();}};UserLists.ListItem={getItemAssetId:function(A){if(UserLists.ListItem.assetId){return UserLists.ListItem.assetId;}else{if(A){return A;}}},getItemAssetTypeId:function(A){if(UserLists.ListItem.assetTypeId){return UserLists.ListItem.assetTypeId;}else{if(A){return A;}}},getItemName:function(A){if(UserLists.ListItem.assetName){return UserLists.ListItem.assetName;}else{if(A){return A;}}},getDownloadProductSetId:function(A){if(UserLists.ListItem.productSetId){return UserLists.ListItem.productSetId;}else{if(A){return A;}}},getItemImage:function(A){if(UserLists.ListItem.assetImage){return UserLists.ListItem.assetImage;}else{if(A){return A;}}}};UserLists.UserListData={userListDataObj:new Hash(),addToListLaunchTarget:new Hash(),listItemsToAdd:[],listsAddedTo:[],addToDataObj:function(B,A){UserLists.UserListData.userListDataObj.extend({field:decodeURIComponent(A)});},getListId:function(){if(PageVars.get("pageType")==3460){if(PageVars.get("assetId")!=0){return PageVars.get("assetId");}else{return $("editList").getElement("input[name=listId]").get("value");}}}};}window.addEvent("domready",function(){$$("a.linkIcon.addToList").setStyle("visibility","visible");});var ScreenViewer=new Class({Implements:StyleWriter,initialize:function(A){this.images=A;if(!$type(A)=="array"||!A.length){return ;}$$("#photoThumbs a").each(function(C,B){C.removeProperty("href").addEvent("click",function(){try{if(!this.viewer){this.initViewer();}this.viewer.showSlide(B);this.viewer.show();}catch(D){dbug.log("Viewer initiailization failed: %o",D);}return false;}.bind(this));},this);},initViewer:function(){this.viewer=new ModalImageViewer(this.images,{onShowSlide:function(A){this.updateCount(A+1);}});this.resize=this.viewer.show.bind(this.viewer);this.checkResize=this.resizer.bind(this);this.viewer.modal.addEvents({onDisplay:function(){if(!this.viewer.modal.visible){window.addEvent("resize",this.checkResize);}}.bind(this),onClose:window.removeEvent.pass(["resize",this.checkResize])});},resizer:function(){if(this.viewer.modal.visible){$clear(this.resizing);this.resizing=this.resize.delay(10);}}});function pagingUO(B){var A=$("userRevDetailItem").retrieve("waiter",new Waiter($("userRevDetailItem")));new ContentUpdater("userReviewSingleResponse",{"ugcReviewPermalink-riaTile":{element:"userRevDetailItem",onRequest:function(){if(A){A.start();}},onSuccess:function(){if($("nextUO")){$("nextUO").addEvent("click",function(){try{pagingUO($("nextUO").href);}catch(C){dbug.log("Viewer initiailization failed: %o",C);}return false;}.bind(this));}if($("prevUO")){$("prevUO").addEvent("click",function(){try{pagingUO($("prevUO").href);}catch(C){dbug.log("Viewer initiailization failed: %o",C);}return false;}.bind(this));}},onComplete:function(){if(A){A.stop();}}}},{url:B,onTimeout:function(){if(A){A.stop();}},onFailure:function(){if(A){A.stop();}},timeout:4000}).send();}var StickyWinFx=new Class({Extends:StickyWin,options:{fade:true,fadeDuration:150,draggable:false,dragOptions:{},dragHandleSelector:".dragHandle",resizable:false,resizeOptions:{},resizeHandleSelector:""},setContent:function(A){this.parent(A);if(this.options.draggable){this.makeDraggable();}if(this.options.resizable){this.makeResizable();}return this;},hideWin:function(){if(this.options.fade){this.fade(0);}else{this.parent();}},showWin:function(){if(this.options.fade){this.fade(1);}else{this.parent();}},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");}}.bind(this));return this;},makeDraggable:function(){dbug.log("you must include Drag.js, cannot make draggable");},makeResizable:function(){dbug.log("you must include Drag.js, cannot make resizable");}});var WantItGotItHadIt=new Class({Implements:Options,options:{voteType:"",assetTypeId:"",voteNumElem:"",msgLocation:{position:"bottomLeft",edge:"upperLeft"}},initialize:function(B,A){this.setOptions(A);this.voteElems=$$(B);this.likeWaiter=new Waiter(this.voteElems,{baseHref:"http://i.i.com.com/cnwk.1d/i/News/",layer:{styles:{"z-index":10000000}},img:{src:"commentsLikeLoader.gif",styles:{width:16,height:16}}});this.voteElems.each(function(C){C.addEvent("click",function(D){this.likeWaiter.stop();CURS.Manager.checkLogin({registerHed:"Please tell us who you are",loginHed:"Please tell us who you are",appId:242,cval:"assetrating",nextAction:function(){this.likeWaiter.start(C);this.sendRequest(C);}.bind(this)});}.bind(this));}.bind(this));this.successMsg="";this.currentRateClass="";this.currentRateVal="";},sendRequest:function(C){var A=(C.hasClass("like"))?true:false;var B=(A)?8683:8680;var D=function(){if(A){switch(this.options.voteType){case"gotIt":return 1;break;case"wantIt":return 2;break;case"hadIt":return 3;break;default:return null;break;}}else{return null;}}.bind(this);new Request.JSON({url:"/"+B+"-4_"+PageVars.get("siteId")+"-0.html",data:{assetId:C.getProperty("assetId")||null,assetTypeId:this.options.assetTypeId,viewType:"json",assetVoteId:C.getProperty("assetVoteId")||null,value:D()},onSuccess:function(E){E=E.response;this.likeWaiter.stop();if(E){if(E.status["$"]=="success"){this.toggleBtnStates(A,E,C);if(A){this.showSuccessMsg(C);}this.likeWaiter.stop();}else{switch(E.errors.error["@name"]){case"ALREADY_VOTED":this.showFailureMsg(C,"You have already voted");this.toggleBtnStates(A,E,C);break;case"REMOVE_PROBLEM":this.showFailureMsg(C,"<b>Error: </b>There was a problem removing your vote. Please try again.");break;case"SUBMIT_PROBLEM":this.showFailureMsg(C,"<b>Error: </b>There was a problem submitting your vote. Please try again.");break;case"NOT_OWNER":this.showFailureMsg(C,"<b>Error: </b>You do not have a vote registered for this product.");break;case"REQUEST_PENDING":if(A){this.showSuccessMsg(C);}this.toggleBtnStates(A,E,C);break;case"MISSING_REQUIRED_FIELD":this.showFailureMsg(C,"<b>Error: </b>There was a problem submitting your vote. Please try again.");break;}}}}.bind(this),onFailure:function(){this.likeWaiter.stop();this.showFailureMsg(C,"<b>Error: </b>We're having trouble contacting our servers. Please try again later.");}.bind(this)}).send();},toggleBtnStates:function(D,G,H){var I,A,F,K;var B;var C=H.getProperty("assetId");var E=$$("a.gotIt[assetId="+C+"], a.wantIt[assetId="+C+"], a.hadIt[assetId="+C+"]");E.each(function(L){if(L.hasClass("unlike")){B=L;}});E.removeClass("unlike");E.addClass("like");G.data.datum.each(function(L){if(L["@name"]=="assetId"){K=L["@value"];}if(L["@name"]=="assetTypeId"){I=L["@value"];}if(L["@name"]=="assetVoteId"){A=L["@value"];}if(L["@name"]=="totalVotes"){F=L["@value"];}});if(D){H.removeClass("like");H.addClass("unlike");H.getProperty("class");H.setProperty("assetVoteId",A);if(B){var J=B.getElement(this.options.voteNumElem).get("text").toInt()-1;B.getElement(this.options.voteNumElem).set("text",J);B.removeProperty("assetVoteId");if(B.hasClass("gotIt",H.getProperty("assetId"))){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"ungot",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("ungot");}else{if(B.hasClass("wantIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unwant",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unwant",H.getProperty("assetId"));}else{if(B.hasClass("hadIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unhad",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unhad",H.getProperty("assetId"));}}}}if(H.getProperty("class").contains("gotIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"gotit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("gotIt",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("wantIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"wantit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("wantIt",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("hadIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"hadit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("hadIt",H.getProperty("assetId"));}}}}else{H.removeClass("unlike");H.addClass("like");H.removeProperty("assetVoteId");if(H.getProperty("class").contains("gotIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"ungot",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("ungot",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("wantIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unwant",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unwant",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("hadIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unhad",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unhad",H.getProperty("assetId"));}}}}H.getElement(this.options.voteNumElem).set("text",F);},showSuccessMsg:function(C){var B=this;if((PageVars.get("pageType")=="4505")||(PageVars.get("pageType")=="4852")||(PageVars.get("pageType")=="4864")||(PageVars.get("pageType")=="4507")||(PageVars.get("pageType")=="4014")){if(!B.hasUserReview(C).contains("true")&&this.options.voteType!="wantIt"){B.successMsg=new StickyWinFx({content:'<a class="toolTipElement closeSticky">close</a><p class="gwhUOPrompt">Tell us what you think:<a class="userStars userRate medium s0"><span>0 stars</span></a></p>',closeClassName:"closeSticky",relativeTo:C,id:"assetVoteSuccess",className:"voteResponseSuccess",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:1000,onClose:function(){}}).show();$$(".gwhUOPrompt .userStars").addEvents({mouseover:function(){$$(".gwhUOPrompt .userStars").each(function(D){new StarPower(D,{className:"cnetTip",onRate:function(F,E){B.currentRateClass=E;B.currentRateVal=F;$$(".gwhUOPrompt .userStars").each(function(G){if(!G.hasClass(E)){var H=G.get("class").match(/userRate medium s\d+h*/)[0];G.removeClass(H);G.addClass(E);G.store("rating",F);G.store("defaultClass",E);}});}});});},click:function(){B.successMsg.hide();if(!UserVars.get("userName")){A(C);}else{B.getUOmodal(C);}}});}else{if(B.hasUserReview(C).contains("true")&&this.options.voteType!="wantIt"){B.getUOmodal(C);}else{if(this.options.voteType=="wantIt"&&(PageVars.get("pageType")=="4505")&&(!$defined($("seoprice"))||$("seoprice").get("text").replace("$","").toInt()>2)){this.wantItWindowContent(C);}}}}else{if(PageVars.get("pageType")=="5270"&&this.options.voteType=="wantIt"&&(C.getParent().getPrevious(".prodName").get("href").contains("4505")||C.getParent().getPrevious(".prodName").get("href").contains("reviews"))){this.wantItWindowContent(C);}}var A=function(E){var D=this;var F={registerHed:"Join CNET to submit your review",loginHed:"Log in to CNET to submit your review",appId:"74",cval:"userreview",nextAction:function(){D.getUOmodal.delay(500,this,E);}.bind(this)};F.ursForm="fbconnect";CURS.Manager.checkLogin(F);}.bind(this);},wantItWindowContent:function(D){var C='<p class="wantItHeader" style="float: left; margin: 0 0 5px 3px;"><b>Notify me when:</b></p>';var H='<a class="closeSticky">close</a>';var F='<input class="priceAlertCheck" type="checkbox" checked="true" style="margin-top: 3px; margin-bottom: 0; float: left; clear: left;"/><p class="alertPrice" style="float: left; width: 285px;">This product is available for $<input class="priceAlertAmount" style="margin: 0;" type="text" size="3"/>.00</p>';var G='<p class="priceError" style="color: red; font-weight: bold; float: left; clear: left; margin-left: 22px;"></p>';var A='<input class="dealAlertCheck" type="checkbox" checked="true" style="margin-top: 6px; float: left; clear: left;"/><p style="float: left; margin-top: 5px; width: 280px;">Deals are available for this product</p>';var B='<a class="flexButton alertSubmit" style="float: left; clear: left; margin: 3px 0 0 110px">Sign Up</a>';var I='<div class="confirmPrice" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 3px;"><b>Are you sure?</b></p><p style="float: left; clear: left;">That\'s more than 50% below the current lowest price. It isn\'t likely that you will get alerted.</p><a class="flexButton alertConfirm" style="float: left; clear: left; margin-top: 10px;">Yes, I\'m sure</a><a class="flexButton goBack" style="float: right; margin-top: 10px;">Go back</a></div>';var E='<div class="successConfirm" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 0;"><b>Successfully subscribed</b></p><p class="successMsg" style="float: left; clear: left;">Your price alert has been set for this product.<br/></p><a class="seeMore" href="/8714-4_1-0.html" style="float: left; clear: left;">Manage my alerts >></a></div>';if(PageVars.get("pageType")=="5270"){return H+C+'<div class="alertsSignUpWrap" style="float: left;">'+A+B+"</div>"+E;}else{if(!$defined($("seoprice"))){F='<input class="priceAlertCheck" type="checkbox" checked="true" style="margin-top: 2px; margin-bottom: 0; float: left; clear: left;"/><p style="float: left;">A price becomes available for this product</p>';E='<div class="successConfirm" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 0;"><b>Successfully subscribed</b></p><p class="successMsg" style="float: left; clear: left;">An alert will be sent when pricing is available for this product.<br/></p><a class="seeMore" href="/8714-4_1-0.html" style="float: left; clear: left;">Manage my alerts >></a></div>';A='<input class="dealAlertCheck" type="checkbox" checked="true" style="margin-top: 12px; float: left; clear: left;"/><p style="float: left; margin-top: 10px;">Deals are available for this product</p>';B='<a class="flexButton alertSubmit" style="clear: left; margin: 3px 0 0 118px">Sign Up</a>';}else{F='<p class="curLowPrice" style="float: left; clear: left; margin: 0 0 3px 3px; font-style: italic; font-size: 12px;">(Current lowest price: '+$("seoprice").get("text")+")</p>"+F;}}this.wantItWindow(D,(H+C+'<div class="alertsSignUpWrap" style="float: left;">'+F+G+A+B+"</div>"+I+E));},submitAlerts:function(B,D){var C="&alertItemType=2&alertItemId="+D.get("assetid");var A="";if(PageVars.get("pageType")!="5270"&&B.getElement(".priceAlertCheck").checked){if($defined(B.getElement(".priceAlertAmount"))){C=C+"&targetPrice="+B.getElement(".priceAlertAmount").get("value").replace(/^0+/,"")+"&eventType=12&actionType=1";}else{C=C+"&eventType=11&actionType=1";}}else{C="";}if(B.getElement(".dealAlertCheck").checked){if(C==""){C="&alertItemType=2&alertItemId="+D.get("assetid")+"&targetPrice=0&eventType=12&actionType=2";B.getElement(".successMsg").set("text","An alert will be sent when deals are available for this product.");}A="&alertItemType2=2&alertItemId2="+D.get("assetid")+"&eventType2=10&actionType2=1";}else{A="&alertItemType2=2&alertItemId2="+D.get("assetid")+"&eventType2=10&actionType2=2";}new Request({url:"http://"+document.location.host+"/8630-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-0.html",data:"nomesh"+C+A,onSuccess:function(E){dbug.log("Successfully signed up for deal");B.setStyle("width","auto");B.getElement(".confirmPrice").hide();B.getElement(".alertsSignUpWrap").hide();B.getElement(".wantItHeader").hide();B.getElement(".successConfirm").show("block");new JloggerLEVT("deal",{tag:"LEVT_deal",applicationTags:{event:"dealsignup",eventt:"signup",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,turl:"",tname:"",ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();},onFailure:function(E){dbug.log("Failed to sign up for deal");}}).send();},verifyAlertPrice:function(B){var A=$("seoprice").get("text").replace("$","").replace(",","");if(A.contains(".00")){A=A.toInt();}else{A=A.toInt()+1;}dbug.log(A);if(B==""||B==null){return"Price cannot be blank";}else{if(!/^[0-9]+$/.test(B)){return"Please enter only numbers (0-9)";}else{if(A<=B){return"Price can't be higher than starting price";}else{if((A/2)>B){return"Price is very low";}}}}return"";},wantItWindow:function(C,B){var A=this;A.successMsg=new StickyWinFx({content:B,closeClassName:"closeSticky",relativeTo:C,id:"assetVoteSuccess",className:"voteResponseSuccess",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:10000000}).show();$("assetVoteSuccess").set("styles",{width:"305px","-webkit-box-shadow":"0px 0px 3px rgba(0,0,0,.25)","-moz-box-shadow":"0px 0px 3px rgba(0,0,0,.25)","box-shadow":"0px 0px 3px rgba(0,0,0,.25)",border:"solid 1px black"});if($defined($("seoprice"))){$("assetVoteSuccess").getElement("p").set("styles",{width:"200px","float":"left"});}else{$("assetVoteSuccess").setStyle("width","320px");}$("assetVoteSuccess").getElement(".alertSubmit").addEvent("click",function(D){var E="";if(PageVars.get("pageType")!="5270"&&$("assetVoteSuccess").getElements(".priceAlertCheck")[0].checked&&$defined($("assetVoteSuccess").getElements(".priceAlertAmount")[0])){E=this.verifyAlertPrice($("assetVoteSuccess").getElements(".priceAlertAmount")[0].get("value"));}if(!$("assetVoteSuccess").getElements(".priceAlertCheck")[0].checked&&!$("assetVoteSuccess").getElements(".dealAlertCheck")[0].checked){E="To sign up, you must select an alert";}if(E===""){this.loginCheck(C);}else{if(E==="Price is very low"){$("assetVoteSuccess").getElement(".alertsSignUpWrap").hide();$("assetVoteSuccess").getElement(".wantItHeader").hide();$("assetVoteSuccess").getElement(".confirmPrice").show("block");$("assetVoteSuccess").getElement(".alertConfirm").addEvent("click",function(F){this.loginCheck(C);}.bind(this));$("assetVoteSuccess").getElement(".goBack").addEvent("click",function(F){$("assetVoteSuccess").getElement(".confirmPrice").hide();$("assetVoteSuccess").setStyle("width","320px");$("assetVoteSuccess").getElement(".alertsSignUpWrap").show("block");$("assetVoteSuccess").getElement(".wantItHeader").show("block");}.bind(this));}else{$("assetVoteSuccess").getElements(".priceError")[0].set("text",E);}}}.bind(this));},loginCheck:function(A){CURS.Manager.checkLogin({registerHed:"Please tell us who you are",loginHed:"Please tell us who you are",appId:305,cval:"assetrating",nextAction:function(){this.submitAlerts($("assetVoteSuccess"),A);}.bind(this)});},hasUserReview:function(B){var A=new Request({url:"/8654-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html?nomesh",async:false,data:{assetId:B.getProperty("assetId"),techProdReview:(this.options.assetTypeId=="2")?true:null}}).send().response;return A.text;},getUOmodal:function(B){var A=this;new Request({url:"/8654-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html?nomesh",data:{showForm:true,assetId:B.getProperty("assetId"),techProdReview:(this.options.assetTypeId=="2")?true:null},onSuccess:function(C){A.displayUOmodal(C);}}).send();},displayUOmodal:function(B){var A=this;new GlobalModal({content:B,onInit:function(){},onDisplay:function(){if(A.successMsg){A.successMsg.hide();}$lazy(window.uoFormsModal,"http://i.i.com.com/cnwk.1d/html/rb/js/tron/ugc/ugc.tron.uoFormModal.compressed.js",function(){uoFormsModal.initSubmitForm({ctype:"evnt;elem;orig",cval:"click;A;gwh"});});if($$(".userReview .starsvalidation")){$$(".userReview .starsvalidation").set("value",A.currentRateVal*2);$$(".globalModal.userReview .userStars").each(function(C){if(!C.hasClass(A.currentRateClass)){var D=C.get("class").match(/userRate medium s\d+h*/)[0];C.removeClass(D);C.addClass(A.currentRateClass);C.store("rating",A.currentRateVal);C.store("defaultClass",A.currentRateClass);}});}},onClose:function(){this.destroy();}}).show();},showFailureMsg:function(B,A){var C=new StickyWinFx({content:A,relativeTo:B,id:"assetVoteFail",className:"voteResponseFail",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:10000000}).show();this.likeWaiter.stop();C.hide.delay(4000,C);C.destroy.delay(5000,C);},pingDW:function(A,B){new Jlogger({tag:A,ctype:"pid",cval:B}).ping();}});var Replyer=new Class({options:{repliesId:"",processId:"",hideReplyId:"",nodeId:null,assetId:null,communityId:null,targetCommunityId:null,commentId:null,pageNum:null,isModerator:null,showReplyId:null},init:function(A){this.options.repliesId=A.repliesId;this.options.processId=A.processId;this.options.hideReplyId=A.hideReplyId;},showReplies:function(A){this.init(A);$("show_replies_"+A.commentId).set("text","Refresh replies");$(A.processId).setStyle("display","block");$(this.options.repliesId).setStyle("display","none");var B="/"+PageVars.getOid({pageType:"8617",pageNumber:null})+".html";var C="communityId="+A.communityId+"&targetCommunityId="+A.targetCommunityId+"&commentId="+A.commentId+"&pageNum="+A.pageNum+"&isModerator="+A.isModerator+"&nomesh";new Request({url:B,method:"get",onSuccess:this.finish.bind(this)}).send(C);},finish:function(A){$(this.options.repliesId).set("html",A);$(this.options.processId).setStyle("display","none");try{$(this.options.repliesId).reveal();}catch(B){$(this.options.repliesId).setStyles({display:"block",height:"auto"});}$(this.options.hideReplyId).setStyle("display","block");try{commentsForms.initialize.initLinks(this.options.repliesId);}catch(B){dbug.log(B);}},hideReplies:function(A){$(A.hideReplyId).setStyle("display","none");try{$(A.repliesId).dissolve();}catch(B){$(A.repliesId).setStyle("display","none");}$(A.showReplyId).set("text","Show replies");}});var commentsForms={findMessageId:function(C){var B=null;var A=C;do{B=A.getProperty("messageId");}while(!B&&(A=A.getParent("dl")));if(!B){return false;}return{commentId:B};},findParentMessageId:function(C){var B=null;var A=C;do{B=A.getProperty("messageId");}while(!B&&(A=A.getParent("dl")));if(!B){return false;}return{parentCommentId:B};}};var initializeComments=new Class({initialize:function(){if(!$("fixedCommentBox")){return false;}$$("#fixedCommentBox.addcommentform").setStyle("display","block");this.setUpComments();this.initLinks();},setUpComments:function(){commentsForms.reply=new CommentForm("replyArea",{findLocalData:commentsForms.findParentMessageId,resetOnHide:false,submitElems:".addcomment a",closeElems:".cancel a",submissionType:"comment",onCommentSuccess:function(I){new Jlogger({tag:"submitReply"}).ping();try{var H;if(I.match("<status>success</status>")){H=this.thanks.getElements("div a");H.each(function(K){if(K.get("text").contains("Click here to view")){K.setProperty("href",K.getProperty("href").replace("/8601-","/8618-")+"&messageId="+I.commentId);}});}}catch(J){dbug.log("Failed to ammend the reply link: %o",J);}},onRelocate:function(){if(this.form.getElement("input[name=post_fb]")){this.form.getElement("input[name=post_fb]").checked=true;}}});CURS.Manager.addEvent("onLogin",function(){if(CURS.Social.fb.isUser()){commentsForms.reply.addEvent("onCommentSuccess",function(I){var L=$(document).getElement("h1");var M=(PageVars.get("pageType")=="4505")?location.href:L.getElement("a");var P=(PageVars.get("pageType")=="4505")?L.getElement("span").get("text"):((M)?M:L).get("text");var N=(PageVars.get("pageType")=="4505")?M:((M)?"http://news.cnet.com"+M.get("href"):new Link(window.location.href).mergeQueryString({jsdebug:false,tag:false}).get("href"));var J=this.thanks.getElement("a.readMore");var H=(I.match("<status>success</status>"))?[{text:"Read this comment",href:(J.get("href").contains("http://"+document.domain))?J.get("href"):"http://"+document.domain+J.get("href")}]:null;var O="{*actor*} replied to a CNET member's comment on this ";O+=(PageVars.get("pageType")==8301)?"blog post.":"story.";if(!Cookie.read("cnet_noFbPublish")){try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",{name:P,href:N,caption:O,description:CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),4999,false)},H);},true);}catch(K){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:{name:P,href:N,caption:O,description:CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),4999,false)},action_links:H,user_message_prompt:""});});}}});}});commentsForms.offensive=new CommentForm("offensiveArea",{findLocalData:commentsForms.findMessageId,resetOnHide:false,submissionType:"rop",submitElems:".submit.send a.button",closeElems:".cancel a"});commentsForms.offensive.addEvent("onRelocate",function(){var I=this.form.getElement("input[name=permalink]");var H=new Link(I.get("value")).mergeQueryString({messageId:this.form.getElement("input[name=commentId]").get("value")});H=H.get("href").replace("http://"+document.domain,"");I.set("value",H);});commentsForms.emailAFriend=new CommentForm("emailAFriendArea",{findLocalData:commentsForms.findMessageId,resetOnHide:false,submitElems:".submit.send a.button",submissionType:"email",closeElems:".cancel a",onCommentSuccess:function(){new Jlogger({tag:"emailComment"}).ping();}});commentsForms.emailAFriend.addEvent("onRelocate",function(){var I=this.form.getElement("input[name=permalink]");var H=new Link(I.get("value")).mergeQueryString({messageId:this.form.getElement("input[name=commentId]").get("value")});H=H.get("href").replace("http://"+document.domain,"");I.set("value",H);});if($("deleteArea")){commentsForms.adminDelete=new CommentForm("deleteArea",{findLocalData:commentsForms.findMessageId,submissionType:"delete",submitElems:".submit.delete a.button",closeElems:".cancel a"});}var C=function(){commentsForms.newComment=new CommentForm("newCommentForm",{submitElems:".submit.addcomment a.button, #subComment",clone:false,submissionType:"comment",onCommentSuccess:function(J){new Jlogger({tag:"submitComment"}).ping();try{var I;if(J.match("<status>success</status>")){I=this.thanks.getElements("div a");I.each(function(L){if(L.get("text").contains("Click here to view")){L.setProperty("href",L.getProperty("href").replace("/8601-","/8618-")+"&messageId="+J.commentId);}});}}catch(K){dbug.log("Thanks links fail: %o",K);}}});var H=commentsForms.newComment.form.getElement("input[name=body]");if(H){H.addClass("maxLength").setProperty("validatorprops","{minLength:2, maxLength: 4999}");}if(CURS.Social.fb.isUser()){commentsForms.newComment.addEvent("onCommentSuccess",function(){var O=$(document).getElement("h1");var M=(PageVars.get("pageType")=="4505")?location.href:O.getElement("a");var L=(PageVars.get("pageType")=="4505")?O.getElement("span").get("text"):((M)?M:O).get("text");var I=(PageVars.get("pageType")=="4505")?M:((M)?"http://news.cnet.com"+M.get("href"):new Link(window.location.href).mergeQueryString({jsdebug:false,tag:false}).get("href"));var P=this.thanks.getElement("a.readMore");dbug.log("Story title: "+L);dbug.log("Comment summary: "+CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),120,false));var K=(response.match("<status>success</status>"))?[{text:"Read this comment",href:(P.get("href").contains("http://"+document.domain))?P.get("href"):"http://"+document.domain+P.get("href")}]:null;var J="{*actor*} commented on this ";J+=(PageVars.get("pageType")==8301)?"blog post on CNET.":"story on CNET.";if(!Cookie.read("cnet_noFbPublish")){try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",{name:L,href:I,caption:J,description:CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),4999,false)},K);},true);}catch(N){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:{name:L,href:I,caption:J,description:CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),4999,false)},action_links:K,user_message_prompt:""});});}}});}};var G=function(K){K=K||'<span class="cnetInvite"><span><a>Log in or create an account</a> to post a comment</span></span>';if(!UserVars.isLoggedIn()){K+='<span class="or">, or </span><span class="fbConnectInvite" style="text-align:center;">quickly sign in with:<span id="gigyaComment" class="small gigyaWidget"></span></span>';}else{K+=".";}var H=$(document).getElement("dd.invite")||(new Element("dd",{"class":"status invite reg",html:'<p class="message"></p>'}).inject($("addContainer").getElement("h3"),"after"));var J=H.getElement("p.message");J.empty();J.set("html",K);CURS.Social.gigya.init();D(J);var I;if((dbug.enabled||Browser.qs.jsdebug)&&CBSi.jsdebug){if(CBSi.jsdebug=="true"){I="http://publish.cnet.com:8100/html/rb/js/tron/oreo.login.js";}else{I="http://publish.cnet.com:8100/html/rb/js/~dev/"+CBSi.jsdebug+"/oreo.login.js";}}else{I="http://i.i.com.com/cnwk.1d/html/rb/js/tron/oreo.login.compressed.js";}if(!CURS.Process){new Asset.javascript(I,{id:"oreoLogin",onload:function(){CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}});}else{CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}};var B=function(){var H=$("fixedCommentBox").getElement("dd.invite");if(!$("fixedCommentBox").getElement("dd.welcome")){var I=new Element("dd",{"class":"status welcome",html:'<p>You are logged in as <span class="cnetUserName"></span>. Please leave a comment.'});if(H){I.replaces(H);}else{I.inject($("addContainer").getElement("h3"),"after");}}CURS.Manager.writeUserNames(I);};var D=function(H){if(!E){return false;}E=E.filter(function(J){return !!$(J);});var I=$(H).getElements("a");I=I.filter(function(J){return !E.contains(J);});I.addEvent("click",F);E.combine(I);};G();var A=function(){if(!UserVars.isLoggedIn()){G();}else{if(!UserVars.hasFullAccess()){G("Your account is not yet confirmed. <a>Click here to confirm your account.</a>");}else{if(!$chk(UserVars.get("userName"))){G("You'll need a CNET username in order to submit a review. <a>Click here to create a username.</a>");}else{B();if(!commentsForms.newComment){C();}}}}};CURS.Manager.addEvent("onLogin",function(){A();CURS.Manager.addEvent("onStateChange",function(){A();});});var E=$("fixedCommentBox").getElements(".status a, #new-body, #subComment");var F=function(H){var I={registerHed:"Join CNET to comment on this story",loginHed:"Log in to CNET to comment on this story",appId:"36",nextAction:function(){if(commentsForms.newComment){E.removeEvent("click",F);CURS.Manager.removeEvents("onStateChange");}}};if($(H.target).hasClass("fbConnectLink")||$(H.target).getParent(".fbConnectLink")){I.ursForm="fbconnect";}if(!$(H.target).hasClass("connect2fbButton")&&!$(H.target).getParent().hasClass("connect2fbButton")){CURS.Manager.checkLogin(I);}};E.addEvent("click",F);},initLinks:function(B){try{var C=(Browser.Engine.name=="trident");B=$(B)||$$(".commentwrapper")[0];B.getElements("a.reply").addEvent("click",function(E){CURS.Manager.checkLogin({registerHed:"Join CNET to reply to this comment",loginHed:"Log in to CNET to reply to this comment",appId:"36",nextAction:function(){commentsForms.reply.move($(E.target).getParent("dl").getElement(".toolstretch"));}});});if(!C){B.getElements("a.repo").store("tip:title","Report offensive content");var A=new Tips(B.getElements("a.repo"),{fixed:true,showDelay:1000,hideDelay:250,className:"tipWrap"});B.getElements("a.mail").store("tip:title","E-mail to a friend");var A=new Tips(B.getElements("a.mail"),{fixed:true,showDelay:1000,hideDelay:250,className:"tipWrap"});B.getElements("a.link").store("tip:title","Permalink to this comment");var A=new Tips(B.getElements("a.link"),{fixed:true,showDelay:1000,hideDelay:250,text:null,className:"tipWrap"});B.getElements("a.edit").store("tip:title","Edit message");var A=new Tips(B.getElements("a.edit"),{fixed:true,showDelay:1000,hideDelay:250,className:"tipWrap"});B.getElements("a.delete").store("tip:title","Delete message");var A=new Tips(B.getElements("a.delete"),{fixed:true,showDelay:1000,hideDelay:250,className:"tipWrap"});}else{B.getElements("a.repo").set("title","Report offensive content");B.getElements("a.mail").set("title","E-mail to a friend");B.getElements("a.link").set("title","Permalink to this comment");B.getElements("a.edit").set("title","Edit message");B.getElements("a.delete").set("title","Delete message");}B.getElements("a.repo").addEvent("click",function(E){CURS.Manager.checkLogin({registerHed:"Join CNET to report this comment",loginHed:"Log in to CNET to report to this comment",appId:"36",nextAction:function(){commentsForms.offensive.move($(E.target).getParent("dl").getElement(".toolstretch"));}});});B.getElements("a.mail").addEvent("click",function(E){CURS.Manager.checkLogin({registerHed:"Join CNET to e-mail this comment to a friend",loginHed:"Log in to CNET to e-mail this comment to a friend",appId:"36",nextAction:function(){commentsForms.emailAFriend.move($(E.target).getParent("dl").getElement(".toolstretch"));}});});this.initLike(B);B.getElements(".editForm").each(function(E){new CommentForm(E,{clone:false,submitElems:".submit.edit a.button",submissionType:"edit",closeElems:".submit.cancel a.close",firstParent:E.getParent(".toolstretch")});});B.getElements("a.edit").addEvent("click",function(F){var E=$(F.target).getParent("dl").getElement(".editForm").getElement("textarea").get("html");if(E){E=E.replace(/\n/g,"");$(F.target).getParent("dl").getElement(".editForm").getElement("textarea").set("value",E.replace(/&lt;br \/&gt;/g,"\n"));}$(F.target).getParent("dl").getElement(".editForm").retrieve("mobileForm").show();});B.getElements("a.delete").addEvent("click",function(E){commentsForms.adminDelete.move($(E.target).getParent("dl").getElement(".toolstretch"));});}catch(D){dbug.log("Error: "+D);}},initLike:function(B){this.pendingVotes=[];var C=(Browser.Engine.name=="trident");dbug.log("bad browser: ",C);if(Cookie.read("cnetPendingCommentVotes")){this.pendingVotes=Cookie.read("cnetPendingCommentVotes").split(",");}if(!C){B.getElements("a.like").store("tip:title","Click to like this comment");B.getElements("a.unlike").store("tip:title","Click to unlike this comment");var A=new Tips(B.getElements("a.like, a.unlike"),{fixed:true,showDelay:1000,hideDelay:250,className:"tipWrap"});}else{B.getElements("a.like").set("title","Click to like this comment");B.getElements("a.unlike").set("title","Click to unlike this comment");}B.getElements("a.like, a.unlike").addEvent("click",function(D){if(this.likeWaiter){this.likeWaiter.stop();}this.likeWaiter=new Waiter(D.target,{baseHref:"http://i.i.com.com/cnwk.1d/i/News/",img:{src:"commentsLikeLoader.gif",styles:{width:16,height:16}}});CURS.Manager.checkLogin({registerHed:"Join CNET to like this comment",loginHed:"Log in to CNET to like this comment",appId:221,cval:"assetrating",nextAction:function(){this.likeWaiter.start();this.sendLikeUnlikeRequest(D.target);}.bind(this)});}.bind(this));},sendLikeUnlikeRequest:function(E){var B=(E.hasClass("like"))?"8679":"8680";var D=E.getProperty("assetId");if(!E.hasClass("likethankyou")){var C=new Request.JSON({url:"/"+B+"-4_"+PageVars.get("siteId")+"-0.html",data:{assetId:(E.getProperty("assetId"))?D:null,assetTypeId:77,viewType:"json",assetVoteId:(E.hasClass("like"))?null:E.getProperty("assetVoteId")},onSuccess:function(J){if(J){J=J.response;if(J.status["$"]=="success"){new Jlogger({tag:(E.hasClass("like"))?"likeComment%":"unlikeComment%"}).ping();var K;var M;var I;J.data.datum.each(function(O){if(O["@name"]=="assetTypeId"){K=O["@value"];}if(O["@name"]=="assetVoteId"){M=O["@value"];}if(O["@name"]=="totalVotes"){I=O["@value"];}});E.setProperty("assetVoteId",M);E.set("text","Thank you!");E.addClass("likethankyou");this.likeWaiter.stop();this.setVoteNum(E,I);this.toggleLike.delay(3000,this,E);}else{if(J.errors.error["@name"]=="ALREADY_VOTED"){var G=new StickyWinFx({content:"You have already liked this comment",relativeTo:E,id:"alreadyVotedMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.toggleLike(E);this.likeWaiter.stop();G.hide.delay(4000,G);}else{if(J.errors.error["@name"]=="REMOVE_PROBLEM"){var H=new StickyWinFx({content:"<b>Error: </b>There was a problem removing your vote. Please try again.",relativeTo:E,id:"removeProblemMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();H.hide.delay(4000,H);}else{if(J.errors.error["@name"]=="SUBMIT_PROBLEM"){var L=new StickyWinFx({content:"<b>Error: </b>There was a problem submitting your vote. Please try again.",relativeTo:E,id:"submitProblemMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();L.hide.delay(4000,L);}else{if(J.errors.error["@name"]=="NOT_OWNER"){var H=new StickyWinFx({content:"<b>Error: </b>You do not have a vote registered for this comment.",relativeTo:E,id:"removeProblemMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();this.toggleLike(E);H.hide.delay(4000,H);}else{if(J.errors.error["@name"]=="REQUEST_PENDING"){var N=new StickyWinFx({content:"Thank you. Your vote will be posted to the website shortly.",relativeTo:E,id:"pendingMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.pendingVotes.push(D);Cookie.write("cnetPendingCommentVotes",this.pendingVotes,{domain:".cnet.com",path:"/"});this.likeWaiter.stop();E.set("text","Thank you!");E.addClass("likethankyou");N.hide.delay(4000,N);}}}}}}}}.bind(this),onFailure:function(){var G=new StickyWinFx({content:"<b>Error: </b>There was a problem submitting your vote. Please try again.",relativeTo:E,id:"submitProblemMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();G.hide.delay(4000,G);}.bind(this)});if(!Cookie.read("cnetPendingCommentVotes")){C.send();}else{var A=Cookie.read("cnetPendingCommentVotes");A=A.split(",");if(A.indexOf(D)==-1){C.send();}else{var F=new StickyWinFx({content:"Thank you. Your vote will be posted to the website shortly.",relativeTo:E,id:"pendingMsg",className:"voteResponse",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();E.set("text","Thank you!");E.addClass("likethankyou");F.hide.delay(4000,F);}}}else{this.likeWaiter.stop();}},toggleLike:function(A){A.removeClass("likethankyou");if(A.hasClass("like")){A.set("html",'Unlike <span class="liked">'+A.getElement(".liked").get("text")+"</span>");A.store("tip:title","Click to unlike this comment");}else{A.set("html",'Like <span class="liked">'+A.getElement(".liked").get("text")+"</span>");A.store("tip:title","Click to like this comment");}A.toggleClass("like");A.toggleClass("unlike");},setVoteNum:function(B,A){if(A>0){B.adopt(new Element("span",{"class":"liked"}).set("html","("+A+")"));}}});function postInitializeComments(){$$("a.ajaxreplies").addEvent("click",function(C){var B=this;var A=$(C.target).hasClass("community");new ContentUpdater("commentsRepliesUpdater",{".commentsInlineRepliesAllAjax":{element:$(B).getParent("dd").getPrevious("dd.replieswrapper"),insert:"append",onRequest:function(){if(!this.waiter){this.waiter=new Waiter($(B));}this.waiter.start();},onComplete:function(){if(this.waiter){this.waiter.stop();}},onSuccess:function(){$(B).getParent().dispose();commentsForms.initialize=new initializeComments();}}},{url:PageVars.getPath({pageType:(A?8614:8618),pageNumber:false}),data:(A?{assetTypeId:$(B).getParent("dl").getPrevious("a").get("assetTypeId"),messageId:$(B).getParent("dl").getPrevious("a").get("name"),orderBy:"creationDate",start:(PageVars.get("siteId")==7)?0:10}:{targetCommunityId:$(B).getParent("dl").getPrevious("a").get("targetCommunity"),messageId:$(B).getParent("dl").getPrevious("a").get("name"),orderBy:"creationDate",start:(PageVars.get("siteId")==7)?0:10})}).send();});}window.addEvent("domready",function(){dbug.log("HEEEEEEEEEEEEERRRRRRRRRRRRRRRRRRRRREEEEEEEEEEEEEEEEEEEEEEEEEEEEE");$$(".tool .link").addEvent("click",function(){new JloggerLEVT.Social({applicationTags:{event:"connect",eventt:"permalink",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"plbutton",wdloc:"commentbox"}}).ping();});if(!$$(".postTalkback")[0]||$$(".postTalkback")[0].get("html").trim()){commentsForms.initialize=new initializeComments();postInitializeComments();}else{new Request({url:PageVars.getPath({pageType:8614,pageNumber:false})+"?assetTypeId="+(PageVars.get("pageType")=="1606"?"14":"12")+"&nomesh"+(PageVars.get("communityId")?"&formCommunityId="+PageVars.get("communityId"):"")+(PageVars.get("targetCommunityId")?"&formTargetCommunityId="+PageVars.get("targetCommunityId"):""),onSuccess:function(A){$$(".postTalkback").set("html",A);commentsForms.initialize=new initializeComments();postInitializeComments();}}).send();}});FormValidator.implement({test:function(C,E,F){E=$(E);if(E.hasClass("ignoreValidation")){return true;}F=$pick(F,false);if(E.hasClass("warnOnly")){F=true;}var D=true;if(E){var B=this.getValidator(C);if(B){D=B.test(E);if(!D&&B.getError(E)){if(F){E.addClass("warning");}var A=this.makeAdvice(C,E,B.getError(E),F);this.insertAdvice(A,E);this.showAdvice(C,E);}else{this.hideAdvice(C,E);}this.fireEvent("onElementValidate",[D,E]);}}if(F){return true;}return D;}});var initializeUOs=new Class({initialize:function(){this.setUpComments();this.initLinks();},setUpComments:function(){try{uoForms.reply=new UOForm("replyReview",{findLocalData:uoForms.findMessageId,resetOnHide:false,submitElems:".submit a.submitButton",closeElems:".submit .cancel a",validatorOptions:{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false},textFieldCounterOptions:{commonParentSelector:"label"},onCommentSuccess:function(){new Jlogger({tag:"replyReview"}).ping();},onRelocate:function(){if(this.form.getElement("input[name=post_fb]")){this.form.getElement("input[name=post_fb]").checked=true;}}});CURS.Manager.addEvent("onLogin",function(){if(CURS.Social.fb.isUser()){try{uoForms.reply.addEvent("onCommentSuccess",function(){var K=this.overviewLink;var J=this.replyLink;dbug.log("Product name: %o",$(document).getElement("h1").get("text"));dbug.log("Comment summary: %o",CURS.Social.fb.getParsedText($("prodReplyReview").getElement("textarea[name=body]").get("value"),1000,true));dbug.log("Sending to Facebook");var I={name:$(document).getElement("h1").get("text"),description:CURS.Social.fb.getParsedText($("prodReplyReview").getElement("textarea[name=body]").get("value"),1000,true),href:"http://reviews.cnet.com"+K,caption:"{*actor*} commented on a CNET member's review of this product.",media:[{type:"image",src:"http://i.i.com.com/cnwk.1d/sc/"+PageVars.get("assetId")+"-2-60-0.gif",href:"http://reviews.cnet.com"+K}]};var G=[{text:"Read this comment",href:(J.contains("http://"+document.domain))?J:"http://"+document.domain+J}];if(!Cookie.read("cnet_noFbPublish")){try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",I,G);},true);}catch(H){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:I,action_links:G,user_message_prompt:""});});}}});}catch(F){dbug.log("Failed adding feed posting: %o",F);}}});if(!UserVars.isLoggedIn()){$$(".status .fbConnectInvite").set("html",'Quickly sign in with:<br /><div id="gigyaUserReview" class="small gigyaWidget"></div>');CURS.Social.gigya.init();}}catch(E){dbug.log("Reply form initialization failed: %o",E);}try{uoForms.offensive=new UOForm("ropReview",{findLocalData:uoForms.findMessageId,resetOnHide:false,submitElems:".submit a",closeElems:".cancel a",useValidator:false,onCommentSuccess:function(){new Jlogger({tag:"ropReview"}).ping();new JloggerLEVT.Social({applicationTags:{event:"vote",eventt:"reportoffensive",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"robutton",wdloc:"uobox"}}).ping();}});}catch(E){dbug.log("Offensive form initialization failed: %o",E);}try{uoForms.email=new UOForm("emailReview",{findLocalData:uoForms.findMessageId,resetOnHide:false,submitElems:".submit a.submitButton",closeElems:".submit .cancel a",validatorOptions:{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false},textFieldCounterOptions:{commonParentSelector:"label"},onCommentSuccess:function(){new Jlogger({tag:"emailReview"}).ping();}});}catch(E){dbug.log("Email form initialization failed: %o",E);}try{if($("submitReview")){var B=function(F){if(C=="undefined"||!C.length){return false;}C=C.filter(function(H){return !!$(H);});var G=$(F).getElements("a");G=G.filter(function(H){return !C.contains(H);});G.addEvent("click",D);C.combine(G);};var A=function(){var F=$("submitReview").getElement(".invite");if(!UserVars.hasFullAccess()){F.set("html",'<p class="loginStatus">Your account is not yet confirmed. <a>Click here to see how to confirm your account.</a></p>');B(F);}else{if(!$chk(UserVars.get("userName"))){F.set("html",'<p class="loginStatus">You\'ll need a CNET username in order to submit a review. <a>Click here to create a username.</a></p>');B(F);}else{if(F){F.setStyle("display","none");$("submitReview").getElement("div.loggedin").setStyle("display","block");}if(!uoForms.submit){uoForms.initSubmitForm();}}}};var C=$("submitReview").getElements(".invite a, textarea, .userStars, .submit a");var D=function(F){var G={registerHed:"Join CNET to submit your review",loginHed:"Log in to CNET to submit your review",appId:"74",cval:"userreview",nextAction:function(){if(uoForms.submit){C.removeEvent("click",D);CURS.Manager.removeEvents("onStateChange");}}};if($(F.target).hasClass("fbConnectLink")||$(F.target).getParent(".fbConnectLink")){G.ursForm="fbconnect";}if(!$(F.target).hasClass("connect2fbButton")&&!$(F.target).getParent().hasClass("connect2fbButton")){CURS.Manager.checkLogin(G);}};C.addEvent("click",D);CURS.Manager.addEvent("onLogin",function(){A();CURS.Manager.addEvent("onStateChange",A);});if(!UserVars.isLoggedIn()){CURS.Manager.addEvent("onLogin",function(){new Request({url:new Link(window.location.href).mergeQueryString({tag:false,_tilename_:".userReviewUpdate",nomesh:null}).get("href"),onComplete:function(F){if(!F.match(/no update form/)){window.location.href=PageVars.getRefreshPath();}}}).send();});}}}catch(E){dbug.log("Submission/update form initialization failed: %o",E);}},initLinks:function(A){A=$(A)||$(document.body);A.getElements(".replyUR a.reply").addEvent("click",function(C){var B=C.target;CURS.Manager.checkLogin({registerHed:"Join CNET to reply to this review",loginHed:"Log in to CNET to reply to this review",appId:"74",nextAction:function(){dbug.log("trigging reply move. target: e: %o; clickTarget: %o",C.target,B);uoForms.reply.move($(B).getParent("li"));dbug.log("form moved");},cval:"reply"});});A.getElements(".postTools a.report").addEvent("click",function(C){var B=C.target;CURS.Manager.checkLogin({registerHed:"Join CNET to report this comment",loginHed:"Log in to CNET to report this comment",appId:"74",nextAction:function(){uoForms.offensive.move($(B).getParent("li"));},cval:"rop"});});A.getElements(".postTools a.email").addEvent("click",function(C){var B=C.target;CURS.Manager.checkLogin({registerHed:"Join CNET to e-mail this to a friend",loginHed:"Log in to CNET to e-mail this to a friend",appId:"74",nextAction:function(){uoForms.email.move($(B).getParent("li"));},cval:"emailfriend"});});A.getElements("p.rateUR a").addEvent("click",function(B){new HelpfulVote(B,{responseKey:"responseMessages",responseSuccess:"success"});});}});var UOForm=new Class({Extends:CommentForm,handlePostResponse:function(D){try{var F=JSON.decode(D);this.hide();this.thanks=new Element("div",{"class":"userReviewForm thankyou userSubmit",id:"thankYou"}).inject(this.shell,"before");if(F.responseMessages){new Element("h4",{html:"<span>"+(F.responseMessages[0].replace(", !",", "+UserVars.getDisplayName()+"!"))+"</span>"}).inject(this.thanks);if(F.responseMessages.length>1){for(var G=1;G<F.responseMessages.length;G++){new Element("span",{"class":"submitDesc",html:F.responseMessages[G]}).inject(this.thanks);}}}if(F.links){var L=new Element("ul",{"class":"viewLinks"}).inject(this.thanks);var H=function(O,N){L.adopt(new Element("li").adopt(new Element("a",{href:N,text:O,"class":"readMore"})));};if(F.links.READ_YOUR_REVIEW){this.reviewLink=F.links.READ_YOUR_REVIEW;H("Read your review",this.reviewLink);}if(F.links.READ_YOUR_UPDATE){H("Read your update",F.links.READ_YOUR_UPDATE);}if(F.links.READ_YOUR_REPLY){this.replyLink=F.links.READ_YOUR_REPLY;H("Read your reply",this.replyLink);}if(F.links.READ_MORE_USER_REVIEWS){H("Read more user reviews",F.links.READ_MORE_USER_REVIEWS);}if(F.links.BACK_TO_PRODUCT_REVIEW){this.overviewLink=F.links.BACK_TO_PRODUCT_REVIEW;H("Back to product review",this.overviewLink);}var B=new Element("p",{"class":"closeButton"});var C=new Element("li").adopt(B);B.adopt(new Element("a",{"class":"flexButton black",text:"Close",events:{click:function(){this.thanks.dissolve();}.bind(this)}}));L.adopt(C);}}catch(K){this.hide();var A=(PageVars.get("siteId")==162)?UserVars.get("userName"):'<a href="http://www.cnet.com/profile/'+UserVars.get("userName").replace(" ","+")+'">'+UserVars.get("userName")+"</a>";var J=(PageVars.get("siteId")==162)?"CBS'":"CNET's";this.responseObj={"delete":{fail:"There was a problem deleting this comment, please try again.",success:"This comment has been deleted.",pending:"This comment will be deleted shortly."},rop:{fail:"There was a problem submitting this form, please try again.",success:"Your message has been submitted and will be reviewed by our staff. Thank you, "+A+", for helping us maintain "+J+" great community!",pending:"Your message will be submitted shortly and reviewed by our staff. Thank you, "+A+", for helping us maintain "+J+" great community!"},comment:{fail:"There was a problem submitting your comment, please try again.",success:"Thanks for your comment, "+A+".",pending:"Thanks for your comment, "+A+". It will be posted to our site shortly."},edit:{fail:"There was a problem updating your comment, please try again.",success:"This comment has been successfully updated.",pending:"This comment will be updated shortly."},email:{fail:"There was a problem submitting this email, please try again.",success:"Thank you, "+A+". Your email has been sent.",pending:"Thank you, "+A+". Your email will be sent shortly."}};this.thanks=new Element("div",{"class":"userReviewForm thankyou userSubmit",id:"thankYou"}).inject(this.shell,"before");if(D.match("<status>failure</status>")){var M=this.responseObj[this.options.submissionType].fail;}else{if(D.match("<status>pending</status>")){var M=this.responseObj[this.options.submissionType].pending;}else{var M=this.responseObj[this.options.submissionType].success;}}var E=new Element("h4",{html:'<span class="thanks">'+M+"</span>"}).inject(this.thanks);new Element("a",{"class":"closeConfirm",text:"close",events:{click:function(){this.thanks.dissolve();}.bind(this)}}).inject(E);if(D.match("<status>success</status>")&&this.options.submissionType=="comment"){var I=D.match(/name="assetId"\ value="(\d+)"/)[1].toInt();if(PageVars.get("siteId")!=162){new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({communityId:this.form.getElement("input[name=communityId]").get("value"),targetCommunityId:this.form.getElement("input[name=targetCommunityId]").get("value"),blogId:PageVars.get("pageNumber"),messageId:I}).get("href"),text:"Click here to view your comment","class":"readMore"}).inject(E,"after");}else{new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({assetTypeId:this.form.getElement("input[name=assetTypeId]").value,messageId:I}).get("href"),text:"Click here to view your comment","class":"readMore"}).inject(E,"after");}}}this.fireEvent("onCommentSuccess",arguments);}});var uoForms={findMessageId:function(C){var B=null;var A=C;do{B=A.getProperty("messageId");}while(!B&&(A=A.getParent("li")));if(!B){return false;}var D={messageID:B};if(A.get("commentId")){D.commentId=A.get("commentId");}return D;},initStars:function(){$$(".userStars").each(function(A){new StarPower(A,{className:"cnetTip",onRate:function(C,B){$("rating").set("value",C*2);$$(".userStars").each(function(D){if(!D.hasClass(B)){var E=D.get("class").match(/userRate medium s\d+h*/)[0];D.removeClass(E);D.addClass(B);D.store("rating",C);D.store("defaultClass",B);}});}});});},removeUserRating:function(){$("contentBody").getElements(".myRate").each(function(A){if(A.getElement(".flexButton")){A.getElement(".flexButton").destroy();}if(A.getElement(".notratedMessage")){A.getElement(".notratedMessage").destroy();}}.bind(this));},pingLEVT:function(A){new JloggerLEVT.Social.Create({applicationTags:{eventt:A,tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"submitbutton",wdloc:"uobox"}}).ping();},initSubmitForm:function(){var A=!!($("submitReview").getElement("#prodUpdateReview"));uoForms.submit=new UOForm("submitReview",{clone:false,resetOnHide:false,submitElems:"a.submitButton",useTextFieldCounter:false,onInitialize:function(){new TextFieldCounter(this.form,{commonParentSelector:"label"});},onCommentSuccess:function(){try{new Fx.Scroll(window).toElement(this.thanks);}catch(D){}var C=this.thanks.getElement("a.updateReview");if(C){C.addEvent("click",function(){window.location=CURS.getRefreshPath();});return ;}uoForms.removeUserRating();new Jlogger({tag:(A)?"updateReview":"submitNew"}).ping();if(A){uoForms.pingLEVT("useropinionupdate");}else{uoForms.pingLEVT("useropinion");}},validatorOptions:{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false,errorPrefix:""}});uoForms.initStars();uoForms.submit.validator.addAllThese([["starsvalidation",{errorMsg:"Please select a star rating.",test:function(C){return(C.value!="-1");}}],["validate-opt-length",{errorMsg:"This field must either be left blank, or contain 10 to 15000 characters",test:function(E,D){var C=E.value.length;return(!C||(C>=D.minLength&&C<=D.maxLength));}}]]);if(CURS.Social.fb.isUser()&&uoForms.submit&&!A){try{uoForms.submit.addEvent("onCommentSuccess",function(){var G=this.overviewLink;var D=this.reviewLink;var F={name:$(document).getElement("h1").get("text"),description:CURS.Social.fb.getParsedText($("prodSubmitReview").getElement("textarea[name=shortSummary]").get("value"),55),userRate:parseInt($("prodSubmitReview").getElement("input[name=rating]").get("value"))/2,href:"http://reviews.cnet.com"+G,caption:"{*actor*} reviewed this product on CNET.",media:[{type:"image",src:"http://i.i.com.com/cnwk.1d/sc/"+PageVars.get("assetId")+"-2-60-0.gif",href:"http://reviews.cnet.com"+G}],properties:{Rating:{text:parseInt($("prodSubmitReview").getElement("input[name=rating]").get("value"))/2+" out of 5 stars",href:"http://reviews.cnet.com"+D}}};var C=[{text:"Read this review",href:"http://reviews.cnet.com"+D}];dbug.log("Product name: %o",F.prodName);dbug.log("Comment summary: %o",F.prodSummary);dbug.log("Sending to Facebook");if(!Cookie.read("cnet_noFbPublish")){try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",F,C);},true);}catch(E){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:F,action_links:C,user_message_prompt:""});});}}dbug.log("Facebook Feed post requested");});}catch(B){dbug.log("Failed adding feed posting: %o",B);}}}};var CommentForm=new Class({Extends:FormRecycler.Inline,commentOptions:{submitElems:false,closeElems:false,useValidator:true,validatorOptions:{},useTextFieldCounter:true,submissionType:null,textFieldCounterOptions:{}},initialize:function(B,A){this.parent(B,$merge(this.commentOptions,A));try{this.validator=(this.options.useValidator)?new FormValidator(this.form,this.options.validatorOptions):false;}catch(C){dbug.log("Validator addition failed: %o",C);this.validator=false;}this.waiter=false;this.form.set("send",{onRequest:function(){if(!this.waiter){this.waiter=new Waiter(this.form);}this.waiter.start();}.bind(this),onComplete:function(){if(this.waiter){this.waiter.stop();}}.bind(this),onSuccess:this.handlePostResponse.bind(this),onFailure:this.handleFailure.bind(this)});if(this.options.useTextFieldCounter&&window.TextFieldCounter){this.textCounters=new TextFieldCounter(this.form,this.options.textFieldCounterOptions);}if(this.options.submitElems){this.form.getElements(this.options.submitElems).addEvent("click",this.doSubmit.bind(this));}if(this.options.closeElems){this.form.getElements(this.options.closeElems).addEvent("click",this.hide.bind(this));}this.form.addEvent("submit",function(D){D.stop();this.doSubmit();}.bind(this));},doSubmit:function(){if(!UserVars.isLoggedIn()){return false;}this.form.getElements("input[type=text], textarea").each(function(A){A.set("value",A.get("value").trim());});if(this.validator&&!this.validator.validate()){return false;}this.form.send();},hide:function(){this.parent();if(this.validator){this.chain(function(){this.validator.reset();if(this.options.useTextFieldCounter){this.textCounters.resetAllCounters();}this.fireEvent("onReset");this.callChain();}.bind(this));}},handlePostResponse:function(E){this.hide();var A=(PageVars.get("siteId")==162)?UserVars.get("userName"):'<a href="http://www.cnet.com/profile/'+UserVars.get("userName").replace(" ","+")+'">'+UserVars.get("userName")+"</a>";var D=(PageVars.get("siteId")==162)?"CBS'":"CNET's";this.responseObj={"delete":{fail:"There was a problem deleting this comment, please try again.",success:"This comment has been deleted.",pending:"This comment will be deleted shortly."},rop:{fail:"There was a problem submitting this form, please try again.",success:"Your message has been submitted and will be reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!",pending:"Your message will be submitted shortly and reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!"},comment:{fail:"There was a problem submitting your comment, please try again.",success:"Thanks for your comment, "+A+".",pending:"Thanks for your comment, "+A+". It will be posted to our site shortly."},edit:{fail:"There was a problem updating your comment, please try again.",success:"This comment has been successfully updated.",pending:"This comment will be updated shortly."},email:{fail:"There was a problem submitting this email, please try again.",success:"Thank you, "+A+". Your email has been sent.",pending:"Thank you, "+A+". Your email will be sent shortly."}};this.thanks=new Element("div",{"class":"userReviewForm thankyou"}).inject(this.shell,"before");if(E.match("<status>failure</status>")){var C=this.responseObj[this.options.submissionType].fail;}else{if(E.match("<status>pending</status>")){var C=this.responseObj[this.options.submissionType].pending;}else{var C=this.responseObj[this.options.submissionType].success;}}var B=new Element("h2",{html:'<span class="thanks">'+C+"</span>"}).inject(this.thanks);new Element("a",{"class":"closeConfirm",text:"close [x]",events:{click:function(){this.thanks.dissolve();}.bind(this)}}).inject(B,"after");if(E.match("<status>success</status>")&&this.options.submissionType=="comment"){var F=E.match(/name="assetId"\ value="(\d+)"/)[1].toInt();new Element("p",{"class":"spacer",text:"or"}).inject(B,"after");if(PageVars.get("siteId")!=162){new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({communityId:this.form.getElement("input[name=communityId]").get("value"),targetCommunityId:this.form.getElement("input[name=targetCommunityId]").get("value"),assetTypeId:this.form.getElement("input[name=assetTypeId]").get("value"),blogId:PageVars.get("pageNumber"),messageId:F}).get("href"),text:"view comment","class":"readMore"}).inject(B,"after");}else{new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({assetTypeId:this.form.getElement("input[name=assetTypeId]").value,messageId:F}).get("href"),text:"view comment","class":"readMore"}).inject(B,"after");}}this.fireEvent("onCommentSuccess",arguments);},handleFailure:function(){this.writeMessage('This action was not completed. Please try again, or notify us at our <a href="http://cnet.custhelp.com/">Help Center</a>.');},writeMessage:function(A){new Element("div",{html:A}).inject(this.shell,"before");}});var StarPower=new Class({Extends:Tips,options:{timeOut:700,maxTitleChars:50,maxOpacity:0.9,offsets:{x:-14,y:24},starTips:{"0.5":"Abysmal::0.5 star out of 5","1":"Terrible::1 star out of 5","1.5":"Poor::1.5 stars out of 5","2":"Mediocre::2 stars out of 5","2.5":"OK::2.5 stars out of 5","3":"Good::3 stars out of 5","3.5":"Very good::3.5 stars out of 5","4":"Excellent::4 stars out of 5","4.5":"Outstanding::4.5 stars out of 5","5":"Spectacular::5 stars out of 5"},clickToRateString:"Click to rate this product",removeUserRating:true,userRatingDuration:3000,useHalfStars:true,onRate:function(A){}},initialize:function(C,A){this.elements=$$(C);if(A.starTips){this.options.starTips=A.starTips;}if($defined(A.useHalfStars)){this.options.useHalfStars=A.useHalfStars;}var B=new MobileChecker();this.isTouchy=B.isTouch();if(this.isTouchy){this.bound={click:this.hoverStars.bind(this)};}else{this.bound={mousemove:this.hoverStars.bind(this),mouseleave:this.hoverStars.bind(this),click:this.hoverStars.bind(this)};}this.parent(this.elements,A);if(this.options.className){this.tip.set("class",this.options.className);}},attach:function(A){A.each(function(B){B.store("defaultClass",B.get("class"));B.addEvents(this.bound);},this);},detach:function(A){A.each(function(B){B.removeEvents(this.bound);},this);},getTarget:function(B){if(this.elements.contains(B)){return B;}var A;this.elements.each(function(C){if(C.hasChild(B)){A=C;}});return A;},hoverStars:function(F){var C=this.getTarget(F.target);switch(F.type){case"mousemove":var A=this.convert(C,this.calc(F),true).toString();if(A=="0"||A>"5"){break;}var E=this.options.starTips[A];C.store("tip:title",E.split("::")[0]);C.store("tip:text",this.options.clickToRateString+" "+E.split("::")[1]);this.elementEnter(F,C);C.set("class",C.get("class").replace(/userRate medium s\d\w?/,this.convert(C,this.calc(F))));C.addClass("userStars");break;case"mouseout":this.elementLeave.bindWithEvent(this,C)(F);C.set("class",C.retrieve("defaultClass"));break;case"click":var B=this.convert(C,this.calc(F),true);var D=this.convert(C,this.calc(F));C.store("rating",B);C.store("defaultClass",C.get("class"));if(this.isTouchy){this.addUserRating(C,F);}this.fireEvent("onRate",[B,D]);break;}},show:function(){this.fireEvent("onShow",this.tip);},hide:function(){this.fireEvent("onHide",this.tip);},addUserRating:function(C,E){var A=this.options.starTips[this.convert(C,this.calc(E),true).toString()].split("::");var B=C.getParent();var D=(!B.getElement(".user_rating"))?this.injectUserRating(B):B.getElement(".user_rating");this.updateUserRating(D,A);},injectUserRating:function(B){var D=new Element("div",{"class":"user_rating",style:"position: relative; left: 105px; top: -17px;height:0px;"});var A=new Element("span",{"class":"user_title_rating"});var C=new Element("span",{"class":"user_text_rating"});D.grab(A);D.grab(C);B.grab(D);return D;},updateUserRating:function(C,A){C.getElement(".user_title_rating").set("html",A[0]);C.getElement(".user_text_rating").set("html"," "+A[1]);if(this.options.removeUserRating){if(this.ur_timer){clearTimeout(this.ur_timer);}var D=new Fx.Tween(C,{onComplete:function(){C.destroy();}.bind(this)});var B=function(){D.start("opacity",0);}.bind(this);this.ur_timer=B.delay(this.options.userRatingDuration,this);}},calc:function(B){var C=$(B.target).getPosition().x;var A=B.page.x-C;return A;},convert:function(C,F,E){var G="userRate medium s";var B=Math.round(C.getSize().x/5);var A=(F/B).toInt();var D=F/B-A;if(this.options.useHalfStars){if(D>0.5){A++;}G+=A;if(D<=0.5){G+="h";A+=0.5;}}else{if(D){A++;}G+=A;}return E?A:G;}});var Fixation=new Class({Implements:Options,options:{inset:20,widthOffset:0},initialize:function(C,A,B){this.setOptions(B);this.element=$(C);this.container=$(A);this.coords=this.container.getCoordinates();this.container.size=this.container.getSize();this.defaults=this.element.getStyles("left","top");this.element.size=this.element.getSize();this.options.inset=!isNaN(this.options.inset.toInt())?this.options.inset.toInt():0;this.options.widthOffset=!isNaN(this.options.widthOffset.toInt())?this.options.widthOffset.toInt():0;if(window.MooTools&&MooTools.version=="1.2dev"){this.defaults=new Hash(this.defaults);this.defaults.each(function(E,D){this[D]=!isNaN(E.toInt())?E.toInt():0;}.bind(this.defaults));}else{Object.each(this.defaults,function(E,D){this[D]=!isNaN(E.toInt())?E.toInt():0;}.bind(this.defaults));}this.max={top:this.coords.top-this.options.inset+this.defaults.top,bottom:this.coords.bottom-this.options.inset,colBottom:this.container.size.y-this.element.size.y};this.fixed=false;this.pos={position:"absolute",top:this.defaults.top,left:this.defaults.left};if(!Browser.Engine.trident4&&(this.element.size.y+this.options.inset<window.getSize().y)){this.attachScroll();this.attachResize();}},attachScrollEvent:function(){var B=this.container.getSize().y-this.options.inset;if(this.max==null){return false;}else{if(this.max.bottom!=(B+this.max.top)){this.max.bottom=B+this.max.top;this.max.colBottom=this.container.getSize().y-this.element.getSize().y;}}var A=window.getScroll();if(this.fixed&&A.y<this.max.top){this.pos={position:"absolute",top:this.defaults.top,left:(this.defaults.left-this.options.widthOffset)};this.setPosition();this.fixed=false;}else{if(this.fixed&&(A.y+this.element.size.y)>this.max.bottom){this.pos={position:"absolute",top:this.max.colBottom,left:(this.defaults.left-this.options.widthOffset)};this.setPosition();this.fixed=false;}else{if(!this.fixed&&(A.y>this.max.top)&&(A.y+this.element.size.y<this.max.bottom)){this.pos={position:"fixed",top:this.options.inset,left:(this.coords.left+this.options.widthOffset)};this.setPosition();this.fixed=true;}}}},attachScroll:function(){boundAttachScrollEvent=this.attachScrollEvent.bind(this);window.addEvent("scroll",boundAttachScrollEvent);},detatchScroll:function(){window.removeEvent("scroll",boundAttachScrollEvent);},attachResizeEvent:function(){this.coords=this.container.getCoordinates();if(this.fixed){this.pos.left=this.coords.left+this.options.widthOffset;this.setPosition();}},attachResize:function(){boundAttachResizeEvent=this.attachResizeEvent.bind(this);window.addEvent("resize",boundAttachResizeEvent);},detatchResize:function(){window.removeEvent("resize",boundAttachResizeEvent);},setPosition:function(){this.element.setStyles({position:this.pos.position,top:this.pos.top,left:this.pos.left});}});var ShareBar=new Class({Extends:Fixation,Implements:[Options,Events],options:{defaultView:"side",enableToggle:true,barId:"shareBar",shareBarResourceId:false,levtEnabled:true,shortenerCallback:false,views:{side:{id:"contentBody",element:"#contentBody",position:"bottom"},inline:{element:"#contentBody header",position:"bottom"}},data:{commentCount:"#postComments .countNumber"},adSkin:{regex:/^url\((\")?http:\/\/i\.i\.com\.com\/cnwk.1d\/Ads.*$/gi,element$$:".rb_skin, #rb_skin"}},loaded:{side:false,inline:false},thirdPartyLoading:{google:false,linkedIn:false,twitter:false},initialize:function(A){this.setOptions(A);this.shortURL=this.shareURL;this.processingRequest=false;this.gotShortUrl=false;this.commentCount="0";this.initValues();var B=$$(this.options.adSkin.element$$)[0];B=B!=null?B.getStyle("background-image"):B;if(B!=null&&B.match(this.options.adSkin.regex)!=null){this.options.enableToggle=false;this.requestShareBar("inline");}else{if(!$$(".inline-sharebar")[0]&&document.body.offsetWidth<1200){this.requestShareBar("inline");}else{if(!$(this.options.barId)){this.requestShareBar(this.options.defaultView);}else{this.parent("shareBar",this.options.views.side.id);this.initLevtTracking();if(this.options.enableToggle){this.attachWidthResize();}}}}},initLevtTracking:function(){if(!this.options.levtEnabled){return ;}try{if(twttr){twttr.events.bind("tweet",function(B){this.pingLEVT("twitter","socialbutton");}.bind(this));}$$(".shareContent li .linkIcon").each(function(B){B.addEvent("click",function(){if(B.hasClass("facebook")){this.pingLEVT("facebook","sharelink");}else{if(B.hasClass("twitter")){this.pingLEVT("twitter","sharelink");}else{if(B.hasClass("linkedin")){this.pingLEVT("linkedin","sharelink");}else{if(B.hasClass("digg")){this.pingLEVT("digg","sharelink");}else{if(B.hasClass("delicious")){this.pingLEVT("delicious","sharelink");}else{if(B.hasClass("reddit")){this.pingLEVT("reddit","sharelink");}else{if(B.hasClass("stumble")){this.pingLEVT("stumbleupon","sharelink");}else{if(B.hasClass("google")){this.pingLEVT("google","sharelink");}}}}}}}}}.bind(this));}.bind(this));}catch(A){dbug.log("LEVT tracking failed to initialize!");}},loadScript:function(A,B){if(B){new Asset.javascript(A,{onload:B});}else{new Asset.javascript(A);}},attachWidthResizeEvent:function(){if(document.body.offsetWidth<1200){if(this.loaded.inline||$$(".inline-sharebar")[0]){this.toggleShareBars("inline");}else{this.requestShareBar("inline");}}else{if(this.loaded.side||$$(".side-sharebar")[0]){this.toggleShareBars("side");}else{this.requestShareBar("side");}}},shareBarLocation:function(A){if(PageVars.get("siteId")==162){var B="http://"+document.location.host+"/html/cbs/shareBar/";B+=(Browser.qs&&Browser.qs.htmldebug?"dev-":"");if(this.options.shareBarResourceId!=false){B+=this.options.shareBarResourceId+"-";}B+=A;B+="-sharebar.html";return B;}return"http://"+document.location.host+"/html/rb/cnet/"+(Browser.qs&&Browser.qs.htmldebug?"dev-":"")+A+"-sharebar.html";},requestShareBar:function(A){if(!this.processingRequest){this.processingRequest=true;new Request({method:"get",url:this.shareBarLocation(A),onSuccess:function(B){if(!this.gotShortUrl){if(typeof this.options.shortenerCallback=="function"){this.shortURL=this.options.shortenerCallback(this.shareURL);this.injectShareBar(A,B);this.gotShortUrl=true;}else{new Request({method:"get",url:"http://"+document.location.host+"/posidn/rest/v1.0/shareBarUrlShortener?longUrl="+this.shareURL,onSuccess:function(C,E){try{if(E!=null&&E.getElement("CNETResponse")!=null&&E.getElement("CNETResponse").getElement("cnetCoUrl")!=null&&E.getElement("CNETResponse").getElement("cnetCoUrl").getElement("shortUrl")!=null){this.shortURL=E.getElement("CNETResponse").getElement("cnetCoUrl").getElement("shortUrl").get("text");}else{this.shortURL=this.shareURL;}}catch(D){this.shortURL=this.shareURL;}this.injectShareBar(A,B);this.gotShortUrl=true;}.bind(this),onFailure:function(){this.shortURL=this.shareURL;this.injectShareBar(A,B);}.bind(this)}).send();}}else{this.injectShareBar(A,B);}this.processingRequest=false;}.bind(this)}).send();}},injectShareBar:function(A,C){var B=new Element("div",{html:this.replacePlaceholders(C)});B.getChildren()[0].inject($$(this.options.views[A].element)[0],this.options.views[A].position);$$("."+A+"-sharebar .linkedInShareBtn").each(function(D){if(D.get("html")==""&&A=="side"){D.adopt(new Element("script",{type:"IN/Share","data-url":this.shareURL,"data-counter":"top","data-onsuccess":"shareSuccess"}));}else{if(D.get("html")==""&&A=="inline"){D.adopt(new Element("script",{type:"IN/Share","data-url":this.shareURL,"data-counter":"right","data-onsuccess":"shareSuccess"}));}}}.bind(this));this.initializeSocialButtons(A);this.loaded[A]=true;this.fireEvent("loaded",A);if(A=="side"){new Fixation("shareBar",this.options.views.side.id);}this.initLevtTracking();if(this.options.enableToggle){this.attachWidthResize();}this.toggleShareBars(A);},initValues:function(){var C=(document.URL.contains("?"))?document.URL.substring(0,document.URL.indexOf("?")):document.URL;this.shareURL=(this.options.data.shareURL!=null)?this.options.data.shareURL:C;this.tagPrefix=(this.shareURL.contains("&tag=")||this.shareURL.contains("?tag="))?";":"?tag=";this.shareDescription=this.options.data.shareDescription;if(PageVars.get("siteId")==162){this.shareTitle=(this.options.data.shareTitle!=null)?this.options.data.shareTitle:document.title.split("- CBS News")[0].trim();this.shareTitle=this.shareTitle.replace(/'/g,"");var A={500395:"business",207:"entertainment",205:"technology",204:"science",250:"politics",501370:"offbeat",400:"sports"};if(A[PageVars.get("channelId")]){this.diggTopic=A[PageVars.get("channelId")];}else{this.diggTopic="world_news";}this.shareSource="CBSNEWS";}else{this.shareTitle=(this.options.data.shareTitle!=null)?this.options.data.shareTitle:document.title.split("|")[0].trim();this.shareTitle=this.shareTitle.replace(/'/g,"");this.shareSource="CNET";this.diggTopic=(PageVars.get("pageType")=="2100")?"tech_news":"gadgets";}var B=setInterval(function(){setTimeout(function(){if($$(this.options.data.commentCount)[0]){this.commentCount=parseFloat($$(this.options.data.commentCount)[0].get("text"));if(this.commentCount<0){$$("li.commentTeaser").hide();}$$(".commentTeaser .countNumber").set("text",this.commentCount);clearInterval(B);}}.bind(this),"200");}.bind(this),"200");},replacePlaceholders:function(A){if(this.shortURL===undefined){this.shortURL=this.shareURL;}A=A.replace(/{{shareUrl}}/g,this.shareURL);A=A.replace(/{{shortUrl}}/g,this.shortURL);A=A.replace(/{{shareTitle}}/g,this.shareTitle);A=A.replace(/{{eShareUrl}}/g,encodeURIComponent(this.shareURL));A=A.replace(/{{eShortUrl}}/g,encodeURIComponent(this.shortURL));A=A.replace(/{{eTagPrefix}}/g,encodeURIComponent(this.tagPrefix));A=A.replace(/{{eShareTitle}}/g,encodeURIComponent(this.shareTitle));A=A.replace(/{{eShareDescription}}/g,encodeURIComponent(this.shareDescription));A=A.replace(/{{eShareSource}}/g,encodeURIComponent(this.shareSource));A=A.replace(/{{eDiggTopic}}/g,encodeURIComponent(this.diggTopic));A=A.replace(/{{commentCount}}/g,this.commentCount);return A;},toggleShareBars:function(A){if(A=="inline"){$$(".side-sharebar").setStyle("display","none");$$(".inline-sharebar").setStyle("display","block");}else{if(A=="side"){$$(".side-sharebar").setStyle("display","block");$$(".inline-sharebar").setStyle("display","none");}}},pingLEVT:function(A,B){new JloggerLEVT.Social.Share({applicationTags:{eventt:"socialsite",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:A,wd:B,wdloc:"sharebar"}}).ping();},initializeSocialButtons:function(A){try{$$(".shareBar a.email").each(function(C){C.removeEvents();C.addEvent("click",PageTools.email);});$$(".shareBar a.print").each(function(C){C.removeEvents();C.addEvent("click",PageTools.print);});if(window.FB&&$$(".facebookShareBtn").length>0){FB.XFBML.parse();}if((typeof twttr==="undefined"||typeof twttr.widgets==="undefined")&&!this.thirdPartyLoading.twitter&&$$(".twitterShareBtn").length>0){this.thirdPartyLoading.twitter=true;this.loadScript("http://platform.twitter.com/widgets.js",function(){twttr.widgets.load();});}else{twttr.widgets.load();}if(typeof gapi==="undefined"&&!this.thirdPartyLoading.google&&$$(".googlePlusOneShareBtn").length>0){this.thirdPartyLoading.google=true;this.loadScript("https://apis.google.com/js/plusone.js",function(){gapi.plusone.go();});}else{gapi.plusone.go();}if(typeof IN==="undefined"&&!this.thirdPartyLoading.linkedIn&&$$(".linkedInShareBtn").length>0){this.thirdPartyLoading.linkedIn=true;this.loadScript("https://platform.linkedin.com/in.js?async=true",function(){IN.init();});}else{IN.init();}}catch(B){dbug.log("Uh-oh one of the buttons didn't parse correctly",B);}},attachWidthResize:function(){boundAttachResizeEvent=this.attachWidthResizeEvent.bind(this);window.addEvent("resize",boundAttachResizeEvent);}});DealTicker=new Class({Implements:[Options,Events],options:{thumbContainer:"dealWrapper",thumbScroller:"dealScroller",itemsPerSlide:3,startIndex:0,leftArrow:"scrollLeft",rightArrow:"scrollRight",tickerInterval:"7000",scaleImageWidth:60,scaleImageHeight:43,slideContainer:"dealSlideContainer",slideContainerClass:"dealSlideContainer",slideClass:"dealSlide",transitionDuration:"long",pauseOnHover:true,pauseOnBlur:true,autoplay:true},initialize:function(A){this.setOptions(A);this.container=$(this.options.thumbContainer);this.scroller=$(this.options.thumbScroller);this.items=$$(".dealItem");this.images=$$(".dealImage");this.resizedImages=this.setImages();this.slides=this.setSlides();$(this.options.rightArrow).addEvent("click",this.activeSelect.bind(this,"next"));$(this.options.leftArrow).addEvent("click",this.activeSelect.bind(this,"prev"));this.setTracking();this.showSlide(this.options.startIndex);if(this.options.pauseOnHover&&this.options.autoplay){this.setHoverPausing();}if(this.options.pauseOnBlur&&this.options.autoplay){this.setWindowPausing();}if(this.options.autoplay){this.autoplay();}},setTracking:function(){$(this.options.leftArrow).addEvent("click",function(){new JloggerLEVT.RIA({applicationTags:{event:"log",mapp:"marketplace",comp:"modal_deal_ticker",comptyp:"left_arrow",riaevent:"click",objtyp:"",objnm:""}}).ping();});$(this.options.rightArrow).addEvent("click",function(){new JloggerLEVT.RIA({applicationTags:{event:"log",mapp:"marketplace",comp:"modal_deal_ticker",comptyp:"right_arrow",riaevent:"click",objtyp:"",objnm:""}}).ping();});},setImages:function(){images=this.images;images.each(function(E,A){var B=E.width;var D=E.height;if(B==0&&D==0){dbug.log("preloading image  src:  "+E.src);var C=new Asset.image(E.src);if(C.width==0&&C.height==0){E.width=this.options.scaleImageWidth;E.height=this.options.scaleImageHeight;dbug.log("image not preloaded, set to default scale dimensions");}}this.setScaledImage(E);}.bind(this));return images;},setScaledImage:function(F){var C=F.width;var E=F.height;var A=this.options.scaleImageWidth;var B=this.options.scaleImageHeight;var D=this.scaleImage(A,B,C,E);F.set("width",D[0]);F.set("height",D[1]);F.setStyles({"margin-top":(B-D[1])/2,"margin-bottom":(B-D[1])/2,display:"block"});},scaleImage:function(F,A,B,E){dbug.log("orig image  width:  "+B+" height: "+E);var C=E/B;if(B>=F&&C<=1){B=F;E=B*C;if(E>=A){E=A;B=E/C;}}else{if(E>=A){E=A;B=E/C;}}dbug.log("scaleImage width: "+B+" height: "+E);var D=[];D[0]=B;D[1]=E;return D;},setSlides:function(){slideNum=this.options.itemsPerSlide;items=this.items;var D=this.options;var B=new Element("ul",{id:D.slideContainer,"class":D.slideContainerClass});var A=new Element("li",{"class":D.slideClass});var E=[];var F=1;items.each(function(H,G){dbug.log("i % item: "+((G+1)%slideNum));if((G+1)%slideNum==1){H.addClass("first");}if((G+1)%slideNum==0){H.addClass("last");}H.inject(A);if((G+1)%slideNum==0||(G+1)==items.length){A.inject(B);A=new Element("li",{id:D.slideClass+F,"class":D.slideClass});F=F+1;}H.addClass("show");});B.inject(this.scroller);var C=$$("."+D.slideClass);C.each(function(G,H){G.set("morph",{duration:this.options.transitionDuration,onStart:function(){G.setStyles({display:"inline-block",zoom:"1","*display":"inline"});},onComplete:function(){if(G.getStyle("left")!="0px"){G.setStyles({display:"none"});}}});G.setStyles({display:"none",position:"absolute",top:"0px",left:(H==this.options.startIndex)?"0px":"1000px"});}.bind(this));return C;},getToIndex:function(A){if(A=="next"){return(this.currentIndex==this.slides.length-1)?0:this.currentIndex+1;}return((this.currentIndex==0)?this.slides.length:this.currentIndex)-1;},showSlide:function(C){var A=this.currentIndex;var B=this.slides.length-1;if(C==A){return this;}$each(this.slides,function(D,E){if(E==C){if($type(A)=="number"){var F=this.slides[A];if((C-A)==1||(A==B&&C==0)){F.morph({left:-1000});D.setStyle("left","1000px");}else{F.morph({left:1000});D.setStyle("left","-1000px");}}D.morph({left:0});}}.bind(this));this.currentIndex=C;return this;},setHoverPausing:function(){this.setBindings();this.container.addEvents({mouseenter:this.bound.stop,mouseleave:this.bound.autoplay});this.addEvent("onActiveSelect",this.bound.clearPausing);},setWindowPausing:function(){if(!this.bound){this.setBindings();}window.addEvents({blur:this.bound.stop,focus:this.bound.autoplay});},clearPausing:function(){this.container.removeEvent("mouseenter",this.bound.stop);this.container.removeEvent("mouseleave",this.bound.autoplay);window.removeEvent("blur",this.bound.stop);window.removeEvent("focus",this.bound.autoplay);this.removeEvent("onActiveSelect",this.bound.clearPausing);},setBindings:function(){this.bound={autoplay:this.autoplay.bind(this),stop:this.stop.bind(this),clearPausing:this.clearPausing.bind(this)};},activeSelect:function(A){if($type(A)!="number"){A=this.getToIndex(A);}if(this.tickerInt){this.stop();}dbug.log("displaying index: "+A);this.showSlide(A);this.fireEvent("onActiveSelect");},autoplay:function(){if(this.tickerInt){return this;}this.tickerInt=this.rotate.periodical(this.options.tickerInterval,this);return this;},stop:function(){this.tickerInt=$clear(this.tickerInt);return this;},rotate:function(){var B=this.currentIndex;var A=(B+1>=this.slides.length)?0:B+1;this.showSlide(A);return this;}});var PriceAlertModal=new Class({Implements:Options,options:{nextAction:null,pid:null,elemClicked:null,modal$$:"#priceAlert.globalModal",defaultPrice:0,subscribeToDeals:true},data:{lowPrice:null},initialize:function(A){dbug.log("Initialize price alert modal");this.setOptions(A);this.pingLEVT();this.requestContent();dbug.log("Price alert modal initialization complete");},verifyPrice:function(A){if(A.length==0){return"Please enter a price.";}if(!/^[0-9]+$/.test(A)){return"Please use numbers (0-9) only.";}else{if(parseInt(A)>=this.data.lowPrice){return"Please enter a price lower than the current price.";}else{return true;}}},forceLogin:function(A){dbug.log("the user variable loggedIn: ",UserVars.get("loggedIn"));if(UserVars.get("loggedIn")===""){$$(this.options.modal$$).hide();}CURS.Manager.checkLogin({registerHed:"Please complete your registration to set your price alert",loginHed:"Log in to CNET",appId:305,path:PageVars.getRefreshPath()+"&alertprice="+$("priceAlert").getElement(".alertPrice").get("value")+"&wantIt=true&dealavail="+$("priceAlert").getElement(".dealAvail input").get("checked"),nextAction:function(){this.finishSubmission(A);}.bind(this)});CURS.Manager.appendWantToUrl=true;CURS.Manager.addEvent("onRegister",function(){dbug.log("the uservars is set: ",UserVars.get("ursRegId"));this.finishSubmission(A);}.bind(this));},finishSubmission:function(B){dbug.log("this is the gigya user info: ",CURS.Social.gigya.gigyaUserInfo);if(B){var A=$$(this.options.modal$$)[0].getElements(".alertPrice")[0].get("value").replace(/^0+/,"");dbug.log(A);this.submitPriceAlert("targetPrice="+A+"&eventType=12",A);}else{this.submitPriceAlert("eventType=11");}},submitAlerts:function(){var A=$$(this.options.modal$$).getElements(".alertPrice")[0];if(A[0]){this.data.lowPrice=A[0].get("data-lowprice").replace("$","").replace(",","");if(this.data.lowPrice.contains(".00")){this.data.lowPrice=this.data.lowPrice.toInt();}else{this.data.lowPrice=this.data.lowPrice.toInt()+1;}var B=this.verifyPrice(A[0].get("value"));if(B!=true){$$(this.options.modal$$).getElements(".priceError")[0].set("text",B);return false;}if((this.data.lowPrice/2)>A[0].get("value").toInt()){$$(this.options.modal$$).setStyle("width","500px");$$(this.options.modal$$).getElements(".newAlert")[0].hide();$$(this.options.modal$$).getElements(".doubleCheck")[0].show("block");$$(".go").addEvent("click",function(){this.forceLogin(true);}.bind(this));$$(".back").addEvent("click",function(){$$(this.options.modal$$).setStyle("width","780px");$$(this.options.modal$$).getElements(".newAlert")[0].show("block");$$(this.options.modal$$).getElements(".doubleCheck")[0].hide();}.bind(this));return false;}this.forceLogin(true);}else{this.forceLogin(false);}},submitPriceAlert:function(A,B){var D="";if($$(this.options.modal$$).getElements(".dealAvail")[0].getElement("input")[0].checked){D="&alertItemType2=2&alertItemId2="+this.options.pid+"&eventType2=10&actionType2=1";}else{D="&alertItemType2=2&alertItemId2="+this.options.pid+"&eventType2=10&actionType2=2";}if(UserVars.get("ursRegId")){var C="nomesh&ursRegId="+UserVars.get("ursRegId")+"&alertItemType=2&alertItemId="+this.options.pid+"&"+A+"&actionType=1"+D;}else{var C="nomesh&alertItemType=2&alertItemId="+this.options.pid+"&"+A+"&actionType=1"+D;}new Request({url:"http://"+document.location.host+"/8630-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-0.html",data:C,onSuccess:function(F,H){if($("regShell").getElements(".confirmsent").length>0){$("modalOverlay").show();$$(this.options.modal$$).setStyle("width","780px");$$(this.options.modal$$).getElements(".newAlert")[0].hide();$$(this.options.modal$$).getElements(".doubleCheck")[0].hide();if(B){$$(this.options.modal$$).getElements(".setConfirm .setPrice")[0].set("text"," $"+B+".00");}$$(this.options.modal$$).show();$$(this.options.modal$$).getElements(".setConfirm")[0].show("block");}try{var E=H.getElement("response");if(E.getElement("status").get("text")=="success"){new Request({url:"/8683-4_"+PageVars.get("siteId")+"-0.html",data:"assetId="+$$(this.options.modal$$).getElements(".productId")[0].get("value")+"&assetTypeId=2&value=2",onSuccess:function(){dbug.log("Successfully wanted the product.");},onFailure:function(){dbug.log("Failed to want the product.");}}).send();}else{dbug.log(G);}}catch(G){dbug.log(G);}this.pingLEVT(B);}.bind(this),onFailure:function(E){dbug.log("Price alert submission failed - "+e.toString());}.bind(this)}).send();},pingLEVT:function(A){dbug.log("the element clicked: ",this.options.elemClicked);new JloggerLEVT.RIA({applicationTags:{event:"log",mapp:"marketplace",comp:"price_alert",comptyp:this.options.elemClicked,riaevent:(A)?"submit_alert":"click",objtyp:"",objnm:"",s6:(A)?A:"",s7:this.options.pid}}).ping();},requestContent:function(){new Request.HTML({url:"http://"+document.location.host+"/1732-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+this.options.pid+".html?nomesh",method:"get",onSuccess:function(C,A,D){try{dbug.log("Received price alert response.");this.displayModal(D);}catch(B){dbug.log("Price alert response processing failed!");this.displayErrorModal("Request Failed","An unexpected error has occurred. Please try again later.");}}.bind(this),onFailure:function(){dbug.log("Price alert request failed.");this.displayErrorModal("Request Failed","A connection error has occurred. Please try again later.");}.bind(this)}).send();},displayModal:function(A){new GlobalModal({content:A,showNow:true,onInit:function(){try{this.storeValues();if(this.options.defaultPrice>0){$$("#priceAlert .alertPrice").set("value",this.options.defaultPrice);}if(!this.options.subscribeToDeals){$$("#priceAlert .dealAvail input").set("checked","");}$("alertSetForm").addEvent("submit",function(C){C.stop();if(this.submitAlerts()){$$(this.options.modal$$).each(function(D){D.getParent(".StickyWinInstance").dispose();});}}.bind(this));try{new DealTicker();}catch(B){}}catch(B){}}.bind(this),onClose:function(){$$("#priceAlert.globalModal").each(function(B){B.getParent(".StickyWinInstance").dispose();});}});},storeValues:function(){var A=$$(this.options.modal$$)[0].getElements(".alertPrice");if(A.length>0&&A[0].get("value")!=""){this.data.lowPrice=A[0].get("value").toInt();}},displayErrorModal:function(B,A){new GlobalModal({content:'<div class="globalModal"><div class="formHead"><h2>'+B+'</h2><a class="closeModal">close</a></div><div class="formBody">'+A+"</div></div>"});},displayErrorMsg:function(A){$$(this.options.modal$$)[0].getElements(".priceError")[0].set("text",A);}});window.addEvent("domready",function(){$$("#deleteReview, .deleteComment").each(function(K){var J=new UOForm(K,{clone:false,resetOnHide:false,submitElems:"a.submitButton",closeElems:".cancel a",useValidator:false,firstParent:K.getParent("li")});if(K.getParent("li")){K.getParent("li").getElement(".admin .delete").addEvent("click",function(){J.show();});}else{if(K.getParent(".rateSum")){K.getParent(".rateSum").getElement(".admin .delete").addEvent("click",function(){J.show();});}}});$$("#editReview, .editComment").each(function(K){var J=new UOForm(K,{clone:false,resetOnHide:false,submitElems:"a.submitButton",closeElems:".cancel a",useValidator:false,firstParent:K.getParent("li")});if(K.getParent("li")){K.getParent("li").getElement(".admin .edit").addEvent("click",function(){J.show();});}else{if(K.getParent(".rateSum")){K.getParent(".rateSum").getElement(".admin .edit").addEvent("click",function(){J.show();});}}});new initializeUOs();new JlScroller({tag:"similarProdsTop",event:"scrollTo",scrollTo:{top:"similarProds"}});var I=function(K){var J=null;if(K.getParent("li")){J=K.getParent("li").getElement("ul.data");}else{if(K.getParent("div.edRateHover")){J=K.getParent("div.edRateHover").getElement("ul.data");}else{if(K.getParent("div.compareItem")){J=K.getParent("div.compareItem").getElement("ul.data");}}}if(J){K.store("tip:text",J.getParent().get("html"));}else{K.store("tip:text",(K.getProperty("id")=="energyMeter")?"Energy info not available":"Product summary not available");}};$$("#edStars li a.toolTipElement, #edStars2 li a.toolTipElement, #energyMeter, .rootWirelessInfo li a.toolTipElement, #similarProds a.toolTipElement, .edRateHover a.toolTipElement, .userRateHover a.toolTipElement").each(I);$$(".contentTools a.share").each(function(J){J.addEvent("mouseenter",PageTools.openShare.bind(PageTools));});$$(".contentTools a.email").each(function(J){J.addEvent("click",PageTools.email);});$$(".contentTools a.print").each(function(J){J.addEvent("click",PageTools.print);});new mediaGallery();if($("powerSaverGraphic")){new Jlogger({tag:"power-saver-over",cval:"pwrsvr",element:$("powerSaverGraphic"),event:"mouseenter",fireOnce:true});}if($("energyMeterGraphic")){new Jlogger({tag:"energy-meter-over",cval:"enrgy;",element:$("energyMeterGraphic"),event:"mouseenter",fireOnce:true});}if($("actionWriteReview")){new Jlogger({tag:"write-review-btn",cval:"writerev;",element:$("actionWriteReview"),event:"click",fireOnce:false});}if($("myRatingStar")){new Jlogger({tag:"my-rating-star",cval:"myrating;",element:$("myRatingStar"),event:"click",fireOnce:false});}if($("seeFReview")){new Jlogger({tag:"see-full-review",cval:"seefullreview;",ctype:"click",element:$("seeFReview"),event:"click",fireOnce:false});}if($("seeFReviewBar")){new Jlogger({tag:"see-full-review-bar",cval:"seefullreviewbar;",ctype:"click",element:$("seeFReviewBar"),event:"click",fireOnce:false});}if($("thumbVidAd")){new Jlogger({tag:"play-video-promo",cval:"playVideoPromo;",ctype:"click",element:$("thumbVidAd"),event:"click",fireOnce:false});}if($("thumbVidAd")){new Jlogger({tag:"hover-video-promo",cval:"hoverVideoPromo;",ctype:"hover",element:$("thumbVidAd"),event:"mouseenter",fireOnce:false});}if((PageVars.get("siteId","number")==7)&&$("pfVideoPromo")){$("pfVideoPromo").getElements(".productImage, .videoOverlayImg").addEvent("click",function(){var J=new Element("div",{"class":"productVideo",id:"videoplayer"});var K='<a href="javascript:void(0)" class="closeVideo">close</a>';J.set("html",K);$("pfVideoPromo").getElements(".productImage, .videoOverlayImg").setStyle("display","none");J.inject($("pfVideoPromo"));loadUniversalPlayer({parentElement:J,playerType:"small",lumiereQueryType:"id",lumiereQueryValue:$("pfVideoPromo").getProperty("videoId"),autoPlay:true,preRollAd:true,firstVideoPostAd:false,contentPostRollAd:true,useCurrentPageUrl:false,hideTabs:true,hideBkg:true,externalLinks:true,initObject:window,initAction:false});$("pfVideoPromo").getElement(".closeVideo").addEvent("click",function(){J.destroy();$("pfVideoPromo").getElements(".productImage, .videoOverlayImg").setStyle("display","block");});});}$$("a.sigToolTipElement").each(function(K,J){var L=K.get("title").split("::");K.store("tip:title",L[0]);K.store("tip:text",L[1]);});var C=new Tips(".sigToolTipElement",{className:"sigToolTipElement"});if($("pe-sponsoredCompareProducts-riaTile")){if(!$("madisonBingoMfrId")||!$("madisonBingoMfrAttrValueId")){$("pe-sponsoredCompareProducts-riaTile").getParent().setStyle("display","none");}else{new ContentUpdater("riasponsoredbingo",{"sponsoredCompareProducts-riaTile":{element:"pe-sponsoredCompareProducts-riaTile",onSuccess:function(K){var J=K.getElements("a.toolTipElement");J.each(function(L){I(L);L.addClass("cnetTip");cnetToolTips.attach(L);});}}},{url:"4623-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html",data:{manufactureId:$("madisonBingoMfrId").get("value"),madisonBingoMfrAttrValueId:$("madisonBingoMfrAttrValueId").get("value"),excludedPids:($("similarProds")&&$("similarProds").getElements("input[name=id]"))?$("similarProds").getElements("input[name=id]").get("value").toString():""},onTimeout:function(){$("pe-sponsoredCompareProducts-riaTile").getParent().setStyle("display","none");},onFailure:function(){$("pe-sponsoredCompareProducts-riaTile").getParent().setStyle("display","none");},timeout:4000}).send();}}if($("pe-bingoSponsoredUnit-riaTile")){if(!$("madisonBingoMfrId")||!$("madisonBingoMfrAttrValueId")){$("pe-bingoSponsoredUnit-riaTile").getParent().setStyle("display","none");}else{new ContentUpdater("riasponsoredbingo2",{"bingoSponsoredUnit-riaTile":{element:"pe-bingoSponsoredUnit-riaTile",onSuccess:function(K){var J=K.getElements("a.toolTipElement");J.each(function(L){I(L);L.addClass("cnetTip");cnetToolTips.attach(L);});}}},{url:"4623-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html",data:{manufactureId:$("madisonBingoMfrId").get("value"),madisonBingoMfrAttrValueId:$("madisonBingoMfrAttrValueId").get("value"),excludedPids:$("similarProds").getElements("input[name=id]").get("value").toString()},onTimeout:function(){$("pe-bingoSponsoredUnit-riaTile").getParent().setStyle("display","none");},onFailure:function(){$("pe-bingoSponsoredUnit-riaTile").getParent().setStyle("display","none");},timeout:4000}).send();}}$$(".addToList").each(function(J){J.addEvent("click",function(){UserLists.Manager.getUserListModal("AddToList",J);});});if($("nextUO")){$("nextUO").addEvent("click",function(){try{pagingUO($("nextUO").href);}catch(J){dbug.log("Viewer initiailization failed: %o",J);}return false;}.bind(this));}$$(".userRevDetail .expandRev").each(function(J){J.addEvent("click",function(){J.getParent(".uoSummary").hide();J.getParent(".uoSummary").getNext(".uoFull").reveal();});});uoForms.initStars();if($("rating")&&$("rating").get("value")!="-1"){$("rating").set("value","-1");}if($("edRateHover")){new Jlogger({tag:"see-editor-rating",cval:"seeEditorRating",ctype:"click",element:$("edRateHover"),event:"click",fireOnce:false});}if($("expandUserRev")){new Jlogger({tag:"expand-user-review",cval:"expandUserRev",ctype:"click",element:"expandUserRev",event:"click",fireOnce:false});}if($("myRateLink")){new Jlogger({tag:"my-user-rating",cval:"myRating",ctype:"mouseenter",element:"myRateLink",event:"mouseenter",fireOnce:false});}var F=new Jlogger({tag:"loadCommentsList",element:window,event:"load",fireOnce:true});var E=new Jlogger({tag:"submitReply",element:"subReply",event:"click"});var B=new Jlogger({tag:"submitOffensive",element:"subOffensive",event:"click"});var H=new Jlogger({tag:"submitEdit",element:"subEdit",event:"click"});var G=new Jlogger({tag:"submitDelete",element:"subDelete",event:"click"});$$(".postTools .permalink").addEvent("click",function(){new JloggerLEVT.Social({applicationTags:{event:"connect",eventt:"permalink",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"plbutton",wdloc:"uobox"}}).ping();});new Request({url:"/8713-4_"+PageVars.get("siteId")+"-0.html?nomesh&assetId="+PageVars.get("assetId")+"&refresh="+new Date().getTime(),onSuccess:function(K){if(K&&K.trim()){try{var L,J;L=JSON.decode(K);if(L.userVote){if(L.userVote.AssetVoteValue==1){J=$$(".gwhTools a.gotIt");}else{if(L.userVote.AssetVoteValue==2){J=$$(".gwhTools a.wantIt");}else{if(L.userVote.AssetVoteValue==3){J=$$(".gwhTools a.hadIt");}}}J.removeClass("like");J.addClass("unlike");J.setProperty("assetVoteId",L.userVote.AssetVoteId);}if(L.productVoteSum){$$(".gwhTools a.gotIt").getElement("b").set("text",L.productVoteSum.gotItSum);$$(".gwhTools a.wantIt").getElement("b").set("text",L.productVoteSum.wantItSum);$$(".gwhTools a.hadIt").getElement("b").set("text",L.productVoteSum.hadItSum);}}catch(M){dbug.log("invalid response %o",M);}}else{dbug.log("no user vote data for product "+PageVars.get("assetId"));}}}).send();new WantItGotItHadIt($$(".gwhTools a.gotIt"),{assetTypeId:2,voteNumElem:"b",voteType:"gotIt"});new WantItGotItHadIt($$(".gwhTools a.wantIt"),{assetTypeId:2,voteNumElem:"b",voteType:"wantIt"});new WantItGotItHadIt($$(".gwhTools a.hadIt"),{assetTypeId:2,voteNumElem:"b",voteType:"hadIt"});if($("cnetReview")&&$("cnetReview").getElement("div.blogEntry")){var A=$("cnetReview").getElement("div.blogEntry");var D=A.getElement("div.universalVideoWrapper");if(D!=null){videoWrapParent=D.getParent("div[id^=universalVideoid]");videoWrapParent.setStyle("display","none");}}});var playDnaProdVid=function(){if($$("#universalVideo .universalVideoWrapper").length==0&&!isNaN($("universalVideo").get("videoId"))){$lazy(window.GeckoVideoPlayer,CBSi.lazy.videoPlayer,function(){loadGeckoVideoPlayer({parentElement:"universalVideo",flashVars:{contentType:"videoId",contentValue:$("universalVideo").get("videoId"),autoplay:true,vidWidth:386,vidHeight:217,playerWidth:386,playerHeight:266,adPrerollType:"Manual",adPrerollValue:PageVars.get("breadcrumb"),adPostFirstVideoType:"Manual",adPostFirstVideoValue:PageVars.get("breadcrumb"),adPostrollType:"Manual",adPostrollValue:PageVars.get("breadcrumb")}},"review4505");});$$("#universalVideo .vidOverlay")[0].fade("out");$("still").fade("out");$$("#productThumbs .vidThumb, #productThumbs .vidOverlay").each(function(A){A.store("tip:title","See the video above.");A.store("tip:text","");});}};window.addEvent("domready",function(){$$("#still, #productThumbs .vidThumb, #mediaGallery .vidOverlay").each(function(A){A.addEvent("click",this.playDnaProdVid);});if(window.location.href.indexOf("autoplay=true")>0){this.playDnaProdVid();}});window.addEvent("domready",function(){$$("li a.brandLogo").addEvent("click",function(A){if(A.target.hasClass("blFb")){socialSite="facebook";}else{if(A.target.hasClass("blLi")){socialSite="linkedin";}else{if(A.target.hasClass("blTwitter")){socialSite="twitter";}else{if(A.target.hasClass("blYt")){socialSite="youtube";}else{socialSite="";}}}}new JloggerLEVT.Social.Connect({applicationTags:{eventt:socialSite=="facebook"?"friendcnet":"followcnet",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:socialSite,wd:"connectlink",wdloc:"bottomsitemap"}}).ping();});$$("#prodSubmitReview a.submitButton").addEvent("click",function(A){new JloggerLEVT.Social.Create({applicationTags:{eventt:"useropinion",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"submitbutton",wdloc:"uobox"}}).ping();});$$("#prodUpdateReview a.submitButton").addEvent("click",function(A){new JloggerLEVT.Social.Create({applicationTags:{eventt:"useropinionupdate",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"submitbutton",wdloc:"uobox"}}).ping();});$$("#prodReplyReview a.submitButton").addEvent("click",function(A){new JloggerLEVT.Social.Create({applicationTags:{eventt:"useropinionreply",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"submitbutton",wdloc:"uobox"}}).ping();});});window.addEvent("domready",function(){try{if(PageVars.get("pageType")=="4852"||PageVars.get("pageType")=="4864"){new ShareBar({views:{inline:{position:"before",element:".usersTakeOverview"}}});}else{if(PageVars.get("pageType")=="4507"){new ShareBar({views:{inline:{position:"before",element:".mfrAndAdWrap"}}});}else{if(PageVars.get("pageType")=="4510"){new ShareBar({views:{inline:{position:"before",element:".manufactureInfo"}}});}else{if(PageVars.get("pageType")=="2719"){new ShareBar({views:{inline:{position:"after",element:"#overviewHead"}}});}}}}}catch(A){}try{$$(".pricealert").addEvent("click",function(C){var B="price_alert_upper";if(C.target.getParents(".lowerwtb").length>0){B="price_alert_lower";}new PriceAlertModal({pid:PageVars.get("assetId"),elemClicked:B});});}catch(A){dbug.log("PriceAlertModal failed.");}});
   }
       
