//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.
if(!dbugScripts("http://publish.cnet.com:8100/html/rb/js/tiburon/download/",["download.product.detail.js"])) {
/*	download.product.detail.js - packed	*/
var InputValidator=new Class({Implements:[Options],initialize:function(B,A){this.setOptions({errorMsg:"Validation failed.",test:function(C){return true}},A);this.className=B},test:function(A){if($(A)){return this.options.test($(A),this.getProps(A))}else{return false}},getError:function(B){var A=this.options.errorMsg;if($type(A)=="function"){A=A($(B),this.getProps(B))}return A},getProps:function(B){if($(B)&&$(B).get("validatorProps")){try{return JSON.decode($(B).get("validatorProps"))}catch(A){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(B,A){this.setOptions(A);this.form=$(B);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 A=this.getFields().map(function(C){return this.validateField(C,true)},this);A=A.every(function(C){return C});this.fireEvent("onFormValidate",[A,this.form,B]);return A},validateField:function(H,G){if(this.paused){return true}H=$(H);var B=true;var D=this.form.getElement(".validation-failed");var F=this.form.getElement(".warning");if(H&&(!D||G||H==D||(D&&!this.options.serial))){var C=H.className.split(" ").some(function(I){return this.getValidator(I)},this);B=H.className.split(" ").map(function(I){return this.test(I,H)},this).every(function(I){return I});if(C&&!H.hasClass("warnOnly")){if(B){H.addClass("validation-passed").removeClass("validation-failed")}else{H.addClass("validation-failed").removeClass("validation-passed")}}if(!F||G||(F&&!this.options.serial)){var E=H.className.split(" ").some(function(I){if(I.test("^warn-")||H.hasClass("warnOnly")){return this.getValidator(I.replace(/^warn-/,""))}else{return null}},this);H.removeClass("warning");var A=H.className.split(" ").map(function(I){if(I.test("^warn-")||H.hasClass("warnOnly")){return this.test(I.replace(/^warn-/,""),H,true)}else{return null}},this)}}return B},getPropName:function(A){return"__advice"+A},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&&this.isVisible(E)){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},showAdvice:function(B,C){var A=this.getAdvice(B,C);if(A&&!C[this.getPropName(B)]&&(A.getStyle("display")=="none"||A.getStyle("visiblity")=="hidden"||A.getStyle("opacity")==0)){C[this.getPropName(B)]=true;if(A.smoothShow){A.smoothShow()}else{A.setStyle("display","block")}}},hideAdvice:function(B,C){var A=this.getAdvice(B,C);if(A&&C[this.getPropName(B)]){C[this.getPropName(B)]=false;if(A.smoothHide){A.smoothHide()}else{A.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(D,F,C,G){var E=(G)?this.options.warningPrefix:this.options.errorPrefix;E+=(this.options.useTitles)?$pick(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("html",E)}return B},insertAdvice:function(A,C){switch(C.type.toLowerCase()){case"radio":var B=$(C.parentNode);if(B){B.adopt(A);break}default:A.inject($(C),"after")}},getFieldId:function(A){return A.id?A.id:A.id="input_"+A.name},resetField:function(A){A=$(A);if(A){var B=A.className.split(" ");B.each(function(C){if(C.test("^warn-")){C=C.replace(/^warn-/,"")}var D=this.getPropName(C);if(A[D]){this.hideAdvice(C,A)}A.removeClass("validation-failed");A.removeClass("warning");A.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(B,A){this.validators[B]=new InputValidator(B,A);if(!this.initialize){this.implement({validators:this.validators})}},addAllThese:function(A){$A(A).each(function(B){this.add(B[0],B[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)||/^-{0,1}\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,1}\d*\.{0,1}\d+$/.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 E=B.dateFormat||"%x";var F=Date.parse(A.get("value"));var D=F.format(E);if(D!="invalid date"){A.set("value",D)}return !isNaN(F)}else{var C=/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!C.test(A.get("value"))){return false}var F=new Date(A.get("value").replace(C,"$1/$2/$3"));return(parseInt(RegExp.$1,10)==(1+F.getMonth()))&&(parseInt(RegExp.$2,10)==F.getDate())&&(parseInt(RegExp.$3,10)==F.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 C=B.parentNode;var A=C.getElements("input");return $A(A).some(function(D){if(D.get("type")=="checkbox"){return D.get("checked")}return D.get("value")})}}]]);var InsertedLogInForm=new Class({Implements:[Options,Events,Chain],response:null,formShell:null,formElem:null,validator:null,isOpen:false,errorDiv:null,lastElem:null,options:{template:null,validate:true},initialize:function(A){this.setOptions(A);this.formShell=$(this.options.template).clone();this.formShell.inject(document.body);this.formElem=(this.formShell.getTag()=="form")?this.formShell:this.formShell.getElement("form");this.formElem.set("submitURL",this.formElem.get("action"));this.formElem.set("action","javascript:void(0)");this.formElem.addEvent("submit",function(B){B.stop();this.submitForm()}.bind(this));this.formShell.setStyles({"overflow":"hidden","height":"0","clear":"both"});this.formElem.getElements(".close").each(function(B){B.addEvent("click",function(){this.close()}.bind(this))}.bind(this))},submitForm:function(){this.formElem.set("send",{url:this.formElem.get("submitURL"),onComplete:function(A){try{A=JSON.decode(A);if(A.returnCode&&A.returnCode==1){this.onSuccess(A)}else{this.onFailure(A)}}catch(B){dbug.log("Login error: %o",B);this.onFailure()}}.bind(this)}).send();dbug.log(this.formElem.get("send"))},onSuccess:function(A){UserVars=new LocalVars.UserVars({loggedIn:"1",rememberMe:(A.rememberMe=="false")?"0":"1",ursRegId:A.registrationId,userName:A.displayName});new LoginStatus();this.formShell.set("html",this.statusMessage["1"]);(function(){this.chain(function(){this.hide()}.bind(this));this.chain(function(){this.fireEvent("onLogin")}.bind(this));this.callChain()}).delay(1250,this)},onFailure:function(A){this.getErrorDiv().empty();if(A&&A.errors){$each(A.errors,function(B){new Element("p").appendText(B.text).inject(this.getErrorDiv())}.bind(this))}else{this.getErrorDiv().set("html",'We\'re sorry, a failure has occurred. Please try again, or contact our <a href="http://cnet.custhelp.com" target="_new">Help Center</a>.')}this.show()},open:function(B){if(UserVars.isLoggedIn()){return }if(B!=this.lastElem||!this.isOpen){var A=this.regParent(B);if(A){if(this.isOpen){this.chain(function(){this.hide()}.bind(this))}this.chain(function(){this.placeForm(A)}.bind(this));this.chain(function(){this.show()}.bind(this));this.callChain();this.lastElem=B}}else{this.close()}},close:function(){this.chain(function(){this.hide()});this.chain(function(){this.formShell.hide();this.formElem.reset();if(this.errorDiv){this.errorDiv.dispose()}this.errorDiv=null});this.callChain()},regParent:function(A){if(A.hasClass("reg")){return A}return A.getParent(".reg")},show:function(){dbug.log(this.formShell);this.formShell.show();this.formShell.set("tween",{duration:250}).tween("height",this.findShowHeight());this.callChain();this.isOpen=true;this.formElem.focus()},hide:function(){if(this.formShell.offsetHeight>0){this.formShell.set("tween",{duration:250,onComplete:this.callChain.bind(this)}).tween("height",0)}else{this.callChain()}this.isOpen=false},placeForm:function(A){dbug.log("placeForm");dbug.log(A);dbug.log(this.formShell);this.formShell.inject(A,A.hasClass("regAbove")?"before":"after");this.callChain()},findShowHeight:function(){if(this.formShell.offsetHeight<this.formShell.scrollHeight){return this.formShell.scrollHeight}else{var A;var C=this.formShell.getStyle("height");var B=new Element("div",{styles:{"height":C}});B.replaces(this.formShell).adopt(this.formShell);this.formShell.setStyle("height","auto");A=this.formShell.offsetHeight;this.formShell.setStyle("height",C);this.formShell.replaces(B);return A}return null},statusMessage:{"1":"<h4>You have successfully logged in.</h4><p>Thank you.</p>"},getErrorDiv:function(){var A=this.errorDiv;if(!A){this.errorDiv=A=new Element("div",{"class":"error"}).inject(this.formShell.getElement("h4"),"after")}else{A.set("html","")}return A}});RBDL.getLoginUrl=function(D,C){C=C||{};var B;if($chk(D.action)&&D.action.match("/1325")){B=D.action}else{B="/1325-4_"+PageVars.get("nodeId")+"-";B+=$pick(C.appId,"103");B+=".html"}if(B.match("path=")){return B}var A=(B.indexOf("?")>-1)?"&":"?";var E=escape(document.location.toString());B+=A+"path="+E;return B};var ReplyToReview=new Class({Implements:[Options],launchElem:null,formShell:null,formElem:null,validator:null,opinonId:null,isOpen:false,options:{template:"replyShell",pageType:9246,productId:false,loginObj:false},initialize:function(B,A){this.setOptions(A);this.launchElem=$(B);this.opinionId=this.getOpinionId();if(!this.opinionId){dbug.log("opinionId not found: %s",this.launchElem);return false}this.launchElem.addEvent("click",this.toggleShell.bindWithEvent(this))},toggleShell:function(A){if(A){A.stop()}if(this.isOpen){this.hide()}else{this.show()}},createReplyForm:function(){this.formShell=$(this.options.template).clone();this.formShell.set("id",this.formShell.get("id")+"_"+this.opinionId);this.formShell.setStyles({display:"none",height:"0",overflow:"hidden"});this.formElem=(this.formShell.getTag()=="form")?this.formShell:this.formShell.getElement("form");this.formElem.set("id",this.formElem.get("id")+"_"+this.opinionId);this.submitUrl=this.formElem.get("action");this.formElem.set("action","javascript:void(0)");this.formShell.inject(this.findParentDiv(this.launchElem.getParent("p")),"after");this.formElem.getElement("input[name=reviewedOpinionId]").set("value",this.opinionId);this.formShell.getElements(".close").each(function(A){A.addEvent("click",this.hide.bind(this))}.bind(this));this.validator=new FormValidator(this.formElem,{evaluateOnSubmit:true,evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,onFormValidate:function(C,B,A){A.stop();if(!C){this.show.delay(500,this);return }this.submitForm()}.bind(this)})},findParentDiv:function(A){if($(A).getTag("div")){return $(A)}return $(A).getParent("div")},submitForm:function(){this.formElem.set("send",{url:this.submitUrl,onComplete:function(A){A=JSON.decode(A);if(A&&A.status==1){this.onSuccess(A)}else{this.onFailure(A)}this.formShell.effect("opacity",{duration:250}).start(1);this.formElem.set("disabled","")}.bind(this),onRequest:function(){this.formShell.effect("opacity",{duration:250}).start(0.6);this.formElem.set("disabled","disabled")}.bind(this),onFailure:function(){this.formShell.effect("opacity",{duration:250}).start(1);this.formElem.set("disabled","");this.generalFailure()}.bind(this)}).send(this.submitUrl)},onSuccess:function(A){if(A.message){new Element("div").appendText(A.message).replaces(this.formElem)}this.show()},onFailure:function(A){if(A&&A.errors){var B=this.getErrorDiv().empty();new Element("h4",{"text":"We have found the following errors:"}).inject(B);$each(A.errors,function(C){if(C.message){new Element("p",{text:C.message}).inject(B)}})}else{this.generalFailure()}this.show()},generalFailure:function(){this.getErrorDiv().empty().set("html",'<p class="error">We\'re sorry. A error has occurred. Please try again, or contact our <a href="http://cnet.custhelp.com/">Help Center</a>.</p>')},getSubmitUrl:function(){return this.formElem.get("action")},getOpinionId:function(){var A=this.launchElem;var B=false;do{B=A.get("opinionId");if(B){return B}}while(A=A.getParent());return false},show:function(){if(!UserVars.isLoggedIn()){this.options.loginObj.open(this.launchElem);return false}if(!this.formShell){this.createReplyForm()}this.formShell.show();this.formShell.tween("height",this.findShowHeight());this.isOpen=true},hide:function(){this.formShell.tween("height",0);this.isOpen=false},findShowHeight:function(){if(this.formShell.offsetHeight>=this.formShell.scrollHeight){var A;var C=this.formShell.getStyle("height");var B=new Element("div",{styles:{"height":C}}).inject(this.formShell.getParent()).adopt(this.formShell);this.formShell.setStyle("height","auto");A=this.formShell.offsetHeight;this.formShell.setStyle("height",C);this.formShell.replaces(B);return A}else{return this.formShell.scrollHeight}return null},getErrorDiv:function(){var A=this.errorDiv;if(!A){this.errorDiv=errDiv=new Element("div",{"class":"error"}).inject(this.formElem.getElement("input"),"before")}return errDiv}});var HelpfulVote=new Class({launchElem:null,Implements:[Options],options:{loginObj:null},initialize:function(B,A){B.stop();this.setOptions(A);this.launchElem=B.target;if(this.errorDiv){this.errorDiv.empty()}if(!UserVars.isLoggedIn()){this.options.loginObj.open(this.launchElem);return false}new Request({url:this.launchElem.get("href"),method:"get",onComplete:function(C){C=JSON.decode(C);this[(C&&C.status==1)?"success":"failure"](C)}.bind(this)}).send()},success:function(A){if(A.message){this.findParent().set("html",A.message)}},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("uoRate"))?this.launchElem:this.launchElem.getParent(".uoRate")},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 RatingsSubmit=new Class({response:null,validator:null,uoForm:null,submitUrl:null,initialize:function(A){this.uoForm=$(A);this.submitUrl=this.uoForm.get("action");this.uoForm.set("action","javascript:void(0)");this.validator=new FormValidator(this.uoForm,{evaluateOnSubmit:true,evaluateOnBlur:false,onFormValidate:function(D,C,B){B.stop();if(!D){return }if($(this.uoForm.rating).get("value")!=-1){this.submitForm()}else{this.getErrorDiv().empty();new Element("p").appendText("Please select a star rating").inject(this.getErrorDiv())}}.bind(this)});this.validator.add("isDefaultStars",{message:"Please select a star rating",test:function(B){if(B.get("value")==-1||B.get("value")=="-1"){return false}return true}})},submitForm:function(){this.uoForm.set("send",{url:this.submitUrl,onComplete:function(A){A=JSON.decode(A);if(A.status==1){this.success(A)}else{this.failure(A)}}.bind(this),onFailure:function(){this.getErrorDiv().set("html","There has been a problem contacting the Download.com servers. Please try again later.")}.bind(this)}).send()},success:function(A){new Element("div").set("html","<b>Thank you for your submission.</b><br />Your review will appear on the site shortly.").replaces(this.uoForm)},failure:function(A){this.getErrorDiv().empty();if(A.errors){$each(A.errors,function(B){new Element("p").appendText(B.message).inject(this.getErrorDiv())}.bind(this))}else{this.getErrorDiv().set("html",'An error has occurred. Please try again, or contact our <a href="http://cnet.custhelp.com/" target="_new">Help Center</a>.')}},getErrorDiv:function(){var A=this.uoForm.getElement(".error");if(!A){A=new Element("div",{"class":"error"}).inject(this.uoForm.getFirst(),"before")}return A}});window.addEvent("domready",function(){if($("prod-submit-review")){try{new RatingsSubmit("prod-submit-review")}catch(A){dbug.log("RatingsSubmit error: %s",A)}}});var ReportOffensive=new Class({Implements:[Options],launchElem:null,formShell:null,formElem:null,opinonId:null,opinionShell:null,validator:false,isOpen:false,errorDiv:false,options:{template:null,pageType:9251,productId:false},initialize:function(B,A){this.setOptions(A);this.launchElem=$(B);this.opinionId=this.getOpinionId();if(!this.opinionId){dbug.log("opinionId not found");return false}this.launchElem.addEvent("click",this.toggleShell.bindWithEvent(this))},createReportForm:function(){this.formShell=$(this.options.template).clone();this.formShell.set("id",this.formShell.get("id")+"_"+this.opinionId);this.formShell.setStyles({display:"none",height:"0",overflow:"hidden"});this.formElem=(this.formShell.getTag()=="form")?this.formShell:this.formShell.getElement("form");this.formElem.set("id",this.formElem.get("id")+"_"+this.opinionId);this.formShell.inject(this.findParentDiv(this.launchElem),"after");this.formElem.getElement("input[name=OpinionId]").set("value",this.opinionId);this.formElem.getElement("input[name=FoundOnURL]").set("value",document.location.href);this.submitUrl=this.getSubmitUrl();this.validator=new FormValidator(this.formElem,{evaluateOnSubmit:true,evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,onFormValidate:function(C,B,A){A.stop();if(!C){return this.show.delay(500,this)}this.submitForm()}.bind(this)});this.validator.add("validate_radio_selected",{errorMsg:"Please select one of the options above",test:function(B){var A=B.getAttribute("name");return $A(B.form[A]).some(function(C){return C.checked})}});this.validator.add("isDefaultValue",{errorMsg:"Please enter a value.",test:function(A){return(A.get("value")!=A.defaultValue)}});this.formShell.getElements(".close").each(function(A){A.addEvent("click",this.hide.bind(this))}.bind(this));this.appendInputs()},findParentDiv:function(A){do{if($(A).nodeName=="DIV"){return $(A)}A=$(A).getParent()}while(A!=document.body);return false},submitForm:function(){this.formElem.set("send",{onComplete:function(A){this.formShell.effect("opacity",{duration:250}).start(1);this.formElem.set("disabled","");this.evalResponse(A)}.bind(this),onRequest:function(){this.formShell.effect("opacity",{duration:250}).start(0.6);this.formElem.set("disabled","disabled");this.show()}.bind(this),onFailure:function(){this.formShell.effect("opacity",{duration:250}).start(1);this.formElem.set("disabled","");this.getErrorDiv().set("html",'<p class="error">We\'re sorry. We seem to be having trouble contacting the server. Please wait a few minutes and try again.</p>');this.show()}.bind(this)}).send(this.submitUrl)},appendInputs:function(){this.opinionShell.getElements("input").each(function(A){if(A.hasClass("offenseInfo")){A.clone().inject(this.formElem)}},this)},evalResponse:function(response){this.response=eval("("+response+")");if(this.response.status==1){this.onSuccess()}else{this.onFailure()}},onSuccess:function(){new Element("div").appendText(this.response.message).replaces(this.formElem);this.show()},onFailure:function(){var A=this.getErrorDiv();new Element("h4").appendText("We have found the following errors:").inject(A);$each(this.response.errors,function(B){if(B.message){new Element("p").appendText(B.message).inject(A)}});this.show()},getSubmitUrl:function(){var A=this.formElem.get("action");this.formElem.set("action","javascript:void(0)");return A},getOpinionId:function(){var A=this.launchElem;var B=false;do{if(B=A.get("opinionid")){this.opinionShell=A;return B}A=A.getParent()}while(A!=document.body);return false},toggleShell:function(A){if(A){A.stop()}if(this.isOpen){this.hide()}else{this.show()}},show:function(){if(!this.formShell){this.createReportForm()}this.formShell.show();this.formShell.tween("height",this.findShowHeight());this.isOpen=true},hide:function(){this.formShell.tween("height",0);this.isOpen=false},findShowHeight:function(){if(this.formShell.offsetHeight>=this.formShell.scrollHeight){var A;var C=this.formShell.getStyle("height");var B=new Element("div",{styles:{"height":C}}).inject(this.formShell.getParent()).adopt(this.formShell);this.formShell.setStyle("height","auto");A=this.formShell.offsetHeight;this.formShell.setStyle("height",C);this.formShell.replaces(B);return A}else{return this.formShell.scrollHeight}return null},getErrorDiv:function(){var A=this.errorDiv;if(!A){this.errorDiv=errDiv=new Element("div",{"class":"error"}).inject(this.formElem.getElement("input"),"before")}return errDiv}});var TeaseToggle=new Class({Implements:Options,options:{triggerSelectors:".teasetoggle",triggerWhenOpen:"Collapse",triggerWhenClosed:"Expand",revealOptions:null},initialize:function(A,C,B){this.setOptions(B);this.container=$(A);this.toggleElem=$(C);this.container.store("teasetoggle",this);if(this.options.revealOptions){this.toggleElem.set("reveal",revealOptions)}this.initTriggers();this.state=(this.isOpen())?"open":"closed"},initTriggers:function(){this.triggers=this.container.getElements(this.options.triggerSelectors);this.triggers.addEvent("click",this.toggle.bind(this))},isOpen:function(){return this.toggleElem.isVisible()},toggle:function(){if(this.isOpen()){this.hide()}else{this.show()}return this},updateTriggers:function(A){this.triggers.each(function(B){if(!B.hasClass("noupdate")){B.set("html",((A=="open")?this.options.triggerWhenOpen:this.options.triggerWhenClosed))}}.bind(this))},show:function(){this.toggleElem.reveal();this.updateTriggers("open");return this},hide:function(){this.toggleElem.dissolve();this.updateTriggers("closed");return this}});window.addEvent("domready",function(){if(!UserVars.isLoggedIn()){try{RBDL.mobileLogin.push(new InsertedLogInForm({template:"tdLoginShell",onLogin:RBDL.killLoginForms}));var A=$("prodSubmitReview");if(A){RBDL.mobileLogin.push(new InsertedLogInForm({template:"tdLoginShell",onLogin:RBDL.killLoginForms}));RBDL.mobileLogin[RBDL.mobileLogin.length-1].open(A);A.hide()}}catch(B){dbug.log(B)}}$$("#uoList li .uoReply").each(function(C){new ReplyToReview(C,{template:"replyShell",loginObj:RBDL.mobileLogin[0]})});$$("a.helpVote").each(function(C){C.addEvent("click",function(D){new HelpfulVote(D,{loginObj:RBDL.mobileLogin[0]})})});$$(".uoFlag").each(function(C){new ReportOffensive(C,{template:"reportOffensiveShell"})});$$(".teasetoggle").each(function(D){var C=D.getParent("li");new TeaseToggle(C,C.getElement(".uoDetails"),{triggerSelectors:".teasetoggle, a.title",triggerWhenOpen:"[-] Collapse review",triggerWhenClosed:"[+] Expand review"})});try{new RatingsSubmit("prodSubmitReview")}catch(B){dbug.log("Error initialiizing Review form: %o",B)}try{new StarRating()}catch(B){dbug.log("Star rating error: %o",B)}});$extend(RBDL,{mobileLogin:[],killLoginForms:function(){$each(RBDL.mobileLogin,function(A){A.formShell.dispose()});if($("prodSubmitReview")){$("prodSubmitReview").reveal()}},handleAjaxError:function(A){if(A.responseText.indexOf("COMPONENT_RESPONSE_CODE=401")>0){document.location="http://www.download.com/1383-20_4-151.html?path="+ +"http://www.download.com/Ad-Aware-2007/3000-8022_4-10708241.html"+escape("?addWatchItem=true")}else{}},toggleMenu:function(A,B){A=$(A);B=$(B);if(A.isVisible()){A.hide();B.show()}else{A.show();B.hide()}return false}});FormValidator.implement({insertAdvice:function(A,C){switch(C.type.toLowerCase()){case"radio":var B=C.getParent();if(B){B.adopt(A);break}default:A.inject($(C),"before")}}});var StarRating=new Class({ratingsClasses:["oneStar","twoStars","threeStars","fourStars","fiveStars"],currentRating:null,initialize:function(){this.container=$("prodSubmitReview").getElement("ul.userRating");this.container.getElements("a").each(function(A){A.addEvent("click",this.setRating.bindWithEvent(this));A.set("href","javascript:void(0)")}.bind(this));this.container.addEvent("mouseenter",function(){if(this.currentRating){this.container.removeClass(this.currentRating)}}.bind(this));this.container.addEvent("mouseleave",function(){if(this.currentRating){this.container.addClass(this.currentRating)}}.bind(this))},setRating:function(A){this.ratingsClasses.each(function(B,C){this.container.removeClass(B);if(A.target.hasClass(B)){this.currentRating=B;A.target.getParent("form").getElement("input[name=rating]").set("value",C+1)}}.bind(this))}})
/* end packed code */
}

