	var numItems = 5;
	var itemCount = 0;
	var names = new Array();
	var dates = new Array();
	var saledates = new Array();
	var times = new Array();
	var prices = new Array();
	var details = new Array();
	var buys = new Array();
	var small_pics = new Array();
	var large_pics = new Array();
	var buy_nows = new Array();
	var desc = new Array();
	var related = new Array();
	var doors = new Array();
	var specials = new Array();

	var xmlDoc = null;
	var isIE = false;
	var xmlFile = "coliseum.xml";

	if (window.ActiveXObject){ 
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		isIE = true;
		xmlDoc.onreadystatechange=verify;
	}
	else {
		xmlDoc = document.implementation.createDocument("", "", null);
		xmlDoc.onload=getDataFF;
  	}

	xmlDoc.async="false";
	xmlDoc.load(xmlFile);
	
	function verify() {
	  // 0 Object is not initialized
	  // 1 Loading object is loading data
	  // 2 Loaded object has loaded data
	  // 3 Data from object can be worked with
	  // 4 Object completely initialized
	  if (xmlDoc.readyState != 4){
	    return false;
	  }
	  else
		getDataIE();
	}
	
	function getDataIE() { // Internet Exporer
	
		xmlObj=xmlDoc.documentElement;

		itemCount = xmlObj.childNodes.length;
		if (xmlObj.childNodes.length > 0) {
			for (i = 0; i < xmlObj.childNodes.length; i++) {
				names[i] = xmlObj.childNodes[i].childNodes[0].firstChild.nodeValue;
				names[i] = names[i].replace("!n","<br/>");
				dates[i] = xmlObj.childNodes[i].childNodes[1].firstChild.nodeValue;
				str = new String(dates[i]);
				while ( str.indexOf("!n") != -1 ) {
					str = str.replace("!n","<br>");
				}
				dates[i] = str;
				times[i] = xmlObj.childNodes[i].childNodes[2].firstChild.nodeValue;
				str = new String(times[i]);
				while ( str.indexOf("!n") != -1 ) {
					str = str.replace("!n","<br>");
				}
				times[i] = str;
				prices[i] = xmlObj.childNodes[i].childNodes[3].firstChild.nodeValue;
				str = new String(prices[i]);
				while ( str.indexOf("!n") != -1 ) {
					str = str.replace("!n","<br>");
				}
				prices[i] = str;
				if ( names[i] == "Hampton Jazz Festival" )
				    details[i] = "http://www.hampton.gov/coliseum/jazzfestival/";
				else
				    details[i] = "event_details.php?event=" + i;
				buys[i] = xmlObj.childNodes[i].childNodes[5].firstChild.nodeValue;
				if (buys[i] == "#")
					buys[i] = "http://www.ticketmaster.com/venue/8257";
				small_pics[i] = xmlObj.childNodes[i].childNodes[6].firstChild.nodeValue;
				large_pics[i] = xmlObj.childNodes[i].childNodes[7].firstChild.nodeValue;
				specials[i] = xmlObj.childNodes[i].childNodes[10].firstChild.nodeValue;
				if (specials[i] == "#")
					specials[i] = "None at this time.";
				str = new String(specials[i]);
				while ( str.indexOf("!n") != -1 ) {
					str = str.replace("!n","<br>");
				}
				specials[i] = str;
				related[i] = xmlObj.childNodes[i].childNodes[11].firstChild.nodeValue;
				doors[i] = xmlObj.childNodes[i].childNodes[12].firstChild.nodeValue;
				if ( doors[i] == "#" )
					doors[i] = "";
				desc[i] = xmlObj.childNodes[i].childNodes[13].firstChild.nodeValue;
				str = new String(desc[i]);
				while ( str.indexOf("!n") != -1 ) {
					str = str.replace("!n","<br>");
				}
				desc[i] = str;
				buy_nows[i] = xmlObj.childNodes[i].childNodes[15].firstChild.nodeValue;
				saledates[i] = xmlObj.childNodes[i].childNodes[16].firstChild.nodeValue;
				if (saledates[i] == "#")
					saledates[i] = "";
				//alert (names[i] + " " + dates[i] + " " + times[i] + " " + prices[i] + " " + details[i] + " " + buys[i] + " " + small_pics[i] + " " + large_pics[i]);
				//alert (prices[i]);
			}			
		}
	
	}			


	function getDataFF() { // FireFox and Netscape
			
		var items = xmlDoc.getElementsByTagName('item');
		itemCount = items.length;
										
		for (i=0; i < items.length; i++) {
			names[i] = items[i].childNodes[1].firstChild.nodeValue;
			names[i] = names[i].replace("!n","<br/>");
			dates[i] = items[i].childNodes[3].firstChild.nodeValue;
			str = new String(dates[i]);
			while ( str.indexOf("!n") != -1 ) {
				str = str.replace("!n","<br>");
			}
			dates[i] = str;
			times[i] = items[i].childNodes[5].firstChild.nodeValue;
			str = new String(times[i]);
			while ( str.indexOf("!n") != -1 ) {
				str = str.replace("!n","<br>");
			}
			times[i] = str;
			prices[i] = items[i].childNodes[7].firstChild.nodeValue;
			str = new String(prices[i]);
			while ( str.indexOf("!n") != -1 ) {
				str = str.replace("!n","<br>");
			}
			prices[i] = str;
			if ( names[i] == "Hampton Jazz Festival" )
			    details[i] = "http://www.hampton.gov/coliseum/jazzfestival/";
			else
			    details[i] = "event_details.php?event=" + i;
			buys[i] = items[i].childNodes[11].firstChild.nodeValue;
			if (buys[i] == "#")
				buys[i] = "http://www.ticketmaster.com/venue/8257";
			small_pics[i] = items[i].childNodes[13].firstChild.nodeValue;
			specials[i] = items[i].childNodes[21].firstChild.nodeValue;
			if (specials[i] == "#")
				specials[i] = "None at this time.";
			str = new String(specials[i]);
			while ( str.indexOf("!n") != -1 ) {
				str = str.replace("!n","<br>");
			}
			specials[i] = str;
			related[i] = items[i].childNodes[23].firstChild.nodeValue;
			doors[i] = items[i].childNodes[25].firstChild.nodeValue;
			if ( doors[i] == "#" )
				doors[i] = "";
			desc[i] = items[i].childNodes[27].firstChild.nodeValue;
			str = new String(desc[i]);
			while ( str.indexOf("!n") != -1 ) {
				str = str.replace("!n","<br>");
			}
			desc[i] = str;
			large_pics[i] = items[i].childNodes[15].firstChild.nodeValue;
			buy_nows[i] = items[i].childNodes[31].firstChild.nodeValue;
			saledates[i] = items[i].childNodes[33].firstChild.nodeValue;
			if (saledates[i] == "#")
				saledates[i] = "";
		}
	}

	
	function visibility(x, end) {
		
		var doneScrolling = 0;
		
		if ( x > 5)
			looping = true;
		
		for (i = 1; i <= numItems; i++) {
			if ( i == x || looping ) {
				picture = document.getElementById("picture" + i);
				picture.style.visibility = "visible";
				if ((document.all && !window.opera && !window.XMLHttpRequest))
					picture.style.position = "fixed";
				itm = document.getElementById("item" + i);
				itm.style.visibility = "visible";
				if ((document.all && !window.opera && !window.XMLHttpRequest))
					itm.style.position = "fixed";
				looping = false;
			} else {
				picture = document.getElementById("picture" + i);
				picture.style.visibility = "hidden";
				if ((document.all && !window.opera && !window.XMLHttpRequest))
					picture.style.position = "absolute";
				itm = document.getElementById("item" + i);
				itm.style.visibility = "hidden";
				if ((document.all && !window.opera && !window.XMLHttpRequest))
					itm.style.position = "absolute";
			}
		}
		if ( x > itemCount ) {
			x = 1;
			end = true
		}
		if ( x > numItems && end == true ) {
			clearTimeout(timer);
			x = 1
			advance(5);
			end = false;
		} else if (x > numItems) {
			clearTimeout(timer);
			advance(x);
		}
		x++;
		
		timer = setTimeout('cycle(' + x + ',' + end + ')', 5000);
	
	}
	
	function cycle(x, end) {
		visibility(x, end);
	}
	
	function stopper(x) {
		end = true;
		clearTimeout(timer);
		visibility(x, end);
	}
	
	function gotFocus() {
	
		e = document.getElementById("email");
		if ( e.value == "your email address" )
			e.value = "";
	
	}
	
	function lostFocus() {
	
		e = document.getElementById("email");
		if ( e.value == "" )
			e.value = "your email address";
	
	}
	
	function setup(iMin,iMax) {
	
		for (i = iMin; i <= iMax; i++) {
			t = document.getElementById("pic" + (i + 1));
			t.src = large_pics[i];
			t.alt = names[i];
			t = document.getElementById("thumb" + (i + 1));
			t.src = small_pics[i];
			t.alt = names[i];
			t = document.getElementById("piclink" + (i+1));
			t.href = details[i];
			t = document.getElementById("item" + (i + 1));
			var strHTML = "<h1 style='color:yellow'>" + names[i] + "</h1>";
			strHTML += "<font color='yellow'>" + dates[i] + "</font><br />";
			if ( times[i] == "#" )
				times[i] = "";
			strHTML += times[i] + "<br />";
			strHTML += "<br />";
			if ( names[i] == "Arena Racing USA" ) {
				strHTML += "See event details for entire Arena Racing schedule.";	
			}
			//strHTML += "Ticket Prices:<br />";
			//strHTML += prices[i];
			if (buy_nows[i] == 1)
				strHTML += "<br><font color='yellow'><a href='" + buys[i] + "' target='_blank' style='color:yellow'>BUY TICKETS</a> | ";
			else
				strHTML += "<br/><br/>";
			strHTML += "<a href='" + details[i] + "' style='color:yellow'>EVENT DETAILS</a></font>";
			t.innerHTML = strHTML;
		}
		
		if ( itemCount > 5) {
			rb = document.getElementById("right_button");
			rb.innerHTML = '<img id="r_button" src="images/right_button_avail_off.jpg" onmouseover="this.src=\'images/right_button_avail_on.jpg\'; this.style.cursor=\'pointer\';" onmouseout="this.src=\'images/right_button_avail_off.jpg\';" onclick="javascript:advance(6);"/>';
		}
	
	}
	
	function advance(position) {
	
		i = 5;
		x = 1;
		for (; x <= 5; x++) {
			t = document.getElementById("pic" + x);
			t.src = large_pics[position - i];
			t.alt = names[position - i];
			t = document.getElementById("piclink" + x);
			t.href = details[position - i];
			t = document.getElementById("thumb" + x);
			t.alt = names[position - i];
			t.src = small_pics[position - i];
			t = document.getElementById("item" + x);
			var strHTML = "<h1 style='color:yellow'>" + names[position - i] + "</h1>";
			strHTML += "<font color='yellow'>" + dates[position - i] + "</font><br />";
			if ( times[position - i] == "#" )
				times[position - i] = "";
			strHTML += times[position - i] + "<br />";
			strHTML += "<br />";
			if ( names[position - i] == "Arena Racing USA" ) {
				strHTML += "See event details for entire Arena Racing schedule.";	
			}
			//strHTML += "Ticket Prices:<br />";
			//strHTML += prices[i];
			if (buy_nows[position - i] == 1)
				strHTML += "<br><font color='yellow'><a href='" + buys[position - i] + "' target='_blank' style='color:yellow'>BUY TICKETS</a> | ";
			else
				strHTML += "<br/><br/>";
			strHTML += "<a href='" + details[position - i] + "' style='color:yellow'>EVENT DETAILS</a></font>";
			t.innerHTML = strHTML;
			i -= 1;
		}
		
		// CHECK FOR MORE EVENTS RIGHT
		rb = document.getElementById("right_button");
		if ( position == itemCount) {
			rb.innerHTML = '<img id="r_button" src="images/right_button_unavail.jpg"/>';
		} else if ( position < itemCount ) {
			rb.innerHTML = '<img id="r_button" src="images/right_button_avail_off.jpg" onmouseover="this.src=\'images/right_button_avail_on.jpg\'; this.style.cursor=\'pointer\';" onmouseout="this.src=\'images/right_button_avail_off.jpg\';" onclick="javascript:advance(' + (position + 1) + ');"/>';
		}

		// CHECK FOR MORE EVENTS LEFT
		lb = document.getElementById("left_button");
		if ( position > 5 ) {
			lb.innerHTML = '<img id="l_button" src="images/left_button_avail_off.jpg" onmouseover="this.src=\'images/left_button_avail_on.jpg\'; this.style.cursor=\'pointer\';" onmouseout="this.src=\'images/left_button_avail_off.jpg\';" onclick="javascript:advance(' + (position - 1) + ');"/>';
		} else if ( position = itemCount ) {
			lb.innerHTML = '<img id="l_button" src="images/left_button_unavail.jpg"/>';
		}
	
	}
	
	function eventDetails(num) {
	
		p = document.getElementById("pic1");
		p.src = large_pics[num];
		t = document.getElementById("item1");
		pi = document.getElementById("picture1");
		pi.style.position = "fixed";
		var strHTML = "<h1 style='color:#990000'>" + names[num] + "</h1>";
		strHTML += "<font color='#003399'>" + dates[num] + "</font><br />";
		if ( times[num] == "#" )
			times[num] = "";
		strHTML += "<br/>" + times[num] + "<br />";
		strHTML += "<br />";
		strHTML += "<p style='color:#990000'><a href='" + buys[num] + "'>BUY TICKETS</a> | ";
		strHTML += "<a href='" + details[num] + "'>SEATING CHART</a></p>";
		t.innerHTML = strHTML;
	}
	
