var searchBoxClear =
{
	trim: function(str, chars) 
	{
		return this.ltrim(this.rtrim(str, chars), chars);
	},
	 
	ltrim: function (str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
	},
	 
	rtrim: function (str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
	},
		
	toggleText: function ( id )
	{
		var box = document.getElementById(id);
		var text = this.trim(box.value);
		if (text == 'wyszukaj...'){ box.value='';}
		if (text == ''){ box.value='wyszukaj...';}
	}
}
