
  
  function calcola () {
  var vaque=0;
    var i;
	var j;
	var notfound;
	
  for (i=0; i<solucion.length; i++) {
    notfound = true;
    for (j=0; j<solucion[0].length; j++)
        if (document.form.elements[i*solucion[i].length+j].checked) {
		    vaque += solucion[i][j];
			notfound = false;
            break;
		}
	if (notfound) {
	    PopIt("¡Tienes que completar todas las preguntas para ver el resultado!");
		return -1;
	}
  }
  return vaque;
  }
  
  function stampa (str, titolo) {
  
	var win = window.open ("","win", "width=300,height=300,dependent,scrollbars,resizable=yes");
	win.document.open ();
	win.document.write ("<HEAD><TITLE>" + titolo + "</TITLE>");
	win.document.write ("<LINK rel='StyleSheet' type='text/css' href='c01/103.css'>");
	win.document.write ("</HEAD>");
	win.document.write ("<BODY>  ");
	win.document.write ("<background=checo18.jpg  ><CENTER><img src='images/orto3.gif'></CENTER>");
	win.document.write("<CENTER><TABLE  BORDER= 8 CELLPADDING=4  CELLSPACING=4><TR BGCOLOR=\"#OO9999\"><TD><FONT COLOR=YELLOW ><b>Regla de la C</b></FONT></TD></TR>");
	win.document.write (str);
	win.document.write ("</BODY>");
	win.document.close ();
	win.stop ();
  }
  
  
  function check () {
    var vaque = calcola ();
	if (vaque<0) return false;
    var str = profilo (vaque);  
	var titolo = "Puntos: " + vaque;
	stampa (str, titolo);
    return false;
  }

