function validateform(frmSubscribe)
{

		var invalid12=new Array(" ","!","@","#","$","%","^","&","*","=","'",'"',"`","?","|",".","{","}",";",":","~","<",">","+",",","-");
		var strFName = "";
		var strLName = "";
		var strAddress = "";
		var strCity = "";
		var strState = "";
		var strPin = "";
		var strEmail = "";
		var strDayPhone = "";
		var strTerm = "";

		var lenFName = "";
		var lenLName = "";
		var lenAddress = "";
		var lenCity = "";
		var lenState = "";
		var lenPin = "";
		var lenEmail = "";
		var lenDayPhone = "";
		var lenTerm = "";
				
		
		var allValid = true;
		var allNum = "";
		
		var strCheckNum = "0123456789()+- ";

		var strCheckNumber = "0123456789";
		
		var strCheckAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ";
		
		var strCheckAlphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
		
		strFName = document.frmSubscribe.txtFName.value;
		lenFName =strFName.length;
		if(lenFName == 0)
		{
			alert("Please enter the First Name.");
			document.frmSubscribe.txtFName.focus();
			return false;
		}
		if(strFName.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtFName.focus();
			return false;
		}
		for (i = 0;  i < strFName.length;  i++)
		{
			ch = strFName.charAt(i);
			for (j = 0;  j < strCheckAlpha.length;  j++)
				if (ch == strCheckAlpha.charAt(j))
				break;
				if (j == strCheckAlpha.length)
				{
					allValid = false;
					break;
				}
		}
		if (!allValid)
		{
			alert("Please enter only  characters in the First Name.");
			document.frmSubscribe.txtFName.focus();
			return false;
		}

		strLName = document.frmSubscribe.txtLName.value;
		lenLName =strLName.length;
		if(lenLName == 0)
		{
			alert("Please enter the Last Name.");
			document.frmSubscribe.txtLName.focus();
			return false;
		}
		if(strLName.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtLName.focus();
			return false;
		}
		for (i = 0;  i < strLName.length;  i++)
		{
			ch = strLName.charAt(i);
			for (j = 0;  j < strCheckAlpha.length;  j++)
				if (ch == strCheckAlpha.charAt(j))
				break;
				if (j == strCheckAlpha.length)
				{
					allValid = false;
					break;
				}
		}
		if (!allValid)
		{
			alert("Please enter only  characters in the Last Name.");
			document.frmSubscribe.txtLName.focus();
			return false;
		}

		strAddress  = document.frmSubscribe.txtAddress.value;
		lenAddress =strAddress.length;
		if(lenAddress == 0)
		{
			alert("Please enter the Address.");
			document.frmSubscribe.txtAddress.focus();
			return false;
		}
		if(strAddress.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtAddress.focus();
			return false;
		}

		strCity = document.frmSubscribe.txtCity.value;
		lenCity =strCity.length;
		if(lenCity == 0)
		{
			alert("Please enter the City.");
			document.frmSubscribe.txtCity.focus();
			return false;
		}
		if(strCity.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtCity.focus();
			return false;
		}
		for (i = 0;  i < strCity.length;  i++)
		{
			ch = strCity.charAt(i);
			for (j = 0;  j < strCheckAlpha.length;  j++)
				if (ch == strCheckAlpha.charAt(j))
				break;
				if (j == strCheckAlpha.length)
				{
					allValid = false;
					break;
				}
		}
		if (!allValid)
		{
			alert("Please enter only  characters in the City.");
			document.frmSubscribe.txtCity.focus();
			return false;
		}

		strState = document.frmSubscribe.txtState.value;
		lenState =strState.length;
		if(lenState == 0)
		{
			alert("Please enter the State.");
			document.frmSubscribe.txtState.focus();
			return false;
		}
		if(strState.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtState.focus();
			return false;
		}
		for (i = 0;  i < strState.length;  i++)
		{
			ch = strState.charAt(i);
			for (j = 0;  j < strCheckAlpha.length;  j++)
				if (ch == strCheckAlpha.charAt(j))
				break;
				if (j == strCheckAlpha.length)
				{
					allValid = false;
					break;
				}
		}
		if (!allValid)
		{
			alert("Please enter only  characters in the State.");
			document.frmSubscribe.txtState.focus();
			return false;
		}


		strPin = document.frmSubscribe.txtZip.value;
		lenPin = strPin.length;
		if(lenPin == 0)
		{
			alert("Please enter the Pin Code.");
			document.frmSubscribe.txtZip.focus();
			return false;
		}
		if(strPin.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtZip.focus();
			return false;
		}
		for (i = 0;  i < strPin.length;  i++)
		{
			ch = strPin.charAt(i);
			for (j = 0;  j < strCheckNumber.length;  j++)
				if (ch == strCheckNumber.charAt(j))
					break;
				if (j == strCheckNumber.length)
				{
					allValid = false;
					break;
				}
				
		}
		if (!allValid)
		{
			alert("Please enter only numbers in the Pin Code.");
			document.frmSubscribe.txtZip.focus();
			return false;
		}

		
		strDayPhone = document.frmSubscribe.txtDayPhone.value;
		lenDayPhone = strDayPhone.length;
		if(lenDayPhone == 0)
		{
			alert("Please enter the Correct Telephone.");
			document.frmSubscribe.txtDayPhone.focus();
			return false;
		}
		if(strDayPhone.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtDayPhone.focus();
			return false;
		}
		
		for (i = 0;  i < strDayPhone.length;  i++)
		{
			ch = strDayPhone.charAt(i);
			for (j = 0;  j < strCheckNum.length;  j++)
				if (ch == strCheckNum.charAt(j))
					break;
				if (j == strCheckNum.length)
				{
					allValid = false;
					break;
				}
				
		}
		if (!allValid)
		{
			alert("Please enter only numbers in the Telephone.");
			document.frmSubscribe.txtDayPhone.focus();
			return false;
		}

		strEmail = document.frmSubscribe.txtEmail.value;
		lenEmail = strEmail.length;
		
		if(lenEmail == 0)
		{
			alert("Please enter the Email Address.");
			document.frmSubscribe.txtEmail.focus();
			return false;
		}
		if(strEmail.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtEmail.focus();
			return false;
		}
		if(((strEmail.indexOf("@",0)<=0) || (strEmail.indexOf(".",0)<=0)) && (lenEmail!=0))
		{
		alert(strEmail+"  is not a valid Email Address. Please enter a valid Email Address");
		document.frmSubscribe.txtEmail.focus();
		return false;
		}

		

		strTerm = document.frmSubscribe.cmbTerm.options[document.frmSubscribe.cmbTerm.options.selectedIndex].value;
		lenTerm = strTerm.length;
		if(strTerm=="")
		{
			alert("Please select the Subscription Term.");
			document.frmSubscribe.cmbTerm.focus();
			return false;
		}
			

	document.frmSubscribe.method = "post";
	document.frmSubscribe.action = '/subscription/postsubscription.php';
	document.frmSubscribe.submit();
	

}
