window.onload = function () {
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++) {
		if (x[i].getAttribute('rel') == 'popup') {
			x[i].onclick = function () {
				return pop(this.href)
		}
			x[i].title += ' (Popup)';
		}
	}
}

function pop(url, height, width) {
	var dim = 'height=' + height + ',width=' + width;
	newwindow=window.open(url,'name',dim);
	if (window.focus) {newwindow.focus()}
	return false;
}
