var xmlHttp

function showcurrency(str)
{ 
xmlHttp=GetXmlHttpObjectcur();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 



if(xmlHttp.readyState==0 || xmlHttp.readyState==4)
  {
	
	  xmlHttp.open("GET",'getcurrency.php?q='+str,true);
	
	  
	
  }
xmlHttp.onreadystatechange=stateChangedcur;
xmlHttp.send(null);

}
function stateChangedcur() 
{
	xmlHttp.onreadystatechange=function()
 		{
			if (xmlHttp.readyState==4)
				{ 
				
				   document.getElementById("currencyvalue").innerHTML=xmlHttp.responseText;
				   
                  
				}
 		}
}

function GetXmlHttpObjectcur()
{
var xmlHttp=null;
try
  {
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
