function emailvalidation(entered, alertbox)
{
// E-mail-Validation (c) Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}
}
}

function valuevalidation(entered, min, max, alertbox, datatype)
{
// Value-Validation (c) Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
checkvalue=parseFloat(value);
if (datatype)
  {smalldatatype=datatype.toLowerCase();
   if (smalldatatype.charAt(0)=="i") {checkvalue=parseInt(value)};
  }
if ((parseFloat(min)==min && checkvalue<min) || (parseFloat(max)==max && checkvalue>max) || value!=checkvalue)
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}

function digitvalidation(entered, min, max, alertbox, datatype)
{
// Digit-Validation (c) Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
checkvalue=parseFloat(value);
if (datatype)
  {smalldatatype=datatype.toLowerCase();
   if (smalldatatype.charAt(0)=="i") {checkvalue=parseInt(value); if (value.indexOf(".")!=-1) {checkvalue=checkvalue+1}};
  }
if ((parseFloat(min)==min && value.length<min) || (parseFloat(max)==max && value.length>max) || value!=checkvalue)
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}

function emptyvalidation(entered, alertbox)
{
// Emptyfield-Validation (c) Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove the this line and the two lines above.
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}


function formvalidation(thisform)
{
with (thisform)
{
if (emptyvalidation(Name,"Name Field Is Required")==false) {Name.focus(); return false;};
if (emailvalidation(Email,"Valid Email Address Is Required")==false) {Email.focus(); return false;};
if (emptyvalidation(Phone,"Phone Number Is Required")==false) {Phone.focus(); return false;};
if (emptyvalidation(Users,"Number Of Users Is Required")==false) {Users.focus(); return false;};
if (checkme(Interested, "TEST MONKEY")==false) {Interested.focus(); return false;};
}
}


<!--//hide script
function checkme() {
missinginfo = "";
if (!document.download.Interested.checked) {
missinginfo += "\n Please check the option indicating you are interested in project tracking, time tracking, or expense tracking software.";
}
if (missinginfo != "") {
//missinginfo ="__________________________________\n" +
//"Required information is missing: \n" +
//missinginfo + "\n__________________________________" +
//"\nPlease complete and resubmit.";
alert(missinginfo);
return false;
}
else {
return true;
}
}