function Form1_Validator(theForm)
{

//
// Pubs using validation
// Pap
//


arrCheck = new Array(999)

build_array(arrCheck)

var strflag,strcheck,strcheck5,strcheck10,intcheck5,intcheck10;
var strfname,strcity,strstate,strzip,strzip3; 
var atPos,strpub;
var strprice,atPosprice,strskipcheck;
var strslen,atPosslen;

//	
// Beginning of Address Var. 
//

	
	
	//if (theForm.f_name.value && theForm.l_name.value != "" )
	//{
	strpub = new String(theForm.pub.value);
	
	strfname = new String(theForm.f_name.value);
	strfname = strfname.toUpperCase( );
	
	
	strcity = new String(theForm.city.value);
	strcity = strcity.toUpperCase( );
	
	strstate = new String(theForm.state.value)
	strstate = strstate.toUpperCase( );
	
	
	
//	
// End of Address Var. 
//
	
//
// RPUB Checking
//

if (theForm.rpubflag.value == "Y" || theForm.rpubflag.value == "YN" || theForm.rpubflag.value == "M" || theForm.rpubflag.value == "A") 
{

if (theForm.rpubflag.value == "A" )
	if (!theForm.rpub.checked )
	  {
	    alert("Please check YES to receive magazine");
	    theForm.rpub.focus();
	    return (false);
	  }
	  

if (theForm.rpubflag.value == "Y" )
	if (!theForm.rpub[0].checked )
	  {
	    alert("Please check YES to receive magazine");
	    theForm.rpub[0].focus();
	    return (false);
	  }
	  
		
 if ( theForm.rpubflag.value == "YN")
       {
	atPos = -1
	for (i=0;i<theForm.rpub.length;i++) 
	{ 
		if (theForm.rpub(i).checked)
		{ 
		atPos = i
		}
	}
	if (atPos == -1 )
		{
    		alert("Please select change of address or cancel");
    		theForm.rpub(0).focus();
    		return (false);
		}
       }

if (theForm.rpubflag.value == "M")
	{
		atPos = -1
		for (i=0;i<theForm.rpub.length;i++) 
		{ 
			if (theForm.rpub(i).checked)
			{ 
			atPos = i
			}
		}
		if (atPos == -1 )
			{
    			alert("Please check YES box to receive magazine");
    			theForm.rpub(0).focus();
    			return (false);
			}
		if (theForm.form.value == "NEW" || theForm.form.value == "RENEW" || theForm.form.value == "REQUAL")
			{
			// change_flag(theForm)
			if (theForm.rpub(1).checked)
				{
					strskipcheck = "TRUE" 
				}
			}	
	}
 

}


//
// End of RPUB Checking 
//

//
//Slen Checking
//

	if (theForm.form.value == "GIFT" || theForm.form.value == "RENEW" || theForm.form.value == "NEW" || theForm.form.value == "VIP" )
		{
		if (theForm.slenflag.value == "A") 
			if (!theForm.slen.checked )
  				{
    				alert("Please check one subscription length option");
    				theForm.slen.focus();
    				return (false);
  				}
  
			if (theForm.slenflag.value == "Y") 
				{
				atPosslen = -1
				//document.write(atPosslen)

				for (i=0;i<theForm.slen.length;i++) 
					{ 
				if (theForm.slen(i).checked )
					{ 
					atPosslen = i
					strslen = theForm.slen(i).value 
					}
				}
				// document.write(atPosslen)

				if (atPosslen == -1 )
					{
					alert("Please check one subscription length option");
					theForm.slen(0).focus();
					return (false);
					}
		}
	}
//
//End Slen Checking
//
		
//		
// Start Checking the Address 
//


//
// E-Mail Rtn 
//
 
if (theForm.emailflag.value == "Y" )
{


var stremail,perPos; 

stremail = new String(theForm.e_mail.value);
	    
atPos = theForm.e_mail.value.indexOf ('@', 1)

if (theForm.e_mail.value == "" || theForm.e_mail.value.indexOf ('@', 0) == -1)
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.e_mail.focus();
    return (false);
  }
 
perPos = theForm.e_mail.value.indexOf ('.',atPos)
 
 if (perPos == -1)
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.e_mail.focus();
    return (false);
  }
  
 for (i=0; i < stremail.length; i++)
 { if (stremail.charAt(i) == " ")
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.e_mail.focus();
    return (false);
   }
}

}

//
// End of E-Mail Rtn 
//

if (theForm.f_name.value == "")
  {
    alert("Please enter First Name");
    theForm.f_name.focus();
    return (false);
  }

// document.write(strfname)
// if (strfname.charAt(i) != " " || strfname.charAt(i) != "Ñ"  || strfname.charAt(i) != "ñ" || strfname.charAt(i) != "í" || strfname.charAt(i) != "é" )  
//var regname = /^([A-ZÇ-Ü]{1,20}\ {0,20})$/;]

var regname = /^([A-ZÇ-Üí-ñ - ]{1,20})$/;


if (regname.test(strfname))
	{
	// Continue 
	}
else
	{
	   alert("First Name must be alphabetic ");
	   theForm.f_name.focus();
	   return (false);
    }

 
if (theForm.l_name.value == "")
  {
    alert("Please enter Last Name");
    theForm.l_name.focus();
    return (false);
  }
  
if (theForm.titleflag.value == "Y" )
{
  
	if (theForm.title.value == "")
	{
		alert("Please enter title");
		theForm.title.focus();
		return (false);
	}
}


if (theForm.companyflag.value == "Y" )
{
  
	if (theForm.company.value == "")
	{
		alert("Please enter company");
		theForm.company.focus();
		return (false);
	}
  
}
  
if (theForm.street.value == "")
  {
    alert("Please enter Street Address");
    theForm.street.focus();
    return (false);
  }
  
if (theForm.city.value == "")
  {
    alert("Please enter City");
    theForm.city.focus();
    return (false);
  }

var regcity = /^([A-ZÇ-Üí-ñ - ]{1,23})$/;


if (regcity.test(strcity))
	{
	// Continue 
	}
else
	{
		alert("City must be alphabetic ");
		theForm.city.focus();
		return (false);
    }
    
//
// State Rtn 
//

if (theForm.country_code.value == "000" || theForm.country_code.value == "001")  
 {
  
if (theForm.state.value == "" || theForm.state.value == "--")
  {
    alert("Please Select State");
    theForm.state.focus();
    return (false);
  }
  
 }
  
//
// End of State Rtn 
//
 
 
//
// Zip Code Rtn 
//
 
if (theForm.country_code.value == "000" )  
 {
 
	// Check Zip Code 
	strcheck = new String(theForm.zip.value) ;
	strzip = new String(theForm.zip.value);
	strzip = strzip.toUpperCase( );
	strzip3 = strzip.substring(0,3) ;
	
	// Flag for Zip Code 	
	strflag = new String("") ;
	
	// Check 5 Zip Code 
	strcheck5 = strcheck.substring(0,5) ;
	intcheck5 = new Number(strcheck5) ;
	
	// Check 10 Zip Code 
	strcheck10 = strcheck.substring(10,6) ;
	intcheck10 = new Number(strcheck10) ;
	
	//document.write(intcheck10)


if (theForm.zip.value == "")
  {
	alert("Please enter Postal Code");
    theForm.zip.focus();
    return (false);
  }
 
 //document.write(strzip3 + strstate)
  
 
 for (i=0; i < arrCheck.length; i++)
 { if (arrCheck[i] == strzip3 + strstate )
  {
   strflag = "True" 
  }
}

if (strflag == "" ) 
  {
    alert("Wrong State or Zip Code ");
    theForm.zip.focus();
    return (false);
  }
 
if (isNaN(intcheck5)) 
	{
	   alert("Check if Postal Code is not numeric ");
	   theForm.zip.focus();
	   return (false);
    } 
    
if (isNaN(intcheck10)) 
	{
	   alert("Check if Postal Code is not numeric ");
	   theForm.zip.focus();
	   return (false);
    }
  if ( strcheck.length == 5 || strcheck.length == 10 ) 
	   ; //Continue
  	
  else 
	 {
	   alert("Check if Postal Code is right length ");
	   theForm.zip.focus();
	   return (false);
     } 
 
}

//
// End of Zip Rtn 
//

//
// Phone Rtn 
//

if (theForm.phoneflag.value == "Y" || theForm.faxflag.value == "Y" )

{
var valphone
var regphone = /^\(?[\.\-\/\+\(\)\ \d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\.\-\/\+\d]$/;
}


if (theForm.phoneflag.value == "Y" )
{


if (theForm.phone.value == "")
  {
    alert("Please provide your Phone Number");
    theForm.phone.focus();
    return (false);
  }
  


valphone = theForm.phone.value


//if  (isNaN(theForm.phone.value))

if (regphone.test(valphone))
	{
	// Continue 
	}
else
	{
	   alert("The phone number is an invalid number, please re-enter. ");
	   theForm.phone.focus();
	   return (false);
    }


}
//
// End of Phone Rtn 
//

//
// Fax Rtn 
//

if (theForm.faxflag.value == "Y" )
{



if (theForm.fax.value == "")
  {
    alert("Please provide your Fax Number");
    theForm.fax.focus();
    return (false);
  }
 
valphone = theForm.fax.value

//if  (isNaN(theForm.fax.value))

if (regphone.test(valphone))
	{
	// Continue 
	}
else
	{
	   alert("The fax number is an invalid number, please re-enter. ");
	   theForm.fax.focus();
	   return (false);
    }

 
 }
 
//
// End of Fax Rtn 
//


//}
//
// End of Address Checking 
//


//	
// Beginning of Address Var. 
//

	// var strflag,strcheck,strcheck5,strcheck10,intcheck5,intcheck10;
	// var strfname,strcity,strstate,strzip,strzip3; 
	// var atPos,strpub;
	// var strprice,atPosprice,strskipcheck;
	
	strpub = new String(theForm.pub.value);
	
	if (theForm.billtoflag.value == "Y")  
	{
	strfname = new String(theForm.billto_fname.value);
	strfname = strfname.toUpperCase( );
	
	
	strcity = new String(theForm.billto_city.value);
	strcity = strcity.toUpperCase( );
	
	strstate = new String(theForm.billto_state.value)
	strstate = strstate.toUpperCase( );
	
	}
	
//	
// End of Address Var. 
//
	
//
// RPUB Checking
//

if (theForm.rpubflag.value == "Y" || theForm.rpubflag.value == "YN" || theForm.rpubflag.value == "M" || theForm.rpubflag.value == "A") 
{

if (theForm.rpubflag.value == "A" )
	if (!theForm.rpub.checked )
	  {
	    alert("Please check YES to receive magazine");
	    theForm.rpub.focus();
	    return (false);
	  }
	  

if (theForm.rpubflag.value == "Y" )
	if (!theForm.rpub[0].checked )
	  {
	    alert("Please check YES to receive magazine");
	    theForm.rpub[0].focus();
	    return (false);
	  }
	  
		
 if ( theForm.rpubflag.value == "YN")
       {
	atPos = -1
	for (i=0;i<theForm.rpub.length;i++) 
	{ 
		if (theForm.rpub(i).checked)
		{ 
		atPos = i
		}
	}
	if (atPos == -1 )
		{
    		alert("Please select change of address or cancel");
    		theForm.rpub(0).focus();
    		return (false);
		}
       }

if (theForm.rpubflag.value == "M")
	{
		atPos = -1
		for (i=0;i<theForm.rpub.length;i++) 
		{ 
			if (theForm.rpub(i).checked)
			{ 
			atPos = i
			}
		}
		if (atPos == -1 )
			{
    			alert("Please check YES box to receive magazine");
    			theForm.rpub(0).focus();
    			return (false);
			}
		if (theForm.form.value == "NEW" || theForm.form.value == "RENEW" || theForm.form.value == "REQUAL")
			{
			// change_flag(theForm)
			if (theForm.rpub(1).checked)
				{
					strskipcheck = "TRUE" 
				}
			}	
	}
 

}


//
// End of RPUB Checking 
//

if (theForm.billtoflag.value == "Y")  
{

//		
// Start Checking the billto Address 
//

//
// Billto_EMail Rtn 
//
 
var stremail,perPos; 

stremail = new String(theForm.billto_email.value);
	    
atPos = theForm.billto_email.value.indexOf ('@', 1)

if (theForm.billto_email.value == "" || theForm.billto_email.value.indexOf ('@', 0) == -1)
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.billto_email.focus();
    return (false);
  }
 
perPos = theForm.billto_email.value.indexOf ('.',atPos)
 
 if (perPos == -1)
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.billto_email.focus();
    return (false);
  }
  
 for (i=0; i < stremail.length; i++)
 { if (stremail.charAt(i) == " ")
  {
    alert("Email is either blank or in-valid, please re-enter");
    theForm.billto_email.focus();
    return (false);
   }
}


//
// End of Billto_EMail Rtn 
//

//
// E-Mail Rtn For Gift 
//
 

var stremail,perPos; 

stremail = new String(theForm.e_mail.value);
	    
atPos = theForm.e_mail.value.indexOf ('@', 1)

if (theForm.e_mail.value == "" || theForm.e_mail.value == null)
   {
   // Continue 
   }
else
	{
	if (theForm.e_mail.value.indexOf ('@', 0) == -1)
	{
    alert("Email is @ in-valid, please re-enter");
    theForm.e_mail.focus();
    return (false);
	}
 
	perPos = theForm.e_mail.value.indexOf ('.',atPos)
 
	if (perPos == -1)
	{
		alert("Email is . in-valid, please re-enter");
		theForm.e_mail.focus();
		return (false);
	 }
  
	for (i=0; i < stremail.length; i++)
	{ if (stremail.charAt(i) == " ")
		{
		alert("Email has space, please re-enter");
		theForm.e_mail.focus();
		return (false);
	}
	}
}


//
// End of E_Mail Rtn For Gift
//
if (theForm.billto_fname.value == "")
  {
    alert("Please enter First Name");
    theForm.billto_fname.focus();
    return (false);
  }

// document.write(strfname)
// if (strfname.charAt(i) != " " || strfname.charAt(i) != "Ñ"  || strfname.charAt(i) != "ñ" || strfname.charAt(i) != "í" || strfname.charAt(i) != "é" )  
//var regname = /^([A-ZÇ-Ü]{1,20}\ {0,20})$/;]

var regname = /^([A-ZÇ-Üí-ñ - ]{1,20})$/;


if (regname.test(strfname))
	{
	// Continue 
	}
else
	{
	   alert("First Name must be alphabetic ");
	   theForm.billto_fname.focus();
	   return (false);
    }

 
if (theForm.billto_lname.value == "")
  {
    alert("Please enter Last Name");
    theForm.billto_lname.focus();
    return (false);
  }
  
if (theForm.titleflag.value == "Y" )
{
  
	if (theForm.billto_title.value == "")
	{
		alert("Please enter title");
		theForm.billto_title.focus();
		return (false);
	}
}


if (theForm.companyflag.value == "Y" )
{
  
	if (theForm.billto_company.value == "")
	{
		alert("Please enter company");
		theForm.billto_company.focus();
		return (false);
	}
  
}
  
if (theForm.billto_street.value == "")
  {
    alert("Please enter Street Address");
    theForm.billto_street.focus();
    return (false);
  }
  
if (theForm.billto_city.value == "")
  {
    alert("Please enter City");
    theForm.billto_city.focus();
    return (false);
  }

var regcity = /^([A-ZÇ-Üí-ñ - ]{1,23})$/;


if (regcity.test(strcity))
	{
	// Continue 
	}
else
	{
		alert("City must be alphabetic ");
		theForm.billto_city.focus();
		return (false);
    }
    
//
// State Rtn 
//

if (theForm.billto_country_code.value == "000" || theForm.billto_country_code.value == "001")  
 {
  
if (theForm.billto_state.value == "" || theForm.billto_state.value == "--")
  {
    alert("Please Select State");
    theForm.billto_state.focus();
    return (false);
  }
  
 }
  
//
// End of State Rtn 
//
 
 
//
// Zip Code Rtn 
//
 
if (theForm.billto_country_code.value == "000" )  
 {
 
	// Check Zip Code 
	strcheck = new String(theForm.billto_zip.value) ;
	strzip = new String(theForm.billto_zip.value);
	strzip = strzip.toUpperCase( );
	strzip3 = strzip.substring(0,3) ;
	
	// Flag for Zip Code 	
	strflag = new String("") ;
	
	// Check 5 Zip Code 
	strcheck5 = strcheck.substring(0,5) ;
	intcheck5 = new Number(strcheck5) ;
	
	// Check 10 Zip Code 
	strcheck10 = strcheck.substring(10,6) ;
	intcheck10 = new Number(strcheck10) ;
	
	//document.write(intcheck10)


if (theForm.billto_zip.value == "")
  {
	alert("Please enter Postal Code");
    theForm.billto_zip.focus();
    return (false);
  }
 
 //document.write(strzip3 + strstate)
  
 
 for (i=0; i < arrCheck.length; i++)
 { if (arrCheck[i] == strzip3 + strstate )
  {
   strflag = "True" 
  }
}

if (strflag == "" ) 
  {
    alert("Wrong State or Zip Code ");
    theForm.billto_zip.focus();
    return (false);
  }
 
if (isNaN(intcheck5)) 
	{
	   alert("Check if Postal Code is not numeric ");
	   theForm.billto_zip.focus();
	   return (false);
    } 
    
if (isNaN(intcheck10)) 
	{
	   alert("Check if Postal Code is not numeric ");
	   theForm.billto_zip.focus();
	   return (false);
    }
  if ( strcheck.length == 5 || strcheck.length == 10 ) 
	   ; //Continue
  	
  else 
	 {
	   alert("Check if Postal Code is right length ");
	   theForm.billto_zip.focus();
	   return (false);
     } 
 
}

//
// End of Zip Rtn 
//

//
// Phone Rtn 
//

if (theForm.phoneflag.value == "Y" || theForm.faxflag.value == "Y" )

{
var valphone
var regphone = /^\(?[\.\-\/\+\(\)\ \d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\(\)\ \.\-\/\+\d]?[\.\-\/\+\d]$/;
}


if (theForm.phoneflag.value == "Y" )
{


if (theForm.billto_phone.value == "")
  {
    alert("Please provide your Phone Number");
    theForm.billto_phone.focus();
    return (false);
  }
  


valphone = theForm.billto_phone.value


//if  (isNaN(theForm.phone.value))

if (regphone.test(valphone))
	{
	// Continue 
	}
else
	{
	   alert("The phone number is an invalid number, please re-enter. ");
	   theForm.billto_phone.focus();
	   return (false);
    }


}
//
// End of Phone Rtn 
//

//
// Fax Rtn 
//

if (theForm.faxflag.value == "Y" )
{



if (theForm.billto_fax.value == "")
  {
    alert("Please provide your Fax Number");
    theForm.billto_fax.focus();
    return (false);
  }
 
valphone = theForm.billto_fax.value

//if  (isNaN(theForm.fax.value))

if (regphone.test(valphone))
	{
	// Continue 
	}
else
	{
	   alert("The fax number is an invalid number, please re-enter. ");
	   theForm.billto_fax.focus();
	   return (false);
    }

 
 }
 
//
// End of Fax Rtn 
//


//
// End of billto Address Checking 
//
}

if (strskipcheck == "TRUE")
	{
		return (true);
	} 
	
//
// BPA Checking
//

if (theForm.verifyflag.value == "Y") 
{
	if (theForm.verify.value == "")
	{
		alert("Please provide month of birth");
		theForm.verify.focus();
		return (false);
	}
}
if (theForm.bcodeflag.value == "Y") 
{
	if (theForm.bcode.value == "" || theForm.bcode.value == "--")
	{
		alert("Please select your primary industry/business");
		theForm.bcode.focus();
		return (false);
	}
}

if (theForm.btitleflag.value == "Y") 
{
	if (theForm.btitle.value == "" || theForm.btitle.value == "--")
	{
		alert("Please select your primary title/job function");
		theForm.btitle.focus();
		return (false);
	}

}

//
// End of BPA Checking 
//

//
//Credit Card Checking
//

if (theForm.ccflag.value == "Y") 
{

var strccnumber,strccmonth,strccyear;
var now,stryear,intyear,strmonth,intmonth;
strccnumber = theForm.ccnumber.value ;


var atPos,strcctype;

atPos = -1


//document.write(atPos)

for (i=0;i<theForm.cctype.length;i++) 

{ 
	
	if (theForm.cctype(i).checked )
		{ 
		atPos = i
		strcctype = theForm.cctype(i).value 
		}
}

// document.write(atPos)

if (atPos == -1 )
  {
    alert("Please select billing method");
    theForm.cctype(0).focus();
    return (false);
  }


if (strcctype == "billme")
	if (strccnumber.length != 0)	 
	{
    	alert("Please select credit card type. If you prefer to be billed, delete number in the credit card box.");
    	theForm.cctype(0).focus();
    	return (false);
	}
	else
	{
	return (true);
	}

if (strccnumber.length == 0)
  {
    alert("Please provide your Credit Card Number");
    theForm.ccnumber.focus();
    return (false);
  }
    


// General Code  

if (strccnumber.length != 0)
  {
  
strccmonth = new String(theForm.ccmonth.value);
strccyear = new String(theForm.ccyear.value);	
now = new Date()

intmonth = now.getMonth()
intmonth = intmonth + 1 
strmonth = new String(intmonth);

if ( strmonth.length == 1 ) 
	{
		strmonth = "0" + strmonth 
	}	

intyear = now.getYear()
stryear = new String(intyear);

atPos = -1


if (isNaN(strccnumber)) 
	{
	   alert("Credit Card Number is not numeric ");
	   theForm.ccnumber.focus();
	   return (false);
    }

 
 if (check_creditcard_type2(theForm))
	{
	//Continue 
	}
else
   {
   alert("Credit Card Number doesn't match type, please retry");
   theForm.ccnumber.focus();
   return (false);
   }
       
//var strcctype = check_creditcard_type(theForm)

//if (strcctype == "xxxx")
//    {
//    alert("Credit Card Number is invalid type, please retry") ;
//	theForm.ccnumber.focus();
//	return (false);
//    } 

if (strcctype == "visa")
	{  
	if (strccnumber.length < 13 || strccnumber.length > 16 )
		{
		alert("The card number you provided does not appear to be a VISA, please retry");
		theForm.ccnumber.focus();
		return (false);
		}
	}
if (strcctype == "mastercard")
	 {
	 if (strccnumber.length != 16 )
		{
		alert("The card number you provided does not appear to be a MasterCard, please retry");
		theForm.ccnumber.focus();
		return (false);
		} 
	}
	
 if (strcctype == "amex")
	{
	if (strccnumber.length != 15 )
		{
		alert("The card number you provided does not appear to be an American Express Card, please retry");
		theForm.ccnumber.focus();
		return (false);
		} 
	}
	
if (strcctype == "dinner")
	{ 
	if (strccnumber.length != 14 )
		{
		alert("The card number you provided does not appear to be a Dinner's Card, please retry");
		theForm.ccnumber.focus();
		return (false);
		}	
	}
if (strcctype == "discover")
	{
	if (strccnumber.length != 16)
		{
		alert("The card number you provided does not appear to be a Discover Card, please retry");
		theForm.ccnumber.focus();
		return (false);
		}	 
	}		
    	

if (check_creditcard_digits(strccnumber))
	{
	//Continue
	//alert("You have done it") ;
	//theForm.ccnumber.focus();
	//return (false); 
	}
else
	{
    alert("Credit Card Number is invalid, please retry") ;
	theForm.ccnumber.focus();
	return (false);
    } 
 
//document.write(stryear+strmonth)
// document.write(strccyear+strccmonth)


if (strccmonth == "" || strccmonth == "MM" || strccmonth == "--") 
	{
    alert("Please provide the month your credit card expires");
    theForm.ccmonth.focus();
    return (false);
    }
if (strccyear == "" || strccyear == "YYYY" || strccyear == "--" ) 
	{
    alert("Please provide the year your credit card expires");
    theForm.ccyear.focus();
    return (false);
    }  
if (strccyear+strccmonth <= stryear+strmonth)
  {
    alert("Your Credit Card has Expired. Please provide valid Credit Card Expiration.");
    theForm.ccmonth.focus();
    return (false);
  }
  
}

//
//End of Credit Card Checking
//
	
}
function check_creditcard_type(theForm)

{
var strcctype,strccnumber;
var strccnumber1,strccnumber2,strccnumber3,strccnumber4;

//strccnumber = new String(theForm.ccnumber.value);

strccnumber = theForm.ccnumber.value ;

strccnumber1 = strccnumber.substring(0,1) 
strccnumber2 = strccnumber.substring(0,2)
strccnumber3 = strccnumber.substring(0,3) 
strccnumber4 = strccnumber.substring(0,4)

if (strccnumber1 == "4")
	{
	strcctype = "visa" 
	return (strcctype);     
	}
	
if (strccnumber2 == "51" || strccnumber2 == "52" || strccnumber2 == "53" || strccnumber2 == "54" || strccnumber2 == "55")
	{
	strcctype = "mastercard"
	return (strcctype);     
	}
		
if (strccnumber2 == "34" || strccnumber2 == "37")
	{
	strcctype = "amex1"
	return (strcctype);     
	}
if (strccnumber2 == "36" || strccnumber2 == "38" )
	{
	strcctype = "dinner"
	return (strcctype);     
	}
if (strccnumber3 == "300" || strccnumber2 == "301" || strccnumber2 == "302" || strccnumber2 == "303" || strccnumber2 == "304" || strccnumber2 == "305")
	{
	strcctype = "dinner"
	return (strcctype);     
	} 
	
if (strccnumber4 == "6011" )
	{
	strcctype = "discover"
	return (strcctype);     
	}
	
strcctype = "xxxx" 	
return (strcctype);      		
 }
 
function check_creditcard_digits(strCardNumber)
 {
 
 var intMod,intLen,intLen,intNum,intNum2,intTotal;
 var strNum,strTest,strTest2;
 var blnFlag = false;
  
 //strCardNumber = new String(theForm.ccnumber.value);
 
 strTest = new String("");
 strTest2 = new String("");
 strNum = new String("");
  
 intLen = strCardNumber.length 
 
 //Reverse Card Number
 for (i=intLen-1; i > -1; i--)
 { 
	strTest = strTest + strCardNumber.charAt(i); 
 }
	
//document.write(strTest)
//intTotal = parseInt("0");

intTotal = Number("0");

// Process Credit Card Digit 
 for (i=0;i<strTest.length;i++)
	{ 
	strTest2 = strTest.charAt(i)  
	intMod = i % 2
    //Even Number - String index start at 0 !!
 	if ((i % 2) == 0)
		{
		intNum = Number(strTest2); 
		intTotal = intTotal + intNum
		}
    else 
		{
		intNum = Number(strTest2)
		intNum = 2 * intNum
		strNum = String(intNum)
		intLen2 = strNum.length 
		if (intLen2 == 1)
			{
			intNum = Number(strNum); 
			intTotal = intTotal + intNum 
			}
		else
			{
			// digit > 9 ex.16 1 + 6 to Total
			strTest2 =strNum.substr(0,1);
			intNum = Number(strTest2);
			strTest2 = strNum.substr(1,1);
			intNum2 = Number(strTest2);
			intTotal = intTotal + intNum  + intNum2;
			}
	
		} 
	
	}
	
	intMod = intTotal % 10
	
	if (intMod == 0)  
	{
		blnFlag = true 	
	}
	        
  return (blnFlag);        
}

function check_creditcard_type2(theForm)

{
var strcctype,strccnumber;
var strccnumber1,strccnumber2,strccnumber3,strccnumber4;
var blnFlag = false; 

strccnumber = new String(theForm.ccnumber.value);

strccnumber1 = strccnumber.substring(0,1) 
strccnumber2 = strccnumber.substring(0,2)
strccnumber3 = strccnumber.substring(0,3) 
strccnumber4 = strccnumber.substring(0,4)

for (i=0;i<theForm.cctype.length;i++) 

   { 
	
	if (theForm.cctype(i).checked )
		{ 
		strcctype = theForm.cctype(i).value 
		}
  }
   
if (strcctype == "visa")
	{  
	if (strccnumber1 == "4")
		{
		blnFlag = "True" 
		}
	}
	
if (strcctype == "mastercard")
	 {
	if (strccnumber2 == "51" || strccnumber2 == "52" || strccnumber2 == "53" || strccnumber2 == "54" || strccnumber2 == "55")
		{
		blnFlag = "True" 
		}
	}
	
 if (strcctype == "amex")
	{
	
	if (strccnumber2 == "34" || strccnumber2 == "37")
		{
		blnFlag = "True" 
		}
	}
	
if (strcctype == "dinner")
	{ 
	if (strccnumber2 == "36" || strccnumber2 == "38" )
		{
		blnFlag = "True" 
		}
	if (strccnumber3 == "300" || strccnumber2 == "301" || strccnumber2 == "302" || strccnumber2 == "303" || strccnumber2 == "304" || strccnumber2 == "305")
		{
		blnFlag = "True" 
		} 
	}
	
if (strcctype == "discover")
	{
	if (strccnumber4 == "6011" )
		{
		blnFlag = "True" 
		}
	}
	
	return (blnFlag);      		
 }


//
//End of Credit Card Checking
//
				

}



function change_flag(theForm)
 {
 if (theForm.rpub(1).checked)
	{
		theForm.verifyflag.value = "N"
		theForm.bcodeflag.value = "N" 
		theForm.btitleflag.value = "N"
				
	}
	else 
	{
		theForm.verifyflag.value = "Y"
		theForm.bcodeflag.value = "Y" 
		theForm.btitleflag.value = "Y"
				
	}         
          
}


function build_array(arrCheck)
{
arrCheck [0] = "000XX"
arrCheck [1] = "001XX"
arrCheck [2] = "002XX"
arrCheck [3] = "003XX"
arrCheck [4] = "004PR"
arrCheck [5] = "005PR"
arrCheck [6] = "006PR"
arrCheck [7] = "007PR"
arrCheck [8] = "008VI"
arrCheck [9] = "009VI"

arrCheck [10] = "010MA"
arrCheck [11] = "011MA"
arrCheck [12] = "012MA"
arrCheck [13] = "013MA"
arrCheck [14] = "014MA"
arrCheck [15] = "015MA"
arrCheck [16] = "016MA"
arrCheck [17] = "017MA"
arrCheck [18] = "018MA"
arrCheck [19] = "019MA"
arrCheck [20] = "020MA"
arrCheck [21] = "021MA"
arrCheck [22] = "022MA"
arrCheck [23] = "023MA"
arrCheck [24] = "024MA"
arrCheck [25] = "025MA"
arrCheck [26] = "026MA"
arrCheck [27] = "027MA"
arrCheck [28] = "028RI"
arrCheck [29] = "029RI"
arrCheck [30] = "030NH"
arrCheck [31] = "031NH"
arrCheck [32] = "032NH"
arrCheck [33] = "033NH"
arrCheck [34] = "034NH"
arrCheck [35] = "035NH"
arrCheck [36] = "036NH"
arrCheck [37] = "037NH"
arrCheck [38] = "038NH"
arrCheck [39] = "039ME"
arrCheck [40] = "040ME"
arrCheck [41] = "041ME"
arrCheck [42] = "042ME"
arrCheck [43] = "043ME"
arrCheck [44] = "044ME"
arrCheck [45] = "045ME"
arrCheck [46] = "046ME"
arrCheck [47] = "047ME"
arrCheck [48] = "048ME"
arrCheck [49] = "049ME"
arrCheck [50] = "050VT"
arrCheck [51] = "051VT"
arrCheck [52] = "052VT"
arrCheck [53] = "053VT"
arrCheck [54] = "054VT"
arrCheck [55] = "055VT"
arrCheck [56] = "056VT"
arrCheck [57] = "057VT"
arrCheck [58] = "058VT"
arrCheck [59] = "059VT"
arrCheck [60] = "060CT"
arrCheck [61] = "061CT"
arrCheck [62] = "062CT"
arrCheck [63] = "063CT"
arrCheck [64] = "064CT"
arrCheck [65] = "065CT"
arrCheck [66] = "066CT"
arrCheck [67] = "067CT"
arrCheck [68] = "068CT"
arrCheck [69] = "069CT"
arrCheck [70] = "070NJ"
arrCheck [71] = "071NJ"
arrCheck [72] = "072NJ"
arrCheck [73] = "073NJ"
arrCheck [74] = "074NJ"
arrCheck [75] = "075NJ"
arrCheck [76] = "076NJ"
arrCheck [77] = "077NJ"
arrCheck [78] = "078NJ"
arrCheck [79] = "079NJ"
arrCheck [80] = "080NJ"
arrCheck [81] = "081NJ"
arrCheck [82] = "082NJ"
arrCheck [83] = "083NJ"
arrCheck [84] = "084NJ"
arrCheck [85] = "085NJ"
arrCheck [86] = "086NJ"
arrCheck [87] = "087NJ"
arrCheck [88] = "088NJ"
arrCheck [89] = "089NJ"
arrCheck [90] = "090AE"
arrCheck [91] = "091AE"
arrCheck [92] = "092AE"
arrCheck [93] = "093XX"
arrCheck [94] = "094AE"
arrCheck [95] = "095AE"
arrCheck [96] = "096AE"
arrCheck [97] = "097AE"
arrCheck [98] = "098AE"
arrCheck [99] = "099XX"

arrCheck [100] = "100NY"
arrCheck [101] = "101NY"
arrCheck [102] = "102NY"
arrCheck [103] = "103NY"
arrCheck [104] = "104NY"
arrCheck [105] = "105NY"
arrCheck [106] = "106NY"
arrCheck [107] = "107NY"
arrCheck [108] = "108NY"
arrCheck [109] = "109NY"
arrCheck [110] = "110NY"
arrCheck [111] = "111NY"
arrCheck [112] = "112NY"
arrCheck [113] = "113NY"
arrCheck [114] = "114NY"
arrCheck [115] = "115NY"
arrCheck [116] = "116NY"
arrCheck [117] = "117NY"
arrCheck [118] = "118NY"
arrCheck [119] = "119NY"
arrCheck [120] = "120NY"
arrCheck [121] = "121NY"
arrCheck [122] = "122NY"
arrCheck [123] = "123NY"
arrCheck [124] = "124NY"
arrCheck [125] = "125NY"
arrCheck [126] = "126NY"
arrCheck [127] = "127NY"
arrCheck [128] = "128NY"
arrCheck [129] = "129NY"
arrCheck [130] = "130NY"
arrCheck [131] = "131NY"
arrCheck [132] = "132NY"
arrCheck [133] = "133NY"
arrCheck [134] = "134NY"
arrCheck [135] = "135NY"
arrCheck [136] = "136NY"
arrCheck [137] = "137NY"
arrCheck [138] = "138NY"
arrCheck [139] = "139NY"
arrCheck [140] = "140NY"
arrCheck [141] = "141NY"
arrCheck [142] = "142NY"
arrCheck [143] = "143NY"
arrCheck [144] = "144NY"
arrCheck [145] = "145NY"
arrCheck [146] = "146NY"
arrCheck [147] = "147NY"
arrCheck [148] = "148NY"
arrCheck [149] = "149NY"
arrCheck [150] = "150PA"
arrCheck [151] = "151PA"
arrCheck [152] = "152PA"
arrCheck [153] = "153PA"
arrCheck [154] = "154PA"
arrCheck [155] = "155PA"
arrCheck [156] = "156PA"
arrCheck [157] = "157PA"
arrCheck [158] = "158PA"
arrCheck [159] = "159PA"
arrCheck [160] = "160PA"
arrCheck [161] = "161PA"
arrCheck [162] = "162PA"
arrCheck [163] = "163PA"
arrCheck [164] = "164PA"
arrCheck [165] = "165PA"
arrCheck [166] = "166PA"
arrCheck [167] = "167PA"
arrCheck [168] = "168PA"
arrCheck [169] = "169PA"
arrCheck [170] = "170PA"
arrCheck [171] = "171PA"
arrCheck [172] = "172PA"
arrCheck [173] = "173PA"
arrCheck [174] = "174PA"
arrCheck [175] = "175PA"
arrCheck [176] = "176PA"
arrCheck [177] = "177PA"
arrCheck [178] = "178PA"
arrCheck [179] = "179PA"
arrCheck [180] = "180PA"
arrCheck [181] = "181PA"
arrCheck [182] = "182PA"
arrCheck [183] = "183PA"
arrCheck [184] = "184PA"
arrCheck [185] = "185PA"
arrCheck [186] = "186PA"
arrCheck [187] = "187PA"
arrCheck [188] = "188PA"
arrCheck [189] = "189PA"
arrCheck [190] = "190PA"
arrCheck [191] = "191PA"
arrCheck [192] = "192PA"
arrCheck [193] = "193PA"
arrCheck [194] = "194PA"
arrCheck [195] = "195PA"
arrCheck [196] = "196PA"
arrCheck [197] = "197DE"
arrCheck [198] = "198DE"
arrCheck [199] = "199DE"
arrCheck [200] = "200DC"
arrCheck [201] = "201VA"
arrCheck [202] = "202DC"
arrCheck [203] = "203DC"
arrCheck [204] = "204DC"
arrCheck [205] = "205DC"
arrCheck [206] = "206MD"
arrCheck [207] = "207MD"
arrCheck [208] = "208MD"
arrCheck [209] = "209MD"
arrCheck [210] = "210MD"
arrCheck [211] = "211MD"
arrCheck [212] = "212MD"
arrCheck [213] = "213MD"
arrCheck [214] = "214MD"
arrCheck [215] = "215MD"
arrCheck [216] = "216MD"
arrCheck [217] = "217MD"
arrCheck [218] = "218MD"
arrCheck [219] = "219MD"
arrCheck [220] = "220VA"
arrCheck [221] = "221VA"
arrCheck [222] = "222VA"
arrCheck [223] = "223VA"
arrCheck [224] = "224VA"
arrCheck [225] = "225VA"
arrCheck [226] = "226VA"
arrCheck [227] = "227VA"
arrCheck [228] = "228VA"
arrCheck [229] = "229VA"
arrCheck [230] = "230VA"
arrCheck [231] = "231VA"
arrCheck [232] = "232VA"
arrCheck [233] = "233VA"
arrCheck [234] = "234VA"
arrCheck [235] = "235VA"
arrCheck [236] = "236VA"
arrCheck [237] = "237VA"
arrCheck [238] = "238VA"
arrCheck [239] = "239VA"
arrCheck [240] = "240VA"
arrCheck [241] = "241VA"
arrCheck [242] = "242VA"
arrCheck [243] = "243VA"
arrCheck [244] = "244VA"
arrCheck [245] = "245VA"
arrCheck [246] = "246VA"
arrCheck [247] = "247WV"
arrCheck [248] = "248WV"
arrCheck [249] = "249WV"
arrCheck [250] = "250WV"
arrCheck [251] = "251WV"
arrCheck [252] = "252WV"
arrCheck [253] = "253WV"
arrCheck [254] = "254WV"
arrCheck [255] = "255WV"
arrCheck [256] = "256WV"
arrCheck [257] = "257WV"
arrCheck [258] = "258WV"
arrCheck [259] = "259WV"
arrCheck [260] = "260WV"
arrCheck [261] = "261WV"
arrCheck [262] = "262WV"
arrCheck [263] = "263WV"
arrCheck [264] = "264WV"
arrCheck [265] = "265WV"
arrCheck [266] = "266WV"
arrCheck [267] = "267WV"
arrCheck [268] = "268WV"
arrCheck [269] = "269XX"
arrCheck [270] = "270NC"
arrCheck [271] = "271NC"
arrCheck [272] = "272NC"
arrCheck [273] = "273NC"
arrCheck [274] = "274NC"
arrCheck [275] = "275NC"
arrCheck [276] = "276NC"
arrCheck [277] = "277NC"
arrCheck [278] = "278NC"
arrCheck [279] = "279NC"
arrCheck [280] = "280NC"
arrCheck [281] = "281NC"
arrCheck [282] = "282NC"
arrCheck [283] = "283NC"
arrCheck [284] = "284NC"
arrCheck [285] = "285NC"
arrCheck [286] = "286NC"
arrCheck [287] = "287NC"
arrCheck [288] = "288NC"
arrCheck [289] = "289NC"
arrCheck [290] = "290SC"
arrCheck [291] = "291SC"
arrCheck [292] = "292SC"
arrCheck [293] = "293SC"
arrCheck [294] = "294SC"
arrCheck [295] = "295SC"
arrCheck [296] = "296SC"
arrCheck [297] = "297SC"
arrCheck [298] = "298SC"
arrCheck [299] = "299SC"
arrCheck [300] = "300GA"
arrCheck [301] = "301GA"
arrCheck [302] = "302GA"
arrCheck [303] = "303GA"
arrCheck [304] = "304GA"
arrCheck [305] = "305GA"
arrCheck [306] = "306GA"
arrCheck [307] = "307GA"
arrCheck [308] = "308GA"
arrCheck [309] = "309GA"
arrCheck [310] = "310GA"
arrCheck [311] = "311GA"
arrCheck [312] = "312GA"
arrCheck [313] = "313GA"
arrCheck [314] = "314GA"
arrCheck [315] = "315GA"
arrCheck [316] = "316GA"
arrCheck [317] = "317GA"
arrCheck [318] = "318GA"
arrCheck [319] = "319GA"
arrCheck [320] = "320FL"
arrCheck [321] = "321FL"
arrCheck [322] = "322FL"
arrCheck [323] = "323FL"
arrCheck [324] = "324FL"
arrCheck [325] = "325FL"
arrCheck [326] = "326FL"
arrCheck [327] = "327FL"
arrCheck [328] = "328FL"
arrCheck [329] = "329FL"
arrCheck [330] = "330FL"
arrCheck [331] = "331FL"
arrCheck [332] = "332FL"
arrCheck [333] = "333FL"
arrCheck [334] = "334FL"
arrCheck [335] = "335FL"
arrCheck [336] = "336FL"
arrCheck [337] = "337FL"
arrCheck [338] = "338FL"
arrCheck [339] = "339FL"
arrCheck [340] = "340FL"
arrCheck [341] = "341FL"
arrCheck [342] = "342FL"
arrCheck [343] = "343FL"
arrCheck [344] = "344FL"
arrCheck [345] = "345FL"
arrCheck [346] = "346FL"
arrCheck [347] = "347FL"
arrCheck [348] = "348FL"
arrCheck [349] = "349FL"
arrCheck [350] = "350AL"
arrCheck [351] = "351AL"
arrCheck [352] = "352AL"
arrCheck [353] = "353AL"
arrCheck [354] = "354AL"
arrCheck [355] = "355AL"
arrCheck [356] = "356AL"
arrCheck [357] = "357AL"
arrCheck [358] = "358AL"
arrCheck [359] = "359AL"
arrCheck [360] = "360AL"
arrCheck [361] = "361AL"
arrCheck [362] = "362AL"
arrCheck [363] = "363AL"
arrCheck [364] = "364AL"
arrCheck [365] = "365AL"
arrCheck [366] = "366AL"
arrCheck [367] = "367AL"
arrCheck [368] = "368AL"
arrCheck [369] = "369AL"
arrCheck [370] = "370TN"
arrCheck [371] = "371TN"
arrCheck [372] = "372TN"
arrCheck [373] = "373TN"
arrCheck [374] = "374TN"
arrCheck [375] = "375TN"
arrCheck [376] = "376TN"
arrCheck [377] = "377TN"
arrCheck [378] = "378TN"
arrCheck [379] = "379TN"
arrCheck [380] = "380TN"
arrCheck [381] = "381TN"
arrCheck [382] = "382TN"
arrCheck [383] = "383TN"
arrCheck [384] = "384TN"
arrCheck [385] = "385TN"
arrCheck [386] = "386MS"
arrCheck [387] = "387MS"
arrCheck [388] = "388MS"
arrCheck [389] = "389MS"
arrCheck [390] = "390MS"
arrCheck [391] = "391MS"
arrCheck [392] = "392MS"
arrCheck [393] = "393MS"
arrCheck [394] = "394MS"
arrCheck [395] = "395MS"
arrCheck [396] = "396MS"
arrCheck [397] = "397MS"
arrCheck [398] = "398XX"
arrCheck [399] = "399XX"
arrCheck [400] = "400KY"
arrCheck [401] = "401KY"
arrCheck [402] = "402KY"
arrCheck [403] = "403KY"
arrCheck [404] = "404KY"
arrCheck [405] = "405KY"
arrCheck [406] = "406KY"
arrCheck [407] = "407KY"
arrCheck [408] = "408KY"
arrCheck [409] = "409KY"
arrCheck [410] = "410KY"
arrCheck [411] = "411KY"
arrCheck [412] = "412KY"
arrCheck [413] = "413KY"
arrCheck [414] = "414KY"
arrCheck [415] = "415KY"
arrCheck [416] = "416KY"
arrCheck [417] = "417KY"
arrCheck [418] = "418KY"
arrCheck [419] = "419KY"
arrCheck [420] = "420KY"
arrCheck [421] = "421KY"
arrCheck [422] = "422KY"
arrCheck [423] = "423KY"
arrCheck [424] = "424KY"
arrCheck [425] = "425KY"
arrCheck [426] = "426KY"
arrCheck [427] = "427KY"
arrCheck [428] = "428XX"
arrCheck [429] = "429XX"
arrCheck [430] = "430OH"
arrCheck [431] = "431OH"
arrCheck [432] = "432OH"
arrCheck [433] = "433OH"
arrCheck [434] = "434OH"
arrCheck [435] = "435OH"
arrCheck [436] = "436OH"
arrCheck [437] = "437OH"
arrCheck [438] = "438OH"
arrCheck [439] = "439OH"
arrCheck [440] = "440OH"
arrCheck [441] = "441OH"
arrCheck [442] = "442OH"
arrCheck [443] = "443OH"
arrCheck [444] = "444OH"
arrCheck [445] = "445OH"
arrCheck [446] = "446OH"
arrCheck [447] = "447OH"
arrCheck [448] = "448OH"
arrCheck [449] = "449OH"
arrCheck [450] = "450OH"
arrCheck [451] = "451OH"
arrCheck [452] = "452OH"
arrCheck [453] = "453OH"
arrCheck [454] = "454OH"
arrCheck [455] = "455OH"
arrCheck [456] = "456OH"
arrCheck [457] = "457OH"
arrCheck [458] = "458OH"
arrCheck [459] = "459XX"
arrCheck [460] = "460IN"
arrCheck [461] = "461IN"
arrCheck [462] = "462IN"
arrCheck [463] = "463IN"
arrCheck [464] = "464IN"
arrCheck [465] = "465IN"
arrCheck [466] = "466IN"
arrCheck [467] = "467IN"
arrCheck [468] = "468IN"
arrCheck [469] = "469IN"
arrCheck [470] = "470IN"
arrCheck [471] = "471IN"
arrCheck [472] = "472IN"
arrCheck [473] = "473IN"
arrCheck [474] = "474IN"
arrCheck [475] = "475IN"
arrCheck [476] = "476IN"
arrCheck [477] = "477IN"
arrCheck [478] = "478IN"
arrCheck [479] = "479IN"
arrCheck [480] = "480MI"
arrCheck [481] = "481MI"
arrCheck [482] = "482MI"
arrCheck [483] = "483MI"
arrCheck [484] = "484MI"
arrCheck [485] = "485MI"
arrCheck [486] = "486MI"
arrCheck [487] = "487MI"
arrCheck [488] = "488MI"
arrCheck [489] = "489MI"
arrCheck [490] = "490MI"
arrCheck [491] = "491MI"
arrCheck [492] = "492MI"
arrCheck [493] = "493MI"
arrCheck [494] = "494MI"
arrCheck [495] = "495MI"
arrCheck [496] = "496MI"
arrCheck [497] = "497MI"
arrCheck [498] = "498MI"
arrCheck [499] = "499MI"
arrCheck [500] = "500IA"
arrCheck [501] = "501IA"
arrCheck [502] = "502IA"
arrCheck [503] = "503IA"
arrCheck [504] = "504IA"
arrCheck [505] = "505IA"
arrCheck [506] = "506IA"
arrCheck [507] = "507IA"
arrCheck [508] = "508IA"
arrCheck [509] = "509IA"
arrCheck [510] = "510IA"
arrCheck [511] = "511IA"
arrCheck [512] = "512IA"
arrCheck [513] = "513IA"
arrCheck [514] = "514IA"
arrCheck [515] = "515IA"
arrCheck [516] = "516IA"
arrCheck [517] = "517IA"
arrCheck [518] = "518IA"
arrCheck [519] = "519IA"
arrCheck [520] = "520IA"
arrCheck [521] = "521IA"
arrCheck [522] = "522IA"
arrCheck [523] = "523IA"
arrCheck [524] = "524IA"
arrCheck [525] = "525IA"
arrCheck [526] = "526IA"
arrCheck [527] = "527IA"
arrCheck [528] = "528IA"
arrCheck [529] = "529XX"
arrCheck [530] = "530WI"
arrCheck [531] = "531WI"
arrCheck [532] = "532WI"
arrCheck [533] = "533WI"
arrCheck [534] = "534WI"
arrCheck [535] = "535WI"
arrCheck [536] = "536WI"
arrCheck [537] = "537WI"
arrCheck [538] = "538WI"
arrCheck [539] = "539WI"
arrCheck [540] = "540WI"
arrCheck [541] = "541WI"
arrCheck [542] = "542WI"
arrCheck [543] = "543WI"
arrCheck [544] = "544WI"
arrCheck [545] = "545WI"
arrCheck [546] = "546WI"
arrCheck [547] = "547WI"
arrCheck [548] = "548WI"
arrCheck [549] = "549WI"
arrCheck [550] = "550MN"
arrCheck [551] = "551MN"
arrCheck [552] = "552MN"
arrCheck [553] = "553MN"
arrCheck [554] = "554MN"
arrCheck [555] = "555MN"
arrCheck [556] = "556MN"
arrCheck [557] = "557MN"
arrCheck [558] = "558MN"
arrCheck [559] = "559MN"
arrCheck [560] = "560MN"
arrCheck [561] = "561MN"
arrCheck [562] = "562MN"
arrCheck [563] = "563MN"
arrCheck [564] = "564MN"
arrCheck [565] = "565MN"
arrCheck [566] = "566MN"
arrCheck [567] = "567MN"
arrCheck [568] = "568XX"
arrCheck [569] = "569XX"
arrCheck [570] = "570SD"
arrCheck [571] = "571SD"
arrCheck [572] = "572SD"
arrCheck [573] = "573SD"
arrCheck [574] = "574SD"
arrCheck [575] = "575SD"
arrCheck [576] = "576SD"
arrCheck [577] = "577SD"
arrCheck [578] = "578XX"
arrCheck [579] = "579XX"
arrCheck [580] = "580ND"
arrCheck [581] = "581ND"
arrCheck [582] = "582ND"
arrCheck [583] = "583ND"
arrCheck [584] = "584ND"
arrCheck [585] = "585ND"
arrCheck [586] = "586ND"
arrCheck [587] = "587ND"
arrCheck [588] = "588ND"
arrCheck [589] = "589XX"
arrCheck [590] = "590MT"
arrCheck [591] = "591MT"
arrCheck [592] = "592MT"
arrCheck [593] = "593MT"
arrCheck [594] = "594MT"
arrCheck [595] = "595MT"
arrCheck [596] = "596MT"
arrCheck [597] = "597MT"
arrCheck [598] = "598MT"
arrCheck [599] = "599MT"
arrCheck [600] = "600IL"
arrCheck [601] = "601IL"
arrCheck [602] = "602IL"
arrCheck [603] = "603IL"
arrCheck [604] = "604IL"
arrCheck [605] = "605IL"
arrCheck [606] = "606IL"
arrCheck [607] = "607IL"
arrCheck [608] = "608IL"
arrCheck [609] = "609IL"
arrCheck [610] = "610IL"
arrCheck [611] = "611IL"
arrCheck [612] = "612IL"
arrCheck [613] = "613IL"
arrCheck [614] = "614IL"
arrCheck [615] = "615IL"
arrCheck [616] = "616IL"
arrCheck [617] = "617IL"
arrCheck [618] = "618IL"
arrCheck [619] = "619IL"
arrCheck [620] = "620IL"
arrCheck [621] = "621IL"
arrCheck [622] = "622IL"
arrCheck [623] = "623IL"
arrCheck [624] = "624IL"
arrCheck [625] = "625IL"
arrCheck [626] = "626IL"
arrCheck [627] = "627IL"
arrCheck [628] = "628IL"
arrCheck [629] = "629IL"
arrCheck [630] = "630MO"
arrCheck [631] = "631MO"
arrCheck [632] = "632MO"
arrCheck [633] = "633MO"
arrCheck [634] = "634MO"
arrCheck [635] = "635MO"
arrCheck [636] = "636MO"
arrCheck [637] = "637MO"
arrCheck [638] = "638MO"
arrCheck [639] = "639MO"
arrCheck [640] = "640MO"
arrCheck [641] = "641MO"
arrCheck [642] = "642MO"
arrCheck [643] = "643MO"
arrCheck [644] = "644MO"
arrCheck [645] = "645MO"
arrCheck [646] = "646MO"
arrCheck [647] = "647MO"
arrCheck [648] = "648MO"
arrCheck [649] = "649MO"
arrCheck [650] = "650MO"
arrCheck [651] = "651MO"
arrCheck [652] = "652MO"
arrCheck [653] = "653MO"
arrCheck [654] = "654MO"
arrCheck [655] = "655MO"
arrCheck [656] = "656MO"
arrCheck [657] = "657MO"
arrCheck [658] = "658MO"
arrCheck [659] = "659XX"
arrCheck [660] = "660KS"
arrCheck [661] = "661KS"
arrCheck [662] = "662KS"
arrCheck [663] = "663KS"
arrCheck [664] = "664KS"
arrCheck [665] = "665KS"
arrCheck [666] = "666KS"
arrCheck [667] = "667KS"
arrCheck [668] = "668KS"
arrCheck [669] = "669KS"
arrCheck [670] = "670KS"
arrCheck [671] = "671KS"
arrCheck [672] = "672KS"
arrCheck [673] = "673KS"
arrCheck [674] = "674KS"
arrCheck [675] = "675KS"
arrCheck [676] = "676KS"
arrCheck [677] = "677KS"
arrCheck [678] = "678KS"
arrCheck [679] = "679KS"
arrCheck [680] = "680NE"
arrCheck [681] = "681NE"
arrCheck [682] = "682NE"
arrCheck [683] = "683NE"
arrCheck [684] = "684NE"
arrCheck [685] = "685NE"
arrCheck [686] = "686NE"
arrCheck [687] = "687NE"
arrCheck [688] = "688NE"
arrCheck [689] = "689NE"
arrCheck [690] = "690NE"
arrCheck [691] = "691NE"
arrCheck [692] = "692NE"
arrCheck [693] = "693NE"
arrCheck [694] = "694XX"
arrCheck [695] = "695XX"
arrCheck [696] = "696XX"
arrCheck [697] = "697XX"
arrCheck [698] = "698XX"
arrCheck [699] = "699XX"		
arrCheck [700] = "700LA"
arrCheck [701] = "701LA"
arrCheck [702] = "702LA"
arrCheck [703] = "703LA"
arrCheck [704] = "704LA"
arrCheck [705] = "705LA"
arrCheck [706] = "706LA"
arrCheck [707] = "707LA"
arrCheck [708] = "708LA"
arrCheck [709] = "709LA"
arrCheck [710] = "710LA"
arrCheck [711] = "711LA"
arrCheck [712] = "712LA"
arrCheck [713] = "713LA"
arrCheck [714] = "714LA"
arrCheck [715] = "715XX"
arrCheck [716] = "716AR"
arrCheck [717] = "717AR"
arrCheck [718] = "718AR"
arrCheck [719] = "719AR"
arrCheck [720] = "720AR"
arrCheck [721] = "721AR"
arrCheck [722] = "722AR"
arrCheck [723] = "723AR"
arrCheck [724] = "724AR"
arrCheck [725] = "725AR"
arrCheck [726] = "726AR"
arrCheck [727] = "727AR"
arrCheck [728] = "728AR"
arrCheck [729] = "729AR"
arrCheck [730] = "730OK"
arrCheck [731] = "731OK"
arrCheck [732] = "732OK"
arrCheck [733] = "733OK"
arrCheck [734] = "734OK"
arrCheck [735] = "735OK"
arrCheck [736] = "736OK"
arrCheck [737] = "737OK"
arrCheck [738] = "738OK"
arrCheck [739] = "739OK"
arrCheck [740] = "740OK"
arrCheck [741] = "741OK"
arrCheck [742] = "742OK"
arrCheck [743] = "743OK"
arrCheck [744] = "744OK"
arrCheck [745] = "745OK"
arrCheck [746] = "746OK"
arrCheck [747] = "747OK"
arrCheck [748] = "748OK"
arrCheck [749] = "749OK"
arrCheck [750] = "750TX"
arrCheck [751] = "751TX"
arrCheck [752] = "752TX"
arrCheck [753] = "753TX"
arrCheck [754] = "754TX"
arrCheck [755] = "755TX"
arrCheck [756] = "756TX"
arrCheck [757] = "757TX"
arrCheck [758] = "758TX"
arrCheck [759] = "759TX"
arrCheck [760] = "760TX"
arrCheck [761] = "761TX"
arrCheck [762] = "762TX"
arrCheck [763] = "763TX"
arrCheck [764] = "764TX"
arrCheck [765] = "765TX"
arrCheck [766] = "766TX"
arrCheck [767] = "767TX"
arrCheck [768] = "768TX"
arrCheck [769] = "769TX"
arrCheck [770] = "770TX"
arrCheck [771] = "771TX"
arrCheck [772] = "772TX"
arrCheck [773] = "773TX"
arrCheck [774] = "774TX"
arrCheck [775] = "775TX"
arrCheck [776] = "776TX"
arrCheck [777] = "777TX"
arrCheck [778] = "778TX"
arrCheck [779] = "779TX"
arrCheck [780] = "780TX"
arrCheck [781] = "781TX"
arrCheck [782] = "782TX"
arrCheck [783] = "783TX"
arrCheck [784] = "784TX"
arrCheck [785] = "785TX"
arrCheck [786] = "786TX"
arrCheck [787] = "787TX"
arrCheck [788] = "788TX"
arrCheck [789] = "789TX"
arrCheck [790] = "790TX"
arrCheck [791] = "791TX"
arrCheck [792] = "792TX"
arrCheck [793] = "793TX"
arrCheck [794] = "794TX"
arrCheck [795] = "795TX"
arrCheck [796] = "796TX"
arrCheck [797] = "797TX"
arrCheck [798] = "798TX"
arrCheck [799] = "799TX"
arrCheck [800] = "800CO"
arrCheck [801] = "801CO"
arrCheck [802] = "802CO"
arrCheck [803] = "803CO"
arrCheck [804] = "804CO"
arrCheck [805] = "805CO"
arrCheck [806] = "806CO"
arrCheck [807] = "807CO"
arrCheck [808] = "808CO"
arrCheck [809] = "809CO"
arrCheck [810] = "810CO"
arrCheck [811] = "811CO"
arrCheck [812] = "812CO"
arrCheck [813] = "813CO"
arrCheck [814] = "814CO"
arrCheck [815] = "815CO"
arrCheck [816] = "816CO"
arrCheck [817] = "817XX"
arrCheck [818] = "818XX"
arrCheck [819] = "819XX"
arrCheck [820] = "820WY"
arrCheck [821] = "821WY"
arrCheck [822] = "822WY"
arrCheck [823] = "823WY"
arrCheck [824] = "824WY"
arrCheck [825] = "825WY"
arrCheck [826] = "826WY"
arrCheck [827] = "827WY"
arrCheck [828] = "828WY"
arrCheck [829] = "829WY"
arrCheck [830] = "830WY"
arrCheck [831] = "831WY"
arrCheck [832] = "832ID"
arrCheck [833] = "833ID"
arrCheck [834] = "834ID"
arrCheck [835] = "835ID"
arrCheck [836] = "836ID"
arrCheck [837] = "837ID"
arrCheck [838] = "838ID"
arrCheck [839] = "839XX"
arrCheck [840] = "840UT"
arrCheck [841] = "841UT"
arrCheck [842] = "842UT"
arrCheck [843] = "843UT"
arrCheck [844] = "844UT"
arrCheck [845] = "845UT"
arrCheck [846] = "846UT"
arrCheck [847] = "847UT"
arrCheck [848] = "848XX"
arrCheck [849] = "849XX"
arrCheck [850] = "850AZ"
arrCheck [851] = "851AZ"
arrCheck [852] = "852AZ"
arrCheck [853] = "853AZ"
arrCheck [854] = "854AZ"
arrCheck [855] = "855AZ"
arrCheck [856] = "856AZ"
arrCheck [857] = "857AZ"
arrCheck [858] = "858AZ"
arrCheck [859] = "859AZ"
arrCheck [860] = "860AZ"
arrCheck [861] = "861AZ"
arrCheck [862] = "862AZ"
arrCheck [863] = "863AZ"
arrCheck [864] = "864AZ"
arrCheck [865] = "865AZ"
arrCheck [866] = "866XX"
arrCheck [867] = "867XX"
arrCheck [868] = "868XX"
arrCheck [868] = "869XX"
arrCheck [870] = "870NM"
arrCheck [871] = "871NM"
arrCheck [872] = "872NM"
arrCheck [873] = "873NM"
arrCheck [874] = "874NM"
arrCheck [875] = "875NM"
arrCheck [876] = "876NM"
arrCheck [877] = "877NM"
arrCheck [878] = "878NM"
arrCheck [879] = "879NM"
arrCheck [880] = "880NM"
arrCheck [881] = "881NM"
arrCheck [882] = "882NM"
arrCheck [883] = "883NM"
arrCheck [884] = "884NM"
arrCheck [885] = "885XX"
arrCheck [886] = "886XX"
arrCheck [887] = "887XX"
arrCheck [888] = "888XX"
arrCheck [889] = "889NV"
arrCheck [890] = "890NV"
arrCheck [891] = "891NV"
arrCheck [892] = "892NV"
arrCheck [893] = "893NV"
arrCheck [894] = "894NV"
arrCheck [895] = "895NV"
arrCheck [896] = "896NV"
arrCheck [897] = "897NV"
arrCheck [898] = "898NV"
arrCheck [899] = "899XX"
arrCheck [900] = "900CA"
arrCheck [901] = "901CA"
arrCheck [902] = "902CA"
arrCheck [903] = "903CA"
arrCheck [904] = "904CA"
arrCheck [905] = "905CA"
arrCheck [906] = "906CA"
arrCheck [907] = "907CA"
arrCheck [908] = "908CA"
arrCheck [909] = "909CA"
arrCheck [910] = "910CA"
arrCheck [911] = "911CA"
arrCheck [912] = "912CA"
arrCheck [913] = "913CA"
arrCheck [914] = "914CA"
arrCheck [915] = "915CA"
arrCheck [916] = "916CA"
arrCheck [917] = "917CA"
arrCheck [918] = "918CA"
arrCheck [919] = "919CA"
arrCheck [920] = "920CA"
arrCheck [921] = "921CA"
arrCheck [922] = "922CA"
arrCheck [923] = "923CA"
arrCheck [924] = "924CA"
arrCheck [925] = "925CA"
arrCheck [926] = "926CA"
arrCheck [927] = "927CA"
arrCheck [928] = "928CA"
arrCheck [929] = "929CA"
arrCheck [930] = "930CA"
arrCheck [931] = "931CA"
arrCheck [932] = "932CA"
arrCheck [933] = "933CA"
arrCheck [934] = "934CA"
arrCheck [935] = "935CA"
arrCheck [936] = "936CA"
arrCheck [937] = "937CA"
arrCheck [938] = "938CA"
arrCheck [939] = "939CA"
arrCheck [940] = "940CA"
arrCheck [941] = "941CA"
arrCheck [942] = "942CA"
arrCheck [943] = "943CA"
arrCheck [944] = "944CA"
arrCheck [945] = "945CA"
arrCheck [946] = "946CA"
arrCheck [947] = "947CA"
arrCheck [948] = "948CA"
arrCheck [949] = "949CA"
arrCheck [950] = "950CA"
arrCheck [951] = "951CA"
arrCheck [952] = "952CA"
arrCheck [953] = "953CA"
arrCheck [954] = "954CA"
arrCheck [955] = "955CA"
arrCheck [956] = "956CA"
arrCheck [957] = "957CA"
arrCheck [958] = "958CA"
arrCheck [959] = "959CA"
arrCheck [960] = "960CA"
arrCheck [961] = "961CA"
arrCheck [962] = "962AP"
arrCheck [963] = "963AP"
arrCheck [964] = "964AP"
arrCheck [965] = "965AP"
arrCheck [966] = "966AP"
arrCheck [967] = "967HI"
arrCheck [968] = "968HI"
arrCheck [969] = "969GU"
arrCheck [970] = "970OR"
arrCheck [971] = "971OR"
arrCheck [972] = "972OR"
arrCheck [973] = "973OR"
arrCheck [974] = "974OR"
arrCheck [975] = "975OR"
arrCheck [976] = "976OR"
arrCheck [977] = "977OR"
arrCheck [978] = "978OR"
arrCheck [979] = "979OR"
arrCheck [980] = "980WA"
arrCheck [981] = "981WA"
arrCheck [982] = "982WA"
arrCheck [983] = "983WA"
arrCheck [984] = "984WA"
arrCheck [985] = "985WA"
arrCheck [986] = "986WA"
arrCheck [987] = "987WA"
arrCheck [988] = "988WA"
arrCheck [989] = "989WA"
arrCheck [990] = "990WA"
arrCheck [991] = "991WA"
arrCheck [992] = "992WA"
arrCheck [993] = "993WA"
arrCheck [994] = "994WA"
arrCheck [995] = "995AK"
arrCheck [996] = "996AK"
arrCheck [997] = "997AK"
arrCheck [998] = "998AK"
arrCheck [999] = "999AK"
          
}
 
 