// JavaScript Document
<!--
function checkFields() {
	missinginfo = "";
	if (document.getElementById('firstname').value == "") {
		missinginfo += "\n     -  First name";
	}
    if (document.getElementById('lastname').value == "") {
		missinginfo += "\n     -  Last name";
	}
    if (document.getElementById('email').value == "") {
		missinginfo += "\n     -  Email Address";
	} else if (!isEmailAddr(document.getElementById('email').value)) {
		missinginfo += "\n     -  Email Address Incomplete - yourname@yourdomain.com";
	}
	if (document.getElementById('phone_day').value == "") {
		missinginfo += "\n     -  Phone day number";
	}
    if (document.getElementById('address').value == "") {
		missinginfo += "\n     -  Address";
	}
    if (document.getElementById('postcode').value == "") {
		missinginfo += "\n     -  Postcode";
	}
    if (document.getElementById('comments').value == "") {
		missinginfo += "\n     -  Comments/Message";
	}
    if (missinginfo != "") {
		missinginfo ="Make sure to fill in the following fields:\n" +
		"\n" +
		"_____________________________\n" +
		missinginfo + 
		"\n_____________________________" +
		"\n" +
		"\nPlease enter the required information and submit again!      ";
		alert(missinginfo);
		return false;
    }
		else return true;
}

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

//-->
