/**************************************************************************************************** * OBJECT_EXTIONSION.JS - extend native DOM-Elements ****************************************************************************************************/ // ---------------------------------------------------------------- // define startsWith for javascript-strings // ---------------------------------------------------------------- String.implement('startsWith', function(str) { return (this.match("^"+str)==str); }); // ---------------------------------------------------------------- // set properties in member-array // ---------------------------------------------------------------- Element.implement('setAttr', function(key, value) { if (!$chk(this.attr)) { this.attr = new Object(); } this.attr[key] = value; }); // ---------------------------------------------------------------- // copy properties from one element to another // ---------------------------------------------------------------- Element.implement('copyAttributesFrom', function(rhs) { the_attributes = new Array('nr', 'category', 'belongsto', 'name', 'picpreview', 'picoverlay', 'price', 'hasbordercolor', 'haslinecolor', 'colornr', 'id', 'picoverlayconforto', 'posleft', 'posmiddle', 'posright'); for (var i=0;i