<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--   This is an example of a "home page" for an instrument.  

  Notes: 
     * When using Create An Instrument dSurvey, the  /dsurvey/client/defaultStart.html is used as the 
        default home page. This document is essentially the save as /dsurvey/client/defaultStart.html.

     *  So, most people won't need to use this document to create their own "home page" for an instrument.
        But if you are ambitious, you should read this document.
        And, if you are using Creat An Instrument, you should change the <HOME_PAGE> variable 
        in the instrument descriptor file.
        created instrument. This newly created home page will be essentially identical to the sample home page
 
    *  The instrument home page is used by ALL sessions based on an instrument.
       Thus, it is NOT customized for a session.

       Basically, the look/feel of a session is controlled by session specific parameters, which are used 
       to control which portions of the session's instrument are displayed when.


  The "instrument home page" is called by the generic "join" page after session initialization (i.e,; after reference 
  IDs have been assigned to each client).
     Specifically ...
         After joining a session, each participant's browser will wait until a STARTSESSION variable (for this session)
         has been set on the server. Once its been set (and the browser will check every few seconds), then the instrument
         home page will be retrieved and loaded into the brwoser.
   However, since loading a new page will erase any pre-existing javascript variables (such as variables extracted by the join page),
   some means of providing basic information  (such as the session name and the client id) is required.
   This is accomplished by transfering basic information in "search arguments". 
    Specifically, the instrument home page is retrieved using a syntax of:
                /dsurvey/instruments/instName/instName.htm?session=sessname&myID=anid&myNAME=aname (and some other stuff)
    This "search" portion of the URL will be extracted by javascript, and used to find session specific files, etc.


  
 -->

<html xmlns="http://www.w3.org/1999/xhtml">                                                                 

<head>

<script type="text/javascript"  > 
</script>

<!-- Generic libraries, etc.  These should NOT be changed-->

  <script type="text/javascript" src="/dsurvey/lib/xmlrequest2b.js"></script>
  <script type="text/javascript" src="/dsurvey/lib/svyInputs2.js"></script>
  <script type="text/javascript" src="/dsurvey/lib/svyLibE2.js"></script>
  <script type="text/javascript" src="/dsurvey/lib/svyLibE2_globals.js"></script> 

  <script type="text/javascript" src="/dsurvey/lib/svyMath.js"></script>
  <script type="text/javascript" src="/dsurvey/lib/svyEquations.js"></script>

  <script type="text/javascript" src="/dsurvey/lib/svyValue.js"></script>

  <script type="text/javascript" src="/dsurvey/lib/svyUserHeaders.js"></script>
  <script type="text/javascript" src="/dsurvey/lib/svyUserServerHeaders.js"></script>


  <!-- default styles used by dSurvey to display various message blocks, etc. You may wish to modify its contents if 
       you want differrent display characteristics -->

  <link rel="stylesheet" type="text/css" href="/dsurvey/lib/svyLibE2.css" >

<!-- End of non-user changeable (generic) libraries -->

<!-- We do NOT recommend it, but here you style sheets, or javascript libraries, 
     that are customized for this instrument. 
     Instead, we recommend using the _initLoad <SUB> in the control.xml file for the instrument (asusming
     you use dSurvey utilities to create an instrument).
-->
  <link rel="stylesheet" type="text/css" href="/dsurvey/lib/ers08/ers08.css" >

<!-- Specify some debug and page-display parameters 
     These are generic.  They are NOT specific to a survey instrument.
-->
<script type="text/javascript"  > 
 
<!-- THESE "flags" CAN BE CHANGED. Actually, if removed, default values (set in svylibE2_globals.js) are used -->
var debugMode=1;                      // controls debug output: 0=none, 1=some, 2=too much (including debug window of contents)
var useFooter_flag=1 ;              // controls the creation, and use, of the "footer" block (at the bottom of the browser screen. 1=Yes, 0=No
var useHeader_flag=1 ;              // controls the creation, and use, of the "header" block (at the top of the browser screen. 1=Yes, 0=No

<!-- Note: this debugMode "javascript" variable is only used if debug_Mode "session-descriptor variable" is NOT specified -->

</script>


<!-- this avoids some odd problems on firefox --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<!-- ================================== begin custom javascript ========================= -->

<!-- you could put instrument special functions in here, but it is probably better to include them in 
     your custom javascript library  -->


<!-- ================================== End of java script ========================= -->


</head>

<!-- begin body =================================================  -->

<!-- A call to the E2_start function is all you need.

    Basically, E2_start shows the first group in the first section. Or, you can specify which section to load 
    via the 2nd argrument 
   
    Steps taken by E2_start:
        i)  add several generic DIVS to the display window, to be used for for displaying headers, footers, and the current module group.
       ii)  Retrieve, parse, and process the SPEC file
       iii) Retrieve and parse other files, such as XML module files and parameter files
        iv) Display, as specified by name in the 2nd argument of E2_start, a section. 
           By default (if you do NOT specify a  2nd argument), display the first section (as it appears in the 
           SPEC file).
        v) More precisely: display the first group in the section loaded (i.e.; by default, the first section in the SPEC file).
           Set up "events" and "targets" :: which are used to control what section/group will be displayed next.

    After step v, E2_start is done; and control is driven by "events and their targets". 
    Basically, when an event occurs, a  new section & group are displayed 
    (step v is started  with a specified group, or step iv is started with specified section)


      -->

<body onLoad="E2_start(document.location.search)" >  

</body>
</html>






