/*
	Copyright © Eleanor CMS
	URL: http://eleanor-cms.ru, http://eleanor-cms.com
	E-mail: support@eleanor-cms.ru
	Developing: Alexander Sunvas*
	Interface: Rumin Sergey
	=====
	*Pseudonym. See addons/copyrights/info.txt for more information.
*/
function Calendar(mid,year,month,div_id,id)
{	this.AddYear=function()
	{		this.year++;
		this.DoAjax();
		return false;	}
	this.SubYear=function()
	{		this.year--;
		this.DoAjax();
		return false;	}
	this.AddMonth=function()
	{		this.month++;
		this.DoAjax();
		return false;	}
	this.SubMonth=function()
	{		this.month--;
		this.DoAjax();
		return false;
	}
	this.DoAjax=function()
	{		t=this;
		Ajax(
				'"'+this.mid+'"',
				{					'event':'calendar',
					'month':this.month,
					'year':this.year,
					'id':this.id
				},
				function(result)
				{					$('#'+t.div_id).html(result['calendar']);
					t.month=result['month'];
					t.year=result['year'];				},
				true
		)	}
	this.mid=mid;
	this.id=id;
	this.year=year;
	this.month=month;
	this.div_id=div_id;}
