// JavaScript Document
function newAjax(){
    var xmlHttpReq =false;
    var self = this;
    if (window.XMLHttpRequest){
        self.xmlHttpReq = new XMLHttpRequest();
	}else if (window.ActiveXObject){
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	return self.xmlHttpReq;
	
}
function $(id){
	return document.getElementById(id);
}
function getList(field, what, r10){
	if(what=="Enter search phrase here" || what== ""){
		alert('Please enter a keyword.');
		return;
	}
	var ajax = newAjax();
	ajax.open("POST", "theatre_listings_call.php", true);
	ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	ajax.onreadystatechange = function()
	{
		if (ajax.readyState == 4)
		{
			$('injectHere').innerHTML =ajax.responseText;
			
		}
	}
	if(!r10){
		ajax.send("searchFor="+what+"&searchIn="+field+"&state="+$('state')[$('state').selectedIndex].value);
	}else{
		ajax.send("");
	}
}