var questions = new Array();
var answers = new Array();
var score_ranges = new Array();

//fill in questions array
//question 0
questions[0] = new Array();
questions[0]['question_content'] = "What is your previous home ownership history?";
questions[0]['desc'] = "If any of these answers applies to you, you may qualify for an FHA mortgage. Although FHA mortgages are often associated with first-time homebuyers--and can be great tools for people who haven't had a chance to build up much of a credit history yet.  They can also be used for refinancing and for people who have owned a home previously.";
//question 1
questions[1] = new Array();
questions[1]['question_content'] = "How do you plan to make your down payment?";
questions[1]['desc'] = "FHA mortgages require a downpayment of at least 3.5%. You can use a gift or a grant for this purpose, but you cannot borrow the money for a downpayment.";
//question 2
questions[2] = new Array();
questions[2]['question_content'] = "Approximately what is your credit score?";
questions[2]['desc'] = "Because FHA mortgages require the borrower to pay a mortgage insurance premium, they are not always the most cost-effective option for people with excellent credit and a substantial down payment. However, if your credit score is a little lower, you may find the mortgage insurance premium to be less than the extra interest you'd have to pay to qualify for a non-FHA loan. ";
//question 3
questions[3] = new Array();
questions[3]['question_content'] = "How do you plan to use the property?";
questions[3]['desc'] = "FHA mortgages are intended for people to use as primary residences, though one-to-four unit properties may qualify if the owner occupies one of the units.";
//question 4
questions[4] = new Array();
questions[4]['question_content'] = "How expensive is the house you want compared to others in your county?";
questions[4]['desc'] = "FHA loan limits are driven by the value of properties in the region, so limits vary from place to place. The lowest maximum value is $271,050, so a loan of that size or smaller could qualify anywhere. The highest maximum in any region is $625,500, so loans between $271,050 and $625,000 may qualify, depending on where they are. Higher limits than that are only available in Alaska, Guam, Hawaii, and the Virgin Islands. Limits are also higher for 1-4 units properties.";
//question 5
questions[5] = new Array();
questions[5]['question_content'] = "What is your employment history:";
questions[5]['desc'] = "Best answer: 6d. FHA qualification standards call for a two-year employment history in general. However, there are exceptions, for example, recent college graduates in professional jobs. Conversely, a two year history of switching jobs, fields, or taking lesser positions will work against you.";
//question 6
questions[6] = new Array();
questions[6]['question_content'] = "Which best describes your credit history:";
questions[6]['desc'] = "Acceptable answers: 7a, 7b, or 7c. Your credit history doesn't have to be perfect, but any recent or still outstanding problems could trip you up. In particular, if you show up on the CAIVRS system, which tracks default on obligations backed by the government, you won't qualify.";
//question 7
questions[7] = new Array();
questions[7]['question_content'] = "Which best describes your situation regarding child support payments:";
questions[7]['desc'] = "Acceptable answers: 8a or 8b. If you are behind on child support payments, expect to have trouble qualifying for an FHA loan.";

//fill in answers array
//answer 0
answers[0] = new Array();
answers[0][0] = new Array();
answers[0][0]['answer_content'] = "a. Have never owned a home.";
answers[0][0]['scoring'] = "1";

answers[0][1] = new Array();
answers[0][1]['answer_content'] = "b. Own a home currently and would like to refinance.";
answers[0][1]['scoring'] = "1";

answers[0][2] = new Array();
answers[0][2]['answer_content'] = "c. Owned a home once but had to give it up years ago.";
answers[0][2]['scoring'] = "1";

answers[0][3] = new Array();
answers[0][3]['answer_content'] = "d. All of the above.";
answers[0][3]['scoring'] = "1";

//answer 1
answers[1] = new Array();
answers[1][0] = new Array();
answers[1][0]['answer_content'] = "a. I was looking for a no-money-down mortgage.";
answers[1][0]['scoring'] = "0";

answers[1][1] = new Array();
answers[1][1]['answer_content'] = "b. I have saved about 1% of the home's purchase price for a downpayment.";
answers[1][1]['scoring'] = "0";

answers[1][2] = new Array();
answers[1][2]['answer_content'] = "c. I have saved 3.5% or more of the home's purchase price for a downpayment.";
answers[1][2]['scoring'] = "1";

answers[1][3] = new Array();
answers[1][3]['answer_content'] = "d. I know where I can get a gift or grant to help me come up with 3.5% to put down.";
answers[1][3]['scoring'] = "1";

answers[1][4] = new Array();
answers[1][4]['answer_content'] = "e. I was planning to get a second loan to raise the downpayment.";
answers[1][4]['scoring'] = "0";

//answer 2
answers[2] = new Array();
answers[2][0] = new Array();
answers[2][0]['answer_content'] = "a. 720 or better";
answers[2][0]['scoring'] = "0";

answers[2][1] = new Array();
answers[2][1]['answer_content'] = "b. 680 to 719";
answers[2][1]['scoring'] = "0.5";

answers[2][2] = new Array();
answers[2][2]['answer_content'] = "c. Below 680";
answers[2][2]['scoring'] = "1";

//answer 3
answers[3] = new Array();
answers[3][0] = new Array();
answers[3][0]['answer_content'] = "a. It will be investment property that I intend to fix up and flip.";
answers[3][0]['scoring'] = "0";

answers[3][1] = new Array();
answers[3][1]['answer_content'] = "b. It will be a vacation home for part of the year.";
answers[3][1]['scoring'] = "0";

answers[3][2] = new Array();
answers[3][2]['answer_content'] = "c. It will be my primary residence.";
answers[3][2]['scoring'] = "1";

answers[3][3] = new Array();
answers[3][3]['answer_content'] = "d. It will be used for income as rental property.";
answers[3][3]['scoring'] = "0";

//answer 4
answers[4] = new Array();
answers[4][0] = new Array();
answers[4][0]['answer_content'] = "a. Quite modest, a \"starter\" home.";
answers[4][0]['scoring'] = "1";

answers[4][1] = new Array();
answers[4][1]['answer_content'] = "b. About average for the area. Nothing spectacular.";
answers[4][1]['scoring'] = "1";

answers[4][2] = new Array();
answers[4][2]['answer_content'] = "c. Expensive, but so is the entire area. The house itself is average.";
answers[4][2]['scoring'] = "0.5";

answers[4][3] = new Array();
answers[4][3]['answer_content'] = "d. An amazing showplace, nicer than anything in the neighborhood.";
answers[4][3]['scoring'] = "0";

//answer 5
answers[5] = new Array();
answers[5][0] = new Array();
answers[5][0]['answer_content'] = "a. I am currently unemployed.";
answers[5][0]['scoring'] = "0";

answers[5][1] = new Array();
answers[5][1]['answer_content'] = "b. I've been employed for less than two years in my current field.";
answers[5][1]['scoring'] = "0.5";

answers[5][2] = new Array();
answers[5][2]['answer_content'] = "c. I've been employed for two years but in different fields.";
answers[5][2]['scoring'] = "0.5";

answers[5][3] = new Array();
answers[5][3]['answer_content'] = "d. I've been employed at least two years in my current field.";
answers[5][3]['scoring'] = "1";

//answer 6
answers[6] = new Array();
answers[6][0] = new Array();
answers[6][0]['answer_content'] = "a. It is very strong.";
answers[6][0]['scoring'] = "1";

answers[6][1] = new Array();
answers[6][1]['answer_content'] = "b. There are some bad marks in the past, but I am now current on everything.";
answers[6][1]['scoring'] = "1";

answers[6][2] = new Array();
answers[6][2]['answer_content'] = "c. I had a bankruptcy several years ago, but have maintained good credit since then.";
answers[6][2]['scoring'] = "1";

answers[6][3] = new Array();
answers[6][3]['answer_content'] = "d. I have recently declared bankruptcy.";
answers[6][3]['scoring'] = "0";

answers[6][4] = new Array();
answers[6][4]['answer_content'] = "e. It is not bad, but I did default on a student loan.";
answers[6][4]['scoring'] = "0";

//answer 7
answers[7] = new Array();
answers[7][0] = new Array();
answers[7][0]['answer_content'] = "a. I am not required to make child support payments.";
answers[7][0]['scoring'] = "1";

answers[7][1] = new Array();
answers[7][1]['answer_content'] = "b. I am fully up-to-date on my child support payments.";
answers[7][1]['scoring'] = "1";

answers[7][2] = new Array();
answers[7][2]['answer_content'] = "c. I've fallen behind on my child support payments. ";
answers[7][2]['scoring'] = "0";

//fill in score_ranges array
score_ranges[0] = "You've got some work to do. You appear to fit only half (or less) of the conditions normally associated with an FHA mortgage. Keep in mind though, that many of those conditions can be addressed with some time and effort. You may want to speak to a lender or loan counselor for advice on how you can get in line with FHA qualification standards.";
score_ranges[1] = "You may be close. Not all your conditions line up perfectly, but you are in good shape on more than half, so it might be worth a conversation with a lender to see if you can fix or get around some of the problem issues.";
score_ranges[2] = "You look like an excellent candidate for an FHA loan. Of course, this quiz is just a preliminary indicator, but based on these results, it could be well worth your time to start comparing lenders and have a detailed conversation about your eligibility for an FHA loan. ";