C****************************************************************
C* 								*
C*								*
C*	DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY *
C*	EITHER FOR THE CREATION OR FOR THE CLINICAL EFFICACY	*
C*	OF THIS PROGRAM. USERS MUST ASSUME FULL RESPONSIBILITY	*
C*	FOR ANY RESULTS OR DIAGNOSES OBTAINED FROM THE USE	*
C*	OF THIS PROGRAM. QUESTIONS ON THE EXECUTION OF THIS	*
C*	PROGRAM MUST BE REFERRED BACK TO THE ORIGINAL AUTHOR.	*
C*								*
C* AUTHOR:	SALLY FORSTER					*
C*		C/O DEPARTMENT OF NUCLEAR MEDICINE		*
C*		GUY'S HOSPITAL				*
C*		LONDON, ENGLAND					*
C*								*
C*		TEL: 01-407-7600 EXT 2583/4			*
C*								*
C****************************************************************
	FUNCTION WINDOW(IP)
C*****DISPLAYS CURVE EXPANDED FROM N1 TO N2
	IMPLICIT LOGICAL*1(A)
	IMPLICIT INTEGER*2(D-Z)
	COMMON//SAVDES(256),CURVE1(512)
	COMMON/WINDOW/FST,LST
	IF(IP-2)20,10,600
10	IX2=INTPAR(2)
	GOTO 25
20	IX2=SAVDES(108)
25	IX1=INTPAR(1)
	IF(IX1.LT.1.OR.IX2.GT.SAVDES(108))GOTO 600
	IF(IX2.LT.IX1)GOTO 600
	FST=IX1
	LST=IX2
	WINDOW=0
	RETURN
600	WINDOW=-1
	RETURN
	END
