// Quote Validation

<!--
   function ValidateForm(f){

      with(f){
         if (isEmpty(_5_Name.value)) {
            alert("Please enter your Name");
            _5_Name.focus();
            return false;
         }

         if (isEmpty(_9_Email_From.value)) {
            alert("Please enter your Email Address");
            _9_Email_From.focus();
            return false;
         }

         if ( !isEmail(_9_Email_From.value) ) {
            alert("Please enter a valid Email Address.");
            _9_Email_From.focus();
            return false;
         }

         if (!isEmpty(_6_Telephone.value)) {
	         if (!IsNumber(_6_Telephone.value, true)) {
            	alert("Please enter only numbers for your Phone");
            	_6_Telephone.focus();
            	return false;
         	}
         }

   	}
   return true;
 }
//-->

<!--//
function isEmpty (s) {
    if ( s == "" || s == null ) {
        return true;
    }
    return false;
}

function isDigit (c) {
    return ( ((c >= "0") && (c <= "9")) || (c == " ") || (c == "."));
}    

function isInteger (s) {
    for ( var i = 0; i < s.length; i++ ) {
        var c = s.charAt(i);
        if ( !isDigit(c) ) return false;
    }
    return true;
}    

function chkInteger (e) {
    var sErrMsg = "Please enter a number only, no commas, brackets or dashes etc.";
    with (e) {
        if ( !isEmpty(value) ) {
            if ( !isInteger(value) ) {
                alert(sErrMsg);
                focus();
                select();
                return false;
            }
        }
    }
}    

function chkNumber (nval) {
	if ( !isEmpty(nval) ) {
		if ( !isInteger(nval) ) {
			return false;
		}
		else {
			return true;
		}
	}
}    

function roundDollar(amount)
{
    var s = "";
    var decimal;
    amount = parseFloat(amount);
    if ( !( isNaN(amount) ) ) {
        amount = Math.round(amount * 100);
        amount = amount / 100;
        s = new String(amount);
        decimal = s.indexOf(".");
        if ( decimal == -1 ) {
            s+= ".00";
        }
        else {
            if ( decimal == (s.length - 2) ) {
                s+= "0";
            }
        }
    } else {
        s = "0.00";
    }
    return s;
}

function CalcCost(fname) {
	var iqty, dcost, dtotal, iCnt, itotal, sNewName

	//trim the numbers off the field name
	sNewName	= fname.substr(4,99);
	if ( sNewName.charAt(0)=="_" )
		{
			sNewName = fname.substr(5,99);
		}

	//read in and check the value
	if ( chkInteger(eval("document.Comments." + fname))== false ) return false;
	iqty 		= eval("document.Comments." + fname + ".value");
	dcost 	= eval("document.Comments." + sNewName + "_COST.value");

	//calculate the cost and display
	dtotal	= iqty * dcost;
	theobj 	= eval("document.Comments." + sNewName + "_TOTAL");
	theobj.value = roundDollar(dtotal);

	//calculate the total
	itotal	= 0;

	if ( chkNumber(eval("document.Comments.bed1_king_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_king_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_queen_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_queen_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_dbl_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_dbl_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_single_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_single_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_bedside_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_bedside_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_chest_drawers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_chest_drawers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_dressing_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_dressing_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_wardrobe_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_wardrobe_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed1_cot_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed1_cot_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_king_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_king_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_queen_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_queen_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_dbl_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_dbl_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_single_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_single_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_bedside_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_bedside_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_chest_drawers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_chest_drawers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_dressing_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_dressing_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_wardrobe_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_wardrobe_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed2_cot_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed2_cot_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_king_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_king_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_queen_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_queen_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_dbl_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_dbl_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_single_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_single_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_bedside_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_bedside_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_chest_drawers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_chest_drawers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_dressing_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_dressing_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_wardrobe_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_wardrobe_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed3_cot_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed3_cot_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_king_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_king_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_queen_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_queen_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_dbl_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_dbl_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_single_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_single_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_bedside_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_bedside_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_chest_drawers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_chest_drawers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_dressing_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_dressing_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_wardrobe_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_wardrobe_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed4_cot_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed4_cot_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_king_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_king_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_queen_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_queen_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_dbl_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_dbl_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_single_bed_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_single_bed_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_bedside_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_bedside_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_chest_drawers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_chest_drawers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_dressing_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_dressing_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_wardrobe_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_wardrobe_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.bed5_cot_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.bed5_cot_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_armchair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_armchair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_bureau_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_bureau_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_china_cab_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_china_cab_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_cocktail_cab_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_cocktail_cab_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_coffee_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_coffee_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_desk_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_desk_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_ent_unit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_ent_unit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_suite_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_suite_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_ocasional_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_ocasional_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_other_chairs_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_other_chairs_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_piano_organ_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_piano_organ_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_rug_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_rug_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_speakers_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_speakers_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_lamp_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_lamp_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_stereo_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_stereo_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_video_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_video_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_video_cabinet_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_video_cabinet_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_wall_unit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_wall_unit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.lounge_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.lounge_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_ent_unit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_ent_unit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_lounge_suite_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_lounge_suite_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_coffee_tbl_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_coffee_tbl_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_pool_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_pool_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_settee_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_settee_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_stereo_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_stereo_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_tv_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_tv_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_video_cab_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_video_cab_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_wall_unit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_wall_unit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.family_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.family_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_buffet_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_buffet_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_diningchairs_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_diningchairs_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_wallunit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_wallunit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_dresser_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_dresser_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_chairsother_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_chairsother_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.dining_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.dining_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_bench_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_bench_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_hallstand_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_hallstand_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_halltable_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_halltable_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_hatstand_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_hatstand_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_pedestal_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_pedestal_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_phonetable_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_phonetable_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.hall_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.hall_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_bookcase_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_bookcase_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_computer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_computer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_desk_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_desk_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_filingcabinet_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_filingcabinet_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_wallunit_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_wallunit_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.study_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.study_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_cabinet_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_cabinet_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_dishwasher_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_dishwasher_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_dresser_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_dresser_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_freezer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_freezer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_microwave_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_microwave_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_fridge_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_fridge_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_stool_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_stool_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.kitchen_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.kitchen_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_clothesdryer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_clothesdryer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_freezer_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_freezer_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_ironingboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_ironingboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_linenbasket_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_linenbasket_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_washingmachine_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_washingmachine_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.laundry_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.laundry_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_bbq_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_bbq_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_bicycle_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_bicycle_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_dogkennel_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_dogkennel_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_bench_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_bench_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_outdoortable_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_outdoortable_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_chair_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_chair_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_lawnmower_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_lawnmower_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_fridge_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_fridge_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_swing_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_swing_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_table_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_table_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_trampoline_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_trampoline_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_trunktoolbox_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_trunktoolbox_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_cupboard_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_cupboard_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_wheelbarrow_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_wheelbarrow_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_workbench_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_workbench_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_cartons_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_cartons_TOTAL.value"));
		}

	if ( chkNumber(eval("document.Comments.outside_plants_TOTAL.value"))== true )
		{
			itotal += parseFloat(eval("document.Comments.outside_plants_TOTAL.value"));
		}

	document.Comments._203_estimated_volume.value = roundDollar(itotal);
	DisplayTime();
}

function CalcTimePickup(){
	var iItemSelected = 0;
	var iLevel = 1;
	var iTotalTime = 0;
	var iVolume = document.Comments._203_estimated_volume.value;


	if ( iVolume > 0) {
		iVolume = iVolume / 5;
	} else {
		iVolume = 0;
	}	
	if ( document.Comments._17_pickup_select[0].checked == true ){
		if ( document.Comments._17_pickup_select_unit_level.value > 0) {
			iLevel = document.Comments._17_pickup_select_unit_level.value
		}
	}

	if ( document.Comments._17_pickup_select[1].checked == true ){
		iTotalTime = iTotalTime + parseInt((iLevel * 30) * iVolume);
		iItemSelected = 1;
	} else if ( document.Comments._17_pickup_select[0].checked == true ){
		iTotalTime = iTotalTime + parseInt(90 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._17_pickup_select[2].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._17_pickup_select[3].checked == true ){
		iTotalTime = iTotalTime + parseInt(90 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._17_pickup_select[4].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._17_pickup_select[5].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( iItemSelected == 0 ){
		iTotalTime = parseInt(30 * iVolume);
	}

	return iTotalTime / 60;
}

function CalcTimeDeliver(){
	var iItemSelected = 0;
	var iLevel = 1;
	var iTotalTime = 0;
	var iVolume = document.Comments._203_estimated_volume.value;
	if ( iVolume > 0) {
		iVolume = iVolume / 5;
	} else {
		iVolume = 0;
	}	
	if ( document.Comments._25_delivery_select[0].checked == true ){
		if ( document.Comments._25_delivery_select_unit_level.value > 0) {
			iLevel = document.Comments._25_delivery_select_unit_level.value
		}
	}
	if ( document.Comments._25_delivery_select[1].checked == true ){
		iTotalTime = iTotalTime + parseInt((iLevel * 30) * iVolume);
		iItemSelected = 1;
	} else if ( document.Comments._25_delivery_select[0].checked == true ){
		iTotalTime = iTotalTime + parseInt(90 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._25_delivery_select[2].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._25_delivery_select[3].checked == true ){
		iTotalTime = iTotalTime + parseInt(90 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._25_delivery_select[4].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( document.Comments._25_delivery_select[5].checked == true ){
		iTotalTime = iTotalTime + parseInt(60 * iVolume);
		iItemSelected = 1;
	}
	if ( iItemSelected == 0 ){
		iTotalTime = parseInt(30 * iVolume);
	}
	return iTotalTime / 60;
}

function DisplayTime(){
	var iTimePickup = CalcTimePickup();
	var iTimeDeliver = CalcTimeDeliver();
	var iTotalTime = iTimePickup + iTimeDeliver;

	var iVolume = document.Comments._203_estimated_volume.value;

	if ( iVolume > 0) {
		iVolume = iVolume / 5;
	} else {
		iVolume = 0;
	}	

	// The maximum the base price can be multiplied by before additions are ignored
	var iThreshold = 2;
	// The total time (if no pickup or delivery additions were selected)
	var iBaseTotalTime = (parseInt(30 * iVolume) / 60) * 2;
	iBaseTotalTime = Math.round(iBaseTotalTime*100)/100;

//	alert(Math.round(iBaseTotalTime*100)/100);
//	alert(Math.round(iTotalTime*100)/100);

/*	var iOrigTotalTime = parseInt(document.Comments._200_total_time.value);

	if (iOrigTotalTime > 0)
	{
		if (iTotalTime > (iOrigTotalTime * 2))
		{
			alert(iOrigTotalTime);
			alert(iTotalTime);
		}
	}*/

	if ((Math.round(iTotalTime*100)/100) > (iBaseTotalTime * iThreshold))
		document.Comments._200_total_time.value = (iBaseTotalTime * iThreshold);
	else
		document.Comments._200_total_time.value = Math.round(iTotalTime*100)/100;
}
//-->
