$('#form') is the form in your case. It is the jQuery node, however, so you need to use jQuery functions on it...
Refer to the jQuery docs for more help on selectors and the available API
jQuery Docs
Also, if you are using jQuery, you don't need to do all of the 'getElementById' stuff, as you can just access everything through jQuery selectors.
//A couple selector examples
$('#id') //By Id
$('.class') //By Class
$('tag') //By element tag
$('#id').next() //Get next element
$('#id').children() //list of child nodes
$('#id').find('#id2') //element id2 somewhere inside id1
For completeness, Here are some api examples
$('#id').css('background','red') //Change background to red
$('#id').submit() //if id element is a form, submit it
$('#id').val() //if id element is an input, get its value
$('#id').text() //the text of an element
$('#id').hide() //hide the element
$('#id').show() //show the element