var navBarImg;

 var defaultColors = 'TT=336633~MB=ffffff~ST=336633~SB=ffffcc~CT=336633~FB=ffffcc~FT=ce9c00~NB=336633~NM=ce9c00~NR=FFCC33~NL=navbar_blue.jpg';

function getColorCookie() {
  var dc = document.cookie;
  
  var prefix = "Palette=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) {
//      document.cookie="COLOR="+defaultColors+";";
      return defaultColors;
    }
  } else begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1) end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function validateColors( strColors )
{


 if (strColors.indexOf ("~NL=" ) == 99 ) 
 	return true;
 else 
 	return false;
}	

var colorCookie=getColorCookie();


if (!validateColors( colorCookie ) )
	colorCookie = defaultColors;

var colorCodes=colorCookie.split("~");
var colors=new Array();
for (var i=0; i<colorCodes.length; ++i)
{
  var delim=colorCodes[i].indexOf("=");
  var colorKey=colorCodes[i].substring(0,delim);
  var colorVal=colorCodes[i].substring(delim+1,colorCodes[i].length);
  colors[colorKey]="#"+colorVal;
}

navBarImg = colors["NL"];

var styleStr;

styleStr='<style type="text/css">';
styleStr+='BODY{background-color: white; margin: 0px; margin-top: 0px; margin-left: 0px; padding: 0px;}';
styleStr+='A:link               { color: #336633; }';
styleStr+='A:visited            { color: #003131; }';
styleStr+='A:active             { color: #CCCCCC; }';
styleStr+='.MOTD                { font-family: ; font-size: ; color: #336633; }';
styleStr+='.SYSD                { font-family: ; font-size: 16pt; color: #003131; font-weight: bold; }';
styleStr+='.minusText           { color: #CCCCCC; }';
styleStr+='.plainText           { text-decoration: none; }';
styleStr+='.mainBackground      { background-color: #FFFFFF; }';
styleStr+='.titleBarBackground  { background-color: #FFFFFF; }';
styleStr+='.dataBackground      { background-color: #FFFFFF; }';
styleStr+='.altDataText { font-family:arial; font-size:8pt; color: #666666; }';

styleStr+='.dataText { font-family:arial; font-size: 8pt; color: #666666; border-top-color: #666666; }';


styleStr+='.dropDown { font-family:arial;font-size: 8pt;color: #666666;border-top-color: #666666; }';


styleStr+='.dataText2 	{ font-family:arial; font-size: 8pt; color: #ffffff; border-top-color: #666666;';
styleStr+='border-left-color: #666666; border-right-color: #666666; border-bottom-color: #666666;';
styleStr+=' border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; 	border-right-width: 1px;';
styleStr+='}';

styleStr+='.titleBarText {';
styleStr+='color:#CE9C00; font-family: Arial; font-size: 12pt;font-weight: bold; ';
styleStr+='}';

styleStr+='.DTMBackground { background-color: '+colors["MB"]+'; }';
styleStr+='.DTMText { font-family: arial; font-size:10pt; color: '+colors["ST"]+'; font-weight: bold;}'; 

styleStr+='.columnHeadingBackground {';
styleStr+='background-color:#336633;';
styleStr+='}';

styleStr+='.columnHeadingText {';
styleStr+='color:#ffffcc; font-family: Arial; font-size: 8pt; ';
styleStr+='}';

styleStr+='.noActivityBackground {';
styleStr+='background-color:#FFFFCC;';
styleStr+='}';

styleStr+='.noActivityText {';
styleStr+='color:#CE9C00; font-family: Arial; font-size: 8pt;font-weight: bold; ';
styleStr+='}';

styleStr+='.altDataBackground {';
styleStr+='background-color:'+colors["MB"]+';';
styleStr+='}';

styleStr+='.footerBackground {';
styleStr+='background-color:'+colors["FB"]+';';
styleStr+='}';

styleStr+='.footerText {';
styleStr+='color:'+colors["FT"]+'; font-family: Arial; font-size: 8pt; ';
styleStr+='}';

styleStr+='.sectionTitleBackground {';
styleStr+='background-color:#FFFFCC; Arial: sans-serif; font-size: 8pt; ';
styleStr+='}';

styleStr+='.sectionTitleText {';
styleStr+='color:'+colors["ST"]+'; font-family: Arial; font-size: 8pt; font-weight: bold;';
styleStr+='}';


/*Styles for menu contorl*/
styleStr+='.menuColorsBar {position:absolute; width:10; height:10; background-color:#336633;';
styleStr+=' layer-background-color:#336633; visibility:hidden}';

styleStr+='.menuColors,.menuColorsover{position:absolute; padding:2px; font-family:arial; font-size:11px; font-weight:bold}';

styleStr+='.menuColors {background-color:#336633;';
styleStr+='layer-background-color:#336633; color:FFFFCC;}';


styleStr+='.menuColorsover {background-color:FFFFCC;';
styleStr+='layer-background-color:#FFFfcc; color:#336633; cursor:pointer; cursor:hand; }';

styleStr+='.menuColorsborder {position:absolute; visibility:hidden;';
styleStr+=' background-color:#FFFFCC; layer-background-color:#FFFFCC}';


/* CoolMenus 4 - default styles - do not edit */
styleStr+='.clCMEvent{position:absolute; width:99%; height:99%; background-color:red; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible}';

styleStr+='.clCMAbs{position:absolute; visibility:hidden; left:0; top:0}';
styleStr+='.menuColorsSub,.menuColorsSubsover{position:absolute; padding:2px; font-family:arial; font-size:10px; font-weight:bold}';


/* image replacement and check for NS 4 for no display */
function BrowserInfo() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns    = ((agent.indexOf('mozilla') != -1) &&
                (agent.indexOf('spoofer') == -1) &&
                (agent.indexOf('compatible') == -1) &&
                (agent.indexOf('opera') == -1) &&
                (agent.indexOf('webtv') == -1));
  this.ns4   = (this.ns && (this.major == 4));
  this.ns6   = (this.ns && (this.major >= 5));
  this.ie    = ((agent.indexOf("msie") != -1) &&
                (agent.indexOf("opera") == -1));
  this.ie3   = (this.ie && (this.major < 4));
  this.ie4   = (this.ie && (this.major >= 4));
  this.ie5   = (this.ie && (this.major ==  4) &&
                (agent.indexOf("msie 5.0") != -1));
  this.ie6   = (this.ie && (this.major == 4) &&
                (agent.indexOf("msie 6.") != -1));
  this.ieX   = (this.ie && !this.ie3 && !this.ie4);
}

var browserInfo = new BrowserInfo();

if (browserInfo.ns4) {	
styleStr+='#logoback {display:none;}';
styleStr+='#logoback a {display:none;}';
styleStr+='#logoback a:link, #logoback a:visited, #logoback a:hover, #logoback a:active {display:none;}';
	}

else {
styleStr+='#logoback {width: 650px;height: 87px;margin: 0;padding: 0;overflow: hidden;background: url(images/frb_logo_white.gif) top left no-repeat; position: relative;}';
styleStr+='#logoback a {position: aboslute; top: 0; left: 0;Z-INDEX:0;display: block;width: 650px;font-size: 9px;margin: 0;padding: 87px 0 0 0; /* padding causes gap */overflow: hidden;height: 0px !important;height /**/:87px; /* for IE5/Win */}';
styleStr+='#logoback a:link, #logoback a:visited, #logoback a:hover, #logoback a:active {background: none;}';
}

styleStr+='</style>';

document.write(styleStr);