// This breaks the page out of frames from another site.

if (top.location != self.location) {
        top.location = self.location
}


// ON STATES //
if (document.images) {

  projecton = new Image();
  projecton.src = "images/nav/project_on.gif";

  abouton = new Image();
  abouton.src = "images/nav/about_on.gif";

  documentson = new Image();
  documentson.src = "images/nav/documents_on.gif";

  historyon = new Image();
  historyon.src = "images/nav/history_on.gif";

  communityon = new Image();
  communityon.src = "images/nav/community_on.gif";

 
// ON STATES //

  projectoff = new Image();
  projectoff.src = "images/nav/project.gif";

  aboutoff = new Image();
  aboutoff.src = "images/nav/about.gif";

  documentsoff = new Image();
  documentsoff.src = "images/nav/documents.gif";

  historyoff = new Image();
  historyoff.src = "images/nav/history.gif";

  communityoff = new Image();
  communityoff.src = "images/nav/community.gif";

}

function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "on.src");
  }
}

function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "off.src");
  }
}

// PRE-LOAD IMAGES //
function ImagePreLoad() {
  if (document.images) {

    preLoad1 = new Image();
    preLoad1.src = "images/nav/project_on.gif";

    preLoad2 = new Image();
    preLoad2.src = "images/nav/abouton.gif";

    preLoad3 = new Image();
    preLoad3.src = "images/nav/documents_on.gif";

    preLoad4 = new Image();
    preLoad4.src = "images/nav/history_on.gif";

    preLoad5 = new Image();
    preLoad5.src = "images/nav/community_on.gif";

   }
}
