function showHide(theDiv, theDisplay) {
    document.getElementById(theDiv).style.display = theDisplay;
}

function updateFieldValue(fieldId, fieldValue) {
    //alert(fieldId);
    //alert(fieldValue);
    document.getElementById(fieldId).value = fieldValue;
    if ( (fieldId == "positionId") && ( (fieldValue != "") && (fieldValue == 0) ) ) {
	showHide("otherPositionDiv", "block");
    } else if ( (fieldId == "positionId") && ( ((fieldValue != "") && (fieldValue > 0)) || (fieldValue == "") ) ) {
	showHide("otherPositionDiv", "none");
    	document.getElementById("otherPosition").value = "";
    }
}

function closeAll(curDiv) {
    var divToClose = "";
    for (var i = 0; i < divList.length; i++) {
	divToClose = divList[i];
	if (divToClose != curDiv) {
            document.getElementById(divToClose).style.display = "none";
	}
    }
}

function expCol(theDiv) {
    var myDisplay = document.getElementById(theDiv).style.display;

    if (myDisplay == "block") { 
	document.getElementById(theDiv).style.display = "none";
    } else {
	document.getElementById(theDiv).style.display = "block";
    }
}
