I am having a "submit" problem when passing name and email textbox information from form1 (formtest1.htm) to form2 (output.htm). After completing this info transfer when I click submit I get the error message: "Referring form output.htm?name=name&email=email&submit=submit does not exist"

However, form 2 submits perfectly if I simply keyword the info into form2 and click submit. So, the problem occurs only when I pass information from one form to another. Below are the 2 test forms that I have been using. I've spend hours trying to solve this problem, please help.

Form1 (formtest1.htm)

<FORM NAME="form1" ACTION="output.htm">
<p>
<INPUT TYPE="text" NAME="name" size="30" value="Name">
</p>
<p>
<INPUT TYPE="text" size="30" name="email" value="Email">
</p>
<p>
<INPUT TYPE="submit" name="submit" value="Submit">
</p>
</FORM>

</body>

Form 2 (output.htm)

<body bgcolor="#FFFFFF" text="#000000">
<FORM NAME="form1" method="post" action="/cgi-bin/fmail.pl">
<input type="hidden" name="recipient" value="tpearson@twcny.rr.com">
<input type="hidden" name="subject" value="Question Form 1.0">
<input type="hidden" name="thankurl" value="http://www.jrclancy.com/thankyou.htm">

<p>
<INPUT TYPE="text" NAME="name" size="30">
</p>
<p>
<INPUT TYPE="text" NAME="email" size="30">
</p>
<p>
<TEXTAREA NAME="comment"></TEXTAREA>
</p>
<p>
<INPUT TYPE="submit" name="submit" value="Submit">
</p>
</FORM>

<SCRIPT LANGUAGE="JavaScript"><!--
function getParm(string,parm) {
// returns value of parm from string
var startPos = string.indexOf(parm + "=");
if (startPos > -1) {
startPos = startPos + parm.length + 1;
var endPos = string.indexOf("&",startPos);
if (endPos == -1)
endPos = string.length;
return unescape(string.substring(startPos,endPos));
}
return '';
}

function replace(string,text,by) {
// Replaces text with by in string
var i = string.indexOf(text), newstr = '';
if ((!i) || (i == -1))
return string;
newstr += string.substring(0,i) + by;
if (i+text.length < string.length)
newstr += replace(string.substring(i+text.length,string.length),text,by);
return newstr;
}


var passed = replace(location.search.substring(1),"+"," ");

document.form1.name.value = getParm(passed,'name');
document.form1.email.value = getParm(passed,'email');
//--></SCRIPT>

<script language="JavaScript"><!--
document.form['form1'].submit;
//--></script>
</body>