//=========================
// Returns true if object is Null.
//=========================
function checkNull(objField, objValidation)
{
	var strField = new String(objField.value);
	if (isWhitespace(strField)) {
		objValidation.display = '';
		objField.focus();
		//objField.select();
		return false;
	}

	return true;
}

//=========================
// Returns true if string s is empty or whitespace characters only.
//=========================
function isWhitespace (s)

{   var i;
	var whitespace = " \t\n\r";

	// Is s empty?
	if (isEmpty(s)) return true;

	// Search through string's characters one by one
	// until we find a non-whitespace character.
	// When we do, return false; if we don't, return true.

	for (i = 0; i < s.length; i++)
	{   
	// Check that current character isn't whitespace.
	var c = s.charAt(i);

	if (whitespace.indexOf(c) == -1) return false;
	}

	// All characters are whitespace.
	return true;
}

//=========================
// Check whether string s is empty.
//=========================
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

//=========================
// isDigit : True if c is a digit
//=========================
function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

//=========================
// Return the string value as indicated
//=========================
function Mid(str, start, len)
		
	{
		// Make sure start and len are within proper bounds
		if (start < 0 || len < 0) return "";

		var iEnd, iLen = String(str).length;
		if (start + len > iLen)
			iEnd = iLen;
		else
			iEnd = start + len;

		return String(str).substring(start,iEnd);
	}

