         
         // set the text from the data model
         cell.textLabel?.text = self.time[indexPath.row]
-
+        
         
         
         return cell
     }
     
-
-    func createAlertAvbestill(title: String, message: String) {
-        
-        
-        
-    }
+    
+    func createAlertUnbook(title: String, message: String) {
+        
+        let alertUnbook = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
+        
+        
+        alertUnbook.addAction(UIAlertAction(title: "Avbestill", style: UIAlertActionStyle.default, handler: { (action) in
+            alertUnbook.dismiss(animated: true, completion: nil)
+            
+            if self.index == 0 {
+                
+                self.confirmtiElleve()
+            }
+                
+            else if self.index == 1 {
+                self.confirmelleveTolv()
+                
+            }
+                
+            else if self.index == 2 {
+                self.confirmTolvEtt()
+                
+            }
+                
+            else if self.index == 3 {
+                self.confirmEttTo()
+                
+                
+            }
+                
+            else if self.index == 4 {
+                self.confirmToTre()
+                
+            }
+                
+            else if self.index == 5 {
+                self.confirmTreFire()
+                
+            }
+            
+            
+            
+            
+            
+        }))
+        
+        alertUnbook.addAction(UIAlertAction(title: "Avbryt", style: UIAlertActionStyle.destructive, handler: { (action) in
+            alertUnbook.dismiss(animated: true, completion: nil)
+            
+            
+            
+        }))
+        self.present(alertUnbook, animated: true, completion: nil)
+        
+        
+        
+    }
+    
+    
     
     func createAlert(title: String, message: String) {
         

            index = indexPath.row
            createAlert(title: "Booke dette rommet?", message: roomList[myIndex].name!);
        }
        
        else if indexPath.row == 5 {
            index = indexPath.row
            createAlert(title: "Booke dette rommet?", message: roomList[myIndex].name!);
        }
    
        
        
        

    
    
    
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.

            
        } else if roomList[myIndex].tolvEtt! == "Opptatt" {
            
            prntRef.updateChildValues(["tolvEtt": "Ledig"])
            
            
