<!-- Copyright 2002 Bontrager Connection, LLC
// You may use this so long as the copyright notice, above, 
//   and the "information" statement with URL, below, are 
//   retained.
// Instructions and more information can be obtained with
//   the "Checkbox Controls" article linked from
//   the WillMaster Library
//
// (Version 1.0, December 9, 2002, original release version.)

function SetDocText(id, value){

            document.getElementById(id).innerHTML = value;

        }


function GetValueById(id)

        {

           return document.getElementById(id).value;                

        }
		
function DecimalValue(value)

        {

            return Math.round(value)

        }		



// Function for Form F2

function TotalCheckedValues() {
var total = 0;
var deposit = 0;
var hourly = GetValueById("hourly");
if(document.F2.a.checked == true) { total = parseFloat(document.F2.a.value) * hourly; }
if(document.F2.b.checked == true) { total += parseFloat(document.F2.b.value) * hourly; }
if(document.F2.c.checked == true) { total += parseFloat(document.F2.c.value); }
if(document.F2.d.checked == true) { total += parseFloat(document.F2.d.value) * hourly; }
if(document.F2.e.checked == true) { total += parseFloat(document.F2.e.value) * hourly; }
if(document.F2.f.checked == true) { total += parseFloat(document.F2.f.value) * hourly; }
if(document.F2.g.checked == true) { total += parseFloat(document.F2.g.value) * hourly; }
if(document.F2.h.checked == true) { total += parseFloat(document.F2.h.value) * hourly; }
var ts = new String(total);
if(ts.indexOf('.') < 0) { ts += '.00'; }
if(ts.indexOf('.') == (ts.length - 2)) { ts += '0'; }
var deposit = DecimalValue(ts / 3);
SetDocText("Total", ts);
SetDocText("deposit", deposit);
//SetDocText("hourlyRate", hourly);
//SetDocText("estimatedTotal", ts);
document.F2.hourlyRate.value = hourly;
document.F2.estimatedTotal.value = ts;


}

