def find_volume_id(onclick):
    """
    Find book id from the given string.  The string actually is javascript
    function.
    """
    # find which kind of quote, ' or "
    quote = "'"
    start = onclick.find(quote)
    if start == -1:
        quote = '"'

    _id = ''
    start = onclick.find(quote)
    end = onclick.rfind(quote)
    if start != -1 and end != -1:
        _id = onclick[start+1:end]

    return _id