function hideFormExample(object, defaultText) {
	var thisInput = object;
	if(thisInput.value == defaultText) { thisInput.value = ""; }
}
function showFormExample(object, defaultText) {
	var thisInput = object;
	if(thisInput.value == "") { thisInput.value = defaultText; }
}

// Hide or show elements on a page
// nodeIds - ID of one or more (separated by "|") elements on a page
// visTo - takes a value of 0 or 1 to set visibility as either none or block (by default)
// visType (optional) - allows override of default block visibility type for other options (e.g. inline, table-row-group, etc.)
function hide_show(nodeIds, visTo, visType)
{
	var nodeIdArr = nodeIds.split("|");
	
	for(i=0; i<nodeIdArr.length; i++) {
		var nodeId = nodeIdArr[i];
		var thisNode = $(nodeId);
		
		// check for node's current visibility
		if(visTo == 1) {
			if(visType) {
				if( (visType == "table-row-group" || visType == "table-row") && document.all ) visType = "block";
				thisNode.style.display = visType;
			} else {
				thisNode.style.display = "block";
			}
		} else if(visTo == 0) {
			thisNode.style.display = "none";
		} else { // find node current vis and assume the opposite
			var currVis = thisNode.style.display;
			
			if(currVis) {
				if(currVis == "none")
					thisNode.style.display = ( visType ? visType : "block" );
				else
					thisNode.style.display = "none";
			} else if(thisNode.className == "no_show") {
				thisNode.style.display = ( visType ? visType : "block" );
			} else { // assume element starts as visible
				thisNode.style.display = "none";
			}
		}
	}
}

function swap_expand_icons(clicked_header) {
	var curr_class = clicked_header.className;

	if( curr_class == "expandable")
		var new_class = "contractable";
	else
		var new_class = "expandable";

	clicked_header.className = new_class;
}