// ------------------------------------------

var TimeOut         = 200;

var currentLayer    = null;

var currentitem     = null;

var currentLayerNum = 0;

var noClose         = 0;

var closeTimer      = null;

var layer;



function header_mopen(n) {

  var l  = document.getElementById("menu"+n);

  var mm = document.getElementById("mmenu"+n);



	switch (n) {

		case 0:		// ** 画像リンク

		layer = "<div id='head_shop_list'>";
		layer += "<ul>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/sapporo/index.php' alt='Sapporo'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Sapporo</a></li>";
		
		
		layer += "<li><a href='http://www.parco.co.jp/customer/sendai/index.php' alt='Sendai'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Sendai</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/utsunomiya/index.php' alt='Utsunomiya'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Utsunomiya</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/urawa/index.php' alt='Urawa'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Urawa</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/shintokorozawa/index.php' alt='Shin-Tokorozawa'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Shin-Tokorozawa</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/chiba/index.php' alt='Shin-Tokorozawa'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Chiba</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/tsudanuma/index.php' alt='Tsudanuma'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Tsudanuma</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/ikebukuro/index.php' alt='Ikebukuro'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Ikebukuro</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/shibuya/index.php' alt='Shibuya'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Shibuya</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/kichijoji/index.php' alt='Kichijoji'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Kichijoji</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/chofu/index.php' alt='Chofu'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Chofu</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/hibarigaoka/index.php' alt='Hibarigaoka'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Hibarigaoka</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/shizuoka/index.php' alt='Shizuoka'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Shizuoka</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/matsumoto/index.php' alt='Matsumoto'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Matsumoto</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/nagoya/index.php' alt='Nagoya'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Nagoya</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/otsu/index.php' alt='Otsu'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Otsu</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/hiroshima/index.php' alt='Hiroshima'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Hiroshima</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/fukuoka/index.php' alt='Fukuoka'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Fukuoka</a></li>";
		
		layer += "<li><a href='http://www.parco.co.jp/customer/kumamoto/index.php' alt='Kumamoto'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />Kumamoto</a></li>";
		
		layer += "<li><a href='http://www.parco.com.sg/' alt='PARCO MARINA BAY'><img src='http://www.parco.co.jp/customer/img/common/li_mark_shop.gif' />PARCO MARINA BAY</a></li>";
		
		layer += "</ul>";
		
		layer += "</div>";

		default:
			break;
	}



  if(l) {
    mcancelclosetime();
	l.style.display = 'block';
	l.innerHTML = layer;
    l.style.visibility='visible';

    if(currentLayer && (currentLayerNum != n))
      currentLayer.style.visibility='hidden';
    currentLayer = l;
    currentitem = mm;
    currentLayerNum = n;



  } else if(currentLayer) {

    currentLayer.style.visibility='hidden';

    currentLayerNum = 0;

    currentitem = null;

    currentLayer = null;

 	}

}



function mopen(n) {

  var l  = document.getElementById("menu"+n);

  var mm = document.getElementById("mmenu"+n);



	popup_contents(n);



  if(l) {

    mcancelclosetime();

	l.style.display = 'block';

	l.innerHTML = layer;



    l.style.visibility='visible';

    if(currentLayer && (currentLayerNum != n))

      currentLayer.style.visibility='hidden';

    currentLayer = l;

    currentitem = mm;

    currentLayerNum = n;



  } else if(currentLayer) {

    currentLayer.style.visibility='hidden';

    currentLayerNum = 0;

    currentitem = null;

    currentLayer = null;

 	}

}



function mclosetime() {

  closeTimer = window.setTimeout(mclose, TimeOut);

}



function mcancelclosetime() {

  if(closeTimer) {

    window.clearTimeout(closeTimer);

    closeTimer = null;

  }

}



function mclose() {

  if(currentLayer && noClose!=1)   {

    currentLayer.style.visibility='hidden';

    currentLayerNum = 0;

    currentLayer = null;

    currentitem = null;

  } else {

    noClose = 0;

  }

  currentLayer = null;

  currentitem = null;

}




