/******************************************HERRAMIENTAS DE USUARIO************************************************/
var max=18;
var min=8;

function increaseFontSize() {
	var texto = document.getElementById('textoNota');
	var s = 12;

	if (texto.style.fontSize){
		s = parseInt(texto.style.fontSize.replace("px",""));
	}

	if(s!=max) {
		s += 1;
	}

	texto.style.fontSize = s+"px";
}
function decreaseFontSize() {
	var texto = document.getElementById('textoNota');
	var s = 12;

	if (texto.style.fontSize){
		s = parseInt(texto.style.fontSize.replace("px",""));
	}

	if(s!=min) {
		s -= 1;
	}

	texto.style.fontSize = s+"px";
}
function agregarFavoritos(){
	if (window.sidebar && window.sidebar.addPanel)
		window.sidebar.addPanel("Crítica Digital | Información actualizada las 24 horas","http://www.criticadigital.com","");
	else
		window.external.AddFavorite("http://www.criticadigital.com","Crítica Digital | Información actualizada las 24 horas");
}

/******************************************RELOJ DIGITAL HOME************************************************/
function mueveReloj(){
   momentoActual = new Date()
   hora = momentoActual.getHours()
   if (hora<10) hora = "0" + hora
   minuto = momentoActual.getMinutes()
   if (minuto<10) minuto = "0" + minuto
   segundo = momentoActual.getSeconds()
   if (segundo<10) segundo = "0" + segundo

   horaImprimible = hora + ":" + minuto + ":" + segundo

   cambiaTexto(horaImprimible)

   setTimeout("mueveReloj()",1000)
}

function cambiaTexto(nuevaHora){
   xInnerHtml('reloj',nuevaHora)
} 




/**********************************X Library**********************************/
function xInnerHtml(e,h)
{
  if(!(e=xGetElementById(e)) || !xStr(e.innerHTML)) return null;
  var s = e.innerHTML;
  if (xStr(h)) {e.innerHTML = h;}
  return s;
}
function xGetElementById(e)
{
  if(typeof(e)=='string') {
    if(document.getElementById) e=document.getElementById(e);
    else if(document.all) e=document.all[e];
    else e=null;
  }
  return e;
}
function xStr(s)
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])!='string') return false;}
  return true;
}
