//Code to Handle the drop down lists
niceSelect=function(){ 
  var f=document.forms;
    for (var i=0;i<f.length;i++){                        // Walks all the forms in the document.
    var e=f[i].elements;
    for(var j=0;j<e.length;j++){                        // Walks all the elements in the form.
      if(e[j].type=="select-one"){                      // Chooses elements that are select
                                                        // box (that does not allow multiple
                                                        // selections).
        e[j].formnu=i;
                                                        // Here comes the "trick" of this
                                                        // script: it redefines the
                                                        // event handlers of the element.
                         
        e[j].onclick=function(){                        // If the selection is made
                                                        // with the mouse, the it
                                                        // behaves like a normal selectbox
                                                        // menu and submits).
          this.onchange=function(){
            f[this.formnu].submit()
          }
        };
        e[j].onblur=function(){                          // This "disarms" the onblur function
                                                        // so that it will not submit as soon
                                                        // as the default option is deselected
                                                        // (by moving down the select list with
                                                        // the arrow key).
          this.onchange=function(){return true} 
        };
        e[j].onkeydown=function(e){                      // When keys are pressed on the keyboard...
          if (e){theEvent = e} else {theEvent=event};
          if (theEvent.keyCode==13){                    // ...only submit when 'enter' is pressed.
            if((this.onchange+"").indexOf("submit")<0){
              f[this.formnu].submit()
            }
          }
        }
      }
    }
  }
 
}// JavaScript Document