    //--------------------------------------------------
    function update(obj) {
	if (Number(obj.value)<0 || isNaN(Number(obj.value))) {
		//alert('Entry must be a valid positive number or zero');
		obj.value = '???';
    		obj.focus();
		obj.className = 'error';
	} else {
		obj.className = 'reqinput';
	}
	WB_Calculate();
    }

    //--------------------------------------------------
    function WB_ValidateInput()
    {
      with (document.WBCalc)
      {
        if (    (isNaN(Number(frontWeight.value))  ||
                 isNaN(Number(rearWeight.value))   ||
                 isNaN(Number(fuelQuant.value))    ||
                 isNaN(Number(baggageWeight.value))  )
	) {
	   totalWeight.value = '???';
	   totalWeight.style.background = '#996666';
           totalMoment.value = '???';
	   totalMoment.style.background = '#996666';
	   document.images.crossHairImage.style.visibility = "hidden";
	   return(false);
	} else {
	   totalWeight.style.background = '';
           totalMoment.style.background = '';
	}
      }
    return(true);
    }


