function Trim(v){
	var x = v
	var test = v.toString().toLowerCase()
	if(test.indexOf("object") == 1){
		x = v.value
	}
	while(x.charAt(0) == " "){
		x = x.substr(1,x.length - 1)
	}
	while(x.charAt(x.length - 1) == " "){
		x = x.substr(0,x.length-1)
	}
	if(test.indexOf("object") == 1){
		v.value = x
	} else {
		return x
	}
}