function checkFormGeneric() {
var showError = false;
var hi_colour = "#FFA800";
var lo_colour = "#FFFFFF";

if (document.frm.email.value=="")
{
	showError = true;
	document.frm.email.style.backgroundColor=hi_colour;
}
else
{
	//document.frm.email.style.backgroundColor=lo_colour;
	if (!isEmail(document.frm.email.value))
	{
		showError = true;
		document.frm.email.style.backgroundColor=hi_colour;
	}
	else
	{
		document.frm.email.style.backgroundColor=lo_colour;
	}
}



if (document.frm.realname.value=="")
{
	showError = true;
	document.frm.realname.style.backgroundColor=hi_colour;
}
else
{
	document.frm.realname.style.backgroundColor=lo_colour;
}

if (document.frm.CompanyName.value=="")
{
	showError = true;
	document.frm.CompanyName.style.backgroundColor=hi_colour;
}
else
{
	document.frm.CompanyName.style.backgroundColor=lo_colour;
}

if (document.frm.ContactNumber.value=="")
{
	showError = true;
	document.frm.ContactNumber.style.backgroundColor=hi_colour;
}
else
{
	document.frm.ContactNumber.style.backgroundColor=lo_colour;
}

if (document.frm.TimetoCall.value=="")
{
	showError = true;
	document.frm.TimetoCall.style.backgroundColor=hi_colour;
}
else
{
	document.frm.TimetoCall.style.backgroundColor=lo_colour;
}

if (document.frm.comments.value=="")
{
	showError = true;
	document.frm.comments.style.backgroundColor=hi_colour;
}
else
{
	document.frm.comments.style.backgroundColor=lo_colour;
}
getParam(document.frm)
res = document.getElementById('result').innerHTML;
if (res=="" || res=="&nbsp;" || document.frm.txtCaptcha.value=="" || res=="fail")
{
	showError = true;
	document.frm.txtCaptcha.style.backgroundColor=hi_colour;
}
else
{
	document.frm.txtCaptcha.style.backgroundColor=lo_colour;
}


//alert(res);

if (showError) 
{
	alert("Some information is incorrect or missing.\nPlease correct your entries and try again.");	
	return false;
}
else
{
	return true;
}
//document.frm.submit();
}

function isEmail(string) 
{
	if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
		return true;
	else
		return false;
}