var xmlHttpContenido = null;

function generaContenido(str)
{ 
	xmlHttpContenido=GetXmlHttpObject();
	if (xmlHttpContenido==null)
  	{
  		alert ("Tu navegador no soporta AJAX! porfavor visita la versión texto de nuestra página");
  		return;
  	} 
  	
  	xmlHttpContenido.onreadystatechange=stateChangedContenido;
		
//Desde Aqui

	if(str=="intro"){
		var url="./intro2.html";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="carac"){
		var url="./caracteristicas.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	
	else if(str=="contacto"){
		var url="./contacto.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="vip"){
		var url="./plan_elitep_vip.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="1000"){
		var url="./plan_elitep_1000.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="700"){
		var url="./plan_elitep_700.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="500"){
		var url="./plan_elitep_500.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="300"){
		var url="./plan_elitep_300.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="200"){
		var url="./plan_elitep_200.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	
	else if(str=="crece"){
		var url="./creceplan1.html";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="crece2"){
		var url="./creceplan2.html";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else{
		var url="./intro2.html";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);
	}
//Hasta Aquí
}

function stateChangedContenido() 
{ 
	
	if (xmlHttpContenido.readyState==4)
	{ 
		document.getElementById("Contenido").innerHTML=xmlHttpContenido.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttpContenido=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttpContenido=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttpContenido=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttpContenido=new ActiveXObject("Microsoft.XMLHTTP");
    }
  } 
return xmlHttpContenido;
}