;+
; Project     :	SOHO - CDS
;
; Name        :	MK_CDS_COM
;
; Purpose     :	Common blocks for MK_CDS_PLAN
;
; Explanation : See purpose
;
; Use         : N.A.
;
; Inputs      :	None.
;
; Opt. Inputs :	None.
;
; Outputs     :	None.
;
; Opt. Outputs:	None.
;
; Keywords    :	None.
;
; Calls       :	None.
;
; Called from :	N.A.
;
; Common      :	Itself
;
; Restrictions:	None.
;
; Side effects:	None.
;
; Category    :	Planning, science
;
; Prev. Hist. :	None.
;
; Written     :	Dominic Zarro (ARC), 1 October 1994.
;
;-

common mk_cds_com0,sav_db,notes,disturbances,purb,undb,obs_prog,messenger,$
 movb,remb,insb,repb,dumpb,appb,copb,addb,gmov,mmov,ebase,cbase,swapb,swap,$
 sbase,dbase,mk_cds_draw,zoom_info,get_raw_id,flag_base,flag_master,flag_type,$
 repoint_base,repoint,rmode,mk_study,get_study,gset_base,gset_id,swap_base,$
 zmode,pmode,n_rasters,pslider,rslider,n_pointings,e_pointings,ins_x,ins_y,zbase

common mk_cds_com4,details,plan,hplan,sel_study,new_study,$
 sdb_details,s_hplan,sdb_empty,itime,type,win_ed,last_purge,nocolor,$
 last_ctime,ctime,insert_on,etime,last_etime,first_time,$
 last_lpos,last_rpos,mk_plan_crash,last_details,stc_color,$
 pindex,rindex,last_stime,custom_stc, ptype_bt,rule_but,rule_on,$
 last_epos,last_spos,last_cpos,updated,xsize,ysize,detached

common mk_cds_com2,mk_cds_base,nrastb,savb,listb,get_sci,zbutt,$
 prog_id,sci_obj,sci_spec,cmp_no,object,obj_id,objects,cds_draw_base,$
 date_obs,date_end,time_obs,time_end,date_cur,time_cur,pduration,sduration,$
 study_id,study_title,xcen,ycen,tspan,fil_id_lab,point_base,color_set,$
 time_tagged,tracking,studyvar,n_rasters1,db_type,n_repeat_s,srep,stored

common mk_cds_com3, wbase, show_stc, wtags, bfont,studyb,fbase,$
 sobj_list, spec_list,tacc,dur_unit, obj_list,crash_file,lock_file,$
 last_row,dur_unitb,disp_obs,is_eng,dets,do_lock,rcheckb,last_point,grab,$
 rs,gs,bs,fil_id,ffb,rplan,use_gis,slits,reps,locked,time_tagged_base,$
 itool_mess,imageb,itool_reg,win_itool,itool_point,scloneb,db_access,db_err

@mk_plan_shared

;-- some constants

zobjects=['LMB','LMB','CH','QS','AR','FLR']
secs_day= 24.d*3600.d
sec_spans = [3., 6., 12., 24., 36., 48., 72., 96., 120., 144., 168.,-1.]*3600.d0
tgap=1.d-2

;-- some messages

start_mess=$
        ['                --> HOW TO GET STARTED <---          ',$
         '   ',$
         '----> To create a plan entry, you must first choose a study.',$
         ' ',$
         'To do this, you can:',$
         ' ',$
         '(A) load a new study by pressing "Load New Study" ',$
         '  ',$
         '                OR                      ',$
         '  ',$
         '(B) load an already planned study by clicking on an entry in the ',$
         '    editing timeline (lowermost row)',$
         '  ',$
         '----> Next, position the cursor in the editing timeline and move it to the time',$ 
         '      when you wish to schedule the study.',$
          ' ',$
         '----> When you are ready, press the "Add" button to add the entry.']


start_mess_s=$
        ['                --> HOW TO GET STARTED <---          ',$
         '   ',$
         '----> To create a SCIENCE plan entry:',$
         ' ',$
         '(1) position the cursor in the editing timeline to the desired start time,',$
         '    and press the LEFT mouse button.',$
         ' ',$
         '(2) position the cursor in the editing timeline to the desired stop time,',$
         '    and press the RIGHT mouse button.',$
          ' ',$
         '----> When you are ready, press the "Add" button to add the entry.']


mod_mess='Please wait. Modifying Plans...          '
succ_mess='Plan entry modified successfully.'

err_mess0=['You have not loaded a study into memory.',$
           ' ',$
           'You can load a study via the "Load New Study" button',$
           ' ',$
           '                    OR                      ',$
           ' ',$
           'by clicking on an existing entry in the lower timeline.']

err_mess1=['You have not entered a START time for this entry.',$
           '                                           ',$
           'Use the LEFT mouse button to mark the START time',$
           '                                           ',$
           '                     OR',$
           '                                           ',$
           'Specify the start time in the CUR_TIME field.']


err_mess2=['You have not entered an END time for this entry,',$
           '     (or the END TIME < START TIME.)       ',$
           '                                           ',$
           'Use the RIGHT mouse button to mark the END time',$
           '                                           ',$
           '                     OR',$
           '                                           ',$
           'Specify the end time in the END_TIME field.']


cmess=['Move cursor to where you would like to commence this study',$
           '                                           ',$
           '                     OR',$
           '                                           ',$
           'Specify start time in CUR_TIME field',$
           '                                           ',$
           '   --> Press "Add" when ready <---']


imess=['IMAGE_TOOL will run simultaneously with MK_PLAN.',$
       '',$
       'To communicate pointing from IMAGE_TOOL to MK_PLAN, use the',$
       '',$
       '"Send to Planning Tool" button in IMAGE_TOOL.',$
       '',$
       'To communicate pointing from MK_PLAN to IMAGE_TOOL, use the',$
       '',$
       '"Send Point" button in MK_PLAN".',$
       '',$
       'To automatically update IMAGE_TOOL with MK_PLAN pointing, turn on the',$
       '',$
       '"AUTO COPY POINTING TO IMAGE_TOOL" button in MK_PLAN.        ']

db_err=['Editing access to current database is denied']
