function createRequestObject() {
	var xmlHttp=null;
	try
	{
 		xmlHttp=new XMLHttpRequest();
 	}
	catch (e)
 	{
 		try
  	{
  		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  	}
 		catch (e)
  	{
  		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
 }
	return xmlHttp;
}

var http = createRequestObject();

function schimbMoneda(moneda){
	http.open('GET', 'http://'+ window.location.host +'/ajax.php?moneda='+ moneda+'', true);
	http.onreadystatechange = handleResponse2;
	http.send(null);	
}

function handleResponse2() {
	if (http.readyState==4 || http.readyState=="complete") {
       var response = http.responseText;
       window.location = "http://"+ window.location.host +"/acasa"
	}
         
}

