function checkLogin () {
	obj = document.FRMLogin;
	if (isEmpty(obj.email.value)) {
		goAlert (obj.email, "Veuillez saisir votre adresse email.", "");
	} else if (!isEmail(obj.email.value)) {
		goAlert (obj.email, "Votre adresse email n'est pas valide.", "");
	} else if (isEmpty(obj.password.value)) {
		goAlert (obj.password, "Veuillez saisir votre mot de passe.", "");
	} else {
		obj.action = BasePath + "/service/user/php_login.php";
		obj.submit();
	}
}

function alertFctn(fieldId, msg) {
	alertError(msg);
	$(fieldId).focus();
	$(fieldId).highlight();
}

function addToBasket(type, code_type, quantity) {
	var request = new Request({method: 'get', url: BasePath + "/shop/basket/php_basket.php"});
	request.send("type=" + type + "&code_type=" + code_type + "&quantity=" + quantity);
	window.location = BasePath + "/shop/basket/index.php";
}

function alertSuccess(msg) {
	Growl.Bezel({
		image: BasePath + '/picture/growl/check.png',
		text: msg
	});
}

function alertError(msg) {
	Growl.Bezel({
		image: BasePath + '/picture/growl/warning.png',
		text: msg
	});
}