
   if(!dbugScripts("news",["news.tron.bloglisting.js"])) {
   /*	news.tron.bloglisting.js - packed	*/
       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",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(){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");}}},requestShareBar:function(A){if(!this.processingRequest){this.processingRequest=true;new Request({method:"get",url:"http://"+document.location.host+"/html/rb/cnet/"+(Browser.qs&&Browser.qs.htmldebug?"dev-":"")+A+"-sharebar.html",onSuccess:function(B){if(!this.gotShortUrl){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;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 B=(document.URL.contains("?"))?document.URL.substring(0,document.URL.indexOf("?")):document.URL;this.shareURL=(this.options.data.shareURL!=null)?this.options.data.shareURL:B;this.tagPrefix=(this.shareURL.contains("&tag=")||this.shareURL.contains("?tag="))?";":"?tag=";this.shareTitle=(this.options.data.shareTitle!=null)?this.options.data.shareTitle:document.title.split("|")[0].trim();this.shareTitle=this.shareTitle.replace(/'/g,"");this.shareDescription=this.options.data.shareDescription;this.shareSource="CNET";this.diggTopic=(PageVars.get("pageType")=="2100")?"tech_news":"gadgets";var A=setInterval(function(){setTimeout(function(){if($$(this.options.data.commentCount)[0]){this.commentCount=parseFloat($$(this.options.data.commentCount)[0].get("text"));$$(".commentTeaser .countNumber").set("text",this.commentCount);clearInterval(A);}}.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){FB.XFBML.parse();}if(typeof twttr==="undefined"&&!this.thirdPartyLoading.twitter){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){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){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");}},attachWidthResize:function(){boundAttachResizeEvent=this.attachWidthResizeEvent.bind(this);window.addEvent("resize",boundAttachResizeEvent);}});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 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 emailMemberInline=new Class({Implements:Options,loggedInAtLoad:UserVars.get("loggedIn")==1||UserVars.get("rememberMe")==1,options:{counterFields:null,resetOnClose:false,clearOnReset:false,useCaptcha:true,requireLogin:true,captchaURL:"/8708-5_"+PageVars.get("siteId")+"-0.html?CAPTCHA=id&nomesh&refresh=",emailURL:"/8737-1_"+PageVars.get("siteId")+"-0.xml?nomesh&viewType=json",defaultError:"There was a problem communicating with our servers. Please try again later.",errorPrefix:"<b>Error:</b>",bodyFiller:"Message Body",subjectFiller:"Message Subject"},initialize:function(B,A){this.element=B;this.setOptions(A);this.element.getElements("input[type=text][validatorprops], textarea[validatorprops]").each(function(C){if(C.getParent().getElements(".count")[0]!=null){this.fieldCounter(C,C.getParent().getElements(".count")[0]);}}.bind(this));if(this.options.useCaptcha&&this.element.hasClass("expanded")){this.getCaptcha();}this.element.getElements("input, textarea, .submit").addEvent("click",function(C){this.forceLogin(C);}.bind(this));this.setDefaults();},getCaptcha:function(){new Request({method:"get",url:this.options.captchaURL+new Date().getTime(),onComplete:function(A){if(A){var B=A.trim();$exec(B);var C=new Element("a",{href:"javascript:void(0);","class":"refreshCaptcha",id:"getCaptchaCode"}).set("text","Try a new code");C.addEvent("click",function(){this.getCaptcha();}.bind(this));C.inject($$("#captcha input")[0],"after");$("captcha").getElement("input[name=CAPTCHA_RESPONSE]").addClass("required");}}.bind(this)}).send();},sendEmail:function(){this.element.getElements(".notification").dispose();if(this.basicValidation()){new Request.JSON({url:this.options.emailURL,method:"post",onSuccess:function(A){if(A.response.result.$=="success"||A.response.result.$=="failure"){this.displayResponse(A.response.result.$,A.response.message.$);}else{this.displayResponse(this.options.errorPrefix,this.options.defaultError);}}.bind(this),onFailure:function(){this.displayResponse(this.options.errorPrefix,this.options.defaultError);}}).send("subject="+encodeURIComponent(this.element.getElements("input[name=subject]").get("value"))+"&ursRegId="+encodeURIComponent(this.element.getElements("input[name=ursRegId]").get("value"))+"&loggedInUserName="+encodeURIComponent(this.element.getElements("input[name=loggedInUserName]").get("value"))+"&CAPTCHA_RESPONSE="+encodeURIComponent(this.element.getElements("input[name=CAPTCHA_RESPONSE]").get("value"))+"&CAPTCHA_GUID="+encodeURIComponent(this.element.getElements("input[name=CAPTCHA_GUID]").get("value"))+"&body="+encodeURIComponent(this.element.getElements("textarea[name=body]").get("value")));}},displayResponse:function(A,C){if(A=="success"){var B=new Element("p",{"class":"notification "+A,html:"<b>Thank you!</b> "+C});B.inject(this.element);this.element.addClass("submitted");}else{if(this.options.useCaptcha){var B=new Element("p",{"class":"notification "+A,html:this.options.errorPrefix+C});B.inject(this.element);this.getCaptcha();}}},displayValidation:function(C,A){var B=new Element("p",{"class":"invalid",html:this.options.errorPrefix+C});B.inject(A,"after");A.addClass("invalid");},basicValidation:function(){this.element.getElements("p.invalid").dispose();this.element.getElements(".invalid").removeClass("invalid");var A=true;this.element.getElements("input[type=text][validatorprops], textarea[validatorprops]").each(function(B){var C=JSON.decode(B.get("validatorprops"));if(C.minLength!=null&&B.value.trim().length<C.minLength){this.displayValidation("The "+B.get("name")+" must be at least "+C.minLength+" characters",B);A=false;}else{if(C.maxLength!=null&&B.value.trim().length>C.maxLength){this.displayValidation("The "+B.get("name")+"must be no more than "+C.maxLength+" characters",B);A=false;}else{if(B.get("name")=="subject"&&B.get("value")==this.options.subjectFiller){this.displayValidation("A message subject is required",B);A=false;}else{if(B.get("name")=="body"&&B.get("value")==this.options.subjectFiller){this.displayValidation("A message body is required",B);A=false;}}}}}.bind(this));dbug.log("valid: "+A);return A;},fieldCounter:function(A,B){props=JSON.decode(A.get("validatorprops"));if(!props||!props.minLength||!props.maxLength){return ;}this.updateCounter(A,props,B);A.addEvent("keyup",function(){this.updateCounter(A,props,B);}.bind(this));},updateCounter:function(B,C,D){var A=B.value.trim().length;D.set("text",A);if((B.get("name")=="body"&&B.get("value")==this.options.bodyFiller)||(B.get("name")=="subject"&&B.get("value")==this.options.subjectFiller)){D.set("value","0");D.removeClass("invalid");}if((A<(C.minLength||0))||(A>C.maxLength)){D.addClass("invalid");}else{D.removeClass("invalid");}},forceLogin:function(A){CURS.Manager.checkLogin({registerHed:"Join CNET to send an email",loginHed:"Log in to CNET to send an email",cval:"sendEmail",nextAction:function(){if(A.target.hasClass("submit")&&A.target.getParent(".emailMemberForm").hasClass("expanded")){this.sendEmail();}else{if(!this.loggedInAtLoad){window.location.reload();}else{this.expandForm();}}}.bind(this)});},expandForm:function(){if(this.options.useCaptcha&&!this.element.hasClass("expanded")){this.getCaptcha();}this.element.addClass("expanded");},setDefaults:function(){this.element.getElements("input[name=subject], textarea[name=body]").addEvent("focus",function(A){if(A.target.get("value")==this.options.subjectFiller||A.target.get("value")==this.options.bodyFiller){A.target.set("value","");if(A.target.getParent().getElements(".count")[0]!=null){A.target.getParent().getElements(".count")[0].set("value","0");}}}.bind(this));this.element.getElements("input[name=subject], textarea[name=body]").addEvent("blur",function(A){if(A.target.get("value")==this.options.subjectFiller&&A.target.get("value").trim()==""){A.target.set("value",this.options.subjectFiller);if(A.target.getParent().getElements(".count")[0]!=null){A.target.getParent().getElements(".count")[0].set("value",this.options.subjectFiller.length);}}else{if(A.target.get("value")==this.options.bodyFiller&&A.target.get("value").trim()==""){A.target.set("value",this.options.bodyFiller);if(A.target.getParent().getElements(".count")[0]!=null){A.target.getParent().getElements(".count")[0].set("value",this.options.bodyFiller.length);}}}}.bind(this));},resetForm:function(){this.element.getElements("textarea[name=body]").set("value",this.options.bodyFiller);this.element.getElements("input[name=subject]").set("value",this.options.subjectFiller);}});var ModalForm=new Class({Implements:Options,options:{modalId:"",popupContents:"default",counterFields:null,resetOnClose:false,clearOnReset:false,useCaptcha:false,onFormSubmitSuccess:"",onFormSubmitFail:"",requireLogin:false,captchaURL:"/8708-5_1-0.html?CAPTCHA=id&nomesh&refresh="},initialize:function(B,A){this.setOptions(A);this.element=$$(B);this.initModalForm();},initModalForm:function(){dbug.log("init modal");this.modalForm=new GlobalModal({id:this.options.modalId,content:$(this.options.popupContents).toggleClass("globalModal"),onClose:function(){if(this.options.resetOnClose){this.resetForm();}}.bind(this)});this.form=$(this.options.modalId).getElement("form");this.modalFormValidator=new ModalFormValidator(this.form,{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false});this.form.addEvent("submit",function(A){A.stop();if(!this.modalFormValidator.validate()){return ;}new ModalFormRequest({url:this.form.get("action"),data:this.form.toQueryString(),onSuccess:this.options.onFormSubmitSuccess.bind(this),onFailure:this.options.onFormSubmitFail.bind(this)}).send();}.bind(this));if(this.options.counterFields!=null){this.options.counterFields.field.each(function(B,A){this.fieldCounter(this.form.getElement(B),this.form.getElement(this.options.counterFields.counter[A]));}.bind(this));}$$(this.element).addEvent("click",function(){dbug.log("click");if(this.options.requireLogin){if(!UserVars.isLoggedIn()){CURS.Manager.checkLogin({loginHed:"Log in to CNET to report this profile",registerHed:"Join CNET to report this profile",appId:103,nextAction:function(){new Jlogger({tag:"ropProfile",element:false,ctype:"overlay;source",cval:"login;rop"}).ping();this.showModalForm.bind(this);}.bind(this)});}else{this.showModalForm();}}else{this.showModalForm();}}.bind(this));},showModalForm:function(){if(this.options.useCaptcha){this.getCaptcha();}this.modalForm.show();},resetForm:function(){this.modalFormValidator.reset();this.modalFormValidator.paused=false;this.form.setStyle("display","block");this.form.getParent().getElements(".emailSuccess, .emailFail").dispose();if(this.form.getElement("p span")){this.form.getElement("p span").set("text","0");this.form.getElement("p span").removeClass("validation-advice");}if(this.options.clearOnReset){this.form.reset();}},getCaptcha:function(){new Request({method:"get",url:this.options.captchaURL+new Date().getTime(),onComplete:function(A){if(A){var B=A.trim();$exec(B);var C=new Element("a",{href:"javascript:void(0);","class":"refreshCaptcha",id:"getCaptchaCode"}).set("text","Try a new code");C.addEvent("click",function(){this.getCaptcha();}.bind(this));C.inject($$("#captcha input")[0],"after");$("captcha").getElement("input[name=CAPTCHA_RESPONSE]").addClass("required");}}.bind(this)}).send();},fieldCounter:function(A,C){var B=A.get("validatorProps");if(!B){return ;}B=JSON.decode(B);if(!B&&!B.maxLength){return ;}this.updateCounter(A,B,C);A.addEvent("keyup",function(){this.updateCounter(A,B,C);}.bind(this));},updateCounter:function(B,C,D){var A=B.value.trim().length;D.set("text",A);if((A<(C.minLength||0))||(A>C.maxLength)){D.addClass("validation-advice");}else{D.removeClass("validation-advice");}}});var ModalFormRequest=new Class({Extends:Request,processScripts:function(A){if(this.options.evalResponse){return $exec(A);}return A.stripScripts(this.options.evalScripts);}});var ModalFormValidator=new Class({Extends:FormValidator,makeAdvice:function(D,F,C,G){var E=(G)?this.options.warningPrefix:this.options.errorPrefix;E+=(this.options.useTitles)?F.title||C:C;var B=this.getAdvice(D,F);if(!B){var A=(G)?"warning-advice":"validation-advice";B=new Element("div",{text:E,styles:{display:"none"},id:"advice-"+D+"-"+this.getFieldId(F)}).addClass(A);}else{B.set("text",E);}return B;}});window.addEvent("domready",function(){if((PageVars.get("nodeId")==="32254")||(PageVars.get("nodeId")==="32485")||(PageVars.get("nodeId")==="32498")||(PageVars.get("nodeId")==="32487")||(PageVars.get("nodeId")==="32488")||(PageVars.get("nodeId")==="32489")||(PageVars.get("nodeId")==="32491")||(PageVars.get("nodeId")==="32490")||(PageVars.get("nodeId")==="32491")||(PageVars.get("nodeId")==="32492")||(PageVars.get("nodeId")==="32493")||(PageVars.get("nodeId")==="32486")||(PageVars.get("nodeId")==="32495")||(PageVars.get("nodeId")==="32496")||(PageVars.get("nodeId")==="32497")||(PageVars.get("nodeId")==="32494")||(PageVars.get("nodeId")==="32499")||(PageVars.get("nodeId")==="32500")){dbug.log("JloggerLEVT fired");new JloggerLEVT("ria",{applicationTags:{event:"log",comptyp:"ces",comp:"page",riaevent:"view",objtyp:"x_keywords",objnm:DW.pageParams.x_keywords}}).ping();}});var AboutBlog=new Class({Implements:[Options],options:{containerElement:$("aboutBlog"),linkElement:$("stayConnected"),blogHasNewsletter:true,contactXpos:"42px",rssXpos:"80px",twitterXpos:"120px",facebookXpos:"159px",linkedinXpos:"199px",emailXpos:"2px",emailsubscribedXpos:"2px",yPos:"31px"},initialize:function(E){var D=this;this.setOptions(E);if(this.options.linkElement==""){this.options.linkElement=this.options.containerElement.getNext();}var A=this.options.containerElement.getChildren();A.each(function(H){H.addEvent("mouseenter",function(){D.swapTxt(H);});});var C=new Array("facebook","linkedin","twitter");for(var F=0;F<C.length;F++){var B=C[F];if($(B)){$(B).addEvent("click",function(H){new Jlogger({tag:B+"Follow",ctype:"stayConnected",cval:B+"Btn",element:$(B).getElement("a"),event:"click",fireOnce:true});});}}this.options.containerElement.setStyle("background-position",this.options.emailXpos+" "+this.options.yPos);NewNewsletter.updateOnRefresh();if(!UserVars.isLoggedIn()){CURS.Manager.addEvent("onLogin",function(){(function(){dbug.log("firing delay func");try{if(!NewNewsletter.reloc){window.location=PageVars.getRefreshPath({subscribe:true,unsubscribe:false});}}catch(H){dbug.log("Newsletter onlogin event failure: %o",H);}}).delay(20);});try{$E(".subscribe").addEvent("click",function(H){if(H.stop){H.stop();}var I=$(H.target).getParent("[newsletter]");if(I){Cookie.write("addNL",I.getProperty("newsletter"));}CURS.Manager.checkLogin({loginHed:"Log in to CNET to subscribe",registerHed:"Join CNET to subscribe",appId:(PageVars.get("siteId","number")==4)?47:16});});$("stayConnected").getElement("a").cloneEvents($("email"),"click");}catch(G){dbug.log("No subscribe element on page!");}}else{try{$E(".subscribe").addEvent("click",function(H){if(H.stop){H.stop();}new NewNewsletter.Manage(H.target);});$("stayConnected").getElement("a").cloneEvents($("email"),"click");}catch(G){dbug.log("No subscribe element on page!");}}try{new NewNewsletter.Prefs("newsletterPrefsModal",{triggerSel:".updatePrefs"});}catch(G){}},swapTxt:function(E){var D=E.get("id");this.options.linkElement.fade("hide");$("stayConnected").getElement("a").removeEvents("click");var C=this.options.yPos;var A=this.options.emailXpos+" "+C;var B="Subscribe to e-mail updates";switch(D){case"contact":A=this.options.contactXpos+" "+C;B="Contact Editors";break;case"rss":A=this.options.rssXpos+" "+C;B="Add RSS Feed";break;case"twitter":A=this.options.twitterXpos+" "+C;B="Follow us on Twitter";break;case"facebook":A=this.options.facebookXpos+" "+C;B="Friend us on Facebook";break;case"linkedin":A=this.options.linkedinXpos+" "+C;B="Follow us on LinkedIn";break;case"email":A=this.options.emailXpos+" "+C;B="Subscribe to e-mail updates";break;case"emailsubscribed":A=this.options.emailsubscribedXpos+" "+C;B="You are subscribed to e-mail updates";break;default:}this.options.containerElement.tween("background-position",A);this.options.linkElement.getElement("a").removeEvents("click");this.options.linkElement.getElement("a").set("href",$(D).getElement("a").getProperty("href"));this.options.linkElement.getElement("a").set("text",B);if(D=="email"){this.options.linkElement.getElement("a").cloneEvents($("email"),"click");}this.options.linkElement.fade(1);}});var NewNewsletter=new Hash({Manage:new Class({options:{submitUrl:"/8674-4_"+PageVars.get("siteId")+"-0.html",nlIdKey:"newsletter",unsubscribeHTML:'<a href="http://www.cnet.com/newsletters" target="new">You are subscribed to e-mail updates</a>'},initialize:function(B,A){B=$(B);if(B.get("tag")!="li"){B=B.getParent("[newsletter]");}this.shell=(B.getProperty(this.options.nlIdKey))?B:B.getParent("["+this.options.nlIdKey+"]");this.id=this.shell.getProperty(this.options.nlIdKey);if(B.hasClass("subscribe")){this.action="subscribe";}else{this.action=null;}this.waiter=new Waiter(this.shell);this.pingServer();},updateState:function(){$("email").set("id","emailsubscribed");$("stayConnected").set("html",this.options.unsubscribeHTML);$("stayConnected").set("style","background-position: 249px -469px;");$("emailsubscribed").removeEvents("click");$("emailsubscribed").removeClass("subscribe");$("emailsubscribed").set("href","http://www.cnet.com/newsletters");$("emailsubscribed").set("target","new");},pingServer:function(){var A="";A+="action="+(this.action);A+="&"+(this.action)+"Ids="+this.shell.getProperty("newsletter");new Request({url:this.options.submitUrl,method:"get",data:A,onRequest:function(){this.waiter.start();}.bind(this),onComplete:function(B){this.waiter.stop();B=JSON.decode(B);if(B&&B.status&&B.status=="success"){this.updateState();}}.bind(this)}).send();}}),updateOnRefresh:function(){var B=new Cookie("addNL");if(B.read()){var C=$E("li[newsletter="+B.read()+"]");if(C){new Fx.Scroll(window).toElement(C);var A=C.getElement(".subscribe");if(A){new NewNewsletter.Manage(A);}}B.dispose();}},Prefs:new Class({Implements:Options,options:{triggerSel:".nlPrefsLink"},initialize:function(B,A){this.setOptions(A);this.shell=$(B).inject(document.body);this.triggers=$$(this.options.triggerSel);this.triggers.addEvent("click",this.toggle.bind(this));this.shell.getElements(".closeModal").addEvent("click",this.hide.bind(this));this.initPrefs();this.ping=new Request({url:"/8674-4-0.html",method:"get"});},initPrefs:function(){this.shell.getElements("input[type=radio]").each(function(A){A.addEvent("click",this.updateRadio.pass(A,this));}.bind(this));},updateRadio:function(A){if(A.hasClass("ping")){this.pingPref({action:"updateMailPref",mailPref:A.get("value")});}this.notifyUpdate(A);},notifyUpdate:function(C){var B=new Element("span",{text:"preference saved",styles:{opacity:0,color:"#C00","font-weight":"bold"}}).inject(C.getParent("label"));var A=function(){if(B.getStyle("opacity")>0.1){(function(){B.morph({opacity:0});}).delay(1500);}else{B.dispose();}};B.set("morph",{duration:250,onComplete:A}).morph({opacity:1});},pingPref:function(A){A=A||{};this.ping.send(new Hash(A).toQueryString());},show:function(){this.shell.setPosition({});this.shell.setStyle("top",window.getScrollTop()+50);this.shell.setStyle("display","block");},hide:function(){this.shell.setStyle("display","none");},toggle:function(){if(this.shell.getStyle("display")=="none"){this.show();}else{this.hide();}}}),resetReloc:function(){NewNewsletter.reloc=false;CURS.Manager.removeEvent("onClose",NewNewsletter.resetReloc);}});var LazyLoad=new Class({Implements:[Options,Events],options:{range:200,elements:"img",container:window,mode:"vertical",realSrcAttribute:"data-src",useFade:true},initialize:function(A){this.setOptions(A);this.container=$(this.options.container);this.elements=$$(this.options.elements);this.largestPosition=0;var B=(this.options.mode=="vertical"?"y":"x");var D=(this.container!=window&&this.container!=document.body?this.container:"");this.elements=this.elements.filter(function(F){if(this.options.useFade){F.setStyle("opacity",0);}var E=F.getPosition(D)[B];if(E<this.container.getSize()[B]+this.options.range){this.loadImage(F);return false;}return true;},this);var C=function(E){var F=this.container.getScroll()[B];if(F>this.largestPosition){this.elements=this.elements.filter(function(G){if((F+this.options.range+this.container.getSize()[B])>=G.getPosition(D)[B]){this.loadImage(G);return false;}return true;},this);this.largestPosition=F;}this.fireEvent("scroll");if(!this.elements.length){this.container.removeEvent("scroll",C);this.fireEvent("complete");}}.bind(this);this.container.addEvent("scroll",C);},loadImage:function(A){if(this.options.useFade){A.addEvent("load",function(){A.fade(1);});}A.set("src",A.get(this.options.realSrcAttribute));this.fireEvent("load",[A]);}});if($("fontSizeStyles")){PageTools.setFontStyles();}window.addEvent("domready",function(){$$(".contentTools a.share, .shareButton a.share").each(function(B){B.addEvent("mouseenter",PageTools.openShare.bind(PageTools));});$$(".contentTools a.email, .emailButton a.email").each(function(B){B.addEvent("click",PageTools.email);});$$(".contentTools a.print, .printButton a.print").each(function(B){B.addEvent("click",PageTools.print);});$$(".contentTools .fontSize a.smaller").each(function(B){B.addEvent("click",PageTools.fontSizeSmaller.bind(PageTools));});$$(".contentTools .fontSize a.larger").each(function(B){B.addEvent("click",PageTools.fontSizeLarger.bind(PageTools));});if($("emailEditorForm")){var A=PageVars.get("siteId");if(A==="105"||A==="109"){A="3";}new ModalForm(".editorEmail",{reauthenticate:false,counterFields:{field:["input[name=subject]","textarea[name=body]"],counter:[".subjectCount",".bodyCount"]},popupContents:$("emailEditorForm"),modalId:"emailEditor",resetOnClose:true,clearOnReset:true,useCaptcha:true,captchaURL:"/8708-5_"+A+"-0.html?CAPTCHA=id&noluke&refresh=",getCaptcha:function(){new Request({method:"get",url:this.options.captchaURL+new Date().getTime(),onComplete:function(B){if(B){var C=B.trim();$exec(C);var D=new Element("a",{href:"javascript:void(0);","class":"refreshCaptcha",id:"getCaptchaCode"}).set("text","Try a new code");D.addEvent("click",function(){this.getCaptcha();}.bind(this));D.inject($$("#captcha input")[0],"after");$("captcha").getElement("input[name=CAPTCHA_RESPONSE]").addClass("required");}}.bind(this)}).send();},onFormSubmitSuccess:function(C){if(C){var E=JSON.decode(C).response;if(E.result["$"]=="failure"){if($$(".emailFail").length>0){var D=$$(".emailFail")[0];}else{var D=new Element("div",{"class":"validation-advice emailFail"});}D.set("html","<b>Error: </b>"+E.message["$"]);if(E.message["$"]=="You did not successfully enter the characters in the verification box."){D.inject($("captcha"),"before");}else{D.inject($("emailEditor").getElement("form"),"before");}this.getCaptcha();}else{if(E.result["$"]=="success"){var B=new Element("div",{"class":"emailSuccess"}).set("html","Thank you. "+E.message["$"]);B.inject($("emailEditor").getElement("form"),"before");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("emailEditor").getElements("form, p").setStyle("display","none");this.modalForm.hide.delay(4000,this.modalForm);}}}},onFormSubmitFail:function(){dbug.log("form not sent");}});}else{$$(".emailEditor").setStyle("display","none");}});window.addEvent("domready",function(){var H=new LazyLoad({range:200,elements:"img[lazySrc]",realSrcAttribute:"lazySrc",useFade:true});$$(".slideshowPreview li").addEvent("click",function(I){this.getPrevious("li.mainView").getElement("img").setProperty("src",this.getElement("img").getAttribute("lazySrc"));});if($("scrollShell")&&!$("scrollShell").retrieve("thumbscroller")){insideCNETNews=new ThumbScroller("scrollShell",{thumbs:"li.promoBox",nav:{next:".scrollingArrows .arrowRight",previous:".scrollingArrows .arrowLeft"}}).addEvent("onComplete",function(){var I=$$(".sideScrollerPromo .currentlyViewing")[0].get("text").split("-");if(!this.isAtEnd()&&!this.isAtStart()){if(this.lastScroll=="previous"){$$(".sideScrollerPromo .currentlyViewing").set("html",(parseInt(I[0])-1)+"-"+(parseInt(I[1])-1));}else{$$(".sideScrollerPromo .currentlyViewing").set("html",(parseInt(I[0])+2)+"-"+(parseInt(I[1])+2));}}else{if(this.isAtEnd()){$$(".sideScrollerPromo .currentlyViewing").set("html",(parseInt($$(".sideScrollerPromo .totalCount")[0].get("text"))-1)+"-"+(parseInt($$(".sideScrollerPromo .totalCount")[0].get("text"))));}else{if(this.isAtStart()&&this.to[0]==0){$$(".sideScrollerPromo .currentlyViewing").set("html","1-2");}}}$$(".scrollingArrows .arrowLeft").morph({opacity:((this.isAtStart())?0.3:1)});$$(".scrollingArrows .arrowRight").morph({opacity:((this.isAtEnd())?0.3:1)});}).fireEvent("onComplete");}if(PageVars.get("pageType")==8300){var F=$$(".socialBadges");if(F.length>0){var G={facebook:{selector:".fbShare",tag:"facebook"}};var C;for(C in G){(function(J,I){F.getElements(J).each(function(K){K.addEvent("click",function(O){if(O.target){O.target.setProperty("target","_blank");}var N=O.target.getParent(".post").getElement(".titleWrap a").get("href");N=N.replace(/\//,"");N=N.replace(/\.html/,"");var L=N.split("-");var M=L[2];dbug.log(I+" byline click");new JloggerLEVT.Social.Share({applicationTags:{tasid:M,tastid:"28",ssite:encodeURIComponent(I),wd:"sharebutton",wdloc:"byline"}}).ping();});});})(G[C].selector,G[C].tag);}}if($("createThreadForm")){new emailMemberInline($("createThreadForm"));}var D=$$('.postLinks div[section="shareTags"]');if(D.length>0){var A={digg:{selector:".digg",tag:"digg"},delicious:{selector:".delicious",tag:"delicious"},reddit:{selector:".reddit",tag:"reddit"},facebook:{selector:".facebook",tag:"facebook"},twitter:{selector:".twitter",tag:"twitter"},stumbleUpon:{selector:".stumble",tag:"stumbleupon"}};var B;for(B in A){(function(J,I){D.getElements(J).each(function(K){K.addEvent("click",function(O){if(O.target){O.target.setProperty("target","_blank");}var N=O.target.getParent(".post").getElement(".titleWrap a").get("href");N=N.replace(/\//,"");N=N.replace(/\.html/,"");var L=N.split("-");var M=L[2];dbug.log(I+" sharetag click");new JloggerLEVT.Social.Share({applicationTags:{tasid:M,tastid:"28",ssite:encodeURIComponent(I),wd:"sharelink",wdloc:"bottom"}}).ping();});});})(A[B].selector,A[B].tag);}}}if(twttr){twttr.events.bind("tweet",function(I){new Jlogger({tag:"sharebar",ctype:"evnt;elem;dest",cval:"click;A;twitter"}).ping();});}var E=document.domain.replace(/(tron.+|uat.+).cnet.com/,"cnet.com");E="http://"+E;if(document.domain.contains("ces")){E="";}if(PageVars.get("nodeId")!=="13860"){$$("article .postBody").each(function(J,I){new Request({url:PageVars.getPath({pageType:8791,assetId:J.get("id").replace("postId",""),pageNumber:false})+"?nomesh&viewType=inline-sharebar&assetTypeId=12&shareURL="+E+J.getElement("header a").get("href"),onSuccess:function(K){J.getElement("footer").adopt(new Element("div",{html:K}));$$(".linkedInShareBtn").each(function(M){if(M.get("html")==""){M.adopt(new Element("script",{type:"IN/Share","data-url":"http://"+E+J.getElement("header a").get("href"),"data-counter":"right"}));}}.bind(this));if(I==$$("article .postBody").length-1){try{twttr.widgets.load();FB.XFBML.parse();IN.init();gapi.plusone.go();$$(".inline-sharebar a.email").each(function(M){M.addEvent("click",PageTools.email);});$$(".inline-sharebar  a.print").each(function(M){M.addEvent("click",PageTools.print);});}catch(L){dbug.log("Uh-oh one of the buttons didn't parse correctly");}}}.bind(this)}).send();});}});
   }
       
