
var ColorPBG = "#CC0000";
var ColorPBGOnSet = "#ffffff";
var ColorPBGOnSetNN = "#ff9933";
var ColorPBGFont = "#ffffff";
var ColorPBGFontOnSet = "#000000";
var ColorCBG = "#CC0000";
var ColorCBGOnSet = "#000000";
var ColorCBGOnSetNN = "#000000";
var ColorCBGFont = "#ffffff";
var ColorCBGFontOnSet = "#000000";


function applyColorsTo (id, backgroundColor, fontColor) {
   if (ns) {
      document.layers[id].document.bgColor = backgroundColor;
   }
   else {
      document.all[id].style.backgroundColor = backgroundColor;
      document.all[id + "a"].style.color = fontColor;
      
   }
}

function set (id) {
   if (lastParent != null) 
	     applyColorsTo (lastParent, ColorPBG, ColorPBGFont);
	
	if (ns)
	    applyColorsTo(id, ColorPBGOnSetNN, ColorPBGFontOnSet);
	else
	 	 applyColorsTo(id, ColorPBGOnSet, ColorPBGFontOnSet);	
		 lastParent = id;
}

function swapIn (id) {
	if (id == lastParent) return;
  	else
      	if(ns)
           applyColorsTo(id, ColorPBGOnSetNN, ColorPBGFontOnSet);
      	else
     		applyColorsTo(id, ColorPBGOnSet, ColorPBGFontOnSet);
  }

function swapOut (id) {
   if (id == lastParent) return;
   else
    applyColorsTo(id, ColorPBG, ColorPBGFont);
}

function cssLoad() {
   if (ns) 
      document.write('<link href="/style/ns.css" rel="stylesheet" type="text/css">');
   else 
      document.write('<link href="/style/ie.css" rel="stylesheet" type="text/css">');
}
  