
 function putFocus(formInst, elementInst) 
 {
    if (document.forms.length > 0) 
    {
        document.forms[formInst].elements[elementInst].focus();
    } 
  }



/**************************************************************************************/
/**************************************************************************************/
function validateNumeric(field) 
{
	var valid = "0123456789.,"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) 
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") 
	{
		return false;
	}
	else
	{
		return true;
	}
}
/**************************************************************************************/
/**************************************************************************************/




/**************************************************************************************/
/**************************************************************************************/
function validateCharacter2(field) 
{
	var valid = "QWERTYUIOPASDFGHJKLÑZXCVBNMqwertyuiopasdfghjklñzxcvbnm -`'"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) 
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") 
	{
		return false;
	}
	else
	{
		return true;
	}
}
/**************************************************************************************/
/**************************************************************************************/






/**************************************************************************************/
/**************************************************************************************/
function validateCharacter(field) 
{
	var valid = "QWERTYUIOPASDFGHJKLÑZXCVBNMqwertyuiopasdfghjklñzxcvbnm -`"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) 
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") 
	{
		return false;
	}
	else
	{
		return true;
	}
}
/**************************************************************************************/
/**************************************************************************************/


/**************************************************************************************/
/**************************************************************************************/
function validateSpecialCharacters(field) 
{
	var valid = "!ºª|@#~€<>¬`+^*¨Ç´ç{}[]+-.*·$%&/()=?¿_"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) 
	{
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1")
		{
			 ok = "no";
		}
	}
	if (ok == "no") 
	{
		return false;
	}
	else
	{
		return true;
	}
}
/**************************************************************************************/
/**************************************************************************************/



/**************************************************************************************/
/**************************************************************************************/
function emailCheck (emailStr) 
{
	var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);
	if (matchArray==null) {
	//alert("Email address seems incorrect (check @ and .'s)");
	return false;
	}
	var user=matchArray[1];
	var domain=matchArray[2];
	for (i=0; i<user.length; i++) {
	if (user.charCodeAt(i)>127) {
	//alert("Ths username contains invalid characters.");
	return false;
	   }
	}
	for (i=0; i<domain.length; i++) {
	if (domain.charCodeAt(i)>127) {
	//alert("Ths domain name contains invalid characters.");
	return false;
	   }
	}
	if (user.match(userPat)==null) {
	//alert("The username doesn't seem to be valid.");
	return false;
	}
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {
	for (var i=1;i<=4;i++) {
	if (IPArray[i]>255) {
	//alert("Destination IP address is invalid!");
	return false;
	   }
	}
	return true;
	}
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	for (i=0;i<len;i++) {
	if (domArr[i].search(atomPat)==-1) {
	//alert("The domain name does not seem to be valid.");
	return false;
	   }
	}
	if (checkTLD && domArr[domArr.length-1].length!=2 && 
	domArr[domArr.length-1].search(knownDomsPat)==-1) {
	//alert("The address must end in a well-known domain or two letter " + "country.");
	return false;
	}
	if (len<2) {
	//alert("This address is missing a hostname!");
	return false;
	}
	return true;
}
/**************************************************************************************/
/**************************************************************************************/



/**************************************************************************************/
/**************************************************************************************/
function validateChild2()
{
	var pass=true;
	var errors='';
	
 	CLDLNAME=document.frm.CLDLNAME; 
	CLDFNAME=document.frm.CLDFNAME; 
	CLDMNAME=document.frm.CLDMNAME; 
	CLDPLNAME=document.frm.CLDPLNAME; 
	CLDPFNAMES=document.frm.CLDPFNAMES; 
	CLDSSNCHILD=document.frm.CLDSSNCHILD; 
	CLDSSNPARENT=document.frm.CLDSSNPARENT; 
	CLDSECADDRESS=document.frm.CLDSECADDRESS; 
	CLDSECCITY=document.frm.CLDSECCITY; 
	CLDSECZIP=document.frm.CLDSECZIP; 
	CLDADDRESS=document.frm.CLDADDRESS; 
	CLDCITY=document.frm.CLDCITY; 
	CLDZIP=document.frm.CLDZIP; 
	CLDSTATE=document.frm.CLDSTATE;
	CLDSECSTATE=document.frm.CLDSECSTATE; 
	CLDPHONE=document.frm.CLDPHONE; 



	if (CLDLNAME.value == '' ){errors+='-  Must complete the field [Name Last].\n';pass=false;}
	if (CLDFNAME.value == '' ){errors+='-  Must complete the field [Name First].\n';pass=false;}
	if (CLDMNAME.value == '' ){errors+='-  Must complete the field [Name Middle].\n';pass=false;}
	if (CLDPLNAME.value == '' ){errors+='-  Must complete the field [Parents Last Name].\n';pass=false;}
	if (CLDPFNAMES.value == '' ){errors+='-  Must complete the field [Parents First Names].\n';pass=false;}
//	if (CLDSSNCHILD.value == '' ){errors+='-  Must complete the field [SSN child].\n';pass=false;}
//	if (CLDSSNPARENT.value == '' ){errors+='-  Must complete the field [SSN Parent].\n';pass=false;}
	if (CLDSECADDRESS.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if (CLDSECCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (CLDSECZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (CLDADDRESS.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if (CLDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (CLDZIP.value == '' ){errors+='-  Must complete the field [Zip].\n';pass=false;}
	if (CLDPHONE.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (CLDSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
	

	if (!validateCharacter(CLDLNAME)) {errors+='-  Must contain only digit [Name Last].\n';pass=false;}
	if (!validateCharacter(CLDFNAME)) {errors+='-  Must contain only digit [Name First].\n';pass=false;}
	if (!validateCharacter(CLDMNAME)) {errors+='-  Must contain only digit [Name Middle].\n';pass=false;}
	if (!validateCharacter(CLDPLNAME)) {errors+='-  Must contain only digit [Parents Last Name].\n';pass=false;}
	if (!validateCharacter(CLDPFNAMES)) {errors+='-  Must contain only digit [Parents First Names].\n';pass=false;}
	if (!validateCharacter(CLDSECADDRESS)) {errors+='-  Must contain only digit [Street].\n';pass=false;}
	if (!validateCharacter(CLDSECCITY)) {errors+='-  Must contain only digit [City].\n';pass=false;}
	if (!validateCharacter(CLDADDRESS)) {errors+='-  Must contain only digit [Street].\n';pass=false;}
	if (!validateCharacter(CLDCITY)) {errors+='-  Must contain only digit [City].\n';pass=false;}
	if (!validateCharacter(CLDSTATE)) {errors+='-  Must contain only digit [State].\n';pass=false;}
	



	//if (!validateNumeric(CLDSSNCHILD)) {errors+='-  Must contain only digit [SSN child].\n';pass=false;}
	//if (!validateNumeric(CLDSSNPARENT)) {errors+='-  Must contain only digit [SSN Parent].\n';pass=false;}
	if (!validateNumeric(CLDSECZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	if (!validateNumeric(CLDZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	if (!validateNumeric(CLDPHONE)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	
	
	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}



/**************************************************************************************/
/**************************************************************************************/
function validateUser(plusAction)
{
	var pass=true;
	var errors='';

	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
 	USERNAME=document.frm.USERNAME; 
	USERPW=document.frm.USERPW; 

	if (USERNAME.value == '' ){errors+='-  Must complete the field [User Name].\n';pass=false;}
	if (USERPW.value == '' ){errors+='-  Must complete the field [User Password].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}




/**************************************************************************************/
/**************************************************************************************/
function validateCoordinator(plusAction)
{
	var pass=true;
	var errors='';


	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
	COORDLNAME=document.frm.COORDLNAME;
	COORDFNAME=document.frm.COORDFNAME;
	COORDINIT=document.frm.COORDINIT;
	COORDADDR1=document.frm.COORDADDR1;
	COORDADDR2=document.frm.COORDADDR2;
	COORDCITY=document.frm.COORDCITY;
	COORDZIPCODE=document.frm.COORDZIPCODE;
	COORDPHONE1=document.frm.COORDPHONE1;
	COORDPHONE2=document.frm.COORDPHONE2;
	COORDPHONE3=document.frm.COORDPHONE3;
	COORDFAX1=document.frm.COORDFAX1;
	COORDFAX2=document.frm.COORDFAX2;
	COORDFAX3=document.frm.COORDFAX3;
	COORDCELL1=document.frm.COORDCELL1;
	COORDCELL2=document.frm.COORDCELL2;
	COORDCELL3=document.frm.COORDCELL3;
	COORDEMAIL=document.frm.COORDEMAIL;
	COORDSTATE=document.frm.COORDSTATE;


	if (COORDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if (COORDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	//if (COORDINIT.value == '' ){errors+='-  Must complete the field [Initial].\n';pass=false;}
	if (COORDADDR1.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	//if (COORDADDR2.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	if (COORDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (COORDZIPCODE.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (COORDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	
	//if (COORDFAX1.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX2.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX3.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDCELL1.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL2.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL3.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	if (COORDEMAIL.value == '' ){errors+='-  Must complete the field [Email].\n';pass=false;}
	if (COORDSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
	
	//if (!validateNumeric(COORDFAX1)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX2)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX3)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDCELL1)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if (!validateNumeric(COORDCELL2)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if(!validateNumeric(COORDCELL3)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	if (!validateNumeric(COORDPHONE1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	
    if (!emailCheck(COORDEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}




/**************************************************************************************/
/**************************************************************************************/
function validateBill(plusAction)
{
	var pass=true;
	var errors='';
	
	
	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
		
	BILLORG=document.frm.BILLORG;
	BILLCHAMP=document.frm.BILLCHAMP;
	BILLATTN=document.frm.BILLATTN;
	BILLSTREET=document.frm.BILLSTREET;
	BILLCITY=document.frm.BILLCITY;
	BILLZIP=document.frm.BILLZIP;
	BILLEMAIL=document.frm.BILLEMAIL;
	BILLNEWORG0=document.frm.BILLNEWORG[0];
	BILLNEWORG1=document.frm.BILLNEWORG[1];	



	if(BILLNEWORG0.checked)
	{
		if (BILLORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
		<!--if (BILLCHAMP.value == '' ){errors+='-  Must complete the field [Champion].\n';pass=false;}-->
		if (BILLATTN.value == '' ){errors+='-  Must complete the field [Attention].\n';pass=false;}
		if (BILLSTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
		if (BILLCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
		if (BILLZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
		if (!validateNumeric(BILLZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}

	}
	
	

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}







/**************************************************************************************/
/**************************************************************************************/
function validateBill2(plusAction)
{
	var pass=true;
	var errors='';
	
	
	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
		
	BILLORG=document.frm.BILLORG;
	BILLCHAMP=document.frm.BILLCHAMP;
	BILLATTN=document.frm.BILLATTN;
	BILLSTREET=document.frm.BILLSTREET;
	BILLCITY=document.frm.BILLCITY;
	BILLZIP=document.frm.BILLZIP;
	BILLEMAIL=document.frm.BILLEMAIL;

	if (BILLORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
	if (BILLATTN.value == '' ){errors+='-  Must complete the field [Attention].\n';pass=false;}
	if (BILLSTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if (BILLCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (BILLZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (!validateNumeric(BILLZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}


	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}





/**************************************************************************************/
/**************************************************************************************/
function validateBook()
{
	var pass=true;
	var errors='';
	
	BOOKSEQ=document.frm.BOOKSEQ;
	BOOKISBN=document.frm.BOOKISBN;
	BOOKTITLE=document.frm.BOOKTITLE;
	BOOKAUTHOR=document.frm.BOOKAUTHOR;


	if (BOOKSEQ.value == '' ){errors+='-  Must complete the field [Sequence].\n';pass=false;}
	if (BOOKISBN.value == '' ){errors+='-  Must complete the field [ISBN].\n';pass=false;}
	if (BOOKTITLE.value == '' ){errors+='-  Must complete the field [Title].\n';pass=false;}
	if (BOOKAUTHOR.value == '' ){errors+='-  Must complete the field [Author].\n';pass=false;}


	if (!validateNumeric(BOOKSEQ)) {errors+='-  Must contain only digit [Sequence].\n';pass=false;}


	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}


/**************************************************************************************/
/**************************************************************************************/
function validateChild(plusAction)
{
	var pass=true;
	var errors='';

	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
	
	CLDLNAME=document.frm.CLDLNAME;
	CLDFNAME=document.frm.CLDFNAME;
	CLDMNAME=document.frm.CLDMNAME;
	CLDPLNAME=document.frm.CLDPLNAME;
	CLDPFNAMES=document.frm.CLDPFNAMES;
	CLDADDRESS=document.frm.CLDADDRESS;
	CLDCITY=document.frm.CLDCITY;
	CLDZIP=document.frm.CLDZIP;
	CLDPHONE1=document.frm.CLDPHONE1;
	CLDPHONE2=document.frm.CLDPHONE2;
	CLDPHONE3=document.frm.CLDPHONE3;
	CLDSECADDRESS=document.frm.CLDSECADDRESS;
	CLDSECCITY=document.frm.CLDSECCITY;
	CLDSECZIP=document.frm.CLDSECZIP;
	CLDSTATE=document.frm.CLDSTATE;
	CLDSECSTATE=document.frm.CLDSECSTATE;
	SameSecAddr=document.frm.SameSecAddr;
	CLDBIRTHMM=document.frm.CLDBIRTHMM.value;
	CLDBIRTHDD=document.frm.CLDBIRTHDD.value;
	CLDBIRTHYY=document.frm.CLDBIRTHYY.value;
	
	
	if(!checkdate(CLDBIRTHDD,CLDBIRTHMM,CLDBIRTHYY)){errors+='-  The Birthday is greater than current date or is more than 5 years old.\n';pass=false;}

 
	if(CLDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if(CLDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	//if(CLDMNAME.value == '' ){errors+='-  Must complete the field [Middle Name].\n';pass=false;}
	if(CLDPLNAME.value == '' ){errors+='-  Must complete the field [Parents Last Name].\n';pass=false;}
	if(CLDPFNAMES.value == '' ){errors+='-  Must complete the field [Parents First Name].\n';pass=false;}
	if(CLDADDRESS.value == '' ){errors+='-  Must complete the field [Address].\n';pass=false;}
	if(CLDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(CLDZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	//if(CLDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if(CLDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if(CLDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	

	
	if(document.frm.SameSecAddr[0].checked)	
	{
		if(CLDSECADDRESS.value == '' ){errors+='-  Must complete the field [Secondary Address].\n';pass=false;}
		if(CLDSECCITY.value == '' ){errors+='-  Must complete the field [Secondary City].\n';pass=false;}
		if(CLDSECZIP.value == '' ){errors+='-  Must complete the field [Secondary Zip Code].\n';pass=false;}
		if (!validateNumeric(CLDSECZIP)) {errors+='-  Must contain only digit [Secondary Zip Code].\n';pass=false;}
	}


	if (!validateCharacter2(CLDLNAME)) {errors+='-  Must contain only Character [Name Last].\n';pass=false;}
	if (!validateCharacter2(CLDFNAME)) {errors+='-  Must contain only Character [Name First].\n';pass=false;}
	if (!validateCharacter2(CLDMNAME)) {errors+='-  Must contain only Character [Name Middle].\n';pass=false;}
	if (!validateCharacter2(CLDPLNAME)) {errors+='-  Must contain only Character [Parents Last Name].\n';pass=false;}
	if (!validateCharacter2(CLDPFNAMES)) {errors+='-  Must contain only Character [Parents First Names].\n';pass=false;}
	if (!validateCharacter2(CLDSTATE)) {errors+='-  Must contain only Character [State].\n';pass=false;}
	if (!validateCharacter2(CLDSECSTATE)) {errors+='-  Must contain only Character [State].\n';pass=false;}
	

	//if (!validateNumeric(CLDPHONE1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	//if (!validateNumeric(CLDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	//if (!validateNumeric(CLDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(CLDZIP))    {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}



	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}

/**************************************************************************************/
/**************************************************************************************/
function validateAssociate(plusAction)
{
	var pass=true;
	var errors='';

	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
	
	ASCLNAME=document.frm.asc_Lname;
	ASCFNAME=document.frm.asc_Fname;
	ASCPHONE1=document.frm.ASCPHONE1;
	ASCPHONE2=document.frm.ASCPHONE2;
	ASCPHONE3=document.frm.ASCPHONE3;
	ASCEMAIL=document.frm.asc_Email;
	ASCAFFILIATE=document.frm.asc_Affiliate;
	
	
	if(ASCLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if(ASCFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	if(ASCPHONE1.value == '' || ASCPHONE2.value == '' || ASCPHONE3.value == ''  ){
	  errors+='-  Must complete the field [Phone].\n';pass=false;
	}else{
	  if (!validateNumeric(ASCPHONE1) || !validateNumeric(ASCPHONE2) || !validateNumeric(ASCPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
  }
	if(ASCEMAIL.value != '' )
	{
    	if (!emailCheck(ASCEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}else{
	  errors+='-  Must complete the field [Email].\n';pass=false;
	}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}


/**************************************************************************************/
/**************************************************************************************/
function validateChildFront(plusAction)
{
	var pass=true;
	var errors='';

	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
	
	CLDLNAME=document.frm.CLDLNAME;
	CLDFNAME=document.frm.CLDFNAME;
	CLDMNAME=document.frm.CLDMNAME;
	CLDPLNAME=document.frm.CLDPLNAME;
	CLDPFNAMES=document.frm.CLDPFNAMES;
	CLDADDRESS=document.frm.CLDADDRESS;
	CLDCITY=document.frm.CLDCITY;
	CLDZIP=document.frm.CLDZIP;
	CLDPHONE1=document.frm.CLDPHONE1;
	CLDPHONE2=document.frm.CLDPHONE2;
	CLDPHONE3=document.frm.CLDPHONE3;
	CLDSECADDRESS=document.frm.CLDSECADDRESS;
	CLDSECCITY=document.frm.CLDSECCITY;
	CLDSECZIP=document.frm.CLDSECZIP;
	CLDSTATE=document.frm.CLDSTATE;
	CLDSECSTATE=document.frm.CLDSECSTATE;
	SameSecAddr=document.frm.SameSecAddr;

 
	if(CLDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if(CLDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	if(CLDMNAME.value == '' ){errors+='-  Must complete the field [Middle Name].\n';pass=false;}
	if(CLDPLNAME.value == '' ){errors+='-  Must complete the field [Parents Last Name].\n';pass=false;}
	if(CLDPFNAMES.value == '' ){errors+='-  Must complete the field [Parents First Name].\n';pass=false;}
	if(CLDADDRESS.value == '' ){errors+='-  Must complete the field [Address].\n';pass=false;}
	if(CLDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(CLDZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if(CLDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(CLDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(CLDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	

	
	if(document.frm.SameSecAddr[0].checked)	
	{
		if(CLDSECADDRESS.value == '' ){errors+='-  Must complete the field [Secondary Address].\n';pass=false;}
		if(CLDSECZIP.value == '' ){errors+='-  Must complete the field [Secondary Zip Code].\n';pass=false;}
		if (!validateNumeric(CLDSECZIP)) {
		  errors+='-  Must contain only digit [Secondary Zip Code].\n';pass=false;
		}else{
		  if(CLDSECCITY.value == '' ){errors+='-  Must complete the field [Secondary Zip Code].\n';pass=false;}
		}
	}


	if (!validateCharacter(CLDLNAME)) {errors+='-  Must contain only Character [Name Last].\n';pass=false;}
	if (!validateCharacter(CLDFNAME)) {errors+='-  Must contain only Character [Name First].\n';pass=false;}
	if (!validateCharacter(CLDMNAME)) {errors+='-  Must contain only Character [Name Middle].\n';pass=false;}
	if (!validateCharacter(CLDPLNAME)) {errors+='-  Must contain only Character [Parents Last Name].\n';pass=false;}
	if (!validateCharacter(CLDPFNAMES)) {errors+='-  Must contain only Character [Parents First Names].\n';pass=false;}
	if (!validateCharacter(CLDSTATE)) {errors+='-  Must contain only Character [State].\n';pass=false;}
	if (!validateCharacter(CLDSECSTATE)) {errors+='-  Must contain only Character [State].\n';pass=false;}
	

	if (!validateNumeric(CLDPHONE1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(CLDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(CLDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(CLDZIP))    {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}



	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}



/**************************************************************************************/
/**************************************************************************************/
function validateAffiliate(plusAction)
{
	var pass=true;
	var errors='';


	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
	AFFMKEY=document.frm.AFFMKEY;
	AFFCOMMUNITY=document.frm.AFFCOMMUNITY;
	AFFPOP=document.frm.AFFPOP;
	AFFMAILORG=document.frm.AFFMAILORG;
	AFFMAILSTREET=document.frm.AFFMAILSTREET;
	AFFMAILCITY=document.frm.AFFMAILCITY;
	AFFMAILZIP=document.frm.AFFMAILZIP;
	aff_Phone1=document.frm.aff_Phone1;
	aff_Phone2=document.frm.aff_Phone2;
	aff_Phone3=document.frm.aff_Phone3;
	AFFFAX1=document.frm.AFFFAX1;
	AFFFAX2=document.frm.AFFFAX2;
	AFFFAX3=document.frm.AFFFAX3;
	AFFEMAIL=document.frm.AFFEMAIL;
	AFFLCHAMPION=document.frm.AFFLCHAMPION;
	AFFCONTACT=document.frm.AFFCONTACT;
	AFFATTN=document.frm.AFFATTN;
	AFFSALUTATION=document.frm.AFFSALUTATION;
	
	AFFOTHERSTREET=document.frm.AFFOTHERSTREET;
	AFFOTHERCITY=document.frm.AFFOTHERCITY;
	AFFOTHERZIP=document.frm.AFFOTHERZIP;
	AFFOTHERSTATE=document.frm.AFFOTHERSTATE;
		
	AFFBROCHUREORG1=document.frm.AFFBROCHUREORG1;
	AFFBROCHUREORG2=document.frm.AFFBROCHUREORG2;
	AFFBROCHURESTREET=document.frm.AFFBROCHURESTREET;
	AFFBROCHURECITY=document.frm.AFFBROCHURECITY;
	AFFBROCHUREZIP=document.frm.AFFBROCHUREZIP;
	AFFRETADDRTAG1=document.frm.AFFRETADDRTAG1;
	AFFRETADDRTAG2=document.frm.AFFRETADDRTAG2;
	AFFMAILSTATE=document.frm.AFFMAILSTATE;
	AFFBROCHURESTATE=document.frm.AFFBROCHURESTATE;
	//AFFBROCHURE=document.frm.AFFBROCHURE;
	AFFOTHERMAILORG=document.frm.AFFOTHERMAILORG;
	aff_other_Phone1=document.frm.aff_other_Phone1;
	aff_other_Phone2=document.frm.aff_other_Phone3;
	aff_other_Phone3=document.frm.aff_other_Phone2;

	AFFINVOICEEMAIL=document.frm.AFFINVOICEEMAIL;
	AFFINVOICE=document.frm.AFFINVOICE;

if(document.frm.SameSecAddr[0].checked)	
	{
	
		if(aff_other_Phone1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		if(aff_other_Phone2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		if(aff_other_Phone3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		if(AFFOTHERMAILORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
		if(AFFOTHERCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
		if(AFFOTHERZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
		if(AFFOTHERSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
		if(!validateNumeric(AFFOTHERZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
		
		
		if(AFFOTHERSTREET.value == '' )
		{
			errors+='-  Must complete the field [Street].\n';pass=false;
		}
		else
		{
			myString = new String(AFFOTHERSTREET.value);
										
			if((myString.indexOf("Box")!=-1))
			{
				   errors+='- PO Box not allowed.\n';pass=false;
			}
		}
	}
	
	
	if(AFFMKEY.value == '' ){errors+='-  Must complete the field [Affiliate Id].\n';pass=false;}
	if(AFFCOMMUNITY.value == '' ){errors+='-  Must complete the field [Community].\n';pass=false;}
	if(AFFPOP.value == '' ){errors+='-  Must complete the field [Est. Population].\n';pass=false;}
	if(AFFMAILORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
	if(AFFMAILSTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if(AFFMAILCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(AFFMAILZIP.value == '' ){errors+='-  Must complete the field [Zip].\n';pass=false;}
	if(aff_Phone1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(aff_Phone2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(aff_Phone3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if(AFFFAX1.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if(AFFFAX2.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if(AFFFAX3.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	if(AFFLCHAMPION.value == '' ){errors+='-  Must complete the field [Local Champion].\n';pass=false;}
	if(AFFCONTACT.value == '' ){errors+='-  Must complete the field [Primary Chanpion].\n';pass=false;}
	if(AFFATTN.value == '' ){errors+='-  Must complete the field [Attention].\n';pass=false;}
	if(AFFSALUTATION.value == '' ){errors+='-  Must complete the field [Salutation].\n';pass=false;}

	if(AFFBROCHUREORG1.value == '' ){errors+='-  Must complete the field [Organization 1].\n';pass=false;}
	//if(AFFBROCHUREORG2.value == '' ){errors+='-  Must complete the field [Organization 2].\n';pass=false;}
	if(AFFBROCHURESTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if(AFFBROCHURECITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(AFFBROCHUREZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	//if(AFFRETADDRTAG1.value == '' ){errors+='-  Must complete the field [Tag Line 1].\n';pass=false;}
	//if(AFFRETADDRTAG2.value == '' ){errors+='-  Must complete the field [Tag Line 2].\n';pass=false;}
	

	if(!validateNumeric(AFFPOP)) {errors+='-  Must contain only digit [Population].\n';pass=false;}	
	if(!validateNumeric(AFFMAILZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	if(!validateNumeric(aff_Phone1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	//if(!validateNumeric(AFFFAX1)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if(!validateNumeric(AFFFAX2)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if(!validateNumeric(AFFFAX3)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	if(!validateNumeric(AFFBROCHUREZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}

	if(AFFINVOICE.value=='EMAIL')
	{
		if (!emailCheck(AFFINVOICEEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}	


	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}



/**************************************************************************************/
/**************************************************************************************/
function validateEnroll()
{
	var pass=true;
	var errors='';

	CLDLNAME=document.frm.CLDLNAME;
	CLDFNAME=document.frm.CLDFNAME;
	CLDZIP=document.frm.CLDZIP;
	CLDMNAME=document.frm.CLDMNAME;
	CLDCITY=document.frm.CLDCITY;
	CLDSTATE=document.frm.CLDSTATE;
	CLDBIRTHMM=document.frm.CLDBIRTHMM.value;
	CLDBIRTHDD=document.frm.CLDBIRTHDD.value;
	CLDBIRTHYY=document.frm.CLDBIRTHYY.value;
	
	
	if(CLDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	else{if (!validateCharacter(CLDLNAME)) {errors+='-  Must contain only Character [Name Last].\n';pass=false;}}
	if(CLDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	else{if (!validateCharacter(CLDFNAME)) {errors+='-  Must contain only Character [Name First].\n';pass=false;}}
//	if(CLDMNAME.value == '' ){errors+='-  Must complete the field [Middle Name].\n';pass=false;}
//	else{if (!validateCharacter(CLDMNAME)) {errors+='-  Must contain only Character [Name First].\n';pass=false;}}
	if(CLDZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	else{if (!validateNumeric(CLDZIP))    {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}}
	
	if(CLDZIP.value != '' ){if(CLDCITY.value == '' ){errors+='-  Wrong zip code information.\n';pass=false;}}

	if(!checkdate(CLDBIRTHDD,CLDBIRTHMM,CLDBIRTHYY)){errors+='-  The Birthday is greater than current date or is more than 5 years old.\n';pass=false;}
	
	if (!pass){alert('The following error(s) occurred:\n'+errors);}
	else
	{document.frm.submit();}
}







/**************************************************************************************/
/**************************************************************************************/
function validateStep1()
{
	var pass=true;
	var errors='';


		
	AFFMKEY=document.frm.AFFMKEY;
	AFFCOMMUNITY=document.frm.AFFCOMMUNITY;
	AFFPOP=document.frm.AFFPOP;
	AFFMAILORG=document.frm.AFFMAILORG;
	AFFMAILSTREET=document.frm.AFFMAILSTREET;
	AFFMAILCITY=document.frm.AFFMAILCITY;
	AFFMAILZIP=document.frm.AFFMAILZIP;
	aff_Phone1=document.frm.aff_Phone1;
	aff_Phone2=document.frm.aff_Phone2;
	aff_Phone3=document.frm.aff_Phone3;
	AFFFAX1=document.frm.AFFFAX1;
	AFFFAX2=document.frm.AFFFAX2;
	AFFFAX3=document.frm.AFFFAX3;
	AFFEMAIL=document.frm.AFFEMAIL;
	AFFLCHAMPION=document.frm.AFFLCHAMPION;
	AFFCONTACT=document.frm.AFFCONTACT;
	AFFCONTACTS=document.frm.AFFCONTACTS;
	AFFATTN=document.frm.AFFATTN;
	AFFSALUTATION=document.frm.AFFSALUTATION;
	
	AFFOTHERSTREET=document.frm.AFFOTHERSTREET;
	AFFOTHERCITY=document.frm.AFFOTHERCITY;
	AFFOTHERZIP=document.frm.AFFOTHERZIP;
	AFFOTHERSTATE=document.frm.AFFOTHERSTATE;
		
	AFFBROCHUREORG1=document.frm.AFFBROCHUREORG1;
	AFFBROCHUREORG2=document.frm.AFFBROCHUREORG2;
	AFFBROCHURESTREET=document.frm.AFFBROCHURESTREET;
	AFFBROCHURECITY=document.frm.AFFBROCHURECITY;
	AFFBROCHUREZIP=document.frm.AFFBROCHUREZIP;
	AFFRETADDRTAG1=document.frm.AFFRETADDRTAG1;
	AFFRETADDRTAG2=document.frm.AFFRETADDRTAG2;
	AFFMAILSTATE=document.frm.AFFMAILSTATE;
	AFFBROCHURESTATE=document.frm.AFFBROCHURESTATE;
	AFFOTHERMAILORG=document.frm.AFFOTHERMAILORG;
	aff_other_Phone1=document.frm.aff_other_Phone1;
	aff_other_Phone2=document.frm.aff_other_Phone3;
	aff_other_Phone3=document.frm.aff_other_Phone2;
	//AFFBROCHURE=document.frm.AFFBROCHURE;
	AFFINVOICEEMAIL=document.frm.AFFINVOICEEMAIL;
	AFFINVOICE=document.frm.AFFINVOICE;

	if(document.frm.SameSecAddr[0].checked)	
	{
	
		if(AFFOTHERMAILORG.value == '' ){errors+='-  Must complete the field [SHIPPING ADDRESS/Organization].\n';pass=false;}
		if(aff_other_Phone1.value == '' ){errors+='-  Must complete the field [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(aff_other_Phone2.value == '' ){errors+='-  Must complete the field [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(aff_other_Phone3.value == '' ){errors+='-  Must complete the field [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone1)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone2)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone3)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}

		if(AFFOTHERSTREET.value == '' )
		{
			errors+='-  Must complete the field [SHIPPING ADDRESS/Street].\n';pass=false;
		}
		else
		{
			myString = new String(AFFOTHERSTREET.value);
										
			if((myString.indexOf("Box")!=-1))
			{
				   errors+='-  PO Box not allowed.\n';pass=false;
			}
		}
		
		if(AFFOTHERZIP.value == '' ){
		  errors+='-  Must complete the field [SHIPPING ADDRESS/Zip Code].\n';pass=false;
		}else{
		  if(!validateNumeric(AFFOTHERZIP)) {
		    errors+='-  Must contain only digit [SHIPPING ADDRESS/zip].\n';pass=false;
		  }else{
		    if(AFFOTHERCITY.value == '' ){errors+='-  Invalid Zip code [SHIPPING ADDRESS/zip].\n';pass=false;}
		  }
		}
		//if(AFFOTHERSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
	}
	
	/*identification*/
	if(AFFMKEY.value == '' ){errors+='-  Must complete the field [IDENTIFICATION/Affiliate Id].\n';pass=false;}
	if(AFFCOMMUNITY.value == '' ){errors+='-  Must complete the field [IDENTIFICATION/Community].\n';pass=false;}
	if(AFFPOP.value == '' ){errors+='-  Must complete the field [IDENTIFICATION/Est. Population].\n';pass=false;}
	if(!validateNumeric(AFFPOP)) {errors+='-  Must contain only digit [IDENTIFICATION/Est. Population].\n';pass=false;}	
	
	/*address*/
	if(AFFMAILORG.value == '' ){errors+='-  Must complete the field [ADDRESS/Organization].\n';pass=false;}
	if(AFFMAILSTREET.value == '' ){errors+='-  Must complete the field [ADDRESS/Street].\n';pass=false;}
	if(AFFMAILZIP.value == '' ){
	  errors+='-  Must complete the field [ADDRESS/Zip].\n';pass=false;
	}else{
	  if(!validateNumeric(AFFMAILZIP)) {
	    errors+='-  Must contain only digit [ADDRESS/zip].\n';pass=false;
    }else{
		  if(AFFMAILCITY.value == '' ){errors+='-  Invalid Zip code [ADDRESS/zip].\n';pass=false;}
		}
	}
	if(aff_Phone1.value == '' ){errors+='-  Must complete the field [ADDRESS/Phone].\n';pass=false;}
	if(aff_Phone2.value == '' ){errors+='-  Must complete the field [ADDRESS/Phone].\n';pass=false;}
	if(aff_Phone3.value == '' ){errors+='-  Must complete the field [ADDRESS/Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone1)) {errors+='-  Must contain only digit [ADDRESS/Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone2)) {errors+='-  Must contain only digit [ADDRESS/Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone3)) {errors+='-  Must contain only digit [ADDRESS/Phone].\n';pass=false;}

	if(AFFEMAIL.value != '' ){
    if (!emailCheck(AFFEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}

	if(AFFLCHAMPION.value == '' ){errors+='-  Must complete the field [ADDRESS/Local Champion].\n';pass=false;}
	
	/*contact*/
	if(AFFCONTACT.value == '' ){errors+='-  Must complete the field [CONTACTS/Primary Chanpion].\n';pass=false;}
	if(AFFATTN.value == '' ){errors+='-  Must complete the field [CONTACTS/Attention].\n';pass=false;}
	if(AFFSALUTATION.value == '' ){errors+='-  Must complete the field [CONTACTS/Salutation].\n';pass=false;}
	
	
	/*if(AFFINVOICEEMAIL.value != '' )
	{*/
		//alert(AFFINVOICE.value);
		if(AFFINVOICE.value=='EMAIL')
		{
		    	if (!emailCheck(AFFINVOICEEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
		}
	/*}*/

	/*Brochure/Return Address*/
	if(AFFBROCHUREORG1.value == '' ){errors+='-  Must complete the field [Return Address/Organization 1].\n';pass=false;}
	if(AFFBROCHURESTREET.value == '' ){errors+='-  Must complete the field [Return Address/Street].\n';pass=false;}
	if(AFFBROCHUREZIP.value == '' ){
	  errors+='-  Must complete the field [Return Address/Zip Code].\n';pass=false;
	}else{
	  if(!validateNumeric(AFFBROCHUREZIP)) {
	    errors+='-  Must contain only digit [Return Address/Zip Code].\n';pass=false;
	  }else{
	    if(AFFBROCHURECITY.value == '' ){errors+='-  Invalid Zip code [Return Address/Zip Code].\n';pass=false;}
	  }
	}
	

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}	
	
	


/**************************************************************************************/
/**************************************************************************************/
function validateStep2(action)
{
if(action=='B')
	{
		document.frm.action="affiliate_New_Step1.php";
		document.frm.submit();
	}
	else
	{
	
	var pass=true;
	var errors='';
		
	COORDLNAME=document.frm.COORDLNAME;
	COORDFNAME=document.frm.COORDFNAME;
	COORDINIT=document.frm.COORDINIT;
	COORDADDR1=document.frm.COORDADDR1;
	COORDADDR2=document.frm.COORDADDR2;
	COORDCITY=document.frm.COORDCITY;
	COORDZIPCODE=document.frm.COORDZIPCODE;
	COORDPHONE1=document.frm.COORDPHONE1;
	COORDPHONE2=document.frm.COORDPHONE2;
	COORDPHONE3=document.frm.COORDPHONE3;
	COORDFAX1=document.frm.COORDFAX1;
	COORDFAX2=document.frm.COORDFAX2;
	COORDFAX3=document.frm.COORDFAX3;
	COORDCELL1=document.frm.COORDCELL1;
	COORDCELL2=document.frm.COORDCELL2;
	COORDCELL3=document.frm.COORDCELL3;
	COORDEMAIL=document.frm.COORDEMAIL;
	COORDSTATE=document.frm.COORDSTATE;

	if (COORDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if (COORDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	if (COORDADDR1.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	if (COORDZIPCODE.value == '' ){
	  errors+='-  Must complete the field [Zip Code].\n';pass=false;
	}else{
	  if (!validateNumeric(COORDZIPCODE)) {
	    errors+='-  Must contain only digit [Zip Code].\n';pass=false;
	  }else{
	    if (COORDCITY.value == '' ){errors+='-  Invalid Zip code [Zip Code].\n';pass=false;}
	  }
	}
	if (COORDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDEMAIL.value == '' ){
	  errors+='-  Must complete the field [Email].\n';pass=false;
	}else{
	  if (!emailCheck(COORDEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}
	
	if (!validateNumeric(COORDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	
  

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="affiliate_New_Step3.php";
		document.frm.submit();

	}
	}
}







/**************************************************************************************/
/**************************************************************************************/
function validateStep3(action)
{

if(action=='B')
	{
		document.frm.action="affiliate_New_Step2.php";
		document.frm.submit();
	}
	else
	{
	
	
	var pass=true;
	var errors='';

 	USERNAME=document.frm.USERNAME; 
	USERPW=document.frm.USERPW; 

	if (USERNAME.value == '' ){errors+='-  Must complete the field [User Name].\n';pass=false;}
	if (USERPW.value == '' ){errors+='-  Must complete the field [Password].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="affiliate_New_Step4.php";
		document.frm.submit();

	}
	}
}




/**************************************************************************************/
/**************************************************************************************/
function validateStep4(action)
{

	if(action=='B')
	{
		document.frm.action="affiliate_New_Step3.php";
		document.frm.submit();
	}
	else
	{
	var pass=true;
	var errors='';
		
	BILLORG=document.frm.BILLORG;
	BILLCHAMP=document.frm.BILLCHAMP;
	BILLATTN=document.frm.BILLATTN;
	BILLSTREET=document.frm.BILLSTREET;
	BILLCITY=document.frm.BILLCITY;
	BILLZIP=document.frm.BILLZIP;
	BILLEMAIL=document.frm.BILLEMAIL;
	BILLNEWORG0=document.frm.BILLNEWORG[0];
	BILLNEWORG1=document.frm.BILLNEWORG[1];	
	
	if(BILLNEWORG0.checked)
	{
				if (BILLORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
				if (BILLATTN.value == '' ){errors+='-  Must complete the field [Attention].\n';pass=false;}
				if (BILLSTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
				if (BILLZIP.value == '' )
				{
					  errors+='-  Must complete the field [Zip Code].\n';pass=false;
				}
				else
				{
			  		if (!validateNumeric(BILLZIP)) 
					{
			  			  errors+='-  Must contain only digit [Zip Code].\n';pass=false;
				  	}
					else
					{
			  			  if (BILLCITY.value == '' ){errors+='-   Invalid Zip code [Zip Code].\n';pass=false;}
				  	}
			   }

	}

	
	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="affiliate_New_Step5.php";
		document.frm.submit();

	}
  }
}





/**************************************************************************************/
/**************************************************************************************/
function validateZIP(plusAction)
{
	var pass=true;
	var errors='';

	
	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
		
	AFFMAILZIP=document.frm.AFFMAILZIP;
	AFFMAILCITY=document.frm.AFFMAILCITY;
	AFFMAILSTATE=document.frm.AFFMAILSTATE;

	if(AFFMAILZIP.value == '' ){errors+='-  Must complete the field [Zip].\n';pass=false;}
	if(AFFMAILCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(AFFMAILSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}

	if(!validateNumeric(AFFMAILZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();
	}

}	




 function putFocusIni(formInst, elementInst) 
 {
    if (document.forms.length > 0) 
  	{
  		 document.forms[formInst].elements[elementInst].focus();
	}
 }
 
 
 
 
 function checkdate(DD,MM,YY)
	{
		var monthfield=MM;
		var dayfield=DD;
		var yearfield=YY;		
		//genero un tipo date con la fecha actual (LOS MESES EN JS EMPIEZAN DE 0)
		var dayobj = new Date(yearfield, monthfield-1, dayfield)
    
    var currentDate = new Date();
    //genero un date con la fecha limite
		var past = new Date(currentDate.getFullYear()-6,currentDate.getMonth(),currentDate.getDate());
		
		//VERIFICO SI ES UNA FECHA FUTURA (NO DEBE SERLO)
		if (currentDate > dayobj)
		{
				//VERIFICO QUE NO SEA UNA FECHA MAYOR A LA FECHA LIMITE (5 AÑOS)
				if (past > dayobj)
				{
						output =  false;						
				}
				//SI PASO TODOS LOS CHEQUEOS CORRECTAMENTE
				else
				{
						output =  true;								
				}
		}
    //FECHA INGRESADA ES MAYOR A LA ACTUAL
		else
		{
				output =  false;						
		}
		//alert(output);
		return output;
	}








/**************************************************************************************/
/**************************************************************************************/
function validateStep2C(action)
{
if(action=='B')
	{
		document.frm.action="affiliate_New_Step1.php";
		document.frm.submit();
	}
	else
	{
	
	var pass=true;
	var errors='';
		
	COORDLNAME=document.frm.COORDLNAME;
	COORDFNAME=document.frm.COORDFNAME;
	COORDINIT=document.frm.COORDINIT;
	COORDADDR1=document.frm.COORDADDR1;
	COORDADDR2=document.frm.COORDADDR2;
	COORDCITY=document.frm.COORDCITY;
	COORDZIPCODE=document.frm.COORDZIPCODE;
	COORDPHONE1=document.frm.COORDPHONE1;
	COORDPHONE2=document.frm.COORDPHONE2;
	COORDPHONE3=document.frm.COORDPHONE3;
	COORDFAX1=document.frm.COORDFAX1;
	COORDFAX2=document.frm.COORDFAX2;
	COORDFAX3=document.frm.COORDFAX3;
	COORDCELL1=document.frm.COORDCELL1;
	COORDCELL2=document.frm.COORDCELL2;
	COORDCELL3=document.frm.COORDCELL3;
	COORDEMAIL=document.frm.COORDEMAIL;
	COORDSTATE=document.frm.COORDSTATE;

	if (COORDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if (COORDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	if (COORDADDR1.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	//if (COORDADDR2.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	if (COORDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (COORDZIPCODE.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (COORDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if (COORDFAX1.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX2.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX3.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDCELL1.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL2.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL3.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	if (COORDEMAIL.value == '' ){errors+='-  Must complete the field [Email].\n';pass=false;}
	if (COORDSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
	
	if (!validateNumeric(COORDZIPCODE)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	//if (!validateNumeric(COORDFAX1)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX2)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX3)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDCELL1)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if (!validateNumeric(COORDCELL2)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if (!validateNumeric(COORDCELL3)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	if (!validateNumeric(COORDPHONE1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	
    if (!emailCheck(COORDEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="coordinator_New_Step2.php";
		document.frm.submit();

	}
	}
}







/**************************************************************************************/
/**************************************************************************************/
function validateStep3C(action)
{

if(action=='B')
	{
		document.frm.action="coordinator_New_Step1.php";
		document.frm.submit();
	}
	else
	{
	
	
	var pass=true;
	var errors='';

 	USERNAME=document.frm.USERNAME; 
	USERPW=document.frm.USERPW; 

	if (USERNAME.value == '' ){errors+='-  Must complete the field [User Name].\n';pass=false;}
	if (USERPW.value == '' ){errors+='-  Must complete the field [Password].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="coordinator_New_Step3.php";
		document.frm.submit();

	}
	}
}








/**************************************************************************************/
/**************************************************************************************/
function validateStep2DC(action)
{
if(action=='B')
	{
		document.frm.action="affiliateDC_New_Step1.php";
		document.frm.submit();
	}
	else
	{
	
	var pass=true;
	var errors='';
		
	COORDLNAME=document.frm.COORDLNAME;
	COORDFNAME=document.frm.COORDFNAME;
	COORDINIT=document.frm.COORDINIT;
	COORDADDR1=document.frm.COORDADDR1;
	COORDADDR2=document.frm.COORDADDR2;
	COORDCITY=document.frm.COORDCITY;
	COORDZIPCODE=document.frm.COORDZIPCODE;
	COORDPHONE1=document.frm.COORDPHONE1;
	COORDPHONE2=document.frm.COORDPHONE2;
	COORDPHONE3=document.frm.COORDPHONE3;
	COORDFAX1=document.frm.COORDFAX1;
	COORDFAX2=document.frm.COORDFAX2;
	COORDFAX3=document.frm.COORDFAX3;
	COORDCELL1=document.frm.COORDCELL1;
	COORDCELL2=document.frm.COORDCELL2;
	COORDCELL3=document.frm.COORDCELL3;
	COORDEMAIL=document.frm.COORDEMAIL;
	COORDSTATE=document.frm.COORDSTATE;

	if (COORDLNAME.value == '' ){errors+='-  Must complete the field [Last Name].\n';pass=false;}
	if (COORDFNAME.value == '' ){errors+='-  Must complete the field [First Name].\n';pass=false;}
	if (COORDADDR1.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	//if (COORDADDR2.value == '' ){errors+='-  Must complete the field [Address Name].\n';pass=false;}
	if (COORDCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if (COORDZIPCODE.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (COORDPHONE1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if (COORDPHONE3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if (COORDFAX1.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX2.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDFAX3.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if (COORDCELL1.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL2.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	//if (COORDCELL3.value == '' ){errors+='-  Must complete the field [Cell].\n';pass=false;}
	if (COORDEMAIL.value == '' ){errors+='-  Must complete the field [Email].\n';pass=false;}
	if (COORDSTATE.value == '' ){errors+='-  Must complete the field [State].\n';pass=false;}
	
	if (!validateNumeric(COORDZIPCODE)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	//if (!validateNumeric(COORDFAX1)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX2)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDFAX3)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if (!validateNumeric(COORDCELL1)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if (!validateNumeric(COORDCELL2)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	//if (!validateNumeric(COORDCELL3)) {errors+='-  Must contain only digit [Cell].\n';pass=false;}
	if (!validateNumeric(COORDPHONE1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if (!validateNumeric(COORDPHONE3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	
    if (!emailCheck(COORDEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="coordinatorDC_New_Step2.php";
		document.frm.submit();

	}
	}
}







/**************************************************************************************/
/**************************************************************************************/
function validateStep3DC(action)
{

if(action=='B')
	{
		document.frm.action="coordinatorDC_New_Step1.php";
		document.frm.submit();
	}
	else
	{
	
	
	var pass=true;
	var errors='';

 	USERNAME=document.frm.USERNAME; 
	USERPW=document.frm.USERPW; 

	if (USERNAME.value == '' ){errors+='-  Must complete the field [User Name].\n';pass=false;}
	if (USERPW.value == '' ){errors+='-  Must complete the field [Password].\n';pass=false;}

	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.action="coordinatorDC_New_Step3.php";
		document.frm.submit();

	}
	}
}



/**************************************************************************************/
/**************************************************************************************/
function validatePass()
{
	var pass=true;
	var errors='';
		
	OLDUSERPW=document.frm.OLDUSERPW;
	NEWUSERPW1=document.frm.NEWUSERPW1;
	NEWUSERPW2=document.frm.NEWUSERPW2;
	
	if (OLDUSERPW.value == '' ){errors+='-  Must complete the field [Old Password].\n';pass=false;}
	if (NEWUSERPW1.value == '' ){errors+='-  Must complete the field [New Password].\n';pass=false;}
	if (NEWUSERPW2.value == '' ){errors+='-  Must complete the field [Retype Password].\n';pass=false;}
	if (OLDUSERPW.value ==  NEWUSERPW1.value){errors+='- [New Password] Must be different than [Old Password].\n';pass=false;}
	if (NEWUSERPW1.value !=  NEWUSERPW2.value){errors+='- [New Password] Must be iqual than [ReType Password].\n';pass=false;}
		
	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();
	}
}









/**************************************************************************************/
/**************************************************************************************/
function validateAffiliate_CO(plusAction)
{
	var pass=true;
	var errors='';


	if(plusAction == 'next')
	{
		document.frm.plusAction.value = '1';
	}
		
	AFFMKEY=document.frm.AFFMKEY;
	AFFCOMMUNITY=document.frm.AFFCOMMUNITY;
	AFFPOP=document.frm.AFFPOP;
	AFFMAILORG=document.frm.AFFMAILORG;
	AFFMAILSTREET=document.frm.AFFMAILSTREET;
	AFFMAILCITY=document.frm.AFFMAILCITY;
	AFFMAILZIP=document.frm.AFFMAILZIP;
	aff_Phone1=document.frm.aff_Phone1;
	aff_Phone2=document.frm.aff_Phone2;
	aff_Phone3=document.frm.aff_Phone3;
	AFFFAX1=document.frm.AFFFAX1;
	AFFFAX2=document.frm.AFFFAX2;
	AFFFAX3=document.frm.AFFFAX3;
	AFFEMAIL=document.frm.AFFEMAIL;
	AFFLCHAMPION=document.frm.AFFLCHAMPION;
	AFFCONTACT=document.frm.AFFCONTACT;
	AFFCONTACTS=document.frm.AFFCONTACTS;
	AFFATTN=document.frm.AFFATTN;
	AFFSALUTATION=document.frm.AFFSALUTATION;
	
	AFFOTHERSTREET=document.frm.AFFOTHERSTREET;
	AFFOTHERCITY=document.frm.AFFOTHERCITY;
	AFFOTHERZIP=document.frm.AFFOTHERZIP;
	AFFOTHERSTATE=document.frm.AFFOTHERSTATE;
		
	AFFBROCHUREORG1=document.frm.AFFBROCHUREORG1;
	AFFBROCHUREORG2=document.frm.AFFBROCHUREORG2;
	AFFBROCHURESTREET=document.frm.AFFBROCHURESTREET;
	AFFBROCHURECITY=document.frm.AFFBROCHURECITY;
	AFFBROCHUREZIP=document.frm.AFFBROCHUREZIP;
	AFFRETADDRTAG1=document.frm.AFFRETADDRTAG1;
	AFFRETADDRTAG2=document.frm.AFFRETADDRTAG2;
	AFFMAILSTATE=document.frm.AFFMAILSTATE;
	AFFBROCHURESTATE=document.frm.AFFBROCHURESTATE;
	//AFFBROCHURE=document.frm.AFFBROCHURE;
	AFFOTHERMAILORG=document.frm.AFFOTHERMAILORG;
	aff_other_Phone1=document.frm.aff_other_Phone1;
	aff_other_Phone2=document.frm.aff_other_Phone3;
	aff_other_Phone3=document.frm.aff_other_Phone2;
	AFFINVOICEEMAIL=document.frm.AFFINVOICEEMAIL;
	AFFINVOICE=document.frm.AFFINVOICE;


if(document.frm.SameSecAddr[0].checked)	
	{
	
		//if(aff_other_Phone1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		//if(aff_other_Phone2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		//if(aff_other_Phone3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
		if(AFFOTHERMAILORG.value == '' ){errors+='-  Must complete the field [SHIPPING ADDRESS/Organization].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone1)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone2)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}
		if(!validateNumeric(aff_other_Phone3)) {errors+='-  Must contain only digit [SHIPPING ADDRESS/Phone].\n';pass=false;}

		if(AFFOTHERZIP.value == '' ){
		  errors+='-  Must complete the field [SHIPPING ADDRESS/Zip Code].\n';pass=false;
		}else{
		  if(!validateNumeric(AFFOTHERZIP)) {
		    errors+='-  Must contain only digit [SHIPPING ADDRESS/zip].\n';pass=false;
		  }else{
		    if(AFFOTHERCITY.value == '' ){errors+='-  Invalid Zip code [SHIPPING ADDRESS/zip].\n';pass=false;}
		  }
		}
		
		/*if(AFFOTHERSTREET.value == '' )
		{
			errors+='-  Must complete the field [Street].\n';pass=false;
		}
		else
		{
			myString = new String(AFFOTHERSTREET.value);
										
			if((myString.indexOf("Box")!=-1))
			{
				   errors+='- PO Box not allowed.\n';pass=false;
			}
		}*/
	}
	
	
/*
	if(AFFMKEY.value == '' ){errors+='-  Must complete the field [Affiliate Id].\n';pass=false;}
	if(AFFCOMMUNITY.value == '' ){errors+='-  Must complete the field [Community].\n';pass=false;}
	if(AFFPOP.value == '' ){errors+='-  Must complete the field [Est. Population].\n';pass=false;}

	if(AFFMAILORG.value == '' ){errors+='-  Must complete the field [Organization].\n';pass=false;}
	//if(AFFMAILSTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if(AFFMAILCITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(AFFMAILZIP.value == '' ){errors+='-  Must complete the field [Zip].\n';pass=false;}
	if(aff_Phone1.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(aff_Phone2.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	if(aff_Phone3.value == '' ){errors+='-  Must complete the field [Phone].\n';pass=false;}
	//if(AFFFAX1.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if(AFFFAX2.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if(AFFFAX3.value == '' ){errors+='-  Must complete the field [Fax].\n';pass=false;}
	//if(AFFLCHAMPION.value == '' ){errors+='-  Must complete the field [Local Champion].\n';pass=false;}

	if(!validateNumeric(AFFPOP)) {errors+='-  Must contain only digit [Population].\n';pass=false;}	
	if(!validateNumeric(AFFMAILZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}
	if(!validateNumeric(aff_Phone1)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone2)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	if(!validateNumeric(aff_Phone3)) {errors+='-  Must contain only digit [Phone].\n';pass=false;}
	//if(!validateNumeric(AFFFAX1)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if(!validateNumeric(AFFFAX2)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}
	//if(!validateNumeric(AFFFAX3)) {errors+='-  Must contain only digit [Fax].\n';pass=false;}

	if(AFFEMAIL.value != '' )
	{
    	if (!emailCheck(AFFEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}

	*/
	//if(AFFCONTACT.value == '' ){errors+='-  Must complete the field [Primary Chanpion].\n';pass=false;}
	//if(AFFCONTACTS.value == '' ){errors+='-  Must complete the field [Additional Contact].\n';pass=false;}
	if(AFFATTN.value == '' ){errors+='-  Must complete the field [Attention].\n';pass=false;}
	if(AFFSALUTATION.value == '' ){errors+='-  Must complete the field [Salutation].\n';pass=false;}

	if(AFFBROCHUREORG1.value == '' ){errors+='-  Must complete the field [Organization 1].\n';pass=false;}
	//if(AFFBROCHUREORG2.value == '' ){errors+='-  Must complete the field [Organization 2].\n';pass=false;}
	//if(AFFBROCHURESTREET.value == '' ){errors+='-  Must complete the field [Street].\n';pass=false;}
	if(AFFBROCHURECITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}
	if(AFFBROCHUREZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	//if(AFFRETADDRTAG1.value == '' ){errors+='-  Must complete the field [Tag Line 1].\n';pass=false;}
	//if(AFFRETADDRTAG2.value == '' ){errors+='-  Must complete the field [Tag Line 2].\n';pass=false;}
	

	if(!validateNumeric(AFFBROCHUREZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}


	if(AFFINVOICE.value=='EMAIL')
	{
		if (!emailCheck(AFFINVOICEEMAIL.value)) {errors+='-  Must contain a valid [EMail].\n';pass=false;}
	}	



	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();

	}
}





/**************************************************************************************/
/**************************************************************************************/
function validateZip2()
{
	var pass=true;
	var errors='';
		
	ZIP=document.frm.ZIP;
	CITY=document.frm.CITY;

	
	if (ZIP.value == '' ){errors+='-  Must complete the field [Zip Code].\n';pass=false;}
	if (CITY.value == '' ){errors+='-  Must complete the field [City].\n';pass=false;}

	if(!validateNumeric(ZIP)) {errors+='-  Must contain only digit [Zip Code].\n';pass=false;}	

		
	if (!pass) 
    {
		alert('The following error(s) occurred:\n'+errors);
	}
	else
	{      
		document.frm.submit();
	}
}
