+ element.onkeydown = function(event) {
+ if (event.keyCode==32) {
+ if(this.init_size==undefined)
+ this.init_size = this.size;
+ if(this.init_size<=1) {
+ if(this.size>1) {
+ this.size = 1;
+ } else{
+ var sel = this.selectedIndex;
+ this.size = this.options.length;
+ if(this.size>10) this.size = 10;
+ this.selectedIndex = sel;
+ }
+ }
+ }
+ }
+ element.onblur = function(event) {
+ if(this.init_size<=1)
+ this.size = 1;
+ }