function getStyleObject(objectId) {

	if(document.getElementById && document.getElementById(objectId)) {

		return document.getElementById(objectId).style;

	} else if (document.all && document.all(objectId)) {

		return document.all(objectId).style;

	} else if (document.layers && document.layers[objectId]) {

		return document.layers[objectId];

	} else {

		return false;

	}

}



function changeObjectVisibility(objectId, newVisibility) {

	var styleObject = getStyleObject(objectId);

	if (styleObject) {

		styleObject.visibility = newVisibility;

		styleObject.display = ((styleObject.visibility == 'hidden') ? "none" : "");

		return true;

	} else {

		return false;

	}

}



function changeTextVisibility(objectId) {

	var styleObject = getStyleObject(objectId);

	if (styleObject) {

		styleObject.visibility = ((styleObject.visibility == 'hidden') ? "visible" : "hidden");

		document.images[objectId + "a"].src = ((styleObject.visibility == 'hidden') ? "../collapse.gif" : "../expand.gif");

		styleObject.display = ((styleObject.visibility == 'hidden') ? "none" : "");

		return true;

	} else {

		return false;

	}

}



function hideAll() {

	for(i = 1; i < pubMax; i++) {

		changeObjectVisibility("pubField" + i,"hidden");

	}

}



function showCurrent(objectNum) {

	for(i = 0; i < pubMax; i++) {

		if(objectNum == i) {

			changeObjectVisibility("pubField" + i,"visible");

			currentObj=i;

		} else

			changeObjectVisibility("pubField" + i,"hidden");

	}

}



function showCurrentNew(objectNum) {

	if(currentObj==objectNum) return;

	document.getElementById("pubField").innerHTML = "<br /><b style='color:#050'>Loading. Please Wait...</b><p />";

	window.frames[0].document.location.href = "pubs/" + pubList[objectNum] + ".shtml";

	currentObj=objectNum;

}



function printView() {

	var pubShow = "pubs/" + pubList[currentObj] + ".shtml" ;

	compwindow(pubShow);

}



function shrinkPubs() {

	pubDiv = document.getElementById("collapsePubs");

	pubDiv.style.overflow = (pubDiv.style.overflow=="auto"?"visible":"auto");

	pubDiv.style.height = (pubDiv.style.overflow=="auto"?"44px":"");

	document.images["colPubs"].src = (pubDiv.style.overflow=="auto"?"../collapse.gif" : "../expand.gif");

}

