﻿				defaultStatus="HWTC - Hodges Westside Truck Center";

				if (document.images){
				img1on = new Image();
				img1on.src="images/lightdutybut5.gif";
				img2on = new Image();
				img2on.src="images/mediumduty_undCDL_on.gif";
				img2bon = new Image();
				img2bon.src="images/mediumduty_overCDL_on.gif";
				img3on = new Image();
				img3on.src="images/heavydutybut5.gif";
				img4on = new Image();
				img4on.src="images/dump_truck_flatbed_red.gif";
				img5on = new Image();
				img5on.src="images/servicebut5.gif";
				img6on = new Image();
				img6on.src="images/partsbut5.gif";
				img7on = new Image();
				img7on.src="images/contactbut5.gif";
				img8on = new Image();
				img8on.src="images/homebut5.gif";
				img9on = new Image();
				img9on.src="images/trailers_red.gif";
				img10on = new Image();
				img10on.src="images/button_warranty_on.gif";
				img11on = new Image();
				img11on.src="images/button_subscribe_on.gif";
				newsimgon = new Image();
				newsimgon.src="/images/news_red.gif";
				img12on = new Image();
				img12on.src="images/button_wholesale_over.gif";
				img13on = new Image();
				img13on.src="images/button_motorhome_on.gif";
				specialson = new Image();
				specialson.src="images/specials-smaller2.gif";
				ebayon = new Image();
				ebayon.src="images/leftnav_ebay2.gif";
				partcaton = new Image();
				partcaton.src="images/buttons/button_partscat2.gif";
				imgCabChassison = new Image();
				imgCabChassison.src = "images/cab_chassis_red.gif";
				

				img1off = new Image();
				img1off.src="images/lightdutybut4.gif";
				img2off = new Image();
				img2off.src="images/mediumduty_undCDL_off.gif";
				img2boff = new Image();
				img2boff.src="images/mediumduty_overCDL_off.gif";
				img3off = new Image();
				img3off.src="images/heavydutybut4.gif";
				img4off = new Image();
				img4off.src="images/dump_truck_flatbed_wh.gif";
				img5off = new Image();
				img5off.src="images/servicebut4.gif";
				img6off = new Image();
				img6off.src="images/partsbut4.gif";
				img7off = new Image();
				img7off.src="images/contactbut4.gif";
				img8off = new Image();
				img8off.src="images/homebut4.gif";
				img9off = new Image();
				img9off.src="images/trailers_wh.gif";
				img10off = new Image();
				img10off.src="images/button_warranty.gif";
				img11off = new Image();
				img11off.src="images/button_subscribe.gif";
				newsimgoff = new Image();
				newsimgoff.src="/images/news_wh.gif";
				img12off = new Image();
				img12off.src="images/button_wholesale.gif";
				img13off = new Image();
				img13off.src="images/button_motorhome.gif";
				specialsoff = new Image();
				specialsoff.src="images/specials-smaller1.gif";
				ebayoff = new Image();
				ebayoff.src="images/leftnav_ebay1.gif";
				partcatoff = new Image();
				partcatoff.src ="images/buttons/button_partscat1.gif";
				imgCabChassisoff = new Image();
				imgCabChassisoff.src = "images/cab_chassis_wh.gif";


				}

				function imgOn (imgName){
					if(document.images){
								document[imgName].src=eval(imgName + "on.src");
								}
				}
				function imgOff (imgName){
					if(document.images){
								document[imgName].src=eval(imgName +"off.src");
								}
				}
				
				function openWin1() {
				msg=window.open("http://www.mapquest.com/maps/map.adp?addtohistory=&countrycode=250&country=US&address=11201+S+Grant+Hwy&city=Marengo&state=IL&zipcode=60152&submit.x=23&submit.y=12","1","height=450,width=650,left=0,top=25,status=no,menubar=no,resizable=yes,scrollbars=yes,location=no");
				}


/* payment calculator */

		/*
		*************************************************
		********* JavaScript Implementation *************
		*************************************************

		Loan Calculator by Sidney Forcier
		sf01@sidneyforcier.com
		
		The formula for calculating loan payments is:
			Pi / (q * (1 - (1 + (i / q))^(-nq)

		Where the variables are as follows:

		 P - The amount of the loan (after down payment)
		 i - The interest expressed as a decimal (e.g. 8% is .08)
		 n - The number of term units (e.g. number of years)
		 q - The number of payments per term unit (e.g. 12 months)

		You can enhance the formulas below by allowing the user to change the number 
		of payments per year if you wish. I have hard-coded the payments to monthly.
		*/
		function CalculatePayments(principal, down_payment, interest, years)
		{
			var x = ((principal - down_payment) * interest / (12 * (1 - Math.pow(1 + (interest / 12), (-years * 12)))));
			return Math.floor(x * 100) / 100
		}
		
		function ShowPayments()
		{
			var x = CalculatePayments(document.getElementById('jsPrincipal').value, document.getElementById('jsDownPayment').value, document.getElementById('jsInterest').value / 100, document.getElementById('jsYears').value);
			if (isNaN(x))
				document.getElementById('jsResult').value = 'Could not compute';
			else
				document.getElementById('jsResult').value = x;
		}