// Herald Options Box JS

var timers = new Object();

function optionToggle(boxId)
{
	var optionBox = document.getElementById(boxId + "Options");
	var container = document.getElementById("server");
	
	if(optionBox.style.display == "block")
	{
		optionBox.style.display = "none";
	}
	else
	{
		optionBox.style.display = "block";
		optionBox.style.zIndex = 5;
	}
}

function optionOff(boxId)
{
	var optionBox = document.getElementById(boxId + "Options");
	
	optionBox.style.display = "none";
}

function optionOn(boxId)
{
	var optionBox = document.getElementById(boxId + "Options");
	
	optionBox.style.display = "block";
}

function optionSelected(boxId,optionValue,optionText)
{
	var optionLabel = document.getElementById(boxId + "Label");
	var optionBox = document.getElementById(boxId + "Options");

	optionLabel.innerHTML = "";
	optionLabel.innerHTML = optionText;
}

function optionBlur(boxId)
{
	timers[boxId] = setTimeout("optionOff('"+boxId+"')", 250);	
}

function optionFocus(boxId)
{
	clearTimeout(timers[boxId]);
}
