/*
COPYRIGHT NOTICE
All text and images on this website are copyright of the site's owner, Free Property Add.
All code and programming is copyright Seagull Designs and is used strictly under licence to Free Property Add for the Free Property Add website ONLY. Re-use of this code, in whole or in part, for any website other than Free Property Add will constitue a breach of such copyright which will be strictly prosecuted under internation copyright laws.

Free Property Add's licence clearly states that credit and a website link to www.seagulldesigns.co.uk should be placed on every page on the site.

Unauthorised amendment or removal of this copyright notice shall also constitute a breach of coyright.

*/




function getTowns(region)
{



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


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


document.getElementById("towns").innerHTML=xmlHttp.responseText;
document.getElementById("areas").innerHTML="<select name=\"search_area\"><option>-</option></select>";

      
      
      }
    }
  xmlHttp.open("GET","/includes/locations.php?action=gettowns&region="+region,true);
  xmlHttp.send(null);
  }
  
  




function getAreas(town)
{



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


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


document.getElementById("areas").innerHTML=xmlHttp.responseText;


      
      
      }
    }
  xmlHttp.open("GET","/includes/locations.php?action=getareas&town="+town,true);
  xmlHttp.send(null);
  }