function swapDivDisplay(objectId) {
	var styleObject = getStyleObject(objectId);
	if (styleObject.display == "none") {
		return changeObjectVisibility(objectId, "visible");
	} else {
		return changeObjectVisibility(objectId, "hidden");
	}
}

function getStyleObject(objectId) {
	// checkW3C DOM, then MSIE 4, then NN 4.
	//
	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) {
	// first get a reference to the cross-browser style object 
	// and make sure the object exists
	var styleObject = getStyleObject(objectId);
	if (newVisibility == 'hidden') {
		newVisibility = "none";
	} else {
		newVisibility = "block";
	}
	if (styleObject) {
		styleObject.display = newVisibility;
		return true;
	} else {
		// we couldn't find the object, so we can't change its visibility
		return false;
	}
}

function showObj(objectId) {
	return changeObjectVisibility(objectId, 'visible');
}

function hideObj(objectId) {
	return changeObjectVisibility(objectId, 'hidden');
}
