/*
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: "President's Message", url: "/corporate/message/index.htm" },
{ text: "Management Plan  (&#8220;Grand Design&#8221;)", url: "/corporate/management/index.htm" },
{ text: "Mid-term Business Plan", url: "/corporate/vision/index.htm" },
{ text: "Action Guidelines", url: "/corporate/policy/index.htm" },
{ text: "Corporate Governance", url: "/corporate/governance/index.htm" },
{ text: "Corporate Overview", url: "/corporate/overview/index.htm" },
{ text: "Domestic Sites", url: "/corporate/ds/index.htm" },
{ text: "Major Domestic Subsidiaries &amp; Affiliates", url: "/corporate/group/index.htm" } ,
{ text: "Overseas Sites", url: "/corporate/oversea/index.htm" } ,            
{ text: "Corporate Information Inquiries", url: "/corporate/contact/index.htm" },              
] 
},

{
id: "service", 
itemdata: [
{ text: "Performance Materials Business Sector", url: "/service/performance/index.htm" },
{ text: "Advanced Chemicals Business Sector", url: "/service/advanced/index.htm" },
{ text: "Basic Chemicals Business Sector", url: "/service/basic/index.htm" },
{ text: "Products by Applications: Automotive materials", url: "/service/usage_automotive/index.htm" },
{ text: "Products by Applications: Electronic and IT Materials", url: "/service/usage_electronics/index.htm" },
{ text: "Products by Applications: Lifestyle, Environment, and Energy", url: "/service/usage_living/index.htm" },
{ text: "Products by Applications: Packaging Materials", url: "/service/usage_packaging/index.htm" }
]    
},

{
id: "techno", 
itemdata: [
{ text: "R&amp;D Strategy", url: "/techno/strategy_01.htm" },
{ text: "Integration of Knowledge", url: "/techno/strategy_02.htm" },
{ text: "R&amp;D Organization and Sites", url: "/techno/labo.htm" },
{ text: "Information on International Symposia", url: "/techno/symposium.htm" },
{ text: "Mitsui Chemicals Catalysis Science Award", url: "/techno/csa/index.htm" },
{ text: "Academic Awards", url: "/techno/prize/index.htm" },
{ text: "&quot;Wonders-in-Chemistry Class&quot;", url: "/techno/learning/index.htm" },
{ text: "Intellectual Property Rights", url: "/techno/ip/index.htm" },
{ text: "Technology Licensing", url: "/techno/license/index.html" }
] 
},

{
id: "ir", 
itemdata: [
{ text: "Management Plan（&#8220;Grand Design&#8221;）", url: "/corporate/management/index.htm" },
{ text: "Financial Results", url: "/ir/library/index.htm" },
{ text: "Annual Report", url: "/ir/library/ar/index.htm" },
{ text: "Fact Book", url: "/ir/fact_book/index.htm" },
{ text: "Stock Information", url: "/ir/info/index.htm" },              
{ text: "Core Business Products", url: "/ir/core/index.htm" },              
{ text: "Cautionary Statement", url: "/ir/caution/index.htm"},
{ text: "Investor Relations Inquiries", url: "/ir/contact/index.htm"}

] 
},

{
id: "csr", 
itemdata: [
{ text: "Message from the President", url: "/csr/message/index.htm" },
{ text: "Profile of the Mitsui Chemicals Group", url: "/csr/overview/index.htm" },
{ text: "Commitment to Growth", url: "/csr/vision/index.htm" },
{ text: "CSR at the Mitsui Chemicals Group", url: "/csr/activity/index.htm" },
{ text: "Special Feature", url: "/csr/special/index.htm" },
{ text: "Stakeholder Dialog", url: "/csr/stakeholder/index.htm" },
{ text: "Relationship with Society", url: "/csr/society/index.htm" },
{ text: "Relationship with the Environment", url: "/csr/environment/index.htm" },
{ text: "Systems Supporting Our CSR Initiatives", url: "/csr/structure/index.htm" },
{ text: "Feedback from Inside and Outside the Company", url: "/csr/opinion/index.htm" },
{ text: "List of Performance Data", url: "/csr/data/index.htm" },
{ text: "GRI Guideline Cross-reference List", url: "/csr/gri/index.htm" },
{ text: "Download CSR Reports", url: "/csr/report/index.htm" },
{ text: "About CSR Report 2009", url: "/csr/editorial_policy/index.htm" },
{ text: "CSR News", url: "/csr/information.htm" },
{ text: "CSR Site Map", url: "/csr/navi/index.htm" },
{ text: "CSR Report 2009 Survey", url: "/csr/questionnaire/index.htm" },
] 
},

{
id: "mediacenter",
itemdata: [
{ text: "Releases", url: "/release/index.htm" },
{ text: "Publications", url: "/mediacenter/print/index.htm" },
{ text: "Videos", 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();         

});