function showtip(which, from_where, which_way)
{
  // what HTML element should the tooltip be relative to?
  if (from_where == '' || from_where == undefined)
    from_where = which + '_tip';

  // content for "which" type
  if (which == 'register')
  {
    title = 'REGISTER';
    body = '<b>Registering is easy and it gives you access to:</b><ol><li>Post links to cool stories, videos, or whatever on "Drop It" or vote up stories other users have posted.  Top vote getters make the homepage!<li>Vote in our polls. <li>Free PSP! Not really.</ol>';
  }
  else if (which == 'vote')
  {
    title = 'VOTE IT UP';
    body = "Voting on this story will push it to the front page or, if it's already there, show everyone else that you have good taste in voting for stuff.";
  }

  if (which_way == "on right") // show on the right side
  {
    html_body = '<table border="0" cellpadding="0" cellspacing="0" width="229"><tr><td class="tooltip_title_r" valign="top" width="229">' + title + '<div id="tooltip_hr_r"></div></td></tr><tr><td class="tooltip_body_r" valign="top">' + body + '</td></tr><tr><td class="tooltip_bottom_r" width="229" height="41"> </td></tr></table>';
    horiz_offset = findPosX(document.getElementById(from_where)) + document.getElementById(from_where).offsetWidth;
    vert_offset =  findPosY(document.getElementById(from_where)) - 23;
  }
  else // default show on the left side
  {
    html_body = '<table border="0" cellpadding="0" cellspacing="0" width="229"><tr><td class="tooltip_title" valign="top" width="229">' + title + '<div id="tooltip_hr"></div></td></tr><tr><td class="tooltip_body" valign="top">' + body + '</td></tr><tr><td class="tooltip_bottom" width="229" height="41"> </td></tr></table>';
    horiz_offset = findPosX(document.getElementById(from_where)) - 225;
    vert_offset =  findPosY(document.getElementById(from_where)) - 23;
  }

  // don't show a popup if we can't use getElementById
  if (document.getElementById) 
  {	
    document.getElementById('tooltip_div').innerHTML = html_body;
    document.getElementById('tooltip_div').style.left = horiz_offset + 'px';
    document.getElementById('tooltip_div').style.top  = vert_offset + 'px';
    document.getElementById('tooltip_div').style.visibility = "visible"; 
  }
}

function hidetip()
{
  if (document.layers) document.layers['tooltip_div'].visibility = "hide"
  else if (document.all) document.all['tooltip_div'].style.visibility = "hidden"
  else if (document.getElementById) document.getElementById('tooltip_div').style.visibility = "hidden"
}
