//April 4, 2006

//*******************************************************************************'
//is there text in the textbox?
//return true or false
//requires ../format/trim.js

function textInTextbox(elementObj) //as Boolean
{
	//make sure the element is of the right object type
	if
	(
		elementObj.type == "text" || 
		elementObj.type == "textbox" || 
		elementObj.type == "textarea" || 
		elementObj.type == "hidden" || 
		elementObj.type == "password" || 
		elementObj.type == "file"
	)
	{
	
		//save the passed value
		var txtValue = elementObj.value;
		
		//trim the value of leading and trailing spaces
		//from trim.js
		txtValue = Trim(txtValue)
		
		//if after trimming the length = 0...
		if (txtValue.length < 1)
		{
			//the textbox is empty
			return false;
		}
		else
		{
			//there is valid text present
			return true;
		}
		
	}
	else
	//wrong element type
	{
		return false;
	}
	
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version

function textintextbox(elementObj) //as Boolean
{
	return textInTextbox(elementObj)
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version

function TextInTextbox(elementObj) //as Boolean
{
	return textInTextbox(elementObj)
}
