Index: Dev/trunk/css/awesome.css
===================================================================
--- Dev/trunk/css/awesome.css	(revision 174)
+++ Dev/trunk/css/awesome.css	(revision 175)
@@ -48,6 +48,6 @@
     background-color: #aeb2b3;
     border: 1px solid #fff;
-    -moz-border-radius: 15px;
-    border-radius: 15px;
+    -moz-border-radius: 1em;
+    border-radius: 1em;
     margin-bottom: 2em;
     padding: 0 1em 1em 1em;
@@ -562,5 +562,5 @@
 
 #questionEditForm {
-   
+
 }
 
@@ -610,10 +610,10 @@
 
     background-image: -webkit-gradient(
-	linear,
-	left top,
-	left bottom,
-	color-stop(0.21, #B0B0B0),
-	color-stop(0.8, #888888)
-    );
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
     background-position: bottom;
     background-repeat: repeat-x;
@@ -626,7 +626,7 @@
     overflow-x: scroll;
     overflow-y: hidden;
-    
+
     margin-bottom: 0.5em;
-    
+
     background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
     background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
@@ -635,11 +635,11 @@
     background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
     background-image: -webkit-gradient(
-	linear,
-	left bottom,
-	left top,
-	color-stop(0.25, #B0B0B0),
-	color-stop(0.8, #888888)
-    );
-    
+        linear,
+        left bottom,
+        left top,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+
     border: 1px solid #ddd;
     -moz-border-radius: 0.5em;
@@ -664,5 +664,9 @@
     float: left;
     text-align: center;
-    /*display: inline-block;*/
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
 }
 
@@ -671,5 +675,5 @@
     -webkit-box-shadow: 0 0 50px #FFF;
     box-shadow: 0 0 50px #FFF;
-    
+
 }
 
@@ -687,5 +691,5 @@
     font-size: 0.875em;
     /*float: left;*/
-    
+
 }
 
@@ -730,11 +734,11 @@
 
     background-image: -webkit-gradient(
-	linear,
-	left top,
-	left bottom,
-	color-stop(0.25, #B0B0B0),
-	color-stop(0.8, #888888)
-    );
-    
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+
 }
 
@@ -778,10 +782,10 @@
 
     background-image: -webkit-gradient(
-	linear,
-	left top,
-	left bottom,
-	color-stop(0.25, #B0B0B0),
-	color-stop(0.8, #888888)
-    );
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
 }
 
@@ -808,2 +812,76 @@
     display: block;
 }
+
+
+
+/* QUESTION EDITOR
+*/
+
+#questionEditor {
+    width: 60em;
+    background-color: #00FF00;
+    border: 1px solid #FFF;
+    display: block;
+    margin: 0;
+    padding: 0;
+    float: left;
+    background-color: #5c5c5c;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+
+#questionEditor_header {
+    height: 1.5em;
+    float: left;
+    font-size: 1.25em;
+    color: #FFF;
+    padding: 0.5em 1em 0 1em;
+}
+
+#questionEditor_content {
+    width: 58em;
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+    float: left;
+    padding: 0.5em 1em;
+
+}
+
+#questionEditor_controls {
+    float: right;
+    height: 2em;
+    text-align: right;
+}
+
+
+
+#questionEditor_bodyText_textArea {
+    resize: none;
+    width: auto;
+    min-width: 51em;
+    border: 3px solid #cccccc;
+    background-color: white;
+    margin: 3px;
+}
+
+#questionEditor_bodyText_staticText {
+    color: white;
+    font-size: 12px;
+}
+
+.questionParamField {
+    display: inline;
+}
Index: Dev/trunk/js/ajax.js
===================================================================
--- Dev/trunk/js/ajax.js	(revision 174)
+++ Dev/trunk/js/ajax.js	(revision 175)
@@ -20,5 +20,5 @@
     
     if (xmlhttp !== undefined) {
-        xmlhttp.onreadystatechange = callback(xmlhttp, url, target);
+        xmlhttp.onreadystatechange = handleResponse(xmlhttp, url, target, callback);
         xmlhttp.open("POST", url, true);
         xmlhttp.send(query);
@@ -27,11 +27,12 @@
 
 //Handle response is een soort standaard response functie, is het nodig om deze te kunnen overriden met een custom callback functie?
-function handleResponse(xmlhttp, url, target) {
+function handleResponse(xmlhttp, url, target, callback) {
     if (xmlhttp.readyState == 4) {
         if (xmlhttp.Status == 200) {
-            document.getElementById(target).innerHTML = xmlhttp.responseText;
+            callback(xmlhttp, target);
+            //document.getElementById(target).innerHTML = xmlhttp.responseText;
         }
         else {
-            document.getElementById(target).innerHTML = "loadExternalContent error: \n" + xmlhttp.status + "\n" + xmlhttp.statusText;
+            //document.getElementById(target).innerHTML = "loadExternalContent error: \n" + xmlhttp.status + "\n" + xmlhttp.statusText;
         }
     }
Index: Dev/trunk/js/editorScripts.js
===================================================================
--- Dev/trunk/js/editorScripts.js	(revision 174)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/* 
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-function IsItemSelected(check, target) {
-    if (check.value) {
-        target.disabled = false;
-    }
-    else {
-        target.disabled = true;
-    }
-}
-
-function IsCheckEnabled(check, target) {
-    if (check.checked) {
-        target.disabled = false;
-    }
-    else {
-        target.disabled = true;
-    }
-}
-
-function SubmitToolbox() {
-    document.forms['toolbox'].submit();
-}
-
-
Index: Dev/trunk/js/questionEditorScripts.js
===================================================================
--- Dev/trunk/js/questionEditorScripts.js	(revision 175)
+++ Dev/trunk/js/questionEditorScripts.js	(revision 175)
@@ -0,0 +1,101 @@
+var qUID, parentObjectUID, qName, qTag, qType, qAnswerLength;
+
+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) {
+    var newElement = document.createElement(tag);
+    if (type != undefined) newElement.type = type;
+    if (id != undefined) newElement.id = id;
+    if (cl != undefined) newElement.className = cl;
+    if (value != undefined) newElement.value = value;
+    return newElement;
+}
+
+function removeWrongAnswerFields(el) {
+    while (el.nextSibling) {
+        el.parentNode.removeChild(el.nextSibling);
+    }
+}
+
+
+
+
+function selectIntType() {
+    var selectBox = document.getElementById("questionType");
+    var content = document.getElementById("questionEditor_questionParams");
+    var minValueBox = createNewElement("input","text","minValueBox", "questionParamField", null);
+    content.innerHTML += "<br />Min value: ";
+    content.appendChild(minValueBox);
+    var maxValueBox = createNewElement("input", "text", "maxValueBox", "questionParamField", null);
+    content.innerHTML += "<br />Max value: ";
+    content.appendChild(maxValueBox);
+    
+    // set the selected value, because adding a DOM element to the parent element resets the selected value.
+    for (var i = 0; i < selectBox.options.length; i++) {
+        if (selectBox.options[i].value == "int") {
+            selectBox.selectedValue = i;
+            selectBox.selectedText = "Integer";
+        // DIT WERKT NOG NIET, HIJ SELECTEERT HEM NIET, OOK AL IS SELECTED = TRUE
+        // MET ANDERE WOORDEN: WTF.
+        }
+    }
+}
+
+
+
+function selectScaleType() {
+    debugger;
+    var selectBox = document.getElementById("questionType");
+    var content = document.getElementById("questionEditor_questionParams");
+    var numChoicesBox = createNewElement("select", null, "numChoicesBox","questionParamField",null);
+    content.innerHTML += "<br />Scale size: ";
+    for (var i = 0; i < 10; i++) {
+        var option = createNewElement("option");
+        option.text = i+1;
+        option.value = i+1;
+        numChoicesBox.appendChild(option);
+    }
+    content.appendChild(numChoicesBox);
+    numChoicesBox.addEventListener("change", selectScaleSize, false);
+}
+
+function selectScaleSize() {
+    var numChoicesBox = document.getElementById("numChoicesBox");
+    var content = document.getElementById("questionEditor_questionParams");
+    for (var i = 0; i < numChoicesBox.value; i++) {
+        var newBullet = createNewElement("input", "radio", "bullet"+i, "questionParamField","i");
+        content.appendChild(newBullet);
+    }
+    
+}
+
Index: Dev/trunk/questionEditor.php
===================================================================
--- Dev/trunk/questionEditor.php	(revision 175)
+++ Dev/trunk/questionEditor.php	(revision 175)
@@ -0,0 +1,50 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+?>
+
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title></title>
+        <script type="text/javascript" src="js/questionEditorScripts.js"></script>
+        <?php new StyleSheet("awesome"); ?>
+    </head>
+    <body>
+        <div id="wrapper">
+            <div id="content">
+                <div id="questionEditor">
+                    <div id="questionEditor_header">
+                        Editing: #QUESTION-IDENT-NO
+                    </div>
+                    <div id="questionEditor_content">
+                        <h2>Question text:</h2>
+                        <div id="questionEditor_bodyText">
+                            <textarea id="questionEditor_bodyText_textArea">THIS IS THE QUESTION BODY TEXT. CLICK HERE TO EDIT!</textarea>
+                        </div>
+                        <div id="questionEditor_questionParams" >
+                            Answer type:
+                            <select id="questionType" onChange="selectAnswerType();" class="questionParamField">
+                                <option value=""></option>
+                                <option value="int">Integer</option>
+                                <option value="scale">Scale</option>
+                                <option value="choice">Multiple choice</option>
+                                <option value="text">Text</option>
+                            </select>
+                            
+                            
+                        </div>
+                    </div>
+                    <div id="questionEditor_controls">
+                        <input type="button" value="Discard" />
+                        <input type="button" value="Save" />
+                    </div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
