//esta es la basada en db
function carga_bloque2(bloque, origen) {	
	document.getElementById(bloque).innerHTML = "<span style=\"font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#666666 \">Cargando...</span>";
    if(window.XMLHttpRequest) {
      peticion2 = new XMLHttpRequest();
    }
    else {
      peticion2 = new ActiveXObject("Microsoft.XMLHTTP");
    }
	
	if(bloque=='noticia') 			{ peticion2.onreadystatechange = muestra_bloque_noticia; }
	if(bloque=='lista_noticias') 	{ peticion2.onreadystatechange = muestra_bloque_lista_noticias; }
    
    //alert('http://www.celtictravelservices.com/q/lista_ofertas_propias.php?&pag='+pagina+'&STRidioma='+stridioma+'&lila='+encode64(lila));
	peticion2.open('GET', origen, true);
	
    peticion2.send(null);
  }


function carga_bloque(bloque, origen) {	
	document.getElementById(bloque).innerHTML = "<span style=\"font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#666666 \">Cargando...</span>";
    if(window.XMLHttpRequest) {
      peticion = new XMLHttpRequest();
    }
    else {
      peticion = new ActiveXObject("Microsoft.XMLHTTP");
    }
	
	if(bloque=='noticia') 			{ peticion.onreadystatechange = muestra_bloque_noticia; }
	if(bloque=='lista_noticias') 	{ peticion.onreadystatechange = muestra_bloque_lista_noticias; }
    
    //alert('http://www.celtictravelservices.com/q/lista_ofertas_propias.php?&pag='+pagina+'&STRidioma='+stridioma+'&lila='+encode64(lila));
	peticion.open('GET', origen, true);
	
    peticion.send(null);
  }
  
  
  
  
function muestra_bloque_noticia() 			{ muestra_bloque('noticia'); }
function muestra_bloque_lista_noticias() 	{ muestra_bloque('lista_noticias'); }
  
function muestra_bloque(bloque) {	
    if(peticion.readyState == 4) {
      if(peticion.status == 200) {
        document.getElementById(bloque).innerHTML = peticion.responseText;
	  }
    }
  }

