function showDiv(id) { 
	document.getElementById(id).style.display = ''; 
} 
function hideDiv(id) { 
	document.getElementById(id).style.display = 'none'; 
}

function ajax_search_start4(str) {
	
	if (typeof(id) != 'undefined') { 
		clearTimeout(id);
	}
	id = setTimeout("ajax_search4('"+str+"')", 500);

	return id;
}

function ajax_search4(str) {
   var xmlHttp;

   try {
        xmlHttp=new XMLHttpRequest();
    }
    
	catch(e) {
        try {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e) {
            try {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e) {
                return false;
            }
        }
    }

			document.getElementById("search_list4").style.display='';
    xmlHttp.onreadystatechange=function() {
        if(xmlHttp.readyState==4) {
            var data = xmlHttp.responseText.split("|");
			showDiv("search_list4");
			document.getElementById("search_list4").innerHTML = data[0];
		} 	
	}
    var text = str.replace(/&/gi, "andd")
    var parameters = 'str=' + text;
 
    xmlHttp.open("POST","ajax_search4.php",true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Content-length", parameters.length);
    xmlHttp.setRequestHeader("Connection", "close");
    xmlHttp.send(parameters);
}

