ÿþ<HTML> <HEAD> <TITLE>Comuting Cost</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <META NAME="Generator" CONTENT="Microsoft Word 97"> <center> <script language="javascript"> <!-- function calc() { // calculate the cost tmp = eval(document.cost.commute_days.value) * ( eval(document.cost.parking_rate.value) + ( eval(document.cost.miles_each_way.value) * 2 * eval(document.cost.cost_mile.value) ) ); // format the result to two decimal places tmp = Math.round(tmp * 100); cents = tmp % 100; tmp = ( tmp - cents ) / 100; if ( cents < 10 ) cents = "0" + cents; document.cost.monthly_cost.value = tmp + "." + cents; } function pay() { calc(); // calculate the total cost tmp = eval(document.payback.bike_cost.value) + eval(document.payback.accs_cost.value); // format the result to two decimal places tmp = Math.round(tmp * 100); cents = tmp % 100; tmp = ( tmp - cents ) / 100; if ( cents < 10 ) cents = "0" + cents; document.payback.tot_cost.value = tmp + "." + cents; // figure the payback // money saved per month by biking tmp = document.cost.monthly_cost.value * document.payback.bike_days.value / document.cost.commute_days.value; // then figure months for payback tmp = document.payback.tot_cost.value / tmp; // format the result to at most 1 decimal place document.payback.payback_months.value = Math.round(tmp * 10) / 10; } //--> </script> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body> <br> <!--form begins--> <p class="bodycopy"><span class="awardblackdate"><b>Is Your Commute Breaking the Bank?</b></span><br> <br> Not only is bike commuting good for your body, it s good for your bankbook.<br> That s because driving a car to work costs plenty.<br> Apart from the environmental price, you part with cold hard cash<br> every time you turn the ignition. How much?<br> Check out the handy calculator below to see how much you re shelling<br> out to ride the bumper-to-bumper express.<br> By contrast, you ll learn how biking to work only two days<br> a week can make your wallet feel a little fuller.</p> <hr width="40%" size="1" noshade> <p class="bodycopy"><strong>Estimated Cost of Driving</strong></p> <p class="bodycopy"> <form name="cost"> Commute days per month: <input type="text" name="commute_days" value="20"><br> Parking cost per day: <input type="text" name="parking_rate" value="10"><br> Miles driven each way: <input type="text" name="miles_each_way" value="10"><br> Average vehicle cost per mile: <input type="text" name="cost_mile" value="0.525"><br> <strong>Monthly cost to drive:</strong> <input type="text" name="monthly_cost" value="" readonly><br> <input type="button" name="calculate" value="Calculate Cost" onClick="javascript:calc()"> </form> </p> <hr width="40%" size="1" noshade> <p class="bodycopy"><strong>Estimated Payback</strong></p> <p class="bodycopy"> <form name="payback"> Commute days biked per month: <input type="text" name="bike_days" value="8"><br> Cost of Bicycle: <input type="text" name="bike_cost" value="500"><br> Cost of accessories and special clothing: <input type="text" name="accs_cost" value="100"><br> Total cost: <input type="text" name="tot_cost" value="" readonly><br> <strong>Payback in months:</strong> <input type="text" name="payback_months" value="" readonly><br> <input type="button" name="calculate2" value="Calculate Payback" onClick="javascript:pay()"> </form> </p> <hr width="40%" size="1" noshade="noshade"> <p class="bodycopy"><strong>Not yet calculated benefits include</strong></p> Less traffic congestion<br> Less air pollution<br> Healthier citizens<br> <br> </center> <center><p><a href="friends.htm"><img src="../bikeflash.gif" width="105" height="40"></a></p></center> </FONT> </BODY> </HTML>