function externalLinks() {
    host = (document.location + "").replace(/^(https?:\/\/)([^\/]+).*/i, "$2");

    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")) {
            if (anchor.getAttribute("rel") != "local") {
                if (anchor.getAttribute("rel") == "external") {
                    anchor.target = "_blank";
					if (! anchor.className) anchor.className = "external";
                } else {
                    hrefData = anchor.getAttribute("href").match(/^https?:\/\/([^\/]+).*/i); 
                    if (hrefData && hrefData[1] != host) {
                        anchor.target = "_blank";
						if (! anchor.className) anchor.className = "external";
					}
                }
            }
        }
    }

	return true;
}

function toggleDisplay(elementID) {
	e = document.getElementById(elementID);
	if (e) {
		if (e.style.display == 'none') {
			e.style.display = 'block';
		} else {
			e.style.display = 'none';
		}
	}	
}

