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 = externalLinks;

var newWindow = '';


// Example of how to call this function: 
// <a href="javascript:;" onClick="openCustomWindow('quickCheck/QC_2.htm', 1052, 644)"><img src="images/buttonCheckOff.gif" name="quickCheck" alt="Completions" width="125" height="63" /></a>
// function also checks to see if window is already open.  If so, it brings it to front of other pages, if it had been hidden.
function openCustomWindow(targ, screenWidth, screenHeight){ 
	if (!newWindow.closed && newWindow.location){
		newWindow.location.href = targ;
	}
else{
		newWindow=window.open(targ,'Check','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + screenWidth + ',height=' + screenHeight + ',left=3,top=3');
		if (!newWindow.opener) newWindow.opener = self;
	}
	
	if (window.focus) {newWindow.focus()}
}

