<!--

var numQues = 10;
var numChoi = 6;


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>People who score high on this tend to view intimacy (or getting close to another person) as risky to themselves.  High scorers are more likely to distance themselves from others and have few friends.  They are cautious about getting involved and take things slowly when they do get involved in an intimate relationship.  In other words, close relationships aren't impossible for people who are high on ''Risk in Intimacy''; but they may take more time to get really close to their significant other.<br>";

if (score >20) {
	profile = "<br><br>Although intimacy isn't a barrier to getting involved, it is a trouble spot for you.<br><br><br><br><br><br><br>";
	} 
	
if (score >40) {
	profile = "<br>For you, intimacy isn't a barrier to getting involved!<br><br><br><br><br><br><br><br>";
	}
	
var scoreWin = window.open ("","scorewin","width=480,height=300,screenX=260,screenY=230,left=260,top=230");

scoreWin.document.write('<html>'
  + '<head>'
  + '<title>Are You Uncomfortable With Intimacy?</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 60.</b></span></p>' + profile
  + '</div>'
  + '</div>'
  + '</body>'
  + '</html>'
  + '');
  
scoreWin.document.close();  

}

// -->
