function arrayOfTheDay()
{
this[0]    = 'What home computers grow on trees?';
this[1]    = 'What does a computer call its mother and father?';
this[2]    = 'Where do computers keep their money?';
this[3]    = 'Why did the funny kid put cheese in his computer?';
this[4]    = 'What kind of royal cat do you find in a computer?';
this[5]    = 'What would you get if you crossed a computer and a kangaroo?';
this[6]    = 'How do computer scientists sail?';
this[7]    = 'What happened when the scientist threw an elastic band into the computer?';
this[8]    = 'Why did the farmer put a computer in the hen house?';
this[9]    = 'What kind of feet do mathematicians have?';
this[10]   = 'What kind of beat do mathematicians like to dance to?';
this[11]   = 'Why do mosquitoes make great mathematicians?';
this[12]   = 'Why are bacteria bad mathematicians?';
this[13]   = 'How is a telephone like arithmetic?';
this[14]   = 'Why did the little computer go to the orthodontist?';
this[15]   = 'Why did the chicken see the doctor?';
this[16]   = 'Why did the math book see the doctor?';
this[17]   = 'Where do they send sick ponies?';
this[18]   = 'What is a foot doctor\'s favorite song?';
this[19]   = 'Where do frogs hang their coats?';
this[20]   = 'Why did the baby bear speak so well?';
this[21]   = 'Why did the leopard wear a disguise to class?';
this[22]   = 'Where did the little dog get his education?';
this[23]   = 'Where do skunks have assembly?';
this[24]   = 'Mother Mouse to Junior: Did you pass the spelling test?';
this[25]   = 'What books did Teacher Rabbit read to her bunnies?';
this[26]   = 'Why did the cow go to school?';
this[27]   = 'How do monkeys learn the alphabet?';
this[28]   = 'Why did the baker send her son to the finest schools?';
this[29]   = 'Where does a throat lozenge go to lunch?';
this[30]   = 'What kind of cookie do planets like?';
this[31]   = 'What\'s the difference between a student and Parmesan cheese?';
this[32]   = 'What is a wise bird\'s favorite subject?';
this[33]   = 'How did the pony learn multiplication?';
this[34]   = 'Why did the butterfly take up algebra?';
this[35]   = 'What is the ocean\'s best subject?';
this[36]   = 'Why did the musician study  geology?';
this[37]   = 'Why did the dentist want to study outer space?';
this[38]   = 'Why did the D student take his report card to the beach?';
this[39]   = 'What is the math teacher\'s favorite cereal?';
this[40]   = 'What is the duck\'s favorite part of math class?';
this[41]   = 'Why did the math workbook go to the guidance counselor?';
this[42]   = 'Why did the science student breathe deeply?';
this[43]   = 'How do bankers study math?';
this[44]   = 'Why did the mosquito go to computer class?';
this[45]   = 'How much pie did the computer student eat?';
this[46]   = 'What part of the computer likes patrolling the halls?';
this[47]   = 'Why did the spider go to a Scottish music school?';
this[48]   = 'What\'s the difference between a student and a beetle?';
this[49]   = 'What insects have to go to speech class?';
this[50]   = 'What do bees wear to school?';
this[51]   = 'Why do ghosts do so well at school sports?';
this[52]   = 'Why can\'t ghosts lie to teachers?';
this[53]   = 'What is the witches\' favorite subject?';
this[54]   = 'How did the needle and thread get to school?';
this[55]   = 'Why did the razor go to college?';
this[56]   = 'Where do young trees go to school?';
this[57]   = 'How do Santa\'s helpers learn their ABC\'s?';
this[58]   = 'Why was the cliff so smart?';
this[59]   = 'What did Noah study?';
this[60]   = 'Where did Sir Galahad get his education?';
this[61]   = 'What sign do you see in front of a dog hospital?';
this[62]   = 'Why do you lie down on a hospital bed?';
this[63]   = 'What kind of alligator do you find in a hospital?';
this[64]   = 'What has 15 letters, begins with an "A", ends with a "G", and means incredible pain?';
this[65]   = 'Why do many mummies have high blood pressure?';
this[66]   = 'Why did the doctor give up his practice?';
this[67]   = 'Why did the germ cross the microscope?';
this[68]   = 'What did one germ say to the other germ?';
this[69]   = 'Why do people with colds get plenty of exercice?';
this[70]   = 'What goes "Chit-chat, tick-tock, boom-gong"?';
this[71]   = 'What do you call a duck who graduates from medical school?';
this[72]   = 'What do you call a dog who graduates from medical school?';
this[73]   = 'What do you call a squid that graduates from medical school?';
this[74]   = 'What do you have if your head feels hot, your feet are cold, and you see spots in front of your eyes?';
this[75]   = 'Why did the horse sneeze?';
this[76]   = 'What do you call a very large moose?';
this[77]   = 'Why do cows live in barns?';
this[78]   = 'What is the difference between a berry farmer and a pirate?';
this[79]   = 'What goes in one ear and out the other?';
this[80]   = 'What do baby sweet potatoes sleep in?';
this[81]   = 'What do you get when a football team plays in your potato field?';
this[82]   = 'What animal uses a nutcracker?';
this[83]   = 'What kind of bars won\'t keep a prisoner in jail?';
this[84]   = 'What kind of party do prisoners like best?';
this[85]   = 'Why did the Sheriff arrest the cook?';
this[86]   = 'What did the thief get for stealing the calendar?';
this[87]   = 'What snacks do you serve robots at parties?';
this[88]   = 'What is yellow and long and always points north?';
this[89]   = 'What can you measure that has no length, width, or thickness?';
this[90]   = 'Why do skeletons always vacation alone?';
this[91]   = 'What kind of car does a rich rock star drive?';
this[92]   = 'What is the difference between a prince and a tennis ball?';
this[93]   = 'Why are mountain climbers curious?';
this[94]   = 'What do you call a young bee?';
this[95]   = 'What is a bee\'s favorite song?';
this[96]   = 'Why do bees hum?';
this[97]   = 'Why do bees have sticky hair?';
this[98]   = 'Where do sheep go when they need a haircut?';
this[99]   = 'What goes GNIP-GNOP, GNIP-GNOP?';
this[100]  = 'What kind of house weighs the less?';
}

function arrayDayInMonth()
{
   this[0] = 31;
   this[1] = 28;
   this[2] = 31;
   this[3] = 30;
   this[4] = 31;
   this[5] = 30;
   this[6] = 31;
   this[7] = 31;
   this[8] = 30;
   this[9] = 31;
   this[10] = 30;
   this[11] = 31;
}

function dayOfYear()
{
   var today      = new Date();
   var nDays      = today.getDate();
   var nMonth     = today.getMonth();
   var monthDays  = new arrayDayInMonth();

   // Figure out day of year
   for( var i = 0; i < nMonth; i++ )
   {
      nDays += monthDays[i];
   }

   return( nDays );
}

// name this function to match HTML function
function riddle()
{
   // Enter the number of text lines here (last number + 1 since we started with 0):
   var nTotal = 101;

   var ofTheDay = new arrayOfTheDay();
   var nIndex = dayOfYear() % nTotal;

   document.write( ofTheDay[nIndex] );
}
