function pshow(Adr,ImageName,Ext,Wid,Hei,Tit) {
       newWindow=window.open("",""+ImageName+"","toolbar=no,location=no,directories=no,status=no,menubar=no,fullscreen=no,scrollbars=no,resizable=no,width="+Wid+",height="+Hei+"");
       var newContent = "<html><head>\n"
       newContent += "<title>" + Tit + "&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </title></head>\n"
       newContent += "<script language=\"JavaScript\">\n"
       newContent += "var r=-1\n"
       newContent += "function Init() {\n"
       newContent += "if (navigator.appName==\"Netscape\") r=0;\n"
       newContent += "self.focus(); window.setTimeout(\"r = 0\",1000)\n}\n"
       newContent += "</script>\n"
       newContent += "<body bgcolor=\"#ffffff\" onLoad=\"Init()\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\" leftmargin=\"0\">\n"
       newContent += "<a href=\"javascript: if (r == 0) self.close()\"><img border=0 src=\"" + Adr + ImageName + "." + Ext +"\"" + " width=\"" + Wid + "\" height=\"" + Hei + "\"></a>\n"
       newWindow.document.writeln(newContent)
       newWindow.document.writeln("</body></html>")
       newWindow.document.close()
  }
  
function calendarLoad(month, year) {
	// Создаем новый объект JSHttpRequest.
	var req = new JSHttpRequest();
	query=month+'_'+year;
	//alert(query);
	// Код, АВТОМАТИЧЕСКИ вызываемый при окончании загрузки.
	
	req.onreadystatechange = function() 
	{
		if (req.readyState == 4) 
		{
			// Записываем в <div> результат работы. 
			document.getElementById('calendar').innerHTML = req.responseJS.q
			// Отладочная информация.
//			document.getElementById('debug').innerHTML = 'Debig: '+req.responseText;
		}
	}
    // Разрешаем кэширование (чтобы при одинаковых запросах
    // не обращаться к серверу несколько раз).
//	   req.caching = true;
//	req.caching = false;
    // Подготваливаем объект.
    req.open('GET', 'calendar.php', true);
    // Посылаем данные запроса (задаются в виде хэша).
    req.send({ q: query });    
}
