Index: Dev/trunk/classes/SurveyCreationTool.php
===================================================================
--- Dev/trunk/classes/SurveyCreationTool.php	(revision 17)
+++ Dev/trunk/classes/SurveyCreationTool.php	(revision 18)
@@ -28,5 +28,5 @@
         <script type="text/javascript">
             var questionCount = 1;           
-                                                                            
+                                                                                    
             function getNewQuestion()
             {
@@ -43,18 +43,18 @@
                     "<td><select id='" + questionCount + "' name='questionType" + questionCount + "' onchange='handleType(this)'><br />"+
                     "<option value='text' selected='selected'>Text</option>" +
-                    "<option value='multipleChoice'>Multiple choice</option>" +
+                    "<option value='int'>Integer</option>" +
+                    "<option value='mc'>Multiple choice</option>" +
                     "<option value='checkboxes'>Checkboxes</option>" +
                     "<option value='scale'>Scale</option>" +
-                    "<option value='grid'>Grid</option>" +
                     "</select></td></tr>" +
                     "</table>" +
                     "<div id='answersDiv" + questionCount + "'></div>" +
                     "</div>";
-                                                                        
+                                                                                
                 questionDiv.innerHTML = htmlStr;
-                                                                        
+                                                                                
                 return questionDiv;
             }
-                                                                            
+                                                                                    
             function handleFocus(input)
             {
@@ -66,15 +66,15 @@
                 }
             }
-                                                                                                            
+                                                                                                                    
             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)
                     {
@@ -87,5 +87,5 @@
                 }                           
             }
-                                                            
+                                                                    
             function handleType(select)
             {
@@ -94,23 +94,26 @@
                 answersDiv.answerCount = 1;
                 answersDiv.clicked = null;
-                
+                        
                 switch (type) {
-                    case 'multipleChoice':
+                    case 'mc':
                         answersDiv.innerHTML = "";
                         addOption(select.id);
-                                                
+                                                        
                         break;
                     case 'text':
                         answersDiv.innerHTML = "";
-                        
+                        break;
+                    case 'int':    
+                        answersDiv.innerHTML = "";
+                        //min max
+                        minMax(select.id);
                         break;
                     case 'checkboxes':
-                        answersDiv.innerHTML = "";                                                
+                        answersDiv.innerHTML = "";  
+                        addOption(select.id);
                         break;
                     case 'scale':
-                        answersDiv.innerHTML = "";                                                
-                        break;
-                    case 'grid':
-                        answersDiv.innerHTML = "";                                                
+                        answersDiv.innerHTML = ""; 
+                        //what scale (min max incr)
                         break;
                     default:
@@ -119,6 +122,6 @@
 
             }
+                                                    
                                             
-                                    
             function addOption(questionNumber)
             {        
@@ -127,8 +130,8 @@
                 var answerDiv = document.createElement("div");
                 answerDiv.className = "answerDiv";
-                                        
+                                                
                 var htmlStr = "<input type='text' name='q" + 
                     questionNumber + "ans" + answerCount + "' value='Option " + answerCount + "' />";
-                
+                        
                 if (answersDiv.clicked == null)
                 {
@@ -137,21 +140,33 @@
                     answersDiv.clicked = true;
                 }
-                                               
+                                                       
                 answerDiv.innerHTML = htmlStr;
-                                               
+                                                       
                 answersDiv.appendChild(answerDiv);
                 answersDiv.answerCount++;
             }
-                                            
-                                                         
+            
+            function minMax(questionNumber)
+            {
+               var answersDiv = document.getElementById("answersDiv" + questionNumber);
+               
+               var answerDiv = document.createElement("div");
+               answerDiv.className = "answerDiv";
+               answerDiv.innerHTML = "<label for='min'>Min</label><input type='text' name='min" + questionNumber + "' />" +
+               "<label for='max'>Max</label><input type='text' name='max" + questionNumber + "' />";
+           
+                answersDiv.appendChild(answerDiv);
+            }            
+                                                                 
             function addQuestion()
             {
                 var questionsDiv = document.getElementById('questionsDiv');
                 var newQuestion = getNewQuestion();
-                                                                        
+                                                                                
                 questionsDiv.appendChild(newQuestion);
                 questionCount++;
             }
-                                                                                                                                                                                    
+            
+                                                                                                                                                                                            
         </script>
         <?php
