function showEduCenterContent()
{
	var cont = document.getElementById("divEduCenterFilterResult");
	
	var http = createRequestObject();
	if( http ) 
	{
		http.open('get', "filter/get_filter_request.php");
		http.onreadystatechange = function () 
		{
			if(http.readyState == 4) 
			{
				cont.innerHTML = http.responseText;
				cont.style.display = 'block';
			}
		}
		http.send(null);
	}
	else alert("К сожалению невозможно отобразить результаты выбора!");
}

// создание ajax объекта
function createRequestObject() 
{
	try { return new XMLHttpRequest() }
	catch(e) 
	{
		try { return new ActiveXObject('Msxml2.XMLHTTP') }
		catch(e) 
		{
			try { return new ActiveXObject('Microsoft.XMLHTTP') }
			catch(e) { return null; }
		}
	}
}


function getRequestBody(oForm)
{ 
	var aParams = new Array();
	
	for(var i = 0; i < oForm.elements.length; i++)
	{
		var checkbox = oForm.elements[i];
		if (checkbox.type == 'checkbox')
		{
			if (checkbox.checked==true)checkbox.value='ON';
			else checkbox.value='OFF';
		}
		var sParam = encodeURIComponent(oForm.elements[i].name);
		sParam += "=";
		sParam += encodeURIComponent(oForm.elements[i].value);
		aParams.push(sParam);
	}
        return aParams.join("&");
}

function sendEduCenterRequest(oForm)
{
	
	//var oForm = document.getElementById(formname);
  var sBody = getRequestBody(oForm);
  var oXmlHttp = createRequestObject();
        
  oXmlHttp.open("POST",oForm.action, true);
  oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  
  oXmlHttp.onreadystatechange = function() 
	{
		if(oXmlHttp.readyState == 4)
		{
			if(oXmlHttp.status == 200)
			{
				var cont = document.getElementById("divEduCenterFilterResult");
				cont.innerHTML = oXmlHttp.responseText;
				document.getElementById("divEduCenterFilterResultContainer").style.display = 'block';
			}
			else
			{
				saveResult("Ошибка: " + oXmlHttp.statusText);
			}
		}
	};
	oXmlHttp.send(sBody);
}
