var xmlHttp = false;
var ID;
   try 
	{
		xmlHttp = new XMLHttpRequest();
	} 
	catch (trymicrosoft) 
	{
		try 
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (othermicrosoft) 
		{
			try 
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (failed) 
			{
				xmlHttp = false;
			} 
		}
	}
   if (!xmlHttp)
     alert("Error initializing XMLHttpRequest!");

function popimg(url, title, width, height)
{
	str="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\"><html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">\n<title>"+title+"</title>\n</head>\n<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>\n<img src='"+url+"' alt='"+title+"'>\n</body>\n</html>";
	f_win = window.open(url ,"BigImage" ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=no,resizable=yes,menubar=no,status=no,directories=no,location=no');
	f_win.document.writeln(str);
	f_win.focus();
	f_win.document.close();
}

function popup(url, title, width, height)
{
	f_win = window.open(url ,"" ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=no,resizable=yes,menubar=no,status=no,directories=no,location=no');
	f_win.focus();
}

function callShowid(id_ob,sh) 
{
	
	if ((id_ob == null) || (id_ob == "") || (id_ob == 0)) return;
	
	var url = "../templates/russian/chapters/pages/_showobjects.php?id=" +id_ob + "&sh=" + sh;
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function()
	{
		if (xmlHttp.readyState == 4) 
		{
		var response = xmlHttp.responseText;
			document.getElementById("td_"+id_ob).innerHTML = response;
		}
	}
	xmlHttp.send(null);
}

function callShowFR(cnt,sid) 
{
		
	var url = "../templates/russian/chapters/pages/_showfind_res.php?ac=search&count=" +cnt+"&sid="+sid;
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function()
	{
		if (xmlHttp.readyState == 4) 
		{
		var response = xmlHttp.responseText;
			document.getElementById("find_res").innerHTML = response;
		}
	}
	xmlHttp.send(null);
}

function mtrOver( trid, bgcol ) 
{
    trid.style.backgroundColor=bgcol;
}
  
  function mtrOut( trid )
{
    trid.style.backgroundColor='#CCD6FF';
}



