function cargarContenido(fuente_datos, contenedor_id,parametros) 
{	
    var url = encodeURIComponent(fuente_datos);	
    var params = parametros+"&nocache=" + Math.random();
    //var params = parametros;	width='30' height='30'
    document.getElementById(contenedor_id).innerHTML="<div style='text-align:center'><img src='http://www.mpt.gob.pe:8080/portalmpt/recursos/imagenes/loader.gif' ></div>";
    new Ajax.Request(url, 
    {	
        method: 'get', parameters: params,	onSuccess: function(transport) 
        {
            if(transport.responseText.length > 0)
            {		
                document.getElementById(contenedor_id).innerHTML=transport.responseText;	
            }
        }
    }
);
}
/*/
function nuevoAjax(xmlhttp)
{
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 cargarContenido(pagina,destino){
   var contenedor;
   var ajax;
   var urlpage = pagina+"?nocache="+ Math.random()
   contenedor = document.getElementById(destino);
   ajax = nuevoAjax(ajax);
   ajax.open("GET", urlpage, true);
   ajax.onreadystatechange=function() {
      if (ajax.readyState==4) {
         contenedor.innerHTML = ajax.responseText;
      }
   }
   ajax.send(null);
}

function nuevoAjax()
{
    var xmlhttp;
    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 cargarContenido(pagina,destino) 
{      
    var contenedor;      
    var ajax;       
    contenedor = document.getElementById(destino);      
    ajax = nuevoAjax();      
    ajax.open("GET", pagina, true);      
    ajax.onreadystatechange=function() 
    {
        if (ajax.readyState==4) 
        {
            contenedor.innerHTML = ajax.responseText;           
        }      
    }      
    ajax.send(null);
}*/
