function frmContact(id){
	return document.frmContact.getElementById(id);
}

function frmPlatinum(id){
	return document.getElementById(id);
}

function frmGold(id){
	return document.getElementById(id);
}

function frmSilver(id){
	return document.getElementById(id);
}

function frmJoin(id){
	return document.getElementById(id);
}

function frmActivate(id){
	return document.getElementById(id);
}

function validatePremium()
{
	
	
    if (document.frmActivate.Fname.value =="")
    {        alert("You must enter First Name.");
        document.frmActivate.Fname.focus();
        return false;
    }
	  if (document.frmActivate.Lname.value =="")
    {        alert("You must enter last name.");
        document.frmActivate.Lname.focus();
        return false;
    }
	if (document.frmActivate.MemberID.value =="")
    {        alert("You must enter TBF membership number.");
        document.frmActivate.MemberID.focus();
        return false;
    }
	
	if (document.frmActivate.Zip.value =="")
    {        alert("You must enter the zip code.");
        document.frmActivate.Zip.focus();
        return false;
    }
	
}


function validatePlatinum()
{
	
	
    if (document.frmPlatinum.bname.value =="")
    {        alert("You must enter your First & Last Name.");
        document.frmPlatinum.bname.focus();
        return false;
    }
	  if (document.frmPlatinum.baddr1.value =="")
    {        alert("You must enter the billing address.");
        document.frmPlatinum.baddr1.focus();
        return false;
    }
	if (document.frmPlatinum.bcity.value =="")
    {        alert("You must enter the city.");
        document.frmPlatinum.bcity.focus();
        return false;
    }
	
	if (document.frmPlatinum.bzip.value =="")
    {        alert("You must enter the zip code.");
        document.frmPlatinum.bzip.focus();
        return false;
    }
	if (document.frmPlatinum.email.value =="")
    {        alert("You must enter your email address.");
        document.frmPlatinum.email.focus();
        return false;
    }
}

function validateGold()
{
	
	
    if (document.frmGold.bname.value =="")
    {        alert("You must enter your First & Last Name.");
        document.frmGold.bname.focus();
        return false;
    }
	  if (document.frmGold.baddr1.value =="")
    {        alert("You must enter the billing address.");
        document.frmGold.baddr1.focus();
        return false;
    }
	
	if (document.frmGold.bstate.value =="")
    {        alert("You must enter the State.");
        document.frmGold.bstate.focus();
        return false;
    }
	if (document.frmGold.bzip.value =="")
    {        alert("You must enter the zip code.");
        document.frmGold.bzip.focus();
        return false;
    }
	if (document.frmGold.email.value =="")
    {        alert("You must enter your email address.");
        document.frmGold.email.focus();
        return false;
    }
}

function validateSilver()
{
	
	
    if (document.frmSilver.bname.value =="")
    {        alert("You must enter your First & Last Name.");
        document.frmSilver.bname.focus();
        return false;
    }
	  if (document.frmSilver.baddr1.value =="")
    {        alert("You must enter the billing address.");
        document.frmSilver.baddr1.focus();
        return false;
    }
	if (document.frmSilver.bcity.value =="")
    {        alert("You must enter the city.");
        document.frmSilver.bcity.focus();
        return false;
    }
	
	if (document.frmSilver.bzip.value =="")
    {        alert("You must enter the zip code.");
        document.frmSilver.bzip.focus();
        return false;
    }
	if (document.frmSilver.email.value =="")
    {        alert("You must enter your email address.");
        document.frmSilver.email.focus();
        return false;
    }
}
	function validateContact()
{
	
	
    if (document.frmContact.txtFName.value =="")
    {        alert("You must enter the First Name.");
        document.frmContact.txtFName.focus();
        return false;
    }
	  if (document.frmContact.txtFName.value =="")
    {        alert("You must enter the First Name.");
        document.frmContact.txtFName.focus();
        return false;
    }
	  if (document.frmContact.txtFName.value =="")
    {        alert("You must enter the First Name.");
        document.frmContact.txtFName.focus();
        return false;
    }
	  if (document.frmContact.txtLName.value =="")
    {        alert("You must enter the Last Name.");
        document.frmContact.txtLName.focus();
        return false;
    }
	  if (document.frmContact.txtEmail.value =="")
    {        alert("You must enter the Email Address.");
        document.frmContact.txtEmail.focus();
        return false;
    }
	  if (document.frmContact.txtCity.value =="")
    {        alert("You must enter the City.");
        document.frmContact.txtCity.focus();
        return false;
    }
	  if (document.frmContact.txtZipcode.value =="")
    {        alert("You must enter the Zip Code.");
        document.frmContact.txtZipcode.focus();
        return false;
    }
	  if (document.frmContact.sltState.value =="")
    {        alert("You must select the State.");
        document.frmContact.sltState.focus();
        return false;
    }
	 if (document.frmContact.txtComments.value =="")
    {        alert("You must enter any Comment.");
        document.frmContact.txtComments.focus();
        return false;
    }
	// exit();
// Get the values from the 
  
 
   
}

function validateJoin()
{
	
	
    if (document.frmJoin.txtClubName.value =="")
    {        alert("You must enter the Club Name.");
        document.frmJoin.txtClubName.focus();
        return false;
    }
	  if (document.frmJoin.sltState.value =="")
    {        alert("You must select the State.");
        document.frmJoin.sltState.focus();
        return false;
    }
	  if (document.frmJoin.txtPresidentName.value =="")
    {        alert("You must enter the Club's President Name.");
        document.frmJoin.txtPresidentName.focus();
        return false;
    }
	  if (document.frmJoin.txtPresidentPhone.value =="")
    {        alert("You must enter the Club President Phone.");
        document.frmJoin.txtPresidentPhone.focus();
        return false;
    }
	  if (document.frmJoin.txtPresidentMail.value =="")
    {        alert("You must enter the Club President Email Address.");
        document.frmJoin.txtPresidentMail.focus();
        return false;
    }
	  if (document.frmJoin.txtSecName.value =="")
    {        alert("You must enter the Secretary Name.");
        document.frmJoin.txtSecName.focus();
        return false;
    }
	  if (document.frmJoin.txtSecPhone.value =="")
    {        alert("You must enter the Secretary Phone.");
        document.frmJoin.txtSecPhone.focus();
        return false;
    }
	  if (document.frmJoin.txtSecMail.value =="")
    {        alert("You must enter the Secretary Email Address.");
        document.frmJoin.txtSecMail.focus();
        return false;
    }
	
	
   
}
	
	function ValidateFormEdit()
{
// Get the values from the form.
   
  /*  if (frmArticle("txtTitle").value.length < 1)
    {        alert("You must enter the Title.");
        frmArticle("txtTitle").focus();
        return false;
    }
  
    if (frmArticle("hidImage").value.length < 1)
    {
		alert("You must Upload a Image.");
        frmArticle("fileImage").focus();
        return false;
    }
    if (frmArticle("txtCaption").value.length < 1)
    {        alert("You must enter the Caption.");
        frmArticle("txtCaption").focus();
        return false;
    }
   if (frmArticle("txtBlurb").value.length < 1)
    {        alert("You must enter the Blurb.");
        frmArticle("txtBlurb").focus();
        return false;
    }
    if (frmArticle("txtExpression").value.length < 1)
    {        alert("You must enter the Expression.");
        frmArticle("txtExpression").focus();
        return false;
    } */
}

function ValidateStory()
{

// Get the values from the form.
 /*  
    if (frmStory("txtTitle").value.length < 1)
    {        alert("You must enter the Title.");
        frmStory("txtTitle").focus();
        return false;
    }
	 if (frmStory("txtSubTitle").value.length < 1)
    {        alert("You must enter the Sub Title.");
        frmStory("txtSubTitle").focus();
        return false;
    }
  
    if (frmStory("fileImage").value.length < 1)
    {        alert("You must Upload a Image.");
        frmStory("fileImage").focus();
        return false;
    }
    if (frmStory("txtAuthor").value.length < 1)
    {        alert("You must enter the Caption.");
        frmStory("txtAuthor").focus();
        return false;
    }
    if (frmStory("division").value.length < 1)
    {        alert("You must enter the Division");
        frmStory("division").focus();
        return false;
    } */

    return(true);
}
function ValidateStoryEdit()
{
  
  /*  if (frmStory("txtTitle").value.length < 1)
    {        alert("You must enter the Title.");
        frmStory("txtTitle").focus();
        return false;
    }
	 if (frmStory("txtSubTitle").value.length < 1)
    {        alert("You must enter the Sub Title.");
        frmStory("txtSubTitle").focus();
        return false;
    }
  
    if (frmStory("HidImage").value.length < 1)
    {        alert("You must Upload a Image.");
        frmStory("fileImage").focus();
        return false;
    }
    if (frmStory("txtAuthor").value.length < 1)
    {        alert("You must enter the Author.");
        frmStory("txtAuthor").focus();
        return false;
    }
    if (frmStory("division").value.length < 1)
    {        alert("You must enter the Division.");
        frmStory("division").focus();
        return false;
    } */

    return(true);
}
function chkFront()
{
	
	var flag=1;
	var count=0;
	
	  	var total=document.frmFront.elements.length;
	//alert(total);
		if(total<=1)
			{
			alert("There is no item to Add");
			return false;
		}
		else
	{
		for(i=0;i<total-1;i++)
		{
						
			
			if(document.frmFront.elements['chk[]'][i].checked)
			{
				flag=0;
				count=count+1;
				
			}

		}
		
		if(flag==1)
		{
			alert("Select any stories to display in front page");
			return false;
		}}
		if(count>10)
		{
			alert("Maximum limit of 10 stories only allowed to display in the front page");
			return false;
		}

}



