function getRecipes(data,url)
{
	openRequest(url,data,"bartender_results");
}
function openRequest(url,data,div)
{ 
    var xhr; 
    try {  xhr = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) 
    {
        try {   xhr = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) 
        {
          try {  xhr = new XMLHttpRequest();     }
          catch (e3) {  xhr = false;   }
        }
     }
  
    xhr.onreadystatechange  = function()
    { 
         if(xhr.readyState  == 4)
         {
              if(xhr.status  == 200) 
                 document.getElementById(div).innerHTML = xhr.responseText; 
              else 
                document.getElementById(div).innerHTML = "Error code " + xhr.status + "<br />url: "+url+ "<br />data: "+data;
         }
		 else if(xhr.readyState  == 1)
		 	 document.getElementById(div).innerHTML = '<img src="/images/ajax/loading.gif" alt="/loading..." />';
    }; 

   xhr.open("POST", url, true); 
   xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                  
	xhr.send(data);
} 
