                 }
             }
             
-            if params["setiOSStatusBarColorRed"] != nil {
+            if params["setiOSStatusBarColor"] != nil {
                 
                 // Add UIViewControllerBasedStatusBarAppearance YES to Info.plist
                 
-                let red = params["setiOSStatusBarColorRed"]?.floatValue
+                let red = params["setiOSStatusBarColor"]?.floatValue
                 let redValue:CGFloat = CGFloat(red!) / 255.0
                 
                 let green = params["green"]?.floatValue

                let totalScreens = self.navigationController?.viewControllers.count
                let destinationViewControllerIndex = totalScreens! - screens! - 1    // Offset 0 indexing.
                let destinationViewController = self.navigationController?.viewControllers[destinationViewControllerIndex] as! RHYWebViewController
                if let callback = params["callback"] as? String {
                    destinationViewController.uiWebView.stringByEvaluatingJavaScriptFromString("\(callback)()")
                }
                self.navigationController?.popToViewController(destinationViewController, animated: true)
            }
            
            if let menuHTMLFile = params["createMenu"] as? String {

                
                let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
                
                alert.addAction(UIAlertAction(title: buttonText, style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -> Void in
                    if(params["callback"] != nil) {
                        let callback = params["callback"] as! String
                        self.uiWebView.stringByEvaluatingJavaScriptFromString("\(callback)()")
                    }
                }));
                
                self.presentViewController(alert, animated: true, completion: nil)
            }
            
            if params["logout"] != nil {
    
                let indexViewController = self.storyboard!.instantiateViewControllerWithIdentifier("RHYWebViewControllerStoryboardID") as! RHYWebViewController
                let loginViewController = self.storyboard!.instantiateViewControllerWithIdentifier("RHYWebViewControllerStoryboardID") as! RHYWebViewController
                indexViewController.HTMLFile = "index.html"
                loginViewController.HTMLFile = "login.html"
                
                navigationController!.setViewControllers([indexViewController, loginViewController], animated: true)
            }
            
            if params["showConfirmDialog"] != nil {
                let message = params["showConfirmDialog"] as! String;
                var title = "Mensaje"
                var buttonOk = "Aceptar"
                var buttonCancel = "Cancelar"
                
                if let passedTitle = params["title"] as? String {
                    title = passedTitle
                }
                
                if let passedButtonOk = params["buttonOk"] as? String {
                    buttonOk = passedButtonOk
                }
                
                if let passedButtonCancel = params["buttonCancel"] as? String {
                    buttonCancel = passedButtonCancel
                }
                
                let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
                
                alert.addAction(UIAlertAction(title: buttonOk, style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -> Void in
                    if(params["callback"] != nil) {
                        let callback = params["callback"] as! String
                        self.uiWebView.stringByEvaluatingJavaScriptFromString("\(callback)()")
                    }
                }));
                
                alert.addAction(UIAlertAction(title: buttonCancel, style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -> Void in
                    debugPrint("cancelado")
                }));
                
                self.presentViewController(alert, animated: true, completion: nil)
            }
            
            // We handled JavaScript communication, so there is no page to be loaded.
            return false
        }
