function sys_redirection(admin) {
	if (admin == true) {
		window.location.replace("admin.php");
	} else {
		window.location.replace("index.php?page=connexion");
	}
}

function sys_change_language(lang) {
	
	var ajaxRequest = new Ajax.Request(
	'public/lang.php', 
	{	parameters: {lang: lang}, 
		method: 'post', 
		onSuccess: function(e){
			document.location.reload()
		}
	})
	
}