
function LTrim(str) {
for (var i=0; ((str.charAt(i)<=" ")&&(str.charAt(i)!="")); i++);
return str.substring(i,str.length);
}
function RTrim(str) {
for (var i=str.length-1; ((str.charAt(i)<=" ")&&(str.charAt(i)!="")); i--);
return str.substring(0,i+1);
}
function Trim(str) {
return LTrim(RTrim(str));
}

function RequiredField(text,msg)
{
    if(Trim(document.getElementById(text).value)=="")
    {
        alert(msg);
        document.getElementById(text).focus();
        return false;
    } 
    else
    {
      return true;
    }   

}
function CheckDropdown(drpdown,msg)
{
	
  if((document.getElementById(drpdown).value=="Select")||(document.getElementById(drpdown).value=="")||(document.getElementById(drpdown).value=="-1")||(document.getElementById(drpdown).value=="0"))
  {
    alert(msg);
    document.getElementById(drpdown).focus();
    return false;
  }
  else
   return true;
}
function CheckDropdownREg(drpdown,msg)
{
	
  if((document.getElementById(drpdown).value=="Select")||(document.getElementById(drpdown).value=="")||(document.getElementById(drpdown).value=="-1")||(document.getElementById(drpdown).value=="0"))
  {
    alert(msg);
  //  document.getElementById(drpdown).focus();
    return false;
  }
  else
	{ return true;}
}

function EmailValidation(text)
{
	if(Trim(document.getElementById(text).value)!="")
	{ 
		regexp=/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
		if(document.getElementById(text).value.search(regexp)==-1)
		{
			document.getElementById(text).value="";
			alert('Please Enter Valid Email');
			document.getElementById(text).focus();
			return false;
		}
		else
			return true;
	}
	else 
		return true;
}

function Count(text,long,error) 
	{
		var maxlength = new Number(long); // Change number to your max length.
		if (text.value.length > maxlength)
		{
			text.value = text.value.substring(0,maxlength);
			alert(error+" should not exceed " + long + " chars");
		}
	}

function textCounter(field,cntfield,maxlimit,outputcon) {
            if (field.value.length > maxlimit) // if too long...trim it!
            field.value = field.value.substring(0, maxlimit);
            // otherwise, update 'characters left' counter
            else
            cntfield.value = maxlimit - field.value.length;
            document.getElementById(outputcon).innerHTML=cntfield.value+"&nbsp;characters left";
}

function changeName(controlid,str)
{
	if((controlid.value=="")||(controlid.value==" "))
	{
	  controlid.value=str;
	}
}


function removeText1(controlid,str){
	if(controlid.value==str)
		controlid.value="";
}
//-----------------------------------Member Login ---------------------------------
function memberlogin()
{
if(Checkewatermarkcontrol('txtUname','Your email','Please Enter Your email')&&
   Checkewatermarkcontrol('txtpwd','Your Password','Please Enter Your Password'))
	{
	    document.form.action="functions/membercheck.php";
		document.form.submit();
		
	}
else
		return false;
}

function memberloginreg()
{
if(Checkewatermarkcontrol('txtUname','Your email','Please Enter Your email')&&
   Checkewatermarkcontrol('txtpwd','Your Password','Please Enter Your Password'))
	{
	    document.reglogform.action="functions/membercheck.php";
		document.reglogform.submit();
		
	}
else
		return false;
}



function Checkewatermarkcontrol(ctrl,strcheck,msg)
{

	if((document.getElementById(ctrl).value==strcheck) || (document.getElementById(ctrl).value==""))
	{
		alert(msg);
		return false;
	}
	else
	{
        return true;
	}

}
//-----------------------Registration TO Google

function validateRegistrationpage(pay)
{
	document.getElementById('hndPaytype').value=pay;
if(Checkewatermarkcontrol('txtFName','First Name','Please Enter First Name')&&
   Checkewatermarkcontrol('txtLName','Last Name','Please Enter Last Name')&&
   Checkewatermarkcontrol('txtdob','Date of birth','Please Enter Date of birth')&&
   Checkewatermarkcontrol('txtAddress','Address','Please Enter Address')&&
   Checkewatermarkcontrol('txtLphone','Landline phone','Please Enter Landline phone')&&
   Checkewatermarkcontrol('txtMobile','Mobile','Please Enter Mobile')&&
   Checkewatermarkcontrol('txtemailR','E-mail','Please Enter E-mail')&&
   EmailValidation('txtemailR')&&
	 Checkewatermarkcontrol('txtpwd_reg','Password','Please Enter Password')
  )	
	{
	  if(document.getElementById('clientYN').value=="no") 
		{ 
		  if(CheckDropdownREg('selmpackage','Please Select Package'))
			{
                	if(document.getElementById('selmpackage').value=="1")
						{
							if(document.getElementById('selmcountry').value=="")
							{
								alert("Please Select County");
								return false;
							}
							else
							{
								if(document.getElementById('selmcountrylondon').value=="") //&& (document.getElementById('selmcountryessex').value==""))
									{
										alert("Please Select Duration");
										return false;
									}
								/*if(document.getElementById('selmcountry').value=="London")
								{
									if(document.getElementById('selmcountrylondon').value=="") //&& (document.getElementById('selmcountryessex').value==""))
									{
										alert("Please Select Duration");
										return false;
									}
								}
								if(document.getElementById('selmcountry').value=="Essex")
								{
									if(document.getElementById('selmcountrylondon').value=="")// && (document.getElementById('selmcountryessex').value==""))
									{
										alert("Please Select Duration");
										return false;
									}
								}*/
							}
							
						}
					   if(document.getElementById('selmpackage').value==2)
						{
						   if(document.getElementById('selmcountry').value=="")
							{
								alert("Please Select County");
								return false;
							}
							else
							{
								if(document.getElementById('selmpacktype').value=="")
								{
									alert("Please Select Duration");
									return false;
								}
							}
							
						}
						if(document.getElementById('selmpackage').value==3)
						{
							if(document.getElementById('selmcountry').value=="")
							{
								alert("Please Select County");
								return false;
							}
							else
							{
                               if(document.getElementById('selmpacktype2').value=="")
								{
									alert("Please Select Duration");
									return false;
								}
							}
							
						}
						if(document.getElementById('selmpackage').value==4)
						{
							if(document.getElementById('selmpacktype3').value=="")
							{
								alert("Please Select Duration");
								return false;
							}
						}
						if(document.getElementById('hndPrice_valid').value!="0")
						{
							var chkcount= document.getElementById('chkcount').value;
						var i=0;
						var mn="";
						var x=new Array();
						
						  for(i=0;i<chkcount;i++)
							{	
								 x[i]="chk"+i;
								 
								if(document.getElementById(x[i]).checked)
								{			
									mn+=document.getElementById(x[i]).value+",";	
								}
							}
							document.getElementById('selmrfwl').value=mn;
							if(document.getElementById('selmrfwl').value=="")
							{
								alert("Please check atleast one reason for joining");
								return false;
							}
							else
							{
								
							  document.form.action="functions/insert.php?do=reg";
								

							}
						  
		                  //document.form.submit();
						}
						else
        				{alert("Please Select Duration");
								return false;}
	        }
			else
			{
                return false;
			}
        }
	  else 
		{
		  if(CheckDropdown('selmpackage5','Please Select Package'))
			{
			  if(document.getElementById('selmpacktype5').value=="")
				{
					alert("Please Select Duration");
					return false;
				}	
				else
				{
					if(document.getElementById('hndPrice_valid').value!="0")
					{
						var chkcount= document.getElementById('chkcount').value;
						var i=0;
						var mn="";
						var x=new Array();
						
						  for(i=0;i<chkcount;i++)
							{	
								 x[i]="chk"+i;
								 
								if(document.getElementById(x[i]).checked)
								{			
									mn+=document.getElementById(x[i]).value+",";	
								}
							}
							document.getElementById('selmrfwl').value=mn;
					
                    if(document.getElementById('selmrfwl').value=="")
							{
								alert("Please check atleast one reason for joining");
								return false;
							}
							else
							{
							  document.form.action="functions/insert.php?do=reg";
							}
		            //document.form.submit();
					}
					else
					{alert("Please Select Duration");
					return false;}
				}
			}
			else
			{
              return false;
			}
          
	    }
	}
else
		return false;
}



//-----------------------Update Registration details 
function validatemyaccount()
{
if(RequiredField('txtFName','Please Enter First Name')&&
   RequiredField('txtLName','Please Enter Last Name')&&
   RequiredField('txtdob','Please Enter Date of birth')&&
   RequiredField('txtAddress','Please Enter Address')&&
   RequiredField('txtLphone','Please Enter Landline phone')&&
   RequiredField('txtMobile','Please Enter Mobile')&&
   RequiredField('txtemailR','Please Enter E-mail')&&
   EmailValidation('txtemailR')	
  )	
	{
	
	  document.formRegUpdate.action="admin/functions/update.php?do=regupdate";
	  document.formRegUpdate.submit();
    
		
	}
else
		return false;
}


//-----------------------Recipes--------------//


function validateRecipe()
{
if(
	RequiredField('txtName','Please Enter Title')&&
	MinCount('txtName',3,'Please Enter Minimum 3 Characters For Title')&&
	FileValidationNew('fileImage','Only jpg,gif and png are valid Image File Types')
)
		{
			document.form.action="functions/insert.php";
			document.form.submit();
		}
else
	{
		return false;
	}
}


function FileValidationNew(text,msg)
{
	if(Trim(document.getElementById(text).value)!="")
	{
		
	  regexp=/^(.*?)\.(jpg|gif|png|jpeg|JPG|GIF|PNG)$/;
	  if(document.getElementById(text).value.toLowerCase().search(regexp)==-1)
	  {
	   document.getElementById(text).value="";			
	   document.getElementById(text).focus();
		alert(msg);
			return false;
	  }
	  else
		{ return true;}
	 }
	 else
	{return true;}
		
		 
}


function RequiredField(text,msg)
{
    if(Trim(document.getElementById(text).value)=="")
    {
        alert(msg);
        document.getElementById(text).focus();
        return false;
    } 
    else
    {
      return true;
    }   

}


function MinCount(text,long,msg) 
{
	var maxlength = new Number(long); // Change number to your max length.
	if (document.getElementById(text).value.length < maxlength)
	{		
		alert(msg);		
		document.getElementById(text).focus();
		return false;
	}		
	else
		return true;
}


//for check space
function checkspace(text)
{          
          var str=text.value;
          var first=str.substring(0,1);
          var second=str.substring(0,1);
          var val='false';
          if(first==' ')
          {
                val='true';
                if(val=='true')
                {
                   if(second==' ')
                   {
                     val='true';
                     alert('Please Enter Valid Information');
                     text.value = "";
                   }
                }
          }
		 
}

function OnlyAlphabets(text)
{

	var regexp=/^[a-zA-Z ]*$/;
	if(text.value.search(regexp)==-1)
		{
			text.value = text.value.substring(0,(text.value.length-1));
			alert('Please enter only letters a-z');
			if(text.value.search(regexp)==-1)
			text.value="";
		}	

}

function OnlyAlphaNumspec(text)
{

	var regexp=/^[a-zA-Z,/:&*0-9- ]*$/;
	if(text.value.search(regexp)==-1)
		{
			text.value = text.value.substring(0,(text.value.length-1));
			alert('Please enter only letters a-z numbers 0-9 special characters , / : & *');
			if(text.value.search(regexp)==-1)
			text.value="";
		}	

}


function NumbersOnly(text)
{
	if(text.value.length==0)
		return;
if(text.value==0)
{
		alert('Invalid Number');
		text.value='';
		return false;
}    		

	var regexp=/^[0-9- ]*$/;
	if(text.value.search(regexp)==-1)
		{
			text.value = text.value.substring(0,(text.value.length-1));
			alert('Please enter only numbers 0-9');
			if(text.value.search(regexp)==-1)
			text.value="";
		}	
}

function NumbersOnlyNew(text)
{
	if(text.value.length==0)
		return;
/*if(text.value==0)
{
		alert('Invalid Number');
		text.value='';
		return false;
}*/	

	var regexp=/^[0-9- ]*$/;
	if(text.value.search(regexp)==-1)
		{
			text.value = text.value.substring(0,(text.value.length-1));
			alert('Please enter only numbers 0-9');
			if(text.value.search(regexp)==-1)
			text.value="";
		}	
}

//-----------------------Forgot Password
function validateforgotPWD()
{
if(
   RequiredField('txtemailR','Please Enter E-mail')&&
   EmailValidation('txtemailR')	
  )	
	{
	
	  document.form.action="admin/functions/update.php?do=sendPWD";
		//document.form.submit();
    
	}
else
		return false;
}
//----------------------------Sent to friend
function memberSend()
{
	  if(RequiredField('txtfemail','Please Enter Your friend email')&&
		 EmailValidation('txtfemail')&&
         RequiredField('txtYemail','Please Enter Your email')&&
		 EmailValidation('txtYemail')&&
		 RequiredField('txtSub','Please Enter Subject'))	
		   {
			  document.formsendfrd.action="functions/insert.php?do=sendMess";
			  document.formsendfrd.submit();
		   }
		else
			  return false;
	
 
}
//----------------------------Member area home refer to a friend
function memberRefer()
{
	  if(RequiredField('txtfemail','Please Enter Your friend email')&&
		 EmailValidation('txtfemail')&&
         RequiredField('txtSub','Please Enter Subject'))	
		   {
			  document.formsendfrd.action="functions/insert.php?do=sendMess";
			  document.formsendfrd.submit();
		   }
		else
			  return false;
	
 
}

function FileValidation(text,msg)
{
	if(Trim(text.value)!="")
	{
		
	  regexp=/^(.*?)\.(jpg|png|gif|jpeg|JPG|GIF|PNG)$/;
	  if(text.value.toLowerCase().search(regexp)==-1)
	  {
	   text.value="";			
		text.focus();
		alert(msg);
			return false;
	  }
	  else
		  return true;
	 }
	 else
		 return true;
		
		 
}

function FileValidationNew(text,msg)
{
	if(Trim(document.getElementById(text).value)!="")
	{
		
	  regexp=/^(.*?)\.(jpg|gif|png|jpeg|JPG|GIF|PNG)$/;
	  if(document.getElementById(text).value.toLowerCase().search(regexp)==-1)
	  {
	   document.getElementById(text).value="";			
	   document.getElementById(text).focus();
		alert(msg);
			return false;
	  }
	  else
		{ return true;}
	 }
	 else
	{return true;}
		
		 
}



function FileValidationVideo(text,msg)
{
	if(Trim(text.value)!="")
	{
		
	  regexp=/^(.*?)\.(flv|FLV)$/;
	  if(text.value.toLowerCase().search(regexp)==-1)
	  {
	   text.value="";			
		text.focus();
		alert(msg);
			return false;
	  }
	  else
		  return true;
	 }
	 else
		 return true;
		
		 
}
function FileValidationVideoNew(text,msg)
{
	if(Trim(document.getElementById(text).value)!="")
	{
		
	  regexp=/^(.*?)\.(flv|FLV)$/;
	  if(document.getElementById(text).value.toLowerCase().search(regexp)==-1)
	  {
	   document.getElementById(text).value="";			
	   document.getElementById(text).focus();
		alert(msg);
			return false;
	  }
	  else
		{ return true;}
	 }
	 else
	{return true;}
		
		 
}

//-----------------------------------Testimonial-------------------------------------

function validatememTestimonial()
{
	if(
		RequiredField('txtName','Please Enter Name')&&
		MinCount('txtName',3,'Please Enter Minimum 3 Characters For Name')&&
		RequiredField('txtAge','Please Enter Age')&&
		RequiredField('txtArea','Please Enter Area')&&
		RequiredField('txtOccupation','Please Enter Occupation')&&
		RequiredField('txtSummary','Please Enter Summary 1')&&
		//RequiredFCK('txtDescription','Please Enter Description')&&
		RequiredField('txtLiveTest','Please Enter Date of Live Test')&&
		FileValidationNew('fileImage1','Only jpg,png,gif are valid Image File Types')&&
		FileValidationNew('fileImage2','Only jpg,png,gif are valid Image File Types')&&
		FileValidationVideoNew('fileVideo1','Only FLV is valid File Type(s)')
		
	  )
	{
		//alert("hello");
		//document.form.action="functions/update.php";
		document.formtestimonial.action="functions/insert.php";
		document.formtestimonial.submit();
		//alert("hi");
		//return true;
	}
		
	else
	{
		return false;
	}
}
//---------------------Submit Question
function validateQuestion()
{
if(
	CheckDropdown('selCategoryR','Please select Category')&&
	CheckDropdown('selSubCategoryR','Please select Sub Category')&&
	Checkewatermarkcontrol('textarea','Write your question','Please write your Question')
   )
		{
			document.formQue.action="functions/insert.php?que=1";
			document.formQue.submit();
		}
else
	{
		return false;
	}
}

//---------------------- validate Upgrade form
function validateUpgrade()
{
if(
   Checkewatermarkcontrol('selmpackage','','Please Select Package')	
  )	
	{
	if(document.getElementById('selmpackage').value==1)
	{
		if(document.getElementById('selmcountry').value=="")
		{
			alert("Please Select County");
			return false;
		}
		if(document.getElementById('selmcountry').value=="London")
		{
			if(document.getElementById('selmcountrylondon').value=="")
			{
				alert("Please Select Duration");
				return false;
			}
		}
		if(document.getElementById('selmcountry').value=="Essex")
		{
			if(document.getElementById('selmcountryessex').value=="")
			{
				alert("Please Select Duration");
				return false;
			}
		}
	}
	if(document.getElementById('selmpackage').value==2)
	{
		if(document.getElementById('selmpacktype').value=="")
		{
			alert("Please Select Duration");
			return false;
		}
	}
	if(document.getElementById('selmpackage').value==3)
	{
		if(document.getElementById('selmpacktype2').value=="")
		{
			alert("Please Select Duration");
			return false;
		}
	}
	if(document.getElementById('selmpackage').value==4)
	{
		if(document.getElementById('selmpacktype3').value=="")
		{
			alert("Please Select Duration");
			return false;
		}
	}
	    
		document.form.action="functions/insert.php?do=upgrade";
		document.form.submit();
    
		
	}
else
		return false;
}



function validateiridologye(){
 if(document.getElementById('txtName').value=="Your Name")
		{
			alert("Please Enter Your Name");
			document.getElementById('txtName').value="";
			document.getElementById('txtName').focus();
			return false;
		}
   

if(document.getElementById('txtphone').value=="Telephone")
		{
			alert("Please Enter Your Telephone");
			document.getElementById('txtphone').value="";
			document.getElementById('txtphone').focus();
			return false;
		}
if(document.getElementById('txtemail').value=="Email")
		{
			alert("Please Enter Your Email");
			document.getElementById('txtemail').value="";
			document.getElementById('txtemail').focus();
			return false;
		}	
if(document.getElementById('textarea').value=="Message")
		{
			alert("Please Enter Message");
			document.getElementById('textarea').value="";
			document.getElementById('textarea').focus();
			return false;
		}
	if(
		RequiredField('txtName','Please Enter Name')&&
		MinCount('txtName',3,'Please Enter Minimum 3 Characters For Name')&&
		RequiredField('txtphone','Please Enter Telephone number')&&
		RequiredField('txtemail','Please Enter Email')&&
        EmailValidation('txtemail')&&
		FileValidationNew('fileImageleft','Only jpg,gif and png are valid Image File Types')&&
		FileValidationNew('fileImageright','Only jpg,gif and png are valid Image File Types')
	  )
	{
	   
//	   return true;
       document.eyeform.action='functions/insert.php';
	   document.eyeform.submit();
	}
		
	else
	{
		return false;
	}

}
//---------------------Refer to a Friend
function validatreferfriend()
{
   if(Checkewatermarkcontrol('txtfemail','Your friend e-mail','Please Enter Your friend e-mail')&&
	  EmailValidation('txtfemail')
      )	
		   {
			  document.formRefrd.action="functions/insert.php?do=refrd";
			  document.formRefrd.submit();
		   }
		else
			  return false;
}
//---------------------Additional Questions check validate-----------------
function submittodb()
{
	if((document.getElementById('txtMoreenergy').value=="")&&
	    (document.getElementById('txtLoseweight').value=="")&&
	    (document.getElementById('txtAches').value=="")&&
	    (document.getElementById('txtSpecific').value=="")&&
	    (document.getElementById('txtFatigue').value=="")&&
	    (document.getElementById('txtpains').value=="")&&
	    (document.getElementById('txtSleeplessness').value=="")&&
	    (document.getElementById('txtDigestive').value=="")&&
	    (document.getElementById('txtHeartburn').value=="")&&
	    (document.getElementById('txtConstipation').value=="")&&
	    (document.getElementById('txtHeadaches').value=="")&&
	    (document.getElementById('txtAllergies').value=="")&&
        (document.getElementById('txtSkin').value=="")&&
		(document.getElementById('txtWeighup1').value=="")&&
		(document.getElementById('txtWeigh1').value=="")&&
	    (document.getElementById('txtOther1').value=="")&&
	    (document.getElementById('txtque1').value=="")&&
		(document.getElementById('txtque7').value=="")&&//new
		(document.getElementById('txtque8').value=="")&&//new
	    (document.getElementById('txtque2').value=="")&&
	    (document.getElementById('txtque3').value=="")&&
	    (document.getElementById('txtque4').value=="")&&
	    (document.getElementById('txtque5').value=="")&&		
        (document.getElementById('txtque6').value=="")&&	
        (document.getElementById('cheArthritis_me').checked==false)&&
	    (document.getElementById('cheArthritis_fam').checked==false)&&
		(document.getElementById('cheAsthma_me').checked==false)&&
		(document.getElementById('cheAsthma_fam').checked==false)&&
		(document.getElementById('cheBloodPressure_me').checked==false)&&//new
		(document.getElementById('cheBloodPressure_fam').checked==false)&&//new	
		(document.getElementById('cheCancer_me').checked==false)&&
		(document.getElementById('cheCancer_fam').checked==false)&&
		(document.getElementById('cheCellulite_me').checked==false)&&//new
		(document.getElementById('cheCellulite_fam').checked==false)&&//new
		(document.getElementById('cheDepression_me').checked==false)&&//new
		(document.getElementById('cheDepression_fam').checked==false)&&//new
		(document.getElementById('cheDiabetes_me').checked==false)&&
		(document.getElementById('cheDiabetes_fam').checked==false)&&
		(document.getElementById('cheDiabetes2_me').checked==false)&&//new
		(document.getElementById('cheDiabetes2_fam').checked==false)&&//new
		(document.getElementById('cheDizziness_me').checked==false)&&//new
		(document.getElementById('cheDizziness_fam').checked==false)&&//new
		(document.getElementById('cheExcess_me').checked==false)&&//new
		(document.getElementById('cheExcess_fam').checked==false)&&//new
		(document.getElementById('checravings_me').checked==false)&&//new
		(document.getElementById('checravings_fam').checked==false)&&//new
		(document.getElementById('cheHepatitis_me').checked==false)&&
		(document.getElementById('cheHepatitis_fam').checked==false)&&
		(document.getElementById('cheJointpain_me').checked==false)&&//new
		(document.getElementById('cheJointpain_fam').checked==false)&&//new
		(document.getElementById('cheendurance_me').checked==false)&&//new
		(document.getElementById('cheendurance_fam').checked==false)&&//new
		(document.getElementById('cheLeukemia_me').checked==false)&&
		(document.getElementById('cheLeukemia_fam').checked==false)&&
		(document.getElementById('cheSclerosis_me').checked==false)&&
		(document.getElementById('cheSclerosis_fam').checked==false)&&
		(document.getElementById('cheParalysis_me').checked==false)&&
		(document.getElementById('cheParalysis_fam').checked==false)&&
		(document.getElementById('cheRheumatic_me').checked==false)&&
		(document.getElementById('cheRheumatic_fam').checked==false)&&
		(document.getElementById('cheStroke_me').checked==false)&&
		(document.getElementById('cheStroke_fam').checked==false)&&
		(document.getElementById('cheSeizures_me').checked==false)&&
		(document.getElementById('cheSeizures_fam').checked==false)&&
		(document.getElementById('cheSexual_me').checked==false)&&
		(document.getElementById('cheSexual_fam').checked==false)&&
		(document.getElementById('cheKidney_me').checked==false)&&
		(document.getElementById('cheKidney_fam').checked==false)&&
		(document.getElementById('cheThyroid_me').checked==false)&&
		(document.getElementById('cheThyroid_fam').checked==false)&&
		(document.getElementById('chepneumonia_me').checked==false)&&
		(document.getElementById('chepneumonia_fam').checked==false)&&
		(document.getElementById('cheAlcohol_me').checked==false)&&
		(document.getElementById('cheAlcohol_fam').checked==false)&&
		(document.getElementById('cheOther_me').checked==false)&&
		(document.getElementById('cheOther_fam').checked==false))
	     {
		    alert("Please Enter Any One Value");
			document.getElementById('txtMoreenergy').focus();
			return false;
	     }
	   else
	     {
		    
		   return true;
		 }
 
}
//---------------------Change Password
function validatchangePWD()
{
if(
	Checkewatermarkcontrol('txtnewpwd','New Password','Please Enter New Password')&&
	Checkewatermarkcontrol('txtrenewpwd','Confirm Password','Please Enter Confirm Password')
   )
		{
	    if(document.getElementById('txtnewpwd').value==document.getElementById('txtrenewpwd').value)
			{
			
			document.formchpss.action="functions/insert.php?pwd=1";
			document.formchpss.submit();
			return true;
			}
			else
				{
				alert('Mismatch the New Password and Confirm Password');
	              	return false;
	        }

		}
else
	{
		return false;
	}
}