function writeTime() {
  // get a date object
  var today = new Date();
  // ask the object for some information
  var hours = today.getHours();
  var minutes = today.getMinutes();
  var seconds = today.getSeconds();
  // make the minutes and seconds look right
  minutes = fixTime(minutes);
  seconds = fixTime(seconds);
  // put together the time string and write it out
  var the_time = hours + ":" + minutes + ":" + seconds;
  window.document.the_form.the_text.value = the_time;
  // run this function again in half a second
  the_timeout= setTimeout('writeTime();', 500);
}

function fixTime(the_time) {
	if (the_time < 10) 
	{
		the_time = "0" + the_time;
	}
	return the_time;
}

    function Fecha()
      {
      meses = new Array 

("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
      data = new Date();
      index = data.getMonth();
      diasemana=new Array ("Lunes","Martes","Miercoles","Jueves","Viernes","Sabado","Domingo");
      indexday =  data.getDay();
      if (indexday == 0)
  	    indexday = 7;
      any = data.getYear();
      if (any < 1900)
        any = 1900 + any;
      document.write(diasemana[indexday-1]+ ","  + ' '+data.getDate()+ " de " + meses[index] + " de " + any);
      }