var Formfuncs = new Object();

Formfuncs.validateForm = function()
{

var Msg = "";

var nameStr = document.getElementById("name");
thename = nameStr.value;
var add1Str = document.getElementById("add1");
address1 = add1Str.value;
var add2Str = document.getElementById("add2");
address2 = add2Str.value;
var pcodeStr = document.getElementById("pcode");
postcode = pcodeStr.value;
var heard = document.getElementById("Howheard");
hearStr = heard.value;


if (thename == "" || thename == null || thename.charAt(0) == "")
{
	Msg +=  "Your name\r\n"
}

if (address1 == "" || address1 == null ||  address1.charAt(0) == "")
{
	Msg +=  "First line of address\r\n";
}

if (address2 == "" || address2 == null ||  address2.charAt(0) == "")
{
	Msg +=  "Second line of address\r\n";
}

if (postcode == "" || postcode == null ||  postcode.charAt(0) == "")
{
	Msg +=  "Your postcode\r\n";
}

if (hearStr == "" || hearStr == null ||  hearStr.charAt(0) == "")
{
	Msg +=  "How you heard about the scheme\r\n";
}



if (Msg == ""){
var send = document.getElementById("feedbackform");
send.submit();
}

else{
alert('Please provide the following information:\r\n\r\n' + Msg);
}

}