//legacy
function makePopup() {
		popupwin = window.open( "", "popup", "width=545,height=380,toolbar,location,status,menubar,scrollbars,resizable");
if (!popupwin.opener) popupwin.opener=self;
                popupwin.focus();
	}
	
	//  code by Alan Dix  © 2004   http://www.meandeviation.com/
//  you are free to use, copy, or distribute this code so long as this notice
//  is included in full and any modifications clearly indicated

function email_addr(name,host,isLink,otherName,subject) { //mod - added otherName for
	                                           //  when the link isn't the email address
                                                   // and optional subject variable
    var undefined;
	var email = name + "@" + host;
    var subj   = subject; // in format subject=text 
	if ( subj == undefined ) subj = "";
	if ( otherName == undefined ) otherName = "";
    if (  ! subj && otherName && otherName.match(/^subject=/) != null ) {
        subj = otherName;
        otherName = "";
    }
    if ( subj ) subj = "?" + subj;
    if (otherName)  { // mod - added this case
         isLink = 1; // must be live in this case  
         document.write("<a href=\"mailto:" + email + subj + "\">");
         document.write(otherName);
         document.write("</a>");
         document.close();
   }  else  {  //the rest is not modified
         if ( isLink ) document.write("<a href=\"mailto:" + email + subj + "\">");
         document.write(email);
         if ( isLink ) document.write("</a>");
         document.close();
   }
}

		
	var popup=0;

function openWindow(URL,winName,params) { //v2.0
  popup=window.open(URL,winName,params);
  if (!popup.opener)
   { popup.opener=self; }
  popup.focus();  
}


 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("class") == "external" ||
       anchor.getAttribute("class") == "enhance" ) )
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;
