window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		return false; 
	} 
	// create an array of objects of each link in the document 
	var popuplinks = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popuplinks.length; i++) {	
		// if the link has a class of "popup"...	
		if ((popuplinks[i].getAttribute("rel") == "popup") || (popuplinks[i].getAttribute("rel") == "popup java")) {	
			// add an onclick event on the fly to pass the href attribute and popup type
			popuplinks[i].onclick = function() {
				openPopUp(this.getAttribute("href"),this.getAttribute("rel"));
				return false;
			}
		}
	}
}

function openPopUp(linkURL,rel) {
		window.open(linkURL,'',getBrowserVars(rel))
}

function getBrowserVars(rel) {
  var sBrowser = navigator.userAgent;
  
  if (rel=="popup") { // WMP Window
	return 'width=750,height=430';
  }
  else {
	return 'width=750,height=550'; // All browsers display the flash player similarly.
  }
  
}