<!--

var numQues = 15;
var numChoi = 3;


function getScore(form,score) {
  var score = 0;
  var myvalue = 0;
  var currElt;
  var currSelection;
  var profile = "";

  for (i=0; i<numQues; i++) {
    currElt = i*numChoi;
    for (j=0; j<numChoi; j++) {
      currSelection = form.elements[currElt + j];
      if (currSelection.checked) {
	  	myvalue = parseInt(currSelection.value);
        score = score + myvalue;
        break;
      }
    }
  }
  
// form.debug.value = score 

profile = "<br>You probably find yourself frustrated in relationships more often than you would like.<br><br>";

if (score >9) {
	profile = "<br>You have a high aptitude for relating and are open to learning.<br><br>";
	} 
	
if (score >15) {
	profile = "<br>You have good relationship skills and have the aptitude to take your skills to the highest level you wish!<br><br>";
	}
	
if (score >24) {
	profile = "<br>Your capacity for  relating is already at a very high level. Congratulations!<br><br>";
	}

var scoreWin = window.open ("","scorewin","width=480,height=200,screenX=260,screenY=280,left=260,top=280");

scoreWin.document.write('<html>'
  + '<head>'
  + '<title>Relationship Skills Test</title>'
  + '<link rel="stylesheet" type="text/css" href="popup.css" />'
  + '</head>'
  + '<body>'
  + '<div class=c8>'
  + '<div class=c9>'
  + '<p align="center" valign="middle"><span class="c1"><b>Your score is ' + score + ' out of 30.</b></span></p>' + profile
  + '</div>'
  + '</div>'
  + '</body>'
  + '</html>'
  + '');
  
scoreWin.document.close();  

}

// -->
