var bubbleText = new Array();
bubbleText['blink1'] = "Where's the Snow?";
bubbleText['blink2'] = "Product Find-O-Matic";
bubbleText['blink3'] = "Team & Sponsorship";
bubbleText['blink4'] = "Fiesta Food & Drink";

function showInfoBubble(location)
{
     var text = bubbleText[location];
     var bubbleContent = document.getElementById('bubbleContent');
     var bubbleTable = document.getElementById('bubbleTable');

     bubbleContent.innerHTML = text;

     var posx = 0;
     var posy = 0;
     if (!e) var e = window.event || window.Event;
     if (e.pageX || e.pageY) 	{
          posx = e.pageX;
          posy = e.pageY;
     }
     else if (e.clientX || e.clientY) 	{
          posx = e.clientX + document.body.scrollLeft
               + document.documentElement.scrollLeft;
          posy = e.clientY + document.body.scrollTop
               + document.documentElement.scrollTop;
     }

     setInfoBubblePosition(posx,posy);
     bubbleTable.style.visibility = "visible";

     document.onmousemove = moveInfoBubble;

}

function moveInfoBubble(e)
{
     var posx = 0;
     var posy = 0;
     if (!e) var e = window.event || window.Event;
     if (e.pageX || e.pageY) 	{
          posx = e.pageX;
          posy = e.pageY;
     }
     else if (e.clientX || e.clientY) 	{
          posx = e.clientX + document.body.scrollLeft
               + document.documentElement.scrollLeft;
          posy = e.clientY + document.body.scrollTop
               + document.documentElement.scrollTop;
     }

     setInfoBubblePosition(posx,posy);
}

function setInfoBubblePosition(posx,posy)
{
     var bubbleTable = document.getElementById('bubbleTable');
     bubbleTable.style.left = posx - 39;
     bubbleTable.style.top = posy - bubbleTable.offsetHeight - 6;
}

function hideInfoBubble()
{
     var bubbleTable = document.getElementById('bubbleTable');
     bubbleTable.style.visibility = "hidden";
     document.onmousemove = null;
}

var currentCell = null;

function highlightCell(cellName)
{
     if(currentCell != null)
     {
          var curCell = document.getElementById(currentCell);
          curCell.className = 'DB-listing';
     }

     var newCellName = cellName+"Cell";
     currentCell = newCellName;
     var newCell = document.getElementById(newCellName);
     newCell.className = 'DB-listing-highlight';


}
