// --------------------------------------------------
// str_trim & change_quotes prototypes realization
// 0.03	(30.07.2003 15:41:24)
//			x* rewritten change_quotes() to work even with ie5
// 0.02	(05.05.2003 12:52:35)
//			x* change_quotes() changed (RE)
// 0.01	(15.12.2002 16:39:31)
// --------------------------------------------------
function str_trim() {
	s=this.toString()
	if (s==" ") return "";

	re=/^\s+/gi;
	s1 = s.replace(re,"")
	re=/\s+$/gi;
	s1 = s1.replace(re,"")
	
	if (s1==" ") return "";
	
	return s1
} // str_trim()

// --------------------------------------------------
// change_quotes()
// 22.04.2003 18:16:44
// --------------------------------------------------
function change_quotes() {
	// ie doesn't recognize ? in .*?
	// and i don't know why
	var re = /"(.*)"($|[\,\;\:\.\-\s\<\(\)\!=]+)/i;
	
	s=this.toString()
	s=s.trim()
	if (s=="") return ""
	
	if (s.search(re)!=-1) {
		s1 = s.replace(re,"&laquo;"+"$1"+"&raquo;"+"$2")
		return s1
	}
	else return s
} // change_quotes()

String.prototype.trim=str_trim
String.prototype.quotes=change_quotes
