/**
* Renvoit un tableau contenant tous les champs d'un formulaire
* But du jeu : Envoyer ça dans un chargement Ajax de manière à traiter le formulaire.
*/
function getFormParams(formName)
{
	var params = {}; 
	$("form[@name="+formName+"]")
		.find("input[@checked], input[@type='text'], input[@type='hidden'], input[@type='password'], input[@type='submit'], option[@selected], textarea") 
		.filter(":enabled")
		.each(function() 
		{ 
			var x = this.name || this.id || this.parentNode.name || this.parentNode.id;
			if(x.substr((x.length - 2), 2) == "[]")
				x = x.substr(0, (x.length - 2))+"["+this.value+"]";
			params[x] = this.value;
		}
	);
		
	return params;
}

