var http = false;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}



//airport 
function addAirport(addAirport,prop_id) {
http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';
	  

  }
  document.getElementById('div1').style.display = "block";
  document.getElementById('div1').innerHTML = "Loading...";
  http.open("GET", "client/airport_rent.php?addAirport="+addAirport+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div1').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showAirportList(prop_id) {
http.abort();
document.getElementById('div1').style.display = "block";
http.open("GET", "./client/airport_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div1').innerHTML = http.responseText;
}
}
  http.send(null);
}







//Bank  /ATM 
function addBank(addBank,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div2').style.display = "block";
  document.getElementById('div2').innerHTML = "Loading...";
  http.open("GET", "client/bank_rent.php?addBank="+addBank+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div2').innerHTML = http.responseText;
    }
  }
  http.send(null);
}


function showBankList(prop_id) {
http.abort();
document.getElementById('div2').style.display = "block";
http.open("GET", "./client/bank_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div2').innerHTML = http.responseText;
}
}
  http.send(null);
}






//Schools
function addSchools(addSchools,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div3').style.display = "block";
  document.getElementById('div3').innerHTML = "Loading...";
  http.open("GET", "client/schools_rent.php?addSchools="+addSchools+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div3').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showSchoolsList(prop_id) {
http.abort();
document.getElementById('div3').style.display = "block";
http.open("GET", "./client/schools_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div3').innerHTML = http.responseText;
}
}
  http.send(null);
}






//Colleges
function addColleges(addColleges,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div4').style.display = "block";
  document.getElementById('div4').innerHTML = "Loading...";
  http.open("GET", "client/colleges_rent.php?addColleges="+addColleges+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div4').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showCollegesList(prop_id) {
http.abort();
document.getElementById('div4').style.display = "block";
http.open("GET", "./client/colleges_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div4').innerHTML = http.responseText;
}
}
  http.send(null);
}




//addHospitals
function addHospitals(addHospitals,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div5').style.display = "block";
  document.getElementById('div5').innerHTML = "Loading...";
  http.open("GET", "client/addHospitals_rent.php?addHospitals="+addHospitals+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div5').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showHospitalsList(prop_id) {
http.abort();
document.getElementById('div5').style.display = "block";
http.open("GET", "./client/addHospitals_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div5').innerHTML = http.responseText;
}
}
  http.send(null);
}






//addMarkets
function addMarkets(addMarkets,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div6').style.display = "block";
  document.getElementById('div6').innerHTML = "Loading...";
  http.open("GET", "client/addMarkets_rent.php?addMarkets="+addMarkets+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div6').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showMarketsList(prop_id) {
http.abort();
document.getElementById('div6').style.display = "block";
http.open("GET", "./client/addMarkets_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div6').innerHTML = http.responseText;
}
}
  http.send(null);
}







//addRestau
function addRestau(addRestau,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div7').style.display = "block";
  document.getElementById('div7').innerHTML = "Loading...";
  http.open("GET", "client/addRestau_rent.php?addRestau="+addRestau+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div7').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showRestaurentsList(prop_id) {
http.abort();
document.getElementById('div7').style.display = "block";
http.open("GET", "./client/addRestau_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div7').innerHTML = http.responseText;
}
}
  http.send(null);
}





//addCinema
function addCinema(addCinema,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div8').style.display = "block";
  document.getElementById('div8').innerHTML = "Loading...";
  http.open("GET", "client/addCinema_rent.php?addCinema="+addCinema+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div8').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showCinemaList(prop_id) {
http.abort();
document.getElementById('div8').style.display = "block";
http.open("GET", "./client/addCinema_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div8').innerHTML = http.responseText;
}
}
  http.send(null);
}







//addFire
function addFire(addFire,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div9').style.display = "block";
  document.getElementById('div9').innerHTML = "Loading...";
  http.open("GET", "client/addFire_rent.php?addFire="+addFire+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div9').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showFireDeptList(prop_id) {
http.abort();
document.getElementById('div9').style.display = "block";
http.open("GET", "./client/addFire_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div9').innerHTML = http.responseText;
}
}
  http.send(null);
}




//addGas
function addGas(addGas,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div10').style.display = "block";
  document.getElementById('div10').innerHTML = "Loading...";
  http.open("GET", "client/addGas_rent.php?addGas="+addGas+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div10').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showGasStationList(prop_id) {
http.abort();
document.getElementById('div10').style.display = "block";
http.open("GET", "./client/addGas_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div10').innerHTML = http.responseText;
}
}
  http.send(null);
}








//addLibraries
function addLibraries(addLibraries,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div11').style.display = "block";
  document.getElementById('div11').innerHTML = "Loading...";
  http.open("GET", "client/addLibraries_rent.php?addLibraries="+addLibraries+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div11').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showLibraryList(prop_id) {
http.abort();
document.getElementById('div11').style.display = "block";
http.open("GET", "./client/addLibraries_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div11').innerHTML = http.responseText;
}
}
  http.send(null);
}







//addPolice
function addPolice(addPolice,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div12').style.display = "block";
  document.getElementById('div12').innerHTML = "Loading...";
  http.open("GET", "client/addPolice_rent.php?addPolice="+addPolice+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div12').innerHTML = http.responseText;
    }
  }
  http.send(null);
}


function showPoliceList(prop_id) {
http.abort();
document.getElementById('div12').style.display = "block";
http.open("GET", "./client/addPolice_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div12').innerHTML = http.responseText;
}
}
  http.send(null);
}






//addGET
function addPost(addPost,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div13').style.display = "block";
  document.getElementById('div13').innerHTML = "Loading...";
  http.open("GET", "client/addPost_rent.php?addPost="+addPost+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div13').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showPostOfficeList(prop_id) {
http.abort();
document.getElementById('div13').style.display = "block";
http.open("GET", "./client/addPost_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div13').innerHTML = http.responseText;
}
}
  http.send(null);
}





//addChild
function addChild(addChild,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div14').style.display = "block";
  document.getElementById('div14').innerHTML = "Loading...";
  http.open("GET", "client/addChild_rent.php?addChild="+addChild+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div14').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showChildCareList(prop_id) {
http.abort();
document.getElementById('div14').style.display = "block";
http.open("GET", "./client/addChild_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div14').innerHTML = http.responseText;
}
}
  http.send(null);
}







//addSenior
function addSenior(addSenior,prop_id) {
  http.abort();
  for(i=1;i<16;i++)
  {
	  document.getElementById('div'+i).style.display='none';

  }
  document.getElementById('div15').style.display = "block";
  document.getElementById('div15').innerHTML = "Loading...";
  http.open("GET", "client/addSenior_rent.php?addSenior="+addSenior+"&prop_id="+prop_id, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('div15').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function showSeniorCareList(prop_id) {
http.abort();
document.getElementById('div15').style.display = "block";
http.open("GET", "./client/addSenior_rent.php?prop_id="+prop_id, true);
http.onreadystatechange=function() {
if(http.readyState == 4) {
document.getElementById('div15').innerHTML = http.responseText;
}
}
  http.send(null);
}

