// Popup
function popUp (thisURL) { 
	if (document.getElementById) { 
	    // Set the width of your shared popup window here
		var winheight = 574;
		var winwidth = 517;
		width = parseInt(winwidth) + 5;
		height = parseInt(winheight) + 5;
		newwin = window.open(thisURL.href, "popUp", "resizable=yes,width="+width+",height="+height+",scrollbars=yes,location=yes");
		newwin.focus();
		return false; 
	} else { 
		return true; 
	} 
}

// This script adds the popup functionality to all links with a class of popup
function popLinks(){
	if (!document.getElementsByTagName) return null;
	var anchors = document.getElementsByTagName("a");
	for(var i=0; i < anchors.length; i++){
		var a = anchors[i];
		var thisclass = a.className;
		if ((thisclass.indexOf("popup") != -1)) { 
			//a.setAttribute("title", a.title + " - This link will open in a new window.");  
		  	a.onclick = function() { return popUp(this); }
		}
	  }
}

window.onload = function(){
  popLinks();
}