//ESTE ES EL JAVASCRIPT DEL NUEVO MENU;
var sfHover = function() {
	var sfEls = document.getElementById("globalLink").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//ESTE ES EL JAVASCRIPT DEL MENU ANTIGUO;

function startList() {
//	if (document.all&&document.getElementById) {
//		navRoot = document.getElementById("nav");
//		for (i=0; i<navRoot.childNodes.length; i++) {
//			node = navRoot.childNodes[i];
//			if (node.nodeName=="LI") {
//				node.onmouseover=function() {
//					this.className+=" over";
//				}
//				node.onmouseout=function() {
//					this.className=this.className.replace(" over", "");
//				}
//			}
//		}
//	}
}
//window.onload=startList();

function despliega(classid,clasea){
  /*var fondo = clasea;
  var menu = document.getElementById(classid);
    if(menu.style.display == "none"){
      menu.style.display = "block";
		fondo.className = "desplegado";
    }
    else{
      menu.style.display = "none";
		fondo.className = "sindesplegar";
    }*/
}

function repliega(classid,clasea){
  /*var fondo = document.getElementById(clasea);
  var menu = document.getElementById(classid);
  menu.style.display = "none";
  fondo.className = "sindesplegar";*/
}


function obtiene_fecha()
   {
   /*var fecha_actual = new Date()

   dia = fecha_actual.getDate()
   mes = fecha_actual.getMonth() + 1
   anio = fecha_actual.getYear()

   if (anio < 100)
      anio = '19' + anio
   else if ( ( anio > 100 ) && ( anio < 999 ) ) {
      var cadena_anio = new String(anio)
      anio = '20' + cadena_anio.substring(1,3)
   }

   if (mes < 10)
      mes = '0' + mes

   if (dia < 10)
      dia = '0' + dia

   return (dia + "/" + mes + "/" + anio)*/
   }

function setFoco(idFoco) {
	/*if (document.all) {
		document.all[idFoco].focus();
	}
	else if (document.getElementById) {
		document.getElementById(idFoco).focus();
	}*/
}


//ESTE ES EL CORRECTOR QUE MUESTRA EL MENU DE NAVEGACION GLOBAL POR ENCIMA DE LOS SELECTS;
 
if (navigator.appVersion.indexOf('MSIE 6.')>=0)
{ 
 
ieHover = function() {
 
var ieULs = document.getElementById('globalNav').getElementsByTagName('ul');
 
/** IE script to cover <select> elements with <iframe>s **/
 
for (j=0; j<ieULs.length; j++) {
 
// valor antiguo de src="about:blank" 
//<cms:link>/system/modules/es.chsegura.www/resources/_blank.html</cms:link>
ieULs[j].innerHTML = ('<iframe src="javascript:false;" scrolling="no" frameborder="0"></iframe>' + ieULs[j].innerHTML);
/*ieULs[j].innerHTML = ('<iframe id="iePad' + j + '" src="javascript:false;" scrolling="no" frameborder="0" style=""></iframe>' + ieULs[j].innerHTML);
 
 var ieMat = document.getElementById('iePad' + j + '');*/
 
// var ieMat = ieULs[j].childNodes[0];  alert(ieMat.nodeName); // also works...
 
 var ieMat = ieULs[j].firstChild;
 
  ieMat.style.width=ieULs[j].offsetWidth+"px";
 
  ieMat.style.height=ieULs[j].offsetHeight+"px"; 
 
  ieULs[j].style.zIndex="99";
 
}
 
/** IE script to change class on mouseover **/
 
 var ieLIs = document.getElementById('globalNav').getElementsByTagName('li');
 
 for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
 
  ieLIs[i].onmouseover=function() {this.className+=" iehover";}
 
  ieLIs[i].onmouseout=function() {this.className=this.className.replace(' iehover', '');}
 
 }
}
 
if (window.attachEvent) window.attachEvent('onload', ieHover);
}
/** end **/