function wsRadioPopup(radioURL, radioWidth, radioHeight){
	ismac=false;
	if(navigator.userAgent.indexOf("Mac")!=-1){
		radioHeight = radioHeight + 70;
	}
	return wsPopup(radioURL, 'aod', 'width='+ radioWidth + ',height='+ radioHeight + ',toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100')
}

var newwindow;
function wsPopup(popURL, popTarget, popProperties)
{
	newwindow = window.open(popURL,popTarget,popProperties);
	if (window.focus) {newwindow.focus()}
	return false;
}

function wsMakeHomepage(service, linkText) {
	if (navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE") + 5) >= 5 
	&& navigator.platform.indexOf("Win16") == -1 
	&& navigator.platform.indexOf("Mac") == -1)
	{
		document.write('<span id=\"hp\" style=\"behavior:url(#default#homepage)\"></span>');
		if (!hp.isHomePage("http://www.bbc.co.uk/"+ service +"/index.shtml"))
		{
			var hpLink = 
			"<li><a href=\"http://www.bbc.co.uk/" + service + 
			"/index.shtml\" onClick=\"style.behavior=\'url(#default#homepage)\';" +
			"setHomePage(\'http://www.bbc.co.uk/" + service + "/index.shtml\');\">" +
			linkText + "</a></li>";
			document.write(hpLink);
		}	
	}
}

function ws_email_form_length_ok() {
	var maxchars = 1500;
	if (document.EmailSideForm.message.value.length > maxchars) {
	  alert('Too much data in the text box');
          return false;          
    }
	return true;
}
