function changepays(selectcountry,divid,flg) {
  
  if (divid == 'listarchistate2') {
    var url = "listhome1.php?countryid=" + selectcountry;
    var listisland = "listisland2";
    var listcity = "listcity2";
  }
  else {
    var url = "listhome.php?countryid=" + selectcountry;
    var listisland = "listisland";
    var listcity = "listcity";
  }
  
  xmlHttp=getXMLHttpObject();
  
  if (xmlHttp == null) {
    alert ("Browser does not support HTTP Request");
  } 
  else {
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
      
      if(xmlHttp.responseText != "<noscript></noscript>") {
        
        document.getElementById(divid).innerHTML = xmlHttp.responseText;
        document.getElementById(divid).style.display = "block";
        document.getElementById(listisland).style.display = "none";
        document.getElementById(listcity).style.display = "none";
      }
    }
  }
}

///////////////////////////////////////////
function changestate(selectstate,divid,flg) {
  
  if (divid == 'listcity2') {
    var url = "listhome1.php?stateid=" + selectstate;
    var listisland = "listisland2";
  }
  else {
    var url = "listhome.php?stateid=" + selectstate;
    var listisland = "listisland";
  }
  
  xmlHttp = getXMLHttpObject();
  
  if (xmlHttp == null) {
    alert ("Browser does not support HTTP Request");
  } 
  else {
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
      
      if(xmlHttp.responseText != "<noscript></noscript>") {
        
        document.getElementById(divid).innerHTML = xmlHttp.responseText;
        document.getElementById(divid).style.display = "block";
        document.getElementById(listisland).style.display = "none";
      }
    }
  }
}

///////////////////////////////////////////
function changearchi(selectarchi,divid,flg) {
  
  if (divid == 'listisland2') {
    var url = "listhome1.php?archiid=" + selectarchi;
    var listcity = "listcity2";
  }
  else {
    var url = "listhome.php?archiid=" + selectarchi;
    var listcity = "listcity";
  }
  
  xmlHttp=getXMLHttpObject();
  
  if (xmlHttp == null) {
    alert ("Browser does not support HTTP Request");
  }
  else {
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
  
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
    
      if(xmlHttp.responseText != "<noscript></noscript>") {
      
        document.getElementById(divid).innerHTML = xmlHttp.responseText;
        document.getElementById(divid).style.display = "block";
        document.getElementById(listcity).style.display = "none";
      }
    }
  }
}

/////////////////////////////////////////////
function changeisland(selectisland,divid,flg) {
  
  if (divid == 'listcity2') {
    var url="listhome1.php?islandid=" + selectisland;
  }
  else {
    var url="listhome.php?islandid=" + selectisland;
  }
  
  xmlHttp = getXMLHttpObject();
  
  if (xmlHttp == null) {
    alert ("Browser does not support HTTP Request");
  }
  else {
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
      
      if(xmlHttp.responseText != "<noscript></noscript>") {
        
        document.getElementById(divid).innerHTML = xmlHttp.responseText; 
        document.getElementById(divid).style.display = "block";
      }
    }
  }
}

///////////////////////////
function getXMLHttpObject() {

  var xmlHttp = null;
  try {
    xmlHttp=new XMLHttpRequest();
  }
  catch (e) {
   // Internet Explorer
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp;
}

function changepayslist(countryid) {
  xmlHttp=getXMLHttpObject();
  
  if (xmlHttp==null) {
    alert ("Browser does not support HTTP Request");
  } 
  else {
    var url="listhome.php?countryid1="+countryid;
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
      
      if(xmlHttp.responseText != "<noscript></noscript>") {
        
        document.getElementById("fldsubtype").innerHTML = xmlHttp.responseText;
      }
    }
  }
}


/////////////////////////////////////////////function for getlable/////////
function GetLabel(vname,id) {
  
  xmlHttp=getXMLHttpObject();
  
  if (xmlHttp == null) {
    alert ("Browser does not support HTTP Request");
  } 
  else {
    var url="listhome.php?vname="+vname;
    
    xmlHttp.open("GET",url,false);
    xmlHttp.send(null);
    
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
      
      if(xmlHttp.responseText != "<noscript></noscript>") {
        
        document.getElementById(id).innerHTML = xmlHttp.responseText; 
      }
    }
  }
}



