function displayTriviaQuestion()
{
	var QuestionArray = new Array(7);
	var QuestionIndex = Math.round(Math.random()*7)+1;
	var Question;
	
	QuestionArray[0] = "What animal linked name describes someone who always gets blamed?";
	QuestionArray[1] = "Who was the first Non-Englishman to play James Bond?";
	QuestionArray[2] = "What is the only word in the English language that begins and ends with und?";
	QuestionArray[3] = "How many \"c\'s\" denote the value of a diamond?";
	QuestionArray[4] = "What is \'felicide\'?";
	QuestionArray[5] = "According to Tina Turner, what is the speed limit in Nutbush?";
	QuestionArray[6] = "Which movie was released as 'Vaselina' in Venezuela?";
		
	if (QuestionIndex < 1 || QuestionIndex > 7) // double check we didn't get random nbr 1
		QuestionIndex = Math.abs(QuestionIndex % 7);

	Question = QuestionArray[QuestionIndex-1];
	
	document.write(Question);
}

var timer;
var init = 1;
var containerWidth = 480;
// Ensure the width of the scroller is divisible by 2. This allows smooth flowing of the scrolled content
function setWidth()
{ 
  var obj = document.getElementById('q-scroll');
  
  obj.onmouseover = function() { stopScroller(); }
  obj.onmouseout = function() { resumeScroller(); }
  
  objWidth=getOffset(obj);
  if (init) { obj.style.left = '0'; init = 0; setTimeout ("setWidth();", 1000); }
  else
  {
	  HalfWidth=Math.floor(objWidth/2);
	  newWidth = (HalfWidth*2);
	  moveLayer(newWidth);
  }
}

// Move the layer by one pixel to the left
function moveLayer(width)
{
  var obj = document.getElementById('q-scroll');
  var maxLeft = -width;
  obj.style.left = ((parseInt(obj.style.left) <= maxLeft) ? containerWidth : parseInt(obj.style.left)-1)+"px";
  timer = setTimeout ("moveLayer("+width+");", 25); 
}

// Get width and height of layer
function getOffset(obj) 
{
   var oWidth = obj.offsetWidth;
   return oWidth;
}

function stopScroller()
{
	clearTimeout(timer);
}

function resumeScroller()
{
	setWidth();
}

window.onload = function() { setWidth(); }