	function validation()
	{
		if (window.document.Login.txtFirstname.value=='')
		{
			alert('Please enter your first name');
			window.document.Login.txtFirstname.focus();
			return false;
		}
		else if (window.document.Login.txtLastname.value=='')
		{
			alert('Please enter your last name');
			window.document.Login.txtLastname.focus();
			return false;
		}
		else if ((window.document.Login.txtTelephoneno.value=="")&&(window.document.Login.txtMobileno.value==""))
		{
			alert('Please enter atleast a phone number or Mobile number');
			window.document.Login.txtTelephoneno.select();
			window.document.Login.txtTelephoneno.focus();
			return false;
		}
//		else if (window.document.Login.txtTelephoneno.value=="")
//		{
//			alert('Please enter a valid phone number');
//			window.document.Login.txtTelephoneno.select();
//			window.document.Login.txtTelephoneno.focus();
//			return false;
//		}
//		else if (window.document.Login.txtMobileno.value=="")
//		{
//			alert('Please enter a valid mobile number');
//			window.document.Login.txtMobileno.select();
//			window.document.Login.txtMobileno.focus();
//			return false;
//		}
		else if (window.document.Login.txtEmail.value=='')
		{
			alert('Please enter your E-Mail');
			window.document.Login.txtEmail.focus();
			return false;
		}
		else if (validEmail(window.document.Login.txtEmail.value) == false )
	    {
			alert("Please enter a valid Email Address");
			window.document.Login.txtEmail.focus();
			window.document.Login.txtEmail.select();
			return false;
	    }
	    else if ((window.document.Login.chkpre1.checked==false)||(window.document.Login.chkpre2.value==false)||(window.document.Login.chkpre3.value==false))
		{
			alert("Please select the Contact Preferences");
			window.document.Login.chkpre1.focus();
			return false;
		}
		else if (window.document.Login.txtquestion.value=='')
		{
			alert('Please enter your Question');
			window.document.Login.txtquestion.focus();
			return false;
		}
	    return true;
	}

	function validEmail(email)
	{
		if(email==''){return true;}
			invalidChars = " /:,#'`$~!%^&*()+\"\;<>?\\|        "
			if (email == "")
			{
				return false
			}
			for (i = 0; i < invalidChars.length; i++)
			{
				badChar = invalidChars.charAt(i)
				if (email.indexOf(badChar,0) > -1)
				{
					return false
				}
			}
			atPos = email.indexOf("@",1)

			if (atPos == -1)
			{
				return false
			}

			if (email.indexOf("@",atPos+1) != -1)
			{
				return false
			}

			periodPos = email.indexOf(".",atPos)
			if (periodPos == -1)
			{
				return false
			}

			if (periodPos+3 > email.length)
			{
				return false
			}
	}
