// Popup
function popUp (thisURL) { 
	//alert("We're in the popup function!");
	if (document.getElementById) { 
		 // Set the width of your shared popup window here
		//var winheight = 600;
		//var winwidth = 800;
		//width = parseInt(winwidth) + 20;
		//height = parseInt(winheight) + 20;
		newwin = window.open(thisURL.href, "popUp", "resizable=yes,width=820,height=620,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(){
  //alert('Hey, we can actually see the popup scripts!');
  popLinks();
}