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";
 }
}

activateMenu = function(nav) {

/* currentStyle restricts the Javascript to IE only */
	if (document.all &&
 document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */

        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
        
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {   
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}
window.onload= function(){
    /* pass the function the id of the top level UL */

    /* remove one, when only using one menu */
    activateMenu('nav'); 
    /*activateMenu('vertnav'); */
    
    externalLinks();
}

function popup_window(winFile, winTitle, winWidth, winHeight) 
{
	var LeftPosition = (screen.width) ? (screen.width-winWidth)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-winHeight)/2 : 0;
	var w = window.open('', '','width='+winWidth+',height='+winHeight+',resizable=no,top='+TopPosition+',left='+LeftPosition+'');
	var d = w.document;
	d.open();
	d.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "+"\"http://www.w3.org/TR/html4/strict.dtd\">");
	d.writeln("<html><head><title>" +winTitle+ "<\/title>");
	d.writeln("<meta http-equiv=\"Content-Script-Type\" ","content=\"text/javascript\"><\/head>");
	d.writeln("<body style='margin:0px;padding:0px;'>")
	d.writeln("<div><img src='"+winFile+"' onclick='window.close();' /><\/div>");
	d.writeln("<\/body><\/html>");
	d.close();
}