<!--
function showthat()
{
	document.getElementById("form").style.visibility='visible';
	document.getElementById("form").innerHTML='<form action="guestbook.php" method="post" onsubmit="return check()"><div class="moder">Please note: All comments will be moderated. Please do not post anything defamatory or rude as these will be automatically deleted. If you are under 16 please check with a parent or guardian that you have their permission to do this. </div><table width="100%" border="0" cellspacing="0" cellpadding="3" style="margin-top:10px;"> <tr>			<td width="33%">Name</td>			<td width="67%"><input type="text" class="testinput" id="name" name="name"  /></td>			  </tr>			  <tr>				<td>Email</td>				<td><input type="text" class="testinput"   id="email1" name="email" /></td>			  </tr>		  <tr>				<td>Location</td>				<td><input type="text" class="testinput"   id="loc" name="loc" /></td>			  </tr>	  <tr>				<td>Website</td>				<td><input type="text" class="testinput"   id="web" name="web" /></td>			  </tr>		  <tr>				<td valign="top">Comments</td>				<td><textarea class="testinput" style="height:60px;" name="content" id="content" ></textarea></td>			  </tr>			  <tr>				<td>Confirm Security Code </td>				<td><div class="fl"><img src="includes/sec.php" /></div><div class="fr"><input id="coder" name="coder" type="text"  class="testinput3" /></div></td>			  </tr>		  <tr>				<td>&nbsp;</td>				<td><input type="hidden" name="f" value="1"><input type="image" src="images/info/but_sub.gif" /></td>			  </tr>	</table>		</form>'
}

function thanks()
{
document.getElementById("thanks").innerHTML='Thank you for submitting your testimonial! It has been put into a queue to be moderated so check back soon to see if it makes our site!';
}
function ma(email)
{
	invalid="/:,;";
	if(email=="")
		{return false;}
	for(i=0;i<invalid.length;i++)
	{
		bad=invalid.charAt(i);
		if(email.indexOf(bad,0)!=-1)
		{return false;}
	}
	at=email.indexOf("@",0);
	if((at==-1)||(at==0))
		{return false;}
	if(email.indexOf("@",at+1)!=-1)
		{return false;}
	period=email.indexOf(".",at);
	if((period==-1)||(period==at+1))
		{return false;}
	if(period+3>email.length==-1)
		{return false;}
    return true;
}
function check()
{

if(document.getElementById("name").value==''){
alert("Enter your name");
return false;}

	else if(!ma(document.getElementById("email1").value)){
	alert("Enter valid email");
	return false;}

		else if(document.getElementById("loc").value==''){
		alert("Please enter location");
		return false;
		}
			else if(document.getElementById("content").value==''){
				alert("Enter content");
				return false;}

				else if(document.getElementById("coder").value==''){
				alert("Enter security code");
				return false;}

return true;
}

//-->
