window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		return false; 
	} 
	else
	
	// create an array of objects of each link in the document 
	var popuplinks = $$('a.popup');
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popuplinks.length; i++) {	
		popuplinks[i].onclick = function() {	
		//openPopUp(this.getAttribute("href"));	
		openPopUp(this.getAttribute("href"));	
		return false; 	
		}
	} 
} 

function openPopUp(linkURL) {
	window.open(linkURL,'popup','width=580,height=400, resizable=yes,scrollbars=yes, menubar=no')
}