var xmlHttp;

function showResult(str)
{
if (str.length==0)
 { 
 document.getElementById("tmtsearch").
 innerHTML="";
 document.getElementById("tmtsearch").
 style.border="0px";
 document.getElementById("tmtsearch").
 style.width="0px";
 document.getElementById("tmtsearch").
 style.height="0px";
 
 return
 }

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 

var url="http://www.klru.org/texasmonthlytalks/search/tmtsearch2.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

} 

function changeFocus(e)
{
	var getkey;
	
	if (window.event)
	{
		getkey = e.keyCode;
	}
	else if (e.which)
	{
		getkey = e.which;
	}
	
	if (getkey == 40)
	{
		jQuery.tableNavigation({
			table_selector: 'table.navigateable',
			row_selector: 'table.navigateable tbody tr',
			selected_class: 'search_selected',
			activation_selector: 'a.activation',
			bind_key_events_to_links: true,
			focus_links_on_select: true,
			select_event: 'click',
			activate_event: 'dblclick',
			activation_element_activate_event: 'click',
			scroll_overlap: 20,
			cookie_name: null,
			focus_tables: true,
			focused_table_class: 'focused',
			jump_between_tables: true,
			disabled: false,
			on_activate: null,
			on_select: null
			});
	}
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("tmtsearch").
 innerHTML=xmlHttp.responseText;
 document.getElementById("tmtsearch").
 style.border="1px solid #A5ACB2";
 document.getElementById("tmtsearch").
 style.width="233px";
 document.getElementById("tmtsearch").
 style.height="";
 document.getElementById("tmtsearch").
 style.overflow="auto";
 
 }
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}// JavaScript Document
