var url;
var tm2;
var http;

function search2(input,url) {
	//alert(input + " || " + url);
  if (input.length > 1) {
    http = getHTTPObject();
    http.open("GET", url + escape(input), true); 
    http.onreadystatechange = handleSearch2;
    http.send(null);
  } else {
    clearSearchDiv2();
	//document.getElementById('documentation').style.display='block';
  }
}

function handleSearchTimed2(input,url) {
	window.clearTimeout(tm2);
	tm2 = setTimeout(function() {search2(input,url)}, 500);
	}

function handleSearch2() {
  if (http.readyState == 4) {
    //alert(http.responseText);
	//document.getElementById('documentation').style.display='none';
    //document.getElementById('footer').style.position = 'relative';
    document.getElementById('documentation-search-frame').innerHTML = http.responseText;
    document.getElementById('documentation-search-frame').style.visibility='visible';
  }
}
function clearSearch() {
  tm2 = setTimeout('clearSearchDiv2()', 500);
}
function clearSearchTimeout() {
  window.clearTimeout(tm2);
}
function clearSearchDiv2(input) {
  document.getElementById('documentation-search-frame').innerHTML = '';
  document.getElementById('documentation-search-frame').style.visibility='hidden';
}
