
function submit_email()
{
	if (document.Form_LostPassword.email.value.length == 0)
	{
		document.Form_LostPassword.email.focus();
		return false;
	}
	
	if (ajx == null){ajx = new tncaAjax();}
	if (ajx != null){
		var query = new Object();
		query.url = SITE_URL+'/ajax.php?script=lostpassword';
		query.responseType = 'GETVARS';
		query.paramForm = 'Form_LostPassword';
		query.onCompletion = responseLostPassword;
		ajx.setQuery(query);
	}
	return false;
}

function responseLostPassword()
{
	switch (this.responseFRT['error'])
	{
		case 'false':
			alert(document.Form_LostPassword.msg_alert_new_password_sent.value);
			location.href = SITE_URL;
			break ;
		case 'NOT_FOUND':
			alert(document.Form_LostPassword.msg_alert_not_found.value);
			break ;
		default:
			alert(document.Form_LostPassword.msg_alert_generic_error.value);
	}
}

document.Form_LostPassword.email.focus();
