// menu_sideNavi

var path = document.location.pathname;

var menu = {
  mu: [ 
		{ text: "&#956;-9010", link:"/product/compact/mju9010/index.html" },
		{ text: "&#956;-7040", link:"/product/compact/mju7040/index.html" },
		{ text: "&#956;-7020", link:"/product/compact/mju7020/index.html" },
		{ text: "&#956;-5010", link:"/product/compact/mju5010/index.html" }
      ],
  muTough: [
		{ text: "&#956;TOUGH-8010", link:"/product/compact/mjutough8010/index.html" },
		{ text: "&#956;TOUGH-6020", link:"/product/compact/mjutough6020/index.html" },
		{ text: "&#956;TOUGH-3000", link:"/product/compact/mjutough3000/index.html" },
		{ text: "工事写真用", link:"/product/construction/index.html" }
      ],
  sp: [
		{ text: "SP-800UZ", link:"/product/compact/sp800uz/index.html" },
		{ text: "SP-600UZ", link:"/product/compact/sp600uz/index.html" }
      ],
  fe: [
		{ text: "FE-4020", link:"/product/compact/fe4020/index.html" },
		{ text: "FE-47", link:"/product/compact/fe47/index.html" }
      ]
};

var old_products = [
  "/product/compact/sp590uz/index.html",
  "/product/compact/fe46/index.html",
  "/product/compact/fe4000/index.html",
  "/product/compact/mjutough8000/index.html",
  "/product/compact/mjutough6010/index.html",
  "/product/compact/mjutough6000/index.html",
  "/product/compact/mju1050sw/index.html",
  "/product/compact/mju1060/index.html",
  "/product/compact/mju1030sw/index.html",							
  "/product/compact/mju1200/index.html",
  "/product/compact/mju1020/index.html",
  "/product/compact/mju830/index.html",
  "/product/compact/mju780/index.html",
  "/product/compact/mju850sw/index.html",
  "/product/compact/mju795sw/index.html",
  "/product/compact/mju790sw/index.html",
  "/product/compact/mju770sw_koujikit/index.html",
  "/product/compact/sp570uz/index.html",
  "/product/compact/sp565uz/index.html",
  "/product/compact/sp560uz/index.html",
  "/product/compact/fe5010/index.html",
  "/product/compact/fe370/index.html",
  "/product/compact/fe360/index.html",
  "/product/compact/fe350wide/index.html",
  "/product/compact/fe330/index.html",
  "/product/compact/fe320/index.html",
  "/product/compact/fe310/index.html",
  "/product/compact/fe300/index.html",
  "/product/compact/fe290/index.html",
  "/product/compact/fe280/index.html",
  "/product/compact/fe270/index.html",
  "/product/compact/fe250/index.html",
  "/product/compact/fe240/index.html",
  "/product/compact/fe230/index.html",
  "/product/compact/fe220/index.html",
  "/product/compact/fe220d/index.html",
  "/product/compact/fe210/index.html",
  "/product/compact/fe20/index.html",
  "/product/compact/fe3010/index.html",
  "/product/compact/mju9000/index.html",
  "/product/compact/mju7000/index.html",
  "/product/compact/fe3000/index.html",
  "/product/compact/fe45/index.html"
];

function write_menu(category){
  for(var i=0,cur_menu; cur_menu = menu[category][i]; i++){
    var _path = cur_menu["link"].split("index.html")[0]
    var _current = path.match(_path) ? ' class="current"' : '';
    document.write('<li'+_current+'><a href="'+cur_menu["link"]+'">'+cur_menu["text"]+'</a></li>');
  }
};

function write_old_products(){
  for(var i=0,cur_old; cur_old = old_products[i]; i++){
    if( path.match(cur_old.split("index.html")[0]) ){
      document.write('<li><span><a href="/product/compact/record/index.html"><img src="/product/images/localNav_record_h.gif" alt="今までに発表した製品" width="154" height="25" /></a></span></li>');
      return;
    }
  }
  document.write('<li><span><a href="/product/compact/record/index.html"><img src="/product/images/localNav_record_o.gif" alt="今までに発表した製品" width="154" height="25" /></a></span></li>');
};

/*------------------------------------------------------------------*/

document.write('<h2><a href="/product/compact/index.html"><img src="/product/images/localNav_compact_o.gif" alt="コンパクトデジタルカメラ" width="156" height="29" /></a></h2>');
document.write('<ul id="localNav">');
document.write('<li><span><a href="/product/compact/index.html#ancMju"><img src="/product/images/localNav_mu_o.gif" alt="ミュー" width="154" height="25" /></a></span>');
document.write('<ul>');
write_menu("mu");
document.write('</ul>');
document.write('</li>');
document.write('<li><span><a href="/product/compact/index.html#ancMjuTough"><img src="/product/images/localNav_muTough_o.gif" alt="ミュータフ" width="154" height="25" /></a></span>');
document.write('<ul>');
write_menu("muTough");
document.write('</ul>');
document.write('</li>');
document.write('<li><span><a href="/product/compact/index.html#ancSp"><img src="/product/images/localNav_sp_o.gif" alt="SP" width="154" height="25" /></a></span>');
document.write('<ul>');
write_menu("sp");
document.write('</ul>');
document.write('</li>');
document.write('<li><span><a href="/product/compact/index.html#ancFe"><img src="/product/images/localNav_fe_o.gif" alt="fe" width="154" height="25" /></a></span>');
document.write('<ul>');
write_menu("fe");
document.write('</ul>');
document.write('</li>');
document.write('<li><span><a href="/product/compact/accessory/index.html"><img src="/product/images/localNav_accessory_o.gif" alt="アクセサリー" width="154" height="25" /></a></span></li>');
write_old_products();
document.write('<li><span><a href="/product/price/compact.html" rel="popup"><img src="/product/images/localNav_price_o.gif" alt="価格表／JANコード表" width="154" height="25" /></a></span></li>');
document.write('<li><span><a href="http://www.olympus.co.jp/jp/lineup/spec/imsg/index.cfm"><img src="/product/images/localNav_conversion_o.gif" alt="製品比較" width="154" height="25" /></a></span></li>');
document.write('</ul><!-- /localNav -->');