var inmenu=false;

var lastmenu=0;

function Menu(current) {
   if (!document.getElementById) return;
   inmenu=true;
   oldmenu=lastmenu;
   lastmenu=current;
   if (oldmenu) Erase(oldmenu);
   m=document.getElementById("menu-" + current);
   box=document.getElementById(current);   
   box.style.left= m.offsetLeft;   
   box.style.top= m.offsetTop + m.offsetHeight + 328;   
   box.style.visibility="visible";   
   m.style.backgroundColor="green";
   box.style.backgroundColor="pink";
   m.style.color="white";   

   box.style.width="175px";
}
function Erase(current) {
   if (!document.getElementById) return;
   if (inmenu && lastmenu==current) {
	  return;
   }
   m=document.getElementById("menu-" + current);
   box=document.getElementById(current);
   box.style.visibility="hidden";
   m.style.backgroundColor="Silver";
   m.style.color="black";   
}
function Timeout(current) {
   inmenu=false;
   window.setTimeout("Erase('" + current + "');",500);
}

function Highlight(menu,item) {
   if (!document.getElementById) return;
   inmenu=true;
   lastmenu=menu;
   obj=document.getElementById(item);
   obj.style.backgroundColor="Silver";
}

function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor="pink";
   m.style.color="black";   
}

mess = new Array;
mess[0] = "Good resolutions are simply checks that men draw on a bank where they have no account. - Oscar Wilde";

mess[1] = "The new year begins in a snow-storm of white vows. - George William Curtis";

mess[2] = "Be always at war with your vices, at peace with your neighbors, and let each new year find you a better man. - Benjamin Franklin";

mess[3] = "For last year's words belong to last year's language \nAnd next year's words await another voice.\nAnd to make an end is to make a beginning.\n - T.S. Eliot, \"Little Gidding\"";

mess[4] = "Never tell your resolution beforehand, or it's twice as onerous a duty.  -John Selden"

mess[5] = "And ye, who have met with Adversity\'s blast,\n And been bow\'d to the earth by its fury;\n To whom the Twelve Months, that have recently pass\'d\n Were as harsh as a prejudiced jury -\n Still, fill to the Future! and join in our chime,\n The regrets of remembrance to cozen,\n And having obtained a New Trial of Time,\n Shout in hopes of a kindlier dozen.\n - Thomas Hood"

mess[6] = "Yesterday, everybody smoked his last cigar, took his last drink and swore his last oath.  Today, we are a pious and exemplary community.  Thirty days from now, we shall have cast our reformation to the winds and gone to cutting our ancient shortcomings considerably shorter than ever.  - Mark Twain"

mess[7] = "Ring out the old, ring in the new,\n Ring, happy bells, across the snow:\n The year is going, let him go;\n Ring out the false, ring in the true.\n - Alfred, Lord Tennyson"


mess[8] = "Now there are more overweight people in America than average-weight people. So overweight people are now average. Which means you've met your New Year's resolution. - Jay Leno"


function mymess() {

mesct = mess.length

randomNum = Math.floor ((Math.random() * mesct))

mynewmes = mess[randomNum]
}






