	pro ssrt_map_view_convert,x,index

common ssrt_map_view,a,ID,header0,header1,Image0,Image_curr0,Image1,Image_curr1


p=convert_coord(x(0),x(1),/dev,/to_data)

Rect=string((x-a.Centre(index,*))(0)/a.R(index),	$
	(x-a.Centre(index,*))(1)/a.R(index), $
	format="(F5.2,', ',F5.2)")

WIDGET_CONTROL,ID.Coord(index),set_val=Rect
WIDGET_CONTROL,ID.Rect(index),set_val=Rect

radius=1./a.R(index)*	$
	sqrt(((x-a.Centre(index,*))(0))^2+((x-a.Centre(index,*))(1))^2)

if radius lt 1 then Dist=asin(radius)*!radeg else Dist=90.
Dist=string(Dist,format="(F5.2)")+' deg'
WIDGET_CONTROL,ID.Dist(index),set_val=Dist

if a.map eq 0 then return

	if p(0) lt 0 then dirX='E' else dirX='W'
	if p(1) lt 0 then dirY='S' else dirY='N'

Helio=string(dirX,abs(p(0)),dirY,abs(p(1)),format="(A1,F4.1,', ',A1,F4.1)")
WIDGET_CONTROL,ID.Helio(index),set_val=Helio

if index then SUN=a.SUN1 else SUN=a.SUN0

		if n_tags(a) gt 9 then begin
Klong=p(0)+SUN.Karr*!radeg
Klong=(Klong+360*(Klong lt 0)) mod 360
Karr=string(Klong,p(1),format="(F5.1,', ',F5.1)")
WIDGET_CONTROL,ID.Karr(index),set_val=Karr
		endif

Helio=strcompress(Helio,/rem)
Karr=strcompress(Karr,/rem)
Rect=strcompress(Rect,/rem)
Dist=strcompress(Dist)

text=string(' ',format= $
"(a1,'"+a.Date+"',T12,'"+a.Time+"',T26,'"+Helio+"',T39,'"+Karr+"',T52,'"+Rect+"',T65,'"+Dist+"')")

ID.number=ID.number+1

ID={win:ID.win,Karr:ID.Karr,Helio:ID.Helio,Rect:ID.Rect,Dist:ID.Dist, $
	Date:ID.Date,Time:ID.Time,View:ID.View,Coord:ID.Coord,Data:ID.Data, $
	linestyle:ID.linestyle,color:ID.color, group_leader:ID.group_leader, $
	Text:ID.Text, Save_button:ID.Save_button, $
	Save:ID.Save, Filename:ID.Filename, number:ID.number,  $
	Name:ID.Name, Results:[ID.Results,text], path:ID.path}

	end


	pro ssrt_map_view_event,ev

common ssrt_map_view,a,ID,header0,header1,Image0,Image_curr0,Image1,Image_curr1

		for k=0,1 do begin

	if ev.id eq ID.View(k) then begin

if ev.press then a.press=1
if ev.release then a.press=0

if k then Sc=a.Sc1 else Sc=a.Sc0

Window_set,ID.win(k),scale=Sc

p=convert_coord(ev.x,ev.y,/dev,/to_data)

WIDGET_CONTROL,ID.Coord(k),set_val= $
	string((ev.x-a.Centre(k,0))/a.R(k),(ev.y-a.Centre(k,1))/a.R(k), $
		format="(F5.2,', ',F5.2)")
x=[ev.x,ev.y]

	if a.press then ssrt_map_view_convert, x, k

return
	endif

		endfor

	;if ev.id eq ID.View(1) then return


WIDGET_CONTROL,ev.id,GET_UVALUE = uv

	CASE uv.Name OF

"DONE":		begin
WIDGET_CONTROL,ev.top,/DESTROY,/hour

	if ID.Save then begin
openw,Lun,ID.Filename,/get_lun
printf,Lun,ID.Results
free_lun,Lun
	endif

		if ID.group_leader ne 0L then begin
if WIDGET_INFO(ID.group_leader,/valid) then $
	WIDGET_CONTROL,ID.group_leader,/show
		endif

!P=a.P
a=(ID=0)

	end

"Xloadct":	begin
	widget_control,/hour
		Xloadct
		end

"Header":	begin
	widget_control,/hour
if uv.index then xtext,text=header1 else xtext,text=header0
		end

"Calculator":	begin
	widget_control,/hour
	wcalc
		end


"Load":	begin
	index=-1

   filnam=pickfile(/read,path=ID.path,filt='*.fit *.fts')

	if filnam eq '' then return

ID.path=subdir(filnam)

	widget_control,/hour

x=rfits(filnam,index=fnum,key_struct=hstruc,header=head,error=err, $
               user_struct=ustruc,date_obs=date,time_obs=time)

Szx=size(x)
factor=float(!d.x_size)/Szx(1)

if uv.index then header1=head else header0=head

;day=strmid(date,3,2)
;if strmid(day,0,1) eq ' ' then strput,day,'0',0
;month=strmid(date,0,2)
;if strmid(month,0,1) eq ' ' then strput,month,'0',0

;date=day+' '+month+' '+strmid(date,6,2)

day=strmid(date,0,2)
if strmid(day,0,1) eq ' ' then strput,day,'0',0
month=strmid(date,3,2)
if strmid(month,0,1) eq ' ' then strput,month,'0',0

date=day+' '+month+' '+strmid(date,6,2)

	CASE !version.OS OF

'windows':	Delim='\'

'Win32':	Delim='\'

ELSE:		Delim='/'

	ENDCASE


Name=getenv('astr_data')+Delim+'sol'+strmid(a.Date,6,2)+'.dat'

WIDGET_CONTROL,ID.Date(uv.index),set_value=Date,/hour
WIDGET_CONTROL,ID.Time(uv.index),set_value=Time

suneph,date,time,SUN

text_data=pr_sun(SUN, /si)
for j=0,8 do WIDGET_CONTROL,ID.Data(uv.index,j),set_val=text_data(j)


Radius=fh_r_key(head,'radius', error=error)
if error then Radius=SUN.R*!radeg*60

X_origin=fh_r_key(head,'x-origin', error=error)
Y_origin=fh_r_key(head,'y-origin', error=error)
X_cent=fh_r_key(head,'center-X', error=error)
Y_cent=fh_r_key(head,'center-Y', error=error)
X_obs=fh_r_key(head,'X-obs', error=error)
Y_obs=fh_r_key(head,'Y-obs', error=error)
P0=fh_r_key(head,'P0', error=error)

a.R(uv.index)=Radius*Szx(1)/X_obs*factor

a.Centre(uv.index,*)=	[(X_cent-X_origin)/X_obs*!d.x_size, $
		 (Y_cent-Y_origin)/Y_obs*!d.y_size]

!x.style=(!y.style=1)

!x.range=[-1,1]*0.5*!d.x_size/a.R(uv.index)
!y.range=[-1,1]*0.5*!d.y_size/a.R(uv.index)


origin=strtrim(fh_r_key(head,'origin', error=error, /char),2)

if origin eq 'BADARY' then Angle=SUN.DP*!Radeg else Angle=0

x=rot(x, Angle, 1, a.Centre(uv.index,0)/factor, a.Centre(uv.index,1)/factor)

wset,ID.Win(uv.index)
erase

if factor ne 1 then x=congrid(x,!d.x_size,!d.y_size)

tvscl,x




temp=!p.color		&	!p.color=ID.color

map_set,SUN.B0*!Radeg,0,-SUN.DP*!Radeg*0,/ortho,/nobor,/grid,/lab, $
	glinestyle=ID.linestyle,Xmar=[0,0],Ymar=[0,0], $
		latdel=10,londel=10,col=ID.color,/noerase

		!p.color=temp

!x.style=(!y.style=(!x.range=(!y.range=0)))


;plotline,-tan(SUN.Dp),[1,1]*0.5*!d.x_vsize,lines=ID.linestyle,/dev

;plots,[1,1]/2.*!d.x_vsize,[0,!d.x_vsize], $
;	/dev,linestyle=ID.linestyle,col=ID.color
;plots,[0,!d.x_vsize],!d.x_vsize/2.*[1,1], $
;	/dev,linestyle=ID.linestyle,col=ID.color

Scale,temp,/mem

if uv.index then a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
	SUN0:a.SUN0, SUN1:SUN, press:a.press, map:1, Sc1:temp, Sc0:a.Sc0} else $
		a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
	SUN0:SUN, SUN1:a.SUN1, press:a.press, map:1, Sc0:temp, Sc1:a.Sc1}

empty


		end



"Date":		begin
WIDGET_CONTROL,ev.id,get_value=temp
	a.Date=strtrim(strcompress(temp(0)),2)

	CASE !version.OS OF

'windows':	Delim='\'

'Win32':	Delim='\'

ELSE:		Delim='/'

	ENDCASE

Name=getenv('astr_data')+Delim+'sol'+strmid(a.Date,6,2)+'.dat'

if (findfile(Name))(0) eq '' then begin
WIDGET_CONTROL,ev.id,set_value='incorrect'
return
endif


WIDGET_CONTROL,ev.id,set_value=a.Date,/hour
	if n_tags(a) gt 9 then begin
if uv.index then SUN=a.SUN1 else SUN=a.SUN0
	endif
	if a.time ne '' then begin
suneph,a.date,a.time,SUN

text_data=pr_sun(SUN, /si)
for j=0,8 do WIDGET_CONTROL,ID.Data(0,j),set_val=text_data(j)


map_set,SUN.B0*180/!Pi,0,0,/ortho,/nobor,/grid,/lab, $
	glinestyle=ID.linestyle,Xmar=[0,0],Ymar=[0,0], $
		latdel=10,londel=10,col=ID.color

plotline,-tan(SUN.Dp),[1,1]*0.5*!d.x_vsize,lines=ID.linestyle,/dev

plots,[1,1]/2.*!d.x_vsize,[0,!d.x_vsize], $
	/dev,linestyle=ID.linestyle,col=ID.color
plots,[0,!d.x_vsize],!d.x_vsize/2.*[1,1], $
	/dev,linestyle=ID.linestyle,col=ID.color

Scale,temp,/mem


if uv.index then a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
  SUN0:a.SUN0, SUN1:SUN, press:a.press, map:1, Sc1:temp, Sc0:a.Sc0} else $
		a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
  SUN0:SUN, SUN1:a.SUN1, press:a.press, map:1, Sc0:temp, Sc1:a.Sc1}


empty

	endif

WIDGET_CONTROL,ID.Time(0),/input
		end

"Time":		begin

WIDGET_CONTROL,ev.id,get_value=temp
	a.time=strtrim(strcompress(temp(0)),2)
WIDGET_CONTROL,ev.id,set_value=a.time,/hour

	if n_tags(a) gt 9 then begin
if uv.index then SUN=a.SUN1 else SUN=a.SUN0
	endif
	if a.date ne '' then begin
suneph,a.date,a.time,SUN

text_data=pr_sun(SUN, /si)
for j=0,8 do WIDGET_CONTROL,ID.Data(0,j),set_val=text_data(j)

	if not(a.map) then begin

map_set,SUN.B0*180/!Pi,0,0,/ortho,/nobor,/grid,/lab, $
	glinestyle=ID.linestyle,Xmar=[0,0],Ymar=[0,0], $
		latdel=10,londel=10,col=ID.color

plotline,-tan(SUN.Dp),[1,1]*0.5*!d.x_vsize,lines=ID.linestyle,/dev

plots,[1,1]*!d.x_vsize/2.,[0,!d.x_vsize], $
	/dev,linestyle=ID.linestyle,col=ID.color
plots,[0,!d.x_vsize],!d.x_vsize/2.*[1,1], $
	/dev,linestyle=ID.linestyle,col=ID.color
Scale,temp,/mem
if uv.index then a.Sc1=temp else a.Sc0=temp

	endif


if uv.index then a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
  SUN0:a.SUN0, SUN1:SUN, press:a.press, map:1, Sc1:temp, Sc0:a.Sc0} else $
		a={P:a.P, Date:Date, time:time, R:a.R, Centre:a.Centre, $
  SUN0:SUN, SUN1:a.SUN1, press:a.press, map:1, Sc0:temp, Sc1:a.Sc1}


empty
	endif
		end

"Helio":	begin
	WIDGET_CONTROL,ev.id,GET_V=b

if (b(0) eq '') and n_elements(b) gt 1 then b=b(1:*)

b=strlowcase(strcompress(b(0),/rem))

i1=strpos(b,',')
i2=strlen(b)

lon=float(strmid(b, 1, i1-1))
lat=float(strmid(b, i1+2, i2-i1-2))

lonsign=strmid(b,0,1)
latsign=strmid(b,i1+1,1)

if lonsign eq 'e' or lonsign eq '-' then lon=-lon
if latsign eq 's' or latsign eq '-' then lat=-lat

Coord=convert_coord(lon,lat,/to_dev,/data)

	if Coord(0) le !d.x_size and Coord(1) le !d.y_size then begin
if uv.index then Sc=a.Sc1 else Sc=a.Sc0

Window_set,ID.win(uv.index),scale=Sc
tvcrs,lon,lat,/data
ssrt_map_view_convert,Coord,uv.index
	endif else begin
WIDGET_CONTROL,/hour
xwarning, 'These coordinates are not allowed'
	endelse

	end

"Karr":	if n_tags(a) lt 10 then begin
WIDGET_CONTROL,/hour
xwarning, 'First of all please enter date and time'
return
	endif else begin

	WIDGET_CONTROL,ev.id,GET_V=b

if (b(0) eq '') and n_elements(b) gt 1 then b=b(1:*)

b=strlowcase(strcompress(b(0),/rem))

i1=strpos(b,',')
i2=strlen(b)

if uv.index then SUN=a.SUN1 else SUN=a.SUN0

lon=float(strmid(b, 0, i1))-SUN.Karr*!radeg
lat=float(strmid(b, i1+1, i2-i1))

Coord=convert_coord(lon,lat,/to_dev,/data)

	if Coord(0) le !d.x_size and Coord(1) le !d.y_size then begin

if uv.index then Sc=a.Sc1 else Sc=a.Sc0

Window_set,ID.win(uv.index),scale=Sc
tvcrs,lon,lat,/data
ssrt_map_view_convert,Coord,uv.index
	endif else begin
WIDGET_CONTROL,/hour
xwarning, 'These coordinates are not allowed'
	endelse

	endelse


"Rect":		begin

	WIDGET_CONTROL,ev.id,GET_V=b

if (b(0) eq '') and n_elements(b) gt 1 then b=b(1:*)

b=strlowcase(strcompress(b(0),/rem))

i1=strpos(b,',')
i2=strlen(b)

x=float(strmid(b, 0, i1))
y=float(strmid(b, i1+1, i2-i1))

	if (x^2+y^2) le 1 then begin

;x=x*a.R/2.+a.Centre(0)
;y=y*a.R/2.+a.Centre(1)
x=x*a.R(uv.index)+a.Centre(uv.index,0)
y=y*a.R(uv.index)+a.Centre(uv.index,1)

if uv.index then Sc=a.Sc1 else Sc=a.Sc0

Window_set,ID.win(uv.index),scale=Sc
tvcrs,x,y,/dev
ssrt_map_view_convert,[x,y],uv.index

	endif else begin

WIDGET_CONTROL,/hour
xwarning, 'These coordinates are not allowed'

	endelse

		end

"Clear":		begin
WIDGET_CONTROL,ID.Coord(0),set_val=''
WIDGET_CONTROL,ID.Rect(0),set_val=''
WIDGET_CONTROL,ID.Helio(0),set_val=''
WIDGET_CONTROL,ID.Karr(0),set_val=''
WIDGET_CONTROL,ID.Dist(0),set_val=''

		end

"Save":	begin
ID.Save=ev.select

if ID.Save then Name=ID.Filename else Name=''
WIDGET_CONTROL,ID.Name,set_val=Name
	end

"List":	begin
WIDGET_CONTROL,/hourglass
xtext,text=ID.Results
	end

"Name":		begin
WIDGET_CONTROL,ID.Name,get_val=temp
ID.Filename=temp(0)
		end

ELSE:

	ENDCASE


	end



	pro ssrt_map_view,group_leader=group_leader,SUN=SUN, $
modal=modal,Date,Time

common ssrt_map_view,a,ID,header0,header1,Image0,Image_curr0,Image1,Image_curr1

loadct,3

if xregistered('ssrt_map_view') then return

header=''

if n_elements(group_leader) le 0 then group_leader=0L
if n_elements(modal) le 0 then modal=0
if n_params() eq 2 then suneph,Date,Time,SUN
if n_elements(Date) le 0 then Date=''
if n_elements(Time) le 0 then Time=''


	WIDGET_CONTROL,/hour
M=strlowcase(findfile('vga_drv.rcg'))
	if equiv(M,'') then M=1 else begin
openr,lun,'vga_drv.rcg',/get_lun
readf,lun,M
free_lun,lun
	endelse		;M=0 for L-310 else M=1 (to plot lines with various styles)

LA=lonarr(2)

ID={win:LA, Karr:LA, Helio:LA, Rect:LA, Dist:LA, $
	Date:LA, Time:LA, View:LA, Coord:LA, Data:lonarr(2,9), $
	linestyle:M,color:60B, group_leader:group_leader,Text:'', $
	Save_button:0L, Save:0, Filename:'', number:0L, Results:strarr(4), $
	Name:0L, path:getenv('optics_dir')}

device,get_screen_size=screen

Ax={Axes, x:{!Axis}, y:{!Axis}, z:{!Axis}, map:!Map}

R=200

S={SOL_EPHEMERIDE, Current_date:strarr(4), Date:'', Time:'', H:0.d0, $
Decl:0.d0, W0:0.d0, Tcul:0.d0, R:0.d0, Dp:0.d0, B0:0.d0, Karr:0.d0}


if n_elements(SUN) le 0 then SS=S else SS=SUN

	a={P:!P, Date:Date, Time:Time, R:[R,R], Centre:fltarr(2,2), $
		press:0, map:0, SUN0:SS, SUN1:SS, Sc0:Ax, Sc1:Ax}

Ax=0

!P.color=0
!P.background=255b

Mainbase=widget_base(/colu, tit='Viewer for SSRT maps', $
	group_leader=group_leader)

Menubase=widget_base(Mainbase,/row)

button=widget_button(MenuBase,val='DONE', uval={Name:"DONE"})

button=widget_button(MenuBase,val='File', /menu)

junk=widget_button(button,val='Left', /menu)
junk1=widget_button(junk,val='Load', uval={Name:"Load", index:0})
junk1=widget_button(junk,val='Header', uval={Name:"Header", index:0})
junk1=widget_button(junk,val='Save results', uval={Name:"Save", index:0})

junk=widget_button(button,val='Right', /menu)

junk1=widget_button(junk,val='Load', uval={Name:"Load", index:1})
junk1=widget_button(junk,val='Header', uval={Name:"Header", index:1})
junk1=widget_button(junk,val='Save results', uval={Name:"Save", index:1})


button=widget_button(MenuBase,val='Tools', /menu)
junk=widget_button(button,val='List', uval={Name:"List"})
junk=widget_button(button,val='Clear', uval={Name:"Clear"})
junk=widget_button(button,val='Palette', uval={Name:"Xloadct"})
junk=widget_button(button,val='Calculator', uval={Name:"Calculator"})
junk=widget_button(button,val='Parameters of SSRT', uval={Name:"Parameters"})
junk=widget_button(button,val='Heiocentric', uval={Name:"Heliocentric"})
junk=widget_button(button,val='Geocentric', uval={Name:"Geocentric"})
junk=widget_button(button,val='XManager Tool', uval={Name:"XMTool"})

junk=widget_button(button,val='Shell', /menu)
junk1=widget_button(junk,val='OS', uval={Name:"DOS"})
junk1=widget_button(junk,val='NC', uval={Name:"NC"})
junk1=widget_button(junk,val='VC', uval={Name:"VC"})
junk1=widget_button(junk,val='Archiver', uval={Name:"Archiver"})


Savebase=widget_base(Menubase,/row,/nonexcl,/frame)

Save_button=widget_button(Savebase,val='Save results',uval={Name:'Save'})

ID.Filename=newfilename(filter='*.lst',model='coord')

label=WIDGET_LABEL(Menubase,val='File: ')

ID.Name=WIDGET_Text(Menubase,val='',/edit,uval={Name:'Name'},/fra, xsi=15)

WIDGET_CONTROL,Save_button,set_but=ID.save


Rowbase=widget_base(Mainbase,/row)
Drawbase=[0L, 0L]

device,get_scr=scr

	CASE 1 OF

scr(0) lt 800:	drawsize=300
scr(0) eq 800:	drawsize=380
(scr(0) gt 800) and (scr(0) lt 1000):	drawsize=400
scr(0) gt 1000:	drawsize=500

	ENDCASE

Ncrdb=5


	for k=0,1 do begin
Drawbase(k)=widget_base(Rowbase,/colu)

CoordBase=lonarr(Ncrdb)

TimeBase=widget_base(Drawbase(k),/row)

label=WIDGET_LABEL(TimeBase,val=' Date ')
ID.Date(k)=WIDGET_TEXT(TimeBase,xsi=10,/fra,/edit,uval={Name:'Date', index:k})
label=WIDGET_LABEL(TimeBase,val=' Time ')
ID.Time(k)=WIDGET_TEXT(TimeBase,xsi=10,/fra,/edit,uval={Name:'Time', index:k})
label=WIDGET_LABEL(TimeBase,val=' UT ')

button=WIDGET_BUTTON(TimeBase, /menu,val='Ephemeride')
for j=0,8 do ID.Data(k,j)=widget_button(button,val=' ',uval={Name:' '})

AuxRowBase=widget_base(Drawbase(k),/row)


	for j=0,Ncrdb-1 do CoordBase(j)=widget_base(AuxRowBase,/colu)


label=WIDGET_LABEL(CoordBase(0),val='Heliograph.')
ID.Helio(k)=WIDGET_TEXT(CoordBase(0),xsi=12,/fra,/edit,	$
	uval={Name:'Helio', index:k})

label=WIDGET_LABEL(CoordBase(1),val="Karringt.")
ID.Karr(k)=WIDGET_TEXT(CoordBase(1),xsi=10,/fra,/edit,	$
	uval={Name:'Karr', index:k})

label=WIDGET_LABEL(CoordBase(2),val='Rectang.')
ID.Rect(k)=WIDGET_TEXT(CoordBase(2),xsi=10,/fra,/edit,	$
	uval={Name:'Rect', index:k})

label=WIDGET_LABEL(CoordBase(3),val='Distance')
ID.Dist(k)=WIDGET_TEXT(CoordBase(3),xsi=10,/fra,uval={Name:' '})


ID.View(k)=widget_draw(Drawbase(k),xsi=drawsize,ysi=drawsize,/button,/motion, $
	retain=2,/frame)
ID.Coord(k)=WIDGET_LABEL(Drawbase(k),val='                        ')
	endfor

WIDGET_CONTROL,Mainbase,/REALIZE,/HOUR

	for j=0,1 do begin
WIDGET_CONTROL,ID.View(j),GET_VALUE=temp
ID.Win(j)=temp
wset,ID.win(j)
erase,255
	endfor

	for k=0,1 do begin

wset,ID.win(k)

if n_elements(SUN) le 0 then plot,indgen(10),/nod,xst=4,yst=4 else begin

text_data=pr_sun(SUN, /si)
for j=0,8 do WIDGET_CONTROL,ID.Data(k,j),set_val=text_data(j),/hour

map_set,SUN.B0*180/!Pi,0,0,/ortho,/nobor,/grid,/lab, $
	glinestyle=ID.linestyle,Xmar=[0,0],Ymar=[0,0], $
		latdel=10,londel=10,col=ID.color

plotline,-tan(SUN.Dp),[1,1]*!d.x_vsize*0.5,lines=ID.linestyle,/dev

plots,[1,1]*0.5*!d.x_vsize,[0,!d.x_vsize], $
	/dev,linestyle=ID.linestyle,col=ID.color
plots,[0,!d.x_vsize],[1,1]*0.5*!d.x_vsize, $
	/dev,linestyle=ID.linestyle,col=ID.color

a.map=1

WIDGET_CONTROL,ID.Time,set_val=SUN.Time
WIDGET_CONTROL,ID.Date,set_val=SUN.Date

	endelse

a.Centre=[1,1]#[1,1]*0.5*!d.x_vsize
a.R=[1,1]*0.5*!d.x_vsize

Scale,temp,/mem
if k then a.Sc1=temp else a.Sc0=temp

	     endfor


empty

text0=string(' ',format="(a1,T10,'Coordinates issued by the program ssrt_map_view')")
text1=string(' ',format= $
	"(a1,T5,'Date',T15,'Time',T25,'Helio',T39,'Karringt.',T50,'Rect. Norm.',T65,'Ang. dist.')")

ID.Results=[text0,'',text1,'']

xmanager,'ssrt_map_view',Mainbase,modal=modal
end