function add_carrito(idprod) {

var sUrl   = "add_producto.php?idprod=";

var http = getHTTPObject();



	sProd = idprod;

	http.open("GET", sUrl + sProd, true);

	

	http.onreadystatechange=function(){

	if (http.readyState==4) {

		callback(http);

	}

	}

	

	http.send(null);

	

	window.location.reload();

	//return true;



}



function callback(http) {

	var sResults = http.responseText; // Obtenemos la cadena codificada

	//document.getElementById("mystring").value=sResults;

}



function dosubmit() {

	// VACIAMOS LOS CAMPOS

	document.getElementById("gesbd").value="";

	document.getElementById("user").value="";

	document.getElementById("pass").value="";

	

	alert("Espere...");

	document.miform.submit();

}

	

function getHTTPObject() {

	var xmlhttp;

	

	try {

		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

	} catch (e) {

	  xmlhttp = false;
/*
      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }
*/

    }






  

	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {

		try 

		{

			xmlhttp = new XMLHttpRequest();

		} catch (e) {

		xmlhttp = false;

		}

	}

	return xmlhttp;

}