var NameOfFunction_xmlHttp
  
 //CALL THIS FUNCTION USING ONCLICK OR ETC.. 
 //THIS FUNCTION USE TO PASS THE DATA / VALUES TO YOUR PAGING FILE(PHP)                               
 function NameOfFunction_showData(pNum,catNum)
 {    
                
    NameOfFunction_xmlHttp=NameOfFunction_GetXmlHttpObject()
    if (NameOfFunction_xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    } 
 
    var url="auto_ajax.php?page="+pNum+"&category="+catNum

    NameOfFunction_xmlHttp.onreadystatechange=NameOfFunction_stateChanged 
    NameOfFunction_xmlHttp.open("GET",url,true)
    NameOfFunction_xmlHttp.send(null)
} 
 
 
function NameOfFunction_stateChanged() 
{ 
    if (NameOfFunction_xmlHttp.readyState==4 || NameOfFunction_xmlHttp.readyState=="complete")
    {                                   
                                             //NAME OF YOUR DIV
        document.getElementById("auto_ajax").innerHTML=NameOfFunction_xmlHttp.responseText 
    } 
}
 
function NameOfFunction_GetXmlHttpObject()
{
    var NameOfFunction_xmlHttp=null;
    try
    {
        // Firefox, Opera 8.0+, Safari
        NameOfFunction_xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            NameOfFunction_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            NameOfFunction_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
 
    return NameOfFunction_xmlHttp; 
 }

