// JavaScript Document

var tiempo = 4000
enviar = function(){
			$('#txt_login').html("usuario inexistente")
		setTimeout(function(){
			$('#txt_login').html("&nbsp;")
		}, tiempo);
}
validar = function(){
	var datosPost ={ nick: $("#nick").val(), password: $("#password").val(),accion:"login"}

	$.post("/php/seguridad.php", datosPost , function(json , textStatus) {
		//data contains the JSON object
		//textStatus contains the status: success, error, etc
		if(textStatus=="success" && json.url !=""){
			 window.location = json.url;
		} else{
			$('#txt_login').html("usuario inexistente")
			setTimeout(function(){
				$('#txt_login').html("&nbsp;")
			}, tiempo); 				
		}
	}, "json");


}