// JavaScript Document

// Change Map JavaScript

// Yokosuka Headquarters
function change_img_yokosuka(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Oppama
		if(mode==1){
			html += '<img src="/e/about/access/img/yokosuka_map_01.gif" alt="Yokosuka Headquarters Map" width="520" height="550" usemap="#yokosuka_01" \/>';
			html += '<map name="yokosuka_01" id="yokosuka_01"><area shape="rect" coords="294,492,383,519" href="/e/about/access/bus.html" alt="" target="_blank" \/><\/map>';
		
		//Asahina IC
		}else if(mode==2){
			html += '<img src="/e/about/access/img/yokosuka_map_02.gif" width="520" height="658" alt="Yokosuka Headquarters Map" \/>';

		//Sachiura
		}else if(mode==3){
			html += '<img src="/e/about/access/img/yokosuka_map_03.gif" width="520" height="658" alt="Yokosuka Headquarters Map" \/>';
		}
		
		target.innerHTML = html;
}

// Yokohama Institute for Earth Sciences (YES)
function change_img_yokohama(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Sugita
		if(mode==1){
			html += '<img src="/e/about/access/img/yokohama_map_01.gif" alt="Yokohama Institute for Earth Sciences Map" width="520" height="516" \/>';
		
		//Shin-Sugita
		}else if(mode==2){
			html += '<img src="/e/about/access/img/yokohama_map_02.gif" width="520" height="516" alt="Yokohama Institute for Earth Sciences Map" \/>';

		//Nanbu-Ichiba
		}else if(mode==3){
			html += '<img src="/e/about/access/img/yokohama_map_03.gif" width="520" height="516" alt="Yokohama Institute for Earth Sciences Map" \/>';

		//Sugita deguchi
		}else if(mode==4){
			html += '<img src="/e/about/access/img/yokohama_map_04.gif" width="520" height="516" alt="Yokohama Institute for Earth Sciences Map" \/>';
		}
		target.innerHTML = html;
}

// Mutsu Institute for Oceanography (MIO)
function change_img_mutsu(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Guide
		if(mode==1){
			html += '<img src="/e/about/access/img/mutsu_map_01.gif" alt="Mutsu Institute for Oceanography Map" width="520" height="464" \/>';

		}
		target.innerHTML = html;
}

// Kochi Institute for Core Sample Research
function change_img_kochi(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Zoom
		if(mode==1){
			html += '<img src="/e/about/access/img/kochi_map_01.gif" alt="Kochi Institute for Core Sample Research Map" width="520" height="406" \/>';

		}
		target.innerHTML = html;
}

// Tokyo Office
function change_img_tokyo(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Uchisaiwaicho
		if(mode==1){
			html += '<img src="/e/about/access/img/tokyo_map_01.gif" alt="Tokyo Office Map" width="520" height="492" \/>';
		
		//Shinbashi
		}else if(mode==2){
			html += '<img src="/e/about/access/img/tokyo_map_02.gif" width="520" height="492" alt="Tokyo Office Map" \/>';

		//Toranomon
		}else if(mode==3){
			html += '<img src="/e/about/access/img/tokyo_map_03.gif" width="520" height="492" alt="Tokyo Office Map" \/>';

		//Kasumigaseki
		}else if(mode==4){
			html += '<img src="/e/about/access/img/tokyo_map_04.gif" width="520" height="492" alt="Tokyo Office Map" \/>';
		}
		target.innerHTML = html;
}

// Global Oceanographic Center (GODAC)
function change_img_godac(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Zoom
		if(mode==1){
			html += '<img src="/e/about/access/img/godac_map_01.gif" alt="Global Oceanographic Center Map" width="520" height="385" \/>';

		}
		target.innerHTML = html;
}

// Washington D.C. Office
function change_img_washington(mode){
		var target = document.getElementById('image_map');
		var html = "";
		
		//Dupont Circle
		if(mode==1){
			html += '<img src="/e/about/access/img/washington_map_01.gif" alt="Washington D.C. Office Map" width="520" height="588" \/>';
		
		//farragut North
		}else if(mode==2){
			html += '<img src="/e/about/access/img/washington_map_02.gif" width="520" height="588" alt="Washington D.C. Office Map" \/>';

		//Foggy Bottom
		}else if(mode==3){
			html += '<img src="/e/about/access/img/washington_map_03.gif" width="520" height="588" alt="Washington D.C. Office Map" \/>';

		//farragut West
		}else if(mode==4){
			html += '<img src="/e/about/access/img/washington_map_04.gif" width="520" height="588" alt="Washington D.C. Office Map" \/>';
		}
		target.innerHTML = html;
}

//Preload Images
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



