function geoSearch()
	{
      document.getElementById("output").innerHTML="<img src='images/ajax-loader.gif' alt='Loading results...'>";
	  var dest = "srv/en/geo.search?northBL=" 
            + document.advsearch.northBL.value + "&westBL=" + document.advsearch.westBL.value + "&eastBL="
            + document.advsearch.eastBL.value + "&southBL=" + document.advsearch.southBL.value + "&relation="
            + document.advsearch.relation.value + "&any=" + document.advsearch.any.value + "&title="
            + document.advsearch.title.value + "&abstract=" + document.advsearch.abstract.value+ "&datefrom="
            + document.advsearch.datefrom.value + "&dateto=" + document.advsearch.dateto.value;
	
      try {
          // Moz supports XMLHttpRequest. IE uses ActiveX.
          // browser detction is bad. object detection works for any browser
          xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
          // browser doesn't support ajax. should load iframe: 	frames['geoFrame'].location.href = address;
      }

      // the xmlhttp object triggers an event everytime the status changes
      // triggered() function handles the events
      xmlhttp.onreadystatechange = triggered;

      // open takes in the HTTP method and url.
      xmlhttp.open("GET", dest);

      // send the request. if this is a POST request we would have
      // sent post variables: send("name=aleem&gender=male)
      // Moz is fine with just send(); but
      // IE expects a value here, hence we do send(null);
      xmlhttp.send(null);
      }

    function triggered() {
      // if the readyState code is 4 (Completed)
      // and http status is 200 (OK) we go ahead and get the responseText
      // other readyState codes:
      // 0=Uninitialised 1=Loading 2=Loaded 3=Interactive
      if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
          // xmlhttp.responseText object contains the response.
        document.getElementById("output").innerHTML = xmlhttp.responseText;
        
        //Expand container height if on tabbed view
        if(document.getElementById('tab4')){
        var outputHeight = document.getElementById('output').offsetHeight;
        document.getElementById('tab4').style.height=outputHeight+80+'px';
        document.getElementById('tabs').style.height=outputHeight+80+'px';
        }
      }
      }
	  
    function geoResults(dest)
	{
        document.getElementById("output").innerHTML='<img src="images/ajax-loader.gif" alt="Loading results...">';
      try {
          // Moz supports XMLHttpRequest. IE uses ActiveX.
          // browser detction is bad. object detection works for any browser
          xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
          // browser doesn't support ajax. should load iframe: 	frames['geoFrame'].location.href = address;
      }

      // the xmlhttp object triggers an event everytime the status changes
      // triggered() function handles the events
      xmlhttp.onreadystatechange = triggered;

      // open takes in the HTTP method and url.
      xmlhttp.open("GET", dest);

      // send the request. if this is a POST request we would have
      // sent post variables: send("name=aleem&gender=male)
      // Moz is fine with just send(); but
      // IE expects a value here, hence we do send(null);
      xmlhttp.send(null);
      return 1;
      }


function clearSearch(){
    document.getElementById("tab4").style.height="600px";
    document.getElementById("tabs").style.height="600px";
}
    function rssResults(dest)

	{

        document.getElementById("rss-out").innerHTML='<img src="images/ajax-loader.gif" alt="Loading results...">';

      try {

          // Moz supports XMLHttpRequest. IE uses ActiveX.

          // browser detction is bad. object detection works for any browser

          xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");

      } catch (e) {

          // browser doesn't support ajax. should load iframe: 	frames['geoFrame'].location.href = address;

      }



      // the xmlhttp object triggers an event everytime the status changes

      // triggered() function handles the events

      xmlhttp.onreadystatechange = rssTriggered;



      // open takes in the HTTP method and url.

      xmlhttp.open("GET", dest);



      // send the request. if this is a POST request we would have

      // sent post variables: send("name=aleem&gender=male)

      // Moz is fine with just send(); but

      // IE expects a value here, hence we do send(null);

      xmlhttp.send(null);

      return 1;

      }
    function rssTriggered() {

      // if the readyState code is 4 (Completed)

      // and http status is 200 (OK) we go ahead and get the responseText

      // other readyState codes:

      // 0=Uninitialised 1=Loading 2=Loaded 3=Interactive

      if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {

          // xmlhttp.responseText object contains the response.

        document.getElementById("rss-out").innerHTML = xmlhttp.responseText;

      }

      }
