/**
  * BootPage
  * This page initilizes a page 
  * @throws Exception
  */
 public static function Run($strAppName)
 {
     self::$strAppName = $strAppName;
     define('APP_FRONTEND_DIR', APP_DIR . '/' . $strAppName);
     define('__APP_URL__', __BASE_URL__ . '/apps/' . $strAppName);
     define('__CUSTOME_CONFIG_FILE__', APP_FRONTEND_DIR . '/_config.inc.php');
     if (file_exists(__CUSTOME_CONFIG_FILE__)) {
         require_once __CUSTOME_CONFIG_FILE__;
     }
     if (defined('APP_TEMPLATE_LOC')) {
         $arrParts = explode('-', APP_TEMPLATE_LOC);
         if (count($arrParts) == 2) {
             $intIdAppTemplate = $arrParts[0];
             $intIdAppTemplateVersion = $arrParts[1];
         } else {
             $arrParts = explode('/', APP_TEMPLATE_LOC);
             if (count($arrParts) != 2) {
                 throw new Exception("Invalid 'APP_TEMPLATE_LOC' defined");
             }
             $intIdAppTemplate = $arrParts[0];
             $intIdAppTemplateVersion = $arrParts[1];
         }
     } else {
         throw new Exception("APP_TEMPLATE_DIR not defined");
     }
     define('APP_BACKEND_DIR', sprintf('%s/%s/%s', __APP_TPL_DIR__, $intIdAppTemplate, $intIdAppTemplateVersion));
     define('APP_BACKEND_CORE_DIR', APP_BACKEND_DIR . '/_core');
     define('APP_CONTROL_LOC', APP_FRONTEND_DIR . '/index.php');
     //TODO add definitions for new AppTemplate assets
     if (!defined('__CUST_FB_APP_ID__')) {
         define('__FB_APP_ID__', __GLOBAL_FB_APP_ID__);
     } else {
         define('__FB_APP_ID__', __CUST_FB_APP_ID__);
     }
     /*if(!defined('__CUST_FB_APP_KEY__')){
     			define('__FB_APP_KEY__', __GLOBAL_FB_APP_KEY__);
     		}else{
     			define('__FB_APP_KEY__', __CUST_FB_APP_KEY__);
     		}*/
     if (!defined('__CUST_FB_APP_SECRET__')) {
         define('__FB_APP_SECRET__', __GLOBAL_FB_APP_SECRET__);
     } else {
         define('__FB_APP_SECRET__', __CUST_FB_APP_SECRET__);
     }
     //Exicute the functions defined in Framework.php
     foreach (self::$arrRunFunctions as $intIndex => $strFunction) {
         $strFunction();
         //Should we pass it any info?
     }
     require_once APP_CONTROL_LOC;
 }