window.onload = function() {
	prepareGallery();
	showPic(whichpic);
}



function prepareGallery() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById("junphots")) return false;
	var gallery = document.getElementById("junphots");
	var links = gallery.getElementsByTagName("a");
	for (var i=0; i<links.length; i++) {
		links[i].onmouseover = function() {
			return showPic(this);
		}
	}
}

function showPic(whichpic) {
	if (!document.getElementById("imageHolder")) return true;
	var source = whichpic.getAttribute("href");
	var placeholder = document.getElementById("largerimage");
	placeholder.setAttribute("src",source);
// Next two lines added to accept any image size and make them fit in placeholder.
	placeholder.setAttribute("width","500px");
	placeholder.setAttribute("height","375px");
	if (!document.getElementById("imageHolder")) return false;
	if (whichpic.getAttribute("title")) {
    	var text = whichpic.getAttribute("title");
  	} else {
    	var text = "";
 	}
	var description = document.getElementById("date");
	if (description.firstChild.nodeType == 3) {
		description.firstChild.nodeValue = text;
	}
	return false;
}


var min=12;
var max=26;
function biggerFont() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}


function smallerFont() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

/* I was going to alter this function to highlight cells that are moused-over on my calendar, and then expand to make the 
whole cell expand.  However, I was unable to even get the rows to bold so that will have to come later.  Instead, I used the hover
pseudo-class in my style sheet to alter the cells.  #month td:hover

function highlightRows() {
	if(!document.getElementsByTagName) return false;
	var rows = document.getElementsByTagName('tr');
	for (var i=0; i<rows.length; i++) {
		rows[i].onmouseover = function() {
			this.style.fontWeight = "bold";
		}
		rows[i].onmouseout = function() {
			this.style.fontWeight = "normal";
		}
	}
}
addLoadEvent(highlightRows);

*/