//////////////////////////////////////////
// function used to switch the medium sized image when a thumbnail is clicked
// based on the js image gallery script from Jeremy Keith
//////////////////////////////////////////
/* 
// not needed: replaced by switchPic
function showPic (whichpic) {
	if(document.getElementById) {
		document.getElementById("placeholder").src = whichpic.href;
		
		// to display caption below image:
		// create container on page and give it an id
		// create variable that contains the DB info you want to display
		// get that DB info from the href link
		// rewrite the value of that id value
		// then figure out a way to have IE6 & 7 actually do something for once
		// works great in FF, IE8 and Safari

		if (whichpic.getAttribute("title")) {
			var caption = whichpic.getAttribute("title");
			}
			
		if(navigator.appName == "Netscape") {	
			document.getElementById("description").innerHTML = caption;
			}
		
		else {	
			var description = document.getElementById("description");
			var x = document.createTextNode(caption);
			description.appendChild(x);
			// alert(x.nodeValue);

			}
		return false;
 		} 
	else {
		return true;
		}
	}
*/	
	
function switchPic(whichpic) {
  var source = whichpic.getAttribute("href");
  var linkid = whichpic.getAttribute("id");
  var title = whichpic.getAttribute("title");
  
  var placeholder = document.getElementById("placeholder");
  placeholder.setAttribute("src",source);
	// above this comment: all browsers are compliant
	

	if(linkid) {	
		// var text = document.getElementById("").innerHTML;		
		var text = title;
		}

	// cheap hack to get around IE 6 and 7 return false issue
	 if(navigator.userAgent.indexOf('MSIE') !=-1) {
		// do nothing or try this - bingo edith
		document.getElementById('caption').innerHTML = text;
		}
	else {
		// caption.firstChild.nodeValue = text;
		// alert(text);
		document.getElementById('caption').innerHTML = text;
		}


	}	
