// JavaScript Document
var receptor = objetoAjax();
function objetoAjax() 
{ 
	var xmlhttp=false; 
	try 
	{ 
		//AJAX object for new versions of IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	} 
	catch(e) 
		{ 
			try 
			{ 
				// AJAX object for old versions of IE 
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
			} 
			catch(E) { xmlhttp=false; } 
		} 
	if (!xmlhttp && typeof XMLHttpRequest!="undefined") 
	{ 
		// AJAX object for non IE browsers
		xmlhttp=new XMLHttpRequest(); 
	} 
	return xmlhttp; 
}

function aumentarCantidad(idReg) {
	if (receptor.readyState == 4 || receptor.readyState == 0) {
	
    receptor.open("GET", 'http://innovaidiomas.com/en/personal/aumentar.php?idReg='+idReg, true);

	receptor.onreadystatechange = function() {
		//Check if the state of XmlHttpRequests is finished.
		if (receptor.readyState == 4) {
			//Set the content of the tag where results will be shown.
			document.getElementById('resumen_carrito').innerHTML = receptor.responseText;
			}
		}
	
	
	receptor.send(null);
	
	}
	
}

function disminuirCantidad(idReg) {
	if (receptor.readyState == 4 || receptor.readyState == 0) {
	
    receptor.open("GET", 'http://innovaidiomas.com/en/personal/disminuir.php?idReg='+idReg, true);

	receptor.onreadystatechange = function() {
		//Check if the state of XmlHttpRequests is finished.
		if (receptor.readyState == 4) {
			//Set the content of the tag where results will be shown.
			document.getElementById('resumen_carrito').innerHTML = receptor.responseText;
			}
		}
	
	
	receptor.send(null);
	
	}
	
}

