function init(){
		of = document.orderform;
		//alert("init");
	}

	function setSettings(xyz){
		
		of.GasPricePerGallon.value = 2.50.toFixed(2);
		if(xyz == 'econcar'){
			//alert('sadf');
			of.VehicleType.value = 'Ecomomy Car';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 12500;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 25;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'econtruck'){
			//alert('sadf');
			of.VehicleType.value = 'Economy Truck';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 16000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 15;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'fulltruck'){
			//alert('sadf');
			of.VehicleType.value = 'Full Size Truck';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 18000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 12;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'cargovan'){
			//alert('sadf');
			of.VehicleType.value = 'Cargo Van';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 24000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 12;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'medboxtruck'){
			//alert('sadf');
			of.VehicleType.value = 'Medium Size Truck';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 34000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 10;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'lgeboxtruck'){
			//alert('sadf');
			of.VehicleType.value = 'Large Box Truck';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 55000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 8;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else if(xyz == 'trailer'){
			//alert('sadf');
			of.VehicleType.value = 'Tractor Trailer';
			of.numVehicles.value = 1;
			of.AveVehicleCost.value = 75000;
			of.MilesPerDay.value = 250;
			of.MilesPerGallon.value = 6;
			of.numDaysOperational.value = 20;
			CalcVehicle2();
		}
		else{
			alert('HUH????');
		}
		return true;
	}
	

	
	function CalcVehicle2(){
		init();
		var tempCalc = 0;
		var totalmonthly = 0;
		
		if(!of.numVehicles.value || !of.AveVehicleCost.value || !of.MilesPerDay.value || !of.MilesPerGallon.value || !of.GasPricePerGallon.value || !of.numDaysOperational.value){
			alert('Please enter all vehicle expense values');
			return false;
		}
		
		var numVeh = parseFloat(of.numVehicles.value);
		var aveCost =  parseFloat(of.AveVehicleCost.value);
		var milesDay = parseFloat(of.MilesPerDay.value);
		var milesGallon = parseFloat(of.MilesPerGallon.value);
		var gallonPrice = parseFloat(of.GasPricePerGallon.value);
		var numDaysOp = parseFloat(of.numDaysOperational.value);
		
		tempCalc = numVeh * aveCost * 0.025;
		of.LoanPayment.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = numVeh * aveCost * 0.0015;
		of.Licenses.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = numVeh * aveCost * 0.015;
		of.Taxes.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = ((milesDay/milesGallon) * numDaysOp * gallonPrice) + 45;
		of.GasOilGrease.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = numVeh * aveCost * 0.0185;
		of.Insurance.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = numVeh * aveCost * 0.0015;
		of.ActionsNotIndem.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		tempCalc = numVeh * aveCost * 0.0113;
		of.NormalMaintenance.value = tempCalc.toFixed(2);
		totalmonthly = totalmonthly + tempCalc;
		
		of.TotalVehExpense.value = totalmonthly.toFixed(2);
		
		// do the second set
		var totalmonthlyemp = 0;

		if(!of.numDrivers.value || !of.HourlyRate.value || !of.OvertimeRate.value || !of.RegularHours.value || !of.OverTimeHours.value || !of.VacationSickDays.value){
			alert('Please enter all employment expense values or choose a vehicle type');
			return false;
		}
		
		var numDrive = parseFloat(of.numDrivers.value);
		var rateHourly =  parseFloat(of.HourlyRate.value);
		var rateOver = parseFloat(of.OvertimeRate.value);
		var numRegHours = parseFloat(of.RegularHours.value);
		var numOverHours = parseFloat(of.OverTimeHours.value);
		var vacaSickDays = parseFloat(of.VacationSickDays.value);
		
		tempCalc = (numDrive*rateHourly*numRegHours + numDrive*numOverHours*rateOver) * 52 / 12;
		of.Wages.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		var theWages = tempCalc;
		tempCalc = theWages * 0.0765;
		of.SSContribution.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		tempCalc = theWages * 0.008;
		of.UnemployComp.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		tempCalc = theWages * 0.08;
		of.WorkmanComp.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		tempCalc = theWages * 0.004;
		of.DrugScreenTrain.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		tempCalc = 5 * 8 * rateHourly / 12;
		of.VacationSickLeave.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;
		
		tempCalc = theWages * 0.065;
		of.FringeBenefits.value = tempCalc.toFixed(2);
		totalmonthlyemp = totalmonthlyemp + tempCalc;

		of.TotalMonthlyEmpExpense.value = totalmonthlyemp.toFixed(2);

		tempCalc = totalmonthlyemp + totalmonthly;
		of.MonthlyAveEmpExpense.value = tempCalc.toFixed(2);
		
		tempCalc = (totalmonthlyemp + totalmonthly) * 12 / 250;
		of.DailyAveEmpExpense.value = tempCalc.toFixed(2);
	}