if (typeof Podbop == 'undefined') Podbop = {};

Podbop.Popup = function(anchorId, width, height) {
	var _url = '';
	var _window = null;

	addEvent(window, 'onload', function() {
		var anchor = $(anchorId);
		var url = anchor.getAttribute('href');

		addEvent(anchor, 'onclick', function() {
			if (_window == null || _window.closed || _url != url) {
				_window = window.open(url, 'popup', 'width=' + width + ',height=' + height);
			}

			_url = url;
			_window.focus();

			return false;
		});
	});
};
