function GetElement(elementID)
{
	var element2;
	if (document.getElementById)
	{
		// this is the way the standards work
		element2 = document.getElementById(elementID);
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		element2 = document.all[elementID];
	}
	else if (document.layers)
	{
		//	gr: err wont work
		// this is the way nn4 works
		element2 = document.layers[elementID];
	}
	return element2;
}
			
function SetDivDisplay(divID,Display,ZOrder,ParentBg)
{
    var style2;
	var div2;
	div2 = GetElement(divID);
    style2 = div2.style;
   	style2.display = Display;
	style2.zIndex = ZOrder;

	var ParentDiv = div2.parentNode;
	var ParentStyle = ParentDiv.style;
	//	ParentStyle.zIndex = ZOrder;
	ParentStyle.background = ParentBg;
}
   			
function ShowDiv(divID)
{
	SetDivDisplay(divID,"block",11,"#c88");
}

function HideDiv(divID)
{
	SetDivDisplay(divID,"none",10,"#fff");
}

function ToggleDiv(divID)
{
   	/*
  		var style2;
		var div2;
			div2 = GetElement(divID);
    		style2 = div2.style;
    		
    		if ( style2.display == "block" )
    			style2.display = "none";
    		else
    			style2.display = "block";
    	*/		
   		}

function ToggleDivClass(divID,ClassA,ClassB)
{
    	/*
 			var div2;
			div2 = GetElement(divID);
   	
 	   		if ( div2.class == ClassA )
    			div2.class = ClassB;
    		else
    			div2.class = ClassA;
    	*/
}

function SwapCategory(imgdiv,adiv,NewImg,NewUrl)
{
	var img2;
	img2 = GetElement(imgdiv);
	img2.src = NewImg;

  	var a2;
   	a2 = GetElement(adiv);
   	a2.href = NewUrl;
}

