
function ltrim(str) 
{ 
var _str = " "+str; 
var re = /[ ]+([\w|\W]*)/gi; 
_str.match(re); 
return RegExp.$1; 
} 

function rtrim(str) 
{ 
var _str = str+" "; 
var re = /([\w|\W]*[^ ])[ ]+/gi; 
_str.match(re); 
return RegExp.$1; 
}
function ignoreSpaces(string) {
var temp = "";
string = '' + rtrim(ltrim(string));
//splitstring = string.split(" "); //双引号之间是个空格； 
//for(i = 0; i < splitstring.length; i++)
//temp += splitstring[i];
temp=string
//alert(temp);
return temp;
}

function TextareaSize(obj)
{
	
	if (obj.style.posHeight<300)
	{
	 if (obj.scrollHeight>obj.style.posHeight)
	 {
		obj.style.posHeight=obj.scrollHeight+4;
	 }
	}
}
