function addEngine()
{
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
{
window.sidebar.addSearchEngine("http://searchable.awardspace.com/searchable.src","http://searchable.awardspace.com/s.gif","searchable","Web");
}
else
{
alert("Only Firefox, Mozilla and Netscape 6+ are supported.");
}
}

function addSearchProvider() {
 
try {
window.external.AddSearchProvider('http://searchable.awardspace.com/opensearchdescription.xml');
}
catch (e) {
alert("Currently, the search provider function requires either Firefox 2 or Internet Explorer 7 only.");
return;
}
 
} 

function empty()
{
 try {
 if(!document.getElementById || !document.createTextNode){return;}
 initDOMnews();	 
 document.getElementById('oq').value="";
 document.getElementById('q').value="";
 document.getElementById('as_filetype')="";
 }
 catch (e) {
  return true;	 
 }
}

function presubmit(){
   oq=document.getElementById('oq').value;
   q=document.getElementById('q').value
   
   document.getElementById('q').value=oq;
   
   var mySelect=document.getElementById('myfiletype');
   theIndx=mySelect.selectedIndex;
   mySelect_value="";
   if(mySelect.options[theIndx].value != "none")
   {
    mySelect_value = mySelect.options[theIndx].value;
    if(mySelect_value=='doc'||mySelect_value=='pdf'||mySelect_value=='ppt'||mySelect_value=='xls')
    {
      document.getElementById('as_filetype').value+=mySelect_value;
      document.getElementById('q').value=oq;
    }
    else
    {	    
      document.getElementById('q').value+='+'+mySelect_value;
      document.getElementById('q').value+='+more:index_of';
    }
   }
   else
   {	   
     document.getElementById('q').value+='+more:index_of';
   }
   
   var em=document.getElementById('oq');
   em.parentNode.removeChild(em);
   mySelect.parentNode.removeChild(mySelect);
   document.forms[0].submit();
   return true;
}
