<!--
// [This is Part 1 of 2 of the Larger Chunks of Script]
// Newton's Divided Difference (JavaScript Edition)
// by Michael Yan (meyan@ucla.edu or meyan@yahoo.com)
// version 0.8 OFFICIAL RELEASE
// Project Start: May 10, 1999
// -----------------------------------------------------
// This program does a Newton's Divided Difference.
// However, unlike others, it puts it in a pretty table
// for easy printing and viewing.
// Utilizing dynamic arrays and forms, this is
// fully expandable only to the limits of JavaScript,
// the browser, and the hardware of the computer.
// -----------------------------------------------------

var xs = 0;

function setupTable() {
   if ( document.init.xsin.value > 150 ) {
      window.alert('SORRY!  This program cannot allow you to do more than 150 entries.  Although it is possible and the program capable, it is far too risky to put your computer data at risk of a crash.');
   }
   else if ( document.init.xsin.value > 50 ) {
      window.alert('WARNING!  Processing more than 50 entries may take a significant amount of time.  Be aware that if your computer does not respond, it is either too busy doing the calculations or has crashed.');
   }

   if ( document.init.xsin.value < 1 ) {
      window.alert('SORRY!  We cannot have blank, zero, or negative numbers of entries.');
      startOver();
   }

   else {
   var temp = 0;
   temp = document.init.xsin.value;
   xs = parseInt(temp);

   parent.two.location.href="two.html";
   }
}

// -->