/* Google Map Api */
if(location.host.match("test")){
  document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjnWEw49hPkgGtlO26HU9HhSEXUf4a39yc5TcA7tKcHLlsjTHAhRl7ZN_1jIBGYC8O7VRpTPAXaGnAg"></script>')
}else if(location.host.match("demo")){
  document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjnWEw49hPkgGtlO26HU9HhQ-jTl8aAmwyuAFcwKwFOZZcXOn8hRWSilOLirmH2hkfV1WHEw3RX3qGA"></script>')
}else if(location.host.match(/^showa$/)){
  document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjnWEw49hPkgGtlO26HU9HhQm9BlBGGzN2beC3hyGZtYzwYC3gxS941OJFM3ITSMzJ4A1pQejiWAN-w"></script>')
}else{
  document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAALpQWOfYcit0iDNwMQYtTvBT2w13kPJqEggxz2eRS63qljJJiBhQ_g0huqQvAsbHbzIdBYT97mEpDSg"></script>')
}

function showAddress(address,scale) {
  var map = null;
  var geocoder = null;
  var func = []
  for(i in address){
    (function(point) {
      if (!point) {
        alert(address[i] + " \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002");
      } else {
        map = new GMap2(document.getElementById(i));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(point.y,point.x,136), scale);
        map.addOverlay(new GMarker(new GLatLng(point.y,point.x)));
        map.disableDoubleClickZoom();
        map.setCenter(new GLatLng(point.y,point.x,136), scale);
        map.addOverlay(new GMarker(new GLatLng(point.y,point.x)));
        map.enableDoubleClickZoom();
      }
    })(address[i])
  }
}
