//常用函数

String.prototype.trim = function() {
	var str = this;
	str = str.replace(/(^[\s　]*)|([\s　]*$)/g, "");;
	return str;
};

String.prototype.replaceAll = function(oldSubStr, newSubStr) {
	var str = this;
	if (oldSubStr=="") {
		return str;
	}
	str = str.replace(oldSubStr, newSubStr);
	if(str.indexOf(oldSubStr)!=-1) str = str.replaceAll(oldSubStr, newSubStr);
	return str;
};
