I need to load a page containing a form into my browser and, once loaded, enter values for some of the form's elements and then submit the form.

My problem is
a. how do i Wait for a page to be loaded, after setting document.location=<url>?
b. can i refer to the form elements by the same name as shown in the page source, as displayed by the browser? Or am I better off referring to the elements (and their properties) using relative definitions e.g. forms[0].elements[1] etc.?

Any help is greatly appreciated. u cud email me directly to krishanu@cyberdude.com.