function loadCountries(locale) {
	var ajax = new GenericXMLHttpRequest();
	ajax.open('GET', getContextPath()+'/beapps/countriesList/loadCountries.jsp?locale='+locale, true);
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4){
			eval(ajax.responseText);
		}
	}
	ajax.send(null);
}

function redirectToCountry(language) {
	var form = document.countriesList;
	var countryID = form.countryID.options[form.countryID.selectedIndex].value;
	var ajax = new GenericXMLHttpRequest();
	ajax.open('GET', getContextPath()+'/beapps/countriesList/redirect.jsp?countryID='+countryID+'&language='+language, true);
	ajax.onreadystatechange = function() {
		if (ajax.readyState == 4){
			eval(ajax.responseText);
		}
	}
	ajax.send(null);		
}

