﻿function checkform(){
	if (document.myform.YourName.value==""){
	alert("Your Name cannot be empty!");
	document.myform.YourName.focus();
	return false;
	}
	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 your E-mail 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=5 cellPadding=0 width=100% border=0 align=\"center\">");
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=\"woodpelletline.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\" align=left style=\"color:#0085B2;\">For any help regarding our company or products please write us below and we will respond within 1 business day, thank you:</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%><SPAN>*</SPAN>Your Name:</TD>");
document.writeln("        <TD width=80%><INPUT name=\"YourName\"></TD></TR>");
document.writeln("        <TR>");
document.writeln("        <TD align=right><SPAN>*</SPAN>E-mail:</TD>");
document.writeln("        <TD><INPUT name=\"Email\"></TD></TR>");
document.writeln("        <TR>");
document.writeln("        <TD align=right><SPAN>*</SPAN>Message:</TD>");
document.writeln("        <TD><TEXTAREA name=\"Message\" rows=8 cols=40></TEXTAREA></TD></TR>");
document.writeln("        <TR>");
document.writeln("        <TD>&nbsp;</TD>");
document.writeln("        <TD><INPUT type=\"submit\" value=\"Send\" name=\"button\"></TD></TR></FORM></TBODY></TABLE>");
