var xmlhttpInicioCache;
var xmlhttpConocenosCache;
var xmlhttpAudiosCache;
//var xmlhttpFotosCache;
var xmlhttpVideosCache;
var xmlhttpFamiliasCache;
var xmlhttpMensajeCache;

function actualizarConocenos() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpConocenos = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpConocenos = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpConocenos.onreadystatechange = function()
    {
        if (xmlhttpConocenos.readyState == 4 && xmlhttpConocenos.status == 200)
        {
            xmlhttpConocenosCache = xmlhttpConocenos.responseText;
        }
    }
    xmlhttpConocenos.open("GET","webs/conocenos.php",true);
    xmlhttpConocenos.send();
}
function actualizarInicio() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpinicio = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpinicio = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpinicio.onreadystatechange = function()
    {
        if (xmlhttpinicio.readyState == 4 && xmlhttpinicio.status == 200)
        {
            xmlhttpInicioCache = xmlhttpinicio.responseText;
        }
    }
    xmlhttpinicio.open("GET","webs/inicio.php",true);
    xmlhttpinicio.send();
}
function actualizarAudios() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpAudios = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpAudios = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpAudios.onreadystatechange = function()
    {
        if (xmlhttpAudios.readyState == 4 && xmlhttpAudios.status == 200)
        {
            xmlhttpAudiosCache = xmlhttpAudios.responseText;
        }
    }
    xmlhttpAudios.open("GET","webs/audios.php",true);
    xmlhttpAudios.send();
}
/*function actualizarFotos() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpFotos = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpFotos = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpFotos.onreadystatechange = function()
    {
        if (xmlhttpFotos.readyState == 4 && xmlhttpFotos.status == 200)
        {
            xmlhttpFotosCache = xmlhttpFotos.responseText;
        }
    }
    xmlhttpFotos.open("GET","webs/fotos.html",true);
    xmlhttpFotos.send();
}*/
function actualizarVideos() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpVideos = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpVideos = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpVideos.onreadystatechange = function()
    {
        if (xmlhttpVideos.readyState == 4 && xmlhttpVideos.status == 200)
        {
            xmlhttpVideosCache = xmlhttpVideos.responseText;
        }
    }
    xmlhttpVideos.open("GET","webs/videos.php",true);
    xmlhttpVideos.send();
}
function actualizarFamilias() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpFamilias = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpFamilias = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpFamilias.onreadystatechange = function()
    {
        if (xmlhttpFamilias.readyState == 4 && xmlhttpFamilias.status == 200)
        {
            xmlhttpFamiliasCache = xmlhttpFamilias.responseText;
        }
    }
    xmlhttpFamilias.open("GET","webs/familias.php",true);
    xmlhttpFamilias.send();
}
function actualizarMensaje() {
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttpMensaje = new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
        xmlhttpMensaje = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttpMensaje.onreadystatechange = function()
    {
        if (xmlhttpMensaje.readyState == 4 && xmlhttpMensaje.status == 200)
        {
            xmlhttpMensajeCache = xmlhttpMensaje.responseText;
        }
    }
    xmlhttpMensaje.open("GET","webs/mensaje.php",true);
    xmlhttpMensaje.send();
}
function inicio(){
    document.getElementById("navegacion").innerHTML = xmlhttpInicioCache;
}
function conocenos(){
    document.getElementById("navegacion").innerHTML = xmlhttpConocenosCache;
}
function audios(){
    document.getElementById("navegacion").innerHTML = xmlhttpAudiosCache;
}
function fotos(){
    //document.getElementById("navegacion").innerHTML = xmlhttpFotosCache;
    window.open("webs/fotos.html");
}
function videos(){
    document.getElementById("navegacion").innerHTML = xmlhttpVideosCache;
}
function familias(){
    document.getElementById("navegacion").innerHTML = xmlhttpFamiliasCache;
}
function mensaje(){
    document.getElementById("mensaje").innerHTML = xmlhttpMensajeCache;
}
function iniciar(){
    actualizarConocenos();
    actualizarAudios();
    //actualizarFotos();
    actualizarVideos();
    actualizarFamilias();
    actualizarMensaje();
    actualizarInicio();
}
function programacion(){
    window.open("PDF/Programacion_RAV.pdf");
}
function noticias(){
    window.open("http://noticias.radioarboldevida.com/");
}
function facebook(){
    window.open("http://www.facebook.com/RAVCARTAGENA?ref=ts");
}
function rtavJoven(){
    window.location = "rtavjoven/";
}