function trim(s, p)
{
	if (typeof s != 'string')
		return s;

	return s.replace(p ? p : /^\s*|\s*$/g, '');
}

function stripTags(str)
{
	return str.replace(/(<([^>]*)>)/g, '');
}
