document.write(
"<div id='busyDiv' style='{ display:none; position:absolute; top:0px; left:0px; z-index:100; width:100%; height:100%; background-color:blue; filter:alpha(opacity=1); cursor:wait; }'>" +
"&#160;</div>"
);

function enableBusyDiv(divID, hideSelects, disableSelects)
{
	// Warning: Hiding select controls will prevent them from being posted
	if (hideSelects || disableSelects)
	{
		var selects = document.all.tags("select");
		for(var s in selects)
		{
			if (hideSelects && selects[s].style)
				selects[s].style.display = 'none';
			selects[s].disabled = true;
		}
	}
	var busyDiv = document.all[(divID ? divID : "busyDiv")];
	if (busyDiv.length) // Found more than one!
		busyDiv = busyDiv[busyDiv.length-1];
	if (busyDiv)
		busyDiv.style.display = "block";
	return true;
}

function disableBusyDiv(divID, showSelects, enableSelects)
{
	if (showSelects || enableSelects)
	{
		var selects = document.all.tags("select");
		for(var s in selects)
		{
			if (showSelects && selects[s].style)
				selects[s].style.display = 'inline';
			selects[s].disabled = false;
		}
	}
	var busyDiv = document.all[(divID ? divID : "busyDiv")];
	if (busyDiv.length) // Found more than one!
		busyDiv = busyDiv[busyDiv.length-1];
	if (busyDiv)
		busyDiv.style.display = "none";
	return true;
}
