String.prototype.rtrim = function() {
return this.replace(/\s+$/, "");
-}
+}\r
+\r
+\r
+/**\r
+ * Voir : http://www.coolpage.com/developer/javascript/Correct%20OOP%20for%20Javascript.html\r
+ *\r
+ * Exemple : \r
+ *\r
+ * function Mammal(name) {\r
+ * this.name = name;\r
+ * }\r
+ *\r
+ * Cat.Inherits(Mammal);\r
+ * function Cat(name) {\r
+ * this.Super(Mammal, name);\r
+ * }\r
+ */\r
+Object.prototype.Super = function(parent) {\r
+ if(arguments.length > 1) {\r
+ parent.apply( this, Array.prototype.slice.call( arguments, 1 ) );\r
+ } else {\r
+ parent.call( this );\r
+ }\r
+}\r
+Function.prototype.Inherits = function(parent) {\r
+ this.prototype = new parent();\r
+ this.prototype.constructor = this;\r
+}\r
+
///////////////////////////////////////////////////////////////////////////////////////////////////