CountryResearch = function(){
	this.countryResearchContainer = Element.get("countryResearchContainer");
	this.countrySelect = Element.get("countryResearchCountrySelect");
	this.crSubmit = Element.get("countryResearchSubmit");
	
	this.isAdvancedOptionsOpened = false;
};

CountryResearch.prototype.attachEvents = function() {
		Events.add({
			element: this.crSubmit,
			type: "click",
			handler: this.submitSelection,
			context:this	
		});
};

CountryResearch.prototype.submitSelection = function(e,el,args) {
	e.cancel();
	var countryKey = this.countrySelect.options[this.countrySelect.selectedIndex].value;

	if ("all" == countryKey || "" == countryKey) {
		window.location = '/ft/markets/worldEquities.asp';
	} else {
		window.location = '/ft/markets/countryOverview.asp?country='+countryKey;
	}	
};
