public function captcha($securityName, $type)
 {
     $captcha = Security::getSecurity($securityName);
     if (!$captcha) {
         $this->router->show404(true);
     }
     if ($type == 'refresh') {
         $this->setAjaxController();
         $captcha->flush();
         $this->addAjaxDatas('imageUrl', $captcha->get('image', true));
         $this->addAjaxDatas('audioUrl', $captcha->get('audio', true));
     } else {
         if ($type == 'image') {
             if (!$captcha->getImage()) {
                 $this->router->show404(true);
             }
             $captcha->get('image');
         } elseif ($type == 'audio') {
             if (!$captcha->getAudio()) {
                 $this->router->show404(true);
             }
             $captcha->get('audio');
         } else {
             $this->router->show404(true);
         }
         $this->setAutoCallDisplay(false);
     }
 }