// Function used to change button image on mouseover/mouseout.
	function changeImage(thisId,newImage) {
		var elem = document.getElementById(thisId);
		elem.src = newImage;
	}
	
// Function to simulate a button click when Enter key pressed in a form input field.
	function simClick(buttonId) {
		var elem = null;
		if(event.keyCode == 13) {
			event.cancelBubble = true;
			event.returnValue = false;
			elem = document.getElementById(buttonId);
			if(elem) {elem.click();}
		}
	}

// Function to bring up a centered pop-up window.
	function PopUpWin(filename,iWide,iHigh,yn) {
		var iLeft;
		var iTop;
		//half the screen width minus half the new window width (plus 5 pixel borders).
		iLeft = (window.screen.width/2) - (iWide/2 + 5);
		//half the screen height minus half the new window height (plus borders and title bar).
		iTop = (window.screen.height/2) - (iHigh/2 + 20);
		//Open the window.
		var win2 =
window.open(filename,'Window2','status=no,width='+iWide+',height='+iHigh+',resizable=yes,left='+iLeft+',top='+iTop+',screenX='+iLeft+',screenY='+iTop+',toolbar=no,menubar=no,scrollbars='+yn+',location=no,directories=no');
		win2.focus();
	}

// Function to bring up a modal pop-up window.
	function PopUpModWin(filename,iWide,iHigh) {
		window.showModalDialog(filename,'Window2','dialogWidth:'+iWide+'px;dialogHeight:'+iHigh+'px;center:yes;scroll:no;')
	}

