<!--
	var ie = false;
	var xmlData;
	var timer;
	var bb_ads = new Array();
	var cur_ad = 0;
	var lit_ad;
	var scrolling = true;
	if(navigator.appName == 'Microsoft Internet Explorer')ie = true;
	
	if(!(ie))
		var request = new XMLHttpRequest();
	else{
		try{
			var request = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e1){
			try{ 
				var request = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e2){
				alert(e1 + '\n' + e2);
				var request = false;
			}
		}
	}

	/****************************************************************************************/
	/*	startBillboard - 8/1/07 by D. McDevitt												*/
	/*	This function opens the connection from the XMLHTTPRequest object to the desired 	*/
	/*	XML file, and sets the listener function.  It needs to be a function because it 	*/
	/*	cannot be launched until after the page is completely loaded, as subsequent 		*/
	/*	functions are dependant on page content												*/
	/****************************************************************************************/	
	function startBillboard(){
		request.open('GET','/eweb/upload/fei/billboard.xml',true);
		request.onreadystatechange=responseAjax;
		request.send(null);
	}

	//This function retrieves the XML object from the XMLHTTPRequest object, and once the XML
	//data has been fully loaded, calls the functions that load the XML content into a javascript array
	function responseAjax(){			
		if(request.readyState == 4)
			if(request.status == 200){
				xmlData = request.responseXML;
				loadAds();
				rotateAds();
			}else
				alert("XMLHttpRequest Failed, Status=" + request.status);			
	}
	
	/****************************************************************************************/
	/*	loadAds - 8/7/07 by D. McDevitt														*/
	/*	This function parses an XML sheet and creates an index in an array for each node	*/
	/*	It then sends each node to the getAd function to be parsed separately.  After the 	*/
	/*	array has been fully populated, it uses the values within to create the switchbar	*/
	/*	for user-navigation of the ads														*/
	/****************************************************************************************/
	function loadAds(){		
		for(i=0;i<xmlData.documentElement.childNodes.length;i++)		//loop through the XML document object
			if(xmlData.documentElement.childNodes[i].nodeType == 1){	//for each child element in the XML document
				bb_ads[bb_ads.length] = {};								//each element in the array of ads is an object
				getAd(xmlData.documentElement.childNodes[i]);			//now pupulate the properties of that object
			}
		var switchBarText = '';
		var linkWidth = ie?Math.round(parseInt(document.getElementById("ad_switch").currentStyle.width,10)/bb_ads.length)-10:Math.round(parseInt(getComputedStyle(document.getElementById("ad_switch"),null).width,10)/bb_ads.length)-10;
		var linkHeight = ie?parseInt(document.getElementById("ad_switch").currentStyle.height,10):parseInt(getComputedStyle(document.getElementById("ad_switch"),null).height,10);
		for(i=0;i<bb_ads.length;i++){
			switchBarText += '<a class="bb_link" style="vertical-align: middle;" href="javascript: selectAd('+i+');"><div class="bb_nav" id="ad_' + i + '" style="vertical-align: middle; width:'+ parseInt(linkWidth-bb_ads.length,10) + 'px; left: ' + i*linkWidth  + '; text-align: center;" onMouseOver="this.style.textDecoration=\'underline\';" onMouseOut="this.style.textDecoration=\'none\';">'+bb_ads[i].descriptor+'</div></a>';
		}
		document.getElementById("ad_switch").innerHTML = switchBarText;
		document.getElementById("ad_switch").style.height = '20px';
	}

	/****************************************************************************************/
	/*	GetAd - 8/7/07 by D. McDevitt														*/
	/*	This function parses a node on an XML sheet and loads the content into a sub-array	*/
	/*	The XML sheet must be formatted specifically, the primary tagname is 'ad', has		*/
	/*	an attribute 'order', and three sub-tags, 'descriptor': the text for the switchbar, */
	/*	'content': the actual html ad in a CDATA node, and 'displaytime': how long each	ad 	*/
	/*	should be displayed on the screen.													*/
	/****************************************************************************************/
	function getAd(n){
		switch(n.nodeType){
			case 1:			//element node
				if(n.tagName == 'ad'){	//main ad tag							
					bb_ads[bb_ads.length-1].order = n.getAttribute('order');
					if(n.childNodes.length > 0)
						for(var k=0;k<n.childNodes.length;k++)
							getAd(n.childNodes[k]);
				}else
					for(var x=n.firstChild;x!=null;x=x.nextSibling)
						getAd(x);
				break;
			case 3:			//text node
				if((/[^\t\n\r ]/.test(n.nodeValue)))//non-whitespace text
					bb_ads[bb_ads.length-1][n.parentNode.nodeName] = n.nodeValue;  //create property of the object named after this child node and containing its value
				break;
			case 4:			//CDATA node 
				bb_ads[bb_ads.length-1][n.parentNode.nodeName] = n.nodeValue;  //place character data in object just as the text nodes were
				break;
		}
		return null;
	}

	//The primary function that controls the scrolling display of ads
	function rotateAds(){
		document.getElementById("theBillboard").innerHTML = bb_ads[cur_ad].content;
		//if(!isNaN(lit_ad))document.getElementById('ad_'+lit_ad).style.backgroundColor = 'rgb(51,102,204)';
		if(!isNaN(lit_ad))document.getElementById('ad_'+lit_ad).style.backgroundColor = '';
		document.getElementById('ad_'+cur_ad).style.backgroundColor = 'rgb(101, 165, 186)';  /* #aabbff */
		lit_ad = cur_ad;
		cur_ad==bb_ads.length-1?cur_ad=0:cur_ad++;  
		timer = setTimeout(rotateAds, (parseInt(bb_ads[lit_ad].displaytime,10)*1000));  
	}

	//This function allows a user to display a specific ad by clicking on its title in the switchbar
	function selectAd(ad){
		scrolling = false;
		clearTimeout(timer);			//stop the banner rotation
		document.getElementById("theBillboard").innerHTML = bb_ads[ad].content;
		
		//if(!isNaN(lit_ad))document.getElementById('ad_'+lit_ad).style.backgroundColor = 'rgb(51,102,204)';		
		if(!isNaN(lit_ad))document.getElementById('ad_'+lit_ad).style.backgroundColor = '';		
		document.getElementById('ad_'+ad).style.backgroundColor = 'rgb(101, 165, 186)';  /* #aabbff */
		lit_ad = ad;
		ad==bb_ads.length-1?cur_ad=0:cur_ad = ad+1;		
		document.getElementById("ctrl_play_pause").src="/_images_v5/bb_switch_control_play.gif";
		document.getElementById("ctrl_play_pause").setAttribute("tipText","Start Scrolling");
	}
	
	//This function displays the previous ad in sequence to the one that is currently on screen.
	//It does not stop the scrolling of the ads
	function prevAd(){
		clearTimeout(timer);	//stop the billboard rotation
		cur_ad == 0?cur_ad=bb_ads.length-2:cur_ad == 1?cur_ad=bb_ads.length-1:cur_ad=cur_ad-2;
		rotateAds();	//restart the rotation with the previous ad in the sequence
		document.getElementById("ctrl_play_pause").src="/_images_v5/bb_switch_control_pause.gif";
		document.getElementById("ctrl_play_pause").setAttribute("tipText","Pause Scrolling");		
	}
	
	//This function displays the next ad in sequence to the one that is currently on screen.
	//It does not stop the scrolling of the ads
	function nextAd(){
		clearTimeout(timer);	//stop the banner rotation
		rotateAds();	//restart the rotation with the next ad in the sequence
		document.getElementById("ctrl_play_pause").src="/_images_v5/bb_switch_control_pause.gif";
		document.getElementById("ctrl_play_pause").setAttribute("tipText","Pause Scrolling");
	}
	
	//This function stops the scrolling of the ads and changes the displayed graphic (play/pause) on the controls,
	//and restarts the scrolling if the billboard is already stopped
	function freezeBillboard(){
		if(scrolling){			//the billboard is currently scrolling
			scrolling = false;
			clearTimeout(timer);
			document.getElementById("ctrl_play_pause").src="/_images_v5/bb_switch_control_play.gif";
			document.getElementById("ctrl_play_pause").setAttribute("tipText","Start Scrolling");
		}else{
			scrolling = true;
			timer = setTimeout(rotateAds, 1000); 
			document.getElementById("ctrl_play_pause").src="/_images_v5/bb_switch_control_pause.gif";
			document.getElementById("ctrl_play_pause").setAttribute("tipText","Pause Scrolling");
		}
	}
	
	//This function displays a tooltip when the user moves the mouse over the buttons on the control bar
	function showTip(target, e){
		var x = e.clientX + Geometry.getHorizontalScroll() + 10;
		var y = e.clientY + Geometry.getVerticalScroll() + 10;
	
		document.getElementById("tip").style.left = x + 'px';
		document.getElementById("tip").style.top = y + 'px';
		document.getElementById("tip").innerHTML = target.getAttribute("tipText");
		document.getElementById("tip").style.visibility = "visible";
		var countdown = window.setTimeout(function hideTip(){document.getElementById("tip").style.visibility = "hidden";},3000);
	}
	
	
	
//-->
