/* Specifies the period of time between updates:
    month - once a month
    date - once per every day of the month (repeats the next month)
    weekday - once per every day of the week (repeats the next week)
    hour - once per hour (repeats the next day)
    request - once per browser request (default)
*/
var updatePeriods = new Array("month","date","weekday","hour","request")

// Invoked to display rotated HTML content in a Web page. The period
// argument should be an element of the updatePeriods array.
function displayRotatedContent(period) {
 var updatePeriod = -1
 for(var i=0;i<content.length;++i) {
  if(period.toLowerCase() == updatePeriods[i].toLowerCase()) {
   updatePeriod = i
   break
  }
 }
 var s = selectHTML(updatePeriod)
 document.write(s)
}

function selectHTML(updatePeriod) {
 var n = 0
 var max = content.length
 var d = new Date()
 switch(updatePeriod) {
  case 0: // Month (0 - 11)
   n = d.getMonth()
   break
  case 1: // Date (1 - 31)
   // Scale to (0 - 30)
   n = d.getDate() - 1
   break
  case 2: // Weekday (0 - 6)
   n = d.getDay()
   break
  case 3: // Hour (0 - 23)
   n = d.getHours()
   break
  case 4: // Request (Default)
  default:
   n = selectRandom(max)
 }
 n %= max
 return content[n]
}

// Select a random integer that is between 0 (inclusive) and max (exclusive)
function selectRandom(max) {
 var r = Math.random()
 r *= max
 r = parseInt(r)
 if(isNaN(r)) r = 0
 else r %= max
 return r
}
var content = new Array( "An excuse is a poor patch with which to mend the fabric of failure. Famous JIRP Saying",
"No matter where you go...there you are. Buckaroo Banzai",
"Dog do not have clean mouths, they have clean rectums. says Bill Weber",
"What can be better than mountains\? Only the mountains you never climbed: says a popular Russian song",
 "If you always do what you've always done, you are gonna get what you already got.   Jack Lamb",
 "As in any alpine region, the weather is changeable, protection questionable, route-finding bewildering, rockfall frequent and descents tedious. In short, it's everything you could ever ask for.     From the Canadian Alpine Journal, 1993.",
 "Duct tape is like the Force. It has a light side, a dark side, and it holds the universe together.",
 "Peeing through 6 inches of clothes with a 3 inch penis.    Anonymous Everest summiteer when asked what was the hardest thing about climbing Mt Everest.",
 "If you wait long enough, you usually wait too long. Trader",
 "Talks cheap, action costs. Trader",
 "I'm going to have to take you off belay for a second... the dog's all tangled up in the rope.",
 "I got too much class to go out with a guy like you. Randys not date",
 "If you can't find time to do it right the first time, how are you going to find time to do it right the second time.",
 "There's a time for speech, and a time for silence. Knowing the difference is real important. Trader",
 "Nearly all men can stand adversity, but if you want to test a man's character, give him power.",
 "Get it right when it doesn't matter and you'll get it right when it does. Trader",
 "Never play a game of cards with a man named Doc, and never eat at a place called Mom's. Trader",
 "No one is completely useless, they can always serve as a bad example.",
 "A leader who show's doubt really isn't a leader after all.",
 "If you find yourself with no hope, or odds a million to one, you take the long shot.",
 "We, or rather our reason, forget that the description is only a description and thus we entrap the totality of ourselves in a vicious circle from which we rarely emerge in our lifetime.   Don Juan",
 "A man who counts his chickens before they're hatched winds up with a handful of broken shells. Trader",
 "The worst thing you write is better than the best thing you didn't write.",
 "I'd feel better if we had some crampons. Oh, what the hell, let's go for it...    Common climbing last words.",
 "If you give someone a program, you will frustrate them for a day, if you teach them how to program, you will frustrate them for a lifetime.",
 "Yes, I'm sure this hold/belay/anchor/rope is good...     Common climbing last words.",
 "Prediction is difficult, especially the future. Niels Bohr.",
 "I canna change the laws of physics, Captain  but I can find ye a loophole.  Scotty",
 "Terminal moraine, the last glacier you will ever climb.",
 "Security is mostly a superstition. Avoiding danger is no safer in the long run that outright exposure. Life is either a daring adventure or nothing. Helen Keller.",
 "Horn..  malady brought on by being too long alone in the mountains",
 "All men dream, but not equally. Those who dream by night, in the dusty recesses of their minds, awake in the day to find that it was vanity. But the dreamers of the day are dangerous men, for they may act their dreams with open eyes to make it reality. T.E. Lawrence, Lawrence of Arabia.",
 "For scientific leadership, give me Scott; for swift and efficient travel, Amundsen; but when you are in a hopeless situation, when there seems to be no way out, get on your knees and pray for Shackleton. Sir Raymond Priestley.",
 "We are caught in the vortex of sequences.",
 "They say that something as small as a butterfly beating its wings in China can cause a hurricane in America, so maybe we should go to China and kill all the butterflies, just to be safe. Ken Advent",
 "The airplane stays up because it doesn't have the time to fall. Orville Wright",
 "Facts speak louder than statistics.  Geoffrey Streatfield ",
 "One should not face the future with fear. ",
 "We can do that. We don't even need a reason",
 "You\'re rather attractive for a beautiful girl with a great body: Ty Webb",
 "Passion is the enemy of precision: Daryl Zero",
 "How about a Fresca: Judge Smails",
 "Broken hearts are not covered by insurance: Steve Larson ",
 "Dog is man's best friend because cats are smarter: Steve Larson ",
 "Ego is the only mechanism large enough to allow humans to believe that the universe was created solely for them: Steve Larson ",
 "Two minds are better than the one I got: Steve Larson ",
 "The boiling point is a bubble: Steve Larson ",
 "They say living forever is a curse but I'd be willing to give it a try or two: Steve Larson",
 "Neither spell check nor me understand context: Steve Larson ",
 "When the number of possibilities is infinite, you can't be blamed for choosing the wrong one: Steve Larson ",
 "Two wrongs don't make a right and seldom make a left: Steve Larson ",
 "Grass is never greener on the other side if you straddle the fence: Steve Larson ",
 "What doesn\'t kill you defines you: Gloria Sullivan",
 "Chicks dig me, because I rarely wear underwear and when I do it's usually something unusual: John Winger",
 "They're only monkey-boys. We can crush them here on earth, Lord Whorfin: John O'Connor",
 "BigbooTAY!: John Bigboote",
 "Better to be jumpy than asleep: Trader",
 "The time you stop getting curious is the time you find dirt hitting your open eyes: Trader",
 "No one moves by standing still: Trader",
"A flute without holes, is not a flute. A donut without a hole, is a Danish, ",
 "Support bacteria, it's the only culture some people have",
  "Be careful about reading health books, you may die of a misprint: Mark Twain",
 "A polar bear is a rectangular bear after a coordinate transform.",
 "Nothing is so simple that it cannot be misunderstood.  Teague's Paradox.",
 "Life is hard but life is hardest when your dumb. Austin Lounge Lizards",
"I got to get into this dude's pelt and crawl around for a few days. Who's the gopher's ally. His friends. The harmless squirrel and the friendly rabbit.  Carl Spackler",
"May your Herman-Nelson heater always start",
 "I love the sound of the snow sizzling against the tent walls in the wind.  Don",
 "It's funny, the places we call home.  Glen Liston",
 "It was so smooth I wasnt sure we were on the snow. Comment on the superb landing made at Siple Dome Antarctica by the LC130 pilot.  Charlie the Carpenter",
 "The best way to have a good idea is to have a lot of ideas.  Linus Pauling.",
 "All men dream, but not equally. Those who dream by night, in the dusty recesses of their minds, awake in the day to find that it was vanity. But the dreamers of the day are dangerous men, for they may act their dreams with open eyes to make it reality. T.E. Lawrence, Lawrence of Arabia.",
"The rules of the game must be constantly updated to keep up with the expanding technology. Otherwise we overkill the classic climbs and delude ourselves into thinking we are better climbers than the pioneers. Yvon Chouinard.",
 "Man can sustain life with very scanty means. The trappings of civilization are soon cast aside in the face of stern realities and finding the barest opportunity of winning food and shelter, man can live and even find his laughter ringing true.  E. H. Shackleton"
)

