function getDocumentObject(strId)
{
	var strReturnObject = document.all(strId);
	if (strReturnObject != null)
		return(strReturnObject);
		
	// Return object that may be prefixed by user control name
	var intIdCount=0;
	for (var i=0; i<document.all.length; i++)
	{
		var strFullId = document.all.item(i).id;
		if (strFullId != "")
		{
			if (strFullId.indexOf(strId) > -1)
			{
				intIdCount++;
				strReturnObject = document.all.item(i);
				break;
			}
		}	
	}
	
	if (intIdCount == 0)
		alert("Cannot find " + strId);
		
	if (intIdCount > 1)
		alert("Found " + intIdCount + " " + strId);
		
	return(strReturnObject);
}

function isDate(source, args)
{
	var date = new Date(args.Value);
	args.IsValid = !isNaN(date);
}

function isNumeric(source, args)
{
	args.IsValid = !isNaN(args.Value);
}