function NCS_NumOnly(){
 if ((isNaN(String.fromCharCode(event.keyCode)))&&(event.keyCode!=8))
    event.returnValue=false
}

String.prototype.trim = function() {
  var x=this;
  x=x.replace(/^\s*(.*)/, "$1");
  x=x.replace(/(.*?)\s*$/, "$1");
  return x;
}