var xhrTranslate;
var translateFR = 1;
	
function getTranslation(urlfr, urlen){
	var s_url = "";
	s_url = (translateFR == 1)?urlen:urlfr;
	
	xhrTranslate = new Request.HTML({
		url: s_url,
		onSuccess: function(html){
			displayTranslation(html);
		},
		onFailure: function(){
			alert('The request failed.');
		}
	});
	xhrTranslate.send();
}

function displayTranslation(responseTree, responseElements, responseHTML, responseJavaScript){
	$("rightcontainer").empty();
	$("rightcontainer").adopt(responseTree);
	
	translateFR = (translateFR == 1)?0:1;
}