function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	 {
		 // Firefox, Opera 8.0+, Safari
		 xmlHttp=new XMLHttpRequest();
	 }
	catch (e)
	 {
		 // Internet Explorer
		 try {xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");} catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
	 }
	return xmlHttp;
}

function showResumes(cat_id,spec_id)
{
	if ( cat_id=='0'){return;}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	  {
		  alert ("Ваш браузер не поддерживает HTTP Request");
		  return;
	  } 
	var params = "cat_id="+cat_id+"&spec_id="+spec_id;
	var IE='\v'=='v';
	if(IE){var url=encodeURI(location.href);}else{var url=location.href;}
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("http_x_requested_with", "XMLHttpRequest");
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	$("#frm_res_list").html("<p>Запрашиваем данные...</p>");
	xmlHttp.send(params);
} 

function showLResumes(limit)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	  {
		  alert ("Ваш браузер не поддерживает HTTP Request");
		  return;
	  } 
	var params = "limit="+limit;
	var IE='\v'=='v';
	if(IE){var url=encodeURI(location.href);}else{var url=location.href;}
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("http_x_requested_with", "XMLHttpRequest");
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
//	$("#frm_res_list").html("<p>Запрашиваем данные...</p>");
	xmlHttp.send(params);
	$("#xItemsList").tablesorter();
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		$("#frm_res_list").html(xmlHttp.responseText);
	} 
}

function showResumes2(cat_id,spec_id)
{
	if ( cat_id=='0'){return;}
	$.ajax({   
		type: "POST",
		url: location.href,   
		data: "cat_id="+cat_id+"&spec_id="+spec_id,   
		cache: true,   
		success: function(html){$("#frm_res_list").html(html);},
		error: function() {alert("Ваш браузер не поддерживает HTTP Request");}
	      });
} 
function showLResumes2(limit)
{
	$.ajax({   
		type: "POST",
		url: location.href,   
		data: "limit="+limit,   
		cache: true,   
		success: function(html){$("#frm_res_list").html(html);},
		error: function(){alert("Ваш браузер не поддерживает HTTP Request");}
	      });
	$("#xItemsList").tablesorter();
}

