        function tmainmenu_show() {
          this.element_menu.style.visibility="visible";
          clearTimeout(this.__hideTimeout);
        }
        function tmainmenu_forceHide() {
          this.element_menu.style.visibility="hidden";
        }
        function tmainmenu_hide() {
          if (!this.__alwaysVisible) {
            this.__hideTimeout=setTimeout("mainMenu.forceHide()",100)
          }
        }
        function tmainmenu_alwaysVisible(value) {
          if (value==1) { value=true; } else { value=false; }
          this.element_checkBox.checked=value;
          this.__alwaysVisible=value;
          if (value) {
            this.element_spacer.style.height="128px";
          } else {
            this.element_spacer.style.height="5px";
          }
          if (value) { flag_viewMenu=1; } else { flag_viewMenu=0; }
          event_refresh();
        }
        function tmainmenu_refresh() {
          this.element_menu.style.left=globalLeft(getElement("mainBlueBar"))+5;
          this.element_menu.style.top=globalTop(this.element_spacer)+"px";
        }
        function tmainmenu_initialize() {
          this.element_menu=getElement("mainMenu");
          this.element_checkBox=getElement("mainMenu_AlwaysVisibleCheckbox");
          this.element_spacer=getElement("mainMenu_spacer");
          this.refresh();
          this.alwaysVisible(this.__alwaysVisible);
        }
    function TMainMenu() {
      this.__alwaysVisible=true;
      this.__hideTimeout=0;
      this.show=tmainmenu_show;
      this.forceHide=tmainmenu_forceHide;
      this.hide=tmainmenu_hide;
      this.alwaysVisible=tmainmenu_alwaysVisible;
      this.initialize=tmainmenu_initialize;
      this.refresh=tmainmenu_refresh;
    }

    var mainMenu=new TMainMenu();  

    function launchSubPage(pageName) {
      if (fcst_mode==1) {
        __fcsttype=fcst_type;
      } else {
        __fcsttype=fcst_type1+"_"+fcst_type2+"_"+fcst_type3+"_"+fcst_type4;
      }
      if (flag_showAnimation==true) { __fA=1 } else { __fA=0; }
      if (pageName!="weather") {
        var href=pageName+"-"+flag_language+"-"+fcst_mode+"-"+__fcsttype+"-"+fcst_domain+"-"+fcst_initDate+"-"+fcst_offset+"-"+flag_viewMenu
                         +"-"+flag_fcstMenu+"-"+flag_showTimelineThumbs+"-"+flag_showFcstThumbsAll+"-"+__fA+"-"+fcst_animationStep;
      } else {
        var href=pageName+"-"+flag_language+"-"+fcst_mode+"-"+__fcsttype+"-"+fcst_domain+"-000000_00-"+fcst_offset+"-"+flag_viewMenu
                         +"-"+flag_fcstMenu+"-"+flag_showTimelineThumbs+"-"+flag_showFcstThumbsAll+"-"+__fA+"-"+fcst_animationStep;
      }
      expDate=new Date();
      expDate.setTime(expDate.getTime()+1000*3600*24*90);
      document.cookie="p="+escape(href)+"; expires="+expDate.toGMTString();
      document.cookie="p_time="+globalTimeOfLoad+"; expires="+expDate.toGMTString();;
      window.location.href="index.php";
    }


