1 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
2 and is published under the AGPL license. */
3 var Deck = Class.create();
5 initialize: function(elt, options) {
8 this.setIndex(parseInt(this.element.readAttribute("selectedindex") || 0, 10));
10 setIndex: function(idx) {
11 if (idx === this.index) {
15 var childs = this.element.childElements();
16 if (childs.length === 0) {
20 idx = Math.max(0, idx);
21 idx = Math.min(childs.length - 1, idx);
23 childs.each(function(item, i) {
32 getIndex: function() {