var content = []; var tmp_obj; var brendMenu = Class.create(); brendMenu.prototype = { initialize: function(div_id) { this.menu_container = $(div_id); if( ! this.menu_container ) return false; drop_menu_object_copy = this; this.all_menus = $A(this.menu_container.getElementsByTagName('A')); for( var i=0; i< this.all_menus.length; i++) { this.all_menus[i].onclick = function () { return false; } Event.observe(this.all_menus[i], 'click', function(event) { chooseOneBrend(Event.element(event).parentNode); }); } } }