function chkmail()
{
	
	/*********************** If firstname is equal to null validation starts here **********************/
if (trimString(document.newslettersubscribe.ChvFName.value)!="")
{
/*********************** If firstname is not equal to null validation starts here **********************/
if (!isCharsInBag(document.newslettersubscribe.ChvFName.value, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
				{
					alert("Your First Name should be in characters" );
					document.newslettersubscribe.ChvFName.focus();
					return(false);
				}

}


if (trimString(document.newslettersubscribe.ChvMName.value)!="")
{
/*********************** If middlename is equal to null validation starts here **********************/
if (!isCharsInBag(document.newslettersubscribe.ChvMName.value, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
				{
					alert("Your Middle Name should be in characters" );
					document.newslettersubscribe.ChvMName.focus();
					return(false);
				}



}

/*********************** If lastname is equal to null validation starts here **********************/
if (trimString(document.newslettersubscribe.ChvLName.value)!=""  )
   {
/*********************** If lastname is not equal to null validation starts here **********************/
if (!isCharsInBag(document.newslettersubscribe.ChvLName.value, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
				{
					alert("Your Last Name should be in characters" );
					document.newslettersubscribe.ChvLName.focus();
					return(false);
				}

	}
	
/*********************** If cityname is equal to null validation starts here **********************/
if (trimString(document.newslettersubscribe.chvCity.value)!=""  )
       {
/*********************** If cityname is not equal to null validation starts here **********************/
if (!isCharsInBag(document.newslettersubscribe.chvCity.value, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
				{
					alert("Your City should be in characters" );
					document.newslettersubscribe.chvCity.focus();
					return false;
				}	
	
	   }
	
	
	if (trimString(document.newslettersubscribe.chvState.value)=="Others"  )
       {
		   
		   if (trimString(document.newslettersubscribe.other_state.value)=="")
		   {
			   
			   	alert("Other State should not be blank" );
					document.newslettersubscribe.other_state.focus();
					return false;
		   }
/*********************** If cityname is not equal to null validation starts here **********************/
if (!isCharsInBag(document.newslettersubscribe.other_state.value, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
				{
					alert("Other state details should be in characters" );
					document.newslettersubscribe.other_state.focus();
					return false;
				}	
	
	   }
	

if (trimString(document.newslettersubscribe.intZip.value)!=""  )
	{
		/*********************** If zipcode is not equal to null validation starts here **********************/		
		if (document.newslettersubscribe.intZip.value.length > 10)
		{
			alert( "Maximum character length should be 10  in the \"Zip/Postal code\" field" );
			document.newslettersubscribe.intZip.focus();
			return false;
		}
							/*if (trimString( document.newslettersubscribe.intZip.value)==("000000"|"00000"|"0000"|"000"|"00"|"0"))
		
							{
									alert( "Zip/Postal code should not be zero format" );
									document.newslettersubscribe.intZip.focus();
									  return false;
							}
			 				 if (!isCharsInBag(document.newslettersubscribe.intZip.value, "0123456789" ))
									{
											alert("Invalid characters in Zip (or)Postal code  field" );
											document.newslettersubscribe.intZip.focus();
											return(false);
	
	
							if (!isFloatValue(document.newslettersubscribe.intZip.value))
									{
											alert("Invalid characters in \" Zip/Postal code  \" field " );
											document.newslettersubscribe.intZip.focus();
											return(false);
									}		
									
									}*/
		
		
	}
		
	
	
	
	
/*********************** If phone number 1 is equal to null validation starts here **********************/
var ph1=document.getElementById("ph1").value;
var ph2=document.getElementById("ph1").value;
var ph3=document.getElementById("ph1").value;
	if(ph1!="" || ph2!="" || ph3!="")
			{
			
/*********************** If phone number 1 is not equal to null validation starts here **********************/		
		if (!isCharsInBag(document.getElementById("ph1").value,"0123456789" ))
                                {
                                        alert("Phone numbers must be numeric" );
                                     document.newslettersubscribe.ph1.focus();
                                        return false;
								}
			var l1=document.getElementById("ph1").value.length;
	
			if(l1<3)
			{
			alert("Enter 3 digit code");
			document.newslettersubscribe.ph1.focus();
			return false;
			}						
/*********************** If phone number 2 is equal to null validation starts here **********************/
			if(document.newslettersubscribe.ph2.value=="")
			{
			alert("Phone number should not be empty");
			document.newslettersubscribe.ph2.focus();
			return false;
			}
/*********************** If phone number 2 is not equal to null validation starts here **********************/
			if (!isCharsInBag(document.newslettersubscribe.ph2.value, "0123456789" ))
                                {
                                        alert("Phone numbers must be numeric" );
                                      document.newslettersubscribe.ph2.focus();
                                        return false;
									}
								var l2=document.getElementById("ph2").value.length;
	
			if(l2<3)
			{
			alert("Enter 3 digit code");
			document.newslettersubscribe.ph2.focus();
			return false;
			}						

/*********************** If phone number 3 is equal to null validation starts here **********************/					
									
									
			if(document.newslettersubscribe.ph3.value=="")
			{
			alert("Phone number should not be empty");
		document.newslettersubscribe.ph3.focus();
			return false;
			}
/*********************** If phone number 3 is not equal to null validation starts here **********************/
			if (!isCharsInBag(document.newslettersubscribe.ph3.value, "0123456789" ))
                                {
                                        alert("Phone numbers must be numeric" );
                                      document.newslettersubscribe.ph3.focus();
                                        return false;
									}
						var l3=document.getElementById("ph3").value.length;
	
			if(l3<4)
			{
			alert("Enter 4 digit code");
			document.newslettersubscribe.ph3.focus();
			return false;
			}		
			
			
			}
	
	
	

	if(trimString(document.newslettersubscribe.nl_email.value)=="")
	{
		alert("Please enter your E-mail Id");
		document.newslettersubscribe.nl_email.focus();
		return false;
		
	}
	
	if(trimString(document.newslettersubscribe.nl_email.value)!="")
	{
		if(document.newslettersubscribe.nl_email.value.length>50)
					{
					alert("Maximum character length should be 50 in the \"  Email Id \" field.");
					document.newslettersubscribe.nl_email.focus();
					return(false);
					}
					if ((document.newslettersubscribe.nl_email.value=="")||((isCharsInBag(document.newslettersubscribe.nl_email.value, "-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@.0123456789"))&&(document.newslettersubscribe.nl_email.value.length>9)&&(document.newslettersubscribe.nl_email.value.length<50)&&(isEmail(document.newslettersubscribe.nl_email.value)))) advemail=0;
					else advemail=1;
					if (advemail==1) 
					{
					alert("Enter valid E-mail Id.");
					document.newslettersubscribe.nl_email.focus();
					return(false);
					}
	}
	
	var c_tot=document.newslettersubscribe.category_tot.value;	

	var temp=0;
	
	for(var i=0;i<c_tot;i++)
		{
			 
            
		if(document.getElementById("check_"+i).checked==true)
			{
				temp++;
			}
			
					
		}
		
		if(temp==0)
		{
			alert("Please select any of the category");
			document.newslettersubscribe.check_0.focus();
			return false;
			
		}
		/*********************** CAPTCHA validation**********************/
		if (trimString(document.newslettersubscribe.captcha.value)=="")
	
		{
			alert( "Please enter the Word Verification" );
			document.newslettersubscribe.captcha.focus();
			return false;
		}
}


function showhide2(stid)
{
		if(stid=="Others")
		{
		document.getElementById("other_state").style.display="block";
		}
		else
		{
		document.getElementById("other_state").style.display="none";
		
		}
	
	
}
