function calculateDishwasherslider(){var n=getInt("Dishwasher","dishwasher-starRating"),i;document.getElementById("sixstarid").value=n*2;var r=getInt("Dishwasher","dishwasher-size"),u=$("#dishwasher-use-dropdown").val(),f=getInt("Dishwasher","dishwasher-price"),t=0;return t=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),i=$("#hdnAverageStarRatingValue").val(),calculateDishwasherWithParameters(n,r,u,f,t,i)}function calculateDishwasher(n,t,i,r){var u,f,e,o,h,s,c;return u=r==null||r==""?getInt("Dishwasher","dishwasher-EnergyConsumption"):r,f=n=="0"||n==null||n==""?getInt("Dishwasher","dishwasher-starRating"):n,e=t==null||t==""?getInt("Dishwasher","dishwasher-price"):t,o=i==null||i==""?getInt("Dishwasher","dishwasher-size"):i,h=$("#dishwasher-use-dropdown").val(),s=0,s=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),c=$("#hdnAverageStarRatingValue").val(),calculateDishwasherWithParameters(f,o,h,e,s,c,u)}function calculateDishwasher2(n,t,i,r){var c=r,u,f,e,s,o,h;return u=n=="0"||n==null||n==""?getInt("Dishwasher","stars")/2:n,f=t==null||t==""?getInt("Dishwasher","dishwasher-price"):t,e=i==null||i==""?getInt("Dishwasher","dishwasher-size"):i,s=$("#dishwasher-use-dropdown").val(),o=0,o=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),h=$("#hdnAverageStarRatingValue").val(),calculateDishwasherWithParameters(u,e,s,f,o,h,c)}function calculateDishwasherWithParameters(n,t,i,r,u,f,e){var s=getInt("Dishwasher","dishwasher-BaseEnergyConsumsionFactor"),l=getInt("Dishwasher","dishwasher-ReductionInEnergyUsePerStar")/100,a=e,v=getInt("Dishwasher","dishwasher-isBaseEnergy"),h=0,o,c;if(h=t<8?3:3.5,o=i*52,v==0)c=t*s;else return createResultForEnergyConsumsionDishwasher("Dishwasher",a,i,r,n);var y=c*(o/365),p=$("#hdnRatedCapacityDefaultValue").val(),w=s*t*(o/365);return calculateLinearReductionAndResult("Dishwasher",n,y,l,h,r,u,f,w,t,p)}function calculateFridgeFreezer(){var n=getInt("FridgeFreezer","stars")/2,t=getInt("FridgeFreezer","fridge-volume-fridge"),i=getInt("FridgeFreezer","fridge-volume-freezer");return calculateTwoDoorRefrigerator(n,t,i)}function calculateRefrigeratorBase(n,t,i,r){var u=n*1+t*1.6,f=Math.pow(u,.67);return i+f*r}function calculateTwoDoorRefrigerator(n,t,i){var u=getInt("FridgeFreezer","fridge-ReductionInEnergyUsePerStar")/100,f=getInt("FridgeFreezer","fridge-EnergyConsumption"),e=getInt("FridgeFreezer","fridge-isBaseEnergy"),r;return e==0?(r=calculateRefrigeratorBase(t,i,150,8.8),calculateLinearReductionAndResult("FridgeFreezer",n,r,u,2.5)):createResultForEnergyConsumsionFridge("FridgeFreezer",f)}function calculateChestFreezer(n,t){var i=calculateRefrigeratorBase(0,t,150,7.5);return calculateLinearReductionAndResult("FridgeFreezer",n,i,.23,3)}function calculateSingleDoorRefrigerator(n,t,i){var f=getInt("FridgeFreezer","fridge-ReductionInEnergyUsePerStar")/100,u=getInt("FridgeFreezer","fridge-EnergyConsumption"),r;return u==undefined?r=calculateRefrigeratorBase(t,i,200,4):(r=u,n=2),calculateLinearReductionAndResult("FridgeFreezer",n,r,f,2)}function calculateTVComputerslider(){var u=getInt("TVComputer","TVComputer-starRating"),n,t,i,r;document.getElementById("sixstarid").value=u*2;n=$("#ddlModelType").val();n==0?(t=getInt("TVComputer","TVComputer-sizeoftv"),i=getInt("TVComputer","TVComputer-pricetv"),r=$("#hdnisURLorIframe").val()==1?$("#hdnTVPriceDefaultValue").val():$("#hdnPurchasePriceTVDefaultValue").val(),$("#sizeofTVFocused").show(),$("#sizeofComputerFocused").hide(),$("#purchasepriceComputerFocused").hide(),$("#hdnflagPurchasePriceDisplay").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").show(),$("#purchasepriceComputerFocused").hide())):(t=getInt("TVComputer","TVComputer-sizeofcomputer"),i=getInt("TVComputer","TVComputer-pricecomputer"),r=$("#hdnisURLorIframe").val()==1?$("#hdnComputerPriceDefaultValue").val():$("#hdnPurchasePriceComputerDefaultValue").val(),$("#sizeofTVFocused").hide(),$("#purchasepriceTVFocused").hide(),$("#sizeofComputerFocused").show(),$("#purchasepriceComputerFocused").show(),$("#hdnflagPurchasePriceDisplay_Computer").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").show()));var f=$("#TVComputer-avgweekdays-dropdown").val(),e=$("#TVComputer-avgweekends-dropdown").val(),o=$("#hdnAverageStarRatingValue").val();return calculateTVComputerWithParameters(u,n,t,f,e,i,r,o)}function calculateTVComputer(n,t,i,r,u,f,e){var h,s,c,l,a,o;h=n=="0"||n==null||n==""?getInt("TVComputer","TVComputer-starRating"):n;s="";s=f==""||f==null?$("#ddlModelType").val():f;s==0?(a=i==null||i==""?getInt("TVComputer","TV-EnergyConsumption"):i,c=r==null||r==""?getInt("TVComputer","TVComputer-sizeoftv"):r,o=t==null||t==""?getInt("TVComputer","TVComputer-pricetv"):t,l=$("#hdnisURLorIframe").val()==1?$("#hdnTVPriceDefaultValue").val():$("#hdnPurchasePriceTVDefaultValue").val(),$("#hdnflagPurchasePriceDisplay").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").show(),$("#purchasepriceComputerFocused").hide())):(a=i==null||i==""?getInt("TVComputer","Computer-EnergyConsumption"):i,c=u=="0"||u==null||u==""?getInt("TVComputer","TVComputer-sizeofcomputer"):u,o=t==null||t==""?getInt("TVComputer","TVComputer-pricecomputer"):t,l=$("#hdnisURLorIframe").val()==1?$("#hdnComputerPriceDefaultValue").val():$("#hdnPurchasePriceComputerDefaultValue").val(),$("#hdnflagPurchasePriceDisplay_Computer").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").show()));var v=$("#TVComputer-avgweekdays-dropdown").val(),y=$("#TVComputer-avgweekends-dropdown").val(),p=$("#hdnAverageStarRatingValue").val();return calculateTVComputerWithParameters(h,s,c,v,y,o,l,p,a,e)}function calculateTVComputer2(n,t,i,r,u,f){var s,o,h,c,l,e;s=n=="0"||n==null||n==""?getInt("TVComputer","TVComputer-starRating"):n;o="";o=f==""||f==null?$("#ddlModelType").val():f;o==0?(l=i,h=r=="0"||r==null||r==""?getInt("TVComputer","TVComputer-sizeoftv"):r,e=t==null||t==""?getInt("TVComputer","TVComputer-pricetv"):t,c=$("#hdnisURLorIframe").val()==1?$("#hdnTVPriceDefaultValue").val():$("#hdnPurchasePriceTVDefaultValue").val(),$("#hdnflagPurchasePriceDisplay").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").show(),$("#purchasepriceComputerFocused").hide())):(l=i,h=u=="0"||u==null||u==""?getInt("TVComputer","TVComputer-sizeofcomputer"):u,e=t==null||t==""?getInt("TVComputer","TVComputer-pricecomputer"):t,c=$("#hdnisURLorIframe").val()==1?$("#hdnComputerPriceDefaultValue").val():$("#hdnPurchasePriceComputerDefaultValue").val(),$("#hdnflagPurchasePriceDisplay_Computer").val()=="hide"?($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").hide()):($("#purchasepriceTVFocused").hide(),$("#purchasepriceComputerFocused").show()));var a=$("#TVComputer-avgweekdays-dropdown").val(),v=$("#TVComputer-avgweekends-dropdown").val(),y=$("#hdnAverageStarRatingValue").val();return calculateTVComputerWithParameters(s,o,h,a,v,e,c,y,l)}function calculateTVComputerWithParameters(n,t,i,r,u,f,e,o,s){var l=Math.round(i/2.54),p=getInt("TVComputer","TVComputer-ReductionInEnergyUsePerStar")/100,it=$("#hdnDefaultScreensizeTV").val(),rt=$("#hdnDefaultScreensizeComputer").val(),v=0,h,nt,c,tt;t==0?(h=s,v=Math.round(it/2.54)):(h=s,v=Math.round(rt/2.54));var ut=$("#ddlTVViewingHoursPerDay").val(),ft=(r*5+u*2)*52.143,et=getInt("TVComputer","TVComputer-isBaseEnergy"),w=16,y=9,b=i*Math.sqrt(Math.pow(y,2)/(Math.pow(w,2)+Math.pow(y,2))),ot=w/y*b,st=b*ot,ht=65.41*ft/8760,ct=ht,lt=.0934*st,at=lt,k=parseFloat(ct)+parseFloat(at),d=0,a=0,g=0;if(d=Math.round((168-(r*5+u*2))*52.143).toFixed(2),nt=.58,g=nt*(d/1e3),a=parseFloat(k)+parseFloat(g),et==0)c=calculateLinearReduction(n,a,p),tt=calculateLinearReduction(o,a,p);else return t==0?($("#ddlBased").val()==2?h=h/10*ut:$("#ddlBased").val()==1&&(h=h),createResultForEnergyConsumsionTVComputer("TVComputer",h,f,n,t)):createResultForEnergyConsumsionTVComputer("TVComputer",h,f,n,t);$("#hdnFlagCompareModel").val()=="false"?(createResultForTVComputer("TVComputer",c,f,n,l),createResultForTVComputerAvg("TVComputer",tt,n,f,e,l,o)):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?(createResultForTVComputer("TVComputer",c,f,n,l),createResultForTVComputer_Model2("TVComputer",c,f,n,v)):$("#hdnCalculateModel").val()=="model1"?createResultForTVComputer("TVComputer",c,f,n,l):createResultForTVComputer_Model2("TVComputer",c,f,n,l)}function calculateClothesDryerslider(){var n=getInt("ClothesDryer","Dryer-starRating"),i;document.getElementById("sixstarid").value=n*2;var r=getInt("ClothesDryer","Dryer-size"),u=$("#Dryer-use-dropdown").val(),f=getInt("ClothesDryer","Dryer-price"),t=0;return t=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),i=$("#hdnAverageStarRatingValue").val(),calculateClothesDryerWithParameters(n,r,u,f,t,i,"")}function calculateClothesDryer_Model2(n,t,i,r){var u=n,f=i,e=$("#Dryer-use-dropdown").val(),o=t,s=$("#hdnPurchasePriceDefaultValue").val(),h=$("#hdnAverageStarRatingValue").val(),c=r;return calculateClothesDryerWithParameters(u,f,e,o,s,h,c)}function calculateClothesDryer(){var r=getInt("ClothesDryer","Dryer-starRating"),u=getInt("ClothesDryer","Dryer-size"),f=$("#Dryer-use-dropdown").val(),e=getInt("ClothesDryer","Dryer-price"),n=0,t,i;return n=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),t=$("#hdnAverageStarRatingValue").val(),i=getInt("ClothesDryer","Dryer-EnergyConsumption"),calculateClothesDryerWithParameters(r,u,f,e,n,t,i)}function calculateClothesDryerWithParameters(n,t,i,r,u,f,e){var a=$("#hdnRatedCapacityDefaultValue").val(),o=getInt("ClothesDryer","dryer-BaseEnergyConsumsionFactor"),v=getInt("ClothesDryer","dryer-ReductionInEnergyUsePerStar")/100,y=getInt("ClothesDryer","dryer-isBaseEnergy"),s=i*52,h,p="",c,l;return p=$("#ddlModelCompare").val()=="0"?$("#hdnStateTariffTextModel1").val():$("#hdnStateTariffTextModel2").val(),y==0?(h=o*t,c=h*(s/52),l=o*t*(s/52),calculateLinearReductionAndResult("ClothesDryer",n,c,v,1e3,r,u,f,l,t,a)):createResultForEnergyConsumsion_onlyForDryer("ClothesDryer",e,i,r,u,n,f)}function calculateWashingMachineslider(){var n=getInt("WashingMachine","washing-machine-starRating"),i,r;document.getElementById("sixstarid").value=n*2;var u=$("#washing-machine-capacity-dropdown").val(),f=$("#washing-machine-warm-wash-dropdown").val(),e=parseInt(0)+parseInt(f),o=getInt("WashingMachine","washing-machine-price"),t=0;return t=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),i=$("#hdnAverageStarRatingValue").val(),r=$("#ddlType").val(),calculateClothesWasherWarmWashing(n,u,e,o,t,i,0,r)}function calculateWashingMachine(n,t,i,r,u){var f,e,o,s,h,l;f=r==null||r==""?getInt("WashingMachine","washing-machine-energyConsumsion"):r;e=n=="0"||n==null||n==""?getInt("WashingMachine","washing-machine-starRating"):n;o=t==null||t==""?getIntForPurchasePrice("WashingMachine","washing-machine-price"):t;s=i==null||i==""?getInt("WashingMachine","washing-machine-capacity"):i;h=u==null||u==""?$("#ddlType").val():u;var a=$("#washing-machine-warm-wash-dropdown").val(),v=parseInt(0)+parseInt(a),c=0;return c=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),l=$("#hdnAverageStarRatingValue").val(),calculateClothesWasherWarmWashing(e,s,v,o,c,l,f,h)}function calculateWashingMachine2(n,t,i,r,u){var f,e,o,s,c;f=n=="0"||n==null||n==""?getInt("WashingMachine","stars")/2:n;e=t==null||t==""?getInt("WashingMachine","washing-machine-price"):t;o=i==null||i==""?getInt("WashingMachine","washing-machine-capacity"):i;s=u==null||u==""?$("#ddlType").val():u;var l=$("#washing-machine-warm-wash-dropdown").val(),a=parseInt(0)+parseInt(l),h=0;return h=$("#hdnisURLorIframe").val()==1?$("#hdnPurchasePriceValue").val():$("#hdnPurchasePriceDefaultValue").val(),c=$("#hdnAverageStarRatingValue").val(),calculateClothesWasherWarmWashing(f,o,a,e,h,c,r,s)}function calculateClothesWasherWarmWashing(n,t,i,r,u,f,e,o){var h=i*52.143,k=getInt("WashingMachine","washer-BaseEnergyConsumsionFactor")*h/365,d=1.03,g=.75,nt=.75,s=getInt("WashingMachine","washer-ReductionInEnergyUsePerStar")/100,ut=e,ft=$("#isBaseEnergy").val(),et=t*k,ot=Math.round(et).toFixed(2),st=.1*d*t*h/1.08,ht=parseFloat(st).toFixed(2),l;if(ft==0){var ct=parseFloat(ot)+parseFloat(ht),v=$("#hdnRatedCapacityDefaultValue").val(),lt=.1*d*v*h/1.08,at=parseFloat(lt).toFixed(2),b=parseFloat(Math.round(v*k).toFixed(2))+parseFloat(at),tt=.1*g*t*h/1.08,it=tt.toFixed(2),vt=.1*nt*t*h/1.08,p=vt.toFixed(2),yt=.1*g*v*h/1.08,wt=yt.toFixed(2),pt=.1*nt*v*h/1.08,rt=pt.toFixed(2),bt=h*.15,a=ct,kt=tt,c,w,y=0;o=="Front"?(c=calculateLinearReduction(n,a,s)-p,y=p,w=$("#hdnFlagCompareModel").val()=="false"?calculateLinearReduction(f,a,s)-p:calculateLinearReduction(f,b,s)-rt):(c=calculateLinearReduction(n,a,s)-it,y=p,w=$("#hdnFlagCompareModel").val()=="false"?calculateLinearReduction(f,a,s)-it:calculateLinearReduction(f,b,s)-rt);c=(a-y)*Math.pow(1-s,n-1);w=$("#hdnFlagCompareModel").val()=="false"?(a-y)*Math.pow(1-s,f-1):(b-y)*Math.pow(1-s,f-1);l=n>=3.5}else return createResultForEnergyConsumsionWasher("WashingMachine",ut,i,r,n);$("#hdnFlagCompareModel").val()=="false"?(createResultForWasher("WashingMachine",c,l,r,n,t),createResultForWasherAvg("WashingMachine",w,l,n,r,u,t,f)):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?(createResultForWasher("WashingMachine",c,l,r,n,t),createResultForWasherModel2("WashingMachine",c,l,r,u,n,v)):$("#hdnCalculateModel").val()=="model1"?createResultForWasher("WashingMachine",c,l,r,n,t):createResultForWasherModel2("WashingMachine",c,l,r,u,n,t)}function calculateClothesWasher(n,t,i){var r=i*52.143,o=getInt("WashingMachine","washer-BaseEnergyConsumsionFactor")*r/365,s=getInt("WashingMachine","washer-ReductionInEnergyUsePerStar")/100,u,e=getInt("WashingMachine","washing-machine-energyConsumsion");if(e==undefined)u=t*o;else return createResultForEnergyConsumsionWasher("WashingMachine",e,i);var h=.1*1.03*t*365/1.08,c=u+h,f=r*.15,l=.1*.75*t*365/1.08,a=.1*.68*t*365/1.08,k=u-f,v=c*(r/365),y=n>=3?a:l,p=calculateLinearReduction(n,v,s)-y*r/365,w=f+(p-f)*(1-.6),b=n>=3.5;return createResult("WashingMachine",w,b)}function calculateHeatPump(){var u=getInt("HeatPump","stars")/2,n,t,i,r,f=getInt("HeatPump","air-conditinoer");return f=="Cooling"?(n=125,i=getInt("HeatPump","cooling-pump-months"),r=getInt("HeatPump","cooling-pump-hours"),t=getInt("HeatPump","cooling-pump-area")*n):(n=100,i=getInt("HeatPump","heating-pump-months"),r=getInt("HeatPump","heating-pump-hours"),t=getInt("HeatPump","heating-pump-area")*n),calculateHeatPumpWithParameters(u,n,i,r,t)}function calculateHeatPumpWithParameters(n,t,i,r,u){var o=[2.75,3,3.25,3.5,3.75,4,4.25,4.5,4.75,5,5.25],s=u*t,f=2.5,f=n>=f,e=o[(n-1)*2];e||(e=o[0]);var h=i*r*30,c=s/e*h,l=s/5*h;createResult("HeatPump",c,f);createResultForAvg("HeatPump",l,f)}function initRCC(){calculateDishwasherWithParameters(3,12,7);initSliders("fridge-volume-fridge",269,0,600,1);initSliders("fridge-volume-freezer",99,0,600,1);initSliders("fridge-freezer-volume-fridge",205,10,600,1);initSliders("fridge-freezer-volume-freezer",85,0,600,1);initSliders("freezer-volume-freezer",290,0,600,1);calculateSingleDoorRefrigerator(3,100,0);$jq(".fridge-volume-fridge-field").parent().show();$jq(".fridge-volume-freezer-field").parent().show();$jq(".freezer-volume-freezer-field").parent().hide();$jq(".fridge-freezer-volume-fridge-field").parent().hide();$jq(".fridge-freezer-volume-freezer-field").parent().hide();initSliders("clothes-dryer-capacity",10,4,10,1);initSliders("clothes-dryer-cooler",8,1,21,1);initSliders("clothes-dryer-warmer",0,0,21,1);calculateClothesDryerWithParameters(3,5,2,0);initSliders("washing-machine-capacity",6,4,10,.5);initSliders("washing-machine-use",7,1,21,1);calculateClothesWasher(3,6,7);calculateHeatPumpWithParameters(3,235,6,6);initSliders("television-size",42,20,60,1)}function addCommas(n){n+="";x=n.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";for(var t=/(\d+)(\d{3})/;t.test(x1);)x1=x1.replace(t,"$1,$2");return x1+x2}function supportsCanvas(){var n=document.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))}function showInfo(n,t,i){$jq("#modal-dialog").dialog({autoOpen:!1,bgiframe:!1,resizable:!1,modal:!0,position:"center",closeText:"close",width:460,close:function(){$jq("#loader").hide()}});t!=null&&$jq("#modal-dialog").html(t);i&&$jq("#modal-dialog").dialog("option","buttons",i);$jq("#modal-dialog").dialog("option","title",n);$jq("#modal-dialog").dialog("open");$jq("#modal-dialog").parent().attr("id","modal-dialog-wrapper");$jq("#modal-dialog").css("height","auto")}function updateEnergyStars(n,t){var l=$jq(n).width(),o=$jq(n).height(),s=l/2,u,r,e,h,i;if($.browser.mozilla?(u=s-(t.offsetX||t.clientX-$(t.target).offset().left),r=o-(t.offsetY||t.clientY-$(t.target).offset().top),r=r-$(window).scrollTop()):(u=s-(t.offsetX||t.clientX-$(t.target).offset().left),r=o-(t.offsetY||t.clientY-$(t.target).offset().top)),e=Math.sqrt(u*u+r*r),!(e<44)&&!(e>86)){h=Math.atan(u/-r)*180/Math.PI+90;i=Math.ceil((h-7.5)/15);i<3?i=2:i>11&&(i=12);$jq(n).parent().find(".stars-field").val()!=i&&($jq(n).parent().find(".stars-field").val(i),$jq(n).parent().find(".energy-rating-wrapper").attr("class","energy-rating-wrapper"),$jq(n).parent().find(".energy-rating-wrapper").addClass("er"+i),update(n));var a=i/2,c=$jq(n).parents(".result-section").attr("rel"),f=c.toLowerCase()+"-starRating";f=="clothesdryer-starRating"&&(f="Dryer-starRating");f=="washingmachine-starRating"&&(f="washing-machine-starRating");initSlidersForStarSliderWthLabel(f,a,1,6,.5,c)}}function initSlidersForStarSlider(n,t,i,r,u,f){var e=parseInt(i),o=parseInt(r);$jq("#"+n+"-slider").slider({range:"min",value:t,min:e,max:o,step:u,animate:!0,slide:function(t,i){$jq("#"+n+"-label span").html(i.value);$jq("."+n+"-field").val(i.value);updateStarSliderRating(this);updateStarUsingslider(i.value,f)}})}function initSlidersForStarSliderWthLabel(n,t,i,r,u,f){$jq("#"+n+"-slider").slider({range:"min",value:t,min:i,max:r,step:u,slide:function(t,i){$jq("#"+n+"-label span").html(i.value);$jq("."+n+"-field").val(i.value);updateStarSliderRating(this);updateStarUsingslider(i.value,f)}});$jq("#result-"+f).each(function(){$jq("#"+n+"-label span").html(t)})}function updateLabelOfStarSlider(n,t,i,r,u,f){$jq("#"+n+"-slider").slider({range:"min",value:t,min:i,max:r,step:u,slide:function(t,i){$jq("#"+n+"-label span").html(i.value);$jq("."+n+"-field").val(i.value);updateStarSliderRating(this);updateStarUsingslider(i.value,f)}})}function updateStarUsingslider(n,t){n=n*2;$jq("#result-"+t).each(function(){$jq(this).find(".energy-rating-wrapper").attr("class","energy-rating-wrapper");$jq(this).find(".energy-rating-wrapper").addClass("er"+n)})}function updateStarSliderRating(node){var rel=$jq(node).parents(".result-section").attr("rel");rel&&rel!=""&&eval("calculate"+rel+"slider();")}function initSliders(n,t,i,r,u){var f=parseInt(i),e=parseInt(r);$jq("#"+n+"-slider").slider({range:"min",value:t,min:f,max:e,step:u,animate:!0,slide:function(t,i){$jq("#"+n+"-label span").html(i.value);$jq("#"+n+"-dropdown").val(i.value);$jq("."+n+"-field").val(i.value);update(this)}})}function initDropdown(n){$jq("#"+n+"-dropdown").bind("change keyup",function(){var t=$jq("#"+n+"-dropdown").val();$jq("#"+n+"-label span").html(t);$jq("."+n+"-field").val(t);update(this)})}function initStarDropdown(n,t){$jq("#"+n+"-dropdown").bind("change keyup",function(){var i=$jq("#"+n+"-dropdown").val();$jq("#"+n+"-label span").html(i);$jq("."+n+"-field").val(i);updateStarSliderRating(this);updateStarUsingslider(i,t)})}function update(node){var rel=$jq(node).parents(".result-section").attr("rel");rel&&rel!=""&&eval("calculate"+rel+"();")}function getInt(n,t){return $jq("#result-"+n).find("."+t+"-field").val()}function getIntForPurchasePrice(n,t){return $jq("#result-"+n).find("."+t+"-field").val()}function calculateLinearReductionAndResult(n,t,i,r,u,f,e,o,s,h,c){var l=calculateLinearReduction(t,i,r),a=calculateLinearReduction(o,s,r);n=="ClothesDryer"||n=="Dishwasher"?$("#hdnFlagCompareModel").val()=="false"?(createResult(n,l,t>=u,f,e,t,h),createResultForAvg(n,a,t>=u,t,f,e,h,o)):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?(createResult(n,l,t>=u,f,e,t,h),createResultForModel2(n,l,t>=u,t,f,e,c)):$("#hdnCalculateModel").val()=="model1"?createResult(n,l,t>=u,f,e,t,h):createResultForModel2(n,l,t>=u,t,f,e,h):(createResult(n,l,t>=u,f,e),createResultForModel2(n,l,t>=u,f,e),createResultForAvg(n,a,t>=u,t,f,e,h,o))}function calculateLinearReduction(n,t,i){return t*Math.pow(1-i,n-1)}function createResult(n,t,i,r,u,f,e){var h=getInt("ClothesDryer","dryer-generalTariff"),c=getInt("Dishwasher","dishwasher-generalTariff"),v,s;h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var o=t*generalTariffDollarsPerkWh,l=o/1,a=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);v=PurchasePrice+l*10;s=v.toFixed(2);$jq("#result-"+n).each(function(){var c,h;$("#hdnFlagCompareModel").val()=="false"?($jq(this).find("#youStarRating").html("Model 2<br/>"+parseFloat(f)+" star"),$jq(this).find("#youStarRatingForPrint").html("Model 2<br/>"+parseFloat(f)+" star"),$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1<br/>"+parseFloat(f)+" star"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1<br/>"+parseFloat(f)+" star")):n=="Dishwasher"?($jq(this).find("#youEnergyConsumptionMobile").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#youStarRating").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#youStarRatingForPrint").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#youEnergyConsumptionDesktop").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#youTwoLineMobile").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" places")):($jq(this).find("#youEnergyConsumptionMobile").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#youStarRating").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#youStarRatingForPrint").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#youEnergyConsumptionDesktop").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#youTwoLineMobile").html(" Model 1<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star");$jq(this).find(".annual-energy-use span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas((o/1).toFixed(2)));$jq(this).find(".greenhouse-gas-emissions span").html(Math.round(a*100)/100+" tonnes");$jq(this).find(".tenrunning-cost span").html("$"+addCommas((l*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(s));runningCost=(Math.round(o*10)*1).toFixed(2);TenYearCost=s;M1_10yearcost=(Math.round(o*10)*1).toFixed(2);M1_totalcost=s;$("#hdnFlagCompareModel").val()=="true"&&(FlagModel2=="model2_star"?(avgTenYearCost=M2_totalcost,avgRunningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(avgTenYearCost=M2_E_totalcost,avgRunningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(avgTenYearCost=M2_M_totalcost,avgRunningCost=M2_M_10yearcost),$("#hdnSettingModel1").val()=="model1_star"?FlagModel1="model1_star":$("#hdnSettingModel1").val()=="model1_model"?FlagModel1="model1_model":$("#hdnSettingModel1").val()=="model1_consumption"&&(FlagModel1="model1_consumption"),c=Math.round(TenYearCost-avgTenYearCost),u=parseInt($("#hdnPurchasePrice_Model2").val()),h=parseFloat((u-r)/((runningCost-avgRunningCost)/10)),isNaN(h)&&(h=0),c>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?h!="Infinity"&&h>0&&h<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(h.toFixed(1)),$jq(this).find("#paybacksaveIdForPrint span").html(h.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&r>u&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):c==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(h=parseFloat((r-u)/((avgRunningCost-runningCost)/10)),isNaN(h)&&(h=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?h!="Infinity"&&h>0&&h<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(h.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(h.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r<=u&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")),$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(a*100)/100+" tonnes"));i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForAvg(n,t,i,r,u,f,e,o){var c=getInt("ClothesDryer","dryer-generalTariff"),l=getInt("HeatPump","airConditioner-generalTariff"),a=getInt("WashingMachine","washer-generalTariff"),v=getInt("FridgeFreezer","fridge-generalTariff"),y=getInt("Dishwasher","dishwasher-generalTariff"),w,h;c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);v!=undefined&&(generalTariffDollarsPerkWh=v/100);y!=undefined&&(generalTariffDollarsPerkWh=y/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var s=t*generalTariffDollarsPerkWh,p=s/1,b=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(u);isNaN(PurchasePrice)&&(PurchasePrice=0);w=parseFloat(PurchasePrice)+p*10;h=w.toFixed(2);$jq("#result-"+n).each(function(){$jq(this).find(".you_value span").html(" Model 2<br/>"+r+" star");$("#ddlBased").val()==1?$jq(this).find(".star-rating-Avg span").html("-"):$jq(this).find(".star-rating-Avg span").html(parseFloat(o)+" star");$jq(this).find(".annual-energy-Avg span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost-avg span").html("$"+addCommas((s/1).toFixed(2)));$jq(this).find(".tenrunning-cost-avg span").html("$"+addCommas((p*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-avg span").html("$"+addCommas(parseFloat(f).toFixed(2)));$jq(this).find(".costofownership-cost-avg span").html("$"+addCommas(h));avgRunningCost=(Math.round(s*10)*1).toFixed(2);avgTenYearCost=h;var e=Math.round(avgTenYearCost-TenYearCost),n=parseFloat((u-f)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);e>=0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$jq(this).find(".yousave_text span").html("You Save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>=0?($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide())):($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","youloss_text"),$("#youSaveTdForPrint").attr("class","youloss_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$jq(this).find(".youloss_text span").html("You Lose* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))));$jq(this).find("#over10yearsId").html(" over 10 years");$jq(this).find("#over10yearsIdForPrint").html(" over 10 years");$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(b*100)/100+" tonnes");i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForModel2(n,t,i,r,u,f,e){var h,c,a,s;$("#hdnFlagFirstTimeCompare").val("false");h=getInt("ClothesDryer","dryer-generalTariff");c=getInt("Dishwasher","dishwasher-generalTariff");h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var o=t*generalTariffDollarsPerkWh,l=o/1,v=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(u);isNaN(PurchasePrice)&&(PurchasePrice=0);a=PurchasePrice+l*10;s=a.toFixed(2);$jq("#result-"+n).each(function(){var c,h;n=="Dishwasher"?($jq(this).find("#model2_header").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find("#model2_headerForPrint").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" places"),$jq(this).find(".you_value span").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" places"),$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -"),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"))):($jq(this).find("#model2_header").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find("#model2_headerForPrint").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" kg"),$jq(this).find(".you_value span").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(e.toString())+" kg"),$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -"),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youTwoLineMobile span").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh")));$("#ddlModelCompare option:selected").val()==1&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"));$jq(this).find(".annual-energy-model2 span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas((o/1).toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((l*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(s));avgRunningCost=(Math.round(o*10)*1).toFixed(2);avgTenYearCost=s;M2_10yearcost=(Math.round(o*10)*1).toFixed(2);M2_totalcost=s;FlagModel1=="model1_star"?(TenYearCost=M1_totalcost,runningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(TenYearCost=M1_E_totalcost,runningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(TenYearCost=M1_M_totalcost,runningCost=M1_M_10yearcost);FlagModel2="model2_star";c=Math.round(TenYearCost-avgTenYearCost);f=parseInt($("#hdnPurchasePrice_Model1").val());h=parseFloat((u-f)/((runningCost-avgRunningCost)/10));isNaN(h)&&(h=0);c>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?h!="Infinity"&&h>0&&h<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(h.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(h.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&u<=f&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):c==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(h=parseFloat((f-u)/((avgRunningCost-runningCost)/10)),isNaN(h)&&(h=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?h!="Infinity"&&h>0&&h<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(h.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(h.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&u>f&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"));$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(v*100)/100+" tonnes");i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForEnergyConsumsion(n,t,i){var u=getInt("ClothesDryer","dryer-generalTariff"),f=getInt("HeatPump","airConditioner-generalTariff"),e=getInt("WashingMachine","washer-generalTariff"),o=getInt("FridgeFreezer","fridge-generalTariff"),s=getInt("Dishwasher","dishwasher-generalTariff"),r;u!=undefined&&(generalTariffDollarsPerkWh=u/100);f!=undefined&&(generalTariffDollarsPerkWh=f/100);e!=undefined&&(generalTariffDollarsPerkWh=e/100);o!=undefined&&(generalTariffDollarsPerkWh=o/100);s!=undefined&&(generalTariffDollarsPerkWh=s/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);r=t*generalTariffDollarsPerkWh;$jq("#result-"+n).each(function(){$("#ddlBased").val()==1?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(stars)+" star");$jq(this).find(".annual-energy-use span").html(addCommas(t.toFixed(2))+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(r.toFixed(2)));$jq(this).find(".fiverunning-cost span").html("$"+addCommas((r*5).toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((r*10).toFixed(2)));TenYearCost=(Math.round(r*10)*1).toFixed(2);i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForEnergyConsumsionFridge(n,t){var r=getInt("ClothesDryer","dryer-generalTariff"),u=getInt("HeatPump","airConditioner-generalTariff"),f=getInt("WashingMachine","washer-generalTariff"),e=getInt("FridgeFreezer","fridge-generalTariff"),o=getInt("Dishwasher","dishwasher-generalTariff"),i;r!=undefined&&(generalTariffDollarsPerkWh=r/100);u!=undefined&&(generalTariffDollarsPerkWh=u/100);f!=undefined&&(generalTariffDollarsPerkWh=f/100);e!=undefined&&(generalTariffDollarsPerkWh=e/100);o!=undefined&&(generalTariffDollarsPerkWh=o/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);i=t*generalTariffDollarsPerkWh;$jq("#result-"+n).each(function(){$jq(this).find(".annual-energy-use span").html(addCommas(t)+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(i.toFixed(2)));$jq(this).find(".fiverunning-cost span").html("$"+addCommas((i*5).toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((i*10).toFixed(2)));TenYearCost=(Math.round(i*10)*1).toFixed(2)})}function createResultForEnergyConsumsionDryer(n,t,i,r){var f=getInt("ClothesDryer","dryer-generalTariff"),e=getInt("HeatPump","airConditioner-generalTariff"),o=getInt("WashingMachine","washer-generalTariff"),s=getInt("FridgeFreezer","fridge-generalTariff"),h=getInt("Dishwasher","dishwasher-generalTariff"),u,c,l;f!=undefined&&(generalTariffDollarsPerkWh=f/100);e!=undefined&&(generalTariffDollarsPerkWh=e/100);o!=undefined&&(generalTariffDollarsPerkWh=o/100);s!=undefined&&(generalTariffDollarsPerkWh=s/100);h!=undefined&&(generalTariffDollarsPerkWh=h/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);u=t*i*generalTariffDollarsPerkWh;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);c=PurchasePrice+Math.round(u*10)*1;l=c.toFixed(2);$jq("#result-"+n).each(function(){$jq(this).find(".annual-energy-use span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".fiverunning-cost span").html("$"+addCommas((u*5).toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((u*10).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(l));TenYearCost=(Math.round(u*10)*1).toFixed(2)})}function createResultForEnergyConsumsionDishwasher(n,t,i,r,u){var s=getInt("ClothesDryer","dryer-generalTariff"),h=getInt("HeatPump","airConditioner-generalTariff"),c=getInt("WashingMachine","washer-generalTariff"),l=getInt("FridgeFreezer","fridge-generalTariff"),a=getInt("Dishwasher","dishwasher-generalTariff"),f,o,v,e;s!=undefined&&(generalTariffDollarsPerkWh=s/100);h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);f=t/7*i*generalTariffDollarsPerkWh;o=f/1;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);v=PurchasePrice+o*10;e=v.toFixed(2);$jq("#hdnFlagCompareModel").val()=="false"?$jq("#result-"+n).each(function(){$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1");$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1");$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e));TenYearCost=e}):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?($jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e))}),$jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-model2 span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(e))}),avgRunningCost=(Math.round(f*10)*1).toFixed(2),avgTenYearCost=e,runningCost=(Math.round(f*10)*1).toFixed(2),TenYearCost=e,M1_E_10yearcost=(Math.round(f*10)*1).toFixed(2),M1_E_totalcost=e,$("#hdnFlagFirstTimeCompare").val("false")):$("#hdnFlagCompareModel").val()=="true"&&($("#hdnCalculateModel").val()=="model1"?$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==0&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"));$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e));avgRunningCost=(Math.round(f*10)*1).toFixed(2);avgTenYearCost=e;M1_E_10yearcost=(Math.round(f*10)*1).toFixed(2);M1_E_totalcost=e;M1_M_10yearcost=(Math.round(f*10)*1).toFixed(2);M1_M_totalcost=e;FlagModel2=="model2_star"?(TenYearCost=M2_totalcost,runningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(TenYearCost=M2_E_totalcost,runningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(TenYearCost=M2_M_totalcost,runningCost=M2_M_10yearcost);FlagModel1="model1_consumption";var h=Math.round(avgTenYearCost-TenYearCost),s=parseInt($("#hdnPurchasePrice_Model2").val()),n=parseFloat((s-r)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r>s&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((r-s)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").hide(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}):$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-model2 span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(e));runningCost=(Math.round(f*10)*1).toFixed(2);TenYearCost=e;M2_E_10yearcost=(Math.round(f*10)*1).toFixed(2);M2_E_totalcost=e;M2_M_10yearcost=(Math.round(f*10)*1).toFixed(2);M2_M_totalcost=e;FlagModel1=="model1_star"?(avgTenYearCost=M1_totalcost,avgRunningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost);FlagModel2="model2_consumption";var h=Math.round(TenYearCost-avgTenYearCost),s=parseInt($("#hdnPurchasePrice_Model1").val()),n=parseFloat((r-s)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&s<r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((s-r)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&s>=r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}))}function createResultForEnergyConsumsion_onlyForDryer(n,t,i,r,u,f){var h=getInt("ClothesDryer","dryer-generalTariff"),e,s,c,o;h!=undefined&&(generalTariffDollarsPerkWh=h/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);e=t*i*generalTariffDollarsPerkWh;s=e/1;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);c=PurchasePrice+s*10;o=c.toFixed(2);$("#hdnFlagCompareModel").val()=="false"?$jq("#result-"+n).each(function(){$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1");$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1");$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(e.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(o));TenYearCost=o}):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?($jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(e.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(o))}),$jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star");$jq(this).find(".annual-energy-model2 span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(e.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(o))}),avgRunningCost=(Math.round(e*10)*1).toFixed(2),avgTenYearCost=o,runningCost=(Math.round(e*10)*1).toFixed(2),TenYearCost=o,M1_E_10yearcost=(Math.round(e*10)*1).toFixed(2),M1_E_totalcost=o,$("#hdnFlagFirstTimeCompare").val("false")):$("#hdnFlagCompareModel").val()=="true"&&($("#hdnCalculateModel").val()=="model1"?$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==0&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(f)+" star"));$jq(this).find(".annual-energy-use span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(e.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(o));avgRunningCost=(Math.round(e*10)*1).toFixed(2);avgTenYearCost=o;M1_E_10yearcost=(Math.round(e*10)*1).toFixed(2);M1_E_totalcost=o;M1_M_10yearcost=(Math.round(e*10)*1).toFixed(2);M1_M_totalcost=o;FlagModel2=="model2_star"?(TenYearCost=M2_totalcost,runningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(TenYearCost=M2_E_totalcost,runningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(TenYearCost=M2_M_totalcost,runningCost=M2_M_10yearcost);FlagModel1="model1_consumption";var h=Math.round(avgTenYearCost-TenYearCost),u=parseInt($("#hdnPurchasePrice_Model2").val()),n=parseFloat((u-r)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r>u&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((r-u)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}):$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlModelCompare option:selected").val()==1&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star"));$jq(this).find(".annual-energy-model2 span").html(addCommas((t*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(e.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(o));runningCost=(Math.round(e*10)*1).toFixed(2);TenYearCost=o;M2_E_10yearcost=(Math.round(e*10)*1).toFixed(2);M2_E_totalcost=o;M2_M_10yearcost=(Math.round(e*10)*1).toFixed(2);M2_M_totalcost=o;FlagModel1=="model1_star"?(avgTenYearCost=M1_totalcost,avgRunningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost);FlagModel2="model2_consumption";var h=Math.round(TenYearCost-avgTenYearCost),u=parseInt($("#hdnPurchasePrice_Model1").val()),n=parseFloat((r-u)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&u<r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((u-r)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&u>=r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}))}function createResultForTVComputer(n,t,i,r,u){var s=getInt("TVComputer","TVComputer-generalTariff"),c,f;s!=undefined&&(generalTariffDollarsPerkWh=s/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var e=t*generalTariffDollarsPerkWh,o=e/1,h=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(i);isNaN(PurchasePrice)&&(PurchasePrice=0);c=PurchasePrice+o*10;f=c.toFixed(2);$jq("#result-"+n).each(function(){var s,n;$("#hdnFlagCompareModel").val()=="false"?($jq(this).find("#youStarRating").html("Model 2<br/>"+parseFloat(r)+" star"),$jq(this).find("#youStarRatingForPrint").html("Model 2<br/>"+parseFloat(r)+" star"),$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1<br/>"+parseFloat(r)+" star"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1<br/>"+parseFloat(r)+" star")):($jq(this).find("#youEnergyConsumptionMobile").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'),$jq(this).find("#youStarRating").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'),$jq(this).find("#youStarRatingForPrint").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'),$jq(this).find("#youEnergyConsumptionDesktop").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'),$jq(this).find("#youTwoLineMobile").html(" Model 1<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"'));$("#ddlBased").val()==1?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star");$jq(this).find(".annual-energy-use span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas((o/1).toFixed(2)));$jq(this).find(".greenhouse-gas-emissions span").html(Math.round(h*100)/100+" tonnes");$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(f));runningCost=(Math.round(e*10)*1).toFixed(2);TenYearCost=f;M1_10yearcost=(Math.round(e*10)*1).toFixed(2);M1_totalcost=f;$("#hdnFlagCompareModel").val()=="true"&&(FlagModel2=="model2_star"?(avgTenYearCost=M2_totalcost,avgRunningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(avgTenYearCost=M2_E_totalcost,avgRunningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(avgTenYearCost=M2_M_totalcost,avgRunningCost=M2_M_10yearcost),$("#hdnSettingModel1").val()=="model1_star"?FlagModel1="model1_star":$("#hdnSettingModel1").val()=="model1_model"?FlagModel1="model1_model":$("#hdnSettingModel1").val()=="model1_consumption"&&(FlagModel1="model1_consumption"),s=Math.round(TenYearCost-avgTenYearCost),purchasePriceDefaultValue=$("#ddlModelType option:selected").val()=="0"?$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==0?parseFloat($("#hdnPurchasePrice_Model2").val()):$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==1?$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==0?$("#TVComputer-pricetv-dropdown").val():$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==1?parseFloat($("#hdnPurchasePriceComputer_Model2").val()):$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==1?$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==0?$("#TVComputer-pricetv-dropdown").val():$("#TVComputer-pricetv-dropdown").val(),n=parseFloat((purchasePriceDefaultValue-i)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),s>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&i>purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):s==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html(""),$("#paybackId").hide(),$("#paybackIdForPrint").hide()):(n=parseFloat((i-purchasePriceDefaultValue)/((avgRunningCost-runningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&i<=purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")),$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(h*100)/100+" tonnes"))})}function createResultForTVComputerAvg(n,t,i,r,u,f,e){var h=getInt("TVComputer","TVComputer-generalTariff"),l,s;h!=undefined&&(generalTariffDollarsPerkWh=h/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var o=t*generalTariffDollarsPerkWh,c=o/1,a=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);l=PurchasePrice+c*10;s=l.toFixed(2);$jq("#result-"+n).each(function(){$jq(this).find(".you_value span").html(" Model 2<br/>"+i+" star");$("#ddlBased").val()==1?$jq(this).find(".star-rating-Avg span").html("-"):$jq(this).find(".star-rating-Avg span").html(parseFloat(e)+" star");$jq(this).find(".annual-energy-Avg span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost-avg span").html("$"+addCommas((o/1).toFixed(2)));$jq(this).find(".tenrunning-cost-avg span").html("$"+addCommas((c*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-avg span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-avg span").html("$"+addCommas(s));avgRunningCost=(Math.round(o*10)*1).toFixed(2);avgTenYearCost=s;var f=Math.round(avgTenYearCost-TenYearCost),n=parseFloat((r-u)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);f>=0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$jq(this).find(".yousave_text span").html("you save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>=0?($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$jq(this).find("#paybackId span").html("Payback in "),$jq(this).find("#paybackIdForPrint span").html("Payback in "),$jq(this).find("#paybacksaveId span").html(n.toFixed(2)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(2)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide())):($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","youloss_text"),$("#youSaveTdForPrint").attr("class","youloss_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$jq(this).find(".youloss_text span").html("You Lose* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))));$jq(this).find("#over10yearsId").html(" over 10 years");$jq(this).find("#over10yearsIdForPrint").html(" over 10 years");$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(a*100)/100+" tonnes")})}function createResultForTVComputer_Model2(n,t,i,r,u){var o,h,e;$("#hdnFlagFirstTimeCompare").val("false");o=getInt("TVComputer","TVComputer-generalTariff");o!=undefined&&(generalTariffDollarsPerkWh=o/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var f=t*generalTariffDollarsPerkWh,s=f/1,c=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(i);isNaN(PurchasePrice)&&(PurchasePrice=0);h=PurchasePrice+s*10;e=h.toFixed(2);$jq("#result-"+n).each(function(){var o,n;$("#model2_header").html("Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"');$("#model2_headerForPrint").html("Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"');$jq(this).find(".you_value span").html(" Model 2<br/>"+parseFloat(r)+" star, "+parseFloat(u)+'"');$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh")):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==1&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnModelType_Model2").val()=="0"?$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameTVModel2").val()=="Please enter"||$("#hdnMakeNameTVModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameComputerModel2").val()=="Please enter"||$("#hdnMakeNameComputerModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"));t==0?$jq(this).find(".annual-energy-model2 span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-model2 span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas((f/1).toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((s*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(e));avgRunningCost=(Math.round(f*10)*1).toFixed(2);avgTenYearCost=e;M2_10yearcost=(Math.round(f*10)*1).toFixed(2);M2_totalcost=e;FlagModel1=="model1_star"?(TenYearCost=M1_totalcost,runningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(TenYearCost=M1_E_totalcost,runningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(TenYearCost=M1_M_totalcost,runningCost=M1_M_10yearcost);FlagModel2="model2_star";o=Math.round(TenYearCost-avgTenYearCost);purchasePriceDefaultValue=$("#ddlModelType option:selected").val()=="0"?$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==0?parseFloat($("#hdnPurchasePrice_Model1").val()):$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==1?parseFloat($("#hdnPurchasePriceComputer_Model1").val()):$("#TVComputer-pricetv-dropdown").val();n=parseFloat((i-purchasePriceDefaultValue)/((runningCost-avgRunningCost)/10));isNaN(n)&&(n=0);o>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&i<=purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):o==0?($jq(this).find(".yousave_text span").html(""),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html(""),$("#paybackId").hide(),$("#paybackIdForPrint").hide()):(n=parseFloat((purchasePriceDefaultValue-i)/((avgRunningCost-runningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&i>=purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"));$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(c*100)/100+" tonnes")})}function createResultForEnergyConsumsionTVComputer(n,t,i,r){var o=getInt("TVComputer","TVComputer-generalTariff"),u,e,s,f;o!=undefined&&(generalTariffDollarsPerkWh=o/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);u=t*generalTariffDollarsPerkWh;e=u/1;PurchasePrice=parseFloat(i);isNaN(PurchasePrice)&&(PurchasePrice=0);s=PurchasePrice+e*10;f=s.toFixed(2);$("#hdnFlagCompareModel").val()=="false"?$jq("#result-"+n).each(function(){$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1");$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1");$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star");t==0?$jq(this).find(".annual-energy-use span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-use span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((e*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(f));TenYearCost=f}):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?($jq("#result-"+n).each(function(){$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh")):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star");t==0?$jq(this).find(".annual-energy-use span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-use span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((e*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(f))}),$jq("#result-"+n).each(function(){$("#hdnModelType_Model2").val()=="0"?$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameTVModel2").val()=="Please enter"||$("#hdnMakeNameTVModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoTVModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoTVModel2").val()+"")):$("#hdnSettingModel2").val()=="model2_consumption"&&($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh")):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameComputerModel2").val()=="Please enter"||$("#hdnMakeNameComputerModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoComputerModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoComputerModel2").val()+"")):$("#hdnSettingModel2").val()=="model2_consumption"&&($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameTVModel2").val()=="Please enter"||$("#hdnMakeNameTVModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameComputerModel2").val()=="Please enter"||$("#hdnMakeNameComputerModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star");t==0?$jq(this).find(".annual-energy-model2 span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-model2 span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((e*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(f))}),avgRunningCost=(Math.round(u*10)*1).toFixed(2),avgTenYearCost=f,runningCost=(Math.round(u*10)*1).toFixed(2),TenYearCost=f,M1_E_10yearcost=(Math.round(u*10)*1).toFixed(2),M1_E_totalcost=f,$("#hdnFlagFirstTimeCompare").val("false")):$("#hdnFlagCompareModel").val()=="true"&&($("#hdnCalculateModel").val()=="model1"?$jq("#result-"+n).each(function(){var s,o,n;$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoTVModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh")):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoComputerModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==0&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnModelType_Model1").val()=="0"?$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameTVModel1").val()=="Please enter"||$("#hdnMakeNameTVModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameComputerModel1").val()=="Please enter"||$("#hdnMakeNameComputerModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(r)+" star"));t==0?$jq(this).find(".annual-energy-use span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-use span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((e*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(f));avgRunningCost=(Math.round(u*10)*1).toFixed(2);avgTenYearCost=f;M1_E_10yearcost=(Math.round(u*10)*1).toFixed(2);M1_E_totalcost=f;M1_M_10yearcost=(Math.round(u*10)*1).toFixed(2);M1_M_totalcost=f;FlagModel2=="model2_star"?(TenYearCost=M2_totalcost,runningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(TenYearCost=M2_E_totalcost,runningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(TenYearCost=M2_M_totalcost,runningCost=M2_M_10yearcost);FlagModel1="model1_consumption";s=Math.round(avgTenYearCost-TenYearCost);o=0;o=$("#ddlModelType option:selected").val()=="0"?$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==0?parseFloat($("#hdnPurchasePrice_Model2").val()):$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==1?$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==0?$("#TVComputer-pricetv-dropdown").val():$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==1?parseFloat($("#hdnPurchasePriceComputer_Model2").val()):$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==1?$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==0?$("#TVComputer-pricetv-dropdown").val():$("#TVComputer-pricetv-dropdown").val();n=parseFloat((o-i)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);s>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&i>o&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):s==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html(""),$("#paybackId").hide(),$("#paybackIdForPrint").hide()):(n=parseFloat((i-o)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}):$jq("#result-"+n).each(function(){var s,o,n;$("#hdnModelType_Model2").val()=="0"?$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameTVModel2").val()=="Please enter"||$("#hdnMakeNameTVModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoTVModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoTVModel2").val()+"")):$("#hdnSettingModel2").val()=="model2_consumption"&&($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh")):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameComputerModel2").val()=="Please enter"||$("#hdnMakeNameComputerModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoComputerModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoComputerModel2").val()+"")):$("#hdnSettingModel2").val()=="model2_consumption"&&($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRatingComputer_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnModelType_Model2").val()=="0"?$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameTVModel2").val()=="Please enter"||$("#hdnMakeNameTVModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameComputerModel2").val()=="Please enter"||$("#hdnMakeNameComputerModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(r)+" star");t==0?$jq(this).find(".annual-energy-model2 span").html(addCommas(t)+" kWh"):$jq(this).find(".annual-energy-model2 span").html(addCommas(parseFloat(t).toFixed(0))+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(u.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((e*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(f));runningCost=(Math.round(u*10)*1).toFixed(2);TenYearCost=f;M2_E_10yearcost=(Math.round(u*10)*1).toFixed(2);M2_E_totalcost=f;M2_M_10yearcost=(Math.round(u*10)*1).toFixed(2);M2_M_totalcost=f;FlagModel1=="model1_star"?(avgTenYearCost=M1_totalcost,avgRunningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost);FlagModel2="model2_consumption";s=Math.round(TenYearCost-avgTenYearCost);o=0;o=$("#ddlModelType option:selected").val()=="0"?$("#hdnModelType_Model1").val()==0&&$("#hdnModelType_Model2").val()==0?parseFloat($("#hdnPurchasePrice_Model1").val()):$("#TVComputer-pricecomputer-dropdown").val():$("#hdnModelType_Model1").val()==1&&$("#hdnModelType_Model2").val()==1?parseFloat($("#hdnPurchasePriceComputer_Model1").val()):$("#TVComputer-pricetv-dropdown").val();n=parseFloat((i-o)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);s>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare").val(),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&o<i&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):s==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html(""),$("#paybackId").hide(),$("#paybackIdForPrint").hide()):(n=parseFloat((o-i)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&o>=i&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}))}function createResultForWasher(n,t,i,r,u,f){var s=getInt("ClothesDryer","dryer-generalTariff"),h=getInt("HeatPump","airConditioner-generalTariff"),c=getInt("WashingMachine","washer-generalTariff"),l=getInt("FridgeFreezer","fridge-generalTariff"),a=getInt("Dishwasher","dishwasher-generalTariff"),p,o;s!=undefined&&(generalTariffDollarsPerkWh=s/100);h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var e=t*generalTariffDollarsPerkWh,v=e/1,y=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);p=PurchasePrice+v*10;o=p.toFixed(2);$jq("#result-"+n).each(function(){var s,n;$("#hdnFlagCompareModel").val()=="false"?($jq(this).find("#youStarRating").html("Model 2<br/>"+parseFloat(u)+" star"),$jq(this).find("#youStarRatingForPrint").html("Model 2<br/>"+parseFloat(u)+" star"),$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1<br/>"+parseFloat(u)+" star"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1<br/>"+parseFloat(u)+" star")):($jq(this).find("#youEnergyConsumptionMobile").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"),$jq(this).find("#youStarRating").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"),$jq(this).find("#youStarRatingForPrint").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"),$jq(this).find("#youEnergyConsumptionDesktop").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"),$jq(this).find("#youTwoLineMobile").html(" Model 1<br/>"+parseFloat(u)+" star, "+parseFloat(f.toString())+" kg"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-use span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas((e/1).toFixed(2)));$jq(this).find(".greenhouse-gas-emissions span").html(Math.round(y*100)/100+" tonnes");$jq(this).find(".tenrunning-cost span").html("$"+addCommas((v*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(o));runningCost=(Math.round(e*10)*1).toFixed(2);TenYearCost=o;M1_10yearcost=(Math.round(e*10)*1).toFixed(2);M1_totalcost=o;$("#hdnFlagCompareModel").val()=="true"&&(FlagModel2=="model2_star"?(avgTenYearCost=M2_totalcost,avgRunningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(avgTenYearCost=M2_E_totalcost,avgRunningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(avgTenYearCost=M2_M_totalcost,avgRunningCost=M2_M_10yearcost),$("#hdnSettingModel1").val()=="model1_star"?FlagModel1="model1_star":$("#hdnSettingModel1").val()=="model1_model"?FlagModel1="model1_model":$("#hdnSettingModel1").val()=="model1_consumption"&&(FlagModel1="model1_consumption"),s=Math.round(TenYearCost-avgTenYearCost),purchasePriceDefaultValue=parseFloat($("#hdnPurchasePrice_Model2").val()),n=parseFloat((purchasePriceDefaultValue-r)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),s>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&r>purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):s==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((r-purchasePriceDefaultValue)/((avgRunningCost-runningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r<=purchasePriceDefaultValue&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")),$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(y*100)/100+" tonnes"));i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForWasherAvg(n,t,i,r,u,f,e,o){var c=getInt("ClothesDryer","dryer-generalTariff"),l=getInt("HeatPump","airConditioner-generalTariff"),a=getInt("WashingMachine","washer-generalTariff"),v=getInt("FridgeFreezer","fridge-generalTariff"),y=getInt("Dishwasher","dishwasher-generalTariff"),w,h;c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);v!=undefined&&(generalTariffDollarsPerkWh=v/100);y!=undefined&&(generalTariffDollarsPerkWh=y/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var s=t*generalTariffDollarsPerkWh,p=s/1,b=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(u);isNaN(PurchasePrice)&&(PurchasePrice=0);w=PurchasePrice+p*10;h=w.toFixed(2);$jq("#result-"+n).each(function(){$jq(this).find(".you_value span").html(" Model 2<br/>"+r+" star");$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-Avg span").html("-"):$jq(this).find(".star-rating-Avg span").html(parseFloat(o)+" star");$jq(this).find(".annual-energy-Avg span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost-avg span").html("$"+addCommas((s/1).toFixed(2)));$jq(this).find(".tenrunning-cost-avg span").html("$"+addCommas((p*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-avg span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-avg span").html("$"+addCommas(h));avgRunningCost=(Math.round(s*10)*1).toFixed(2);avgTenYearCost=h;var e=Math.round(avgTenYearCost-TenYearCost),n=parseFloat((u-f)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);e>=0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$jq(this).find(".yousave_text span").html("You Save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>=0?($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(2)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(2)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide())):($("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","youloss_text"),$("#youSaveTdForPrint").attr("class","youloss_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$jq(this).find(".youloss_text span").html("You Lose* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))));$jq(this).find("#over10yearsId").html(" over 10 years");$jq(this).find("#over10yearsIdForPrint").html(" over 10 years");$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(b*100)/100+" tonnes");i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForWasherModel2(n,t,i,r,u,f,e){var w,s;$("#hdnFlagFirstTimeCompare").val("false");var h=getInt("ClothesDryer","dryer-generalTariff"),c=getInt("HeatPump","airConditioner-generalTariff"),l=getInt("WashingMachine","washer-generalTariff"),a=getInt("FridgeFreezer","fridge-generalTariff"),v=getInt("Dishwasher","dishwasher-generalTariff");h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);v!=undefined&&(generalTariffDollarsPerkWh=v/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);var o=t*generalTariffDollarsPerkWh,y=o/1,p=t*greenhouseCoefficients/1e3;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);w=PurchasePrice+y*10;s=w.toFixed(2);$jq("#result-"+n).each(function(){var h,n;$jq(this).find("#model2_header").html(" Model 2<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg");$jq(this).find("#model2_headerForPrint").html(" Model 2<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg");$jq(this).find(".you_value span").html(" Model 2<br/>"+parseFloat(f)+" star, "+parseFloat(e.toString())+" kg");$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):$("#hdnSettingModel1").val()=="model1_consumption"&&($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youTwoLineMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==1&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(f)+" star"));$jq(this).find(".annual-energy-model2 span").html(addCommas(Math.round(t).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas((o/1).toFixed(2)));$jq(this).find(".greenhouse-gas-emissions span").html(Math.round(p*100)/100+" tonnes");$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((y*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(s));avgRunningCost=(Math.round(o*10)*1).toFixed(2);avgTenYearCost=s;M2_10yearcost=(Math.round(o*10)*1).toFixed(2);M2_totalcost=s;FlagModel1=="model1_star"?(TenYearCost=M1_totalcost,runningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(TenYearCost=M1_E_totalcost,runningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(TenYearCost=M1_M_totalcost,runningCost=M1_M_10yearcost);FlagModel2="model2_star";$("#hdnFlagCompareModel").val()=="true"&&(h=Math.round(TenYearCost-avgTenYearCost),u=parseFloat($("#hdnPurchasePrice_Model1").val()),n=parseFloat((r-u)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&r<=u&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((u-r)/((avgRunningCost-runningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r>u&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")),$jq(this).find(".greenhouse-gas-emissions span").html("$"+Math.round(p*100)/100+" tonnes"));i?$jq(this).find(".energyStar").show():$jq(this).find(".energyStar").hide()})}function createResultForEnergyConsumsionWasher(n,t,i,r,u){var s=getInt("ClothesDryer","dryer-generalTariff"),h=getInt("HeatPump","airConditioner-generalTariff"),c=getInt("WashingMachine","washer-generalTariff"),l=getInt("FridgeFreezer","fridge-generalTariff"),a=getInt("Dishwasher","dishwasher-generalTariff"),f,o,v,e;s!=undefined&&(generalTariffDollarsPerkWh=s/100);h!=undefined&&(generalTariffDollarsPerkWh=h/100);c!=undefined&&(generalTariffDollarsPerkWh=c/100);l!=undefined&&(generalTariffDollarsPerkWh=l/100);a!=undefined&&(generalTariffDollarsPerkWh=a/100);generalTariffDollarsPerkWh==0&&(generalTariffDollarsPerkWh=.321);f=t/7*i*generalTariffDollarsPerkWh;o=f/1;PurchasePrice=parseFloat(r);isNaN(PurchasePrice)&&(PurchasePrice=0);v=PurchasePrice+o*10;e=v.toFixed(2);$("#hdnFlagCompareModel").val()=="false"?$jq("#result-"+n).each(function(){$jq(this).find("#youEnergyConsumptionDesktop").html("Model 1");$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1");$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e));TenYearCost=e}):$("#hdnFlagCompareModel").val()=="true"&&$("#hdnFlagFirstTimeCompare").val()=="true"?($jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e))}),$jq("#result-"+n).each(function(){$("#ddlBased option:selected").val()==2?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-model2 span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(e))}),avgRunningCost=(Math.round(f*10)*1).toFixed(2),avgTenYearCost=e,runningCost=(Math.round(f*10)*1).toFixed(2),TenYearCost=e,M1_E_10yearcost=(Math.round(f*10)*1).toFixed(2),M1_E_totalcost=e,$("#hdnFlagFirstTimeCompare").val("false")):$("#hdnFlagCompareModel").val()=="true"&&($("#hdnCalculateModel").val()=="model1"?$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/> -"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/> -")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+""),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+$("#hdnModelNoModel1").val()+"")):($jq(this).find("#youEnergyConsumptionDesktop").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionDesktopForPrint").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"),$jq(this).find("#youEnergyConsumptionMobile").html("Model 1 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model1").val())+" kWh"));$("#ddlModelCompare option:selected").val()==0&&($("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-use span").html("-"):$("#hdnSettingModel1").val()=="model1_model"?$("#hdnMakeNameModel1").val()=="Please enter"||$("#hdnMakeNameModel1").val()==""?$jq(this).find(".star-rating-use span").html("-"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-use span").html(parseFloat(u)+" star"));$jq(this).find(".annual-energy-use span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost span").html("$"+addCommas(e));avgRunningCost=(Math.round(f*10)*1).toFixed(2);avgTenYearCost=e;M1_E_10yearcost=(Math.round(f*10)*1).toFixed(2);M1_E_totalcost=e;M1_M_10yearcost=(Math.round(f*10)*1).toFixed(2);M1_M_totalcost=e;FlagModel2=="model2_star"?(TenYearCost=M2_totalcost,runningCost=M2_10yearcost):FlagModel2=="model2_consumption"?(TenYearCost=M2_E_totalcost,runningCost=M2_E_10yearcost):FlagModel2=="model2_model"&&(TenYearCost=M2_M_totalcost,runningCost=M2_M_10yearcost);FlagModel1="model1_consumption";var h=Math.round(avgTenYearCost-TenYearCost),s=parseFloat($("#hdnPurchasePrice_Model2").val()),n=parseFloat((s-r)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".yousave_textValue span").html("$"+addCommas((avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&r>s&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((r-s)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}):$jq("#result-"+n).each(function(){var n;$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?($jq(this).find("#model2_header").html("Model 2 <br/> -"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/> -")):($jq(this).find("#model2_header").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+""),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+$("#hdnModelNoModel2").val()+"")):($jq(this).find("#model2_header").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"),$jq(this).find("#model2_headerForPrint").html("Model 2 <br/>"+addCommas($("#hdnEnergyConsumptionRating_Model2").val())+" kWh"));$("#ddlBased option:selected").val()==1?$jq(this).find(".star-rating-model2 span").html("-"):$("#hdnSettingModel2").val()=="model2_model"?$("#hdnMakeNameModel2").val()=="Please enter"||$("#hdnMakeNameModel2").val()==""?$jq(this).find(".star-rating-model2 span").html("-"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star"):$jq(this).find(".star-rating-model2 span").html(parseFloat(u)+" star");$jq(this).find(".annual-energy-model2 span").html(addCommas((t/7*i).toFixed())+" kWh");$jq(this).find(".running-cost-model2 span").html("$"+addCommas(f.toFixed(2)));$jq(this).find(".tenrunning-cost-model2 span").html("$"+addCommas((o*10).toFixed(2)));$jq(this).find(".purchaseprice-cost-model2 span").html("$"+addCommas(parseFloat(PurchasePrice).toFixed(2)));$jq(this).find(".costofownership-cost-model2 span").html("$"+addCommas(e));runningCost=(Math.round(f*10)*1).toFixed(2);TenYearCost=e;M2_E_10yearcost=(Math.round(f*10)*1).toFixed(2);M2_E_totalcost=e;M2_M_10yearcost=(Math.round(f*10)*1).toFixed(2);M2_M_totalcost=e;FlagModel1=="model1_star"?(avgTenYearCost=M1_totalcost,avgRunningCost=M1_10yearcost):FlagModel1=="model1_consumption"?(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost):FlagModel1=="model1_model"&&(avgTenYearCost=M1_E_totalcost,avgRunningCost=M1_E_10yearcost);FlagModel2="model2_consumption";var h=Math.round(TenYearCost-avgTenYearCost),s=parseFloat($("#hdnPurchasePrice_Model1").val()),n=parseFloat((r-s)/((avgRunningCost-runningCost)/10));isNaN(n)&&(n=0);h>0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".yousave_textValue span").html("$"+addCommas((TenYearCost-avgTenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)&&s<r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years")):h==0?($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","yousave_textValue"),$("#youSaveLossIdForPrint").attr("class","yousave_textValue"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),$jq(this).find(".yousave_text span").html("No difference in the total cost of ownership between these two models"),$jq(this).find(".yousave_textValue span").html(""),$jq(this).find("#over10yearsId").html(""),$jq(this).find("#over10yearsIdForPrint").html("")):(n=parseFloat((s-r)/((runningCost-avgRunningCost)/10)),isNaN(n)&&(n=0),$("#paybackId").hide(),$("#paybackIdForPrint").hide(),$("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#youSaveLossId").attr("class","youloss_textValue"),$("#youSaveLossIdForPrint").attr("class","youloss_textValue"),$("#ddlModelCompare option:selected").val()=="0"?($("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")):($("#youSaveTd").attr("class","yousave_text"),$("#youSaveTdForPrint").attr("class","yousave_text"),$("#divCompareModel").hide(),$("#divYouSavePayback").removeClass("w62p"),$("#divYouSavePayback").addClass("w100p"),$("#divYouSavePaybackForPrint").removeClass("w62p"),$("#divYouSavePaybackForPrint").addClass("w100p"),parseFloat(TenYearCost)>=parseFloat(avgTenYearCost)?$jq(this).find(".yousave_text span").html("By selecting Model 1 you save* "):$jq(this).find(".yousave_text span").html("By selecting Model 2 you save* ")),$jq(this).find(".youloss_textValue span").html("$"+addCommas(Math.abs(avgTenYearCost-TenYearCost).toFixed(2))),$("#hdnisPayback").val()=="True"||$("#hdnisPayback").val()=="true"?n!="Infinity"&&n>0&&n<10?($("#paybackId").show(),$("#paybackIdForPrint").show(),$jq(this).find("#paybackId span").html("Payback in  "),$jq(this).find("#paybackIdForPrint span").html("Payback in  "),$jq(this).find("#paybacksaveId span").html(n.toFixed(1)),$jq(this).find("#paybackyearId").html(" years"),$jq(this).find("#paybacksaveIdForPrint span").html(n.toFixed(1)),$jq(this).find("#paybackyearIdForPrint").html(" years")):($("#paybackId").hide(),$("#paybackIdForPrint").hide()):($("#paybackId").hide(),$("#paybackIdForPrint").hide()),parseFloat(TenYearCost)<=parseFloat(avgTenYearCost)&&s>=r&&($("#paybackId").hide(),$("#paybackIdForPrint").hide()),$jq(this).find("#over10yearsId").html(" over 10 years"),$jq(this).find("#over10yearsIdForPrint").html(" over 10 years"))}))}var greenhouseCoefficients=.137,generalTariffDollarsPerkWh=.321,slideSpeed=500,clicking=!1,avgTenYearCost,TenYearCost,TenYearCost_Model2,PurchasePrice,runningCost,avgRunningCost,FlagModel1,FlagModel2,M1_10yearcost=0,M1_totalcost=0,M2_10yearcost=0,M2_totalcost=0,M1_E_10yearcost=0,M1_E_totalcost=0,M2_E_10yearcost=0,M2_E_totalcost=0,M1_M_totalcost=0,M1_M_10yearcost=0,M2_M_totalcost=0,M2_M_10yearcost=0;$(document).ready(function(){$jq("#screen2-viewport form").submit(function(n){n.preventDefault()});$jq(document).mouseup(function(){clicking=!1});$jq("#sections li a").click(function(n){n.preventDefault();$jq("#sections li.active").removeClass("active");$jq(this).parent().addClass("active");$jq("#screen2").slideDown(function(){$jq.scrollTo("#screen2",300,{axis:"y"})});var t=$jq(this).parent().prevAll().length*-580;$jq("#screen2-viewport").animate({top:t},500,"swing")});$jq(".section-link-back a").click(function(n){n.preventDefault();$jq("#sections li.active").removeClass("active");$jq("#screen2").slideUp(function(){$jq.scrollTo("#landingVehSelect",300,{axis:"y"})})});initRCC();$jq("#screen2-viewport").find("select").change(function(){update(this)});$jq(".hottips-trigger a").click(function(n){n.preventDefault();var t=$jq(this.rel).find(".popup-title").html(),i=$jq(this.rel).find(".popup-content-wrapper").html();showInfo(t,i,null)})});eval(function(n,t,i,r,u,f){if(u=function(n){return(n<t?"":u(parseInt(n/t)))+((n=n%t)>35?String.fromCharCode(n+29):n.toString(36))},!"".replace(/^/,String)){while(i--)f[u(i)]=r[i]||u(i);r=[function(n){return f[n]}];u=function(){return"\\w+"};i=1}while(i--)r[i]&&(n=n.replace(new RegExp("\\b"+u(i)+"\\b","g"),r[i]));return n}(";(K($,v,A,B){I C=(K(u){P K(){P u.5Z(51[0])}})((1F&&1F.4Z)?1F.4Z.2T():\"\");I D=($.1X.2R&&1O($.1X.2L,10)<7&&1O($.1X.2L,10)>4);I E=Q;H(C(\"5e\")>-1){H(C(\"5r\")>-1||C(\"5I\")>-1||C(\"5M\")>-1){E=O}};H(C(\"62\")>-1){H(C(\"66\")>-1&&C(\"6q\")>-1){E=O}};H(C(\"6D\")>-1){E=O};H(C(\"74 7c 7r 7\")>-1){E=O};H($.X===B){I F={};$.1V([\"5x\",\"5z\",\"3Q\",\"4U\",\"5X\",\"3b\",\"60\",\"3E\"],K(i,a){F[\"[2h \"+a+\"]\"]=a.2T()});$.1c({X:K(a,b){H(a){P K(){P a.2H(b||G,51)}}},1d:K(a){P a===26?3Q(a):F[3E.3f.4R.3k(a)]||\"2h\"},4Q:K(a){H(4P a!==\"3F\"||!a){P 26}a=$.3G(a);H(/^[\\],:{}\\s]*$/.64(a.2r(/\\\\(?:[\"\\\\\\/69]|u[0-6o-6p-F]{4})/g,\"@\").2r(/\"[^\"\\\\\\n\\r]*\"|O|Q|26|-?\\d+(?:\\.\\d*)?(?:[7h][+\\-]?\\d+)?/g,\"]\").2r(/(?:^|:|,)(?:\\s*\\[)+/g,\"\"))){P v.33&&v.33.4O?v.33.4O(a):(2z 4U(\"P \"+a))()}T{4J(\"5y 33: \"+a)}}})};$.1c($.2N.3f,{5A:K(){H(G.M.2Q){G.M.2Q.3k(G.5N,G.5P,G)}($.2N.2Q[G.5Q]||$.2N.2Q.5S)(G)}});$.1c($.1G,{2B:K(x,t,b,c,d,s){H(s===B)s=1.65;P c*((t=t/d-1)*t*((s+1)*t+s)+1)+b}});$.1c({29:{4I:{1k:'2Y-16',1w:{1r:75,L:7e,J:7n},22:Q,1A:{1y:0.6},21:{13:{1x:2X,1G:\"2B\"},1o:{1x:5B,1G:\"2B\"},Z:{1x:5J,1G:\"2B\"},3h:{1x:2o,1G:\"2B\",4H:10,4G:2}},1B:{L:4y,J:4t},1f:{L:4y,J:4t},2G:{L:-1,J:-1},3e:\"1l\",1E:{1d:\"6c\",6i:Q,6j:\"1b\"}},M:{},2i:{},2w:{},1a:{},R:{16:[],S:{1o:[],2S:[],1t:[],3d:[]},1m:[],1a:[],1I:[],1b:[]},7s:[],1j:Q,1K:Q,2l:\"1a\",4s:{25:{19:/[^\\.]\\.(25)\\s*$/i},4r:{19:/4r\\.4o\\//i,11:'/',17:3,1f:1,18:\"1e://1H.3c.Y/28/%15%?1M=1&V;4n=1&V;1S=0&V;4m=1\"},3c:{19:/3c\\.Y\\/4k/i,11:'=',17:1,1f:1,18:\"1e://1H.3c.Y/28/%15%?1M=1&V;4n=1&V;1S=0&V;4m=1\"},3t:{19:/3t\\.Y/i,11:'/',17:3,1f:1,18:\"1e://3u.3t.Y/1N/%15%?6k=1&V;1M=1&V;6l=1&V;6m=1&V;6n=0&V;4j=&V;3z=1\"},3A:{19:/3A\\.Y\\/4k/i,11:'/',17:4,18:\"1e://1H.3A.Y/6r/%15%/.25?6s=6t=6C\"},3B:{19:/3B\\.Y\\/1N/i,11:'/',17:4,18:\"1e://1H.3B.Y/25/1N/%15%?6H=0&V;6Y=1\"},3C:{19:/3C\\.Y/i,11:'/',17:5,18:\"1e://1H.3C.Y/76.77?78=%15%\"},7a:{19:/2K\\.Y\\/1N\\//i,11:'1N/',17:1,18:\"1e://1H.2K.Y/2U/2U.7f.25?3H=O&V;3z=1&V;7m=O&V;4h=%15%\"},2K:{19:/2K\\.Y\\/1N:/i,11:'1N:',17:1,18:\"1e://1H.2K.Y/2U/2U.25?1M=O&V;3z=1&V;4h=%15%\"},3J:{19:/3J\\.4g/i,11:'/',17:4,18:\"1e://1H.3J.4g/1B/1N/%15%?7u=%2F&V;1M=O&V;7w=%15%&V;7y=O&V;7E=0.57&V;58=0.59&V;5b=5c\"},3L:{19:/3L\\.Y/i,11:'/',17:3,18:\"1e://1H.3L.Y/3u/%15%\"},4e:{19:/v\\.4e\\.Y/i,11:'/',17:3,18:\"1e://5i.5j.Y/3u.25?5k=%15%&V;v=1.5l\"},1D:{19:/1D\\.Y\\/5m/i,11:'=',17:1,18:\"1e://1N.1D.Y/5n.25?1M=1&V;5o=5p&V;5q=%15%\"},3O:{19:/3O\\.Y\\/5s/i,11:'/',17:4,18:\"1e://5u.3O.Y/%15%.5w?1M=O&V;23=24\"}},56:{3g:{19:/3g\\.Y\\/1z/i,11:'?',17:1,18:\"1e://1H.3g.Y/1z/28/?5C=5D-5E-5F-5G-5H&V;w=%L%&V;h=%J%&V;%15%\"},5K:{19:/1z\\.1D\\.Y(.*)5L=c/i,11:'?',17:1,18:\"1e://1z.1D.Y/?3j=7T&V;%15%\"},5O:{19:/1z\\.1D\\.Y\\/1z\\/4b/i,11:'?',17:1,18:\"1e://1z.1D.Y/1z/4b?3j=28&V;%15%\"},1D:{19:/1z\\.1D\\.Y/i,11:'?',17:1,18:\"1e://1z.1D.Y/1z?%15%&V;3j=28\"}},4a:/\\.(?:5R[e]?g|5T|5U|5V|5W)/i,1A:{36:K(a){G.M=a;G.U=$('<N 15=\"'+2z 3b().3v()+'\" 12=\"'+G.M.1k+'-1A\"><\/N>');G.U.W($.1c({},{'1Z':'68','1l':0,'1g':0,'1y':0,'1T':'24','z-17':G.M.1r},G.M.1w));G.U.1Q($.X(K(e){H(!G.M.22){H($.1Y(G.M.1J)){G.M.1J()}T{G.1L()}}e.2t()},G));G.2I=O;G.48();P G},48:K(){G.2W=$(A.3M);G.2W.2c(G.U);H(D){G.U.W('1Z','32');I a=1O(G.U.W('1r'),10);H(!a){a=1;I b=G.U.W('1Z');H(b==='6u'||!b){G.U.W('1Z','6A')}G.U.W('1r',a)}a=(!!(G.M.1r||G.M.1r===0)&&a>G.M.1r)?G.M.1r:a-1;H(a<0){a=1}G.1s=$('<1f 15=\"47'+2z 3b().3v()+'\" 6E=\"6G\" 46=0 2D=\"\"><\/1f>');G.1s.W({1r:a,1Z:'32',1l:0,1g:0,23:'24',L:0,J:0,1y:0});G.1s.71(G.U);$('1b, 3M').W({'J':'2o%','L':'2o%','3a-1g':0,'3a-2x':0})}},1q:K(x,y){G.U.W({'J':0,'L':0});H(G.1s){G.1s.W({'J':0,'L':0})};I a={x:$(A).L(),y:$(A).J()};G.U.W({'L':'2o%','J':y||a.y});H(G.1s){G.1s.W({'J':0,'L':0});G.1s.W({'1Z':'32','1g':0,'1l':0,'L':G.U.L(),'J':y||a.y})}P G},13:K(a){H(!G.2I){P G};H(G.2a){G.2a.1R()};H(G.1s){G.1s.W('1T','3l')};G.U.W({'1T':'3l','1y':0});G.2W.1p('1q',$.X(G.1q,G));G.1q();G.2I=Q;G.2a=G.U.45(G.M.44,G.M.1w.1y,$.X(K(){H(G.M.1w.1y){G.U.W(G.M.1w)};G.U.2P('13');H($.1Y(a)){a()}},G));P G},1L:K(a){H(G.2I){P G};H(G.2a){G.2a.1R()};H(G.1s){G.1s.W('1T','24')};G.2W.2e('1q');G.2I=O;G.2a=G.U.45(G.M.43,0,$.X(K(){G.U.2P('1L');H($.1Y(a)){a()};G.U.W({'J':0,'L':0,'1T':'24'})},G));P G}},36:K(a){G.M=$.1c(O,G.4I,a);I b=G.M.1k;I c=$('<N 12=\"'+b+' '+b+'-2l-1a\"><N 12=\"'+b+'-23-1l-1g\"><\/N><N 12=\"'+b+'-23-1l-42\"><\/N><N 12=\"'+b+'-23-1l-2x\"><\/N><a 12=\"'+b+'-1i-1o\" 1h=\"#1o\"><1u>7x<\/1u><\/a><N 12=\"'+b+'-1F\"><a 12=\"'+b+'-1i-1g\" 1h=\"#\"><1u>41<\/1u><\/a><a 12=\"'+b+'-1i-2x\" 1h=\"#\"><1u>3Y<\/1u><\/a><\/N><N 12=\"'+b+'-S\"><N 12=\"'+b+'-S-7G\"><\/N><a 12=\"'+b+'-1i-1g\" 1h=\"#\"><1u>41<\/1u><\/a><a 12=\"'+b+'-1i-1t\" 1h=\"#\"><1u>7K<\/1u><\/a><N 12=\"'+b+'-S-1U\"><\/N><a 12=\"'+b+'-1i-2x\" 1h=\"#\"><1u>3Y<\/1u><\/a><N 12=\"'+b+'-S-3y\"><\/N><\/N><N 12=\"'+b+'-1m\"><\/N><N 12=\"'+b+'-1b\"><\/N><N 12=\"'+b+'-23-2V-1g\"><\/N><N 12=\"'+b+'-23-2V-42\"><\/N><N 12=\"'+b+'-23-2V-2x\"><\/N><\/N>');I e=G.R;G.1A.36({1k:b,1w:G.M.1A,22:G.M.22,1r:G.M.1w.1r-1,1J:G.X(G.1o),44:(E?2:G.M.21.13.1x),43:(E?2:G.M.21.1o.1x)});e.16=c;e.1F=$('.'+b+'-1F',c);e.S.N=$('.'+b+'-S',c);e.S.1o=$('.'+b+'-1i-1o',c);e.S.2S=$('.'+b+'-1i-1g',c);e.S.1t=$('.'+b+'-1i-1t',c);e.S.3d=$('.'+b+'-1i-2x',c);e.S.1U=$('.'+b+'-S-1U',c);e.1m=$('.'+b+'-1m',c);e.1b=$('.'+b+'-1b',c);e.Z=$('<N 12=\"'+b+'-Z\"><\/N>').W({'1Z':'32','z-17':G.M.1w.1r,'1l':-5a}).2c(c);$('3M').2c(e.Z);G.1n=$(v);G.3X();P c},3X:K(){I a=G.1n;a[0].5d=K(){a.2P('1q')};a.1p('1q',G.X(K(){H(G.1j){G.1A.1q();H(!G.1K){G.2k()}}}));a.1p('5f',G.X(K(){H(G.1j&&!G.1K){G.2k()}}));$(A).1p('5g',G.X(K(e){H(G.1j){H(e.3D===27&&G.M.22===Q){G.1o()}H(G.2w.3W>1){H(e.3D===37){G.R.S.2S.2Z('1Q',e)}H(e.3D===39){G.R.S.3d.2Z('1Q',e)}}}}));G.R.S.1o.1p('1Q 31',{\"1C\":\"1o\"},G.X(G.1C));G.R.S.1t.1p('1Q 31',{\"1C\":\"3V\"},G.X(G.1C));G.1A.U.1p('13',G.X(K(){$(G).2Z('13')}));G.1A.U.1p('1L',G.X(K(){$(G).2Z('1o')}))},1C:K(e){G[e.2u.1C].2H(G);e.2t()},X:K(a){P $.X(a,G)},3U:K(d,f,g){I h={1d:\"\",L:\"\",J:\"\",1h:\"\"};$.1V(d,G.X(K(b,c){$.1V(c,G.X(K(i,e){H((b==\"1B\"&&f.11('?')[0].2b(e.19))||(b==\"1f\"&&f.2b(e.19))){h.1h=f;H(e.11){I a=b==\"1B\"?f.11(e.11)[e.17].11('?')[0].11('&')[0]:f.11(e.11)[e.17];h.1h=e.18.2r(\"%15%\",a).2r(\"%L%\",g.L).2r(\"%J%\",g.J)}h.1d=e.1f?\"1f\":b;h.L=g.L||G.M[h.1d].L;h.J=g.J||G.M[h.1d].J;P Q}}));H(!!h.1d)P Q}));P h},3T:K(a,b){I c=G;I d=c.R.S.2S;I f=c.R.S.3d;c.2w.3W=a.2f;H(a.2f>1){d.2e('.16');f.2e('.16');d.1p('1Q.16 31.16',K(e){e.2t();a.4u(a.5t());c.13(a)});f.1p('1Q.16 31.16',K(e){e.2t();a.3P(a.5v());c.13(a)});H(c.R.1F.W(\"1T\")===\"24\"){c.R.S.N.13()}d.13();f.13()}T{d.1L();f.1L()}},3S:K(c,d){I f=G.R;f.S.1U.1v();$.1V(c,G.X(K(i,a){I b=$('<a 1h=\"#\" 12=\"'+a['12']+'\">'+a['1b']+'<\/a>');b.1p('1Q',G.X(K(e){H($.1Y(a.1J)){a.1J(G.R.1a.2D,G,d)}e.2t()}));f.S.1U.2c(b)}));f.S.N.13()},13:K(d,f,g){H(G.2A.2q(d)){P Q}I h=d[0];I i='';I j=Q;I k=h.1h;I l=G.R;I m={x:G.1n.L(),y:G.1n.J()};I n,J;H(d.2f===1&&h.1d===\"U\"){i=\"U\"}G.2y();j=G.1j;G.3Z();H(j===Q){G.2k()}G.3T(d,f);f=$.1c(O,{'L':0,'J':0,'22':0,'3w':'','3s':O,'Z':-1,'1f':Q,'3r':'','2O':O,'3n':1,'2E':K(){},'34':K(){}},f||{},h);G.M.2E=f.2E;G.M.34=f.34;G.M.2O=f.2O;I o=G.49(k);f=$.1c({},f,o);H(f.L&&(\"\"+f.L).2j(\"p\")>0){f.L=4c.4d((m.x-20)*f.L.4f(0,f.L.2j(\"p\"))/2o)}H(f.J&&(\"\"+f.J).2j(\"p\")>0){f.J=4c.4d((m.y-20)*f.J.4f(0,f.J.2j(\"p\"))/2o)}G.1A.M.22=f.22;l.S.1t.2n(G.M.1k+'-1i-3I').35(G.M.1k+'-1i-1t');G.1K=!(f.Z>0||(f.Z==-1&&f.3s));H($.5Y(f.S)){G.3S(f.S,h.U)}H(G.R.S.1U.4i(\":1v\")===Q){G.R.S.N.13()}l.S.1t.1L();H(G.2A.2q(f.3w)===Q){i=f.3w}T H(f.1f){i='1f'}T H(k.2b(G.4a)){i='1a'}T{I p=G.3U({\"1B\":G.4s,\"1f\":G.56},k,f);H(!!p.1d===O){k=p.1h;i=p.1d;f.L=p.L;f.J=p.J}H(!!i===Q){H(k.2b(/#/)){I q=k.61(k.2j(\"#\"));H($(q).2f>0){i='3q';k=q}T{i='1E'}}T{i='1E'}}}H(i==='1a'){l.1a=2z 63();$(l.1a).4l(G.X(K(){I a=G.R.1a;$(a).2e('4l');H(G.1j===Q){P Q}H(f.L){n=1O(f.L,10);J=1O(f.J,10)}T{a.L=1O(a.L*f.3n,10);a.J=1O(a.J*f.3n,10);H(f.3s){I b=G.3p(a.L,a.J);n=b.L;J=b.J;H(a.L!=n||a.J!=J){G.R.S.N.13();G.R.S.1t.13()}}T{n=a.L;J=a.J}}G.R.1I=(G.2A.2q(f.1I))?Q:$('<N 12=\"'+G.M.1k+'-1I\"><\/N>').1b(f.1I);G.3m();G.1q(n,J)}));G.R.1a.67=G.X(K(){G.2m(\"4p 6a 1a 6b 4o 4q. 6d 6e 6f 6g.\")});G.R.1a.2D=k}T H(i=='1B'||i=='3q'||i=='1E'||i=='U'){H(i=='3q'){I r=$(k);I s=r.6h(O).13();n=f.L>0?f.L:r.3x(O);J=f.J>0?f.J:r.3i(O);G.2v(s,n,J)}T H(i=='1E'){H(f.L){n=f.L;J=f.J}T{G.2m(\"3R 4v 4w 4x 2s 4z. 4A ?16[L]=4B&16[J]=2X 4C 2s 3y 4D 2s 18.\");P Q}H(G.2i.1E){G.2i.1E.6v()}G.2i.1E=$.1E($.1c({},G.M.1E,{18:k,2m:G.X(K(a,b,c){G.2m(\"6w 6x \"+a.6y+\" \"+c)}),6z:G.X(K(a){G.2v($(a),n,J)})}))}T H(i=='1B'){I t=G.4E(k,f.L,f.J,f.3r);G.2v($(t),f.L,f.J,'1B')}T H(i==='U'){n=f.L>0?f.L:h.U.3x(O);J=f.J>0?f.J:h.U.3i(O);G.2v(h.U,n,J)}}T H(i=='1f'){H(f.L){n=f.L;J=f.J}T{G.2m(\"3R 4v 4w 4x 2s 4z. 4A ?16[L]=4B&16[J]=2X&6B[1f]=O 4C 2s 3y 4D 2s 18.\");P Q}I u='<1f 15=\"47'+(2z 3b().3v())+'\" 46=\"0\" 2D=\"'+k+'\" 1w=\"3a:0; 4F:0;\"><\/1f>';G.2v($(u).W({L:f.L,J:f.J}),f.L,f.J)}G.1J=$.1Y(g)?g:K(e){}},3m:K(){I a=G.R;I b=a.1m;I c=G.M.1k+'-2y';b.1p('1W',G.X(K(){b.2e('1W');H(G.1j===Q){P Q}G.38('1a');b.1v();a.1b.1v();H(a.1I){b.2c(a.1I)}b.2c(a.1a);H(D||E){b.2n(c)}T{$(a.1a).W(\"1m-4j\",\"6F(3K, 3K, 3K, 0)\");$(a.1a).1R().W(\"1y\",0).2g({\"1y\":1},2X,K(){b.2n(c)})}G.M.2E.2H(G)}))},4E:K(c,d,e,f){I g=$.1c(O,{6I:\"6J:6K-6L-6M-6N-6O\",L:d,J:e,6P:c,2D:c,1w:\"3a:0; 4F:0;\",6Q:\"O\",6R:\"6S\",6T:\"6U\",3H:\"O\",1M:\"O\",1d:\"6V/x-6W-1B\",3r:\"3H=1&1M=1&6X=1\"},f);I h=\"<2h \";I i=\"<28 \";I j=\"\";$.1V(g,K(a,b){H(b!==\"\"){h+=a+\"=\\\"\"+b+\"\\\" \";i+=a+\"=\\\"\"+b+\"\\\" \";j+=\"<4K 1k=\\\"\"+a+\"\\\" 6Z=\\\"\"+b+\"\\\"><\/4K>\"}});I k=h+\">\"+j+i+\"><\/28><\/2h>\";P k},2v:K(a,b,c,d){I e=G;I f=e.M;I g=e.R;I h=g.1m;e.38(\"1b\");e.1q(b+30,c+20);h.1p('1W',K(){h.2n(f.1k+'-2y');g.1b.2c(a);H(d==\"1B\"&&C(\"70\")>-1){e.R.1b.1b(a)}h.2e('1W');H(f.2O&&4P 4L!=='72'){4L.73()}f.2E.2H(G)})},2k:K(w,h){I a={x:$(G.1n).L(),y:$(G.1n).J()};I b={x:$(G.1n).4M(),y:$(G.1n).4N()};I c=G.R;I d=h!=26?h:c.16.3i();I e=w!=26?w:c.16.3x();I y=0;I x=0;x=b.x+((a.x-e)/2);H(G.1j){y=b.y+(a.y-d)/2}T H(G.M.3e==\"2V\"){y=(b.y+a.y+14)}T H(G.M.3e==\"1l\"){y=(b.y-d)-14}H(G.1j){H(!G.2i.Z){G.1P(c.Z,{'1g':x},'Z')}G.1P(c.Z,{'1l':y},'Z')}T{c.Z.W({'1g':x,'1l':y})}},1P:K(d,f,g,h,i){H(2J($.1C.2Y)<1.8){I j=$.79({2p:i||Q,1x:(E?2:G.M.21[g].1x),1G:G.M.21[g].1G,1W:($.1Y(h)?G.X(h,G):26)});P d[j.2p===Q?\"1V\":\"2p\"](K(){H(2J($.1C.2Y)>1.5){H(j.2p===Q){$.7b(G)}}I c=$.1c({},j),4S=G;c.7d=$.1c({},f);c.4T={};2M(I p 7g f){1k=p;c.4T[1k]=c.4V&&c.4V[1k]||c.1G||'7i'}$.1V(f,K(a,b){I e=2z $.2N(4S,c,a);e.1U(e.7j(O)||0,b,\"7k\")});P O})}T{d.2g(f,{2p:i||Q,1x:(E?2:G.M.21[g].1x),1G:G.M.21[g].1G,1W:($.1Y(h)?G.X(h,G):26)})}},1q:K(x,y){I a=G.R;H(G.1j){I b={x:$(G.1n).L(),y:$(G.1n).J()};I c={x:$(G.1n).4M(),y:$(G.1n).4N()};I d=(c.x+(b.x-(x+14))/2);I e=(c.y+(b.y-(y+14))/2);H($.1X.2R||($.1X.7l&&(2J($.1X.2L)<1.9))){y+=4}G.2i.Z=O;G.1P(a.Z.1R(),{'1g':(G.1K&&d<0)?0:d,'1l':(G.1K&&(y+14)>b.y)?c.y:e},'Z',$.X(K(){G.Z=Q},G.2i));G.1P(a.1b,{'J':y-20},'Z');G.1P(a.16.1R(),{'L':(x+14),'J':y-20},'Z',{},O);G.1P(a.1F,{'L':x},'Z');G.1P(a.1F,{'1l':(y-4W)/2},'Z');G.1P(a.1m.1R(),{'L':x,'J':y},'Z',K(){$(a.1m).2P('1W')})}T{a.1b.W({'J':y-20});a.16.W({'L':x+14,'J':y-20});a.1m.W({'L':x,'J':y});a.1F.W({'L':x,'J':4W})}},1o:K(a){I b=G.R;G.1j=Q;G.2w={};G.M.34();H($.1X.2R||E){b.1m.1v();b.1b.1L().1v().13();b.S.1U.1v();b.Z.W(\"1T\",\"24\");G.2k()}T{b.Z.2g({\"1y\":0,\"1l\":\"-=40\"},{2p:Q,1W:(G.X(K(){b.1m.1v();b.1b.1v();b.S.1U.1v();G.2k();b.Z.W({\"1T\":\"24\",\"1y\":1,\"3N\":\"1j\"})}))})}G.1A.1L(G.X(K(){H($.1Y(G.1J)){G.1J.2H(G,$.7o(a))}}));b.1m.1R(O,Q).2e(\"1W\")},3Z:K(){G.1j=O;H($.1X.2R){G.R.Z.7p(0).1w.7q(\"4X\")}G.R.Z.1R().W({1y:1,1T:\"3l\",3N:\"1j\"}).13();G.1A.13()},3h:K(){I z=G.M.21.3h;I x=z.4H;I d=z.1x;I t=z.2a;I o=z.4G;I l=G.R.Z.1Z().1g;I e=G.R.Z;2M(I i=0;i<o;i++){e.2g({1g:l+x},d,t);e.2g({1g:l-x},d,t)};e.2g({1g:l+x},d,t);e.2g({1g:l},d,t)},38:K(a){H(a!=G.2l){I b=G.M.1k+\"-2l-\";G.R.16.2n(b+G.2l).35(b+a);G.2l=a}G.R.Z.W(\"3N\",\"1j\")},2m:K(a){4J(a);G.1o()},49:K(d){I e=/16\\[([^\\]]*)?\\]$/i;I f={};H(d.2b(/#/)){d=d.4Y(0,d.2j(\"#\"))}d=d.4Y(d.2j('?')+1).11(\"&\");$.1V(d,K(){I a=G.11(\"=\");I b=a[0];I c=a[1];H(b.2b(e)){H(7t(c)){c=2J(c)}T H(c.2T()==\"O\"){c=O}T H(c.2T()==\"Q\"){c=Q}f[b.2b(e)[1]]=c}});P f},3p:K(x,y){I a=G.M.2G.L>0?G.M.2G.L:G.1n.L()-50;I b=G.M.2G.J>0?G.M.2G.J:G.1n.J()-50;H(x>a){y=y*(a/x);x=a;H(y>b){x=x*(b/y);y=b}}T H(y>b){x=x*(b/y);y=b;H(x>a){y=y*(a/x);x=a}}P{L:1O(x,10),J:1O(y,10)}},2y:K(){I a=G.M.1w;I b=G.R;I c=b.1m;G.38('1a');c.7v().1R(O);c.1v();b.1b.1v();b.S.N.1L();b.S.N.W(\"L\");c.35(G.M.1k+'-2y');H(G.1j==Q){G.2k(a[\"L\"],a[\"J\"]);G.1q(a[\"L\"],a[\"J\"])}},3V:K(){I a=G;I b=a.R.S;I c=a.R.1a;I d=a.M.1k;I e={};b.1t.2n(d+'-1i-3I '+d+'-1i-1t').35((a.1K)?d+'-1i-1t':d+'-1i-3I');a.2y();a.3m();b.N.13();H(a.1K){e=a.3p(c.L,c.J)}T{e=c}a.1q(e.L,e.J);a.1K=!a.1K},2C:K(a){I a=$(a);P $.1c({},{1h:a.2d(\"1h\"),1S:($.3G(a.2d(\"2u-1S\")||a.2d(\"1S\"))),52:a.2d(\"2u-1S\")?\"2u-1S\":\"1S\",1I:$.3G(a.2d(\"2u-1I\")||a.2d(\"1I\")),U:a[0]},$.4Q(a.2d(\"2u-M\")))},53:K(b,c){I d=$(c.U);I e=G.2C(d);I f=e.1S;I g=e.52;I h=c.M;I j=[];d.7z();H(c.2w){j=c.2w}T H(G.2A.2q(f)||f==='7A'){j=[e]}T{I k=[];I l=[];I m=Q;$(\"a[\"+g+\"], 7B[\"+g+\"]\",G.7C).4X(\"[\"+g+\"=\\\"\"+f+\"\\\"]\").1V($.X(K(i,a){H(d[0]===a){k.4u(G.2C(a));m=O}T H(m==Q){l.3P(G.2C(a))}T{k.3P(G.2C(a))}},G));j=k.7D(l)}$.16(j,h,c.1J,d);P Q},2A:{2q:K(a){H(a==26)P O;H(3E.3f.4R.3k(a)==='[2h 3Q]'||$.1d(a)===\"54\")P a.2f===0}}},16:K(a,b,c){I d=[];H($.29.2A.2q(a)){P $.29}H($.1d(a)===\"3F\"){d=[$.1c({},{1h:a},b)]}T H($.1d(a)===\"54\"){I e=a[0];H($.1d(e)===\"3F\"){2M(I i=0;i<a.2f;i++){d[i]=$.1c({},{1h:a[i]},b)}}T H($.1d(e)===\"2h\"){2M(I i=0;i<a.2f;i++){d[i]=$.1c({},b,a[i])}}}T H($.1d(a)===\"2h\"&&a[0].7F){d=[$.1c({},{1d:\"U\",1h:\"#\",U:a},b)]}P $.29.13(d,b,c)}});$.1C.16=K(a,b){I c={\"55\":G.55,\"M\":a,\"1J\":b};P $(G).7H('1Q',K(e){e.2t();e.7I();P $.X($.29.53,$.29)(e,$.1c({},c,{\"U\":G}))})};$(K(){H(2J($.1C.2Y)>1.2){$.29.36()}T{7J\"4p 3o 2L 7L 7M 4q 4i 7N 7O. 7P 7Q 7R 3o 1.3+\";}})})(3o,7S,5h);",62,490,"||||||||||||||||||||||||||||||||||||||||||this|if|var|height|function|width|options|div|true|return|false|esqueleto|buttons|else|element|amp|css|proxy|com|move||split|class|show||id|lightbox|index|url|reg|image|html|extend|type|http|iframe|left|href|button|visible|name|top|background|win|close|bind|resize|zIndex|shim|max|span|empty|style|duration|opacity|maps|overlay|flash|fn|google|ajax|navigator|easing|www|title|callback|maximized|hide|autoplay|video|parseInt|morph|click|stop|rel|display|custom|each|complete|browser|isFunction|position||animation|modal|border|none|swf|null||embed|LightBoxObject|transition|match|append|attr|unbind|length|animate|object|animations|indexOf|movebox|mode|error|removeClass|100|queue|isEmpty|replace|the|preventDefault|data|appendhtml|gallery|right|loading|new|utils|easeOutBack|getOptions|src|onOpen||maxsize|apply|hidden|parseFloat|collegehumor|version|for|fx|cufon|trigger|step|msie|prev|toLowerCase|moogaloop|bottom|target|400|jquery|triggerHandler||touchend|absolute|JSON|onClose|addClass|create||changemode||margin|Date|youtube|next|emergefrom|prototype|bing|shake|outerHeight|output|call|block|loadimage|ratio|jQuery|calculate|inline|flashvars|autoresize|vimeo|player|getTime|force|outerWidth|end|fullscreen|metacafe|dailymotion|gametrailers|keyCode|Object|string|trim|autostart|min|ustream|255|twitvid|body|overflow|vzaar|push|String|You|custombuttons|create_gallery|ex|maximinimize|total|addevents|Next|open||Previous|middle|closeDuration|showDuration|fadeTo|frameborder|IF_|inject|unserialize|imgsreg|ms|Math|round|wordpress|substring|tv|clip_id|is|color|watch|load|enablejsapi|fs|be|The|loaded|youtu|videoregs|360|unshift|have|to|specify|640|size|Add|600|at|of|swf2html|padding|loops|distance|defaults|alert|param|Cufon|scrollLeft|scrollTop|parse|typeof|parseJSON|toString|self|animatedProperties|Function|specialEasing|90|filter|slice|userAgent||arguments|relent|link|array|selector|mapsreg|5331|endPercent|6292|999|locale|en_US|onorientationchange|mobile|scroll|keydown|document|s0|videopress|guid|01|videoplay|googleplayer|hl|en|docId|android|videos|pop|view|shift|flashplayer|Boolean|Invalid|Number|update|200|emid|3ede2bc8|227d|8fec|d84a|00b6ff19b1cb|googletv|800|streetview|layer|htc_flyer|elem|googlev2|now|prop|jp|_default|gif|png|bmp|tiff|Array|isArray|search|RegExp|substr|opera|Image|test|70158|mini|onerror|fixed|bfnrt|requested|cannot|GET|Please|try|again|later|clone|cache|dataType|hd|show_title|show_byline|show_portrait|9a|fA|mobi|fplayer|playerVars|autoPlay|static|abort|AJAX|Error|status|success|relative|lighbox|yes|iphone|scrolling|rgba|no|additionalInfos|classid|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|allowFullScreen|allowscriptaccess|always|wmode|transparent|application|shockwave|fullscreenbutton|autoStart|value|chrome|insertAfter|undefined|refresh|windows|99999|remote_wrap|php|mid|speed|collegehumornew|_mark|phone|curAnim|470|jukebox|in|eE|swing|cur|px|mozilla|use_node_id|280|makeArray|get|removeAttribute|os|matchedlnks|isFinite|loc|children|vid|Close|disabledComment|blur|nofollow|area|ownerDocument|concat|beginPercent|nodeType|init|live|stopImmediatePropagation|throw|Maximize|that|was|too|old|Lightbox|Evolution|requires|window|svembed".split("|"),0,{}))