Index: Dev/trunk/classes/SessionCreationTool.php
===================================================================
--- Dev/trunk/classes/SessionCreationTool.php	(revision 61)
+++ Dev/trunk/classes/SessionCreationTool.php	(revision 64)
@@ -8,9 +8,150 @@
 class SessionCreationTool {
 
-    public function __construct() {
+    private $session;
+    private $surveys;
+
+    public function __construct($session = null) {
+        $this->session = $session;
+
+        $this->init();
+
+        $this->javascript();
         ?>
+
         <div class="creation">
-            lo
+            <form id="sessionCreationForm" action="" method="post">
+                <?php
+                $this->title();
+                $this->description();
+                $this->pipeline();
+
+                $this->makeSessionButton();
+                ?>
+            </form>
         </div>
+        <?php
+    }
+
+    private function init() {
+        $this->surveys = Loader::loadSurveys();
+    }
+
+    private function javascript() {
+        ?>
+        <script type="text/javascript" src="js/creation.js"></script>
+        <script type="text/javascript">
+            var surveys = new Array();
+                                                                                    
+            init();
+                                                                                                
+            function init() {
+                loadSurveys();
+                loadApplications();
+            }
+                                                                                                
+            function loadSurveys() {
+        <?php
+        foreach ($this->surveys as $survey) {
+            ?>
+                        var title = <?php echo "'" . $survey->title . "'"; ?>;
+                        var id = <?php echo "'" . $survey->id . "'"; ?>;
+                        var survey = new Survey(title, id);
+                        surveys.push(survey);
+            <?php
+        }
+        ?>
+            }
+                                                                                    
+            function loadApplications() {
+                                                                                        
+            }
+                                                                                    
+            function Survey(title, id)
+            {
+                this.title = title;
+                this.id = id;
+            }
+                                                                                    
+            // =============================================================
+                                                                                    
+            function addSurvey() {
+                var surveyList = document.createElement("select");
+                surveyList.setAttribute("size", "1000");
+                surveyList.className = "toLoad";
+                
+                for (var i = 0; i < surveys.length; i++) 
+                {
+                    var option = document.createElement("option");
+                    option.setAttribute("value", surveys[i].id);
+                    option.innerHTML = surveys[i].title;
+                    surveyList.appendChild(option);
+                }
+                                                                                        
+                var sessionCreation = document.getElementById("sessionCreationForm");
+                var pipelineOptions = document.getElementById("pipelineOptions");
+                                                                                        
+                sessionCreation.replaceChild(surveyList, pipelineOptions);
+            }
+                                                                                            
+        </script>
+        <?php
+    }
+
+    private function title() {
+        if (isset($this->session->title))
+            $value = $this->session->title;
+        else
+            $value = 'Untitled Session';
+        ?>
+        <input type="text" id="sessionTitle" class="titleBox" name="sessionTitle" value="<?php echo $value; ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
+        <?php
+    }
+
+    private function description() {
+        if (isset($this->session->description))
+            $value = $this->session->description;
+        else
+            $value = 'Write a description for this session here.';
+        ?>
+        <textarea id="sessionDescription" class="descriptionBox" name="sessionDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
+        <?php
+    }
+
+    private function pipeline() {
+        ?>
+        <h2 id="pipelineHead">Pipeline</h2>
+        <div id="pipeline" class="padding2em">
+            <i>-Empty- </i>
+        </div>
+        <div id="pipelineOptions">
+            <?php
+            $this->addSurveyToPipelineButton();
+            $this->addApplicationToPipelineButton();
+            $this->addDashboardToPipelineButton();
+            ?></div>
+        <?php
+    }
+
+    private function addSurveyToPipelineButton() {
+        ?>
+        <input type="button" id="surveyToPipeline" class="surveyButton nextLine pipelineButton leftAlign leftPadding1" value="+ Survey" onclick="addSurvey()"/>
+        <?php
+    }
+
+    private function addApplicationToPipelineButton() {
+        ?>
+        <input type="button" class="surveyButton nextLine pipelineButton leftAlign leftPadding1" value="+ Application" />
+        <?php
+    }
+
+    private function addDashboardToPipelineButton() {
+        ?>
+        <input type="button" class="surveyButton nextLine pipelineButton leftAlign leftPadding1" value="+ Dashboard" />
+        <?php
+    }
+
+    private function makeSessionButton() {
+        ?>
+        <input type="submit" id="makeSessionButton" class="surveyButton" value="Make session" />
         <?php
     }
