XBHEDD2	;402,DJB,10/23/91,EDD - Screen prompt ; keeps track of pages
	;;4.0;XB;;Jul 20, 2009;Build 2
	;;David Bolduc - Togus, ME
TOP	S PAGETEMP=PAGE D ASK
	I Z1="B" S PAGETEMP=PAGE-1 D MOVE
	I Z1?1.N S PAGETEMP=Z1 D MOVE
	I Z1="I" S PAGETEMP=PAGE D ^XBHEDD3 Q:FLAGE  D MOVE
	I Z1="N" S PAGETEMP=PAGE D ^XBHEDD9 Q:FLAGE  D MOVE
	I Z1="?" S PAGETEMP=PAGE D ^XBHEDD14,MOVE
	Q:FLAGQ!FLAGE  I FLAGL,Z1="" Q
	S PAGE=PAGE+1,YCNT=1 W @IOF W:IO'=IO(0) !!! D HD
	Q
ASK	;
	S FLAGQ=0 I $Y'>SIZE F I=$Y:1:SIZE W !
	W !,$E(ZLINE,1,IOM),!," B=Backup  N=Node  I=Indiv Fld Sum  'num'=Jump(1 to TOP)",?57,"|",?69,"| TOP: ",PAGE
	W !," <RETURN>=Continue    ^=Quit    ^^=Exit    ?=Help",?57,"|",?69,"| CUR: ",PAGETEMP
	F I=1:1:18 W *8
	R "Select: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1
	S:$E(Z1)="0" Z1=+Z1 S:Z1["." Z1=Z1\1
	Q
MOVE	;
	W @IOF W:IO'=IO(0) !!! D HD S PAGETEMP=$S(PAGETEMP<1:1,PAGETEMP>PAGE:PAGE,1:PAGETEMP)
	S H="" F I=0:0 S H=$O(^UTILITY($J,"LIST",PAGETEMP,H)) Q:H=""  S ZZH=^UTILITY($J,"LIST",PAGETEMP,H) S ZONE=$P(ZZH,U),ZTWO=$P(ZZH,U,2),ZTHREE=$P(ZZH,U,3) W !?2,$J(ZONE,12),?17,$J(ZTWO,8),?28,ZTHREE
	D ASK Q:FLAGQ
	I Z1="B" S PAGETEMP=PAGETEMP-1 G MOVE
	I Z1?1.N S PAGETEMP=Z1 G MOVE
	I Z1="I" D ^XBHEDD3 Q:FLAGE  G MOVE
	I Z1="N" D ^XBHEDD9 Q:FLAGE  G MOVE
	I Z1="?" D ^XBHEDD14 G MOVE
	S PAGETEMP=PAGETEMP+1 Q:PAGETEMP>PAGE
	G MOVE
HD	;Heading
	W !?2,"NODE ; PIECE",?17,"FLD NUM",?48,"FIELD NAME",!?2,"------------",?17,"--------",?28,"-------------------------------------------------"
	Q
