function getNum(theField) {

  val = theField.value;

  return (!val || isNaN(val)) ?0:parseInt(val,10); 

}

function addFields(theForm) {

  total = 0;

  total += getNum(theForm.latecardpayments); // we could loop here too

  total += getNum(theForm.laterentmortgage);

  total += getNum(theForm.lateother);

  total += getNum(theForm.income);

  total += getNum(theForm.activecreditcard);

  total += getNum(theForm.goodcredit);

  total += getNum(theForm.deniedcredit);

  total += getNum(theForm.percentbills);

  total += getNum(theForm.bankruptcy);

  if (total ==0) {

    alert('You may have a good credit score and qualify for all servicesl')

    return false

  }

  url = (total < 300) ? "http://creditfederal.com/search/search.cgi?Terms=BrowseExcellentCreditScoreOffers":
  url = (total < 500) ? "http://creditfederal.com/search/search.cgi?Terms=BrowseFairCreditScoreOffers":
  url = (total < 700) ? "http://creditfederal.com/search/search.cgi?Terms=BrowsePoorCreditScoreOffers":"http://creditfederal.com/search/search.cgi?Terms=BrowseBadCreditScoreOffers"

  window.location=url

  return false

}
