if( navigator.appName=="Netscape" && navigator.appVersion.indexOf( "4." ) >=0 ) {
  top.NS4=true;
  top.DOM=false;
} else {
  top.NS4=false;
  top.DOM=true;
}
// shows one div, and hides all other divs with name beginning with prefix
function selectDiv(tabname) {
	writeInDiv('content', readInDiv('div_' + tabname));

	// change color of all tabs with name in "subtab_"
	for(i=0;i<document.anchors.length;i++) {
		if(document.anchors[i].name=="subtab_"+tabname) {
			document.anchors[i].className="pagesubtitle";
		} else if (document.anchors[i].name.indexOf("subtab_") >=0) {
			document.anchors[i].className="pageclickablesubtitle";
		}
	}
}
function writeInDiv(divName, text) {
	if( top.DOM ) {
		obj=window.document.getElementById(divName);;
	} else if( top.NS4 ) {
		obj=window.document.layers[divName];
	}
	if(obj) {obj.innerHTML=text;}
}
// reads div content
function readInDiv(divName) {
	if( top.DOM ) {
		return window.document.getElementById(divName).innerHTML;
	} else if( top.NS4 ) {
		return window.document.layers[divName].innerHTML;	
	}
}
