contract MintableToken is StandardToken {
    event onMint(address indexed to, uint256 amount);
    event onSetMintable();

    bool public mintable = true;

    modifier canMint() {
        require(mintable);
        _;
    }

    /**
     * @dev Function to mint tokens
     * @param _to The address that will receive the minted tokens.
     * @param _amount The amount of tokens to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(address _to, uint256 _amount) onlyOwner whenNotLocked canMint public returns (bool) {
        totalSupply_ = totalSupply_.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit onMint(_to, _amount);
        emit Transfer(address(0), _to, _amount);
        return true;
    }

    /**
     * @dev Function to stop/continue minting new tokens.
     * @return True if the operation was successful.
     */
    function setMintable(bool _value) onlyOwner public returns (bool) {
        mintable = _value;
        emit onSetMintable();
        return true;
    }
}
/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */
function setMintable(bool _value) onlyOwner public returns (bool) {
        mintable = _value;
        emit onSetMintable();
        return true;
    }
/**
 * @dev Function to stop/continue minting new tokens.
 * @return True if the operation was successful.
 */