var isNav4, isNav6, isIE4;

function setBrowser()
{
    if (navigator.appVersion.charAt(0) == "4")
    {
        if (navigator.appName.indexOf("Explorer") >= 0)
        {
            isIE4 = true;
        }
        else
        {
            isNav4 = true;
        }
    }
    else if (navigator.appVersion.charAt(0) > "4")
    {
        isNav6 = true;
    }
}

function setIdProperty( id, property, value )
{
    if (isNav6)
    {
        var styleObject = document.getElementById( id );
        if (styleObject != null)
        {
            styleObject = styleObject.style;
            styleObject[ property ] = value;
        }
    }
    else if (isNav4)
    {
        document[id][property] = value;
    }
    else if (isIE4)
    {
         document.all[id].style[property] = value;
    }
}

function swap(divNum, expanding){
	if (expanding){
		setIdProperty("c" + divNum, "display", "none");
		setIdProperty("e" + divNum, "display", "inline");
	}else{
		setIdProperty("e" + divNum, "display", "none");
		setIdProperty("c" + divNum, "display", "inline");
	}
}
		
setBrowser();
