
var navBarImg;

 var defaultColors = 'TT=FFD581~MB=F5F5F5~ST=1C4680~SB=B9D1DD~CT=1C4682~FB=C9C9C9~FT=343434~NB=164480~NM=FFFFFF~NR=6B88B0~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: blue; }';
styleStr+='A:visited            { color: blue; }';
styleStr+='A:active             { color: #CCCCCC; }';
styleStr+='.MOTD                { font-family: ; font-size: ; color: #990000; }';
styleStr+='.SYSD                { font-family: ; font-size: 16pt; color: #FF0000; font-weight: bold; }';
styleStr+='.minusText           { color: #FF0000; }';
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: #000000; }';
styleStr+='.dataText 	{ font-family:arial; font-size: 8pt; color: #000000; 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+='.red 	{ color: #f00;}';
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+='.dropDown { font-family:arial;font-size: 8pt;color: #000000;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:#104584; 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:#164480;';
styleStr+='}';

styleStr+='.columnHeadingText {';
styleStr+='color:#ffffff; font-family: Arial; font-size: 8pt; ';
styleStr+='}';

styleStr+='.noActivityBackground {';
styleStr+='background-color:#164480;';
styleStr+='}';

styleStr+='.noActivityText {';
styleStr+='color:#ffffff; 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:#bdd3de; Arial: sans-serif; font-size: 8pt; ';
styleStr+='}';

styleStr+='.sectionTitleBackground2 {';
styleStr+='background-color:#ff9900; Arial: sans-serif; font-size: 8pt; ';
styleStr+='}';

styleStr+='.sectionTitleBackground3 {';
styleStr+='background-color:#00ffff; Arial: sans-serif; font-size: 8pt; ';
styleStr+='}';

styleStr+='.sectionTitleText {';
styleStr+='color:'+colors["ST"]+'; font-family: Arial; font-size: 8pt; font-weight: bold;';
styleStr+='}';

styleStr+='.sectionTitleText2 {';
styleStr+='color:blue; font-family: Arial; font-size: 8pt; font-weight: bold;';
styleStr+='}';

styleStr+='.sectionTitleText3 {';
styleStr+='color:blue; font-family: Arial; font-size: 8pt;';
styleStr+='}';


/*Styles for menu contorl*/
styleStr+='.menuColorsBar{position:absolute; width:10; height:10; background-color:#164480;';
styleStr+=' layer-background-color:#164480; visibility:hidden}';

styleStr+='.menuColors,.menuColorsover{position:absolute; padding:2px; font-family:arial; font-size:11px; font-weight:bold}';

styleStr+='.menuColors{background-color:#164480;';
styleStr+='layer-background-color:#164480; color:FFFFFF;}';


styleStr+='.menuColorsover{background-color:FFFFFF;';
styleStr+='layer-background-color:#FFFFFF; color:#164480; cursor:pointer; cursor:hand; }';

styleStr+='.menuColorsborder{position:absolute; visibility:hidden;';
styleStr+=' background-color:#6B88B0; layer-background-color:#6B88B0}';


/* 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}';


styleStr+='</style>';


document.write(styleStr);
