function stopErrors() {
return true;
}
window.onerror = stopErrors;

d = document;
IE4 = (document.all) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
NS6= (document.getElementById&&!document.all) ? 1 : 0;
ver4 = (IE4 || NS4 || NS6) ? 1 : 0;

bVer = navigator.appVersion;
IsMac = (bVer.lastIndexOf('Mac') != -1) ? 1 : 0;
IsNot40 = 1;

if(IsMac){
IsNot40 = (bVer.lastIndexOf('MSIE 4.01') ==-1) ? 1 : 0;
}

if(ver4) {
Map = '<IMG SRC=../image/map_0.gif BORDER=0 HEIGHT=176 WIDTH=213 usemap=#map>';
if(IsNot40==1){
MapOr = '<IMG SRC=../image/map_2.gif BORDER=0 HEIGHT=176 WIDTH=213 usemap=#map>';
MapRe = '<IMG SRC=../image/map_1.gif BORDER=0 HEIGHT=176 WIDTH=213 usemap=#map>';
MapTwo = '<IMG SRC=image/0_1.gif BORDER=0 HEIGHT=176 WIDTH=213 usemap=#map2>';
}

coord = new Array(
'131,129,143,155', // aichi 
'143,65,161,79', // akita 
'139,56,179,66', // aomori 
'176,24,186,34', // asahikawa 
'53,126,78,141', // ehime 
'26,123,38,141', // fukuoka 
'160,91,186,101', // fukushima 
'182,44,191,53', // hakodate 
'44,101,56,120', // hiroshima 
'91,90,109,103', // ishikawa 
'78,127,93,141', // kagawa 
'25,152,39,169', // kagoshima 
'53,141,79,163', // kochi 
'25,141,42,152', // kumamoto 
'193,31,202,40', // kushiro 
'160,79,185,91', // miyagi 
'5,122,19,170', // nagasaki 
'124,85,144,102', // niigata 
'38,124,50,146', // oita 
'55,101,68,119', // okayama 
'2,16,104,58', // okinawa 
'19,123,26,150', // saga 
'167,36,176,45', // sapporo 
'44,90,57,101', // shimane 
'78,141,93,165', // tokushima 
'56,90,69,101', // tottori 
'109,90,124,103', // toyama 
'174,1,194,13', // wakkanai 
'139,79,160,91', // yamagata 
'33,90,44,120' // yamaguchi 
);
}

else {Map = ''; MapOr =''; MapRe=''; MapTwo='' };

function mapOver(loc,which){
if (!ver4) { return }
where = loc.href.toString();
for(var i=0;i<d.sec.sel.options.length;i++){
what = d.sec.sel.options[i].value;
h = what.substring(3,what.length);
if(where.indexOf(h) != -1){break}
}

place = d.sec.sel.options[i].text;
if(place!=d.thisPlace){setTimeout('status = place;return true','0')}
else{d.links[(d.links.length-32)+i].href = 'javascript:showMap()'}

c = coord[i].split(',');
clLeft = c[0];
clRight = c[2];
clTop = c[1];
clBot = c[3];

if(which == 2){
 if(NS6) whichEl = d.getElementById("elMapRe").style;
 else whichEl = (IE4) ? d.all.elMapRe.style : d.elMain.document.elMapRe;
} else{
 if(NS6) whichEl = d.getElementById("elMapOr").style;
 else whichEl = (IE4) ? d.all.elMapOr.style : d.elMain.document.elMapOr;
}

if(NS4) {
 whichEl.clip.top = clTop;
 whichEl.clip.bottom = clBot;
 whichEl.clip.left = clLeft;
 whichEl.clip.right = clRight;
}
else whichEl.clip = "rect(" + clTop + " " + clRight + " " + clBot + " " + clLeft + ")";

whichEl.visibility = "visible";
return place
}

function mapOut(){
 whichEl.visibility = 'hidden';
 window.setTimeout('status=""','0');
}

function showMap() {
if(NS6) whichEl2 = d.getElementById("elMapTwo").style; 
else whichEl2 = (IE4) ? d.all.elMapTwo.style : d.elMain.document.elMapTwo;
if(d.flag != 'visible'){swapMap('hidden','visible');d.flag='visible'}
else{swapMap('visible','hidden');d.flag='hidden'}
showMsg()
}

function swapMap(val,val2){
if(NS6) {
whichEl3 = d.getElementById("elMap").style;
whichEl4 = d.getElementById("elMapRe").style;
whichEl5 = d.getElementById("elMapOr").style;
} else {
whichEl3 = (IE4) ? d.all.elMap.style : d.elMain.document.elMap;
whichEl4 = (IE4) ? d.all.elMapRe.style : d.elMain.document.elMapRe;
whichEl5 = (IE4) ? d.all.elMapOr.style : d.elMain.document.elMapOr;
}
whichEl3.visibility = val;
whichEl4.visibility = val;
whichEl5.visibility = 'hidden';
whichEl2.visibility = val2;
}

function showMsg(){
if(d.flag=='visible') {msg = 'Japan'}
else{msg = d.thisPlace}
setTimeout('status = "Click for map of " + msg; return true','0')
}

function initIm(){
if(NS4==1) onload = init();
if(NS6) whichEl = d.getElementById("elMap").style;
else whichEl = (IE4) ? d.all.elMap.style : d.elMain.document.elMap;
whichEl.visibility ='visible';
d.thisPlace = mapOver(this.location,2);
if(parent != self && top.frames[0].bVer < 3){return} parent.frames[0].sec.sel.selectedIndex =2;
}


function init(){setTimeout('top.onresize = redo','0')}
function redo(){
if(parent==self) location.reload()
else parent.frames[1].location.reload()
}
