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="./intro.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="equipos"){
		var url="http://www.iusacell.com.mx/Equipos/php/equiposaplicn.php";
		var Ap = "Ap=Conexion_BAM";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(Ap);
	}
	
	else if(str=="funcionalidades"){
		var url="./funcionalidades.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="windows"){
		var url="./windows.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="linux"){
		var url="./linux.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="win+bam"){
		var url="./windows+bam.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="windows+tel"){
		var url="./windows+tel.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
		else if(str=="linux+tel"){
		var url="./linux+tel.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
		else if(str=="windows+router"){
		var url="./windows+router.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
		else if(str=="linux+router"){
		var url="./linux+router.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
		else if(str=="configuracion"){
		var url="./configuracion.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	
		else if(str=="starcomm"){
		var url="./starcomm.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=="calctel"){
		var url="./calculadora.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="calctelbam"){
		var url="./calculadora2.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="calctelrou"){
		var url="./calculadora3.php";
		xmlHttpContenido.open("POST",url,true);
		xmlHttpContenido.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttpContenido.send(null);	
	}
	else if(str=="chava"){
		var win = new Window({className: "alphacube", width:532, height:400, zIndex: 100, resizable: false, minimizable: false, maximizable: false, title: "", url: "http://www.iusacell.com.mx/Netbook/comerciales/chava.html",  draggable:true, wiredDrag: true, showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp})  
	 	win.showCenter();
		win.setDestroyOnClose();
	 	win.refresh();	
	}
	else if(str=="chavo"){
		var win = new Window({className: "alphacube", width:532, height:400, zIndex: 100, resizable: false, minimizable: false, maximizable: false, title: "", url: "http://www.iusacell.com.mx/Netbook/comerciales/chavo.html",  draggable:true, wiredDrag: true, showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp})  
	 	win.showCenter();
		win.setDestroyOnClose();
	 	win.refresh();	
	}
	else if(str=="video1"){
		var win = new Window({className: "alphacube", width:740, height:506, zIndex: 100, resizable: false, minimizable: false, maximizable: false, title: "", url: "http://www.iusacell.com.mx/Netbook/comerciales/video1.html",  draggable:true, wiredDrag: true, showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp})  
	 	win.showCenter();
		win.setDestroyOnClose();
	 	win.refresh();	
	}
	else{
		var url="./intro.php";
		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;
}