// JavaScript Document
function postFileReadySearch() {
   if (xmlhttp.readyState==4) {
      if (xmlhttp.status==200) {
         document.getElementById('searchresults').innerHTML= xmlhttp.responseText;
}
   }
}
function getFileSearch(pURL) {
   if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc
      xmlhttp=new XMLHttpRequest();
      xmlhttp.onreadystatechange=postFileReadySearch;
      xmlhttp.open("GET", pURL, true);
      xmlhttp.send(null);
   } else if (window.ActiveXObject) { //IE
      xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
      if (xmlhttp) {
         xmlhttp.onreadystatechange=postFileReadySearch;
         xmlhttp.open('GET', pURL, false);
         xmlhttp.send();
      }
   }
}

function execSearch(){
var value;
var url;
var searchtype;
var i;
value =document.getElementById('searchquery').value;
for (i = 0; i < document.frmsearch.searchtype.length; i++)
{
if (document.frmsearch.searchtype[ i ].checked)
searchtype=document.frmsearch.searchtype[ i ].value;
}

url = "quicksearch.php?stype=" + searchtype + "&squery=" + value;
getFileSearch(url);
}

function NoSubmit(){
return false;
}
