function drawPic(linktext,imgname,imgalt) {
  document.write('<p><a href="'+linktext+'"><img src="'+imgname+'" alt="'+imgalt+'" width="568" height="426" border="0"></a>');
}

function randomPic() {
  var now = new Date();
  var whichOne = (now.getMilliseconds() % 6);
  switch (whichOne)
  {
   case 0:
      drawPic("morocco01.htm","morocco/Cimg7766.jpg","Casa Battlo in Barcelona");break;
   case 1:
      drawPic("morocco01.htm","morocco/Cimg7826.jpg","La Padrera in Barcelona");break;
   case 2:
      drawPic("morocco01.htm","morocco/Cimg8578.jpg","Funchal, Madeira");break;
   case 3:
      drawPic("morocco01.htm","morocco/Cimg8720.jpg","Mt. Teide on Tenerife, Canary Islands");break;
   case 4:
      drawPic("morocco01.htm","morocco/Cimg9279.jpg","Agadir, Morocco");break;
   case 5:
      drawPic("morocco01.htm","morocco/Cimg9741.jpg","Seville, Spain");break;
   // Reminder: Update the mod value above to match the case statement
  }
}


function age(person) {
  // This function makes sure that all of our webpage references to age are up-to-date!
  // This is the lazy woman's method for Website maintenance.
  var month, day, year;
  var now = new Date();
  if (person == "Jill") {
    month = 1;
    day = 15;
    year = 1991;
  }
  else if (person == "Claire") {
    month = 6;
    day = 14;
    year = 1989;
  }
  if (now.getMonth() > month)
    document.write(now.getFullYear() - year);
  else if (now.getMonth() < month)
    document.write((now.getFullYear() - year) - 1);
  else if (now.getDate() >= day)
    document.write(now.getFullYear() - year);
  else
    document.write((now.getFullYear() - year) - 1);
}
