Index: Dev/trunk/classes/Loader.php
===================================================================
--- Dev/trunk/classes/Loader.php	(revision 64)
+++ Dev/trunk/classes/Loader.php	(revision 64)
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * Helper class to load stuff
+ *
+ * @author fpvanagthoven
+ */
+class Loader {
+
+    /**
+     *
+     * @return array Array of Surveys with id and title
+     */
+    public static function loadSurveys() {
+        $surveys = array();
+
+        $surveyDBI = new SurveyDatabaseInterface(null);
+        $surveyIDTitles = $surveyDBI->getExistingSurveys();
+
+        foreach ($surveyIDTitles as $id => $title) {
+            $survey = new Survey($id, $title);
+            array_push($surveys, $survey);
+        }
+        
+        return $surveys;
+    }
+
+}
+
+?>
Index: Dev/trunk/classes/SessionCreationTool.php
===================================================================
--- Dev/trunk/classes/SessionCreationTool.php	(revision 62)
+++ 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
     }
Index: Dev/trunk/classes/SurveyCreationTool.php
===================================================================
--- Dev/trunk/classes/SurveyCreationTool.php	(revision 62)
+++ Dev/trunk/classes/SurveyCreationTool.php	(revision 64)
@@ -34,4 +34,5 @@
     private static function javascript($id = null) {
         ?>
+        <script type="text/javascript" src="js/creation.js"></script>
         <script type="text/javascript">
             /* autosave every 3 minutes */
@@ -75,41 +76,4 @@
                 return questionDiv;
             }
-                                                                                                                                                                                                                                                                                                                                                    
-            function handleFocus(input)
-            {
-                /* this is such ugly code it makes me sad */
-                /* because it is hard coded. */
-                if (input.clicked == null && 
-                    (input.value == "Untitled Survey"
-                    || input.value == "Write a helpful description for this survey here."
-                    || input.value == "Write a question description here."
-                    || input.value == "Untitled Question"))
-                {
-                    input.value = "";
-                    input.style.color = "black";   
-                    input.clicked = true; 
-                }
-            }
-                                                                                                                                                                                                                                                                                                                                                                                    
-            function handleBlur(input)
-            {        
-                var surveyTitle = document.getElementById('surveyTitle');
-                var surveyDescription = document.getElementById('surveyDescription');
-                                                                                                                                                                                                                                                                                                                                                                    
-                if (input.value == "")
-                {
-                    input.style.color = "gray";
-                    input.clicked = null;
-                                                                                                                                                                                                                                                                                                                                                                                            
-                    if (input == surveyTitle)
-                    {
-                        input.value = "Untitled Survey";
-                    }
-                    else if (input == surveyDescription)
-                    {
-                        input.value = "Write a helpful description for this survey here.";
-                    }
-                }                           
-            }
                                                                                                                                                                                                                                                                                                                                     
             function handleType(select, answers)
@@ -397,5 +361,5 @@
             $value = 'Untitled Survey';
         ?>
-        <input type="text" id="surveyTitle" name="surveyTitle" value="<?php echo $value ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
+        <input type="text" id="surveyTitle" class="titleBox" name="surveyTitle" value="<?php echo $value; ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
         <?php
     }
@@ -419,5 +383,5 @@
             $value = 'Write a helpful description for this survey here.';
         ?>
-        <textarea id="surveyDescription" name="surveyDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
+        <textarea id="surveyDescription" class="descriptionBox" name="surveyDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
         <?php
     }
