﻿// JScript File

//this function written by Simon Willison
//found on http://www.webreference.com/programming/javascript/onloads/
//this is a GREAT function!
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

//addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
//addLoadEvent(function() {
//  /* more code to run on page load */
//});

function disableSubmit(theButton)
{
    theButton.diabled = true;
    theButton.value = 'System is processing... Please wait...';
}


function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }