var myHandler;
bbcjs.addOnLoadItem("myHandler = new LocalHandler('content');");

// Asynchronous get request
function makeAsyncGetRequest(url)
{
	if (bbcjs.http.supported) {
	bbcjs.http.get(url,myHandler);
	}
}

// on change handler class
LocalHandler = function(display)
{
	this.content = document.getElementById(display);
	this.onLoad = function (r)
	{
		this.content.innerHTML = r.agent.responseText;
	}
}
// Here we inherit the Handler class, handy (pun intended) for defining the interface methods
LocalHandler.prototype = new bbcjs.http.Handler();

var current;

function displayContent (id)
{
	var previous = document.getElementById('content'+current);
	var next = document.getElementById('content'+id);
	
	if (previous) previous.style.display = 'none';
	next.style.display = 'block';
	
	current = id;
}