function orcent, x, y, res, half=half, quart=quart, multi=multi, $
	thick=thick, linestyle=linestyle, erase=erase
;+
;   
;   Name:  orcent
;
;   Purpose: return fov center in macro pixels for observing region
;
;   Input Parameters:
;      x,y - observing region size (NX,NY) - (units of 64 pixels)
;      res - resolution of observing region desired
;   Keyword Paramters:
;      half -  if set, set res=2
;      quart - if set, set res=4
;
;   Calling Example:
;      (Assume FFI displayed in current window)
;
;   History: 
;      13-May-93 (SLF)
;       8-Nov-93 (SLF) add erase,thick,linestyle
;-
common or_cent_blk, cento, xo, yo, reso		;allow use of old values

case 1 of 
   keyword_set(half): res=2
   keyword_set(quart): res=4
   n_elements(res) eq 0: res=1
   else:
endcase

multi=keyword_set(multi)
resp=''
repeat begin
   if n_elements(x) eq 0 then x=1
   if n_elements(y) eq 0 then y=1
   nx=x*64/(2./res)
   ny=y*64/(2./res)

   if n_elements(cento) ne 0 then begin	; start where left off
      x=(cento(0)-(nx/2))
      y=cento(1)-(ny/2)
   endif
   box_cursor,x,y,nx,ny,init=n_elements(cento) ne 0,/fix
   cento=[x+(nx/2),y+(ny/2)]
   xo=x
   yo=y
   reso=res
   macro=reverse((cento/2)*[-1,1] + [256,0])	; macro pixels ns/ew order
   smacro=string(macro,format='(i3.0)')
   message,/info,'Macro Pixel Coords: ' + $
     smacro(0) + ' NS , ' + smacro(1) + ' EW
   if multi then begin
      read,'Enter new OR shape (x,y,r) or <cr> to quit>> ',resp
      resp=str2arr(strtrim(resp,2))
      if resp(0) ne '' then begin
         x=fix(resp(0))
         if n_elements(resp) gt 1 then y=fix(resp(1))
         if n_elements(resp) gt 2 then res=fix(resp(2))
      endif
   endif
endrep until resp(0) eq ''

if not keyword_set(erase) then begin
   if not keyword_set(thick) then thick=1
   if not keyword_set(linestyle) then linestyle=1
   plots,[x,x+nx,x+nx,x,x],[y,y,y+ny,y+ny,y],/device, thick=thick, $
	linestyle=linestyle
endif

return, macro
end

