// JavaScript Document
function hideDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'hidden'; 
} 
} 
}

function showDivphase2(subcat,city,cityarea,rate) {
document.getElementById("ajax").innerHTML=""; 
//alert("in func");	
var ajaxRequest;  // The variable that makes Ajax possible!
 
     try
	 {
      // Opera 8.0+, Firefox, Safari
      ajaxRequest = new XMLHttpRequest();
     } 
	 catch (e)
	 {
      // Internet Explorer Browsers
      try
	  {
       ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
      }
	  catch (e) 
	  {
       try
	   {
        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
       } 
	   catch (e)
	   {
        // Something went wrong
        alert("Your browser broke!");
        
       }
      }
     }
     
     // Create a function that will receive data sent from the server
     ajaxRequest.onreadystatechange = function(){
      if(ajaxRequest.readyState == 4){
       if (ajaxRequest.status == 200)
        {
         var resp=ajaxRequest.responseText;
        
		document.getElementById("ajax").innerHTML=resp;        
        }
      }
       
     }

    // alert(subcat+"--"+city);
     url="view-service-providers.php?selsubcat="+subcat+"&selcity="+city+"&selcityarea="+cityarea+"&txtrating="+rate;
     ajaxRequest.open("GET", url, true);
     ajaxRequest.send(null);  
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 

} 

