addEvent(window, "load", autoPOP);

function addEvent(elm,listener,fn){
	try{
		elm.addEventListener(listener,fn,false);
	}catch(e){
		elm.attachEvent("on"+listener,fn);
	}
}
//window.onload=autoPOP;

function autoPOP()
{
  var x = document.getElementsByTagName('a');
  for (var i=0;i<x.length;i++)
  {
    if (x[i].getAttribute('className') == 'popup' || x[i].getAttribute('class') == 'popup')
    {
      x[i].onclick = function () {
        return winOpen(this.href)
      }
      x[i].title += '別ウィンドウで地図を開きます';
    }
  }
};

function winOpen(url) {
  window.open(
              url,
              'popup',
              'width=700,height=850,scrollbars=1,resizable=1'
  );
  return false;
};

