function getXMLHTTP()
{
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 getCat(strURL,trail,popularOrRecent,base_path,pageno,key)
 {   

	//alert(pageno);
 	//alert('topic id '+strURL);
	//alert(document.getElementById('sort_tid').value);
	//alert('sub cat id '+trail);
	//alert(popularOrRecent);
    if(popularOrRecent=='popular' || popularOrRecent=='recent')
    { 
		
       //if(strURL == 'sort_tid')
	     //strURL = document.getElementById('sort_tid').value ; 
		//alert(trail);
		//alert(sortTID);
        //strURL = base_path+"/feature.php/?tid="+strURL+"&trail="+trail;      
    } 
   // else
   //{
   		//trail = document.getElementById('sort_tid').value;
        //strURL = base_path+"/feature.php/?tid="+strURL+"&trail="+trail+"&popularOrRecent="+popularOrRecent+"&pageno="+pageno+"&k="+key;
		//alert(strURL);
   // }    
//alert(strURL);

	var req = getXMLHTTP();
	if(req)
	{ 
	req.onreadystatechange = function()
	{ 
		if(req.readyState == 4)
		{  
				var ajaxStr = req.responseText;              
				document.getElementById('search_block').innerHTML= ajaxStr; 
				setheight();
				
			
		}            
	}        
	req.open("GET", strURL, true); //open url using get method
	req.send(null);
	}
}
