<!-- 
        // club method, used to route to a page that they host and 
        // detects whether or not the entered zipcode is theirs. 
        // 
        // this implementation passes the user off to the AES ZipCode Application with 
        // rclub and rurl parameters for this club and page 
        function verifyUserIsInOurTerritory(clubNumber) { 
                // verify client is in our territory via ZCG, must escape the rurl for proper processing by browsers 
                window.location = "http://www.aaa.com/?rclub=" + clubNumber + "&rurl=" + escape(window.location); 
        }
		function SetZip(){
	window.location = "http://www.aaa.com/scripts/WebObjects.dll/ZipCode.woa/wa/route?ZipCodeEntry=" + document.tqszip.tqs_zipcode.value + "&rclub=002&rurl="+ escape(window.location);	
		}

        // checks to see if the client is a spider, major engines listed 
        function spiderClient() { 
                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, 8) == "MERCATOR") { 
                        // should match AltaVista 
                        spiderFound = true; 
                } 
                return spiderFound; 
        } 

        // 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); 
                        } 
                } 
        } 

        // This method should be used by clubs hosting pages on aaa.com 
        // that are referenced under the domains ww1.aaa.com, ww2.aaa.com and www.aaa.com 
        // since these pages will have access to the zipcode cookie written under aaa.com. 
        function validateUserInClub(clubNumber) { 
                var ourUser = false; 
                var foundAssociation = ""; 
                var foundClub = ""; 
                var startIndex = 0; 
                var pipe = ""; 
                var cookieData = getCookie("zipcode"); 
                var foundZipCode = ""; 

                if(cookieData > "") { 
                        // get the zipcode 
                        pipe = cookieData.indexOf("|"); 
                        if(pipe > 4) { 
                                foundZipCode = cookieData.substring(startIndex, pipe); 
                                // find association 
                                startIndex = pipe + 1; 
                                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); 
                                        } 

                                } 
                        } 
                } 
                if(foundZipCode > "" && foundAssociation > "" && foundClub > "") { 
                        // we have valid data 
                        if(foundClub == clubNumber) { 
                                // this is our user, keep them here. 
                                ourUser = true; 
                        } else { 
                                // not our user, calling method will get them to the 
                                // ZipCode Gateway and then routed to their club. 
                                ourUser = false; 
                        } 
                } else { 
                        // returning false, in this case meaning we could not validate 
                        // the user, the calling method will call the ZipCode Gateway 
                        // which will take care of validating the user 
                        ourUser = false; 
                } 
                return ourUser; 
        } 

        // going to mark the user via a cookie as 
        // a validated user belonging to our club 
        function tagOurUser() { 
                // write the zipcode cookie since not under aaa.com 
                var today = new Date(); 
                var expirationDate = new Date(); 
                var foundZipcode = window.location.search.substring(startingIndex); 
                if(foundZipcode.length > 5) { 
                        var endingIndex = foundZipcode.indexOf("&"); 
                        if(endingIndex > 0) { 
                                // cut down the zipcode 
                                foundZipcode = foundZipcode.substring(0, endingIndex); 
                        } 
                } 
                // set expiration date to one year. 
                expirationDate.setTime(today.getTime() + 31536000); 
                document.cookie = "zipcode=" + foundZipcode + "|AAA|2; expires=" + expirationDate.toGMTString(); 
        } 

// -->
DHTML_modalMessage = function()
{
	var url;								// url of modal message
	var htmlOfModalMessage;					// html of modal message
	
	var divs_transparentDiv;				// Transparent div covering page content
	var divs_content;						// Modal message div.
	var iframe;								// Iframe used in ie
	var layoutCss;							// Name of css file;
	var width;								// Width of message box
	var height;								// Height of message box
	
	var existingBodyOverFlowStyle;			// Existing body overflow css
	var dynContentObj;						// Reference to dynamic content object
	var cssClassOfMessageBox;				// Alternative css class of message box - in case you want a different appearance on one of them
	var shadowDivVisible;					// Shadow div visible ? 
	var shadowOffset; 						// X and Y offset of shadow(pixels from content box)
	var MSIE;
		
	this.url = '';							// Default url is blank
	this.htmlOfModalMessage = '';			// Default message is blank
	this.layoutCss = 'style_zip.css';	// Default CSS file
	this.height = 205;						// Default height of modal message
	this.width = 315;						// Default width of modal message
	this.cssClassOfMessageBox = false;		// Default alternative css class for the message box
	this.shadowDivVisible = false;			// Shadow div is visible by default
	this.shadowOffset = 0;					// Default shadow offset.
	this.MSIE = false;
	if(navigator.userAgent.indexOf('MSIE')>=0) this.MSIE = true;
	

}

DHTML_modalMessage.prototype = {
	// {{{ setSource(urlOfSource)
	setSource : function(urlOfSource)
	{
		this.url = urlOfSource;
		
	}	
	// }}}	
	,
	// {{{ setHtmlContent(newHtmlContent)	
	setHtmlContent : function(newHtmlContent)
	{
		this.htmlOfModalMessage = newHtmlContent;
		
	}
	// }}}		
	,
	// {{{ setSize(width,height)
	setSize : function(width,height)
	{
		if(width)this.width = width;
		if(height)this.height = height;		
	}
	// }}}		
	,		
	// {{{ setCssClassMessageBox(newCssClass)
	setCssClassMessageBox : function(newCssClass)
	{
		this.cssClassOfMessageBox = newCssClass;
		if(this.divs_content){
			if(this.cssClassOfMessageBox)
				this.divs_content.className=this.cssClassOfMessageBox;
			else
				this.divs_content.className='modalDialog_contentDiv';	
		}
					
	}
	// }}}		
	,		
	setShadowOffset : function(newShadowOffset)
	{
		this.shadowOffset = newShadowOffset
					
	}
	// }}}		
	,		
	display : function()
	{
		if(!this.divs_transparentDiv){
			this.__createDivs();
		}	
		this.divs_transparentDiv.style.display='block';
		this.divs_content.style.display='block';
		this.divs_shadow.style.display='block';		
		if(this.MSIE)this.iframe.style.display='block';	
		this.__resizeDivs();
		window.refToThisModalBoxObj = this;		
		setTimeout('window.refToThisModalBoxObj.__resizeDivs()',150);
		
		this.__insertContent();	
	}
	// }}}		
	,
	// {{{ ()
	setShadowDivVisible : function(visible)
	{
		this.shadowDivVisible = visible;
	}
	// }}}	
	,
	// {{{ close()	
	close : function()
	{
		//document.documentElement.style.overflow = '';	// Setting the CSS overflow attribute of the <html> tag back to default.
		
		/* Hiding divs */
		this.divs_transparentDiv.style.display='none';
		this.divs_content.style.display='none';
		this.divs_shadow.style.display='none';
		if(this.MSIE)this.iframe.style.display='none';
		
	}	
	// }}}	
	,
	// {{{ __addEvent()	
	addEvent : function(whichObject,eventType,functionName,suffix)
	{ 
	  if(!suffix)suffix = '';
	  if(whichObject.attachEvent){ 
	    whichObject['e'+eventType+functionName+suffix] = functionName; 
	    whichObject[eventType+functionName+suffix] = function(){whichObject['e'+eventType+functionName+suffix]( window.event );} 
	    whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName+suffix] ); 
	  } else 
	    whichObject.addEventListener(eventType,functionName,false); 	    
	} 
	// }}}	
	,
	// {{{ __createDivs()	
	__createDivs : function()
	{
		// Creating transparent div
		this.divs_transparentDiv = document.createElement('DIV');
		this.divs_transparentDiv.className='modalDialog_transparentDivs';
		this.divs_transparentDiv.style.left = '0px';
		this.divs_transparentDiv.style.top = '0px';
		
		document.body.appendChild(this.divs_transparentDiv);
		// Creating content div
		this.divs_content = document.createElement('DIV');
		this.divs_content.className = 'modalDialog_contentDiv';
		this.divs_content.id = 'DHTMLSuite_modalBox_contentDiv';
		this.divs_content.style.zIndex = 100000;
		
		if(this.MSIE){
			this.iframe = document.createElement('<IFRAME src="about:blank" frameborder=0>');
			this.iframe.style.zIndex = 90000;
			this.iframe.style.position = 'absolute';
			document.body.appendChild(this.iframe);	
		}
			
		document.body.appendChild(this.divs_content);
		// Creating shadow div
		this.divs_shadow = document.createElement('DIV');
		this.divs_shadow.className = 'modalDialog_contentDiv_shadow';
		this.divs_shadow.style.zIndex = 95000;
		document.body.appendChild(this.divs_shadow); 
		window.refToModMessage = this;
		this.addEvent(window,'scroll',function(e){ window.refToModMessage.__repositionTransparentDiv() });
		this.addEvent(window,'resize',function(e){ window.refToModMessage.__repositionTransparentDiv() });

	}
	// }}}
	,
	// {{{ __getBrowserSize()	
	__getBrowserSize : function()
	{
    	var bodyWidth = document.documentElement.clientWidth;
    	var bodyHeight = document.documentElement.clientHeight;
    	
		var bodyWidth, bodyHeight; 
		if (self.innerHeight){ // all except Explorer 
		 
		   bodyWidth = self.innerWidth; 
		   bodyHeight = self.innerHeight; 
		}  else if (document.documentElement && document.documentElement.clientHeight) {
		   // Explorer 6 Strict Mode 		 
		   bodyWidth = document.documentElement.clientWidth; 
		   bodyHeight = document.documentElement.clientHeight; 
		} else if (document.body) {// other Explorers 		 
		   bodyWidth = document.body.clientWidth; 
		   bodyHeight = document.body.clientHeight; 
		} 
		return [bodyWidth,bodyHeight];		
		
	}
	// }}}	
	,
	// {{{ __resizeDivs()
    __resizeDivs : function()
    {
    	
    	var topOffset = Math.max(document.body.scrollTop,document.documentElement.scrollTop);

		if(this.cssClassOfMessageBox)
			this.divs_content.className=this.cssClassOfMessageBox;
		else
			this.divs_content.className='modalDialog_contentDiv';	
			    	
    	if(!this.divs_transparentDiv)return;
    	
    	// Preserve scroll position
    	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
    	var sl = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
    	
    	window.scrollTo(sl,st);
    	setTimeout('window.scrollTo(' + sl + ',' + st + ');',10);

    	this.__repositionTransparentDiv();
    	

		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	
    	// Setting width and height of content div
      	this.divs_content.style.width = this.width + 'px';
    	this.divs_content.style.height= this.height + 'px';  	

    	var tmpWidth = this.divs_content.offsetWidth;	
    	var tmpHeight = this.divs_content.offsetHeight;
	
    	this.divs_content.style.left = Math.ceil((bodyWidth - tmpWidth) / 2) + 'px';;
    	this.divs_content.style.top = (Math.ceil((bodyHeight - tmpHeight) / 3) +  topOffset) + 'px';
    	
 		if(this.MSIE){
 			this.iframe.style.left = this.divs_content.style.left;
 			this.iframe.style.top = this.divs_content.style.top;
 			this.iframe.style.width = this.divs_content.style.width;
 			this.iframe.style.height = this.divs_content.style.height;
 		}
 		
    	this.divs_shadow.style.left = (this.divs_content.style.left.replace('px','')/1 + this.shadowOffset) + 'px';
    	this.divs_shadow.style.top = (this.divs_content.style.top.replace('px','')/1 + this.shadowOffset) + 'px';
    	this.divs_shadow.style.height = tmpHeight + 'px';
    	this.divs_shadow.style.width = tmpWidth + 'px'; 
    	
    	
    	
    	if(!this.shadowDivVisible)this.divs_shadow.style.display='none';	// Hiding shadow if it has been disabled
    	
    	
    }
    // }}}	
    ,    
    __repositionTransparentDiv : function()
    {
    	this.divs_transparentDiv.style.top = Math.max(document.body.scrollTop,document.documentElement.scrollTop) + 'px';
    	this.divs_transparentDiv.style.left = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft) + 'px';
		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	this.divs_transparentDiv.style.width = bodyWidth + 'px';
    	this.divs_transparentDiv.style.height = bodyHeight + 'px';		
		   	
    }
	// }}}	
	,
	// {{{ __insertContent()
    __insertContent : function()
    {
		if(this.url){	// url specified - load content dynamically
			ajax_loadContent('DHTMLSuite_modalBox_contentDiv',this.url);
		}else{	// no url set, put static content inside the message box
			this.divs_content.innerHTML = this.htmlOfModalMessage;	
		}
    }		
}