// Javascript Document for various time based functions 
//   Author: Jeff Ludwig 
//   Feel free to glean inspiration, as much inspiration as this document shows
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


  var invTimer;

// Function timed_events:
//     This function is designed to execute when the window is loaded, and every 10 seconds thereafter
//     It will update the keeper facts window with another fact.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

  function timed_events(val)
  {
	last_message = 9;
	var message = Array;
	
    message[1] = 'Coins can be donated at retail value for tax relief.';
    message[2] = "Rare coins are one of the best ways to insure wealth protection in today's uncertain world.";
    message[3] = 'The rare coin market is the most thinly traded of all financial markets.';
    message[4] = 'Rare coins, if purchased prudently, are a great investment.';
    message[5] = 'With around a million dollar investment, one can conceivable become a market maker.';
    message[6] = 'Rare coins are small, portable, liquid, private and insurable.';
    message[7] = 'Because of independent grading services, rare coin prices can be checked easily.';
    message[8] = 'The U.S. Mint is the only government agency that operates at a profit.';
    message[9] = 'Since 1990, the U.S. Mint reports that 136 million Americans are collecting coins.';

    document.getElementById('coinFactoid').innerHTML = message[val];
    val = val + 1;
	if (val > last_message) val = 1;
    invTimer = setTimeout('timed_events(' + val + ')', 10000);
	return null;
  }

  window.onload  = function(ee) {
    timed_events(1);
  }

//timed_events(1);
