// map
function MMhokkaido(){
    MM_swapImage('areamap','','/img/2009/home/home_map_hokkaido.gif',1);
}
function MMtohoku(){
    MM_swapImage('areamap','','/img/2009/home/home_map_tohoku.gif',1);
}
function MMhokurikukoushinetsu(){
    MM_swapImage('areamap','','/img/2009/home/home_map_hokuriku.gif',1);
}
function MMkanto(){
    MM_swapImage('areamap','','/img/2009/home/home_map_kanto.gif',1);
}
function MMtokai(){
    MM_swapImage('areamap','','/img/2009/home/home_map_tokai.gif',1);
}
function MMkansai(){
    MM_swapImage('areamap','','/img/2009/home/home_map_kansai.gif',1);
}
function MMcyugoku(){
    MM_swapImage('areamap','','/img/2009/home/home_map_cyugoku.gif',1);
}
function MMkyushuokinawa(){
    MM_swapImage('areamap','','/img/2009/home/home_map_kyushuokinawa.gif',1);
}
function MMkaigai(){
    MM_swapImage('areamap','','/img/2009/home/home_map_kaigai.gif',1);
}


/////////////////////////////////////
function ShowAreaDiv(id){
    document.getElementById('area1').style.display = "none";
    document.getElementById('area2').style.display = "none";
    document.getElementById('area3').style.display = "none";
    document.getElementById('area4').style.display = "none";
    document.getElementById('area5').style.display = "none";
	document.getElementById('area6').style.display = "none";
    document.getElementById('area7').style.display = "none";
    document.getElementById('area8').style.display = "none";
    document.getElementById('area9').style.display = "none";

    document.getElementById(id).style.display = "block";
    
    return false;

}



// <![CDATA[

var mapBtn = {
	init: function(){
		var mapBtns = this.setup.mapBtns;
		var areas = this.setup.areas;
		
		for(i=0; i<areas.length; i++) {
			if(i !== 0) areas[i].style.display = 'none';
			mapBtns[i].onclick = function(){ mapBtn.showarea(this); return false; };
		}
		this.dive();
	},
	
	showarea: function(obj){
		var mapBtns = this.setup.mapBtns;
		var areas = this.setup.areas;
		var num;
		
		for(num=0; num<mapBtns.length; num++) {
			if(mapBtns[num] === obj) break;
		}
		
		for(var i=0; i<areas.length; i++) {
			if(i == num) {
				areas[num].style.display = 'block';
				mapBtns[num].className = 'present';
			}
			else{
				areas[i].style.display = 'none';
				mapBtns[i].className = null;
			}
		}
	},

	dive: function(){
		var hash = window.location.hash;
		hash = hash.split("?");
		hash = hash[0].split("#");

		var mapBtns = this.setup.mapBtns;
		var areas = this.setup.areas;
		for(i=0; i<areas.length; i++) {
			if(areas[i] == document.getElementById(hash[1])) this.showarea(mapBtns[i]);
		}
	}
}
	window.onload=function(){
    document.getElementById('area1').style.display = "none";
	}




