<!--

var StateWithoutSalesTaxRecordFound;

var StatesNoSalesTaxArray;
var StatesNoSalesTaxCount;

var RFNameCount; 
var RLNameCount; 
var RCompanyCount; 
var RCompanyAmpersandCount;
var RAddress1Count;
var RAddress2Count;
var RCityCount;

var i;
var s;

var StateIndex;
var CountryIndex;
var StateNameIndex;

var TotStatesProvinces;

var elementname;

var strRState;
var strCreditReferencesFormDisplayed;

var strElementName;	

var strStateResaleNumberDisplayed;
var strWebAddressDisplayed;
var strFaxNumberDisplayed;

var intTotalCreditReferences;


function validateRegister(NbrStatesNoSalesTax, NumberStates, NumberProvinces, NumberCountries)
{
 document.registerform.JavaScriptEnabled.value = "true";

  with (document.registerform)
 { 

	 var apostrapheindex;
	 var ampersandindex;
	 var tempdesc;

	 RFNameCount = 0;
     RLNameCount = 0;
     RCompanyCount = 0;
	 RCompanyAmpersandCount = 0;
     RAddress1Count = 0;
	 RAddress2Count = 0;
	 RCityCount = 0;	 

	 strStateResaleNumberDisplayed = StateResaleNumberDisplayed.value;

	 strWebAddressDisplayed = WebAddressDisplayed.value;
	 strFaxNumberDisplayed = FaxNumberDisplayed.value;

	 StatesNoSalesTaxCount = NbrStatesNoSalesTax;

     TotStatesProvinces = NumberStates + NumberProvinces + 2;

	 apostrapheindex = RFirstName.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RFNameCount = RFNameCount + 1;
		  tempdesc = RFirstName.value.substr(apostrapheindex + 1);
		 
		  apostrapheindex = tempdesc.indexOf("'"); 
		 
		  if (apostrapheindex > -1)
		  {
			RFNameCount = RFNameCount + 1;
		  }
	    }
		
	    apostrapheindex = RLastName.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RLNameCount = RLNameCount + 1;
		  tempdesc = RLastName.value.substr(apostrapheindex + 1);
		 
		  apostrapheindex = tempdesc.indexOf("'"); 
		 
		  if (apostrapheindex > -1)
		  {
			RLNameCount = RLNameCount + 1;
		  }
	    }
		
		apostrapheindex = RCompany.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RCompanyCount = RCompanyCount + 1;
		  tempdesc = RCompany.value.substr(apostrapheindex + 1);
		 
		  apostrapheindex = tempdesc.indexOf("'"); 
		 
		  if (apostrapheindex > -1)
		  {
			RCompanyCount = RCompanyCount + 1;
		  }
	    }	
		
	    ampersandindex = RCompany.value.indexOf("&"); 
        if (ampersandindex > -1) 
	    {
		  RCompanyAmpersandCount = RCompanyAmpersandCount + 1;
		  tempdesc = RCompany.value.substr(ampersandindex + 1);
		 
		  ampersandindex = tempdesc.indexOf("&"); 
		 
		  if (ampersandindex > -1)
		  {
			RCompanyAmpersandCount = RCompanyAmpersandCount + 1;
		  }
	    }		
	 
	    apostrapheindex = RAddress1.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RAddress1Count = RAddress1Count + 1;
		}

		apostrapheindex = RAddress2.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RAddress2Count = RAddress2Count + 1;
		}

		apostrapheindex = RCity.value.indexOf("'"); 
        if (apostrapheindex > -1) 
	    {
		  RCityCount = RCityCount + 1;
		}
	
		if (StatesNoSalesTaxCount > 0)
		{
		  
		   StatesNoSalesTaxArray = new Array(StatesNoSalesTaxCount);

           s = -1;

		     for (i = 0; i < document.registerform.length ; i++)
	          {        
		
		        elementname = document.registerform.elements[i];		

		        if (elementname.type == "hidden")
		         { 			
		            strElementName = elementname.name;

					StateNameIndex = strElementName.indexOf("StateName");

					
		            if (StateNameIndex > -1)
			        {	               
                      s = s + 1;
		            		  
			          StatesNoSalesTaxArray[s] = elementname.value; 						  
		            }
			     }
		      }
		}

        for (i=0; i < TotStatesProvinces ; i++)
	    {
         if (RState.options[i].selected)
		  {
		    StateIndex = i;			
		  }
	    }
     
		for (i=0; i < NumberCountries ; i++)
	    {
         if (RCountry.options[i].selected)
		  {
		    CountryIndex = i;			
		  }
	    }  
  
  if (RCountry.options[CountryIndex].text == "United States" ||
	 RCountry.options[CountryIndex].text == "Canada")
	 {
       strRState = RState.options[StateIndex].text;     
	 }


  if (RCountry.options[CountryIndex].text == "United States")  
	  {
	     if (RTaxID.value.length == 0)
	     {
           alert("Please enter your Federal Tax ID.");
		   RTaxID.focus();
		   return false;
	     }

		 if (isNaN(RTaxID.value))
	     {
	       alert("Please enter numbers only.");
	       RTaxID.focus();	   
	       return false;
	     }

		 if (RTaxID.value.length != 9)
         {
	       alert("Please enter a valid Tax ID.");
		   RTaxID.focus();
		   return false;
	     } 
	    
	  }
  
  
  if (RCountry.options[CountryIndex].text != "United States")  
	  {
	     if (RTaxID.value.length > 0)
	     {
           alert("The Federal Tax ID applies to US businesses only.");
		   RTaxID.focus();
		   return false;
	     }		
	    
	  }
  
  if (strStateResaleNumberDisplayed == "yes")
  {
	
     if (strRState != "")
     {  
	  
       if (RCountry.options[CountryIndex].text == "United States")  
	    {
	      
		  SearchStatesWithoutSalesTaxArray();
		   
        
		  if (StateWithoutSalesTaxRecordFound == "yes")
		  {		

	        if (RStateResaleNumber.value.length > 0)
	        {
          
		      if (RStateResaleNumber.value.length > 30)
               {
	             alert("State Resale Number may not be more than 30 characters.");
		         RStateResaleNumber.focus();
		         return false;
	           }

              if (RStateResaleNumber.value.indexOf(";") > -1)
               {
	             alert("Please do not include a semicolon in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

              if (RStateResaleNumber.value.indexOf("|") > -1)
               {
	             alert("Please do not include a break bar in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

              if (RStateResaleNumber.value.indexOf("'") > -1)
               {
	             alert("Please do not include an apostraphe in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

			  if (RStateResaleNumber.value.indexOf('"') > -1)
               {
	             alert("Please do not include a quote in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 
               
			   if (RStateResaleNumber.value.indexOf("\\") > -1)
               {
	             alert("Please do not include a backslash in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 
            }
		  }
	    else
		  {

             if (RStateResaleNumber.value.length == 0)
             {
	           alert("Please enter State Resale Number.");
		       RStateResaleNumber.focus();
		       return false;
	         }

             if (RStateResaleNumber.value.length > 30)
             {
	           alert("State Resale Number not be more than 30 characters.");
		       RStateResaleNumber.focus();
		       return false;
	         }

             if (RStateResaleNumber.value.indexOf(";") > -1)
               {
	             alert("Please do not include a semicolon in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

             if (RStateResaleNumber.value.indexOf("|") > -1)
               {
	             alert("Please do not include a break bar in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

              if (RStateResaleNumber.value.indexOf("'") > -1)
               {
	             alert("Please do not include an apostraphe in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

			  if (RStateResaleNumber.value.indexOf('"') > -1)
               {
	             alert("Please do not include a quote in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 
               
			   if (RStateResaleNumber.value.indexOf("\\") > -1)
               {
	             alert("Please do not include a backslash in state resale number.");
	             RStateResaleNumber.focus();
		         return false;	     
               } 

		  }
	    
	    }
     }
  }

  if (strStateResaleNumberDisplayed == "yes")
  {

    if (RCountry.options[CountryIndex].text != "United States")  
	  {
	     if (RStateResaleNumber.value.length > 0)
	     {
           alert("The State Resale Number applies to US businesses only.");
		   RStateResaleNumber.focus();
		   return false;
	     }		
	    
	  }
  }
  
  if (REmail.value.length == 0)
	 {
         alert("Please enter your Email address!");
		 REmail.focus();
		 return false;
	 }

   if (REmail.value.length > 40)
     {
	     alert("Your Logon ID may not be more than 40 characters.");
		 REmail.focus();
		 return false;
	 }

   if (REmail.value.indexOf(" ") > -1)
    {
	    alert("Please do not include a space in Logon ID.");
	    REmail.focus();
		return false;     
    } 

    if (REmail.value.indexOf(";") > -1)
     {
	    alert("Please do not include a semicolon in email.");
	    REmail.focus();
		return false;	     
     } 

   if (REmail.value.indexOf("|") > -1)
     {
	    alert("Please do not include a break bar in email.");
	    REmail.focus();
		return false;	     
     } 

   if (REmail.value.indexOf("'") > -1)
     {
	    alert("Please do not include an apostraphe in email.");
	    REmail.focus();
		return false;	     
     } 
  
    if (REmail.value.indexOf('"') > -1)
     {
	    alert("Please do not include a quote in email!");
	    REmail.focus();
		return false;	     
     } 

   if (REmail.value.indexOf("\\") > -1)
     {
	     alert("Please do not include a backslash in email.");
		 REmail.focus();
		 return false;	     
     }
  
  
    if (REmail.value.indexOf("=") > -1)
     {
	   alert("Please do not include an equal sign in email.");
       REmail.focus();
	   return false;
     } 


  if (REmail.value != "")
	  {
	     var ind = REmail.value.indexOf("@");
	     if (ind == -1)
	       {
	        alert("Please type in a valid E-mail address!");
	        REmail.focus()
	        REmail.select();
	        return false;
	       }

	    if (REmail.value.indexOf(".",ind) == -1)
	      {
	        alert("Please type in a valid E-mail address!");
            REmail.focus()
	        REmail.select();
	        return false;
	      }
      }
  
 

  if (RPassword.value.length == 0)
     {
	     alert("Please enter a Password!");
		 RPassword.focus();
		 return false;
	 } 
	 
     if (RPassword.value.length < 4)
     {
	     alert("Please enter a password that has more than 3 characters!");
		 RPassword.focus();
		 return false;
	 }

   if (RPassword.value.length > 10)
     {
	     alert("Please enter a password that is not more than 10 characters!");
		 RPassword.focus();
		 return false;
	 }

   if (RPassword.value.indexOf(" ") > -1)
    {
	    alert("Please do not include a space in password.");
	    RPassword.focus();
		return false;     
    } 

   if (RPassword.value.indexOf(";") > -1)
    {
	    alert("Please do not include a semicolon in password.");
	    RPassword.focus();
		return false;	     
    } 

   if (RPassword.value.indexOf("|") > -1)
    {
	    alert("Please do not include a break bar in password.");
	    RPassword.focus();
		return false;	     
    } 

  if (RPassword.value.indexOf("'") > -1)
    {
	    alert("Please do not include an apostraphe in password.");
	    RPassword.focus();
		return false;	     
    } 
  
  if (RPassword.value.indexOf('"') > -1)
    {
	    alert("Please do not include a quote in password!");
	    RPassword.focus();
		return false;	     
    } 

 
    if (RPassword.value.indexOf("\\") > -1)
    {
	     alert("Please do not include a backslash in password.");
		 RPassword.focus();
		 return false;	     
    } 
   
  
   if (RPassword2.value.length == 0)
     {
	     alert("Please enter a Password!");
		 RPassword2.focus();
		 return false;
	 }

    if (RPassword2.value.length > 10)
     {
	     alert("Please enter a password that is not more than 10 characters!");
		 RPassword2.focus();
		 return false;
	 }

    if (RPassword2.value.indexOf(";") > -1)
     {
	    alert("Please do not include a semicolon in password.");
	    RPassword2.focus();
		return false;	     
     } 

   if (RPassword2.value.indexOf("|") > -1)
     {
	    alert("Please do not include a break bar in password.");
	    RPassword2.focus();
		return false;	     
     } 

   if (RPassword2.value.indexOf('"') > -1)
    {
	    alert("Please do not include a quote in password!");
	    RPassword2.focus();
		return false;	     
    } 

    if (RPassword2.value.indexOf("\\") > -1)
    {
	     alert("Please do not include a backslash in password.");
		 RPassword2.focus();
		 return false;	     
    }
  
    if (RPassword2.value.indexOf("=") > -1)
    {
	 alert("Please do not include an equal sign in password!");
     RPassword2.focus();
	 return false;
    }   
   

   if (RPassword.value != RPassword2.value)
     {
	    alert("The passwords you entered do not match. Please re-enter them.");
		RPassword.focus();
		return false;
	 }
	 
  if (strWebAddressDisplayed == "yes")
  {  
	
    if (RWebsite.value.length > 0)
	 {
          
	   if (RWebsite.value.length > 50)
         {
	         alert("Web address may not have more than 50 characters.");
		     RWebsite.focus();
		     return false;
	     }

       if (RWebsite.value.indexOf(";") > -1)
         {
	       alert("Please do not include a semicolon in web address.");
	       RWebsite.focus();
		   return false;	     
         } 

       if (RWebsite.value.indexOf("|") > -1)
         {
	       alert("Please do not include a break bar in web address.");
	       RWebsite.focus();
		   return false;	     
         } 

       if (RWebsite.value.indexOf("'") > -1)
         {
	        alert("Please do not include an apostraphe in web address.");
	        RWebsite.focus();
		    return false;	     
         } 

	  if (RWebsite.value.indexOf('"') > -1)
         {
	        alert("Please do not include a quote in web address.");
	        RWebsite.focus();
		    return false;	     
         } 
               
	  if (RWebsite.value.indexOf("\\") > -1)
         {
	        alert("Please do not include a backslash in web address.");
	        RWebsite.focus();
		    return false;	     
         } 

	 }
  }

  if (RFirstName.value.length == 0)
	 {
         alert("Please enter your first name!");
		 RFirstName.focus();
		 return false;
	 }

  if (RFirstName.value.length > 30)
     {
	     alert("Your first name may not be more than 30 characters.");
		 RFirstName.focus();
		 return false;
	 }

  if (RFirstName.value.indexOf(";") > -1)
    {
	    alert("Please do not include a semicolon in first name.");
	    RFirstName.focus();
		return false;	     
    } 

   if (RFirstName.value.indexOf("|") > -1)
    {
	    alert("Please do not include a break bar in first name.");
	    RFirstName.focus();
		return false;	     
    } 

     if (RFNameCount > 1)
     {
	     alert("Please include only one apostraphe in first name!");
		 RFirstName.focus();
		 return false;	     
     }

    if (RFirstName.value.indexOf('"') > -1)
     {
	    alert("Please do not include a quote in first name!");
	    RFirstName.focus();
		return false;	     
     } 

    if (RFirstName.value.indexOf("\\") > -1)
    {
	     alert("Please do not include a backslash in first name.");
		 RFirstName.focus();
		 return false;	     
    }
  
    if (RFirstName.value.indexOf("&") > -1)
    {
	     alert("Please do not include an ampersand in first name.");
		 RFirstName.focus();
		 return false;	     
    }  

    if (RLastName.value.length == 0)
	 {
         alert("Please enter your last name!");
		 RLastName.focus();
		 return false;
	 }

    if (RLastName.value.length > 30)
     {
	     alert("Your last name may not be more than 30 characters.");
		 RLastName.focus();
		 return false;
	 }


    if (RLastName.value.indexOf(";") > -1)
    {
	    alert("Please do not include a semicolon in last name.");
	    RLastName.focus();
		return false;	     
    } 

    if (RLastName.value.indexOf("|") > -1)
    {
	    alert("Please do not include a break bar in last name.");
	    RLastName.focus();
		return false;	     
     } 

 
     if (RLNameCount > 1)
     {
	     alert("Please include only one apostraphe in last name!");
		 RLastName.focus();
		 return false;	     
     }

     if (RLastName.value.indexOf('"') > -1)
     {
	    alert("Please do not include a quote in last name!");
	    RLastName.focus();
		return false;	     
     } 

    if (RLastName.value.indexOf("\\") > -1)
     {
	     alert("Please do not include a backslash in last name.");
		 RLastName.focus();
		 return false;	     
     }

     if (RLastName.value.indexOf("&") > -1)
     {
	     alert("Please do not include an ampersand in last name.");
		 RLastName.focus();
		 return false;	     
     }
  
    if (RCompany.value.length == 0)
	 {
         alert("Please enter your Company name!");
		 RCompany.focus();
		 return false;
	 }	 

   if (RCompany.value.length > 50)
     {
	     alert("Your company name may not be more than 50 characters.");
		 RCompany.focus();
		 return false;
	 }


   if (RCompany.value.indexOf(";") > -1)
    {
	    alert("Please do not include a semicolon in company name.");
	    RCompany.focus();
		return false;	     
    } 

   if (RCompany.value.indexOf("|") > -1)
   {
	    alert("Please do not include a break bar in company name.");
	    RCompany.focus();
		return false;	     
   } 

 
  if (RCompanyCount > 1)
  {
	  alert("Please include only one apostraphe in company name!");
	  RCompany.focus();
	  return false;
	     
  }
   
  if (RCompanyAmpersandCount > 1)
  {
	  alert("Please include only one ampersand in company name!");
	  RCompany.focus();
	  return false;
	     
  }


 if (RCompany.value.indexOf('"') > -1)
  {
	    alert("Please do not include a quote in company name!");
	    RCompany.focus();
		return false;
	     
  }

  if (RCompany.value.indexOf("\\") > -1)
  {
	     alert("Please do not include a backslash in company name.");
		 RCompany.focus();
		 return false;	     
  }
  
    
 if (RAddress1.value.length == 0)
	 {
         alert("Please enter your address!");
		 RAddress1.focus();
		 return false;
	 }

  if (RAddress1.value.length > 50)
     {
	     alert("Your address may not be more than 50 characters.");
		 RAddress1.focus();
		 return false;
	 }

  if (RAddress1.value.indexOf(";") > -1)
     {
	    alert("Please do not include a semicolon in address.");
	    RAddress1.focus();
		return false;	     
     } 

   if (RAddress1.value.indexOf("|") > -1)
    {
	    alert("Please do not include a break bar in address.");
	    RAddress1.focus();
		return false;	     
    } 

   if (RAddress1Count > 0)
    {
	     alert("Please do not include an apostraphe in address!");
		 RAddress1.focus();
		 return false;	     
    }

   if (RAddress1.value.indexOf('"') > -1)
    {
	    alert("Please do not include a quote in address!");
	    RAddress1.focus();
		return false;	     
    } 

    if (RAddress1.value.indexOf("\\") > -1)
    {
	     alert("Please do not include a backslash in address.");
		 RAddress1.focus();
		 return false;	     
    }

	 if (RAddress1.value.indexOf("&") > -1)
    {
	     alert("Please do not include an ampersand in address.");
		 RAddress1.focus();
		 return false;	     
    }

   if (RAddress2.value.length > 50)
     {
	     alert("Your address may not be more than 50 characters.");
		 RAddress2.focus();
		 return false;
	 }


   if (RAddress2.value.indexOf(";") > -1)
   {
	    alert("Please do not include a semicolon in address.");
	    RAddress2.focus();
		return false;	     
   } 

  if (RAddress2.value.indexOf("|") > -1)
  {
	   alert("Please do not include a break bar in address.");
	   RAddress2.focus();
	   return false;	     
  } 

  if (RAddress2Count > 0)
  {
	 alert("Please do not include an apostraphe in address!");
	 RAddress2.focus();
	 return false;
	     
  }


  if (RAddress2.value.indexOf('"') > -1)
  {
	  alert("Please do not include a quote in address!");
	  RAddress2.focus();
	  return false;
	     
  } 

 if (RAddress2.value.indexOf("\\") > -1)
  {
	  alert("Please do not include a backslash in address.");
	  RAddress2.focus();
	  return false;	     
  }

  if (RAddress2.value.indexOf("&") > -1)
    {
	  alert("Please do not include an ampersand in address.");
	  RAddress2.focus();
	  return false;	     
    }

  
if (RCity.value.length == 0)
	 {
         alert("Please enter your city!");
		 RCity.focus();
		 return false;
	 }

 if (RCity.value.length > 30)
     {
	     alert("Your city may not be more than 30 characters.");
		 RCity.focus();
		 return false;
	 }


 if (RCity.value.indexOf(";") > -1)
  {
	    alert("Please do not include a semicolon in city.");
	    RCity.focus();
		return false;
	     
  } 

 if (RCity.value.indexOf("|") > -1)
  {
	    alert("Please do not include a break bar in city.");
	    RCity.focus();
		return false;
	     
  } 

 if (RCityCount > 0)
  {
	 alert("Please do not include an apostraphe in city!");
	 RCity.focus();
	 return false;	     
  } 
 
 if (RCity.value.indexOf('"') > -1)
  {
	  alert("Please do not include a quote in city!");
	  RCity.focus();
	 return false;
	     
  } 

  if (RCity.value.indexOf("\\") > -1)
  {
	  alert("Please do not include a backslash in city.");
	  RCity.focus();
	  return false;	     
  }
  
 if (RCity.value.indexOf("&") > -1)
    {
	  alert("Please do not include an ampersand in city.");
	  RCity.focus();
	  return false;	     
    }

 if (! (RCountry.options[CountryIndex].text == "United States" || 
	   RCountry.options[CountryIndex].text == "Canada"))  
	  {
	    if (StateIndex > 0)
		 { 	   
           alert("Please do not select a state or province.");
		   RState.focus();
		   return false;
	     }
	  }

  if (RCountry.options[CountryIndex].text == "United States")  
	  {
	    if (StateIndex == 0 || StateIndex > NumberStates - 1)
		 { 	   
           alert("Please select a state.");
		   RState.focus();
		   return false;
	     }	  
	  }

  if (RCountry.options[CountryIndex].text == "Canada")   
	 {
     if (StateIndex == 0 || StateIndex < NumberStates + 2)
  	  {
         alert("Please select a province.");
		 RState.focus();
		 return false;
	  }
	}


  
  if (RCountry.options[CountryIndex].text == "United States")  
	 {
         if (RZip.value.length == 0)
	     {
            alert("Please enter your zip code.");
		    RZip.focus();
		    return false;
	     }
	 }

  if (RCountry.options[CountryIndex].text == "United States")  
	 {
      if (isNaN(RZip.value))
	   {
	     alert("Please enter a Zip code number.");
	     RZip.focus();
	     RZip.select();
	     return false;
	   }
	    
	 }

    if (RCountry.options[CountryIndex].text == "United States")  
	 {
	   if (RZip.value.length < 5)
       {
	     alert("Your zip code may not be less than 5 characters.");
		 RZip.focus();
		 return false;
	   }
	 }

   if (RCountry.options[CountryIndex].text == "United States")  
	 {
	   if (RZip.value.length > 9)
       {
	     alert("Your zip code may not be more than 9 characters.");
		 RZip.focus();
		 return false;
	   }
	 }


 if (RCountry.options[CountryIndex].text == "Algeria" ||
	 RCountry.options[CountryIndex].text == "Argentina" ||
	 RCountry.options[CountryIndex].text == "Armenia" ||
	 RCountry.options[CountryIndex].text == "Australia" ||
	 RCountry.options[CountryIndex].text == "Austria" ||
	 RCountry.options[CountryIndex].text == "Azerbaijan" ||
	 RCountry.options[CountryIndex].text == "Azores" ||
	 RCountry.options[CountryIndex].text == "Bangladesh" ||
	 RCountry.options[CountryIndex].text == "Belarus" ||
	 RCountry.options[CountryIndex].text == "Belgium" ||
	 RCountry.options[CountryIndex].text == "Bosnia" ||
	 RCountry.options[CountryIndex].text == "Brazil" ||
	 RCountry.options[CountryIndex].text == "Bulgaria" ||
	 RCountry.options[CountryIndex].text == "Canada" ||
	 RCountry.options[CountryIndex].text == "Canary Islands" ||
	 RCountry.options[CountryIndex].text == "Channel Islands" ||
	 RCountry.options[CountryIndex].text == "China" ||
	 RCountry.options[CountryIndex].text == "Croatia" ||
	 RCountry.options[CountryIndex].text == "Cyprus" ||
	 RCountry.options[CountryIndex].text == "Czech Republic" ||
	 RCountry.options[CountryIndex].text == "Denmark" ||
	 RCountry.options[CountryIndex].text == "England" ||
	 RCountry.options[CountryIndex].text == "Estonia" ||
	 RCountry.options[CountryIndex].text == "Faroe Islands" ||
	 RCountry.options[CountryIndex].text == "Finland" ||
	 RCountry.options[CountryIndex].text == "France" ||
	 RCountry.options[CountryIndex].text == "Georgia" ||
	 RCountry.options[CountryIndex].text == "Germany" ||
	 RCountry.options[CountryIndex].text == "Gibraltar" ||	
	 RCountry.options[CountryIndex].text == "Greece" ||
	 RCountry.options[CountryIndex].text == "Greenland" ||
	 RCountry.options[CountryIndex].text == "Guam" ||
	 RCountry.options[CountryIndex].text == "Guernsey" ||
	 RCountry.options[CountryIndex].text == "Holland" ||
	 RCountry.options[CountryIndex].text == "Hungary" ||
	 RCountry.options[CountryIndex].text == "Iceland" ||
	 RCountry.options[CountryIndex].text == "India" ||
	 RCountry.options[CountryIndex].text == "Indonesia" ||
	 RCountry.options[CountryIndex].text == "Israel" ||
	 RCountry.options[CountryIndex].text == "Italy" ||
	 RCountry.options[CountryIndex].text == "Japan" ||
	 RCountry.options[CountryIndex].text == "Kazakhstan" ||
	 RCountry.options[CountryIndex].text == "Kosrae" ||
	 RCountry.options[CountryIndex].text == "Kyrgyzstan" ||
	 RCountry.options[CountryIndex].text == "Latvia" ||
	 RCountry.options[CountryIndex].text == "Lichtenstein" ||
	 RCountry.options[CountryIndex].text == "Lithuania" ||
	 RCountry.options[CountryIndex].text == "Luxembourg" ||
	 RCountry.options[CountryIndex].text == "Macedonia" ||
	 RCountry.options[CountryIndex].text == "Madeira" ||
	 RCountry.options[CountryIndex].text == "Malaysia" ||
	 RCountry.options[CountryIndex].text == "Malta" ||
	 RCountry.options[CountryIndex].text == "Marshall Islands" ||
	 RCountry.options[CountryIndex].text == "Martinique" ||
	 RCountry.options[CountryIndex].text == "Mexico" ||
	 RCountry.options[CountryIndex].text == "Micronesia" ||
	 RCountry.options[CountryIndex].text == "Moldova" ||
	 RCountry.options[CountryIndex].text == "Monaco" ||
	 RCountry.options[CountryIndex].text == "Mongolia" ||	
	 RCountry.options[CountryIndex].text == "Netherlands" ||
	 RCountry.options[CountryIndex].text == "New Zealand" ||
	 RCountry.options[CountryIndex].text == "Norfolk Island" ||
	 RCountry.options[CountryIndex].text == "Northern Ireland" ||
	 RCountry.options[CountryIndex].text == "Norway" ||
	 RCountry.options[CountryIndex].text == "Pakistan" ||
	 RCountry.options[CountryIndex].text == "Palau" ||
	 RCountry.options[CountryIndex].text == "Philippines" ||
	 RCountry.options[CountryIndex].text == "Poland" ||
	 RCountry.options[CountryIndex].text == "Ponape" ||
	 RCountry.options[CountryIndex].text == "Portugal" ||
	 RCountry.options[CountryIndex].text == "Puerto Rico" ||
	 RCountry.options[CountryIndex].text == "Reunion" ||
	 RCountry.options[CountryIndex].text == "Romania" ||
	 RCountry.options[CountryIndex].text == "Russia" ||
	 RCountry.options[CountryIndex].text == "San Marino" ||
	 RCountry.options[CountryIndex].text == "Saudi Arabia" ||
	 RCountry.options[CountryIndex].text == "Scotland" ||
	 RCountry.options[CountryIndex].text == "Singapore" ||
	 RCountry.options[CountryIndex].text == "Slovakia" ||
	 RCountry.options[CountryIndex].text == "Slovenia" ||
	 RCountry.options[CountryIndex].text == "South Africa" ||
	 RCountry.options[CountryIndex].text == "South Korea" ||
	 RCountry.options[CountryIndex].text == "Spain" ||
	 RCountry.options[CountryIndex].text == "Sri Lanka" ||
	 RCountry.options[CountryIndex].text == "St. Croix" ||
	 RCountry.options[CountryIndex].text == "St. John" ||
	 RCountry.options[CountryIndex].text == "St. Thomas" ||
	 RCountry.options[CountryIndex].text == "Sweden" ||
	 RCountry.options[CountryIndex].text == "Switzerland" ||
	 RCountry.options[CountryIndex].text == "Taiwan" ||
	 RCountry.options[CountryIndex].text == "Tajikistan" ||
	 RCountry.options[CountryIndex].text == "Thailand" ||
	 RCountry.options[CountryIndex].text == "Truk" ||
	 RCountry.options[CountryIndex].text == "Turkey" ||
	 RCountry.options[CountryIndex].text == "Turkmenistan" ||
	 RCountry.options[CountryIndex].text == "United Kingdom" ||
	 RCountry.options[CountryIndex].text == "Ukraine" ||
	 RCountry.options[CountryIndex].text == "Uruguay" ||
	 RCountry.options[CountryIndex].text == "US Virgin Islands" ||
	 RCountry.options[CountryIndex].text == "Uzbekistan" ||
	 RCountry.options[CountryIndex].text == "Vatican City State" ||
	 RCountry.options[CountryIndex].text == "Vietnam" ||
	 RCountry.options[CountryIndex].text == "Wales" ||
	 RCountry.options[CountryIndex].text == "Yap")  
	 {
       if (RZip.value.length == 0)
	    {
          alert("Please enter your postal code.");
	      RZip.focus();
	      return false;
	    }
	 }

 if (RZip.value.length > 15)
     {
	     alert("Your postal code may not be more than 15 characters.");
		 RZip.focus();
		 return false;
	 }


 if (RZip.value.indexOf(" ") > -1)
  {
	    alert("Please do not include a space in the postal code.");
	    RZip.focus();
		return false;
	     
  } 

  if ((RZip.value.indexOf("~") > -1) || (RZip.value.indexOf("`") > -1) || 
	  (RZip.value.indexOf("!") > -1) || (RZip.value.indexOf("@") > -1) || 
	  (RZip.value.indexOf("#") > -1) || (RZip.value.indexOf("$") > -1) || 
	  (RZip.value.indexOf("%") > -1) || (RZip.value.indexOf("^") > -1) || 
	  (RZip.value.indexOf("&") > -1) || (RZip.value.indexOf("*") > -1) || 
	  (RZip.value.indexOf("(") > -1) || (RZip.value.indexOf(")") > -1) || 
	  (RZip.value.indexOf("_") > -1) || (RZip.value.indexOf("-") > -1) || 
	  (RZip.value.indexOf("+") > -1) || (RZip.value.indexOf("=") > -1) || 
	  (RZip.value.indexOf("{") > -1) || (RZip.value.indexOf("}") > -1) ||
	  (RZip.value.indexOf("[") > -1) || (RZip.value.indexOf("]") > -1) || 
	  (RZip.value.indexOf("|") > -1) || (RZip.value.indexOf("\\") > -1) || 
	  (RZip.value.indexOf(":") > -1) || (RZip.value.indexOf(";") > -1) ||
	  (RZip.value.indexOf('"') > -1) || (RZip.value.indexOf("'") > -1) || 
	  (RZip.value.indexOf("<") > -1) || (RZip.value.indexOf(">") > -1) || 
	  (RZip.value.indexOf(",") > -1) || (RZip.value.indexOf(".") > -1) ||
	  (RZip.value.indexOf("?") > -1) || (RZip.value.indexOf("/") > -1))
  {
	    alert("Please include only alphanumeric characters in the postal code.");
	    RZip.focus();
		return false;
	     
  } 



if (RPhone.value.length == 0)
	 {
         alert("Please enter your phone number.");
		 RPhone.focus();
		 return false;
	 } 

 if (RPhone.value.length > 16)
     {
	     alert("Your phone number may not be more than 16 characters.");
		 RPhone.focus();
		 return false;
	 }


 if (RPhone.value.indexOf(";") > -1)
  {
	    alert("Please do not include a semicolon in phone number.");
	    RPhone.focus();
		return false;
	     
  } 

if (RPhone.value.indexOf("|") > -1)
  {
	    alert("Please do not include a break bar in phone number.");
	    RPhone.focus();
		return false;
	     
  } 

  if (RPhone.value.indexOf("'") > -1)
  {
	    alert("Please do not include an apostraphe in the phone number.");
	    RPhone.focus();
		return false;
	     
  } 
  
 
 if (RPhone.value.indexOf('"') > -1)
  {
	 alert("Please do not include a quote in the phone number.");
	 RPhone.focus();
     return false;
	     
  } 
  
   if (RPhone.value.indexOf("\\") > -1)
  {
	 alert("Please do not include a backslash in phone number.");
	 RPhone.focus();
	 return false;	     
  }

  if (RPhone.value.indexOf("&") > -1)
  {
	 alert("Please do not include an ampersand in phone number.");
	 RPhone.focus();
	 return false;	     
  }

  if (strFaxNumberDisplayed == "yes")
  {
  
    if (RFax.value.length > 0)
	 {
      
        if (RFax.value.length > 16)
        {
	       alert("Your fax number may not be more than 16 characters.");
		   RFax.focus();
		   return false;
	    }


        if (RFax.value.indexOf(";") > -1)
        {
	      alert("Please do not include a semicolon in fax number.");
	      RFax.focus();
		  return false;	     
        } 

        if (RFax.value.indexOf("|") > -1)
        {
	      alert("Please do not include a break bar in fax number.");
	      RFax.focus();
		  return false;	     
        } 

        if (RFax.value.indexOf("'") > -1)
        {
	      alert("Please do not include an apostraphe in fax number.");
	      RFax.focus();
		  return false;	     
        } 

       
        if (RFax.value.indexOf('"') > -1)
        {
	      alert("Please do not include a quote in the fax number.");
	      RFax.focus();
		  return false;
	    }   
       
  
        if (RFax.value.indexOf("\\") > -1)
        {
	      alert("Please do not include a backslash in fax number.");
		  RFax.focus();
		  return false;	     
        }
		
        if (RFax.value.indexOf("&") > -1)
        {
	      alert("Please do not include an ampersand in fax number.");
		  RFax.focus();
		  return false;	     
        }
	 }
	
  }

 }

}

function SearchStatesWithoutSalesTaxArray()
{

  StateWithoutSalesTaxRecordFound = "no";

  for (t=0; t < StatesNoSalesTaxCount; t++ )
  {
    if (strRState == StatesNoSalesTaxArray[t])
	  {
        StateWithoutSalesTaxRecordFound = "yes"  
	  }
  }

}
//-->