function validateamt()
{

var intone="Rs. 5,200";
//var inttwo="Rs. 8,000";
//var intthree="Rs. 12,000";

var none="Rs. 960";
var ntwo="Rs. 1,440";
//var nfive="Rs. 3,600";

//var nonecomb="Rs. 1,800";
//var ntwocomb="Rs. 2,640";

document.frmSubscribe.txtAmount.value=none;


if(document.frmSubscribe.rbTerm[0].checked==true)
{
	document.frmSubscribe.txtAmount.value=none;
}
if(document.frmSubscribe.rbTerm[1].checked==true)
{
	document.frmSubscribe.txtAmount.value=ntwo;
}
if(document.frmSubscribe.rbTerm[2].checked==true)
{
	document.frmSubscribe.txtAmount.value=intone;
}
if(document.frmSubscribe.rbTerm[3].checked==true)
{
	document.frmSubscribe.txtAmount.value=nonecomb;
}
if(document.frmSubscribe.rbTerm[4].checked==true)
{
	document.frmSubscribe.txtAmount.value=ntwocomb;
}
//alert(document.frmSubscribe.txtAmount.value);


/*if(document.frmSubscribe.rbTerm[2].checked==true)
{
	document.frmSubscribe.txtAmount.value=none;
}
if(document.frmSubscribe.rbTerm[3].checked==true)
{
	document.frmSubscribe.txtAmount.value=intthree;
}
if(document.frmSubscribe.rbTerm[4].checked==true)
{
	document.frmSubscribe.txtAmount.value=inttwo;
}
if(document.frmSubscribe.rbTerm[5].checked==true)
{
	document.frmSubscribe.txtAmount.value=intone;
}*/


}//end of function validateamt

/*function checkPayment() 
{
	if((document.frmSubscribe.rbPaymentMode[0].checked == true) || (document.frmSubscribe.rbPaymentMode[1].checked == true))
	{
		document.frmSubscribe.txtCheque.disabled = false;
		document.frmSubscribe.txtBank.disabled = false;
		document.frmSubscribe.txtAmount.disabled = false;
		document.frmSubscribe.cmbDay.disabled = false;
		document.frmSubscribe.cmbMonth.disabled = false;
		document.frmSubscribe.cmbYear.disabled = false;

		document.frmSubscribe.rbcardtype[0].disabled = true;
		document.frmSubscribe.rbcardtype[1].disabled = true;
		document.frmSubscribe.txtCardNo.disabled = true;
		document.frmSubscribe.txtCMName.disabled = true;
		document.frmSubscribe.cmbCExpMonth.disabled = true;
		document.frmSubscribe.cmbCExpYear.disabled = true;
	}

	if(document.frmSubscribe.rbPaymentMode[2].checked == true)
	{
		document.frmSubscribe.txtCheque.disabled = true;
		document.frmSubscribe.txtBank.disabled = true;
		document.frmSubscribe.txtAmount.disabled = true;
		document.frmSubscribe.cmbDay.disabled = true;
		document.frmSubscribe.cmbMonth.disabled = true;
		document.frmSubscribe.cmbYear.disabled = true;

		document.frmSubscribe.rbcardtype[0].disabled = false;
		document.frmSubscribe.rbcardtype[1].disabled = false;
		document.frmSubscribe.txtCardNo.disabled = false;
		document.frmSubscribe.txtCMName.disabled = false;
		document.frmSubscribe.cmbCExpMonth.disabled = false;
		document.frmSubscribe.cmbCExpYear.disabled = false;
	}*/

//}//end of function checkPayment


function validateform(frmSubscribe)
{
	var invalid12=new Array(" ","!","@","#","$","%","^","&","*","=","'",'"',"`","?","|",".","{","}",";",":","~","<",">","+",",","-");
		var strPlan = "";
		var strFName = "";
		var strLName = "";
		var strSex = "";
		var strDOBDay = "";
		var strDOBMonth = "";
		var strDOBYear = "";
		var strAddress = "";
		var strCity = "";
		var strState = "";
		var strCountry = "";
		var strPin = "";
		var strEmail = "";
		var strPhone = "";
		var strProfession = "";
		var strQualification = "";
		var strCar = "";
		var strModePay = "";
		var strCarOwn = "";
		var strIncome = "";
		var strHoliday = "";
		
		/*var strCheque = "";
		var strBank = "";
		var strAmount = "";
		var strDay = "";
		var strMonth = "";
		var strYear = "";
		var strCardNo = "";
		var strCMName = "";
		var strCExpMonth = "";
		var strCExpYear = "";*/
		
		
		var strPlan = "";
		var lenFName = "";
		var lenLName = "";
		var lenSex = "";
		var lenDOBDay = "";
		var lenDOBMonth = "";
		var lenDOBYear = "";
		var lenAddress = "";
		var lenCity = "";
		var lenState = "";
		var lenCountry = "";
		var lenPin = "";
		var lenEmail = "";
		var lenPhone = "";
		var lenProfession = "";
		var lenQualification = "";
		var lenCar = "";
		var lenModePay = "";
		var lenCarOwn = "";
		var lenIncome = "";
		var lenHoliday = "";
		/*var lenCheque = "";
		var lenBank = "";
		var lenAmount = "";
		var lenDay = "";
		var lenMonth = "";
		var lenYear = "";
		var lenCardNo = "";
		var lenCMName = "";
		var lenCExpMonth = "";
		var lenCExpYear = "";*/
		
		
		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;
		}

		strDOBDay = document.frmSubscribe.cmbDOBDay.options[document.frmSubscribe.cmbDOBDay.options.selectedIndex].value;
		lenDOBDay = strDOBDay.length;
		if(strDOBDay == "0")
		{
			alert("Please select the Day for Date of Birth.");
			document.frmSubscribe.cmbDOBDay.focus();
			return false;
		}

		strDOBMonth = document.frmSubscribe.cmbDOBMonth.options[document.frmSubscribe.cmbDOBMonth.options.selectedIndex].value;
		lenDOBMonth = strDOBMonth.length;
		if(strDOBMonth == "0")
		{
			alert("Please select the Month for Date of Birth.");
			document.frmSubscribe.cmbDOBMonth.focus();
			return false;
		}

		strDOBYear = document.frmSubscribe.cmbDOBYear.options[document.frmSubscribe.cmbDOBYear.options.selectedIndex].value;
		lenDOBYear = strDOBYear.length;
		if(strDOBYear == "0")
		{
			alert("Please select the Year for Date of Birth.");
			document.frmSubscribe.cmbDOBYear.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;
		}

		strCountry = document.frmSubscribe.cmbCountry.options[document.frmSubscribe.cmbCountry.options.selectedIndex].value;
		lenCountry = strCountry.length;
		if(strCountry=="")
		{
			alert("Please select the Country.");
			document.frmSubscribe.cmbCountry.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;
		}

		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;
		}

		strPhone = document.frmSubscribe.txtPhone.value;
		lenPhone = strPhone.length;
		if(lenPhone == 0)
		{
			alert("Please enter the Telephone.");
			document.frmSubscribe.txtPhone.focus();
			return false;
		}
		if(strPhone.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtPhone.focus();
			return false;
		}
		
		for (i = 0;  i < strPhone.length;  i++)
		{
			ch = strPhone.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.txtPhone.focus();
			return false;
		}

		strProfession = document.frmSubscribe.cmbProfession.options[document.frmSubscribe.cmbProfession.options.selectedIndex].value;
		lenProfession = strProfession.length;
		if(strProfession=="")
		{
			alert("Please select the Profession.");
			document.frmSubscribe.cmbProfession.focus();
			return false;
		}

		strQualification = document.frmSubscribe.cmbEducation.options[document.frmSubscribe.cmbEducation.options.selectedIndex].value;
		lenQualification = strQualification.length;
		if(strQualification=="")
		{
			alert("Please select the Qualification.");
			document.frmSubscribe.cmbEducation.focus();
			return false;
		}

		
		strCarOwn  = document.frmSubscribe.txtCarOwn.value;
		lenCarOwn =strCarOwn.length;
		if(lenCarOwn == 0)
		{
			alert("Please enter the Brand Of Car.");
			document.frmSubscribe.txtCarOwn.focus();
			return false;
		}
		if(strCarOwn.substring(0,1) == " ")
		{
			alert("First Character cannot be a space.");
			document.frmSubscribe.txtCarOwn.focus();
			return false;
		}

		strIncome = document.frmSubscribe.cmbIncome.options[document.frmSubscribe.cmbIncome.options.selectedIndex].value;
		lenIncome = strIncome.length;
		if(strIncome=="")
		{
			alert("Please select the Monthly Income.");
			document.frmSubscribe.cmbIncome.focus();
			return false;
		}

		strHoliday = document.frmSubscribe.cmbHoliday.options[document.frmSubscribe.cmbHoliday.options.selectedIndex].value;
		lenHoliday = strHoliday.length;
		if(strHoliday=="")
		{
			alert("Please select the No.of holidays taken in a year.");
			document.frmSubscribe.cmbHoliday.focus();
			return false;
		}

		
		/*if((document.frmSubscribe.rbPaymentMode[0].checked == true) || (document.frmSubscribe.rbPaymentMode[1].checked == true))
		{
			strCheque = document.frmSubscribe.txtCheque.value;
			lenCheque = strCheque.length;
			if(lenCheque == 0)
			{
				alert("Please enter the Cheque / DD Number.");
				document.frmSubscribe.txtCheque.focus();
				return false;
			}
			if(strCheque.substring(0,1) == " ")
			{
				alert("First Character cannot be a space.");
				document.frmSubscribe.txtCheque.focus();
				return false;
			}
			for (i = 0;  i < strCheque.length;  i++)
			{
				ch = strCheque.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 Cheque / DD Number.");
				document.frmSubscribe.txtCheque.focus();
				return false;
			}

			strBank = document.frmSubscribe.txtBank.value;
			lenBank = strBank.length;
			if(lenBank == 0)
			{
				alert("Please enter the Bank Name.");
				document.frmSubscribe.txtBank.focus();
				return false;
			}
			if(strBank.substring(0,1) == " ")
			{
				alert("First Character cannot be a space.");
				document.frmSubscribe.txtBank.focus();
				return false;
			}

			strDay = document.frmSubscribe.cmbDay.options[document.frmSubscribe.cmbDay.options.selectedIndex].value;
			lenDay = strDay.length;
			if(strDay=="0")
			{
				alert("Please select the Day of Cheque / DD Date.");
				document.frmSubscribe.cmbDay.focus();
				return false;
			}
			
			strMonth = document.frmSubscribe.cmbMonth.options[document.frmSubscribe.cmbMonth.options.selectedIndex].value;
			lenMonth = strMonth.length;
			if(strMonth=="0")
			{
				alert("Please select the Month of Cheque / DD Date.");
				document.frmSubscribe.cmbMonth.focus();
				return false;
			}

			strYear = document.frmSubscribe.cmbYear.options[document.frmSubscribe.cmbYear.options.selectedIndex].value;
			lenYear = strYear.length;
			if(strYear=="0")
			{
				alert("Please select the Year of Cheque / DD Date.");
				document.frmSubscribe.cmbYear.focus();
				return false;
			}**********************************/
			
//		}// end of if

		/*if(document.frmSubscribe.rbPaymentMode[2].checked == true)
		{
			strCardNo = document.frmSubscribe.txtCardNo.value;
			lenCardNo = strCardNo.length;
			if(lenCardNo == 0)
			{
				alert("Please enter the Card Number.");
				document.frmSubscribe.txtCardNo.focus();
				return false;
			}
			if(strCardNo.substring(0,1) == " ")
			{
				alert("First Character cannot be a space.");
				document.frmSubscribe.txtCardNo.focus();
				return false;
			}
			////////////////////
			if(lenCardNo < 16)
			{
				alert("Please enter a valid 16 digit Credit Card Number.");
				document.frmSubscribe.txtCardNo.focus();
				return false;
			}
			for (i = 0;  i < strCardNo.length;  i++)
			{
				ch = strCardNo.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 Card Number.");
				document.frmSubscribe.txtCardNo.focus();
				return false;
			}

			strCMName = document.frmSubscribe.txtCMName.value;
			lenCMName =strCMName.length;
			if(lenCMName == 0)
			{
				alert("Please enter the Card Member's Name.");
				document.frmSubscribe.txtCMName.focus();
				return false;
			}
			if(strCMName.substring(0,1) == " ")
			{
				alert("First Character cannot be a space.");
				document.frmSubscribe.txtCMName.focus();
				return false;
			}
			for (i = 0;  i < strCMName.length;  i++)
			{
				ch = strCMName.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 Card Member's Name.");
				document.frmSubscribe.txtCMName.focus();
				return false;
			}

			strCExpMonth = document.frmSubscribe.cmbCExpMonth.options[document.frmSubscribe.cmbCExpMonth.options.selectedIndex].value;
			lenCExpMonth = strCExpMonth.length;
			if(strCExpMonth=="0")
			{
				alert("Please select the Card Expiry Month.");
				document.frmSubscribe.cmbCExpMonth.focus();
				return false;
			}

			strCExpYear = document.frmSubscribe.cmbCExpYear.options[document.frmSubscribe.cmbCExpYear.options.selectedIndex].value;
			lenCExpYear = strCExpYear.length;
			if(strCExpYear=="0")
			{
				alert("Please select the Card Expiry Year.");
				document.frmSubscribe.cmbCExpYear.focus();
				return false;
			}************************************/
//		}// end of if
		////////////////////////////////////////////////////////////////////////////
	 
	
	//CheckDate();	

	

	//////////////////////////////////////////////

	document.frmSubscribe.method = "post";
	if((document.frmSubscribe.rbPaymentMode.checked == true))
	{
		document.frmSubscribe.action = '../subscription/postsubscription.php';
	}
	
	/*alert(document.frmSubscribe.rbPaymentMode[0].checked);
	if((document.frmSubscribe.rbPaymentMode[0].checked == true) || (document.frmSubscribe.rbPaymentMode[1].checked == true))
	{
		document.frmSubscribe.action = '../subscription/cheque_subscribe1.php';
	}
	if(document.frmSubscribe.rbPaymentMode[2].checked == true)
	{
		document.frmSubscribe.action = '../subscription/postsubscription.php';
	}*/
//	document.frmSubscribe.action = '/newsite/subscription/p_subscribe1.asp';
	document.frmSubscribe.submit();




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

	/////////////////////////////////////////////////

}



