/**************** setup for the marathon ****************/
var page = 0, showmethemoney = 'quizshow',showmetheintro = true, showmetheend = false;
/**************** the hard ones ****************/
var qz_questions =new Array();
qz_questions[0]="Which nutrients are the key \"antioxidants\"?";
qz_questions[1]="If elderly people took a multivitamin with minerals each day, how much could they reduce the total number of days they are sick from infectious disease?";
qz_questions[2]="Is this statement true or false?: \"Dietary supplements are regulated by the government.\"";
qz_questions[3]="Why is it so critical for young women to consume 400 mcg of folic acid a day?";
qz_questions[4]="What percentage of teenage girls get the amount of calcium they need each day to build optimal bone mass?";
qz_questions[5]="Approximately how much money per day would it cost to add a multivitamin to a person's daily regimen?";
qz_questions[6]="Is this statement true or false?: \"Generous intake of three B vitamins may reduce the incidence of two of the primary causes of death and disability in the United States.\"";
qz_questions[7]="What are the \"Basic Four\" supplements?";
qz_questions[8]="Approximately what percentage of Americans use dietary supplements?";

/**************** just so you know ****************/
var qz_suggestion =new Array();
qz_suggestion[0] = "Vitamins C and E are two of the key antioxidants in the body. Some minerals like selenium are integral components of antioxidant enzymes, and thus also serve an antioxidant function. Antioxidants help protect every cell and membrane in the body against the wear of everyday living by working to prevent damage from \"oxidation.\" While not always a bad thing, oxidation produces particles known as free radicals, which can damage membranes, body tissues and even DNA.";
qz_suggestion[1] = "Research has shown that regular use of a multivitamin with minerals by elderly people can significantly boost their immune function - and cut the number of days they are sick from infectious illness in half.";
qz_suggestion[2] = "The Food and Drug Administration (FDA) oversees the safety of dietary supplement ingredients, manufacturing practices and every aspect of the product label. The Federal Trade Commission (FTC) regulates advertising, and each of the 50 states has its own independent controls over dietary supplement safety, manufacturing, labeling and advertising.";
qz_suggestion[3] = "One of the most exciting scientific discoveries of the past several decades is the role of folic acid in preventing serious neural tube birth defects like spina bifida. Numerous studies have confirmed that if all women took a multivitamin containing folic acid one to three months before and after conception, up to 70% of such birth defects could be prevented.";
qz_suggestion[4] = "National surveys show that less than 10% of teenage girls ages 14-18 consume the calcium they need to build optimal bone density - at a time when their need for calcium is extremely high. The recommended daily intake of calcium for teenagers - both girls and boys - is 1,300 mg. Not even a full quart of milk a day can provide this level of calcium intake.";
qz_suggestion[5] = "Most brand name multivitamins with minerals can be purchased for as little as a dime a day. This cost will be even lower for people who buy store brands or wait for sales.";
qz_suggestion[6] = "A substantial body of evidence suggests that generous intake of three vitamins in the B family - vitamins B-6, B-12 and folic acid - may reduce the incidence of both heart attacks and stroke. Scientists believe that they may reduce cardiovascular disease by lowering blood levels of homocysteine.";
qz_suggestion[7] = "Some researchers suggest that people should think of the \"Basic Four\" supplements - a multivitamin, extra vitamin C, extra vitamin E and calcium - as an integral part of their diets, along with the four food groups.";
qz_suggestion[8] = "National surveys indicate that 68% of all Americans use dietary supplements. Research also shows that people who take supplements tend to have better diets and generally healthier habits than those who don't. They also tend to have higher levels of both education and income.";

/**************** selected winners ****************/
var qz_answers =new Array();
qz_answers[0] = 0;
qz_answers[1] = 1;
qz_answers[2] = 0;
qz_answers[3] = 1;
qz_answers[4] = 3;
qz_answers[5] = 0;
qz_answers[6] = 0;
qz_answers[7] = 2;
qz_answers[8] = 2;

/**************** are you sure ****************/
var qz_possibles =new Array();
qz_possibles[0] = new Array("Vitamins C and E","The B vitamin family (B-6, B-12, folic acid, niacin, etc.)","Vitamins A and D", "Minerals iron and zinc");
qz_possibles[1] = new Array("By 10%","By one half","By 90%","Not at all");
qz_possibles[2] = new Array("True","False");
qz_possibles[3] = new Array("It helps to build the strong bone mass needed to prevent osteoporosis in later years of life.","It plays a major role in preventing babies from being born with a serious neural tube birth defect such as spina bifida.","It helps prevent cataracts.","It may help avoid weight gain.");
qz_possibles[4] = new Array("Almost all","More than 50%","30%","Less than 10%");
qz_possibles[5] = new Array("10 cents per day","50 cents per day","$1.00 per day","$1.50 per day","$2.00 per day");
qz_possibles[6] = new Array("True","False");
qz_possibles[7] = new Array("iron, calcium, vitamin C and magnesium","vitamin A, vitamin C, vitamin D and vitamin E","a multivitamin, extra vitamin C, extra vitamin E and calcium","vitamin D, vitamin E, vitamin K and chromium");
qz_possibles[8] = new Array("10%","25%","65%","90%");

function qz_answer(loadpage, key) {
  htmldiv = '';
  htmldiv += (qz_answers[loadpage] == key) ? '<div class="qz_correctheading">CORRECT!</div>' : '<div class="qz_incorrectheading">INCORRECT!</div>';
  htmldiv += '<div class="qz_correctanswer">The answer is: ' + qz_possibles[loadpage][qz_answers[loadpage]] + '</div>';
  htmldiv += '<div class="qz_suggestion">' + qz_suggestion[loadpage] + '</div>';
  htmldiv += '<div clas="qz_qlink">';
  htmldiv += '<a href="javascript:qz_prev()">Previous Question</a> | ';
  htmldiv += (loadpage != qz_questions.length-1) ? '<a href="javascript:qz_question()">Next Question</a>' : '<a href="javascript:qz_question()">Finish</a>';
  htmldiv += '</div>';
  document.getElementById(showmethemoney).innerHTML = htmldiv;
  page = loadpage+1;
  if(loadpage == qz_questions.length-1) showmetheend = true;
}
function qz_question() {
  if(showmetheintro || showmetheend) {
    if (showmetheintro) document.getElementById(showmethemoney).innerHTML = document.getElementById('qz_showmetheintro').innerHTML;
    showmetheintro = false;
    if (showmetheend) document.getElementById(showmethemoney).innerHTML = document.getElementById('qz_showmetheend').innerHTML;
  } else {
    htmldiv = '';
    htmldiv += '<div class="qz_heading">'+qz_questions[page]+'</div>';
    htmldiv += '<ol>';
    for(i=0;i<qz_possibles[page].length;i++) {
      htmldiv += '<li><a href="javascript:qz_answer('+page+','+i+')">'+qz_possibles[page][i]+'</a></li>';
    }
    htmldiv += '</ol>';
    document.getElementById(showmethemoney).innerHTML = htmldiv;
  }
}

function qz_prev() {
  page = page - 1;
  qz_question();
}