String.prototype.trim = function()
{
	return this.replace(/^\s+|\s+$/g, "");
}

String.prototype.is_numeric = function()
{
   return (((this - 0) == this) && (this.length > 0));
}

Array.prototype.in_array = function(value)
{
	// go through array values
	for (i = 0, array_length = this.length; i < array_length; i++)
	{
		// check if value is present
		if (this[i] == value)
		{
			return true;
		}
	}
	
	return false;
}
