		// an initValue. to be used by various functions
		// i.e. see: init() and setInitValue()
if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

		// used by popuplayer
		var overdiv="0";

		var initValue = false;

		var previousItemOriginalValue = false;
		var previousItemID = false;

		var popupLayerOriginalValue = false;
		var popupLayerOriginalStyle = false;

		var popup;
		var offsetEl;

		var objectCount = 0;

		// initialize variable for XML HTTP Request Object
		var XMLHttpRequestObject = false;

		/// for DEV use
		var ErrorCount = 0;
		var ErrorVar = "";

		function getQueryVariable(variable)
		{
		  var query = window.location.search.substring(1);
		  var vars = query.split("&");
		  for (var i=0;i<vars.length;i++)
		  {
			var pair = vars[i].split("=");
		
			if (pair[0] == variable)
			{
				return true;
			}
		  } 
		  return false;
		}

		// sets the innerHTML of the previously clicked ID
		// to it's original value
		// it also resets the "previous" variables to false
		// this function must be called BEFORE cacheDefaultValues
		function resetPreviousDiv()
		{
			//// alert('reset1: '+previousItemID);

			if (previousItemID !== false)
			{

				document.getElementById(previousItemID).innerHTML = previousItemOriginalValue;

			}

			previousItemOriginalValue = false;
			previousItemID = false;

			//// alert('reset2: '+previousItemID);
			return;
		}

		// caches the innerHTML of the previously clicked ID
		// this function must be called AFTER cacheDefaultValues
		function cacheDefaultValues(divID)
		{
			//// alert('cache1: '+previousItemID);

			//previousItemOriginalValue = false;
			//previousItemID = false;

			// because the "close" link attempts to reset the div ("previousItem"
			// it will cause an error in attempting to "Cache" the current div
			// therefore, a check of the current div to see if it's valid
			// this is done by the "getElementbyId" of the "divID"
			// if it DOES exist it will continue
			// else it will not
			if (previousItemID === false && document.getElementById(divID))
			{
				previousItemID = divID;
				previousItemOriginalValue = document.getElementById(divID).innerHTML;
			}
			//// alert('cache2: '+previousItemID);

			return;
		}

		// caches the innerHTML of the previously clicked ID
		// this function must be called AFTER cacheDefaultValues
		function cacheDefaultPopupLayer(divID)
		{
			popupLayerOriginalValue = false;
			popupLayerOriginalStyle = false;

			popupLayerOriginalValue = document.getElementById(divID).innerHTML;
			popupLayerOriginalStyle = document.getElementById(divID).style;

			return;
		}

		function checkForRequestObject()
		{
			var TempRequestObject = false;
			TempRequestObject = getRequestObject();
			if (!TempRequestObject)
			{
				document.cookie = 'xmlobject=failed;';
				delete TempRequestObject;
			}

			return;
		}

		function getRequestObject()
		{
			var RequestObject = false;
			try
			{
				// if it's *NOT* MS IE
				RequestObject = new XMLHttpRequest();

			}
			catch(err1)
			{
				try
				{
					// if it *IS* MS IE
					RequestObject = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(err2)
				{
					try
					{
						// if it *IS* MS IE
						RequestObject = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(err3)
					{
						RequestObject = false;
					}
				}
			}

			if (RequestObject !== false)
			{
				objectCount++;
			}
			//// alert(objectCount);
			return RequestObject;
		}


		// retrieves html for div to change / view
		function getData(scheme,divID, dataLocation, b_concatResponseValue)
		{
			if (divID !== false)
			{
				sendRequest(scheme, divID, dataLocation,b_concatResponseValue);
			}
		}


		// runs an update data script
		function updateData(scheme, dataLocation)
		{
				sendRequest(scheme, false, dataLocation);
		}

		// creates an XML HTTP Request Object and sends the request
		function sendRequest(scheme, divID, dataLocation, b_concatResponseValue) 
		{

			/// for DEV use
			// ErrorCount++;
			// ErrorVar+=ErrorCount+': calling getData\n';
			// alert('calling getData');

			var dataSource = dataLocation;
			initPopup();
			offsetEl = divID;

			if (!XMLHttpRequestObject)
			{
				// initialize variable for XML HTTP Request Object
				XMLHttpRequestObject = getRequestObject();
			}

			// if the XML HTTP Request Object is Valid
			if(XMLHttpRequestObject)
			{


				/// for DEV use
				// ErrorCount++;
				// ErrorVar+=ErrorCount+': sending xmlhttp request\n';
				// alert('sending xmlhttp request');

				// open a stream via GET to retrieve the data from "dataSource"
				// change to POST in the future
				XMLHttpRequestObject.open("POST", dataSource);
				XMLHttpRequestObject.setRequestHeader('Content-Type',
											'application/x-www-form-urlencoded'); 
	
				// on XML HTTP Request Object state change... set it to a function
				XMLHttpRequestObject.onreadystatechange =
							function(){requestResponse(scheme, divID, b_concatResponseValue);};

				// send request 
				// get is null but post should have value
				//	("post" value would be the get query string)
				XMLHttpRequestObject.send(scheme+'&amp;div='+divID); 

			}

			return;
		}



		function requestResponse(scheme, divID, b_concatResponseValue)
		{

			// if the state is 4 and the status is 200
			// see page 86 & 87 of AJAX for dummies for quick reference of
			// what these numbers mean
			if (XMLHttpRequestObject.readyState == 4
				&& XMLHttpRequestObject.status == 200)
			{

				/// for DEV use
				// ErrorCount++;
				// ErrorVar+=ErrorCount+': setting xmlhttp request response\n';
				// alert('setting xmlhttp request response');

				var responseValue = false;
				responseValue = XMLHttpRequestObject.responseText;

				if (scheme.indexOf('bib') == -1)
				{
					if (b_concatResponseValue === true)
					{
						// set the innerHTML of divID to the response from the XML request
						document.getElementById(divID).innerHTML += responseValue;
					}
					else
					{
						// resets the content of the "bodyTag" to it's inital value
						resetMediaObject(divID);

						// set the innerHTML of divID to the response from the XML request
						document.getElementById(divID).innerHTML = responseValue;
					}
				}
				else
				{
					//cacheDefaultPopupLayer(divID);

					showPopupLayer(responseValue);
				}
	
				// delete and reset the XML HTTP Request Object
				// this is so you do not have issues with running
				// multiple objects at once --- i.e. is someone doubleclicks
				//delete XMLHttpRequestObject;
				//XMLHttpRequestObject = null;

			} 
			return;

		}		// resets the quicktime media object to original div value

		function resetMediaObject(divID)
		{
			/// for DEV use
			// alert('media1: '+previousItemID);
	
			// "mediaEmbedObject" is the name / id within the actual
			// quicktime object / embed tag
			if (document.mediaEmbedObject)
			{
	
				// stop the quicktime object from playing
				if (document.mediaEmbedObject.Stop)
				{
					document.mediaEmbedObject.Stop();
				}

				delete document.mediaEmbedObject;
			}

			resetPreviousDiv();

			cacheDefaultValues(divID);

			/// for DEV use
			// alert('media2: '+previousItemID);

			return;
		}


function setOffsets()
{
	if (offsetEl.offsetWidth)
	{
		var end = offsetEl.offsetWidth;
		var top = calculateOffsetTop(offsetEl);

		/// IE has different positioning
		if (navigator.family == 'ie4')
		{
			popup.style.left = end + 393 + "px";
			popup.style.top = top - 325 + "px";
		}
		else
		{
			popup.style.left = end + 450 + "px";
			popup.style.top = top - 100 + "px";
		}
	}

	return;
}


function calculateOffsetTop(field)
{
	return calculateOffset(field, "offsetTop");
}

function calculateOffset(field, attr)
{
	var offset = 0;
	while (field)
	{
		offset += field[attr];
		field = field.offsetParent;
	}

	return offset;
}

function initPopup()
{
	popup = document.getElementById("popupLayer");

	return;
}

function clearPopup()
{

	/// for DEV use
	// ErrorCount++;
	// ErrorVar+=ErrorCount+': clearing popup layer\n';
	// alert('clearing popup layer');

	var ind = popup.childNodes.length;
	for (var i = ind - 1; i >=0; i--)
	{
		popup.removeChild(popup.childNodes[i]);
	}
	popup.style.border = "none";

	popup.style.display = 'none';
//	popup.style.height = 0;
//	popup.style.width = 0;
	if (popup.innerHTML != null)
	{
		popup.innerHTML = null;
	}

	return;
}

//// from roll over js
function showPopupLayer(newInnerHTML)
{
	clearPopup();
	setOffsets();


	/// for DEV use
	// ErrorCount++;
	// ErrorVar+=ErrorCount+': showing popup layer\n';
	// alert('showing popup layer');

	// set the innerHTML of divID to the response from the XML request
	var desc =
		//// TOP / HEADER ////
		//////////////////////
		'<div style="'
			+'position: relative; padding: 0; margin: 0; '
			//+'width: 325px; height: 23px; '
			//+getPngSrc('/images/popupImages/topcap_325.png', 'no-repeat')
			+'width: 325px; height: 26px; '
			+getPngSrc('/images/popupImages/ajax_window_top_26.png', 'no-repeat')
		+'">\n'

			/// CLOSE LINK ///
			//////////////////
			// this is a hack because safari does not remove the popup layer
			// as of build version 2.x 4.17.x --- fixed in 2.x 4.20.x
			+'<div style="'
				+'position: absolute; '
				+'height: 6px; '
				+'width: 36px; '
				+'right: 17px; '
				+'top: 14px; '
				+'font-size: 9px; '
				+'color: white; '
			+'">'
				+'<a href="#" style="color: inherit;" onClick="hidePopUpLayer();return false;">'
				//+'<span style="font-size: 5px; text-decoration: none;:hover{text-decoration: none;}">'
				//	+'x'
				//+'</span>'
				+'Close'
				+'<img src="/images/popupImages/close_button.png" '
					+'style="'
						+'position: relative; padding: 0; margin: 0; '
						//+'width: 325px; height: 26px; '
						+getPngSrc('/images/popupImages/close_button.png', 'no-repeat')
					+'"'
				+'>\n'
				+'</a>'
			+'</div>'
		+'</div>'

		//// INNER CONTENT ////
		///////////////////////
		+'<div style="'
			+'width: 325px; margin: 0; padding: 0; text-align: center; '
			//+getPngSrc('/images/popupImages/whitemiddle_325.png', 'repeat-y')
			+getPngSrc('/images/popupImages/ajax_window_middle_22.png', 'repeat-y')
			+'" '
			// this is a hack because safari does not remove the popup layer
			// as of build version 2.x 4.17.x --- fixed in 2.x 4.20.x
			+' onClick="hidePopUpLayer();"'
		+'>\n'

			+ '<div style="width: 297px; padding-top: 10px; padding-left: 14px;" align="center">\n'

				+newInnerHTML

			+'</div>\n'
		+'</div>\n'

		//// BOTTOM / FOOTER ////
		/////////////////////////
		+'<div style="'
//		+'padding: 0; margin: 0; width: 325px; height: 31px; '
//		+getPngSrc('/images/popupImages/bottomcap_325.png', 'no-repeat')
		+'padding: 0; margin: 0; width: 325px; height: 30px; '
		+getPngSrc('/images/popupImages/ajax_window_bottom_30.png', 'no-repeat')
		+'">\n'
		+'</div>'
	;

	popup.style.border = "none";
	popup.style.display = 'inline';
	popup.style.height = 'auto';
	popup.style.width = 'auto';
	popup.innerHTML = desc;

	return;

}

function getPngSrc(pngLocation, repeat)
{
	if (navigator.family == 'ie4')
	{
		var pngSrc = "filter:"+
				"progid:DXImageTransform.Microsoft.AlphaImageLoader"+
					"(enabled='true', "+
						"sizingMethod='scale', "+
						"src='"+pngLocation+"'); ";
	}
	else
	{
		var pngSrc =" background-image: url('"+pngLocation+"'); "+
				"background-repeat: "+repeat+"; ";
	}

	return pngSrc;
}

function hidePopUpLayer()
{
//	setTimeOut('clearPopup()', 10000);
	clearPopup();

	/// for DEV use
	// alert(ErrorVar);
	// alert('success');

	return;
}

/**
//  ########  TRACKS MOUSE POSITION FOR POPUP PLACEMENT
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e){
x = ((isNav) ? e.pageX : event.clientX + document.body.scrollLeft);
y = ((isNav) ? e.pageY : event.clientY + document.body.scrollTop)-150;
}
if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;
/**/	
	
	
////// what follows are old / unused functions //////////

/**
		// set and initial value of the "bodyTag"'s innerHTML
		function setInitValue()
		{

			//// alert(document.getElementById("bodyTag"));	

			// set "initValue" to the value from the "bodyTag"'s innerHTML
			// because of safari, this is placed just before the closing body tag
			initValue = document.getElementById("bodyTag").innerHTML;

		}
	
		function setToInitValue()
		{
	
			// "mediaEmbedObject" is the name / id within the actual
			// quicktime object / embed tag
			if (document.mediaEmbedObject)
			{
	
				// stop the quicktime object from playing
				if (document.mediaEmbedObject.Stop)
				{
					document.mediaEmbedObject.Stop();
				}

				delete document.mediaEmbedObject;
				document.mediaEmbedObject = false;
			}
			else if (mediaEmbedObject)
			{
				// stop the quicktime object from playing
				if (mediaEmbedObject.Stop)
				{
					mediaEmbedObject.Stop();
				}

				delete mediaEmbedObject;
				mediaEmbedObject = false;
			}

			// set the "bodyTag"'s innerHTML to the initValue
			//document.getElementById("bodyTag").innerHTML = initValue;


		}
/**/