var sstatus='unset';
var defsclass='nsbox';

function sbox(eid,newclass,other) {

	var element = document.getElementById(eid);
	if(otherone)
		var otherone = document.getElementById(other);

	if(sstatus == eid) {
// must be the same option so toggle it off
// clear both menus if either is already set
            element.className=defsclass;
			if(otherone)
				otherone.className=defsclass; 
			sstatus='unset';
	}
	else {
		if (status != 'unset' ) {
// must be a different option clear and then set it
// clear both menus if either is already set
			element.className=defsclass; 
			if(otherone)
	    		otherone.className=defsclass;
				sstatus=eid;
				element.className=newclass;
			}
        	else 
// must be just turning an option on
        	{
        	    sstatus=eid;
        	    element.className=newclass;
        	}
	}
}   

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.className && anchor.className != '' && ( anchor.className == "external" || anchor.className.search("external") ) ) ) ) {
		anchor.target = "_blank";
	 }
 }
}

window.onload = externalLinks;

