// loads a WMC (returns array of JS code)
 case 'loadWmc':
     $wmcId = $ajaxResponse->getParameter("id");
     if ($wmc->createFromDb($wmcId)) {
         $updatedWMC = $wmc->updateUrlsFromDb();
         $wmc->createFromXml($updatedWMC);
         $skipWms = $ajaxResponse->getParameter("skipWms");
         if (is_array($skipWms)) {
             $jsArray = $wmc->toJavaScript($skipWms);
         } else {
             $jsArray = $wmc->toJavaScript();
         }
         if ($jsArray) {
             $resultObj["javascript"] = $jsArray;
             //increment load_count
             $wmc->incrementWmcLoadCount();
             $ajaxResponse->setResult($resultObj);
             $ajaxResponse->setSuccess(true);
             break;
         }
     }
     $ajaxResponse->setMessage(_mb("WMC could not be loaded."));
     $ajaxResponse->setSuccess(false);
     break;
 case 'loadWmcFromFile':
     $serverFilename = $ajaxResponse->getParameter("filename");
     $wmc = new wmc();
     $wmcDoc = file_get_contents(TMPDIR . "/" . $serverFilename);
     if (!$wmcDoc) {
         $ajaxResponse->setMessage(_mb("WMC could not be loaded."));
         $ajaxResponse->setSuccess(false);