<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h t t p : / / w w w .w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="h t t p : / / w w w .w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pagina de ejemplo contenido interno</title>
<script language="JavaScript" type="text/javascript">
function nuevoAjax()
{
var xmlhttp=false;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(E) { xmlhttp=false; }
}
if (!xmlhttp && typeof XMLHttpRequest!="undefined") { xmlhttp=new XMLHttpRequest(); }
return xmlhttp;
}
function cargar(capa,doc){
var div = document.getElementById(capa);
var ajax=nuevoAjax();
ajax.open("GET", "secc/"+doc+".php", true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==1){
div.innerHTML="CARGANDO...";
}
if (ajax.readyState==4){
div.innerHTML=ajax.responseText;
}
}
ajax.send(null);
}
</script>
</head>
<body>
<a style="cursor:pointer;" onclick="cargar('body','main');">Pagina principal</a> | <a style="cursor:pointer;" onclick="cargar('body','contacto');">Contacto</a>
<div id="body"><? @include("secc/main.php"); ?></div>
</body>
</html>