﻿window.onload=function(){
Nifty("div#infomenu", "top");
Nifty("div#galleryhead", "top");
Nifty("div#displayArea", "big");
Nifty("div#contactbox", "transparent");
Nifty("div#topnav", "transparent");
Nifty("div#bottomnav", "transparent");
Nifty("div#bottomnav2", "transparent");
Nifty("div#textcont", "bottom");
Nifty("ul#split li","transparent");
Nifty("h3#general","transparent");
Nifty("h3#facebook","transparent");
banner();
links();
treeCollapse();
}

function swapPhoto(photoSRC,theCaption,theCredit) {

if (document.getElementById("caption")) {

	var theImage = document.getElementById("mainPhoto");
	var displayedCaption = document.getElementById("caption");
	var displayedCredit = document.getElementById("credit");
	var imgFolder = "images/";
	displayedCaption.firstChild.nodeValue = theCaption;
	displayedCredit.firstChild.nodeValue = theCredit;
	theImage.setAttribute("src", imgFolder+photoSRC);

    }
  }


//thanks to Imran Nazar for http://oopsilon.com/DOM-Manipulation-and-CSS-Trees
function treeCollapse(){
  var list = document.getElementById("listings").getElementsByTagName("li");
  for(var i=0;i<list.length;i++) list[i].className = "hide";
}

function toggle(x)
{
  x.className = (x.className=='show') ? 'hide' : 'show';
}
