
var Ans   = new Array;
var score;
var answerText;

for( i = 1; i <= 10; i++ ) 
{
   Ans[ i ] = 0;
}

function Engine( question, answer ) 
{
   Ans[ question ] = answer;
}

function Score()
{
   score = 0;

   for( i = 1; i <= 10; i++ ) 
   {
      score += Number( Ans[ i ] );
   }

   answerText = "<p>Your score is: " + score + "\n\n";

   if ( score < 15 )
   {
      answerText += "<p>Distance education is a suitable option for you. According to your answers, you possess the time management skills and the motivation to do well in a distance course. Computer equipment requirements are also a consideration. Please click on <a href='requirements.asp'>\"Technology Requirements\"</a> on this page. . You may also want to investigate your readiness for online learning by clicking on the \"SORT\" icon, also found on this page.</p><p><a href='http://alt.usg.edu/sort/'><img src='images/sort.jpg' border='0' /></a>";   
   }

   if ( score >= 15 && score < 21 )
   {
      answerText += "<p>Distance education may be a possibility for you. Look over your responses to questions 1, 2, 3, 6, 7, and 10. If you answered A to at least three of these questions, you may succeed in a distance class. If, after careful consideration, you would like to pursue your degree with the Georgia WebBSIT Program, click on the institution of your choice to begin the admissions process."; 
   }

   if ( score >= 21 )
   {
      answerText += "<p>Distance education may be very challenging for you at this time, based on other commitments, work or personal schedules, or your learning style. You may want to consider on-campus learning at one of the many institutions affiliated with the University System of Georgia.";
   }

   answerText += "<p><center><form><input type=submit value=' Close Window ' onClick='window.close()'></form></center>";

   NewWindow = window.open( '', '','menubar=1,resizable=1,width=400,height=400' );

   NewWindow.document.write( answerText );
}  
