// JavaScript Document

function flipEnabledFields()
{
	var i, a=flipEnabledFields.arguments; 
	for(i=0; i<a.length; i++)
	{
		if (a[i].indexOf("#")!=0)
		{ 	
			theField = document.getElementById(a[i]);
			if(theField.disabled) 
				theField.disabled = false; // flip the enabled
			else
				theField.disabled = true;
		}
	}
}

/* function that is called from the checkbox onclick handler
 * to show a target Div when checked
 * passed the checkbox item itself and the id of the element to show/hide
 */
function showHideWithCheckbox(checkboxItem, targetID)
{
	checked = checkboxItem.value;
	targetItem = document.getElementById(targetID);
	if(checked == 'on')
	{
		targetItem.style.display = "block";
	}
	else
	{
		targetItem.style.display = "none";
	}
}