contract Saleable is Ownable {
  event Sale();
  event Unsale();

  bool public saled = false;

  modifier whenNotSaled() {
    require(!saled);
    _;
  }

  modifier whenSaled {
    require(saled);
    _;
  }

  function sale() onlyOwner whenNotSaled returns (bool) {
    saled = true;
    Sale();
    return true;
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unsale() onlyOwner whenSaled returns (bool) {
    saled = false;
    Unsale();
    return true;
  }
}
function unsale() onlyOwner whenSaled returns (bool) {
  saled = false;
  Unsale();
  return true;
}

/**
 * @dev called by the owner to unpause, returns to normal state
 */