// JavaScript Documentvar ShowRandomTextBlock = function()
var ShowRandomTextBlock = function()
{
  var blocks = new Array();
  function DoIt()
  {
    var d = document.getElementById('portletTwo').getElementsByTagName('div');
    for (var x=0, y=d.length; x < y; x++) {
      // capture the divs with the right class name
      if (d[x].className == 'publication2') { blocks.push(d[x]); }
    }
    // find random number
    var spot = Math.floor(Math.random() * blocks.length);
    // Set whether each div block should be seen or not
    for (var x=0, y=blocks.length; x < y; x++) {
      if (spot == x) { blocks[x].style.display = ''; }
      else { blocks[x].style.display = 'none'; }
    }
  }
  window.onload = function () {
  setTimeout(initOverLabels, 50);
  DoIt();
};
}();
