var newWin;
						
function openWin(sURL) {
	// Spawn a new window
	var fHeight, fWidth;
	fHeight = 0.8 * screen.availHeight;
	fWidth  = 0.8 * screen.availWidth;
	newWin = window.open(sURL,"Spawned_Win","width=" + fWidth + ",height=" + fHeight + ",resizable=yes,scrollbars=yes,status=no,toolbar=no,directories=no,menubar=no,location=no",true);
	newWin.focus();
}

function openSizedWin(iWidth, iHeight, sURL) {
	// Spawn a new window
	newWin = window.open(sURL,"Spawned_Win","width=" + iWidth + ",height=" + iHeight + ",resizable=yes,scrollbars=yes,status=no,toolbar=no,directories=no,menubar=no,location=no",true);
	newWin.focus();
}

function closeWin() {
	// Close the spawned window if it's open
	if (newWin != null) {
		newWin.close();
	}
}

function changeStatus(sMsg) {
	window.status = sMsg
	return true;
}
