// JavaScript Document
function getElement(sElementID)
{
//alert('in getElement');

if (document.all)
	{
//		alert('document.all evaluates');
		var oReturn = document.all(sElementID)	
	} else {
		var oReturn = document.getElementById(sElementID)
	}
if (!oReturn)
	{
//		alert("Item does not have an ID: " + sElementID)
		return null
	} else {
		return oReturn
	}
}

function StrReverse(sString)
{
var RevString = ""
if (sString.length > 0)
	{
		for (i = parseInt(sString.length - 1); i > -1; i--)
			{
			cIn = sString.charAt(i)
			RevString = RevString + cIn
			}
	}
return RevString
}

function submitForm(sFormName)
{
if (sFormName != "")
	{
		oForm = getElement(sFormName)
		if (oForm != null && oForm.tagName == "FORM")
			{
				oForm.submit()
			}
	}
}

function InitDrops(sObjectName, sValue)
{
var oObject = getElement(sObjectName)
for (k=0;k<oObject.options.length;k++)
	{
	if (oObject.options[k].value == sValue)
		{
			oObject.options[k].selected = true
			break;
		}
	}
}
