var base_mode = new Array();
base_mode[0] = "map_google";
base_mode[1] = "map_google_view";
base_mode[2] = "map_yahoo";
var base_size = new Array();
base_size["map_small"] = 200;
base_size["map_medium"] = 370;
base_size["map_large"] = 500;
var map_mode = base_mode[2];
var map_size = "map_medium";
var map_height = base_size[map_size];

// 先読みクッキー
// alert(document.cookie);
var cookies = document.cookie.split("; ");
for(var i=0;i<cookies.length;i++){
var str = cookies[i].split("=");
if(str[0] == 'map_size'){
map_size = str[1];
map_height = parseInt(base_size[str[1]]);
}
if(str[0] == 'map_mode'){
map_mode = str[1];
}
}

// 先読みクエリー
// alert(location.search);
var allqueries = location.search;
allqueries = allqueries.substring(1);
queries = allqueries.split("&");
for(var i=0;i<queries.length;i++){
var str = queries[i].split("=");
if(str[0] == 'map_size'){
map_size = str[1];
map_height = parseInt(base_size[str[1]]);;
}
if(str[0] == 'map_mode'){
map_mode = str[1];
}
}

var half_height = map_height / 2;
var zoom_height = map_height / 10 - 1;
var zoom_height_first = map_height / 10;

document.write('<style type="text/css">\n<!--\n');
document.write('div#mapset,div#map_yahoo,div#map_google,div#halfmap,div#streetview,div#zoom ul{height:' + map_height + 'px;}\n');
document.write('div#zoom ul li a{height:' + zoom_height + 'px;}\n');
document.write('div#zoom ul li:first-child a{height:' + zoom_height_first + 'px;}\n');
document.write('-->\n</style>\n');

document.write("<img src='http://www.mapz.jp/cgi-bin/access/report.cgi?");
document.write("dir=",base_dir,"&amp;");
document.write("pix=",screen.width,"x",screen.height,"&amp;");
document.write("ref=",document.referrer);
document.write("' width='1' height='1' alt='' style='display:none'>");

