Index: Dev/branches/jos-branch/css/visualeditors.css
===================================================================
--- Dev/branches/jos-branch/css/visualeditors.css	(revision 235)
+++ Dev/branches/jos-branch/css/visualeditors.css	(revision 236)
@@ -516,4 +516,11 @@
 }
 
+#qeQuestionParamsDiv .qeParamFieldset {
+    float: left;
+    clear: left;
+    border: 1px solid #555;
+    width: auto;
+}
+
 
 /**************************/
Index: Dev/branches/jos-branch/data/applications/applications.rdf
===================================================================
--- Dev/branches/jos-branch/data/applications/applications.rdf	(revision 235)
+++ Dev/branches/jos-branch/data/applications/applications.rdf	(revision 236)
@@ -16,3 +16,11 @@
 </rdf:Description>
 
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/application/2f0aca5eea85297f7ccce6e756b4cde8">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/application"/>
+   <ns1:uid>2f0aca5eea85297f7ccce6e756b4cde8</ns1:uid>
+   <ns1:title>New application</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:style>Default style</ns1:style>
+</rdf:Description>
+
 </rdf:RDF>
Index: Dev/branches/jos-branch/data/sessions/sessions.rdf
===================================================================
--- Dev/branches/jos-branch/data/sessions/sessions.rdf	(revision 235)
+++ Dev/branches/jos-branch/data/sessions/sessions.rdf	(revision 236)
@@ -18,3 +18,19 @@
 </rdf:Description>
 
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/session/da59235da6c303bb0d04a5dfaa42a96b">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/session"/>
+   <ns1:uid>da59235da6c303bb0d04a5dfaa42a96b</ns1:uid>
+   <ns1:title>Name...</ns1:title>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+   <ns1:creationdate>1326477968</ns1:creationdate>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/session/2caf916c83be370979b166d296f0ab2c">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/session"/>
+   <ns1:uid>2caf916c83be370979b166d296f0ab2c</ns1:uid>
+   <ns1:title>Ophoopvanzegen</ns1:title>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+   <ns1:creationdate>1326478224</ns1:creationdate>
+</rdf:Description>
+
 </rdf:RDF>
Index: Dev/branches/jos-branch/data/surveys/surveys.rdf
===================================================================
--- Dev/branches/jos-branch/data/surveys/surveys.rdf	(revision 235)
+++ Dev/branches/jos-branch/data/surveys/surveys.rdf	(revision 236)
@@ -52,3 +52,115 @@
 </rdf:Description>
 
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/06aa8b680652dbc5bdfdb1e0e0ecd93e">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>06aa8b680652dbc5bdfdb1e0e0ecd93e</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/c0980a13f819830168648e1998616d6b">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>c0980a13f819830168648e1998616d6b</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/c72aefc4b6591197d1b5df821337052f">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>c72aefc4b6591197d1b5df821337052f</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/8a7821c30bb4ae57b8a049cf57e9f28d">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>8a7821c30bb4ae57b8a049cf57e9f28d</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/31a0fa90a677bb5293542674ac7f9888">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>31a0fa90a677bb5293542674ac7f9888</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>2d85b641b72109dcb01ddd7eda8bffa8</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/afc00ba52ecd1137cff9d16185c76513">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>afc00ba52ecd1137cff9d16185c76513</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>2d85b641b72109dcb01ddd7eda8bffa8</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/2ab6ced674dcba6560bd50d41f55d841">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>2ab6ced674dcba6560bd50d41f55d841</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/462e4115953e2679c895cb49ae32f650">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>462e4115953e2679c895cb49ae32f650</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/624068dbb9f22ac5d733c3cb747c66d6">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>624068dbb9f22ac5d733c3cb747c66d6</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/c78d0188f8f12b086aa7d57e72055a25">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>c78d0188f8f12b086aa7d57e72055a25</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/90946ecf31193d2bf5f9fcbd2734d4b5">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>90946ecf31193d2bf5f9fcbd2734d4b5</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/265820332e45e6ca975a9b98a6d55b1c">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>265820332e45e6ca975a9b98a6d55b1c</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/0b8fab14aed1fda4ee160928f788a06f">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>0b8fab14aed1fda4ee160928f788a06f</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/survey/5e139a71930021924ef52a7323e75073">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/survey"/>
+   <ns1:uid>5e139a71930021924ef52a7323e75073</ns1:uid>
+   <ns1:title>New Survey</ns1:title>
+   <ns1:description>Default description</ns1:description>
+   <ns1:creator>41780c9a8e0b87a8533c9c1ba9f6445b</ns1:creator>
+</rdf:Description>
+
 </rdf:RDF>
Index: Dev/branches/jos-branch/data/users/users.rdf
===================================================================
--- Dev/branches/jos-branch/data/users/users.rdf	(revision 235)
+++ Dev/branches/jos-branch/data/users/users.rdf	(revision 236)
@@ -64,3 +64,10 @@
 </rdf:Description>
 
+<rdf:Description rdf:about="http://tbm.tudelft.nl/researchtool/resources/user/2d85b641b72109dcb01ddd7eda8bffa8">
+   <ns1:resource_type rdf:resource="http://tbm.tudelft.nl/researchtool/resources/user"/>
+   <ns1:uid>2d85b641b72109dcb01ddd7eda8bffa8</ns1:uid>
+   <ns1:name>admin</ns1:name>
+   <ns1:password>password</ns1:password>
+</rdf:Description>
+
 </rdf:RDF>
Index: Dev/branches/jos-branch/js/questionEditorScripts.js
===================================================================
--- Dev/branches/jos-branch/js/questionEditorScripts.js	(revision 235)
+++ Dev/branches/jos-branch/js/questionEditorScripts.js	(revision 236)
@@ -1,35 +1,3 @@
-// Old, should not be used anymore after class-based QuestionEditor() is finished!!!!!
-var qUID, parentObjectUID, qName, qTag, qType, qAnswerLength;
-
 var questionEditor = new QuestionEditor();
-
-function selectAnswerType(){
-    var selectBox = document.getElementById("questionType");
-    if (selectBox.value != undefined && selectBox.value != "") {
-        qType = selectBox.value;
-    }
-    else {
-        return;
-    }
-    removeWrongAnswerFields(selectBox);
-    switch (qType) {
-        case "int":
-            selectIntType();
-            break;
-        case "scale":
-            selectScaleType();
-            break;
-        case "choice":
-            //selectChoiceType();
-            break;
-        case "text":
-            //selectTextType();
-            break;
-        default:
-            alert("Invalid answer type selected!");
-            break;
-    }
-    
-}
 
 function createNewElement(tag, type, id, cl, value) {
@@ -53,10 +21,4 @@
 }
 
-function removeWrongAnswerFields(el) {
-    while (el.nextSibling) {
-        el.parentNode.removeChild(el.nextSibling);
-    }
-}
-
 function updateIdentifier() {
     var identField = document.getElementById("questionIdentifierField");
@@ -68,89 +30,4 @@
 }
 
-
-/////////////////////
-/* SCALE SELECTION */
-/////////////////////
-
-function selectScaleType() {
-    // I heard you like walls of text!
-    var content = document.getElementById("questionEditor_questionParams");
-    // Add number of choices input
-    var numChoicesBox = createNewElement("select", null, "numChoicesBox","questionParamField",null);
-    var numChoicesBoxLabel = createNewInputLabel("Scale size:","numChoicesBox");
-    for (var i = 0; i < 10; i++) {
-        var option = createNewElement("option");
-        option.text = i+1;
-        option.value = i+1;
-        numChoicesBox.appendChild(option);
-    }
-    addClass(numChoicesBoxLabel, "formLineBreak");
-    content.appendChild(numChoicesBoxLabel);
-    content.appendChild(numChoicesBox);
-    // Add legends enabled input
-    var legendsEnabledCheckBox = createNewElement("input","checkbox","legendsEnabledCheckbox","questionParamField",null);
-    var legendsEnabledCheckBoxLabel = createNewInputLabel("Enable legends","legendsEnabledCheckBox");
-    addClass(legendsEnabledCheckBoxLabel, "formLineBreak");
-    content.appendChild(legendsEnabledCheckBoxLabel);
-    content.appendChild(legendsEnabledCheckBox);
-    // Add legend labels boxes
-    var upperLegendBox = createNewElement("input","text","upperLegendBox","questionParamField");
-    var lowerLegendBox = createNewElement("input","text","lowerLegendBox","questionParamField");
-    var lowerLegendBoxLabel = createNewInputLabel("Lower legend","lowerLegendBox");
-    var upperLegendBoxLabel = createNewInputLabel("Upper legend","upperLegendBox");
-    addClass(lowerLegendBoxLabel,"formLineBreak");
-    content.appendChild(lowerLegendBoxLabel);
-    content.appendChild(lowerLegendBox);
-    addClass(upperLegendBoxLabel,"formLineBreak");
-    content.appendChild(upperLegendBoxLabel);
-    content.appendChild(upperLegendBox);
-    // Disable these boxes, since the checkbox is unchecked by default
-    lowerLegendBox.disabled = true;
-    upperLegendBox.disabled = true;
-    if (legendsEnabledCheckBox.addEventListener) {
-        legendsEnabledCheckBox.addEventListener("click", toggleScaleLegends, true);
-    }
-}
-
-function toggleScaleLegends() {
-    var content = document.getElementById("questionEditor_questionParams");
-    var checkbox = document.getElementById("legendsEnabledCheckbox");
-    var upperLegendBox = document.getElementById("upperLegendBox");
-    var lowerLegendBox = document.getElementById("lowerLegendBox");
-    if (checkbox.checked == true) {
-        upperLegendBox.disabled = false;
-        lowerLegendBox.disabled = false;
-    }
-    else {
-        upperLegendBox.disabled = true;
-        lowerLegendBox.disabled = true;
-    }
-}
-
-///////////////////////////////
-/* MULTIPLE CHOICE SELECTION */
-///////////////////////////////
-
-function selectChoiceType() {
-    var selectionBox = document.getElementById("questionType");
-    var content = document.getElementById("questionEditor_questionParams");
-}
-
-function resizeTextArea() {
-    var textArea = document.getElementById("questionEditor_bodyText");
-    if (document.getElementById("hiddenScalingDiv")) {
-        var hiddenDiv = document.getElementById("hiddenScalingDiv");
-    }
-    else {
-        var hiddenDiv = document.createElement("div");
-        hiddenDiv.style.visibility = "hidden";
-        textArea.appendChild(hiddenDiv);
-    }
-    
-    debugger;
-    hiddenDiv.innerHTML = "";
-    var userText = textArea.firstChild;
-    alert(userText);
-}
 
 //////////////////////////////////////////
@@ -164,5 +41,6 @@
     this.element = null;    // The parent div element containing the questionEditor
     this.paramsElement = null;  // The parent parameters element where all the input sets will be located
-    this.paramSets = null;  // The currently enabled input sets to be displayed in the paramsElement
+    this.paramSets = null;  // The currently enabled input sets to be displayed in the paramsElement. 
+    //Currently only supports a single param set (based on answer type), but functionality will scale to multiple sets as needed.
     
     // Methods
@@ -205,5 +83,5 @@
         
         var basicContainer = ce("div");
-        basicContainer.className = "basicInputs";
+        basicContainer.id = "basicInputs";
         
         var qeCodeField = createNewElement("input", "text", "qeCodeField", "qeParamField", null);
@@ -276,7 +154,28 @@
         }
         
+        switch (ge("qeTypeField").value) {
+            case "int":
+                request.answerType = "int";
+                request.minValue = parseInt(ge("qeMinValueField").value);
+                request.maxValue = parseInt(ge("qeMaxValueField").value);
+                break;
+            case "scale":
+                request.answerType = "scale";
+                request.numChoices = parseInt(ge("qeNumChoicesField").value);
+                request.legendsEnabled = ge("qeLegendsEnabledField").checked;
+                request.lowerLegend = ge("qeLowerLegendField").value;
+                request.upperLegend = ge("qeUpperLegendField").value;
+                break;
+            case "choice":
+                request.answerType = "choice";
+                break;
+            case "text":
+                request.answerType = "text";
+                break;
+        }
+        
         newAjaxRequest(requestString, "createObject.php", function(result){
             // Display a success message, or throw an error.
-        }, true);
+            }, true);
     }
     this.reset = function() {
@@ -318,7 +217,7 @@
         // Loop through all input containers in the paramsField
         for (var n = 0; n < me.paramsElement.childNodes.length; n++) {
-            if (me.paramsElement.childNodes[n].className == "basicInputs") continue;
-            // Check if the class (inputSet) is currently in paramSets
-            if (me.paramSets.indexOf(me.paramsElement.childNodes[n].className) < 0) {
+            if (me.paramsElement.childNodes[n].id == "basicInputs") continue;
+            // Check if the id (inputSet) is currently in paramSets
+            if (me.paramSets.indexOf(me.paramsElement.childNodes[n].id) < 0) {
                 me.paramsElement.childNodes[n].parentNode.removeChild(me.paramsElement.childNodes[n]);
                 n--;
@@ -335,11 +234,13 @@
         
         me.checkInputSets();
-                
+        
+        var container = ce("div");
+        container.id = "int_basic";
+
         var qeMinValueField = createNewElement("input", "text", "qeMinValueField", "qeParamField", null);
         var qeMinValueField_lbl = createNewInputLabel("Minimum value: ", "qeMinValueField", "l");
         var qeMaxValueField = createNewElement("input", "text", "qeMaxValueField", "qeParamField", null);
         var qeMaxValueField_lbl = createNewInputLabel("Maximum value: ", "qeMaxValueField", "l");
-        var container = ce("div");
-        container.className = "int_basic";
+        
         container.appendChild(qeMinValueField_lbl);
         container.appendChild(qeMinValueField);
@@ -358,5 +259,5 @@
         
         var container = ce("div");
-        container.className = "scale_basic";
+        container.id = "scale_basic";
         
         // Number of choices SELECT
@@ -366,6 +267,6 @@
         for (var n = 2; n < 11; n++) {
             var o = ce("option");
-            o.value = n-1;
-            o.text = n-1;
+            o.value = n;
+            o.text = n;
             numChoicesField.appendChild(o);
         }
@@ -391,9 +292,17 @@
     }
     this.type_Text = function () {
-        
+        if (me.paramSets.indexOf("text_basic") < 0) {
+            me.paramSets = new Array("text_basic");
+        }
+        else return;
+        
+        me.checkInputSets();
+        
+        var container = ce("div");
+        container.id="text_basic";
     }
     this.type_Choice = function() {
-        debugger;
-        if (me.paramSets.indexOf("choice_basic")) {
+        //debugger;
+        if (me.paramSets.indexOf("choice_basic") < 0) {
             me.paramSets = new Array("choice_basic");
         }
@@ -403,5 +312,5 @@
         
         var container = ce("div");
-        container.className = "choice_basic";
+        container.id = "choice_basic";
         // num options SELECT
         var numOptionsSelect = createNewElement("select", null, "qeNumOptionsField", "qeParamField", null);
@@ -409,14 +318,71 @@
         for (var n = 2; n < 11; n++) {
             var o = ce("option");
-            o.value = n-1;
-            o.text = n-1;
+            o.value = n;
+            o.text = n;
             numOptionsSelect.appendChild(o);
         }
         container.appendChild(numOptionsSelect_lbl);
         container.appendChild(numOptionsSelect);
-        
+        numOptionsSelect.addEventListener("change", me.type_Choice_CheckAnswerFields, true);
+        
+        var allowMultiple = createNewElement("input", "checkbox", "qeMultipleAnswersField", "qeParamField", null);
+        var allowMultiple_lbl = createNewInputLabel("Allow multiple answers", "qeMultipleAnswersField", "l");
+        container.appendChild(allowMultiple_lbl);
+        container.appendChild(allowMultiple);
+        
+        var answersField = ce("div");
+        answersField.className = "qeParamFieldset";
+        answersField.id = "qeParamsAnswerFieldset"
+        container.appendChild(answersField);
+                        
         me.paramsElement.appendChild(container);
-    }
-        
+        me.type_Choice_CheckAnswerFields();
+    }
+    this.type_Choice_CheckAnswerFields = function() {
+        debugger;
+        var container = ge("qeParamsAnswerFieldset");
+        var numAnswers = parseInt(document.getElementById("qeNumOptionsField").value, 10);
+        var numAnswerFields = 0; 
+        {
+            for (var i = container.childNodes.length-1; i >= 0; i--) {
+                if (container.childNodes[i].className = "qeChoiceAnswerGroup") {
+                    numAnswerFields++;
+                }
+            }
+            
+        }
+        
+        // If there already are the correct number of answer fields, exit the function
+        if (numAnswers == numAnswerFields) return;
+        else if (numAnswers > numAnswerFields) {
+            // Extra inputs need to be added
+            var n = numAnswers - numAnswerFields;
+            for (var x = 0; x < n; x++) {
+                var group = ce("div");
+                group.className = "qeChoiceAnswerGroup";
+                var field = createNewElement("input", "text", "qeAnswerField"+(numAnswerFields+x), "qeParamField", null);
+                var field_lbl = createNewInputLabel((numAnswerFields+x), "qeAnswerField"+(numAnswerFields+x), "l");
+                
+                group.appendChild(field_lbl);
+                group.appendChild(field);
+                container.appendChild(group);
+            }
+        }
+        else if (numAnswers < numAnswerFields) {
+            // There are too many inputs and some need to be removed. Start at the end!
+            // TODO: This is SO inefficient. There has to be a better way, perhaps adding elements to an array?
+            // TODO: Another approach would be to use the previousSibling property as a way to prevent having to loop through the entire container tree every time an object needs to be removed.
+            var n = numAnswerFields-numAnswers;
+            for (var x = 0; x < n; x++) {
+                for (var y = container.childNodes.length-1; y >= 0; y--) {
+                    if (container.childNodes[y].className == "qeChoiceAnswerGroup") {
+                        container.removeChild(container.childNodes[y]);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+     
     // Editing
     this.editQuestion = function(uid) {
