
var xmlHttpImage

function getCurrency(typ,img,str)
{ 

//document.getElementById("txtLoad").style.display = "block";   
//document.getElementById("txtDiv").style.display = "none";   


xmlHttpImage=GetXmlHttpObject();
if (xmlHttpImage==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url;
url ="currency.php";

xmlHttpImage.onreadystatechange=stateChanged;
xmlHttpImage.open("GET",url,true);
xmlHttpImage.send(null);
}

function stateChanged() 
{ 
if (xmlHttpImage.readyState==4)
{ 
document.getElementById("txtDiv").innerHTML = xmlHttpImage.responseText;
//document.getElementById("txtDiv").style.display = "block";      
//document.getElementById("txtLoad").style.display = "none";   
}
}

function GetXmlHttpObject()
{
var xmlHttpImage=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttpImage=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttpImage=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttpImage=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttpImage;
}