function activatePopups()
{
	if (document.getElementsByTagName)
	{
		var rAs = document.getElementsByTagName("a");
		for (i = 0; i < rAs.length; i++)
		{
			if ("popup" == rAs[i].getAttribute("target"))
			{
				rAs[i].onclick = function (){openWindow(this); return false;};
			}
		}
	}
}

function openWindow(dATag) 
{
	var iWidth = 389;
	var iHeight = 597;

	var iHeightAdder = 30 + 16; // IE's default margin + scrollbar
	var iWidthAdder = 20 + 16; // IE's default margin + scrollbar
	
	var className = dATag.className;

	var sWMatch = /w(\d{1,4})/i.exec(className);
	if (sWMatch && sWMatch[1])
	{
		iWidth = parseInt(sWMatch[1]);
	}	

	var sHMatch = /h(\d{1,4})/i.exec(className);
	if (sHMatch && sHMatch[1])
	{
		iHeight = parseInt(sHMatch[1]);
	}	

	var oWin = window.open (dATag.href, "DC", "width=" + (iWidth + iWidthAdder) + ", height=" + (iHeight + iHeightAdder) + ", resizable=no, status=no, toolbar=no, menubar=no, scrollbars=yes");
	oWin.focus();
}

addLoadEvent(activatePopups);



