
function randomizeSelectedVerbs() {
	document.form.response.value="";
	document.form.response.focus();
 	pronoun=document.form.pronouns.selectedIndex;
    verb=Math.floor(Math.random()*selectedinfinitive.length);  		
	document.form.verb.value=selectedinfinitive[verb];
	if (document.form.pronouns.selectedIndex==0) {
		pronoun=Math.floor(Math.random()*20);
	}
	if (pronoun==1 || pronoun==12 || pronoun==14 || pronoun==16) {
		solution=selectedyo[verb];
		document.form.pronoun.value="io";
		}
	if (pronoun==2 || pronoun==13 || pronoun==15 || pronoun==17) {
		solution=selectedtu[verb];
		document.form.pronoun.value="tu";
		}
	if (pronoun==3) {
		solution=selectedella[verb];
		document.form.pronoun.value="lui";
		}
	if (pronoun==4 || pronoun==11) {
		solution=selectedella[verb];
		document.form.pronoun.value="Lei";
		}
	if (pronoun==5) {
		solution=selectedella[verb];
		document.form.pronoun.value="Lei";
		}
	if (pronoun==6 || pronoun==10) {
		solution=selectednosotros[verb];
		document.form.pronoun.value="noi";
		}
	if (pronoun==7 || pronoun==18 || pronoun==0) {
		solution=selectedvosotros[verb];
		document.form.pronoun.value="voi";
		}
	if (pronoun==8 || pronoun==19) {
		solution=selectedellas[verb];
		document.form.pronoun.value="loro";
		}
	if (pronoun==9) {
		solution=selectedellas[verb];
		document.form.pronoun.value="Loro";
		}
	
	return;
}
function randomizeSelectedCommands() {
        document.form.response.value="";
       	document.form.response.focus();
        pronoun=document.form.pronouns.selectedIndex;
        verb=Math.floor(Math.random()*selectedinfinitive.length);        	document.form.verb.value=selectedinfinitive[verb];
         if (document.form.pronouns.selectedIndex==0) {
		pronoun=Math.floor(Math.random()*8);
	}
	if (pronoun==1 || pronoun==0) {
		solution=selectedtu[verb];
		document.form.pronoun.value="tu";
		}
	if (pronoun==2 || pronoun==6) {
		solution=selectednosotros[verb];
		document.form.pronoun.value="noi";
		}
	if (pronoun==3 || pronoun==7) {
		solution=selectedvosotros[verb];
		document.form.pronoun.value="ihre";
		}
	if (pronoun==4) {
		solution=selectedellas[verb];
		document.form.pronoun.value="Sie";
		}
                	return;
}
function randomizeAllVerbs() {
       	document.form.response.value="";
	document.form.response.focus();
    	pronoun=document.form.pronouns.selectedIndex;
    	verb=Math.floor(Math.random()*infinitive.length);
	document.form.verb.value=infinitive[verb];
	if (document.form.pronouns.selectedIndex==0) {
		pronoun=Math.floor(Math.random()*20);
	}
	if (pronoun==1 || pronoun==12 || pronoun==14 || pronoun==16) {
		solution=yo[verb];
		document.form.pronoun.value="io";
		}
	if (pronoun==2 || pronoun==13 || pronoun==15 || pronoun==17) {
		solution=tu[verb];
		document.form.pronoun.value="tu";
		}
	if (pronoun==3) {
		solution=ella[verb];
		document.form.pronoun.value="lui";
		}
	if (pronoun==4 || pronoun==11) {
		solution=ella[verb];
		document.form.pronoun.value="Lei";
		}
	if (pronoun==5) {
		solution=ella[verb];
		document.form.pronoun.value="Lei";
		}
	if (pronoun==6 || pronoun==10) {
		solution=nosotros[verb];
		document.form.pronoun.value="noi";
		}
	if (pronoun==7 || pronoun==18 || pronoun==0) {
		solution=vosotros[verb];
		document.form.pronoun.value="voi";
		}
	if (pronoun==8 || pronoun==19) {
		solution=ellas[verb];
		document.form.pronoun.value="loro";
		}
	if (pronoun==9) {
		solution=ellas[verb];
		document.form.pronoun.value="Loro";
		}
	
	
	return;
}
function randomizeAllCommands() {
        document.form.response.value="";
        document.form.response.focus();
         pronoun=document.form.pronouns.selectedIndex;
        verb=Math.floor(Math.random()*infinitive.length);
        document.form.verb.value=infinitive[verb];
           if (document.form.pronouns.selectedIndex==0) {
		pronoun=Math.floor(Math.random()*8);
	}
	if (pronoun==1 || pronoun==0) {
		solution=tu[verb];
		document.form.pronoun.value="du";
		}
	if (pronoun==2 || pronoun==6) {
		solution=nosotros[verb];
		document.form.pronoun.value="wir";
		}
	if (pronoun==3 || pronoun==7) {
		solution=vosotros[verb];
		document.form.pronoun.value="ihre";
		}
	if (pronoun==4) {
		solution=ellas[verb];
		document.form.pronoun.value="Sie";
		}
	
	
                return;
}



function italianConjugation() {
	if (start==0) {
		alert("You must first press START to begin the practice.");
		}
	else {
		conjugations++;
		
		if (commands==1) {
			frenchConjugationCommands();
												return		
		}
		if (allverbs==0) {
			alert("io: "+yo[verb]+"\n tu: "+tu[verb]+"\n lui/Lei: "+ella[verb]+"\n noi: "+nosotros[verb]+"\n voi: "+vosotros[verb]+"\n loro/Loro: "+ellas[verb]);		
			document.form.response.focus();
		}
		else {
		alert("io: " + selectedyo[verb]+ "\n tu: "+selectedtu[verb]+"\n lui/Lei: "+selectedella[verb]+"\n noi: "+selectednosotros[verb]+"\n voi: "+selectedvosotros[verb]+"\n loro/Loro: "+selectedellas[verb]);		
		document.form.response.focus();
		}
	}
}
function germanConjugationCommands() {
        	if (start==0) {
                alert("You must first press START to begin the practice.");
                	}
        	else {
                if (allverbs==0) {
                alert("positive: "+positive[verb]+"\n negative: "+negative[verb]);
	           document.form.response.focus();
       	         }
                else {
                alert("positive: "+selectedpositive[verb]+"\n negative: "+selectednegative[verb]);
	        document.form.response.focus();
               			 }
        	}
}


