/* vim: set tabstop=2 shiftwidth=2 foldmethod=marker: */
/**
 * 
 * ポップアップ処理スクリプト
 *
 * @author      Shogo Kawase <shogo@arcstyle.jp>
 * @copyright   2007-2008 Arc Style Inc.
 * @version     CVS: $Id: popup.js 5257 2008-01-24 16:10:42Z shogo $
 *
 */
var alba_popup = {
	icon:  null,
	sb:    null,
	style: 'width=620,height=500,toolbar=0,status=0,location=0,scrollbars=1',
	init: function()
	{
		var a = document.getElementsByTagName('a');
		var z = a.length;
		for (var i = 0; i < z; ++i) {
			if (a[i].rel == 'sb' || a[i].rel == 'icon') {
				a[i].onclick = function(){ return alba_popup.onclick(this); };
			}
		}
	},
	onclick: function(a)
	{
		if (this[a.rel] && !this[a.rel].closed) {
			this[a.rel].location.href = a.href;
			this[a.rel].focus();
		} else {
			this[a.rel] = window.open(a.href, a.rel, this.style);
		}
		return false;
	}
};

