function MonthCalendar( idInput, idMcal, idOpener )
{
	this.idInput	= idInput;
	this.idMcal	= idMcal;
    this.mousePosX	= 0;
    this.mousePosY	= 0;
    this.format		= "m.y";

  	$('div.mcal').bgiframe();
	$('#'+idOpener).mousedown( function(e)
	{

		if( $('#'+idMcal+":visible").size() )
			return $('#'+idMcal).hide();

		$(".mcal:visible").hide();
		$('#'+idMcal).show();
	});

	this.hide	= function()
	{
		$('#'+this.idMcal).hide();
//		$("#content select.hidden:hidden").show().removeClass('hidden');
	}

	this.select = function( month )
	{
		year	= $('#'+this.idMcal+' select').val();
		output	= this.format.replace( /m/, month ).replace( /y/, year );
		$('#'+this.idInput).val( output ).trigger('change');
		this.hide();
		void(0);
	}
}

