/* This script was written to support static pages    -->
<!-- on aaa.com only.  It could be modified to support  -->
<!-- external sites by coding www.aaa.com into the test -->
<!-- variable that gets written to the browser (see     -->
<!-- last couple of lines).  Use secure flag to change  -->
<!-- between http and https                             */

/* Script updated - FP 02/24/05 fpernicano@national.aaa.com */

var theURL=window.location.href;   
var pos=theURL.indexOf('?');   
var inputString = '***'; 
var club;   
var assoc;
var secure = 'N';

function appendPara(URL){
var goTo = URL + "?association="+ window.assoc + "&clb_id=" + window.club + "&secure=" + window.secure;
document.location.href=goTo;
}



if(pos!=-1) {
             //inputString is "var1=12"
    inputString=theURL.substr(pos+1, theURL.length);
}
pos=inputString.indexOf('clb_id=');
if(pos!=-1) {
             //para is "12"
     club=inputString.substr(pos+7, 3);
}
pos=inputString.indexOf('association=');
if(pos!=-1) {
             //para is "12"
     assoc=inputString.substr(pos+12, 3);
}
pos=inputString.indexOf('secure=');
if(pos!=-1) {
             //para is "12"
     secure=inputString.substr(pos+7, 1);
}
var test = "<script language=JavaScript src=/scripts/WebObjects.dll/AAAOnline.woa/wa/StyleSheet/getServicesStyleSheet?clb_id=" + club + "&association=" + assoc + "&secure=" + secure +">";
document.write(test);
document.write('<\/SCRIPT>');

