

printLink = function() {
	if (document.getElementById("print-but")) {
		var printBut = document.getElementById("print-but");
		printBut.onclick=function() {
			if (window.print) {
				window.print();
			} else {
				alert("Unfortunately your browser doesn't support printing via Javascript.\nTo print this page please select \"File > Print...\" in your browser's menu.");
			}
			return false;
		}
	}
}
addBookmark = function() {
	if (document.getElementById("bookmark-but")) {
		var bookBut = document.getElementById("bookmark-but");
		bookBut.onclick=function() {
			if (document.all) {
				bookmarkurl=document.location;
				bookmarktitle="NRHS - Private Equity";
				window.external.AddFavorite(bookmarkurl,bookmarktitle);
			} else {
				alert("Unfortunately your browser doesn't support adding bookmarks via this link.\n\nTo bookmark this page please use your browser's menu.");
			}
			return false;
		}
	}
}

ieHover = function() {
	if (document.getElementById("hovers")) {
		var ieRows = document.getElementById("hovers").getElementsByTagName("tr");
		for (var i=0; i<ieRows.length; i++) {
			ieRows[i].onmouseover=function() {
				this.className+=" iehover";
			}
			ieRows[i].onmouseout=function() {
				this.className="";
			}
			ieRows[i].onclick=function() {
				var dest = this.getAttribute('id');
				document.location=dest;
			}
		}
	}
}
preHover = function() {
	if (document.getElementById("popups")) {
		var preLinks = document.getElementById("popups").getElementsByTagName("a");
		for (var i=0; i<preLinks.length; i++) {
			preLinks[i].onmouseover=function() {
				whatPopup = this.getAttribute("rel");
				document.getElementById(whatPopup).className="prehover";
			}
			preLinks[i].onmouseout=function() {
				whatPopup = this.getAttribute("rel");
				document.getElementById(whatPopup).className="preview";
			}
		}
	}
}
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

window.onload = function() {
	printLink();addBookmark();ieHover();preHover();externalLinks();
}