var adult = {

  init : function() {
     if(!document.getElementsByTagName) {return;}
  },

  addEvent : function(obj, type, func) {
    if (obj.addEventListener) {obj.addEventListener(type, func, false);}
    else if (obj.attachEvent) {
       obj["e" + type + func] = func;
       obj[type + func] = function() {obj["e" + type + func] (window.event);}
       obj.attachEvent("on" + type, obj[type + func]);
    }
    else {obj["on" + type] = func;}
  },
  
  menusel : function() {
    var theButton = document.getElementById('gobutton');
    adult.addEvent(theButton, 'click', adult.choosePage);
  },
  
  choosePage : function() {
     var theSelect = document.getElementById('navdropdown');
     var number = theSelect.selectedIndex;
     location.href = theSelect.options[number].value;
  }
}
adult.init();
adult.menusel();


