var my_imgs = new Array();
var my_imgs_link = new Array();
var my_imgs_alt = new Array();
var my_imgs_h2 = new Array();
var my_imgs_capt = new Array();

/* Set image URLs */
my_imgs[0] = "thumb_have_strategy.jpg";
my_imgs[1] = "thumb_living_expenses.jpg";
my_imgs[2] = "thumb_outside_work.jpg";
my_imgs[3] = "thumb_saving_habits.jpg";

/* Set image link URLs */
my_imgs_link[0] = "graph_strategy.html";
my_imgs_link[1] = "graph_living_expenses.html";
my_imgs_link[2] = "graph_outside_work.html";
my_imgs_link[3] = "graph_saving_habits.html";

/* Set image alternate text */
my_imgs_alt[0] = "graph thumbnail";
my_imgs_alt[1] = "graph thumbnail";
my_imgs_alt[2] = "graph thumbnail";
my_imgs_alt[3] = "graph thumbnail";

/* Set Headlines */
my_imgs_h2[0] = "Retirement Strategy";
my_imgs_h2[1] = "Expected Primary Source of Income During Retirement";
my_imgs_h2[2] = "Saving for Retirement Outside of Work";
my_imgs_h2[3] = "Saving Habits Since the Recession Began";

/* Set captions */
my_imgs_capt[0] = "About six-in-ten workers with an employee-funded plan state they have some type of retirement strategy. In stark contrast, six-in-ten workers without an employee-funded plan state they do not have a plan for their retirement strategy.";
my_imgs_capt[1] = "Workers with an employee-funded plan are more likely to expect 401(k), 403(b), and IRA accounts to be their primary source of income during retirement, while workers without a plan are more likely to expect Social Security to be their primary source.";
my_imgs_capt[2] = "Workers with an employee-funded plan are more likely to be saving for retirement outside of work.";
my_imgs_capt[3] = "Interestingly, workers with a plan are more likely to have maintained or increased their savings levels since the recession began. Conversely, nearly half of workers without an employee-funded plan are saving less.";
  
if (document.getElementById && document.createTextNode) {

  var the_div = document.getElementById("my_graphs");
  var ran_num = Math.floor(Math.random()*(my_imgs.length));


  document.write("<h2>"+my_imgs_h2[ran_num]+"</h2>") 
  document.write("<p>"+my_imgs_capt[ran_num]+"</p>") 
  var 
  the_HTML = "<a href=\""+my_imgs_link[ran_num]+"\">";
  the_HTML += "<img src=\""+my_imgs[ran_num]+"\" class=\"graph_thumbs\" align=\"right\"";
  the_HTML += "alt=\""+my_imgs_alt[ran_num]+"\" /></a>";
  the_div.innerHTML = the_HTML;
  
}

