function reloj() {
	
	var tiempo = new Date();
	var x=tiempo.getHours();
	var y=tiempo.getMinutes();
	var z=tiempo.getSeconds();
	
	var fecha = new Date();
	var dia=fecha.getDate();
	var mes=fecha.getMonth()+1;
	var ano=fecha.getYear();
	
	if (x<10)
		x="0"+x;
	if (y<10)
		y="0"+y;
	
	if (z<10)
		z="0"+z;

	if (dia<10)
		dia="0"+dia;
		
	if (mes<10)
		mes="0"+mes;
		
		
		hora.value = x + ":" + y + ":" + z + "   " + dia + "/" + mes + "/" + ano;
		//digital(x,y,z);
		setTimeout("reloj()",500);	
}


function cambiaColor(nombre, clase) {
	
	nombre.className = clase;

}

function pickDate(Src){ 

	window.open("CalendarPopUp.aspx?src=" + Src, "_blank", "height=170, width=220, left=100, top=100, location=no, menubar=no, resizable=no, scrollbars=no, titlebar=no, toolbar=no", false);

}

function Registrar()
{
var form = document.createElement("form");
var txtUser = document.createElement("input");
var txtPassword = document.createElement("input");

txtUser.name = "usuario";
txtUser.id = "txtUser";
txtUser.value = document.getElementById("txtUser").value;
txtPassword.name = "password";
txtPassword.id = "txtPassword";
txtPassword.value = document.getElementById("txtPassword").value;

form.appendChild(txtUser);
form.appendChild(txtPassword);
form.method="post";
form.style.display = "none" 
form.action="http://www.azelerecambios.com/ViewsWebCat/SilentLogin.aspx";

document.body.appendChild(form);
form.submit();
}

