<!--
         //***ZIPCODEVERIFIED***
         // club method, used to route to a page that they host and
         // detects whether or not the entered zipcode is theirs.
         //
         // alternate implementation is to pass to the AES ZipCode Application
         // which will need to be modified to send the user to a passed in
         // URL should the zipcode entered match the club passed in the URL
         function userIsOurCookiedUser() {
                        var isOurUser = false;
                 // get the data string from the ZipCode cookie
                 var cookieData = getCookie("zipcode");
                 var foundZipCode = "";
                 var foundAssociation = "";
                 var foundClub = "";
                 var startIndex = 0;
                 
                 // found a ZipCode cookie
                 // for it to be valid it must be zipcode(>4 digits)|Association(3 char)|Club(>0 digits)
                 if(cookieData > "") {
                         // get the first marker               
                         pipe = cookieData.indexOf("|");
                         // get the zipcode, which is a minimum of 5 digits
                         if(pipe > 4) {
                                foundZipCode = cookieData.substring(startIndex, pipe);
                                startIndex = pipe + 1;
                                // get the association
                                pipe = cookieData.indexOf("|", startIndex);
                                if(pipe > 8) {
                                        foundAssociation = cookieData.substring(startIndex, pipe);
                                        // get the club
                                        startIndex = pipe + 1;
                                        if(cookieData.length > startIndex) {
                                               foundClub = cookieData.substring(startIndex);
                                        }
                                }
                         }
                 }
                 // last check to ensure everything is ok
                 if(foundZipCode > "" && foundAssociation > "" && foundClub > "") {
                         // we have valid data
                         if(foundClub == "238") {
                                isOurUser = true;
                         } else {
                                // invalid cookie, must verify client is in our territory
                                isOurUser = false;                            }
                 } else {
                         // invalid cookie, must verify client is in our territory
                         isOurUser = false;             
                 }                      
                        return isOurUser;
         }
 
         // gets the zipcode cookie data from the club's cookie
         function getCookie(CookieName) {
                 var search = CookieName + "=";
                 if(document.cookie.length > 0) {
                         offset = document.cookie.indexOf(search);
                         if(offset != -1) {
                                offset += search.length;
                                end = document.cookie.indexOf(";", offset);
                                
                                if(end == -1) {
                                        end = document.cookie.length;
                                 }
                                return document.cookie.substring(offset, end);
                         }
                 }
         }
 
         // checks to see if the client is a spider
                function spiderFound() {
                 var spiderFound = false;
                 var useragent = window.navigator.userAgent;
                 useragent = useragent.toUpperCase();
                 if(useragent.substring(0, 6) == "GOOGLE" || useragent.substring(0, 7) == "BACKRUB") {
                         // should match all Google Spiders
                         spiderFound = true;
                 } else if(useragent.substring(0, 5) == "YAHOO") {
                         // should match all Yahoo spiders
                         spiderFound = true;
                 } else if(useragent.substring(0, 6) == "MSNBOT") {
                         // should match all MSN spiders
                         spiderFound = true;
                 } else if(useragent.substring(0, 5) == "LYCOS") {
                         // should match Lycos
                         spiderFound = true;
                 } else if(useragent.substring(0, 12) == "ACSC_CRAWLER") {
                         // should match ACSC_CRAWLER
                         spiderFound = true;
                 } else if(useragent.indexOf("Keynote") > 0 ) {
                         // should match Keynote Script
                         spiderFound = true;
                 } else if(useragent.substring(0, 8) == "MERCATOR") {
                         // should match AltaVista
                         spiderFound = true;
                 }
                }
 
                function validateUserViaZCG() {
                    window.location = "http://www.aaa.com/?rclub=238&rurl=" + escape(window.location);
                }
         
  var szipcode = location.search;
  if (szipcode.indexOf("zip") > 0) 
  {
         // do nothing, never write to the aaa.com zipcode cookie to prevent munging it
          
  } else if(userIsOurCookiedUser()) {
  	
            // allow the user to remain, they are our user
  } else if(spiderFound())
  {
  	
            // allow the spider to continue on this page
  } else {
  	
            // route the user through the ZCG to ensure they are in our territory
            validateUserViaZCG();
        }
// --> 