/* ### BEGIN Cookie ### */
function getCookie(name) {var cname=name+'='; var dc=document.cookie; if (dc.length>0) {begin=dc.indexOf(cname); if (begin!=-1) {begin+=cname.length; end=dc.indexOf(';',begin); if (end==-1) {end=dc.length;} return unescape(dc.substring(begin,end));}} return null;}
/* ### END Cookie ### */

/* ### BEGIN Variables ### */
styleAttb=new Array('background\:','color\:','font-size\:','font-family\:','font-style\:','font-weight\:','text-decoration\:','text-transform\:','margin\:','padding\:','border-color\:','border-width\:','border-style\:','line-height\:','text-align\:','font-variant\:','text-indent\:','width\:','height\:','letter-spacing\:','vertical-align\:','white-space\:','word-spacing\:','list-style\:');
styleSet=new Array(); styleSub=new Array();
styleEl=new Array('BODY','A\:link','A\:visited','A\:active','A\:hover','H1','H2','H3','H4','H5','H6','P','STRONG\,B','EM\,I','.alertText','HR','FORM','.Fbox','.Fcontrol','.Fbutton','OL','UL','DL','LI','DT','DD','SUP','SUB','PRE','TABLE','.tdCol','TD','.tdTitle','.tdEmpty','.tdRow','.tdOdd','.tdEven','.tdFoot','BLOCKQUOTE','#sitename','#sitemenu','#sitecontent','#sitefoot','#sitemenu A\:link','#sitemenu A\:visited','#sitemenu A\:active','#sitemenu A\:hover','#sitemenu P','#sitefoot P','#sitefoot A\:link','#sitefoot A\:visited','#sitefoot A\:active','#sitefoot A\:hover','OL OL','OL OL OL','OL OL OL OL','OL OL OL OL OL','UL UL','UL UL UL','UL UL UL UL','UL UL UL UL UL','.Ftext');
for (e=0;e<styleEl.length;e++) {styleSet[e]=new Array(styleSub[e]); styleSet[e][0]=styleEl[e]+'\{'; for (i=1;i<styleAttb.length+2;i++) styleSet[e][i]=styleAttb[i-1]; styleSet[e][styleAttb.length+1]='\}';}
styleVar=new Array(); styleVSub=new Array();
for (h=0;h<styleSet.length;h++) {styleVar[h]=new Array(styleVSub[h]); for (i=0;i<styleSet[h].length;i++) styleVar[h][i]=''; styleVar[h][0]=' ';styleVar[h][styleSet[0].length-1]=' ';}
startStyle='<STYLE TYPE="text\/css"><\!\-\-'; endStyle='\-\-\><\/STYLE>';
/* ### END Variables ### */

/* ### BEGIN Show Styles ### */
function grabValues(sourceVal) {x=y=0; z=1; tH=''; while (x<sourceVal.length) {tH=sourceVal.substring(x,sourceVal.indexOf('^',x)); tHa=tH.indexOf('|'); tHb=tH.indexOf('\:'); styleVar[tH.substring(0,tHa)*1][(tH.substring(tHa+1,tHb)*1)+1]=tH.substring(tHb+1,tH.length); z++; if (z==styleSet[0].length-1) {y++;z=1;} x=sourceVal.indexOf('^',x)+1; if (x>sourceVal.length) break;}}
styleCode=getCookie('advStyle'); if (styleCode!=null) {document.write(startStyle); grabValues(styleCode); for (m=0;m<styleSet.length;m++) {for (n=0;n<styleSet[m].length;n++) {if (styleVar[m][n]!='') document.write(styleSet[m][n]+styleVar[m][n]);}} document.write(endStyle);}
/* ### END Show Styles ### */


