//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/download/cat/",["download.product.detail.js"])){
/* start packed code */
var InputValidator=new Class({initialize:function(className,options){this.setOptions({errorMsg:'Validation failed.',test:function(field){return true}},options);this.className=className},test:function(field){if($(field))return this.options.test($(field),this.getProps(field));else return false},getError:function(field){var err=this.options.errorMsg;if($type(err)=="function")err=err($(field),this.getProps(field));return err},getProps:function(field){if($(field)&&$(field).getProperty('validatorProps')){try{return Json.evaluate($(field).getProperty('validatorProps'))}catch(e){return{}}}else{return{}}}});InputValidator.implement(new Options);var FormValidator=new Class({initialize:function(form,options){this.setOptions({fieldSelectors:"input, select, textarea",useTitles:false,evaluateOnSubmit:true,evaluateFieldsOnBlur:true,onFormValidate:function(isValid,form){},onElementValidate:function(isValid,field){}},options||{});try{this.form=$(form);if(this.options.evaluateOnSubmit)this.form.addEvent('submit',this.onSubmit.bind(this));if(this.options.evaluateFieldsOnBlur)this.watchFields()}catch(e){}},watchFields:function(){try{this.form.getElementsBySelector(this.options.fieldSelectors).each(function(el){el.addEvent('blur',this.validateField.pass(el,this))},this)}catch(e){}},onSubmit:function(event){if(!this.validate())new Event(event).stop()},reset:function(){this.form.getElementsBySelector(this.options.fieldSelectors).each(this.resetField,this)},validate:function(){var result=this.form.getElementsBySelector(this.options.fieldSelectors).map(function(field){return this.validateField(field)},this);result=result.every(function(val){return val});this.fireEvent('onFormValidate',[result,this.form]);return result},validateField:function(field){field=$(field);var result=true;if(field){var validators=field.className.split(" ").some(function(cn){return FormValidator.getValidator(cn)});result=field.className.split(" ").map(function(className){var test=this.test(className,field);return test},this);result=result.every(function(val){return val});if(validators){if(result)field.addClass('validation-passed').removeClass('validation-failed');else field.addClass('validation-failed').removeClass('validation-passed')}}return result},getPropName:function(className){return'__advice'+className},test:function(className,field){field=$(field);var isValid=true;if(field){var validator=FormValidator.getValidator(className);if(validator&&this.isVisible(field)){isValid=validator.test(field);if(!isValid&&validator.getError(field)){var advice=this.makeAdvice(className,field,validator.getError(field));this.insertAdvice(advice,field);this.showAdvice(className,field)}else this.hideAdvice(className,field);this.fireEvent('onElementValidate',[isValid,field])}}return isValid},showAdvice:function(className,field){var advice=this.getAdvice(className,field);if(advice&&!field[this.getPropName(className)]&&(advice.getStyle('display')=="none"||advice.getStyle('visiblity')=="hidden"||advice.getStyle('opacity')==0)){field[this.getPropName(className)]=true;if(advice.smoothShow)advice.smoothShow();else advice.setStyle('display','block')}},hideAdvice:function(className,field){var advice=this.getAdvice(className,field);if(advice&&field[this.getPropName(className)]){field[this.getPropName(className)]=false;if(advice.smoothHide)advice.smoothHide();else advice.setStyle('display','block')}},isVisible:function(field){while(field.tagName!='BODY'){if($(field).getStyle('display')=="none")return false;field=field.parentNode}return true},getAdvice:function(className,field){return $('advice-'+className+'-'+this.getFieldId(field))},makeAdvice:function(className,field,error){var errorMsg=this.options.useTitles?$pick(field.title,error):error;var advice=this.getAdvice(className,field);if(!advice){advice=new Element('div').addClass('validation-advice').setProperty('id','advice-'+className+'-'+this.getFieldId(field)).setStyle('display','none').appendText(errorMsg)}else{advice.setHTML(errorMsg)}return advice},insertAdvice:function(advice,field){switch(field.type.toLowerCase()){case'radio':var p=$(field.parentNode);if(p){p.adopt(advice);break}default:advice.injectAfter($(field))}},getFieldId:function(field){return field.id?field.id:field.id="input_"+field.name},resetField:function(field){field=$(field);if(field){var cn=field.className.split(" ");cn.each(function(className){var prop=this.getPropName(className);if(field[prop])this.hideAdvice(className,field);field.removeClass('validation-failed');field.removeClass('validation-passed')},this)}}});FormValidator.implement(new Options);FormValidator.implement(new Events);Object.extend(FormValidator,{validators:[],add:function(className,options){this.validators[className]=new InputValidator(className,options)},addAllThese:function(validators){$A(validators).each(function(validator){this.add(validator[0],validator[1])},this)},getValidator:function(className){return FormValidator.validators[className]=$pick(FormValidator.validators[className],false)}});FormValidator.add('IsEmpty',{errorMsg:false,test:function(element){if(element.type=="select-one"||element.type=="select")return!(element.selectedIndex>=0&&element.options[element.selectedIndex].value!="");else return((element.getValue()==null)||(element.getValue().length==0))}});FormValidator.addAllThese([['required',{errorMsg:function(element){return'This field is required.'},test:function(element){return!FormValidator.getValidator('IsEmpty').test(element)}}],['minLength',{errorMsg:function(element,props){if($type(props.minLength))return'Please enter at least '+props.minLength+' characters (you entered '+element.getValue().length+' characters).';else return''},test:function(element,props){if($type(props.minLength))return(element.getValue().length>=$pick(props.minLength,0));else return true}}],['maxLength',{errorMsg:function(element,props){if($type(props.maxLength))return'Please enter no more than '+props.maxLength+' characters (you entered '+element.getValue().length+' characters).';else return''},test:function(element,props){return(element.getValue().length<=$pick(props.maxLength,10000))}}],['validate-number',{errorMsg:'Please enter a valid number in this field.',test:function(element){return FormValidator.getValidator('IsEmpty').test(element)||!/[^\d+$]/.test(element.getValue())}}],['validate-digits',{errorMsg:'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.',test:function(element){return FormValidator.getValidator('IsEmpty').test(element)||(!/[^a-zA-Z]/.test(element.getValue())&&/[\d]/.test(element.getValue()))}}],['validate-alpha',{errorMsg:'Please use letters only (a-z) in this field.',test:function(element){return FormValidator.getValidator('IsEmpty').test(element)||/^[a-zA-Z]+$/.test(element.getValue())}}],['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(element){return FormValidator.getValidator('IsEmpty').test(element)||!/\W/.test(element.getValue())}}],['validate-date',{errorMsg:'Please use this date format: mm/dd/yyyy. For example 03/17/2006 for the 17th of March, 2006.',test:function(element){if(FormValidator.getValidator('IsEmpty').test(element))return true;var regex=/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!regex.test(element.getValue()))return false;var d=new Date(element.getValue().replace(regex,'$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(element){return FormValidator.getValidator('IsEmpty').test(element)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(element.getValue())}}],['validate-url',{errorMsg:'Please enter a valid URL.',test:function(element){return FormValidator.getValidator('IsEmpty').test(element)||/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(element.getValue())}}],['validate-date-au',{errorMsg:'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.',test:function(element){if(FormValidator.getValidator('IsEmpty').test(element))return true;var regex=/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!regex.test(element.getValue()))return false;var d=new Date(element.getValue().replace(regex,'$2/$1/$3'));return(parseInt(RegExp.$2,10)==(1+d.getMonth()))&&(parseInt(RegExp.$1,10)==d.getDate())&&(parseInt(RegExp.$3,10)==d.getFullYear())}}],['validate-currency-dollar',{errorMsg:'Please enter a valid $ amount. For example $100.00 .',test:function(element){return FormValidator.getValidator('IsEmpty').test(element)||/^\$?\-?([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(element.getValue())}}],['validate-one-required',{errorMsg:'Please enter something for at least one of the above options.',test:function(element){var p=element.parentNode;var options=p.getElements('input');return $A(options).some(function(el){return el.getValue()})}}]]);var SimpleSlideShow=new Class({options:{startIndex:0,slides:[],currentSlideClass:'currentSlide',currentIndexContainer:false,maxContainer:false,nextLink:false,prevLink:false,wrap:true,disabledLinkClass:'disabled',onNext:Class.empty,onPrev:Class.empty,onSlideClick:Class.empty,crossFadeOptions:{}},initialize:function(options){this.setOptions(options);this.slides=this.options.slides;this.makeSlides();this.setCounters();this.setUpNav();this.now=this.options.startIndex;if(this.slides.length>0)this.showSlide(this.now)},setCounters:function(){if($(this.options.currentIndexContainer))$(this.options.currentIndexContainer).setHTML(this.now+1);if($(this.options.maxContainer))$(this.options.maxContainer).setHTML(this.slides.length)},makeSlides:function(){this.slides.each(function(slide,index){if(index!=this.now)slide.setStyle('display','none');else slide.setStyle('display','block');this.makeSlide(slide)},this)},makeSlide:function(slide){slide.addEvent('click',function(){this.fireEvent('onSlideClick')}.bind(this))},setUpNav:function(){if($(this.options.nextLink))$(this.options.nextLink).addEvent('click',function(){this.cycleForward()}.bind(this));if($(this.options.prevLink))$(this.options.prevLink).addEvent('click',function(){this.cycleBack()}.bind(this))},cycleForward:function(){if($type(this.now)&&this.now<this.slides.length-1)this.showSlide(this.now+1);else if($type(this.now)&&this.options.wrap)this.showSlide(0);else this.showSlide(this.options.startIndex);this.fireEvent('onNext');if(this.now==this.slides.length&&!this.options.wrap&&$(this.options.nextLink))$(this.options.nextLink).addClass(this.options.disabledLinkClass);else if($(this.options.nextLink))$(this.options.nextLink).removeClass(this.options.disabledLinkClass)},cycleBack:function(){if(this.now>0)this.showSlide(this.now-1);else if(this.options.wrap)this.showSlide(this.slides.length-1);this.fireEvent('onPrev');if(this.now==0&&!this.options.wrap&&$(this.options.prevSlide))$(this.options.prevSlide).addClass(this.options.disabledLinkClass);else if($(this.options.prevSlide))$(this.options.prevSlide).removeClass(this.options.disabledLinkClass)},showSlide:function(iToShow){var now=this.now;if(this.slides[iToShow]){if($type(this.now)&&this.now!=iToShow){this.slides[this.now].effect('opacity',this.options.crossFadeOptions).start(0).chain(function(){this.slides[now].hide();this.slides[iToShow].addClass(this.options.currentSlideClass).setStyles({'display':'block','opacity':0}).effect('opacity',this.options.crossFadeOptions).start(1)}.bind(this))}else this.slides[iToShow].setStyles({'display':'block','opacity':0}).effect('opacity',this.options.crossFadeOptions).start(1);this.now=iToShow;this.setCounters()}},slideClick:function(){this.fireEvent('onSlideClick',[this.slides[this.now],this.now])}});SimpleSlideShow.implement(new Events);SimpleSlideShow.implement(new Options);var SimpleImageSlideShow=SimpleSlideShow.extend({options:{imgUrls:[],imgClass:'screenshot',container:false},initialize:function(options){this.parent(options);this.options.imgUrls.each(function(url){this.addImg(url)},this);this.showSlide(this.options.startIndex)},addImg:function(url){if($(this.options.container)){var img=new Element('img').setProperties({'src':url,'id':this.options.imgClass+this.slides.length}).addClass(this.options.imgClass).setStyle('display','none').injectInside($(this.options.container)).addEvent('click',this.slideClick.bind(this));this.slides.push(img);this.makeSlide(img);this.setCounters()}}});$extend(rbdl,{openEmailThis:function(options){try{options=$merge({url:'',id:'emailThisPopup',html:($('emailThis'))?$('emailThis').innerHTML:'',relativeTo:'product-quickfacts',x:-15,y:-15,position:'upperRight',edge:'upperRight'},options);options.html=options.html.replaceAll('iframe src=""','iframe src="'+options.url+'"','i');new StickyWin({content:options.html,id:options.id,position:options.position,edge:options.edge,offset:{y:options.x,x:options.y},relativeTo:$(options.relativeTo)||document.body})}catch(e){dbug.log('email this popup error: %o',e)}},openEmailThisPopUp:function(url,name){window.popup(url,{name:name,width:430,height:590}).focus()}});var openEmailThis=rbdl.openEmailThis.bind(rbdl);var openEmailThisPopUp=rbdl.openEmailThisPopUp.bind(rbdl);function closeEmailThis(){try{if($('emailThisPopup'))$('emailThisPopup').hide();$$('iframe.iframeShim').each(function(shim){shim.hide()})}catch(e){dbug.log('error hiding email this: %o',e)}};var ratings={currentRatings:[],goToSubmitReview:function(pagetype,node,id,score){if(score>=0)window.location.href='/'+pagetype+'-'+node+'-'+id+'.html?stars='+score},confirmScore:function(score){if(score>0)return confirm("You can only rate this item once. Are you sure you want to give it a "+score+"?");else if(score==0)return confirm("You can rate this item only once. Are you sure you want to mark it as not being your style?");else return false},submitRating:function(id,score){if(score){this.setRating(id,score);if($("back_"+id))$("back_"+id).value=parent.document.location.href;document.forms["RateIt_"+id].submit()}},submitHelpfulVote:function(id,voteValue){if($("vote_"+id)){$("vote_"+id).value=voteValue;$("back_"+id).value=parent.document.location.href;document.forms["HelpfulnessVote_"+id].submit()}},setRating:function(id,score){this.currentRatings[id]=score;if($("rating_"+id))$("rating_"+id).value=score;if($("stars_"+id))$("stars_"+id).src=this.getImg(true,rating)},getImg:function(){return new Element('img')}};if(PageVars.siteId==4){$extend(ratings,{msgs:["","Though it may have some useful functions, this product is unstable, riddled with spyware, or otherwise difficult to use. Download at your own risk.","This program has major flaws, though it is not completely without merit. I cannot recommend this download unless it is the only one of its kind.","This is a decent, solid program. It has no major flaws, but it didn't knock my socks off. There may be similar programs that work better, have more features, or are easier to use.","Despite a few minor flaws, this program is generally excellent. I recommend this download.","I can't recommend this product highly enough."],getMsg:function(index){if(index>=0)return new Element('p').addClass('star-explanation').adopt(new Element('strong').appendText(index+' stars:')).appendText(' '+this.msgs[index]);else return new Element('p')},getImg:function(score){score=$pick(score,0);if(score<0)score=0;return"/i/dl/global/strs/user_reviews_stars_"+score+".gif"},ratingsOver:function(id,rating){this.currentRatings[id]=$pick(this.currentRatings[id],-1);if($("stars_"+id))$("stars_"+id).src=this.getImg(rating);if($('ratetxt'))$('ratetxt').setHTML("").adopt(this.getMsg(rating))},ratingsOut:function(id){this.currentRatings[id]=$pick(this.currentRatings[id],-1);if($("stars_"+id))$("stars_"+id).src=this.getImg(this.currentRatings[id]);if($('ratetxt'))$('ratetxt').setHTML("").adopt(this.getMsg(this.currentRatings[id]))}})};var setRating=(ratings.setRating)?ratings.setRating.bind(ratings):null;var setRatingdl=(ratings.setRating)?ratings.setRating.bind(ratings):null;var setMDLRating=(ratings.setRating)?ratings.setRating.bind(ratings):null;var submitRating=(ratings.submitRating)?ratings.submitRating.bind(ratings):null;var submitMDLRating=(ratings.submitRating)?ratings.submitRating.bind(ratings):null;var goToSubmitReview=(ratings.goToSubmitReview)?ratings.goToSubmitReview.bind(ratings):null;var submitHelpfulVote=(ratings.submitHelpfulVote)?ratings.submitHelpfulVote.bind(ratings):null;var nmsOver=(ratings.nmsOver)?ratings.nmsOver.bind(ratings):null;var nmsOut=(ratings.nmsOut)?ratings.nmsOut.bind(ratings):null;var ratingsOver=(ratings.ratingsOver)?ratings.ratingsOver.bind(ratings):null;var ratingsOut=(ratings.ratingsOut)?ratings.ratingsOut.bind(ratings):null;var rateObj=(ratings.setRating)?ratings.setRating.bind(ratings):null;var ratingsOverdl=(ratings.ratingsOver)?ratings.ratingsOver.bind(ratings):null;var ratingsOutdl=(ratings.ratingsOut)?ratings.ratingsOut.bind(ratings):null;var rateObjdl=(ratings.setRating)?ratings.setRating.bind(ratings):null;
/* end packed code */
} //end debug scripts


