function ShowImgWindow(title, src, width, height)
{
	var wx = (screen.width-350)/2;
	var wy = (screen.height-500)/2;

	obj = window.open("", "", "scrollbars=0,dialog=0,minimizable=1,modal=1,width="+width+",height="+height+",resizable=0,left=" + wx + ", top=" + wy);
	obj.document.write("");
	obj.document.write("<head>");
	obj.document.write("<title>"+title+"</title>");
	obj.document.write("</head>");
	obj.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
	obj.document.write('<img src="'+src+'" />');
	obj.document.write("</body>");
	obj.document.write("");
}

function change_calend_top (way) {
	var all_months;
	var new_month;
	var new_year;
	all_months = new Array();

	all_months[1] = 'январь';
	all_months[2] = 'февраль';
	all_months[3] = 'март';
	all_months[4] = 'апрель';
	all_months[5] = 'май';
	all_months[6] = 'июнь';
	all_months[7] = 'июль';
	all_months[8] = 'август';
	all_months[9] = 'сентябрь';
	all_months[10] = 'октябрь';
	all_months[11] = 'ноябрь';
	all_months[12] = 'декабрь';

	if (way == 1) {
		if ((this_month - 1) == 0) {
			new_month = 12;
			new_year = this_year - 1;
		} else {
			new_month = this_month - 1;
			new_year = this_year;
		}
	}

	if (way == 2) {
		if ((this_month + 1) > 12) {
			new_month = 1;
			new_year = this_year + 1;
		} else {
			new_month = this_month + 1;
			new_year = this_year;
		}

	}

	if (new_month < 10) {
		q_month = '0' + new_month;
	} else {
		q_month = new_month;
	}

	month_s = '<a href="/calend/?date=' + new_year + '-' + q_month + '">' + all_months[new_month] + ' ' + new_year + '</a>';

	document.getElementById('calend_date').innerHTML = month_s;

	this_month = new_month;
	this_year = new_year;
}

