I was wondering what the value of VBO_NumArrays was (it's not defined in the two sources you gave)
Also you are supplying the wrong count to drawArrays in at least one place (6 instead of 18) but I doubt that is causing the main problem.
Also you are supplying the wrong count to drawArrays in at least one place (6 instead of 18) but I doubt that is causing the main problem.