// JavaScript Document
String.prototype.trim = function() {

 // skip leading and trailing whitespace
 // and return everything in between
  var x=this;
  x=x.replace(/^\s*(.*)/, "$1");
  x=x.replace(/(.*?)\s*$/, "$1");
  return x;
}
function isEmpty(checkThis)
{
	checkThis = checkThis.trim();
	if (checkThis == '' || checkThis == null) 
	{
		return true;
	}
}

function intOnly(i) {
	if(i.value.length>0) {
		i.value = i.value.replace(/[^\d]+/g, ''); 
	}
}