function sendRequest(file, _resultId, getRequestProc) {
	resultId = _resultId;
	document.getElementById(resultId).innerHTML = '';
	httpRequest.open('get', file);
	httpRequest.onreadystatechange = getRequestProc;
	httpRequest.send(null);
}

function getRequest() {
	if (httpRequest.readyState==4 && httpRequest.responseText!='') {
		document.getElementById(resultId).innerHTML = httpRequest.responseText;
		document.getElementById('sbar').style.display = 'block';
	}
}

function m_over(obj) {
	obj.style.backgroundColor='#3399ff';
	obj.style.color='#FFFFFF';
}
function m_out(obj) {
	obj.style.backgroundColor='#FFFFFF';
	obj.style.color='#000000';
}
function ajaxSend(event,text) {
	if(event.charCode) var charCode=event.chatCode;
	else if (event.keyCode) var charCode=event.keyCode;
	else if (event.which) var charCode=event.which;
	else var charCode=0;
	if(charCode<31)	return false;
	sendRequest('http://www.kinoland.net/search_auto_result.php?s='+encodeURIComponent(text),'sbar',getRequest);
}
function m_change(val) {
	document.getElementById('search_id').value=val;
	document.getElementById('sbar').style.display='none';
}

var resultId = '';
if (navigator.appName == "Microsoft Internet Explorer")
	httpRequest =  new ActiveXObject("Microsoft.XMLHTTP");
else
	httpRequest =  new XMLHttpRequest();