/*
This javascript file is used in conjuction with Netscape layers and IE Span Tags
to manipulate the background property of the CSS...

backgroundColor = #009289 to #33CCBB	... IE
bgColor = NS

required files :: detectIE

Revision Date :: August 8 2002. Changes Made Applied to Increase Netscape Speed


*/

//var nsDOM;

function changeStyleBG(color_n, refptr){
//this function is used to change the style as described above...

	var itemArgs = changeStyleBG.arguments;
	var ieDOM;
	var parentLyr;
	var childLyr;
	var menustr;

	if (detectIE()){
	//alert(d_item);
		for(var i = 2; i < itemArgs.length; i++){
			ieDOM = ("document.all.tags('td')." + itemArgs[i] + ".style");
			//alert(document.all.tags('td').tb1.style);
			//alert (ieDOM)
			ieDOM = eval(ieDOM);
			if(ieDOM){
				//alert (ieDOM)
				ieDOM.backgroundColor = color_n;
			} else {
				//alert("null object");
			}//end condition
		}//end loop
	} else {
		if(!soy_nav6up){
				if(refptr.parentLayer.name != refptr.name){
					parentLyr = refptr.parentLayer;
					for(var i = 2; i < itemArgs.length; i++){
						childLyr = parentLyr.layers[itemArgs[i]];
						if(childLyr){
							childLyr.bgColor = color_n;
						} else {
							if((itemArgs[i].indexOf("tb") != -1)){
								if(document.layers['toolbar'].layers[itemArgs[i]]){
								document.layers['toolbar'].layers[itemArgs[i]].bgColor = color_n;
								}//
							} else {
								//alert(itemArgs[i].substring(1, 3));
								menustr = "menu" + itemArgs[i].substr(1, 2);
								//alert("should open menu " + menustr);
								if(document.layers[menustr].layers[itemArgs[i]]){
								document.layers[menustr].layers[itemArgs[i]].bgColor = color_n;
								}//end condition
							}//end condition
						}//end condition
					}//end loop
				}//end condition
	} else { //end condition for Netscape 4.7x
		//alert(refptr);
		//alert(itemArgs.length);
		//alert(refptr.style.backgroundColor);
		refptr.style.backgroundColor = color_n;
		for(var j = 2; j < itemArgs.length; j++){
			document.getElementById(itemArgs[j]).style.backgroundColor = color_n;
		}//
	} //end condtion for Netscape 6.0 and up
	//NS
	}//end if statement
}//end function