<!--

var numQues = 20;
var numChoi = 2;


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><br>You did not answer yes to any of the questions. Did you need a friend to help you log on? Whatever other problems you may have, you can probably check computer over-use off the list.<br><br><br><br>";

if (score >4) {
	profile = "<br><br>Did you need a friend to help you log on? Whatever other problems you may have, you can probably check computer over-use off the list.<br><br><br><br><br><br>";
	} 
	
if (score >19) {
	profile = "OK, so you do sometimes get sidetracked when you start surfing the Web. But that doesn't make you an addict ... just more like the rest of us. Provided at least some of your computer use is at work, you probably don't have to worry. If  however you feel you may be traveling too much in cyberspace, now would be a good time to set some limits. Dr. Orzack suggests promising yourself you'll only play solitaire for a specific time before going to call someone on the phone. Or join an exercise program that gives you a similar feeling of being in control.<br>";
	}
	
if (score >49) {
	profile = "Uh oh, this is not good. Try to cut back on your online time with some of the suggestions above. Set an alarm clock to tell you when it's time to switch off. If you're a compulsive seeker of pornography, try installing blocking software like Cyberwatch, Surf Patrol or Net Nanny--more commonly used to stop children accessing adult sites--onto your machine. Make a special effort not to skip meals or showers. Consider seeking professional help from a therapist specializing in compulsive behavior.<br>";
	} 

if (score >79) {
	profile = "Pull the plug out. OK, obviously you can't. Nor will you have to, says Dr Orzack. 'The first thing I tell people is they don't need to give up their computers,' she says. What you do have to do is learn how to manage your symptoms and decide what you're capable of doing. With this high a score you probably do need help from a professional to do this--especially if you're also suffering from depression or are recovering from a prior addiction like gambling or alcohol. For some, medication like anti-depressants or mood-stabilizers may also be necessary.<br>";
	} 

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

scoreWin.document.write('<html>'
  + '<head>'
  + '<title>Are You Addicted To Your Computer?</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></p>' + profile
  + '</div>'
  + '</div>'
  + '<br>'
  + '</body>'
  + '</html>'
  + '');
  
scoreWin.document.close();  

}

// -->
