function checkScores( partNumber ) {
	
	window.document.getElementById( 'check_button' ).style.display = 'none';
	
	var score = 0;
	var correct = [ [0,1,1,0,2,2,0], [1,2,0,2,2,1,2,0,1], [2,2,0,2,2,2,0,1,0,1], [2,1,1,0,2,0,2,2,0] ];
	var currentForm = window.document.quiz;
	
	
	for ( i = 1; i < correct[partNumber - 1].length + 1; i++ ) {
		if ( currentForm[ 'q'+i ][ correct[partNumber-1][i-1] ].checked ) { score++ };
	}
	
	var endingText = '';
	
	switch ( partNumber ) {
		
		case 1:
		
			//if ( score == 0 ) break;
			
			if ( score < 5 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra BEGINNER.</p></h3>';
			} else if ( score < 7 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra ELEMENTARY.</p></h3>';
			} else {
				endingText = '<h3><p>Teisingai atsakėte į 7 klausimus. Toliau atlikite antrąją testo dalį.</p></h3>';
				window.document.getElementById( 'nextQuiz' ).style.display = 'block';
			}
			
			window.document.getElementById( 'scored' ).innerHTML = endingText;
			
		break;
		
		case 2:
			
			//if ( score == 0 ) break;
			
			if ( score < 7 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra PRE-INTERMEDIATE.</p></h3>';
			} else if ( score < 9 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra INTERMEDIATE.</p></h3>';
			} else {
				endingText = '<h3><p>Teisingai atsakėte į 9 klausimus. Toliau atlikite trečiąją testo dalį.</p></h3>';
				window.document.getElementById( 'nextQuiz' ).style.display = 'block';
			}
			
			window.document.getElementById( 'scored' ).innerHTML = endingText;
			
		break;
		
		case 3:
			
			//if ( score == 0 ) break;
			
			if ( score < 8 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra INTERMEDIATE.</p></h3>';
			} else if ( score < 10 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra UPPER-INTERMEDIATE.</p></h3>';
			} else {
				endingText = '<h3><p>Teisingai atsakėte į 10 klausimų. Toliau atlikite ketvitąją testo dalį.</p></h3>';
				window.document.getElementById( 'nextQuiz' ).style.display = 'block';
			}
			
			window.document.getElementById( 'scored' ).innerHTML = endingText;
			
		break;
		
		case 4:
			
			//if ( score == 0 ) break;
			
			if ( score < 6 ) {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra UPPER-INTERMEDIATE.</p></h3>';
			} else {
				endingText = '<h3><p>Teisingai atsakėte į '+score+' klausimus. Sveikiname, jūsų lygis yra ADVANCED.</p></h3>';
			}
			
			window.document.getElementById( 'scored' ).innerHTML = endingText;
			
		break;
		
	}
	
	window.document.getElementById( 'answer' ).style.display = 'block';
	
}

function disableQuestion( questionItem ) {
	
	for ( var i in questionItem ) {
		questionItem[i].disabled = true;
	}
	
}
