function renglones()
{
  var tabla = document.getElementById("registros"); 
  var los_tr = tabla.getElementsByTagName("tr");
  for (var i in los_tr)
  {
    los_tr[i].onmouseover = function() { this.style.backgroundColor = "yellow"; }
    los_tr[i].onmouseout = function() { this.style.backgroundColor = ""; }
  }
 // document.write("sss");
}
function crearXHR()
{ if (typeof XMLHttpRequest != "undefined")
{return new XMLHttpRequest();}
else if (window.ActiveXObject)
{var version = [ "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp" ];
for (var i=0; i<version.length; i++)
{ try { return new ActiveXObject(version[i]); }
catch (objError) {}
} } throw new Error("NAVEGADOR NO SOPORTA AJAX"); }
/* ##################################################### */
function ejecutar_ajax2(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
var bus=document.getElementById("txt_buscar").value;
peticion.open("GET",url+bus,true);
peticion.onreadystatechange=estado;
peticion.send(null); }
/* ##################################################### */
function ejecutar_ajax(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
peticion.open("GET",url,true);
peticion.onreadystatechange=estado;
peticion.send(null); }
function estado()
{ if (peticion.readyState == 4) if (peticion.status == 200)
{ document.getElementById("tablaregistros").innerHTML=peticion.responseText; }
else alert ("Error: " + peticion.status + ", no se puede procesar la solicitud."); }
/* ##################################################### */
function otro_dia(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
peticion.open("GET",url,true);
peticion.onreadystatechange=estado_otro_dia;
peticion.send(null); }
function estado_otro_dia()
{ if (peticion.readyState == 4) if (peticion.status == 200)
{ document.getElementById('comandos').innerHTML=peticion.responseText; 
  document.getElementById('comandos').style.display='block'}
else alert ("Error: " + peticion.status + ", no se puede procesar la solicitud.."); }
/* ##################################################### */
/*function ejecutar_ajax_noticias(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
peticion.open("GET",url,true);
peticion.onreadystatechange=estado_noticias;
peticion.send(null); }
function estado_noticias()
{ if (peticion.readyState == 4) if (peticion.status == 200)
{ document.getElementById("noticias").innerHTML=peticion.responseText; }
else alert ("LinuxTotal Error: " + peticion.status + ", no se puede procesar la solicitud."); }*/
/* ##################################################### */
function ejecutar_ajax_indice(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
peticion.open("GET",url,true);
peticion.onreadystatechange=estado_indice;
peticion.send(null); }
function estado_indice()
{if (peticion.readyState == 4) if (peticion.status == 200)
{ document.getElementById("indice").innerHTML=peticion.responseText;
document.getElementById("indice").style.display="block"; }
else alert ("Error: " + peticion.status + ", no se puede procesar la solicitud."); }
/* ##################################################### */
function ejecutar_ajax_servicios(archivo)
{ peticion=crearXHR();
if (peticion==null) { alert("Navegador no soporta AJAX"); return; }
var url=archivo;
peticion.open("GET",url,true);
peticion.onreadystatechange=estado_servicios;
peticion.send(null);}
/* ##################################################### */
function estado_servicios()
{ if (peticion.readyState == 4) if (peticion.status == 200)
{ document.getElementById("temporal").innerHTML=peticion.responseText;
var sele1=document.getElementById("s1").value;
var sele2=document.getElementById("s2").value;	
var sele3=document.getElementById("s3").value;
var sele4=document.getElementById("s4").value;	
var sele5=document.getElementById("s5").value;	
var sele6=document.getElementById("s6").value;
if (sele1 == 1){
document.getElementById("masinfo1").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="block";
document.getElementById("masinfo2").style.display="none";	
document.getElementById("masinfo3").style.display="none";	
document.getElementById("masinfo4").style.display="none";	
document.getElementById("masinfo5").style.display="none";	
document.getElementById("masinfo6").style.display="none";}	
if (sele2 == 1){
document.getElementById("masinfo2").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="none";
document.getElementById("masinfo2").style.display="block";	
document.getElementById("masinfo3").style.display="none";	
document.getElementById("masinfo4").style.display="none";	
document.getElementById("masinfo5").style.display="none";	
document.getElementById("masinfo6").style.display="none";}		
if (sele3 == 1){
document.getElementById("masinfo3").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="none";
document.getElementById("masinfo2").style.display="none";	
document.getElementById("masinfo3").style.display="block";	
document.getElementById("masinfo4").style.display="none";	
document.getElementById("masinfo5").style.display="none";	
document.getElementById("masinfo6").style.display="none";}	
if (sele4 == 1){
document.getElementById("masinfo4").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="none";
document.getElementById("masinfo2").style.display="none";	
document.getElementById("masinfo3").style.display="none";	
document.getElementById("masinfo4").style.display="block";	
document.getElementById("masinfo5").style.display="none";	
document.getElementById("masinfo6").style.display="none";}	
if (sele5 == 1){
document.getElementById("masinfo5").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="none";
document.getElementById("masinfo2").style.display="none";	
document.getElementById("masinfo3").style.display="none";	
document.getElementById("masinfo4").style.display="none";	
document.getElementById("masinfo5").style.display="block";	
document.getElementById("masinfo6").style.display="none";}
if (sele6 == 1)
{document.getElementById("masinfo6").innerHTML=peticion.responseText;
document.getElementById("masinfo1").style.display="none";
document.getElementById("masinfo2").style.display="none";	
document.getElementById("masinfo3").style.display="none";	
document.getElementById("masinfo4").style.display="none";	
document.getElementById("masinfo5").style.display="none";	
document.getElementById("masinfo6").style.display="block";}
}else alert ("Error: " + peticion.status + ", no se puede procesar la solicitud.");}
/* ############################### */

function noticias_mas_menos()
{document.getElementById('noticias').style.display='block';
document.getElementById("masmenos").innerHTML="<img src='imagenes/menos.png' onclick='noticias_menos_mas()' style='cursor:pointer' alt='Menos...'>";}
function noticias_menos_mas()
{document.getElementById('noticias').style.display='none';
document.getElementById("masmenos").innerHTML="<img src='imagenes/mas.png' onclick='noticias_mas_menos()' style='cursor:pointer' alt='Más...'>";}
function noticias_mas_menos_full()
{document.getElementById('noticias').style.display='block';
document.getElementById("masmenosfull").innerHTML="<table border='0'><tr><td style='border:0px'><h1><font color='red'><span onclick='noticias_menos_mas_full()' style='cursor:pointer'>NOTICIAS (contraer)</span></font></h1></td><td style='border:0px'><img src='imagenes/menos.png' onclick='noticias_menos_mas_full()' style='cursor:pointer' alt='Más...'></td></tr>";}
function noticias_menos_mas_full()
{document.getElementById('noticias').style.display='none';
document.getElementById("masmenosfull").innerHTML="<table border='0'><tr><td style='border:0px'><h1><font color='red'><span onclick='noticias_mas_menos_full()' style='cursor:pointer'>NOTICIAS (expander)</span></font></h1></td><td style='border:0px'><img src='imagenes/mas.png' onclick='noticias_mas_menos_full()' style='cursor:pointer' alt='Más...'></td></tr></table>";}
function enlaces_mas_menos()
{document.getElementById('enlaces').style.display='block';
document.getElementById("masmenosenlaces").innerHTML="<table border='0'><tr><td style='border:0px'><h1><font color='red'><span onclick='enlaces_menos_mas()' style='cursor:pointer'>ENLACES (contraer)</span></font></h1></td><td style='border:0px'><img src='imagenes/menos.png' onclick='enlaces_menos_mas()' style='cursor:pointer' alt='Más...'></td></tr>";}
function enlaces_menos_mas()
{document.getElementById('enlaces').style.display='none';
document.getElementById("masmenosenlaces").innerHTML="<table border='0'><tr><td style='border:0px'><h1><font color='red'><span onclick='enlaces_mas_menos()' style='cursor:pointer'>ENLACES (expander)</span></font></h1></td><td style='border:0px'><img src='imagenes/mas.png' onclick='enlaces_mas_menos()' style='cursor:pointer' alt='Más...'></td></tr></table>";}
/* ############################### */

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function favoritos(titulo,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(titulo, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',titulo);
elem.setAttribute('rel','sidebar');
elem.click();
} 
else if(document.all)// ie
window.external.AddFavorite(url, titulo);
}