function not_empty(v) {
	if(v==null) return false; 
   	v+="";
   	return (v.length>0)&&(v!="undefined");
} 

function ltrim(str) {
	if(str)	return str.replace(/^\s+/, "");
	return null;
}

function rtrim(str) {
	if(str) return str.replace(/\s+$/, "");
	return null;
}
 
function trim(str) {
	if(str) return ltrim(rtrim(str));
	return null;
} 
