// Anti-hijacking, break out of any containing frame:
if (self != top) { top.location.href = window.location.href; }

// Reveal images based on link that specifies image name & new image's url.
function swap(imageName,url) {
  if (document.images) {
     (document.images[imageName].src = url);
  }
}
// For href links used only for mouseover effects.
function myVoid() { }

function hideDiv(id) { // Hide a named div.
  document.getElementById(id).style.display = "none";
}
function showDiv(id) { // Hide, then show a named div.
  document.getElementById(id).style.display = "block";
  currDiv = id;       // Makes this div hide-able by other menu functions.
}

function swapDiv(id) {
  hideDiv(currDiv);
  showDiv(id);
  currDiv = id;
}

// Open new tabs/windows compliant with XHTML 1.0 Strict:
function externalLinks() {
 if (!document.getElementsByTagName) return;

 var anchors = document.getElementsByTagName("a"); // Array of all <a> tags on page.

 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external") // On page, must include rel="external" in the <a> tag.
     anchor.target = "_blank";
 }
}
window.onload = externalLinks; // Execute for every page that loads this file.
