function makePopups()
{
	var links = document.getElementsByTagName('a');
	for (var i = 0; i < links.length; i++)
	{
		if (links[i].className == "popup")
			links[i].onclick = showPopup;
	}
}
function showPopup() {

	var width = 970;
	var height = 600;
	var top = screen.height/2 - height/2;
	var left = screen.width/2 - width/2;
	
	var strOptions = 'width=' + width + ',height=' + height + ',top=' + top + ', left=' + left +',toolbar=no,menubar=no,status=no,resize=yes,resizable=yes,directories=no,scrollbars=yes'; 
  	var popup = window.open(this.href, "popup", strOptions);

  	popup.focus();
  return false;
}
document.observe('dom:loaded', makePopups); 
