//dbugScripts - will include non-compressed versions of this code if "jsdebug=true" is in the url of this page,
//otherwise it will execute this code.
//example: dbugScripts("/the/location/of/my/scripts/",["script1.js","script2.js","etc"])
//returns true if scripts are included, otherwise false.
if(!dbugScripts("http://c18-x-publish1.cnet.com:8100/html/rb/js/tiburon/cat/",["blogs.comments.js"])){

/* begin packed code */
var Jlogger=new Class({Implements:[Options,Events],options:{ctype:false,cval:false,tag:false,element:false,event:false,useraction:false,fireOnce:false,executeNow:false,onPing:$empty},errors:0,fired:false,active:true,initialize:function(a){var b=(typeof PageVars!="undefined")?{ontid:PageVars.get('nodeId','number'),siteId:PageVars.get('siteId','number'),asId:PageVars.get('assetId','number'),ptId:PageVars.get('pageType','number'),edId:PageVars.get('editionId','number')}:{};this.setOptions(b,a);if(this.options.element=='window')this.options.element=window;this.setup();if(this.options.executeNow)this.ping()},setup:function(){if(!$(this.options.element))return;var a=this.options;if($type(a.tag)&&$type(a.element)&&$type(a.event)){dbug.log('event observe(element: '+a.element+', event: '+a.event+', tag: '+a.tag+')');if(a.event=='load'&&a.element==window)a.executeNow=true;if(a.element!=window)$(a.element).addEvent(a.event,this.ping.bind(this));else if(a.event!='load')$(a.element).addEvent(a.event,this.ping.bind(this))}},makeURL:function(a){var b='http://dw.com.com/redir?';var c=this.options;if($type(c.ontid))b+='ontid='+c.ontid+'&';if($type(c.siteId))b+='siteid='+c.siteId+'&';if($type(c.asId))b+='asId='+c.asId+'&';if($type(c.ptId))b+='ptId='+c.ptId+'&';if($type(c.edId))b+='edId='+c.edId+'&';if($type(c.ctype))b+='ctype='+c.ctype+'&';if($type(c.cval))b+='cval='+c.cval+'&';if($type(c.useraction))b+='useraction='+c.useraction+'&';b+='tag='+c.tag+'&destUrl=/i/b.gif';b+='&uniquePingId='+new Date().getTime();return b},ping:function(a,b){if(b||(((!this.fired&&this.options.fireOnce)||!this.options.fireOnce)&&this.active)){a=($type(a)!='string'||a.length==0)?this.makeURL():a;window.addEvent('domready',function(){new Element('img').setProperty('src',a);this.fired=true;dbug.log(this.options.tag+': '+(this.options.event||'')+'\nping: '+a);this.fireEvent('onPing')}.bind(this))}},pingTag:function(a,b){this.ping(this.makeURL(a),b)},stopObserving:function(){this.active=false},startObserving:function(){this.active=true}});var jlogger=Jlogger;var RB={};var CURS={};CURS.manage=new Class({Implements:Events,nameSelectors:['.cnetUserName'],loggedIn:false,nextAction:$empty,initialize:function(){if(this.loggedin=UserVars.isLoggedIn()){this.doLogin()}return this},addNameSelectors:function(a){this.nameSelectors.merge($splat(a));return this},writeUserNames:function(b){b=(b)?$splat(b):$(document.body);b.getElements(this.nameSelectors).each(function(a){if(!a.contains(UserVars.getDisplayName())){new Element('a',{text:UserVars.getDisplayName(),href:"http://my.cnet.com/community/"+UserVars.get('userName')}).inject(a)}})},doLogin:function(){this.loggedIn=true;window.addEvent('domready',this.fireLoginEvents.bind(this));window.addEvent('domready',this.nextAction);return this},fireLoginEvents:function(){this.fireEvent('onLogin');this.addEvent=function(a,b){if(a=="onLogin")b();else dbug.log("No longer accepting non-onLogin events.\nYou attempted to add a \"%s\" event: %s",a,b.toString())};return this}});RB.loginManager=new CURS.manage();var MobileForm=new Class({Implements:[Options,Chain,Events],options:{clone:false,onInitialize:$empty,findLocalData:$lambda({}),resetOnMove:true,resetOnHide:true,onBeforeShow:$empty,hideFormsInParent:true},currentParent:null,initialize:function(a,b){this.setOptions(b);this.shell=(this.options.clone)?$(a).clone():$(a);this.form=(this.shell.get('tag')=='form')?this.shell:this.shell.getElement('form');if(!this.form)return null;this.findLocalData=this.options.findLocalData;this.fireEvent('onInitialize');this.form.store('mobileForm',this);this.shell.set('reveal',{onComplete:this.callChain.bind(this)});return this},relocateForm:function(a){this.removeLocalParams();a.adopt(this.shell);this.currentParent=a;if(this.options.resetOnMove)this.form.reset();this.setLocalData(this.findLocalData(a));this.callChain()},removeLocalParams:function(){this.form.getElements('input').each(function(a){if(a.getProperty('local'))a.dispose()})},setLocalData:function(c){if(!c||$type(c)!='object')return null;$each(c,function(a,b){new Element('input',{'type':'hidden','name':b,'value':a,'local':'true'}).inject(this.form)},this)},move:function(a){this.clearChain();a=$(a);if(!a)return;if(this.currentParent==a){if(this.options.hideFormsInParent){this.closeOthers()}try{fail;this.shell.get('reveal').toggle()}catch(e){this.shell.setStyle('display',(this.shell.getStyle('display')=='none')?'block':'none')}return}this.chain(this.relocateForm.pass(a,this),this.openElem.bind(this));this.closeElem()},openElem:function(){if(this.options.hideFormsInParent){this.closeOthers()}try{fail;this.shell.reveal()}catch(e){this.shell.setStyle('display','block');this.callChain()}},closeOthers:function(){this.currentParent.getElements('form').each(function(a){try{a.retrieve('mobileForm').shell.setStyle('display','none')}catch(e){dbug.log(e)}})},closeElem:function(){try{fail;this.shell.dissolve()}catch(e){this.shell.setStyle('display','none');this.callChain()}}});var CommentForm=new Class({Extends:MobileForm,commentOptions:{submitElems:false,closeElems:false,useValidator:true,validatorOptions:{}},initialize:function(a,b){this.parent(a,$merge(this.commentOptions,b));try{this.validator=(this.useValidator)?new FormValidator(this.options.validatorOptions):false}catch(e){dbug.log("Validator addition failed: %o",e);this.validator=false}this.form.set('send',{});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.closeElem.bind(this));this.form.addEvent('submit',function(e){e=new Event(e).stop();this.doSubmit()}.bind(this))},closeElem:function(){this.parent();if(this.validator){this.chain(function(){this.validator.reset();this.callChain()}.bind(this))}},doSubmit:function(){if(this.validator&&!this.validator.validate())return false;this.form.send();this.closeElem();this.writeMessage('Thank you for your comment. It will appear on the site shortly.')},handlePostResponse:function(a){var b=JSON.decode(a);var c=$A(b.responseMessages);dbug.log("status = "+b.status+"  num messages = "+c.length);if("nologin"==b.code){dbug.log("not logged in, but needs to be.")}var d="";if(0<c.length){d="";c.each(function(m){d+=m+"<br />";dbug.log("message: "+m)})}this.writeMessage(d)},handleFailure:function(a){},writeMessage:function(a){new Element('div',{html:a}).inject(this.shell,'before')}});var commentsForms={};var findMessageId=function(a){var b=null;var c=a;do{b=c.getProperty('messageId')}while(!b&&(c=c.getParent('dl')));if(!b)return false;return{'messageId':b}};var initializeComments=new Class({initialize:function(){this.setCommentCount();if(UserVars.isLoggedIn()){$('commentLogin').setStyle('display','none');$$('dl.addcommentform')[0].setStyle('display','block');this.setUpComments()}else{RB.loginManager.addEvent('onLogin',this.setUpComments.bind(this));RB.loginManager.addEvent('onLogin',this.adjustLogin);this.initLinks();CommentsLogin.login=new CommentsLogin.FormHandler({shell:'fixedCommentBox',formShell:'#commentLogin',targetForm:'#commentLogin form.login',formSubmitUrl:'/1325-4-78.html',formSuccess:'dl.addcommentform',testResponse:function(){if($type(this.response)=="object"){if(this.response['returnCode']=="1"){if(this.response.confirmationRequired=="true"){this.response.errors=[{field:null,error:"CONFIRMATION_REQUIRED",text:"You must confirm your account. Please check your email and follow intstructions there. Once complete, return to this page and try logging in again."}];return false}return true}}return false},onSuccess:function(){UserVars=new LocalVars.UserVars({loggedIn:'1',userName:this.response.userName,ursRegId:this.response.registrationId,rememberMe:(this.response.rememberMe)?'1':'',confirmed:(this.response.confirmationRequired)?'':'1'});RB.loginManager.doLogin()}});CommentsLogin.forgot=new CommentsLogin.forgotPassword();CommentsLogin.register=new CommentsLogin.FormHandler({shell:'fixedCommentBox',formShell:'#commentRegister',targetForm:'#commentRegister form',formSubmitUrl:'/user/reg.html?action=createNewUser',formSuccess:'#commentRegisterConfirm',testResponse:function(a){if($type(this.response)=="object"){return(!this.response['errors'])}return false},onSuccess:function(){try{$('emailEcho').set('html',this.targetForm.emailAddress.value);$('goBackEmail').addEvent('click',function(){$('commentRegisterConfirm').setStyle('display','none');this.formShell.setStyles({opacity:1,display:'block'});this.targetForm.emailAddress.focus()}.bind(this))}catch(e){dbug.log(e)}}});CommentsLogin.register.validator.addAllThese([['validate-userNameExists',{errorMsg:null,test:function(a){this.errorMsg="This username is already in use. Please choose another.";if(!a.value.length){this.errorMsg="This field is required.";return false}if(!/^[a-zA-Z0-9\-\_]+$/.test(a.value)){this.errorMsg="Please use only alphanumeric characters, underscores \"_\", and dashes \"-\"";return false}if(a.value.length>25){this.errorMsg="Your username must be 25 characters or fewer (you entered "+a.value.length+" characters).";return false}return new Request({url:"/1302-4-78.html",method:'get',async:false}).send('userName='+escape(a.value)).response.text.test(/User name is available/)}}],['validate-passwordConfirm',{errorMsg:"Your passwords must match.",test:function(a){return(a.value==CommentsLogin.register.targetForm['password'].value)}.bind(this)}],['validate-termsAgree',{errorMsg:"You must agree to CNET's Terms of Use",test:function(a){return(a.checked)}}]]);CommentsLogin.register.formShell.getElements('a.swap').addEvent('click',function(){CommentsLogin.register.hide();CommentsLogin.login.show()});$('commentRegisterConfirm').getElements('a.swap').addEvent('click',function(){$('commentRegisterConfirm').setStyle('display','none');CommentsLogin.login.show()});CommentsLogin.login.formShell.getElements('a.swap').addEvent('click',function(){CommentsLogin.register.show();CommentsLogin.login.hide()});if(UserVars.get('userName','boolean'))CommentsLogin.login.show();else CommentsLogin.register.show()}},setUpComments:function(){commentsForms.reply=new CommentForm('replyArea',{findLocalData:findMessageId,resetOnHide:false,submitElems:'.addcomment a',closeElems:'.cancel a'});commentsForms.offensive=new CommentForm('offensiveArea',{findLocalData:findMessageId,resetOnHide:false,submitElems:'.submit.send a.button',closeElems:'.cancel a'});commentsForms.emailAFriend=new CommentForm('emailAFriendArea',{findLocalData:findMessageId,resetOnHide:false,submitElems:'.submit.send a.button',closeElems:'.cancel a'});$($('newCommentForm').outerUrl).set('value',window.location.href);new CommentForm('newCommentForm',{submitElems:'.submit.addcomment a.button',clone:false,onInitialize:function(){$(this.form.outerUrl).set('value',window.location.href)}});this.initLinks()},adjustLogin:function(){new LoginStatus();try{$('topLoginLink').dispose()}catch(e){}},initLinks:function(a){a=$(a)||$(document.body).getElement('.commentwrapper');if(UserVars.isLoggedIn()){a.getElements('a.reply').addEvent('click',function(){commentsForms.reply.move($(this).getParent('dl').getElement('.toolstretch'))});a.getElements('a.repo').addEvent('click',function(){commentsForms.offensive.move($(this).getParent('dl').getElement('.toolstretch'))});a.getElements('a.mail').addEvent('click',function(){commentsForms.emailAFriend.move($(this).getParent('dl').getElement('.toolstretch'))})}else{a.getElements('.needsReg').addEvent('click',function(){if(!UserVars.isLoggedIn()){try{new Fx.Scroll($(document.body)).toElement('fixedCommentBox')}catch(e){window.location.hash="addcomm";dbug.log(e)}}})}},setCommentCount:function(){try{var a=$$('.commentwrapper .comcount')[0].get('text').toInt();var b;if(!a){b=new Element('a',{href:'#addcomm',text:'Post a comment'})}else{b=new Element('a',{href:'#comments',text:(a==1)?'1 comment':a+' comments'})}new Element('span',{'class':'commentTease'}).adopt(b).inject($('contentBody').getElement('.post .byline'))}catch(e){dbug.log(e)}}});var Replyer=new Class({options:{repliesId:"",processId:"",hideReplyId:"",nodeId:null,assetId:null,communityId:null,messageId: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.messageId).set('text','Refresh replies');$(a.processId).setStyle('display','block');$(this.options.repliesId).setStyle('display','none');var b="/8615-"+a.nodeId+"-"+a.assetId+".html";var c="communityId="+a.communityId+"&messageId="+a.messageId+"&pageNum="+a.pageNum+"&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(e){$(this.options.repliesId).setStyles({'display':'block','height':'auto'})}$(this.options.hideReplyId).setStyle('display','block');try{CommentsLogin.initLinks.initLinks(this.options.repliesId)}catch(e){dbug.log(e)}},hideReplies:function(a){$(a.hideReplyId).setStyle('display','none');try{$(a.repliesId).dissolve()}catch(e){dbug.log('Failed dissolve: %o',e);$(a.repliesId).setStyle('display','none')}$(a.showReplyId).set('text','Show replies')}});var InputValidator=new Class({Implements:[Options],initialize:function(b,c){this.setOptions({errorMsg:'Validation failed.',test:function(a){return true}},c);this.className=b},test:function(a){if($(a))return this.options.test($(a),this.getProps(a));else return false},getError:function(a){var b=this.options.errorMsg;if($type(b)=="function")b=b($(a),this.getProps(a));return b},getProps:function(a){if($(a)&&$(a).get('validatorProps')){try{return JSON.decode($(a).get('validatorProps'))}catch(e){return{}}}else{return{}}}});var FormValidator=new Class({Implements:[Options,Events],options:{fieldSelectors:"input, select, textarea",useTitles:false,evaluateOnSubmit:true,evaluateFieldsOnBlur:true,evaluateFieldsOnChange:true,serial:true,warningPrefix:"Warning: ",errorPrefix:"Error: "},initialize:function(a,b){this.setOptions(b);this.form=$(a);if(this.options.evaluateOnSubmit)this.form.addEvent('submit',this.onSubmit.bind(this));if(this.options.evaluateFieldsOnBlur)this.watchFields()},getFields:function(){return this.fields=this.form.getElements(this.options.fieldSelectors)},watchFields:function(){this.getFields().each(function(a){a.addEvent('blur',this.validateField.pass([a,false],this));if(this.options.evaluateFieldsOnChange)a.addEvent('change',this.validateField.pass([a,true],this))},this)},onSubmit:function(a){if(!this.validate(a))a.stop();else{this.stop();this.reset()}},reset:function(){this.getFields().each(this.resetField,this);return this},validate:function(b){var c=this.getFields().map(function(a){return this.validateField(a,true)},this);c=c.every(function(a){return a});this.fireEvent('onFormValidate',[c,this.form,b]);return c},validateField:function(b,c){if(this.paused)return true;b=$(b);var d=true;var e=this.form.getElement('.validation-failed');var f=this.form.getElement('.warning');if(b&&(!e||c||b==e||(e&&!this.options.serial))){var g=b.className.split(" ").some(function(a){return this.getValidator(a)},this);d=b.className.split(" ").map(function(a){return this.test(a,b)},this).every(function(a){return a});if(g&&!b.hasClass('warnOnly')){if(d)b.addClass('validation-passed').removeClass('validation-failed');else b.addClass('validation-failed').removeClass('validation-passed')}if(!f||c||(f&&!this.options.serial)){var h=b.className.split(" ").some(function(a){if(a.test('^warn-')||b.hasClass('warnOnly'))return this.getValidator(a.replace(/^warn-/,""));else return null},this);b.removeClass('warning');var i=b.className.split(" ").map(function(a){if(a.test('^warn-')||b.hasClass('warnOnly'))return this.test(a.replace(/^warn-/,""),b,true);else return null},this)}}return d},getPropName:function(a){return'__advice'+a},test:function(a,b,c){b=$(b);if(b.hasClass('ignoreValidation'))return true;c=$pick(c,false);if(b.hasClass('warnOnly'))c=true;var d=true;if(b){var e=this.getValidator(a);if(e&&this.isVisible(b)){d=e.test(b);if(!d&&e.getError(b)){if(c)b.addClass('warning');var f=this.makeAdvice(a,b,e.getError(b),c);this.insertAdvice(f,b);this.showAdvice(a,b)}else this.hideAdvice(a,b);this.fireEvent('onElementValidate',[d,b])}}if(c)return true;return d},showAdvice:function(a,b){var c=this.getAdvice(a,b);if(c&&!b[this.getPropName(a)]&&(c.getStyle('display')=="none"||c.getStyle('visiblity')=="hidden"||c.getStyle('opacity')==0)){b[this.getPropName(a)]=true;if(c.smoothShow)c.smoothShow();else c.setStyle('display','block')}},hideAdvice:function(a,b){var c=this.getAdvice(a,b);if(c&&b[this.getPropName(a)]){b[this.getPropName(a)]=false;if(c.smoothHide)c.smoothHide();else c.setStyle('display','none')}},isVisible:function(a){while(a!=document.body){if($(a).getStyle('display')=="none")return false;a=a.getParent()}return true},getAdvice:function(a,b){return $('advice-'+a+'-'+this.getFieldId(b))},makeAdvice:function(a,b,c,d){var e=(d)?this.options.warningPrefix:this.options.errorPrefix;e+=(this.options.useTitles)?$pick(b.title,c):c;var f=this.getAdvice(a,b);if(!f){var g=(d)?'warning-advice':'validation-advice';f=new Element('div',{text:e,styles:{display:'none'},id:'advice-'+a+'-'+this.getFieldId(b)}).addClass(g)}else{f.set('html',e)}return f},insertAdvice:function(a,b){switch(b.type.toLowerCase()){case'radio':var p=$(b.parentNode);if(p){p.adopt(a);break}default:a.inject($(b),'after')}},getFieldId:function(a){return a.id?a.id:a.id="input_"+a.name},resetField:function(c){c=$(c);if(c){var d=c.className.split(" ");d.each(function(a){if(a.test('^warn-'))a=a.replace(/^warn-/,"");var b=this.getPropName(a);if(c[b])this.hideAdvice(a,c);c.removeClass('validation-failed');c.removeClass('warning');c.removeClass('validation-passed')},this)}return this},stop:function(){this.paused=true;return this},start:function(){this.paused=false;return this},ignoreField:function(a,b){a=$(a);if(a){this.enforceField(a);if(b)a.addClass('warnOnly');else a.addClass('ignoreValidation')}return this},enforceField:function(a){a=$(a);if(a)a.removeClass('warnOnly').removeClass('ignoreValidation');return this}});FormValidator.adders={validators:{},add:function(a,b){this.validators[a]=new InputValidator(a,b);if(!this.initialize){this.implement({validators:this.validators})}},addAllThese:function(b){$A(b).each(function(a){this.add(a[0],a[1])},this)},getValidator:function(a){return this.validators[a]}};$extend(FormValidator,FormValidator.adders);FormValidator.implement(FormValidator.adders);FormValidator.add('IsEmpty',{errorMsg:false,test:function(a){if(a.type=="select-one"||a.type=="select")return!(a.selectedIndex>=0&&a.options[a.selectedIndex].value!="");else return((a.get('value')==null)||(a.get('value').length==0))}});FormValidator.addAllThese([['required',{errorMsg:function(a){return'This field is required.'},test:function(a){return!FormValidator.getValidator('IsEmpty').test(a)}}],['minLength',{errorMsg:function(a,b){if($type(b.minLength))return'Please enter at least '+b.minLength+' characters (you entered '+a.get('value').length+' characters).';else return''},test:function(a,b){if($type(b.minLength))return(a.get('value').length>=$pick(b.minLength,0));else return true}}],['maxLength',{errorMsg:function(a,b){if($type(b.maxLength))return'Please enter no more than '+b.maxLength+' characters (you entered '+a.get('value').length+' characters).';else return''},test:function(a,b){return(a.get('value').length<=$pick(b.maxLength,10000))}}],['validate-integer',{errorMsg:'Please enter an integer in this field. Numbers with decimals (e.g. 1.25) are not permitted.',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||!/[^\d+$]/.test(a.get('value'))}}],['validate-numeric',{errorMsg:'Please enter only numeric values in this field ("1" or "1.1" or "-1" or "-1.1").',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||!/[-+]?[0-9]*\.?[0-9]+/.test(a.get('value'))}}],['validate-digits',{errorMsg:'Please use numbers and punctuation only in this field (for example, a phone number with dashes or dots is permitted).',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||(/[^a-zA-Z]/.test(a.get('value'))&&/[\d]/.test(a.get('value')))}}],['validate-alpha',{errorMsg:'Please use letters only (a-z) with in this field. No spaces or other characters are allowed.',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||/^[a-zA-Z]+$/.test(a.get('value'))}}],['validate-alphanum',{errorMsg:'Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||!/\W/.test(a.get('value'))}}],['validate-date',{errorMsg:function(a,b){if(Date.parse){var c=b.dateFormat||"%x";return'Please enter a valid date such as '+new Date().format(c)}else{return'Please enter a valid date such as MM/DD/YYYY (i.e. "12/31/1999")'}},test:function(a,b){if(FormValidator.getValidator('IsEmpty').test(a))return true;if(Date.parse){var c=b.dateFormat||"%x";var d=Date.parse(a.get('value'));var e=d.format(c);if(e!="invalid date")a.set('value',e);return!isNaN(d)}else{var f=/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!f.test(a.get('value')))return false;var d=new Date(a.get('value').replace(f,'$1/$2/$3'));return(parseInt(RegExp.$1,10)==(1+d.getMonth()))&&(parseInt(RegExp.$2,10)==d.getDate())&&(parseInt(RegExp.$3,10)==d.getFullYear())}}}],['validate-email',{errorMsg:'Please enter a valid email address. For example "fred@domain.com".',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(a.get('value'))}}],['validate-url',{errorMsg:'Please enter a valid URL.',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||/^(http|https|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(a.get('value'))}}],['validate-currency-dollar',{errorMsg:'Please enter a valid $ amount. For example $100.00 .',test:function(a){return FormValidator.getValidator('IsEmpty').test(a)||/^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(a.get('value'))}}],['validate-one-required',{errorMsg:'Please enter something for at least one of the above options.',test:function(b){var p=b.parentNode;var c=p.getElements('input');return $A(c).some(function(a){return a.get('value')})}}]]);var CommentsLogin={};window.addEvent('domready',function(){CommentsLogin.initLinks=new initializeComments()});CommentsLogin.FormHandler=new Class({Implements:[Options,Events],options:{shell:null,formShell:null,targetForm:null,formSubmitUrl:null,formSuccess:null,testResponse:function(a){return true},handleErrors:null,onSuccess:Class.empty},initialize:function(a){this.setOptions(a);this.targetForm=$E(this.options.targetForm);this.formShell=$E(this.options.formShell);this.testResponse=this.options.testResponse;this.setUpValidation();if(this.options.handleErrors)this.handleErrors=this.options.handleErrors;this.targetForm.set('action',this.getSubmitUrl());this.targetForm.set('send',{onComplete:this.handleResponse.bind(this),onRequest:this.setLoading.bind(this),onFailure:this.setGeneralFailure.bind(this)});this.targetForm.addEvent('submit',function(e){e=new Event(e).stop();this.targetForm.send()}.bind(this))},setUpValidation:function(){this.validator=new FormValidator(this.targetForm)},getSubmitUrl:function(){if(this.options.formSubmitUrl.contains("path="))return this.options.formSubmitUrl;var a=(this.options.formSubmitUrl.contains("?"))?"&":"?";return this.options.formSubmitUrl+a+"path="+document.location},handleResponse:function(a){try{this.response=JSON.decode(a)}catch(e){this.response=a;this.setGeneralFailure()}if(this.testResponse(this.response)){this.success()}else{this.failure()}},success:function(){this.fireEvent('onSuccess');try{this.removeLoading();this.formShell.effect('opacity',{duration:250}).start(0).chain(function(){try{this.formShell.setStyle('display','none');$(this.options.shell).getElement(this.options.formSuccess).setStyles({'display':'block','opacity':0});if(this.options.formSuccess&&$$(this.options.formSuccess)){$(this.options.shell).getElement(this.options.formSuccess).effect('opacity',{duration:250}).start(1)}}catch(e){dbug.log(e)}}.bind(this))}catch(e){dbug.log(e)}},failure:function(){this.removeLoading();this.handleErrors()},handleErrors:function(){if(this.response.errors){var c=this.getErrorDiv();if($type(this.response.errors)!='array')this.response.errors=[this.response.errors];$each(this.response.errors,function(b){new Element('div',{'text':b.text}).inject(c);$each(b.field.split("/"),function(a){if(this.targetForm[a]){this.targetForm[a].addClass('warn')}}.bind(this))}.bind(this))}},setGeneralFailure:function(){this.removeLoading();this.getErrorDiv().set('text','We\'re having trouble contacting our servers. Please try again.')},setLoading:function(){var a=this.formShell.getCoordinates();this.loading=new Element('div',{text:'Loading',styles:{position:'absolute',width:a.width+'px',height:a.height+'px',top:a.top+'px',left:a.left+'px',lineHeight:a.height+'px',textAlign:'center',fontWeight:'bold',backgroundColor:'#FFF',opacity:0}}).inject(document.body);this.loading.effect('opacity',{duration:100}).start(.9)},removeLoading:function(){try{this.loading.effect('opacity',{duration:100}).start(0).chain(function(){this.loading.remove()}.bind(this))}catch(e){dbug.log(e)}},getErrorDiv:function(){return this.formShell.getElement('dd.warn')||new Element('dd',{'class':'warn'}).inject(this.formShell.getElement('dd.dek'),'after')},clearWarnings:function(){var b=$(this.options.shell).getElements('.warn');if(!b.length)return;b.each(function(a){if(a.nodeName=="DD"){a.remove()}else{a.removeClass('warn')}})},show:function(){this.formShell.setStyle('display','block')},hide:function(){this.formShell.setStyle('display','none')}});CommentsLogin.forgotPassword=new Class({Implements:Options,options:{formId:'forgotPassword',submitUrl:'/1323-4-103.html'},initialize:function(b){this.setOptions(b);this.formShell=$(this.options.formId);this.formShell.action=this.options.submitUrl;this.formShell.path.value=document.location.href;this.validator=new FormValidator(this.options.formId,{evaluateOnSubmit:false});this.formShell.set('send',{onComplete:function(a){this.handleResponse(a)}.bind(this)});this.formShell.addEvent('submit',function(e){if(e)e=new Event(e).stop();if(!this.validator.validate())return false;this.formShell.send()}.bind(this));this.formShell.getElement('.lostpass').onclick=function(e){try{this.formShell.fireEvent('submit')}catch(error){dbug.log(error)}}.bind(this)},handleResponse:function(a){this.response=a;if(this.response.test('errorDisplay')){this.getErrorDiv().set('text','We have no record of the e-mail address provided. Double check the address for typos or formatting problems.')}else if(this.response.test('nextSteps')){var b=new Element('div',{id:'nextSteps'}).set('html','<p>Check your inbox for an e-mail from <b>"CNET Membership" &lt;membership@noreply.cnet.com&gt;</b> with the subject <b>"CNET.com Password Assistance"</b>.</p><p class="note">If you don\'t see this e-mail, it may have been mistakenly flagged as spam and placed in a spam/junk mail folder. Follow the instructions in the e-mail to reset your password. If you cannot find this e-mail from us, please contact our <a href="http://cnet.custhelp.com/cgi-bin/cnet.cfg/php/enduser/std_alp.php">customer support.</a></p>');this.formShell.set('html','').adopt(b)}},getErrorDiv:function(){try{return this.formShell.getElement('div.warn')||new Element('DIV',{'class':'warn'}).inject(this.formShell)}catch(e){dbug.log(e)}},clearErrors:function(){this.formShell.getElements('div.warn').each(function(a){a.remove()})}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(a){a.setStyle('visibility','visible')},onHide:function(a){a.setStyle('visibility','hidden')},maxTitleChars:30,showDelay:100,hideDelay:100,className:null,offsets:{x:16,y:16},fixed:false},initialize:function(){var a=Array.link(arguments,{options:Object.type,elements:$defined});this.setOptions(a.options);this.tip=new Element('div').inject(document.body);if(this.options.className)this.tip.addClass(this.options.className);var b=new Element('div',{'class':'tip-top'}).inject(this.tip);this.container=new Element('div',{'class':'tip'}).inject(this.tip);var c=new Element('div',{'class':'tip-bottom'}).inject(this.tip);this.tip.setStyles({position:'absolute',top:0,left:0,visibility:'hidden'});if(a.elements)this.attach(a.elements)},attach:function(g){$$(g).each(function(a){var b=a.retrieve('tip:title',a.get('title'));var c=a.retrieve('tip:text',a.get('rel')||a.get('href'));var d=a.retrieve('tip:enter',this.elementEnter.bindWithEvent(this,a));var e=a.retrieve('tip:leave',this.elementLeave.bindWithEvent(this,a));a.addEvents({mouseenter:d,mouseleave:e});if(!this.options.fixed){var f=a.retrieve('tip:move',this.elementMove.bindWithEvent(this,a));a.addEvent('mousemove',f)}a.store('tip:native',a.get('title'));a.erase('title')},this);return this},detach:function(c){$$(c).each(function(a){a.removeEvent('mouseenter',a.retrieve('tip:enter')||$empty);a.removeEvent('mouseleave',a.retrieve('tip:leave')||$empty);a.removeEvent('mouseleave',a.retrieve('tip:move')||$empty);a.eliminate('tip:enter').eliminate('tip:leave').eliminate('tip:move');var b=a.retrieve('tip:native');if(b)a.set('title',b)});return this},elementEnter:function(a,b){this.container.empty();var c=b.retrieve('tip:title');if(c){this.titleElement=new Element('div',{'class':'tip-title'}).inject(this.container);this.fill(this.titleElement,c)}var d=b.retrieve('tip:text');if(d){this.textElement=new Element('div',{'class':'tip-text'}).inject(this.container);this.fill(this.textElement,d)}this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);this.position((!this.options.fixed)?a:{page:b.getPosition()})},elementLeave:function(a){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this)},elementMove:function(a){this.position(a)},position:function(a){var b=window.getSize(),scroll=window.getScroll();var c={x:this.tip.offsetWidth,y:this.tip.offsetHeight};var d={x:'left',y:'top'};for(var z in d){var e=a.page[z]+this.options.offsets[z];if((e+c[z]-scroll[z])>b[z])e=a.page[z]-this.options.offsets[z]-c[z];this.tip.setStyle(d[z],e)}},fill:function(a,b){(typeof b=='string')?a.set('html',b):a.adopt(b)},show:function(){this.fireEvent('onShow',this.tip)},hide:function(){this.fireEvent('onHide',this.tip)}});var commentsTipStyles={toolTipElement2:{timeOut:700,maxTitleChars:50,maxOpacity:.9,offsets:{'x':-140,'y':24},className:'tool2'}};

/* end packed code */
} //end debug scripts
