Basically, for the form to work correctly, you will have to copy the code that is above the DOCTYPE tag:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
And place it at the beginning of your file. Make sure you don't leave any whitespace such as extra spaces or empty lines. Also if your DOCTYPE tag looks different from this one, you may need to replace your DOCTYPE tag with the one in the contact form.
Then you will have to copy the content included between the head tags and place the content into your head tags. You will have to do the same with the body tags. Your new page should be at the same relative location to the Contact Form directories as the original page was so that all the include paths will be correct.