Imhaving trouble submitting my form, it contains javascript to validate the form before sending to the server, and also a cgi script in my hosts cgi-bin.......but it comes up with an internal error 505 message.....ive contacted my host, they sorted it out there end, however it still doesnt work. Anyone familiar with cgi and javascript take a look at this:

use CGI;

my $query = new CGI;

print $query->header ( );

my $first_name = $query->param("first_name");
my $surname = $query->param("surname");
my $company = $query->param("company");
my $telephone = $query->param("telephone");
my $email = $query->param("email");
my $website = $query->param("website");
my $interested_in = $query->param("interested_in");
my $how_did_you_hear_about_us = $query->param("how_did_you_hear_about_us");
my $enquiry = $query->param("enquiry");

open ( MAIL, "| /usr/sbin/sendmail -t" );
print MAIL "From: $email\n";
print MAIL "To: info@positivimpact.co.uk\n";
print MAIL "Subject: Form Submission\n\n";
print MAIL "$enquiry\n";
print MAIL "\n.\n";
close ( MAIL );

and page html looks like this


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>Positiv Impact Webdesign & Identity Solutions - Contact Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" type="text/css" href="impact.css" />
<link rel="stylesheet" type="text/css" href="contactbg.css" />

<script language="JavaScript">

<!--

function validate_form ( )
{
valid = true;

if ( document.contact_form.first_name.value == "" )
{
alert ( "Please enter your first name." );
valid = false;
}

if ( document.contact_form.surname.value == "" )
{
alert ( "Please enter your surname." );
valid = false;
}

if ( document.contact_form.telephone.value == "" )
{
alert ( "Please enter your telephone number." );
valid = false;
}

if ( document.contact_form.email.value == "" )
{
alert ( "Please enter your email address." );
valid = false;
}

if ( document.contact_form.email.value.index0f("@") == -1
|| document.contact_form.email.value.index0f(".") == -1)
{
alert ( "email address is incorrect." );
valid = false;
}

if ( document.contact_form.how_did_you_hear_about_us.selectedIndex == 0 )
{
alert ( "Please Select from the list how you heard about Positiv Impact." );
valid = false;
}



return valid;
}


//-->

</script>

</head>

<body>
<div id="outercontainer">
<img src="mainlogo.gif" width="248" height="46" title="positiv impact webdesign & identity" />
<h5>Webdesign <span class="and">&amp;</span> Identity Solutions</h5>
<div id="maincontainer">
<div id="top">
<div id="menu">
<a href="index.html" title="homepage">home</a>
<a href="webdesign.html" title="webdesign services">webdesign</a>
<a href="identity.html" title="corporate identity services">identity</a>
<a href="portfolio.html" title="portfolio">portfolio</a>
<a href="contact.html" title="contact us for a free consultation">contact</a>
</div>
<h4 title="first impressions. lasting impact.">Turning first impressions<br/>into lasting impact.</h4>
</div>
<div id="inner">
<div id="maininfo2">
<h1>contact us</h1>
<p class="intro2">Please use the contact details below for <span class="grey">any enquiries</span>, or alternatively fill out the contact form, attaching if relevant the completed <a href="WebsiteDesignInterestForm.doc" target="_blank" title="download the Website Design Interest Form">Website Design Interest Form</a>.
<br/><br/><span class="white">T&nbsp;&nbsp;</span><span class="orange">07863 190274</span><br/><br/><span class="white">E</span>&nbsp;&nbsp;<a href="mailto:info@positivimpact.co.uk ?subject=website enquiry" title="email your enquiries here">info@positivimpact.co.uk</a><br/><br/><br/></p></div>
<div id="right">
<form name="contact_form" form action="http://www.positivimpact.co.uk/cgi-bin/formmailer.cgi" method="post">
<fieldset><legend>personal details</legend>
<table width="400" cellpadding="1" cellspacing="0" border="0" id="toptable" >
<tr><td width="80" class="formheader">First Name&nbsp;<span class="asterisk">&bull;</span>&nbsp;</td><td width="120" ><input type="text" name="first_name" class="formbox" size="10" tabindex="1" /></td><td width="80" class="formheader">Telephone&nbsp;<span class="asterisk">&bull;</span>&nbsp;</td><td width="120" ><input type="text" name="telephone" class="formbox" size="10" tabindex="4" /></td></tr>
<tr><td width="80" class="formheader">Surname&nbsp;<span class="asterisk">&bull;</span>&nbsp;</td><td width="120" ><input type="text" name="surname" class="formbox" size="10" tabindex="2" /></td><td width="80" class="formheader">Email&nbsp;<span class="asterisk">&bull;</span>&nbsp;</td><td width="120" ><input type="text" name="email" class="formbox" size="10" tabindex="5" /></td></tr>
<tr><td width="80" class="formheader">Company&nbsp;&nbsp;</td><td width="120" ><input type="text" name="company" class="formbox" size="10" tabindex="3" /></td><td width="80" class="formheader">Website&nbsp;&nbsp;</td><td width="120" ><input type="text" name="website" class="formbox" size="10" tabindex="6" /></td></tr>
</table></fieldset>
<fieldset><legend>enquiry details</legend>
<table width="400" cellpadding="0" cellspacing="0" border="0" id="bottomtable" >
<tr><td width="80" class="formheader">Area of&nbsp;&nbsp; <br/>interest&nbsp;&nbsp;</td><td width="120"><select name="interested_in"><option value="please select">Please Select</option><option value="New Website">New Website</option>
<option value="website re-design">Site Re&ndash;Design</option><option value="identity">Identity</option><option value="logo design">Logo Design</option><option value="additional pages">Extra Pages</option><option value="Email web page">Webpage Email</option><option value="e-commerce">E&ndash;Commerce</option></select></td><td width="200" rowspan="2"><p class="enquiryheader">Enquiry&nbsp;<span class="asterisk"></span>
<textarea name="enquiry" cols="24" rows="6" class="enqformbox"></textarea></p></td></tr>
<tr><td width="80" class="formheader">How did you&nbsp;&nbsp<br/> find us&nbsp;<span class="asterisk">&bull;</span>&nbsp;</td><td width="120"><select name="how_did_you_hear_about_us"><option value="please select">Please Select</option><option value="internet">Search Engine</option><option value="mailing">Direct Mailing</option><option value="e-directory">Online Directory</option><option value="business card">Business Card</option><option value="Recommended">Recommended</option></select></td></tr></table>
<form action="" method="post" enctype="multipart/form-data"><p class="attach">Attach File&nbsp;&nbsp;<input type="file" class="attachbox" size="44" name="title"/></p></fieldset>
<p class="sendbuttons"><input type="submit" value="send" name="send" class="formbox2" style="CURSOR: hand" title="sumbit enquiry form" />&nbsp;<input type="reset" value="reset" class="formbox2" style="CURSOR: hand" title="reset enquiry form" /></p>
</form></form><p class="asteriskinfo">required information&nbsp;<span class="asterisk">&bull;</span></p>
</div>
</div>
</div>
<div id="footer">
<p span class="copyright"><span class="letters">&copy;</span> positiv impact 2006</span></p>
<p span class="contacts"><span class="letters">t:</span> 07863 190274&nbsp;&nbsp;&nbsp;<a href="mailto:info@positivimpact.co.uk ?subject=website enquiry">
<span class="letters">e:</span> info@positivimpact.co.uk</a></span></p>
</div>
</div>
</div>
</body>
</html>

Many thanks!!!