function displayDate(){
      var this_month = new Array(12);
      this_month[0]  = "\u044f\u043d\u0432\u0430\u0440\u044f";
      this_month[1]  = "\u0444\u0435\u0432\u0440\u0430\u043b\u044f";
      this_month[2]  = "\u043c\u0430\u0440\u0442\u0430";
      this_month[3]  = "\u0430\u043f\u0440\u0435\u043b\u044f";
      this_month[4]  = "\u043c\u0430\u044f";
      this_month[5]  = "\u0438\u044e\u043d\u044f";
      this_month[6]  = "\u0438\u044e\u043b\u044f";
      this_month[7]  = "\u0430\u0432\u0433\u0443\u0441\u0442\u0430";
      this_month[8]  = "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f";
      this_month[9]  = "\u043e\u043a\u0442\u044f\u0431\u0440\u044f";
      this_month[10] = "\u043d\u043e\u044f\u0431\u0440\u044f";
      this_month[11] = "\u0434\u0435\u043a\u0430\u0431\u0440\u044f";
      var today = new Date();
      var day   = today.getDate();
      var month = today.getMonth();
      var year  = today.getYear();
      if (year < 1900){
         year += 1900;
      }
      return(day+" "+this_month[month]+" " +year+  " года");
    }


function displayDateY(){
      var today = new Date();
       
      var year  = today.getYear();
      if (year < 1900){
         year += 1900;
      }
      return(" " +year+ "");
    }


function ImgShw(ID, width, height, alt)
{
	var scroll = "no";
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
	if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
	width = Math.min(width, screen.width-10);
	height = Math.min(height, screen.height-28);
	var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
	wnd.document.write(
		"<html><head>"+
		"<"+"script type=\"text/javascript\">"+
		"function KeyPress()"+
		"{"+
		"	if(window.event.keyCode == 27) "+
		"		window.close();"+
		"}"+
		"</"+"script>"+
		"<title>"+(alt == ""? "Картинка":alt)+"</title></head>"+
		"<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">"+
		"<img src=\""+ID+"\" border=\"0\" alt=\""+alt+"\" />"+
		"</body></html>"
	);
	wnd.document.close();
}

function ImgShw1(ID, width, height, alt)
{
	var scroll = "yes"; 
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
	if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
	width = Math.min(width, screen.width-10);
	height = Math.min(height, screen.height-28);
	var wnd = window.open("","","scrollbars="+scroll+",menubar=yes,resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
	wnd.document.write(
		"<html><head>"+
		"<"+"script type=\"text/javascript\">"+
		"function KeyPress()"+
		"{"+
		"	if(window.event.keyCode == 27) "+
		"		window.close();"+
		"}"+
		"</"+"script>"+
		"<title>"+(alt == ""? "Картинка":alt)+"</title></head>"+
		"<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">"+
		"<img src=\""+ID+"\" border=\"0\" alt=\""+alt+"\" />"+
		"</body></html>"
	);
	wnd.document.close();
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

var req;
var TimerID;
function send(email, nick, header, message)
{
	loadXMLDoc('email.php?email=' + email + '&name=' + nick + '&header=' + header + '&message=' + message)
}
function loadXMLDoc(url)
{
    if(window.XMLHttpRequest)
    {
        req = new XMLHttpRequest()
        req.onreadystatechange = processReqChange
        req.open("GET", url, true)
        req.send(null)
    }
    else if(window.ActiveXObject)
    {
        req = new ActiveXObject("Microsoft.XMLHTTP")
        if (req)
        {
            req.onreadystatechange = processReqChange
            req.open("GET", url, true)
            req.send()
        }
    }
}
function processReqChange()
{
    if (req.readyState == 4)
    {
        if (req.status == 200)
        {
            response = req.responseXML.documentElement
            result = response.getElementsByTagName('result')[0].firstChild.data
            show_result(result)
        }
        else alert("There was a problem retrieving the XML data:\n" + req.statusText)
    }
}
function show_result(result)
{
//    document.getElementById("xml_message_container").style.visibility = "visible"
    document.getElementById("xml_message").innerHTML = result
//    clearTimeout(TimerID)
//    TimerID = setTimeout('document.getElementById("xml_message_container").style.visibility = "hidden"', 10000)
}



function myPrint() {window.print();}

function writeAddress(name, domain) { document.write('<a href="mailto:' + name + '@' + domain + '">e-mail</a>') }

function Show_html(ID, width, height, scroll)
{
	var top=0, left=0;
	if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
	width = Math.min(width, screen.width-10);
	height = Math.min(height, screen.height-28);
	window.open(ID,"","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
}

