/* vim:set ts=2 sw=2 sts=2 ai si nu et ft=javascript ff=dos:

  Last Change: 16-September-2008 22:21:58.
  Author: Technical team.
  Copyright: (C)Anchor Group K.K.

  URL: http://www.anchor-gr.jp/labo.html
  EMAIL: info@anchor-gr.jp

  Filename: smartpopup.js

 ---------------------------------------------------------*/
var smartPopupVersion = "1.1.0";
function smartPopup(opt, name, mode) { function e(url, opt) { var r = window.open(url, "smartPopup", opt); if(r) r.focus(); return false; } if(!opt) opt = "" ; if(!name) name = "smartPopup" ; var anc = document.getElementsByTagName("a"); var len = anc.length; var reg = new RegExp((mode==1 ? "^((.+)?)$" : "^"+name+"(:(.+))?")); for(var i=0; i<len; i++){ if((a = anc[i]) && (a.rel.match(reg))){ a["opt"] = (RegExp.$2 == "" ? opt : RegExp.$2); a.onclick = function() { return e(this.href, this.opt); } } } }
function smartPopupAll(opt) { smartPopup(opt, null, 1); }

