//-----------------------------------------------------------------
// Juan Carlos Hernandez
// Oct 2000 
// String Prototype
// 	- adds a method called Trim to the String object this method calls LTrim and RTrim
//-----------------------------------------------------------------

//--------------------------------------------------------
//	getVesion method - gets the current browsers full version number as Float
//--------------------------------------------------------


// trims chars from the left.
function LTrim( sValue )	
{
	var tempValue = new Array();
	for(var i = 0; i < sValue.length; i++)
	if(sValue.charAt(i) == ' ')
	continue;
	else	{
	tempValue = sValue.substr(i, sValue.length);
	break;
}
sValue = tempValue;
return(sValue);
}
	
	
// trims chars from the right..
function RTrim( sValue )	
{	
	var tempValue = new Array();
	for(var i = sValue.length-1; i >= 0; i--)
		if(sValue.charAt(i) == ' ')
			continue;
		else	{
			tempValue = sValue.substr(0, i+1);
			break;							
		}
		sValue = tempValue;
		return(sValue);
}

// 

function Trim(sValue)
{
	sValue = RTrim(sValue);
	sValue = LTrim(sValue);
	return(sValue);
}

//String.prototype.Trim = Trim;

