function FechaHoy(){
    var Hoy=new Date();
    var year=Hoy.getFullYear()
    var day=Hoy.getDay()
    var month=Hoy.getMonth()
    var daym=Hoy.getDate()
    var dayarray=new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado")
    var montharray=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre");
    document.write(dayarray[day]+", "+daym+" de "+montharray[month]+" de "+year);
}

function esIE(){
    nNav=navigator.appName;
    if (nNav=='Microsoft Internet Explorer') return true;
    else return false;
}

//Ajuste: Espacio que se debe restar para que no sobrepase la altura de la ventana del navegador 
//(solo para IE).
function FullHeight(NombreTabla, Ajuste){
    var h=0;
    var tabla=document.getElementById(NombreTabla);
    if (!esIE()){
        h=window.innerHeight+'px';
        tabla.style.height=h;
    }else{ 
        h=document.body.parentNode.offsetHeight-Ajuste;
        tabla.height=h;
    } 
}


HMarquee1=function (id, speed, pause, WidthForIE) {
	var container=document.getElementById(id);
	    var _timer;
	    var Width=parseInt(container.scrollWidth);
	    if (esIE()) Width=WidthForIE;
	    var scrollSpeed=(parseInt(speed)>0)?speed:30;
    	var Pause=(parseInt(pause)>0)?pause:scrollSpeed;

    Right1=function() { 
	    if(container.scrollLeft>Width) { window.setTimeout(Right, Pause);
		    container.scrollLeft=Width;
	    } else container.scrollLeft+=1;}
	Left1=function() { 
	    if(container.scrollLeft<=0) {
		    //Left();
		    window.setTimeout(Left, Pause);
		    container.scrollLeft=1;
	    } else container.scrollLeft-=1;}
    goLeft1=function() {
	    _timer=window.setInterval(Left1, scrollSpeed); }
	goRight1=function() {
	    _timer=window.setInterval(Right1, scrollSpeed);}
    stop1=function() { 
	    if (_timer) window.clearInterval(_timer);}
}

HMarquee=function (id, speed, pause, WidthForIE) {
	var container=document.getElementById(id);
	    var _timer;
	    var Width=parseInt(container.scrollWidth);
	    if (esIE()) Width=WidthForIE;
	    var scrollSpeed=(parseInt(speed)>0)?speed:30;
    	var Pause=(parseInt(pause)>0)?pause:scrollSpeed;

    Right=function() { 
	    if(container.scrollLeft>Width) { window.setTimeout(Right, Pause);
		    container.scrollLeft=Width;
	    } else container.scrollLeft+=1;}
	Left=function() { 
	    if(container.scrollLeft<=0) {
		    //Left();
		    window.setTimeout(Left, Pause);
		    container.scrollLeft=1;
	    } else container.scrollLeft-=1;}
    goLeft=function() {
	    _timer=window.setInterval(Left, scrollSpeed); }
	goRight=function() {
	    _timer=window.setInterval(Right, scrollSpeed);}
    stop=function() { 
	    if (_timer) window.clearInterval(_timer);}
}

      
      VMarquee1=function (id, speed, pause, HeightForIE) { 
	var container=document.getElementById(id);
	//if (container.offsetWidth<parseInt(container.scrollWidth)){
	    var _timer;
	    var Height=parseInt(container.scrollHeight);
	    if (esIE()) Height=HeightForIE;
	    //container.innerHTML=container.innerHTML+container.innerHTML; 
	    var scrollSpeed=(parseInt(speed)>0)?speed:30;
    	var Pause=(parseInt(pause)>0)?pause:scrollSpeed;
	//}    	
    Down1=function() { 
	    if(container.scrollTop>Height) {
		   vstop1();
		    window.setTimeout(Down1, Pause);
		    container.scrollTop=0;
	    } else container.scrollTop+=1;
    }
	Up1=function() { 
	    if(container.scrollTop<=0) {
		    vstop1();
		    window.setTimeout(Up1, Pause);
		    container.scrollTop=1;
	    } else container.scrollTop-=1;
    }
    goUp1=function() {
	    _timer=window.setInterval(Up1, scrollSpeed); 
    }
	goDown1=function() {
	    _timer=window.setInterval(Down1, scrollSpeed);
    }
    vstop1=function() { 
	    if (_timer) window.clearInterval(_timer);
    }
}

