BWT = function (id) { this.contentId = id; };
BWT.prototype.updateMenu = function (el) {
    var btns = $$('#menu li');
    if (btns && btns.length > 0) {
      for (var i = 0; i < btns.length; i++) {
       	btns[i].className = "";
      }
      if (!el) {
        el = btns[0];
      }
    }
    if (el) {
      el.className = "active";
    }
};
BWT.prototype.gotoPage = function (el, page) {
    //var d = new Date();
    var that = this;
    //new Ajax.Request('/action.php/get/' + page + '?' + d.getTime(), {
    var req = new Ajax.Request('/action.php/get/' + page, {
        method:'get',
        onSuccess: function(xhr) {
            var response = xhr.responseText || "no response text";
            $(that.contentId).innerHTML = response;
	},
        onFailure: function() {
            $(that.contentId).innerHTML = 'Couldn\'t get this information. Try again later.';
	}
    });
    this.updateMenu(el);
    return false;
};

