<!--
var timeout = 500;
var timeoutId;
//write out the listen popup div.
document.write('<div id="listenpopup"');
if (timeout) document.write(' onmouseout="popupTimer();" onmouseover="if (timeoutId) clearTimeout(timeoutId);"');
document.write(' style="display: none;"></div>');

//create the listen popup object

var lisPop= new ListenPopup();

// Closes the listen popup after timeout has elapsed
function popupTimer(){
	timeoutId=setTimeout('lisPop.closeMe();',timeout);
}

// Class ListenPopup encapsulates the popup.
function ListenPopup(){

	this._container=document.getElementById?document.getElementById('listenpopup'):document.all.listenpopup;
	
	ListenPopup.prototype.showListenWindow=function(popID){
			
		try{
			//Build the popup HTML
			var calendarHTML=this.buildPopup();
			//Get the object on the page
			var objCal=(document.all)?document.all(popID):document.getElementById(popID);
			//Set the object container properties
			this._container.innerHTML= calendarHTML;
			this._container.style.left=this.getElementX(objCal)+27+"px";
			this._container.style.top=parseInt(this.getElementY(objCal))-42+"px";
			this._container.style.zIndex=999;
			this._container.style.display="";
		
		}catch(e){
			// on error, just hide popup
			this.closeMe();
		}
	}
	// build html for the popup
	ListenPopup.prototype.buildPopup=function() {				
		calHTML="<div class='list_top'></div>";
		calHTML+="	<div class='contain_all'>";
		calHTML+="		<div class='contain_left'>";
		calHTML+="			<p><a href='http://www.bbc.co.uk/radio/aod/radio1.shtml' onclick='aodpopup(\"http://www.bbc.co.uk/radio/aod/radio1.shtml\");return false;'><strong>Listen live</strong> | RealPlayer</a></p>";
		calHTML+="			<p><a href='http://www.bbc.co.uk/radio/aod/radio1_asx.shtml' onclick='aodpopup(\"http://www.bbc.co.uk/radio/aod/radio1_asx.shtml\");return false;'><strong>Listen Live</strong> | Windows Media <span>(UK only)</span></a></p>";
		calHTML+="		</div>";
		calHTML+="		<div class='contain_right'>";
		calHTML+="			<p><a href='/radio/audiohelp_install.shtml'>Audio Help</a></p>";
		calHTML+="			<p class='close'><a href='javascript:lisPop.closeMe();'>Close</a></p>";
		calHTML+="		</div>";
		calHTML+="	</div>";
		calHTML+="<div class='list_bottom'></div>";
		return calHTML;
	}
	
	// get horizontal position of element
	ListenPopup.prototype.getElementX=function(element){
		var x=element.offsetLeft;
		var oParent=element.offsetParent;
		while(oParent){
			x+=oParent.offsetLeft;
			oParent=oParent.offsetParent;}
		return x;
	}
	
	// get vertical position of element
	ListenPopup.prototype.getElementY=function(element){
		var y=element.offsetTop;
		var oParent=element.offsetParent;
		while(oParent){
			y+=oParent.offsetTop;
			oParent=oParent.offsetParent;}
		return y;
	}
	
	// setup close function and re-initialise elements
	ListenPopup.prototype.closeMe=function(){
		this._container.style.left="";
		this._container.style.top="";
		this._container.style.display="none";
	}
}

-->