var sesion = false;
<!-- Código para mostrar el reloj -->
function muestra_reloj()
{ 
	momentoActual = new Date();
	hora = momentoActual.getHours();
	minuto = momentoActual.getMinutes();
	segundo = momentoActual.getSeconds(); 
	if (hora < 10)
		hora = "0" + hora;
	if (minuto < 10)
		minuto = "0" + minuto;
	if (segundo < 10)
		segundo = "0" + segundo;
	horaImprimible = hora + ":" + minuto + ":" + segundo + "&nbsp;";
	document.getElementById('reloj').innerHTML = horaImprimible;
	setTimeout("muestra_reloj()",1000);
}

<!-- Código para mostrar la fecha -->
function muestra_fecha()
{
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000)
	year+=1900;
	var day=mydate.getDay();
	var month=mydate.getMonth();
	var daym=mydate.getDate();
	if (daym<10)
	daym="0"+daym;
	var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
	var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	fechaImprimible = dayarray[day] + " " + daym + " de " + montharray[month] + " de " + year;
	document.getElementById('fecha_actual').innerHTML = fechaImprimible;
}

<!-- Codigo para situar foco en un campo concreto del formulario al cargar la pagina ->
function envia_foco(campo)
{
	document.getElementById(campo).focus();	
}