function fwLoadMenus(depth) {

    var strDepth         //階層指定

    if (window.fw_menu_0) return;

    switch(depth) {
        case 0:
            strDepth = "./";
            break;
        case 1:
            strDepth = "../";
            break;
        default:
            strDepth = "./";
            break;
    }


  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  window.fw_menu_0 = new Menu("root",160,14,"verdana,arial,helvetica",9,"#000000","#ffffff","#ffffff","#3399FF");
  fw_menu_0.addMenuItem(" SIDの強化機能","location='"+strDepth+"ver10_sid.html'");
  fw_menu_0.addMenuItem(" FXコンバータの強化機能","location='"+strDepth+"ver10_convert.html'");
  fw_menu_0.addMenuItem(" メカニカルキットPlusの強化機能","location='"+strDepth+"ver10_plus.html'");
//  fw_menu_0.addMenuItem(" 関連ユーティリティーの強化機能","location='"+strDepth+"index.html#util'");
  fw_menu_0.hideOnMouseOut=true;
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  window.fw_menu_1 = new Menu("root",100,14,"verdana,arial,helvetica",9,"#000000","#ffffff","#ffffff","#3399FF");
  fw_menu_1.addMenuItem(" 機械要素","location='"+strDepth+"kikai.html'");
  fw_menu_1.addMenuItem(" プロコマンド","location='"+strDepth+"pro.html'");
  fw_menu_1.addMenuItem(" 文字アプリケーション","location='"+strDepth+"moji.html'");
  fw_menu_1.addMenuItem(" パーツボックス","location='"+strDepth+"parts.html'");
  fw_menu_1.addMenuItem(" まいく郎FXキット","location='"+strDepth+"maikuro_fxkit.html'");
  fw_menu_1.hideOnMouseOut=true;
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


  fw_menu_0.writeMenus();

} // fwLoadMenus()



function NN_FW_showMenu( FWmenuID, targetObj, offsetX, offsetY )

{

    var x, y;


    if(document.layers) {
        // Navigator 4
        if ( targetObj.href ){
            // text link
            x = targetObj.x ;
            y = targetObj.y ;
            for(i=0; i<document.layers.length; i++){
                for(j=0; j<document.layers[i].document.links.length; j++){
                    if(document.layers[i].document.links[j] == targetObj ){
                        x += document.layers[i].left;
                        y += document.layers[i].top;
                    }
                }
            }

        } else {
            // image link
            var imageObject = document.images[targetObj];
            if (!imageObject){
                for(i=0; i<document.layers.length; i++){
                    if(document.layers[i].document.images[targetObj]){
                        imageObject = document.layers[i].document.images[targetObj];
                        x = imageObject.x ;
                        y = imageObject.y ;
                        x += document.layers[i].left;
                        y += document.layers[i].top;
                    }
                }
            }else{
                x = imageObject.x ;
                y = imageObject.y ;
            }
        }
        x -= 1; y-= 1;   // adjust
        x += offsetX;
        y += offsetY;
    } else {
        // IE , NN6
        var version = navigator.appVersion;
        if ( (document.all && version.indexOf( "MSIE 4", 0 ) >= 0 )){
             //  IE4.x
             x = event.x + document.body.scrollLeft ;
             y = event.y  + document.body.scrollTop ;
        } else {
            if( targetObj.href ){
                // text link
                x = targetObj.offsetLeft;
                y = targetObj.offsetTop;
                tempEl = targetObj.offsetParent;
            } else {
                // image link
                var targetObj = document.images[targetObj] ;
                x = eval(targetObj).offsetLeft;
                y = eval(targetObj).offsetTop;
                tempEl = eval(targetObj).offsetParent;
            }
            while (tempEl != null) {
                x += tempEl.offsetLeft;
                y += tempEl.offsetTop;
                tempEl = tempEl.offsetParent;
            }
            if ( document.all && navigator.appVersion.indexOf("Mac") >= 0) {
                // Mac IE
                y += parseInt(document.body.topMargin );
                x += parseInt(document.body.leftMargin) ;
            }
            x += offsetX;
            y += offsetY;
        }
     }

    window.FW_showMenu( FWmenuID, x, y );

}