contract BasicToken is ERC20Basic {
    using SafeMath for uint256;

    mapping (address => uint256) balances;

    address public addressFundTeam = 0x0DA34504b759071605f89BE43b2804b1869404f2;
    uint256 public fundTeam = 1125 * 10**4 * (10 ** 18);
    uint256 endTimeIco = 1551535200; //Saturday, 2. March 2019 14:00:00

    /**
    * Protection against short address attack
    */
    modifier onlyPayloadSize(uint numwords) {
        assert(msg.data.length == numwords * 32 + 4);
        _;
    }

    /**
    * @dev transfer token for a specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) public onlyPayloadSize(2) returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);
        require(transfersEnabled);
        if (msg.sender == addressFundTeam) {
            require(checkVesting(_value, now) > 0);
        }

        // SafeMath.sub will throw if there is not enough balance.
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
    * @dev Gets the balance of the specified address.
    * @param _owner The address to query the the balance of.
    * @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address _owner) public constant returns (uint256 balance) {
        return balances[_owner];
    }

    function checkVesting(uint256 _value, uint256 _currentTime) public view returns(uint8 period) {
        period = 0;
        require(endTimeIco <= _currentTime);
        if (endTimeIco + 26 weeks <= _currentTime && _currentTime < endTimeIco + 52 weeks) {
            period = 1;
            require(balances[addressFundTeam].sub(_value) >= fundTeam.mul(95).div(100));
        }
        if (endTimeIco + 52 weeks <= _currentTime && _currentTime < endTimeIco + 78 weeks) {
            period = 2;
            require(balances[addressFundTeam].sub(_value) >= fundTeam.mul(85).div(100));
        }
        if (endTimeIco + 78 weeks <= _currentTime && _currentTime < endTimeIco + 104 weeks) {
            period = 3;
            require(balances[addressFundTeam].sub(_value) >= fundTeam.mul(65).div(100));
        }
        if (endTimeIco + 104 weeks <= _currentTime && _currentTime < endTimeIco + 130 weeks) {
            period = 4;
            require(balances[addressFundTeam].sub(_value) >= fundTeam.mul(35).div(100));
        }
        if (endTimeIco + 130 weeks <= _currentTime) {
            period = 5;
            require(balances[addressFundTeam].sub(_value) >= 0);
        }
    }
}
function balanceOf(address _owner) public constant returns (uint256 balance) {
    return balances[_owner];
}

/**
 * @dev Gets the balance of the specified address.
 * @param _owner The address to query the the balance of.
 * @return An uint256 representing the amount owned by the passed address.
 */