// requires jquery library

var BoozCoOffice = jQuery.extend({},{
	
	office_content: {},
	region_content: {},

	office_div_id: '',
	region_div_id: '',
	
	_current_office: '',
	_current_region: '',

	showOffice: function(name) {
		jQuery('#'+this.office_div_id).empty().append(this._getOfficeContent(name));
		this._current_office = name;
		return false;
	},
	hideOffice: function() {
		if (this._current_office.length) {
			jQuery('#'+this.office_div_id).empty();
		}
		this._current_office = '';
		return false;
	},

	showRegion: function(name) {
		jQuery('#'+this.region_div_id).empty().append(this._getRegionContent(name));
		this._current_region = name;
		return false;
	},
	hideRegion: function() {
		if (this._current_region.length) {
			jQuery('#'+this.region_div_id).empty();
		}
		this._current_region = '';
		return false;
	},


	_getOfficeContent: function(name) {
		if (typeof(this.office_content[name]) == 'undefined') return '';
		return ''+this.office_content[name];
	},
	_getRegionContent: function(name) {
		if (typeof(this.region_content[name]) == 'undefined') return '';
		return ''+this.region_content[name];
	},
	
	_end: null
});



