// FXP :: flashxpress.net :: format(pTrue,pFalse) // ---------------------------------------------- // formate l'affichage d'un booléen // on peut transmettre deux parametres de // formatage sous la forme de deux variables: // monBool=true; // monBool.format("oui","non"); // renvoie "oui" // on peut également transmettre une référence // (pointeur) a un Array: // affich=["vrai","faux"]; // monBool.format(affich); // renvoie "vrai" Boolean.prototype.format= function() { var tmp= typeof arguments[0]=="object" ? arguments[0] : arguments; return tmp[1-this]; }