function SupportView(options) {
	var self = this;
	self.userServiceFacade = options.userServiceFacade;
	self.inet = options.inet;
	self.i18n = options.i18n;
	self.messageHandler = options.messageHandler;
	self._init();
	
	self.suportMailLink = '<a id="supportMailLnk" class="condiciones" href=""></a>';
};

SupportView.prototype._init = function() {
	var self = this;
//	self.inet.getCountries('fancybox-iframe');
	$(document).off('change', '#supportCountrySelect').on('change', '#supportCountrySelect', function(event) {
		if($('#supportCountrySelect').val() == -1) {
			if($('#supportMailDiv').html()) {
				$('#supportMailDiv').html('');
			}
		} else {
			var countryId = $('#supportCountrySelect').val();
			self.userServiceFacade.getSupportMail(countryId, self._onsSuccessGetSupportMail, self._onErrorGetSupportMail, self);
		}
	});
};

SupportView.prototype._onsSuccessGetSupportMail = function(data) {
	if(!$('#supportMailDiv').html()) {
		$('#supportMailDiv').html(this.i18n.msg('msg.info.support.mail') + this.suportMailLink);
	} 
	$('#supportMailLnk').attr('href', 'mailto:' + data.contact);
	$('#supportMailLnk').html(data.contact);
};

SupportView.prototype._onErrorGetSupportMail = function() {
};
