contract Activatable is Manageable {
  event ActivatedContract(uint256 activatedAt);
  event DeactivatedContract(uint256 deactivatedAt);

  bool public active;
  
  /**
   * @dev Check if the contract is active. 
   */
  modifier isActive() {
    require(active);
    _;
  }

  /**
   * @dev Check if the contract is not active. 
   */
  modifier isNotActive() {
    require(!active);
    _;
  }

  /**
   * @dev Activate the contract.
   */
  function activate() public onlyManager isNotActive {
    // Set the flag to true.
    active = true;

    // Trigger event.
    ActivatedContract(now);
  }

  /**
   * @dev Deactiate the contract.
   */
  function deactivate() public onlyManager isActive {
    // Set the flag to false.
    active = false;

    // Trigger event.
    DeactivatedContract(now);
  }
}
function deactivate() public onlyManager isActive {
  // Set the flag to false.
  active = false;

  // Trigger event.
  DeactivatedContract(now);
}

/**
 * @dev Deactiate the contract.
 */