String.prototype.extractNumbers = function(returnType)
{
	
	var i, l = this.length, t = isNaN(returnType), r = "";
	
	for (i=0; i<l; i++) 
		if (isNaN(this.charAt(i)) == t) 
			r += this.charAt(i);

	return r;
}