// hide the frigging address details for the form from frigging robots!
var nc_tn = "act";  nc_tn2 = "mycroft.cont";

var toname = (nc_tn2 + nc_tn);

var email_prompt = "Your email address";
var name_prompt = "Your first (or GI pet) name";

		function check_email(address) {
			if ((address == "") || (address.indexOf ('@') == -1) || (address.indexOf ('.') == -1))
				return false;
			return true;
		} // function check_email
		
		function verify (aform) {
			if ((aform.TheirName.value=="") || (aform.TheirName.value==name_prompt)) {
				alert("Please let me know your first name - seems so impersonal, otherwise.");
				this.document.contact_form.TheirName.focus();
				return false;
			}
			if ((aform.TheirEmail.value=="")  || (aform.TheirEmail.value==email_prompt)) {
				alert("Please enter your email address! (used only to reply, we promise)");
				this.document.contact_form.TheirEmail.focus();
				return false;
			}
			if (!check_email(document.aform.TheirEmail.value)) {
				alert("Ack! Please use a regular email address in the form of:\n yourname@domain.ext");
				this.document.contact_form.TheirEmail.focus();
				return false  
			}
			if ((aform.EmailBody.value=="") || (aform.EmailBody.value=="Leave me your thoughts here...")) {
				alert("You really have nothing to say?\n(if so, please type it in the text box)");
				this.document.contact_form.EmailBody.focus();
				return false;
			}
		} // function verify
	
	
function send_contact_form (whom, msg) {
	document.write ('						<FORM  name="contact_form" action="http://virtualfulfillmentarts.com/scgi-bin/FormMail.pl" method="post" onSubmit="return verify(this)">	');

	document.write ('							<INPUT type="hidden" value="http://backsideoflove.com/contact/contact_thanks.html" name=redirect> ');
	document.write ('							<INPUT type="hidden" value="1" name=print_blank_fields> ');
	document.write ('							<INPUT type="hidden" value="' + nc_tn2 + nc_tn + '@backsideoflove.com" name=email> ');
	document.write ('							<INPUT type="hidden" value="(' + toname + ')" name=subject> ');
	document.write ('							<INPUT type="hidden" value="' + toname + '@backsideoflove.com" name=recipient> ');

	document.write ('							<table align="center" width="100%" border="0" cellpadding="5" cellspacing="0">	');

	document.write ('								<tr>	');
	document.write ('                                	<td width="100%" class="main_content" style="text-align: center;">	');
	document.write ('(contact <b>' + whom + '</b>)<br />');
	document.write (msg + '<br /><br />');
	document.write ('									</td>	');
	document.write ('                            </tr>	');

	document.write ('						<tr>	');
	document.write ('                                	<td align="center" valign="middle" width="100%" height="5">	');
	document.write ('								<img src="http://backsideoflove.com/images/pixel_darkpurple.gif" height="5" width="90%" align="center" border="0">');
	document.write ('							</td>	');
	document.write ('                            </tr>	');
	document.write ('                            <tr>	');
	document.write ('                                	<td  width="100%" class="instructions">	');
	document.write ('								Please let me know your first name (or GI petname) here:<br>	');
	document.write ('                                	    <INPUT  name="TheirName" value="' + name_prompt + '" onMouseover="window.status=\'Let me know a first name or GI petname, please\'" onFocus="this.value=\'\'" size="25" tabindex="1" >	');
	document.write ('                                	</td>	');
	document.write ('						</tr>	');
	document.write ('						<tr>	');
	document.write ('						   	<td height="5"  align="center" valign="middle" >	');
	document.write ('								<img src="http://backsideoflove.com/images/pixel_darkpurple.gif" height="5" width="90%" align="center" border="0">');
	document.write ('							</td>	');
	document.write ('                            </tr>	');
	document.write ('						<tr>	');
	document.write ('                                	<td  width="100%" class="instructions">	');
	document.write ('								...and your email address here (used ONLY in-house - see our <a href="../help/privacy_statement.html" target="_blank">privacy statement</a>):<br>	');
	document.write ('								<INPUT size="25" name="TheirEmail" onFocus="this.value=\'\'" onMouseover="window.status=\'I need an email address to reply, of course...\'" value="' + email_prompt + '" tabindex="2">	');
	document.write ('                                	</td>	');
	document.write ('						</tr>	');
	document.write ('						<tr>	');
	document.write ('                                	<td height="5"  align="center" valign="middle" >	');
	document.write ('								<img src="http://backsideoflove.com/images/pixel_darkpurple.gif" height="5" width="90%" align="center" border="0">');
	document.write ('							</td>	');
	document.write ('                            </tr>	');
	document.write ('						<tr>	');
	document.write ('                                	<td  width="100%" class="instructions">	');
	document.write ('								...and then just let me know what I can do for you here! (Take as much room as you want):<br>	');
	document.write ('                                 	<TEXTAREA name="EmailBody" rows="9" cols="60" tabindex="3" value="Leave me your thoughts here...">	');
	document.write ('								</TEXTAREA>	');
	document.write ('							</td>	');
	document.write ('						</tr>	');
	document.write ('							<td class="instructions">	');
	document.write ('								(click here once - you\'ll see a confirmation)<br />	');
	document.write ('								<input TYPE="SUBMIT" VALUE="  email this to ' + whom + '  " name="submit">	');
	document.write ('							</td>	');
	document.write ('						</tr>	');

	document.write ('							</table>	');
	document.write ('						</FORM>			');
						
} // send_contact_form

	

