;+
; NAME
;           EIS_MK_STUDY
; PURPOSE
;           This procedure invokes the eis_mk_study GUI
; INPUTS
;           NONE
; AUTHOR
;           John Rainnie RAL (j.rainnie@rl.ac.uk)
; WRITTEN
;           John A Rainnie, RAL, Jan-2006
; MODIFICATION HISTORY:
;           v0.1 JAR 10-Feb-2007
;               Added zdbase input into eis_mk_study_gui. This way
;               I can maintain ZDBASE even when the devious user
;               tries to fool me by resetting it on the fly.
;           v0.2 JAR 26-Feb-2007
;               Also check both ZDBASE_USER and ZDBASE_EIS environment
;               variables have been defined - if not then bail out!
;           
;-
;-----------------------------------------------------------------------------;
PRO eis_mk_study

;; Check both the USER and OFFICIAL ZDBASE environment variables are defined
;zdbase_ok = eis_check_zdbase()
;IF (zdbase_ok NE 1) THEN RETURN
;
;; Check ZDBASE is correctly pointing to the databases
;db_ok = eis_check_database()
;IF (db_ok NE 1) THEN RETURN
;
;IF (eis_get_ zdbase() EQ 0) THEN BEGIN
;
;    line = "ZDBASE is set to the SSW OFFICIAL databases!"
;    line = [line,""]
;    line = [line,"Any changes you make will be overwritten"]
;    line = [line,"when your SolarSoft is updated."]
;    line = [line,""]
;    line = [line,"Alternatively, you can work with your"]
;    line = [line,"USER databases. Simply copy the directory;"]
;    line = [line,""]
;    line = [line,"  $SSW/hinode/eis/database/planning_db"]
;    line = [line,""]
;    line = [line,"to your home directory, and ensure you"]
;    line = [line,"have the following line in your personal"]
;    line = [line,"idlstart file;"]
;    line = [line,""]
;    line = [line," SETENV,'ZDBASE_USER=+$HOME/planning_db'"]
;    line = [line,""]
;    line = [line,"Do you wish to continue?"]
;
;    dummy = DIALOG_MESSAGE(line ,/QUESTION)
;    IF (dummy EQ 'No') THEN RETURN
;
;ENDIF

oMkStudy = OBJ_NEW( "eis_mk_study_gui")
oMkStudy->Realize
oMkStudy->XMANAGER
oMkStudy->plot_logo

END
