﻿function checkform(){

	

	if (document.myform.Email.value == ""){

		alert ("Email cannot be empty!");

		document.myform.Email.focus();

		return false;

	}

	if (document.myform.Email.value.indexOf('@')<1 || document.myform.Email.value.indexOf('.')<1){

		alert ("Are you sure the email is correct?");

		document.myform.Email.focus();

		return false;

	}

	

	if (document.myform.Message.value == ""){

		alert ("Message cannot be empty!");

		document.myform.Message.focus();

		return false;

	}

}

document.writeln("<TABLE class=myform  cellSpacing=0 cellPadding=0  border=0>");

document.writeln("        <FORM name=\"myform\" action=\"http://email.ascof.com/ascof.asp\" method=\"POST\" onsubmit=\"return checkform()\">");

document.writeln("        <input type=\"hidden\" name=\"Domain\" value=\"biodiesel-machine.com\" />");

document.writeln("        <TBODY>");

document.writeln("        <TR>");

document.writeln("          <TD colspan=\"2\" align=center>&nbsp;</TD>");

document.writeln("        </TR>");

document.writeln("        <TR>");

document.writeln("          <TD colspan=\"2\" height=\"30\" align=\"left\"><hr />If you\'re interested in our products or have any questions, please let us know. Don\'t hesitate to contact us!</TD>");

document.writeln("          </TR>");

document.writeln("        <TR>");

document.writeln("          <TD colspan=\"2\" height=\"2\"></TD>");

document.writeln("          </TR>");

//document.writeln("        <TR>");

//document.writeln("        <TD align=right width=20% height=20><SPAN></SPAN>Your Name:&nbsp; </TD>");

//document.writeln("        <TD width=80%><INPUT name=\"YourName\"><span>&nbsp;(Optional)</span></TD></TR>");

document.writeln("        <TR>");

document.writeln("        <TD align=right width=20%  height=32><SPAN>*</SPAN>E-mail: &nbsp;</TD>");

document.writeln("        <TD><INPUT name=\"Email\" size=\"42\"></TD></TR>");



document.writeln("        <TR>");

document.writeln("        <TD align=right><SPAN>*</SPAN>Message:&nbsp; </TD>");

document.writeln("        <TD><TEXTAREA name=\"Message\" rows=8 cols=40></TEXTAREA></TD></TR>");

document.writeln("        <TD>&nbsp;</TD>");

document.writeln("        <TD><INPUT type=\"submit\" value=\"Send\" name=\"button\" style=\"padding:3px 15px;\" ></TD></TR></TBODY></FORM></TABLE>");
