function AjaxFunction(select_id,cat_id)
{

var httpxml;
try
  {
  // Firefox, Opera 8.0+, Safari
  httpxml=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
		  try
   			 		{
   				 httpxml=new ActiveXObject("Msxml2.XMLHTTP");
    				}
  			catch (e)
    				{
    			try
      		{
      		httpxml=new ActiveXObject("Microsoft.XMLHTTP");
     		 }
    			catch (e)
      		{
      		alert("Your browser does not support AJAX!");
      		return false;
      		}
    		}
  }
function stateck() 
    {
    if(httpxml.readyState==4)
      {

var myarray=eval(httpxml.responseText);
// Before adding new we must remove previously loaded elements
for(j=document.classified.subcat.options.length-1;j>=0;j--)
{
document.classified.subcat.remove(j);
}


for (i=0;i<myarray.length;i++)
{
var optn = document.createElement("OPTION");
var arr= myarray[i].split("|"); 
optn.text = arr[1];
optn.value = arr[0];
document.classified.subcat.options.add(optn);

} 
      }
    }
	var url="dd.php";
url=url+"?cat_id="+cat_id;
url=url+"&select_category="+select_id;
url=url+"&sid="+Math.random();
httpxml.onreadystatechange=stateck;
httpxml.open("GET",url,true);
httpxml.send(null);
  }

  function display(sID) {

    oObj = document.getElementById(sID);
    if (oObj) {
    oObj.style.display='inline';
    }
    }

    function hide(sID) {
    oObj = document.getElementById(sID);
    if (oObj) {
    oObj.style.display='none';
    }
    }