

function getRandom( low, high ) {
  return Math.floor(Math.random() * (1 + high - low) + low);
}

function showBuzz() {
  
  if (!document.getElementById || !document.getElementById('menu')) { return; }
  
  var menu = new Array(
    "benefits.php::We can help you find the right payroll solution for your business, whatever the number of employees.",
    "recruiting.php::Finding the right talent is a critical component of growing your business.",
    "interim.php::Companies with changing strategies and objectives face unique HR issues. Learn how to embrace change with the least impact on productivity and morale.",
    "policies.php::Establishing company policies early helps to create and maintain a consistent company culture, reinforce company policies, and avoid potential lawsuits.",
    "organizational.php::Avoid the delays associated with restructuring, and the costs associated with hiring the wrong people.",
    "testimonials.php::See what CEOs and HR Directors say about working with NextLevel HR.",
    "company.php::NextLevel's consultants will work with you through your development and evolution allowing your company to reach its next level of potential.  Meet our consultants..."
  );
    
  var num  = getRandom( 0, menu.length-1 );
  var buzzItem = menu[ num ].split("::");
  var buzzLink = buzzItem[0];
  var buzzText = buzzItem[1];
  
  var menuBox = document.getElementById('menu');
  menuBox.innerHTML = "";
  
  // create anchor
  var txtAnchor = document.createElement('a');
  txtAnchor.setAttribute('href', buzzLink);
  txtAnchor.onmouseover = function () { document.getElementById('moreBtn').src = "/images/more_on.gif"; };
  txtAnchor.onmouseout  = function () { document.getElementById('moreBtn').src = "/images/more.gif"; };
  menuBox.appendChild(txtAnchor);
  
  // create text div
  var txtDiv = document.createElement('div');
  with (txtDiv.style) {
    padding = "5px";
    lineHeight = "18px";
  }
  txtDiv.innerHTML = buzzText;
  txtAnchor.appendChild(txtDiv);
    
  // create link div
  var lnkDiv = document.createElement('div');
  with (lnkDiv.style) {
    fontWeight = "bold";
    borderTop  = "1px dotted gray";
    padding = "5px";
  }
  lnkDiv.innerHTML = "Learn More ";
  txtAnchor.appendChild(lnkDiv);  
  
  var moreImg = document.createElement('img');
  moreImg.setAttribute('id', 'moreBtn');
  moreImg.setAttribute('src', '/images/more.gif');
  lnkDiv.appendChild(moreImg);
}
