function GetRequestObject() {
	var X;
	try {
		X=new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			X=new ActiveXObject("Microsoft.XMLHTTP");
		} catch (oc) {
			X=null;
		}
	}
	if(!X && typeof XMLHttpRequest != "undefined")
		X = new XMLHttpRequest();
	if (!X)
		alert("Could not create connection object.");
	return X;
}

function RotateLotteryData() {
  var div = document.getElementById("LotteryDiv");

  // Update the HTML, wrap everything in a link
  var html = '<a style="text-decoration: none;" href="/listing_show.php?lid=218944">'+lotteryData[LotteryIndex]+'</a>';
  div.innerHTML = html;
  LotteryIndex++;
  if (LotteryIndex >= lotteryData.length) {
	LotteryIndex = 0;
  }

  // Schedule the next update
  var t = setTimeout("RotateLotteryData();", 4000); // delay in ms
}
