var pathwayContent = "";

// Decide browser version
var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;
var isMac=(navigator.userAgent.indexOf("Mac")!=-1);

// Microsoft Stupidity Check(tm).
if (ie4) {
	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
		ie5 = true;
	}
	if (ns6) {
		ns6 = false;
	}
}

function layerWrite(lyr, txt) {
	txt += "\n";
	//alert(lyr.id + " " + txt);
	if (ns4) {
		lyr = lyr.document;
		lyr.write(txt)
		lyr.close()
	} else if (ie4) {
		lyr.innerHTML = txt
	} else if (ns6) {
		range = document.createRange();
		range.setStartBefore(lyr);
		domfrag = range.createContextualFragment(txt);
		while (lyr.hasChildNodes()) {
			lyr.removeChild(lyr.lastChild);
		}
		lyr.appendChild(domfrag);
	}
}

function setPathway( txt )
{
	obj = document.getElementById('pathway');
	if( obj )
	{
		pathwayContent = txt;
		layerWrite(obj, pathwayContent);
	}
}

function appendPathway( txt )
{
	obj = document.getElementById('pathway');
	if( obj && txt )
	{
		if( pathwayContent && txt )
			pathwayContent += " / " + txt;
		else
			pathwayContent = txt;
		layerWrite(obj, pathwayContent );
	}
}