function ZooEvents(type) {
	this.method = 'POST';
	this.uri		= '/events';
	this.type	 = type;

	this.getUri = function() {
		return this.uri;
	}

	this.getMethod = function() {
		return this.method;
	}

	this.handleFailed = function(o) {
		//alert(o.statusText);
	};

	this.request = function(params, callback, uri, method) {
		if (!uri) {
			uri = this.uri;
		}

		if (!method) {
			method = this.method;
		}

		return YAHOO.util.Connect.asyncRequest(method, uri, callback, params);
	}

	this.getDay = function(day,channel) {
		this.request(
			'request=ajax&type='+this.type+'&function=getEventsByDay&day=' + day + '&channel=' + channel,
			{ success:ZooEvents.getDayProcess, failure:ZooEvents.handleFailed, scope: ZooEvents }
		);
	};

	this.getDayProcess = function(o) {
		tab_menu_close_all_tabs_event.fire();

		if (!o.responseText) {
			return;
		}

		r = document.getElementById('EventsListCalendarContent');

		r.innerHTML = o.responseText;

		myEventsListTabs.set('activeIndex', 1);
		//myEventsListTabs.set('activeTab', 'EventsListCalendarContent')
	};

	this.getCalendarMonth = function(month, year,channel) {
		this.request(
			'request=ajax&type='+this.type+'&function=getCalendarMonth&month=' + month + '&year=' + year + '&channel=' + channel,
			{ success:ZooEvents.getCalendarMonthProcess, failure:ZooEvents.handleFailed, scope: ZooEvents }
		);
	};

	this.getCalendarMonthProcess = function(o) {
		r = document.getElementById('EventsListCalendar');
		r.innerHTML = o.responseText;
	};

};
