added Smarty $APP_ROOT to specify root for JS, etc