var allowedCharacters = "- ";

function okNumericFields(fo)
{
   // 1. check for errors in the numeric fields : SET and ATA number
  	if(fo.corporateAccountNumber == null || fo.iATANumber == null)
		return true;

	var set = fo.corporateAccountNumber.value;
	var ata = fo.iATANumber.value;

	set = stripCharsInBag(set, allowedCharacters) ;

	if( set != '' && ! isInteger(set) ) // commonErr.js
	{
		error('SETNotNumeric', fo.corporateAccountNumber);
		return false;
	}

	if( ata != '' && ! isInteger(ata) )
	{
		error('ATANotNumeric', fo.iATANumber);
		return false;
	}

	// 2. check if both promo code & rate paln are filled
	if(fo.promotionCode == null || fo.ratePlanName == null || fo.ratePlanName.options == null)
		return true;

	var pro = fo.promotionCode.value;
	var rate = fo.ratePlanName.options[fo.ratePlanName.selectedIndex].value;

	if( pro != '' && rate != '')
	{
		error('promoAndRate', fo.promotionCode, fo.ratePlanName);
		return false;
	}
    // 3. check if both promo code and SET number  are entered
    if (set != '' && pro != '') {
        error('promoAndSET', fo.promotionCode, fo.corporateAccountNumber);
        return false;
    }

    if (set != '' && rate != '') {
		error('setAndRate',fo.corporateAccountNumber, fo.ratePlanName);
		return false;
	}
	// last but not least, force call the onsubmit evt hdler (Netscape bug) so that
	// generic checks such as illegal chars entered (commonErr.js) take place before submitting..
     //return fo.onsubmit() ? true : false;
    return true;
}