+ },
+
+ room_show_update: function(obj) {
+ this.tab_update(obj.checked, this.table_show);
+ },
+
+ //
+ table_show_update: function(obj) {
+ this.tab_update(this.room_show, obj.options[obj.selectedIndex].value );
+ },
+
+ tab_update: function(room_new, table_new)
+ {
+ // remove all and add all valid
+ for (i = 0 ; i < this.item.length ; i++) {
+ if (this.item[i].hide)
+ continue;
+ this.table.removeChild(this.item[i].tr_get());
+ this.item[i].hide = true;
+ }
+
+ for (i = 0 ; i < this.item.length ; i++) {
+ var app = false;
+
+ if (room_new && table_new == -1) {
+ app = true;
+ }
+ else if (room_new && table_new != -1) {
+ if (this.item[i].table == table_new || this.item[i].table == -1) {
+ app = true;
+ }
+ }
+ else if (!room_new && table_new == -1) {
+ if (this.item[i].table != -1) {
+ app = true;
+ }
+ }
+ else if (!room_new && table_new != -1) {
+ if (this.item[i].table == table_new) {
+ app = true;
+ }
+ }
+ if (app) {
+ this.table.appendChild(this.item[i].tr_get());
+ this.item[i].hide = false;
+ }
+ }
+ this.room_show = room_new;
+ this.table_show = table_new;