<!--

var numQues = 14;
var numChoi = 2;


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

  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 = "<span class='c1'>Friend</span><br>It's not that you don't like boys. But your interest is more platonic-you're looking at them as friend material, not as potential boyfriends. If and when you're ready for a real relationship, your heart and mind will let you know.<br><br><br><br>";
     graphic = "yellow";

if (score >35) {
	profile = "<span class='c1'>More Than a Friend</span><br>Your feelings are still a little mixed, but the relationship signals are getting stronger. The truth is, if one special guy shows you the right amount of interest, the scales might tip and push you into the next category. But don't rush into a relationship if you're not sure it's appropriate for you. And don't forget, if your parents will not allow you to date until you're older, that may keep you in the Friend category just a little longer.<br>";
	graphic = "red";
	} 
	
if (score >70) {
	profile = "<span class='c1'>Girlfriend</span><br>You're ready to roll into a relationship, and you know it. That doesn't mean that you're sworn for life to the particular guy you have a crush on now. But you can see yourself as part of a twosome. If, at any point, the relationship doesn't feel comfortable, remember that you're free to leave. But, unless the guy has really been awful to you, do it in a way that's honest but gentle. And if the guy has been a pig? He doesn't deserve any special consideration when you dump him.<br>";
	graphic = "green";
	}
	

var scoreWin = window.open ("","scorewin","scrollbars=yes,width=480,height=250,screenX=270,screenY=260,left=270,top=260");

scoreWin.document.write('<html>'
  + '<head>'
  + '<title>Are You Ready for a Real Relationship?</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 + ' %.</span></b></p>' + profile
  + '</div>'
  + '</div>'
  + '<br>'
  + '</body>'
  + '</html>'
  + '');
  
scoreWin.document.close();  

}

// -->
