You can find the video memory of an Nvidia card using the NVX_gpu_memory_info extension, or an ATI card using ATI_meminfo. Here is a snippet of code I found which might get you started.
However, Paul Nettle at flipcode wonders why one would want to find the available video memory, saying:
The reason it's difficult (and sometimes impossible) to determine the amount of video memory is very similar to the reasons why OpenGL won't let you lock the frame buffer and access it directly.
And goes on to explain, in essence, that an "amount of video memory" might not actually mean anything. I concur with him on the reasoning that, for example, the amount of "free" memory in a Windows Vista/7 machine is irrelevant; hopefully there is no free memory, because free memory is wasted memory. But there is always some areas of memory dedicated to caches which are cleared by Windows, should an application need them.