var xmlHttp
//first function


function showHint(cat,cake,img)
{
	document.getElementById('processing').style.display='block';
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  }
  
				
		var url="testajax.php";
		
		url=url+"?cat_id="+cat;
		url=url+"&cake_id="+cake;
		url=url+"&img_id="+img;
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
} 
function showajax(imgpath,imgid)
{
	document.getElementById('processing').style.display='block';
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  }
  
				
		var url="testajax.php";
		
		url=url+"?img_path="+imgpath;
		url=url+"&imgid="+imgid;	
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
} 


//second function

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
//alert(xmlHttp.responseText);
document.getElementById("test").innerHTML=xmlHttp.responseText;
	
document.getElementById('processing').style.display='none';
}
}


//third function

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

