
function printErr(error, msg, usuario)
{

	var div = $('ingresoT');	
	var form = $('ingresoForm');
	
	var usu = $('usu');	
	var con = $('con');	
	var genTxt = $('genTxt');
	
	genTxt.hide();
	
	// E-MAIL REQUERIDO
	if (error == 1)
	{
		usu.style.color = "#666666";
		usu.style.backgroundColor = "#FFF6EB";
		usu.value = 'E-mail requerido';
		usu.onclick = borraInput;
	}
	// E-MAIL INVÁLIDO
	else if (error == 2)
	{
		usu.style.color = "#666666";
		usu.style.backgroundColor = "#FFF6EB";
		usu.value = 'E-mail inv\u00e1lido';
		usu.focus();
		usu.onclick = borraInput;
	}
	// CONTRASEÑA REQUERIDA
	else if (error == 3)
	{
		con.style.backgroundColor = "#FFF6EB";
	}
	// ERROR DE SERVIDOR
	else if (error == 0)
	{
		usu.style.backgroundColor = "#FFFFFF";
		con.style.backgroundColor = "#FFFFFF";
		genTxt.style.color = "#000000	";
		genTxt.show();
		genTxt.style.padding = '5px';
		genTxt.innerHTML = msg;
	}
	// EXITO
	else
	{
		img = document.createElement('img');
		img.width = "16" ;
		img.src = "imagenes/agif_loading.gif"
		form.hide();
		div.innerHTML = msg;
		div.appendChild(img);
		div.align = "right";
		//window.setTimeout("window.location = 'admin.php?men0=adm'", 1500);
		window.setTimeout("window.location = window.location", 1500);
	}
}

function borraInput()
{
	this.clear();
	this.style.color = "#000000"; //negro
	$('genTxt').hide();
}

