function toggleLayer(whichLayer){     if (document.getElementById)     {          // this is the way the standards work          var style2 = document.getElementById(whichLayer).style;          style2.display = style2.display? "":"block";     }     else if (document.all)     {          // this is the way old msie versions work          var style2 = document.all[whichLayer].style;          style2.display = style2.display? "":"block";     }     else if (document.layers)     {          // this is the way nn4 works          var style2 = document.layers[whichLayer].style;          style2.display = style2.display? "":"block";     }}/*************************************************************************  This code is from Dynamic Web Coding at http://www.dyn-web.com/  Copyright 2001-3 by Sharon Paine   See Terms of Use at http://www.dyn-web.com/bus/terms.html  regarding conditions under which you may use this code.  This notice must be retained in the code as is!*************************************************************************/// resize fix for ns4var origWidth, origHeight;if (document.layers) {	origWidth = window.innerWidth; origHeight = window.innerHeight;	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }}var cur_lyr;	// holds id of currently visible layerfunction swapLayers(id) {  if (cur_lyr) hideLayer(cur_lyr);  showLayer(id);  cur_lyr = id;}function showLayer(id) {  var lyr = getElemRefs(id);  if (lyr && lyr.css) lyr.css.visibility = "visible";}function hideLayer(id) {  var lyr = getElemRefs(id);  if (lyr && lyr.css) lyr.css.visibility = "hidden";}function getElemRefs(id) {	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;	if (el) el.css = (el.style)? el.style: el;	return el;}// get reference to nested layer for ns4// from old dhtmllib.js by Mike Hall of www.brainjar.comfunction getLyrRef(lyr,doc) {	if (document.layers) {		var theLyr;		for (var i=0; i<doc.layers.length; i++) {	  	theLyr = doc.layers[i];			if (theLyr.name == lyr) return theLyr;			else if (theLyr.document.layers.length > 0) 	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)					return theLyr;	  }		return null;  }}function opacity(id, opacStart, opacEnd, millisec) {    //speed for each frame    var speed = Math.round(millisec / 100);    var timer = 0;    //determine the direction for the blending, if start and end are the same nothing happens    if(opacStart > opacEnd) {        for(i = opacStart; i >= opacEnd; i--) {            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));            timer++;        }    } else if(opacStart < opacEnd) {        for(i = opacStart; i <= opacEnd; i++)            {            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));            timer++;        }    }}//change the opacity for different browsersfunction changeOpac(opacity, id) {    var object = document.getElementById(id).style;    object.opacity = (opacity / 100);    object.MozOpacity = (opacity / 100);    object.KhtmlOpacity = (opacity / 100);    object.filter = "alpha(opacity=" + opacity + ")";} // Ralph's Stuff //function overThumb(idNum){    var id = "t"+idNum;    if ( currentThumb!=id )    {        /*var td = document.getElementById(id);        td.style.borderColor = overColor;        td.style.borderWidth = "2px";        td.style.padding = "0px";*/        setTdStyle(id, overColor, "2px", "0px");    }}function outThumb(idNum){    var id = "t"+idNum;    if ( currentThumb!=id )    {         /*var td = document.getElementById(id);        td.style.borderColor = outColor;        td.style.borderWidth = "1px";        td.style.padding = "1px";*/        setTdStyle(id, outColor, "1px", "1px");    }}function setTdStyle(_id, _color, _borderWidth, _padding){    var td = document.getElementById(_id);    td.style.borderColor = _color;    td.style.borderWidth = _borderWidth;    td.style.padding = _padding;}var IE = false;if (document.all) IE = true; // alert(IE);function clickedThumb(idNum){    var id = "t"+idNum;    isSlideShowRunning = false;    if ( currentThumb!="" )    {        // document.getElementById(currentThumb).style.borderColor = outColor;        /*var td = document.getElementById(currentThumb);        td.style.borderColor = outColor;        td.style.borderWidth = "1px";        td.style.padding = "1px";*/        setTdStyle(currentThumb, outColor, "1px", "1px");    }    currentThumb = id;    // document.getElementById(id).style.borderColor = highlightColor;    setTdStyle(id, highlightColor, "2px", "0px");    document.getElementById("CaptionBox").innerHTML = Caption[idNum];        // document.getElementById("PictureBox").src = preLoad[idNum].src;    if (IE)    {        document.images.PictureBox.style.filter="blendTrans(duration=.5)";        document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";        document.images.PictureBox.filters.blendTrans.Apply();    }    document.images.PictureBox.src = preLoad[idNum].src;    if (IE) document.images.PictureBox.filters.blendTrans.Play();}
