/**
 * @author Liliana Ocampo
 */
function cargar(){
	document.getElementById('semail').onfocus=cemail;
	document.getElementById('semail').onblur=bemail;
	document.getElementById('txtcontra').onfocus=cpass;
	document.getElementById('scontra').onblur=bpass;
	document.getElementById('scontra').style.display='none';
	/*Calendar.setup({
		inputField: "txtfecnac",
		ifFormat: "%Y-%m-%d",
		button: "tfn",
		align: "Tl",
		singleClick: true
	});*/
}
function cemail(){
	var email = document.getElementById('semail');
	if (email.value=="Correo electronico"){
		email.value="";
	}
}
function bemail(){
	var email = document.getElementById('semail');
	if (email.value==""){
		email.value="Correo electronico";
	}
}
function cpass(){
	var pass = document.getElementById('scontra');
	var contra = document.getElementById('txtcontra');
	contra.style.display='none';
	pass.style.display='block';
	pass.focus();
}
function bpass(){
	var pass = document.getElementById('scontra');
	var contra = document.getElementById('txtcontra');
	if (pass.value==""){
		pass.style.display='none';
		contra.style.display='block';
	}
}
function addLoadEvent(func){
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}else{
		window.onload = function(){
			oldonload();
			func();
		}
	}
}
addLoadEvent(function(){
	cargar();
});