ただのゴミ。

//****** タブメニュー ******
var TabMenu = function ( ) { this.initializer.apply( this, arguments ); };
//__________

TabMenu.prototype.initializer = (function ( ) {
  return function ( menuId, contentsId, cbFunc, selectedCSS, defaultNo, saveDay ) {
    this.id         = menuId;
    this.menu        = document.getElementById( menuId ).getElementsByTagName( 'li' );
    this.contents    = document.getElementById( contentsId ).getElementsByTagName( 'li' );
    this.cbFunc      = cbFunc;
    this.selectedCSS = selectedCSS;
    this.defaultNo   = ( 'number' == typeof defaultNo ) ? defaultNo: 0;
    this.saveDay     = ( 'number' == typeof saveDay ) ? saveDay: 100;
    this.setPage();
  };})();


//__________
//選択したページを表示する

TabMenu.prototype.setPage = (function ( getCookie, setCookie ) {
    return function ( menuNo, contentsNo, flag ) {
      var cnt, li;

      //noが無い場合、cookieから、もしくはデフォルトにする
      if( 'number' != typeof menuNo )
        menuNo = parseInt( getCookie( this.id ) ) || this.defaultNo;

      //noをcookieに保存
      setCookie( this.id, menuNo %= this.contents.length, this.saveDay );
      
      if( 'undefined' === typeof contentsNo )
        contentsNo = menuNo;

      //コンテンツのページを表示
      for( cnt = 0; li = this.menu[ cnt ]; cnt++ )
        li.className = cnt == menuNo ? this.selectedCSS: '';
      
      for( cnt = 0; li = this.contents[ cnt ]; cnt++ )
        li.style.display = cnt == contentsNo ?
          /*@if( @_jscript ) 'block' @else@*/ 'list-item' /*@end@*/: 'none';

      //ページが切り替わったら呼び出す関数
      if( 'function' == typeof this.cbFunc && !flag )  this.cbFunc( menuNo );
      
      return this.contents[ contentsNo ];
    };
  })(
    //クッキーから値を得る
    function ( name ) {
      name = encodeURIComponent( name ).replace( /([.*()]) /g, '\\$1' );
      var value = document.cookie.match( RegExp( name + '\\s*=\\s*(.*?)(?:[\\s;,]|$)' ) );
      return value ? decodeURIComponent( value[1] ): '';
    },

    //クッキーに値を保存する
    function ( name, value, day, path, domain ) {
      return document.cookie = encodeURIComponent( name ) + '=' + encodeURIComponent( value ) +
        '; ' + 'expires=' + new Date( ( new Date ) - 86400000 * -day ).toUTCString( ) +
        '; ' + ( path ? 'path=' + encodeURI( path ) + '; ': '' ) +
        (domain ? 'domain=' + encodeURI ( domain ) + '; ': '' );
    }
  );
//__________

TabMenu.handler = (function ( getParent, getNo ) {
  return function ( evt ) {
    var e = evt./*@if( @_jscript ) srcElement @else@*/ target /*@end@*/;
    var ul = getParent( e, 'nodeName', 'UL' );
    var li = getParent( e, 'nodeName', 'LI' );
    var tb;
    
    if( ul && ul.id ) {
      tb = TabMenu.memo[ ul.id ];
      tb && tb.setPage( getNo( li ) );
    }
    
//    if( 'A' === e.nodeName )
//      evt./*@if( @_jscript ) returnValue = false @else@*/ preventDefault() /*@end@*/;
  };
})(
  //特定の親ノードを返す
  function ( node, type, val ) {
    return node ? (val == node[type]) ? node: arguments.callee( node.parentNode, type, val ): null;
  },

  //指定ノードが、何番目かを返す none: 0
  function ( node ) {
    var r = 0, n;
    if( node )
      for( n = node.nodeName; node = node.previousSibling; )
        if( node.nodeName == n ) r += 1;

    return r;
  }
);
//__________

TabMenu.create = function ( menuId, contentsId, cbFunc, selectedCSS, defaultNo, saveDay ) {
  //クリックイベントの追加
  if( 'undefined' == typeof this.memo ) {
    this.memo = [ ];
    document./*@if( @_jscript ) attachEvent( 'on' + @else@*/ addEventListener( /*@end@*/
      'click', TabMenu.handler, false );
  }
  
  //新規登録か
  if( !this.memo[ menuId ] )
    this.memo[ menuId ] = new this( menuId, contentsId, cbFunc, selectedCSS, defaultNo, saveDay );
  
  return this.memo[ menuId ];
};

//_______________________________