var xmlhttp7,xmlhttp6,xmlhttp8,xmlhttp9,xmlhttp11,xmlhttp12,xmlhttpgrade,xmlhttptrip;
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 show_sub1(cat1)
{
xmlhttp6=getxmlhttpobject()
var cat=document.getElementById(cat1).value;
var query="cat="+cat+"&cat1="+cat1;
/*if(document.getElementById('country'))
if(document.getElementById('country').value)
{
	document.getElementById("state_div").innerHTML='<select name="city" id="city"><option value="0">--City--</option></select>';
}*/
xmlhttp6.onreadystatechange=function(){
if (xmlhttp6.readyState==4)
 {
  document.getElementById(cat1+"_div").innerHTML=xmlhttp6.responseText;
        }
 }
 
xmlhttp6.open("GET","../pass.php?action=show_drop&"+query,true)
xmlhttp6.send(null)
}



function show_sub_region(cat1)
{
xmlhttp8=getxmlhttpobject()
var cat=document.getElementById(cat1).value;

var query="cat="+cat+"&cat1="+cat1;

xmlhttp8.onreadystatechange=function(){
if (xmlhttp8.readyState==4)
 {

  document.getElementById(cat1+"_div").innerHTML=xmlhttp8.responseText;
        }
 }

xmlhttp8.open("GET","pass.php?action=show_drop_region&"+query,true)
xmlhttp8.send(null)
}






function show_sub_region_trip(cat1)
{
xmlhttptrip=getxmlhttpobject()
var cat=document.getElementById(cat1).value;

var query="cat="+cat+"&cat1="+cat1;

xmlhttptrip.onreadystatechange=function(){
if (xmlhttptrip.readyState==4)
 {
	 //alert(xmlhttp8.responseText);
  document.getElementById(cat1+"_div").innerHTML=xmlhttptrip.responseText;
        }
 }

xmlhttptrip.open("GET","pass.php?action=show_drop_region_trip&"+query,true)
xmlhttptrip.send(null)
}


function show_grade(cat1)
{
xmlhttp12=getxmlhttpobject()
var cat=document.getElementById(cat1).value;
var query="cat="+cat+"&cat1="+cat1;

xmlhttp12.onreadystatechange=function(){
if (xmlhttp12.readyState==4)
 {
	  
  document.getElementById(cat1+"_div").innerHTML=xmlhttp12.responseText;
        }
 }

xmlhttp12.open("GET","pass.php?action=show_drop_hotal_place&"+query,true)
xmlhttp12.send(null)
}

<!---->


function show_sub3(cat1)
{
xmlhttp9=getxmlhttpobject()
var cat=document.getElementById(cat1).value;
var query="cat="+cat+"&cat1="+cat1;
/*if(document.getElementById('country'))
if(document.getElementById('country').value)
{
	document.getElementById("state_div").innerHTML='<select name="city" id="city"><option value="0">--City--</option></select>';
}*/
xmlhttp9.onreadystatechange=function(){
if (xmlhttp9.readyState==4)
 {
  document.getElementById(cat1+"_div").innerHTML=xmlhttp9.responseText;
        }
 }
 
xmlhttp9.open("GET","../pass.php?action=show_drop3&"+query,true)
xmlhttp9.send(null)
}

function search_ad()
{
xmlhttp11=getxmlhttpobject()
document.getElementById('div1').innerHTML='Loading results...<img src="images/load.gif" />';
var city=document.getElementById('city').value;
var cat1=document.getElementById('cat1').value;
var cat2=document.getElementById('cat2').value;
var query="?city="+city+"&cat1="+cat1+"&cat2="+cat2+"&type=1";
xmlhttp11.onreadystatechange=function(){
if (xmlhttp11.readyState==4)
 {
  document.getElementById('div1').innerHTML=xmlhttp11.responseText;
        }
 }
 
xmlhttp11.open("GET","search_ad.php"+query,true)
xmlhttp11.send(null)	
}

function search_key()
{
xmlhttp11=getxmlhttpobject()
document.getElementById('div1').innerHTML='Loading results...<img src="images/load.gif" />';
var keyword=document.getElementById('keyword').value;
var query="?keyword="+keyword+"&type=2";
xmlhttp11.onreadystatechange=function(){
if (xmlhttp11.readyState==4)
 {
  document.getElementById('div1').innerHTML=xmlhttp11.responseText;
        }
 }
 
xmlhttp11.open("GET","search_ad.php"+query,true)
xmlhttp11.send(null)	
}


/*   Start show Grade  */

function show_last_grade(cat1)
{
	
xmlhttpgrade=getxmlhttpobject();
var cat=document.getElementById(cat1).value;
var query="cat="+cat+"&cat1="+cat1;


xmlhttpgrade.onreadystatechange=function(){
if (xmlhttpgrade.readyState==4)
 {
	
  document.getElementById(cat1+"_div").innerHTML=xmlhttpgrade.responseText;
        }
 }
 
xmlhttpgrade.open("GET","pass.php?action=show_grade&"+query,true)
xmlhttpgrade.send(null)
}

/*   End  show Grade  */
