/*
Initialize and render the MenuBar when its elements are ready 
to be scripted.
*/

YAHOO.util.Event.onContentReady("globalNaviArea", function () {

/*
Instantiate a MenuBar:  The first argument passed to the 
constructor is the id of the element in the page 
representing the MenuBar; the second is an object literal 
of configuration properties.
*/

var oMenuBar = new YAHOO.widget.MenuBar("globalNaviArea", { 
autosubmenudisplay: true, 
hidedelay: 750, 
lazyload: true });

/*
Define an array of object literals, each containing 
the data necessary to create a submenu.
*/

var aSubmenuData = [

{
id: "home", 
itemdata: [
]    
},

{
id: "corporate", 
itemdata: [
{ text: "ごあいさつ", url: "/corporate/message.htm" },
{ text: "経営計画（グランドデザイン）", url: "/corporate/management/index.htm" },
{ text: "中期経営計画", url: "/corporate/vision/index.htm" },
{ text: "行動指針", url: "/corporate/policy/index.htm" },
{ text: "コーポレートガバナンス", url: "/corporate/governance.htm" },
{ text: "会社概要", url: "/corporate/overview.htm" },
{ text: "国内拠点", url: "/corporate/group/domestic.htm" },
{ text: "国内関係会社", url: "/corporate/group/group.htm" } ,
{ text: "海外関係会社", url: "/corporate/group/oversea.htm" } ,            
{ text: "購買方針", url: "/corporate/buying/index.htm" } ,            
{ text: "人材マネジメント方針", url: "/corporate/human_resources/index.htm" },              
] 
},

{
id: "service", 
itemdata: [
{ text: "機能材料事業本部", url: "/service/performance/index.htm" },
{ text: "先端化学品事業本部", url: "/service/advanced/index.htm" },
{ text: "基礎化学品事業本部", url: "/service/basic/index.htm" },
{ text: "製品検索", url: "/service/search/index.htm" },
{ text: "製品用途の紹介：自動車材料", url: "/service/usage_automotive/index.htm" },
{ text: "製品用途の紹介：電子・情報材料", url: "/service/usage_electronics/index.htm" },
{ text: "製品用途の紹介：生活・環境・エネルギー", url: "/service/usage_living/index.htm" },
{ text: "製品用途の紹介：包装材料", url: "/service/usage_packaging/index.htm" }              
]    
},

{
id: "techno", 
itemdata: [
{ text: "研究開発方針", url: "/techno/strategy_01.htm" },
{ text: "&#8220;知&#8221;の総合化", url: "/techno/strategy_02.htm" },
{ text: "研究開発組織と拠点", url: "/techno/labo.htm" },
{ text: "国際シンポジウムのご案内", url: "/techno/symposium.htm" },
{ text: "三井化学 触媒科学賞", url: "/techno/csa/index.htm" },
{ text: "研究開発受賞一覧", url: "/techno/prize/index.htm" },
{ text: "子ども実験教室「ふしぎ探検隊」", url: "/techno/learning/index.htm" },
{ text: "知的財産権", url: "/techno/ip/index.htm" },
{ text: "ライセンス", url: "/techno/license/index.htm" }
] 
},

{
id: "ir", 
itemdata: [
{ text: "個人投資家の皆様へ", url: "/ir/individual/index.htm" },
{ text: "経営計画（グランドデザイン）", url: "/corporate/management/index.htm" },
{ text: "IRライブラリ", url: "/ir/library/index.htm" },
{ text: "プレゼンテーション", url: "/ir/presentation.htm" },
{ text: "財務データハイライト", url: "/ir/finance/index.htm" },
{ text: "株式情報", url: "/ir/stock.htm" },
{ text: "本日の株価", url: "http://quote.yahoo.co.jp/quotes?SYMBOLS=4183&detailed=t" , target: "_blank"},
{ text: "よくあるご質問", url: "/ir/faq.htm" },
{ text: "免責事項", url: "/ir/caution.htm" },
]
},

{
id: "csr", 
itemdata: [
{ text: "トップメッセージ", url: "/csr/message/index.htm" },
{ text: "三井化学グループの概要", url: "/csr/overview/index.htm" },
{ text: "さらなる成長を目指して", url: "/csr/vision/index.htm" },
{ text: "三井化学グループのCSR", url: "/csr/activity/index.htm" },
{ text: "特集", url: "/csr/special/index.htm" },
{ text: "ステークホルダー・ダイアログ", url: "/csr/stakeholder/index.htm" },
{ text: "社会とのかかわり", url: "/csr/society/index.htm" },
{ text: "環境とのかかわり", url: "/csr/environment/index.htm" },
{ text: "CSRを支える仕組み", url: "/csr/structure/index.htm" },
{ text: "社内外の声を活かします", url: "/csr/opinion/index.htm" },
{ text: "パフォーマンスデータ一覧", url: "/csr/data/index.htm" },
{ text: "GRIガイドライン対比リスト", url: "/csr/gri/index.htm" },
{ text: "報告書ダウンロード", url: "/csr/report/index.htm" },
{ text: "CSR報告書2009について", url: "/csr/editorial_policy/index.htm" },
{ text: "CSRニュース一覧", url: "/csr/information.htm" },
{ text: "CSRナビ", url: "/csr/navi/index.htm" },
{ text: "CSR報告書2009アンケート", url: "/csr/questionnaire/index.htm" },
]
},

{
id: "release",
itemdata: [
{ text: "ニュースリリース", url: "/release/index.htm" },
{ text: "印刷物", url: "/mediacenter/print/index.htm" },
{ text: "映像", url: "/mediacenter/video/index.htm" }
]
},

{
id: "career", 
itemdata: [
]    
}               
];


/*
Subscribe to the "beforerender" event, adding a submenu 
to each of the items in the MenuBar instance.
*/

oMenuBar.subscribe("beforeRender", function () {

if (this.getRoot() == this) {

//this.getItem(0).cfg.setProperty("submenu", aSubmenuData[0]);
this.getItem(1).cfg.setProperty("submenu", aSubmenuData[1]);
this.getItem(2).cfg.setProperty("submenu", aSubmenuData[2]);
this.getItem(3).cfg.setProperty("submenu", aSubmenuData[3]);
this.getItem(4).cfg.setProperty("submenu", aSubmenuData[4]);
this.getItem(5).cfg.setProperty("submenu", aSubmenuData[5]);
this.getItem(6).cfg.setProperty("submenu", aSubmenuData[6]);
//this.getItem(7).cfg.setProperty("submenu", aSubmenuData[7]);
}

});


/*
Call the "render" method with no arguments since the 
markup for this MenuBar instance is already exists in 
the page.
*/

oMenuBar.render();         

});