function continentChange(continentFieldId, countryFieldId){
	index = $(continentFieldId).selectedIndex;
	option = $(continentFieldId).options[index];
	continentId = option.value;
	
	for(len = $(countryFieldId).options.length, i=len-1; i>=0; i--){
		$(countryFieldId).options[i] = null;
	}
	
	try{
		$(countryFieldId).add(new Option('', ''), null);
	}
	catch(ex){
		$(countryFieldId).add(new Option('', ''));
	}
	
	for(len = countries[continentId].length, i=0; i<len; i++){
		try{
			$(countryFieldId).add(new Option(countries[continentId][i]['text'], countries[continentId][i]['value']) , null);
		}
		catch(ex){
			$(countryFieldId).add(new Option(countries[continentId][i]['text'], countries[continentId][i]['value']));
		}
	}
}

function showReports(continentFieldId, countryFieldId){
		continentIndex = $(continentFieldId).selectedIndex;
		countryIndex = $(countryFieldId).selectedIndex;
		continentName = $(continentFieldId).options[continentIndex].text;
		countryName = $(countryFieldId).options[countryIndex].text;
		if(continentName){
			url = '/' + continentName;
			if(countryName){
				url += '/' + countryName;
			}
			url += '.html';
			url = url.replace(/ /g, '+');
			document.location = url;
		}
		return false;
}

function showReportsHp(continentName, countryFieldId){
	countryIndex = $(countryFieldId).selectedIndex;
	countryName = $(countryFieldId).options[countryIndex].text;
	if(continentName && countryName){
		url = '/' + continentName;
		url += '/' + countryName;
		url += '.html';
		url = url.replace(/ /g, '+');
		document.location = url;
	}
	return false;
}
