function onlyint(e)
{
	if (window.event) keynum = e.keyCode;
	else if (e.which) keynum = e.which;

	if (keynum == 0x08) return true;
	else if (keynum == 0x09) return true;
  else if (keynum == 0x20) return true;
  else if ((keynum == 0x28) || (keynum == 0x29)) return true;
	else if ((keynum == 0x24) || (keynum == 0x2E) ||
           (keynum == 0x2C) || (keynum == 0x2D)) return true;
	else if ((keynum >= 0x30) && (keynum <=0x39)) return true;
	return false;
}

function checkForm(f) {
   if (f.fname.value.length < 1) {
        alert("Please enter first name.");
        f.fname.focus(); 
        return false;
     }

   if (f.lname.value.length < 1) {
      alert("Please enter last name.");
      f.lname.focus(); 
      return false;
   }     

  if (f.email.value.indexOf("@") + "" == "-1" || f.email.value.indexOf(".") + "" == "-1" || f.email.value == "" )
     { 
      alert("Please enter email address in correct format.");
      f.email.focus();
      return false;
     }
  if (f.email.value != f.cEmail.value)
  {
    alert ("Please verify your email address.");
    f.cEmail.value="";
    f.cEmail.focus();
    return false;
  }
  return true;
}    

function popup(arg) {
  if (arg == 'employed')
    str="Are you Currently Employed?\nIf you are currently employed, the answer is 'yes'.\nIf otherwise you are in business for yourself, disabled, or currently unemployed, state 'no'.";
  else if (arg == 'minor')
    str="Please indicate yes or no whether you were under the age of 18 years old when your personal injury case or structured settlement was settled";
  else if (arg == 'occupation')
    str="State your occupation or if you do not work, and your spouse is employed, state your spouse's occupation.  Otherwise, state how you currently are paying your monthly bills and living expenses.";
  else if (arg == 'paymentType' )
    str="A legal agreement regarding a personal injury lawsuit settlement that provides for the injured person(s) through a series of monthly, quarterly, annual or other future payments funded by an insurance company.";
  else if (arg == 'paymentInterval' )
    str="Monthly Payments  The most common structured settlement future payment form. Generally guaranteed for 10, 20, or 30 years and life thereafter.\n\nQuarterly Payments  If you are receiving future payments 4 times a year, and each payment is received every 3 months on the same day, the payments are quarterly.\n\nAnnual Payments  If you are receiving future payments once every year on the same date, the payments are annual.\n\nPeriodic Lump Sum Payments  The second most common structured settlement future payment form.  If you are receiving payments every 2, 3, 4, 5 or more years apart on the same month and day, the payments are referred to as periodic lump sum payments.";
  else if (arg == 'Entity')
    str="Name of the Company or Agency Making Payments to You\nGenerally, this is the insurance company that insured the person or firm you sued.  Look on the bank check your payments are made on, or your bank statement if direct deposited.  Also, you may have a copy of the Annuity Policy or Settlement & Release Agreement that states the name of the insurance company.";
  else if (arg == 'Amount')
    str="Please state the amount of cash now that you need to accomplish your financial goal(s).  This will help us calculate the minimum number/amount of payment(s) to sell to meet your needs.  For example:  If you need $25,000 to payoff all your credit card debt, state $25,000-$30,000.  Leave blank if you do not know or are uncertain.";
  else if (arg == 'first')
    str="This is the month, day, and year of your very first scheduled monthly payment.  If your schedule of payments states that you are to receive $500 per month for 360 payments starting  on July 1, 2000, then the date July 1, 2000 is the \"Date of First Monthly Payment Received\".";
  else if (arg == 'last')
    str="This is the month, day, and year of the very last monthly payment.  If your schedule of payments states that you are to receive $500 per month for 360 payments starting on July 1, 2000 and ending on June 1, 2030, then June 1, 2030 is the \"Date of Final Monthly Payment\".";
  else if (arg == 'guaranteedMoney')
    str="Generally, your monthly payments are guaranteed for a certain period in the future, most commonly for 10, 20, or 30 years.  This means if you should pass away prior to the final guaranteed payment being received, the remaining payments in the guaranteed period will be paid to your beneficiary.  For example, if your payments are guaranteed for 30 years and you have listed a member of your family as your beneficiary and you pass away after receiving 180 monthly payments (15 years), then the remaining 15 years of payments in the guaranteed period (30 years) are paid every month to your selected family member, ending after 360 monthly payments (the end of the original guaranteed period).  If your guaranteed period is \"life with a 30 year certain period\", and you live beyond receiving 360 monthly payments (30 years), you will continue to receive monthly payments every month until you pass away.  When you stop, your monthly payments stop.  Your beneficiary will only receive the payments in the guaranteed period or periodic lump sum payments that are also guaranteed.";        
  else if (arg == 'increase')
    str="Some monthly payments increase annually by 2 to 5%, with the most common being 3%.  If your payments increase on the same month and day once a year, your payments may be \"percent step\" payments.  Check your payment schedule or other documents regarding your structured settlement to see if an annual \"percent step\" is included.  If so, please include the month, day and year of your very first monthly payment and the \"percent step\" so we can calculate the amount of each annual increase.";
  else if (arg == 'additionalInfo')
    str="Please state any additional information you believe is important to us and to your decision making.  If you have a unique payment schedule not otherwise stated already, use this space to tell us the dates and amounts of your future payments.  You may also tell us if you have a specific need or request regarding which payments you want to obtain quotes on and which payments are not for sale.";

  alert ( str );

}
function swapSelection(arg) {
  if ((arg == "Annual") || (arg == "Quarterly") || (arg == "Monthly") || (arg == "Periodic & Monthly")) {
     document.getElementById("firstOption").style.display = "";
     if ((arg == "Annual") || (arg == "Quarterly") || (arg == "Monthly"))
        document.getElementById("secondOption").style.display = "none";
     else document.getElementById("secondOption").style.display = "";
  }
  else if (arg == "Periodic Lump Sum Only") {
     document.getElementById("firstOption").style.display = "none";
     document.getElementById("secondOption").style.display = "";
  }
  else {
     document.getElementById("firstOption").style.display = "none";
     document.getElementById("secondOption").style.display = "none";
  }
}

function reload_captcha() {
    var captcha_field = document.getElementById("captcha");
    captcha_field.src = "bot-protector.php";
}

function quote_onload() {
    var interval_field = document.getElementById('paymentInterval');
    swapSelection(interval_field[interval_field.selectedIndex].value);
}


