/*  used for glossary terms */

function findLivePageWidth() {
	if (window.innerWidth != null)
		return window.innerWidth;
	if (document.body.clientWidth != null)
		return document.body.clientWidth;
	return (null);
}

function popUp(evt,objectID,changeY,whichEvent){
	if (isDHTML) { // Makes sure this is a DHTML browser
		var livePageWidth = findLivePageWidth();
		//alert(livePageWidth);
		domStyle = findDOM(objectID,1);
//		alert (domStyle);
		dom = findDOM(objectID,0);
		
		state = domStyle.visibility;
		if (dom.offsetWidth) elemWidth = dom.offsetWidth;
		else { if (dom.clip.width)	elemWidth = dom.clip.width; }
		if (whichEvent == 2)  { domStyle.visibility = "hidden"; }
		else if (state == "visible" || state == "show")  { domStyle.visibility = "hidden"; }
		else {
			if (evt.pageY) { //Calculates the position for Navigator 4 
				//was this originally--> topVal = evt.pageY + 10;
				topVal = evt.pageY - changeY;
				leftVal = evt.pageX - (elemWidth / 2); 
			}
			else { 
				if (evt.y) { // Calculates the position for IE4
					topVal = evt.y - changeY + document.body.scrollTop;
					leftVal = evt.x - (elemWidth / 2) + document.body.scrollLeft;
				}
			}
		/*If the element goes off the page to the left, this moves it back */
			if(leftVal < 2) { leftVal = 2; }
			else { 
				if ((leftVal + elemWidth) > livePageWidth) { leftVal = leftVal - (elemWidth / 2); }
			}
			domStyle.top = topVal; // Positions the element from the top
			//alert ( domStyle.top );	//928
			domStyle.left = leftVal; // Positions the element from the left
			//alert ( domStyle.left );	//2px
			domStyle.visibility = "visible"; // Makes the element visable 
		}
	}
}

function largerImg(evt,objectID){
	if (isDHTML) { // Makes sure this is a DHTML browser
		var livePageWidth = findLivePageWidth();
		//alert(livePageWidth);
		domStyle = findDOM(objectID,1);
		dom = findDOM(objectID,0);
		
		state = domStyle.visibility;
		if (dom.offsetWidth)
		{ 
			elemWidth = dom.offsetWidth;
			alert (elemWidth);
		}
		else { if (dom.clip.width)	elemWidth = dom.clip.width; }
		if (state == "visible" || state == "show")  { domStyle.visibility = "hidden"; }
		else {
			if (evt.pageY) { //Calculates the position for Navigator 4 
				topVal = evt.pageY + 4;
				leftVal = evt.pageX - (elemWidth / 2); 
			}
			else { 
				if (evt.y) { // Calculates the position for IE4
					topVal = evt.y + 4 + document.body.scrollTop;
					leftVal = evt.x - (elemWidth / 2) + document.body.scrollLeft;
				}
			}
		/*If the element goes off the page to the left, this moves it back */
			if(leftVal < 2) { leftVal = 2; }
			else { 
				if ((leftVal + elemWidth) > livePageWidth) { leftVal = leftVal - (elemWidth / 2); }
			}
			domStyle.top = topVal; // Positions the element from the top
			//alert ( domStyle.top );	//928
			domStyle.left = leftVal; // Positions the element from the left
			//alert ( domStyle.left );	//2px
			domStyle.visibility = "visible"; // Makes the element visable 
		}
	}
}


function Start(page)
{
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=800,height=550");
}


