Well, I don't know of any official command documentation from foscam, but you might find some on google. This is one of them:
http://www.zoneminder.com/wiki/index.php/Foscam[
^]. A more detailed (and as I know most recent), but less comprehensive is this one:
http://www.sistemasorp.es/blog/IPCAMCGISDKV2.1.pdf[
^].
You simply have to issue http GET commands to the camera. If you don't want page reload, use ajax for that. If you encounter command compatibility issues, you can easily reverse engineer by using IE9 developer toolbar network profiler or a sniffer tool like Fiddler.