function checkText(textField,msg)
		{
		var text = document.getElementById(textField);
		if(text.value=="")
		{
		alert(msg);
		return false;
		}
		else
		{
		return true;
		}
		}
	
		function checkDropDown(dropDownList,msg)
		{
		var list = document.getElementById(dropDownList);
		return true;
		}
function validateThenSubmit()
{
applayVars();
if(checkText('txtName',nameErrorMsg)&&
checkText('txtEmail',emailErrorMsg)&&
checkText('txtTel',telErrorMsg)&&
checkDropDown('comboCountry',countryErrorMsg)&&
checkText('txtUserName',usernameErrorMsg))

{
try
{
if(
   checkText('txtPassword',passwordErrorMsg)&&
   checkText('txtComparePassword',confirmPasswordErrorMsg)
   )
{
alert(registrationMSG);
return true;
}
else
{
return false;
}
}
catch(e)
{
alert(registrationMSG);
return true;
}
}
return false;
}
