function ObjetoAjax()
{
    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 Pagina(n_pagina)
{
    //Donde se mostraran los registros
    divContenido = document.getElementById('contenido');    
    ajax = ObjetoAjax();
    //Uso del método GET
    //Iniciamos el archivo que realizará el proceso de paginar
    //junto con un valor que representa el nº de pagina
    ajax.open("GET", "noticias/paginador.php?pagina="+n_pagina);    
    //divContenido.innerHTML = '<img src="animacion.gif">';
    ajax.onreadystatechange=function()
    {
        if(ajax.readyState==4)
        //{
            //mostrar resultados en esa capa
            divContenido.innerHTML = ajax.responseText;            
        //}
    }
    //Como se hace uso del método GET colocamos null
    //ya que enviamos el valor por la url
    ajax.send(null);
}
