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 PCKMRK(JJ)
C*****PICKS X,Y VALUES FROM THE CURVE
	IMPLICIT LOGICAL*1(A)
	IMPLICIT INTEGER*2 (D-Z)
	COMMON/SCREEN/AX(512),CYSCAL,CXSCAL,K,MM,CMA
	COMMON//SAVDES(256),CURVE1(512),CURVE2(512)
	COMMON/CH/F(4),CSR(20)
	COMMON/INPARA/CPAR(10)
	COMMON/WINDOW/FST,LST
	DATA AM,AR,AL,AJ/'M','R','L','J'/
	N=1
	J=INT(FLOAT(K)/2)
10	JJ=J+FST-1
	CY=CURVE1(JJ)
	IF(CY.GT.CMA)CY=CMA
	AY=INT(CY*CYSCAL)+1
	AX0=AX(J)
	CALL CROSS(AX0,AY,14,"77)
	CALL DISNO(FLOAT(JJ),3,19)
	CALL DISNO(CURVE1(JJ),3,20)
15	CALL TTG(ANS)
	IF(ANS.EQ.AM)GOTO 100
20	IF(ANS.NE.AR)GOTO 30
	N=1
	J=J+1
	GOTO 50
30	IF(ANS.NE.AL)GOTO 40
	N=-1
	J=J-1
	GOTO 50
40	IF(ANS.NE.AJ)GOTO 15
	J=J+10*N
50	IF(J.GT.K)J=K
	IF(J.LT.1)J=1
	CALL CROSS(AX0,AY,0,0)
	GOTO 10
100	CALL CROSS(AX0,AY,0,0)
	RETURN
	END
	SUBROUTINE CROSS(AX0,AY,IT,IC)
	IMPLICIT LOGICAL*1 (A)
	CALL PLOTB(AX0,AY+1,1,IT,IC)
	CALL PLOTB(AX0,AY-1,1,IT,IC)
	CALL PLOTB(AX0+1,AY,1,IT,IC)
	CALL PLOTB(AX0-1,AY,1,IT,IC)
	RETURN
	END
