// called from Main
// particularly for new users

sub DoWrite()

dim email As string=hGet("Email","System")
dim url As string=hGet("SupportURL","System")

ScriptCall("$WGHead",ScriptPath,"Support","Support")

Outln("<div class=""a"">")
Outln("<h2>Saving Your WebGrid Data</h2>")
Outln("<p>If you want to save your data to look at it again or continue elicitation<br>you can save this page in your web browser on your computer and reopen it when you wish.")
Outln("<br>Use the ""Save As..."" option in the ""File"" menu of your browser.")
Outln("<p>There are other options for saving your grid and sharing it with others<br>if you click the ""Save Grid"" button at the bottom of the main page.")
Outln("<p>There also options on the main page for viewing and interpreting your grid.</p>")
Outln("</div>")

Outln("<div class=""a"">")
Outln("<h2>Mailing List</h2>")
Outln("<p>The PCPTOOLS mailing list is a low-traffic list for those using personal construct psychology software.")
Outln("<br>The web site for the list and its archives is <a href=""http://www.jiscmail.ac.uk/lists/pcptools.html"" target=""PCPTOOLS"">http://www.jiscmail.ac.uk/lists/pcptools.html</a>.")
Outln("</div>")

Outln("<div class=""a"">")
Outln("<h2>News and Documentation</h2>")
Outln("<p>The WebGrid server is part of the <i>Rep Plus</i> suite of conceptual representation tools.")
Outln("<br>The web site for <i>Rep Plus and WebGrid Plus</i> news, their documentation and reports on applications is <a href="""+url+""" target=""REPGRID"">http://cpsc.ucalgary.ca/~gaines/repplus/</a>.")
Outln("</div>")

Outln("<div class=""a"">")
Outln("<h2>Sending Comments on WebGrid</h2>")
Outln("<p>You may comment through email to <a href=""mailto:"+email+"?subject=WebGrid Comment"">"+email+"</a></p>")
Outln("<p>If you are having problems please send us a description<br> including the server address and the version of web browser you are using (shown below).</p>")
Outln("</div>")

Outln("<div class=""a"">")
Outln("<h2>WebGrid Tutorials</h2>")
Outln("<p><a href=""http://cpsc.ucalgary.ca/~gaines/reports/TUTOR/carol"" target=""carol"">Tutorial from <i>Think Again</i>--Carol's choices</a>")
Outln("</div>")

Outln("<div class=""a"">")
Outln("<h2>Starting a New Elicitation, Uploading and Entering Existing Grid Data</h2>")
Outln("<p><a href=""/WebGrid/New??3T"" target=""WGNew"">Start a new grid</a>")
Outln("<p><a href=""/WebGrid/Elicit/Initial.rgrid"" target=""WGSNew"">Start a new grid</a> with a user-friendly initial elicitation script")
Outln("<p><a href=""/WebGrid/Enter"" target=""WGNew"">Enter an existing grid</a> using a rapid entry sequence")
Outln("<p><a href=""/WebGrid/Upload"" target=""WGUpload"">Upload a grid file</a> fom WebGrid, RepGrid, or in another common grid format")
Outln("<p><a href=""/WebGrid/Cache"" target=""WGRC"">Register a cache</a> to store and manage multiple grids on the server")
Outln("</div>")

Outln("<p><div class=""center"">")
ScriptCall("$OutSubmit","OK","Return to Main Page","large")
Outln("</div>")

Outln("<p><div class=""a""><h2>WebGrid Server</h2>")
Outln("<p><b> Rep Plus V"+hGet("AppVersion","System")+" ("+hGet("AppDate","System")+")</b> at "+hGet("IPAndPort","System")+"</p>")
Outln("</div>")

Outln("<div class=""a""><h2>Client Web Browser</h2>")
Outln("<p>"+GetRequestField("User-Agent: ")+"  at "+hGet("RemoteDNS","System")+"</p>")
Outln("</div>")

// Finalize
ScriptCall("$WGTail")

end sub

sub DoRead()

if CheckPost("OK") then
  ScriptFlow("Main/")
else
  ScriptCall("$NullResponse")
end if

end sub

// main program

if ScriptState="*" then DoRead else DoWrite

