// Swap specified image source with source of specified image object
function imgSwap(sImgName, sImgVar) {
	if (document.images) {
		if (document.images[sImgName]) {
			document.images[sImgName].src = eval(sImgVar + ".src")
		}
	}
}

// Open Popup Window
var popupWindow = null;
function openPopup(location,width,height) {
	var sOptions = "toolbar=no,directories=no,status=no,scrollbars=no,resize=no,menubar=no";
	if (width != null ) {sOptions += ",width=" + width;}
	if (height != null ) {sOptions += ",height=" + height;}

	// Close window if it is open. This ensures that when re-opened, it is the correct size
	if (popupWindow != null) {
		if (popupWindow.closed != true) {
			popupWindow.close();
		}
	}

	if (navigator.userAgent.indexOf("Mozilla/2") != -1) {
		// NS 2.x Code
		popupWindow = window.open(location,"popupWindow",sOptions)
	} else {
		// V3 and up
		popupWindow = window.open("","popupWindow",sOptions)
		if (popupWindow.focus) {popupWindow.focus();}
		popupWindow.location=(location)
	}
}