function CreateXMLHttp()
{
	xmlhttp = false;

	try
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e)
	{
		try
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (E)
		{
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined')
	{
		try
		{
			xmlhttp = new XMLHttpRequest();
		}
		catch (e)
		{
			xmlhttp=false;
		}
	}
	if (!xmlhttp && window.createRequest)
	{
		try
		{
			xmlhttp = window.createRequest();
		}
		catch (e)
		{
			xmlhttp=false;
		}
	}
	return xmlhttp;
}

function UpdateContent(sContent, sTargetDiv)
{
	var oDiv = document.getElementById(sTargetDiv);
	oDiv.innerHTML = sContent;
}

function EraseOptions(sFormField)
{
	if (sFormField.options)
	{
		for(i = sFormField.options.length-1; i >= 0; --i)
		{
			sFormField.options[i]=null;
		}
	}
}

function Show(sRow)
{
	var oRow = document.getElementById(sRow);

	try
	{
	  oRow.style.display="table-row";
	}
	catch(e)
	{
	  oRow.style.display = "block";
	}
}

function ShowTable(sTable)
{
	var oTable = document.getElementById(sTable);

	try
	{
	  oTable.style.display="table";
	}
	catch(e)
	{
	  oTable.style.display = "block";
	}
}

function Hide(sRow)
{
	var oRow = document.getElementById(sRow);
	oRow.style.display="none";
}

Array.prototype.inArray = function (value)
// Returns true if the passed value is found in the
// array.  Returns false if it is not.
{
	var i;
	for (i=0; i < this.length; ++i) 
	{
		if (this[i] == value)
		{
			return true;
		}
	}
	return false;
};