 function isBlankTxt(tmp_str_s)
 {
     /* Name		: isBlankTxt						 */
     /* Purpose		: To validate textbox or textarea. 			 */
     /* Inputs		: tmp_str_s => contents of textbox or textarea.			 */
     /* Outputs		: returns false if s is empty, true otherwise		 */
     /* Calls		: None							 */
     /* Called By	: client.js 						 */

     for(var i = 0; i < tmp_str_s.length; i++)
     {
         var tmp_char_ch = tmp_str_s.charAt(i);
         if ((tmp_char_ch != ' ') && (tmp_char_ch != '\n') &&(tmp_char_ch != '\r') && (tmp_char_ch != '\t'))
         {
 		return false;
 	}
     }
     return true;
}

function Trim(TRIM_VALUE)
{
  if(TRIM_VALUE.length < 1)
  {
	return "";
  }

  TRIM_VALUE = RTrim(TRIM_VALUE);
  TRIM_VALUE = LTrim(TRIM_VALUE);

  if(TRIM_VALUE=="")
  {
	return "";
  }
  else
  {
	return TRIM_VALUE;
  }
} //End Function

function RTrim(VALUE)
{
  var w_space = String.fromCharCode(32);
  var v_length = VALUE.length;
  var strTemp = "";
  if(v_length < 0)
  {
	return "";
  }

  var iTemp = v_length -1;

  while(iTemp > -1)
  {
	if(VALUE.charAt(iTemp) == w_space)
	{
	}
	else
	{
		strTemp = VALUE.substring(0,iTemp +1);
		break;
	}

	iTemp = iTemp-1;

  } //End While

  return strTemp;

} //End Function


function LTrim(VALUE)
{
   var w_space = String.fromCharCode(32);

   if(v_length < 1)
   {
	return"";
   }

   var v_length = VALUE.length;
   var strTemp = "";
   var iTemp = 0;

   while(iTemp < v_length)
   {
	if(VALUE.charAt(iTemp) == w_space)
	{
	}
	else
	{
		strTemp = VALUE.substring(iTemp,v_length);
		break;
	}

	iTemp = iTemp + 1;

   } //End While

   return strTemp;

} //End Function
