function supportDHTML()
{
	if(document.getElementById)
		return true;

	if(document.all)
		return true;

	return false;
}

function findElement(id)
{
	// If the standard function is available we use it
	if(document.getElementById)
		return document.getElementById(id);

	// IExplorer 4?
	if(document.all)
		return document.all[id];

	// Very old browser. We do this so that object.style keeps
	// working (but wihout doing anything)
	return { style: {} };
}

function findElements(id)
{
	// If the standard function is available we use it
	if(document.getElementsByName)
		return document.getElementsByName(id);

	// IExplorer 4?
	if(document.all)
		return document.all[id];

	// Very old browser. We do this so that Array keeps
	// working (but wihout doing anything)
	return new Array();
}

function displayElement(obj, display)
{
	if(display)
	{
		obj.style.display = "";
	}
	else
	{
		obj.style.display = "none";
	}
}

function displayElements(objs, display)
{
	for(var i=0; i<objs.length; i++)
	{
		if(display)
		{
			objs[i].style.display = "";
		}
		else
		{
			objs[i].style.display = "none";
		}
	}
}

function isElementDisplayed(obj)
{
	return (obj.style.display == "");
}

function switchElementDisplay(obj)
{
  displayElement(obj, !isElementDisplayed(obj));
}
