
n_alternativas = new Array(10);
n_alternativas[0] = "3";
n_alternativas[1] = "3";
n_alternativas[2] = "3";
n_alternativas[3] = "3";
n_alternativas[4] = "3";
n_alternativas[5] = "3";
n_alternativas[6] = "3";
n_alternativas[7] = "3";
n_alternativas[8] = "3";
n_alternativas[9] = "3"

perguntas = new Array(10);
perguntas[0] = new Array(4);
perguntas[1] = new Array(4);
perguntas[2] = new Array(4);
perguntas[3] = new Array(4);
perguntas[4] = new Array(4);
perguntas[5] = new Array(4);
perguntas[6] = new Array(4);
perguntas[7] = new Array(4);
perguntas[8] = new Array(4);
perguntas[9] = new Array(4);


perguntas[0][0] = "1. Eu gostaria de conhecer o Oriente Médio<br>";
perguntas[0][1] = "I would like to know the Middle East";
perguntas[0][2] = "I should have known the Middle East";
perguntas[0][3] = "I would like to known the Middle East";

perguntas[1][0] = "2. Nós deveríamos ter feito isso melhor<br>";
perguntas[1][1] = "We would do it better";
perguntas[1][2] = "We should have done it better";
perguntas[1][3] = "We would have done it better";

perguntas[2][0] = "3. Eu não deveria ir lá com você?<br>";
perguntas[2][1] = "Wouldn't I go there with you?";
perguntas[2][2] = "Shouldn't I go there with you?";
perguntas[2][3] = "Couldn't I go there with you?";

perguntas[3][0] = "4. Seu marido não te ajudaria com as crianças?<br>";
perguntas[3][1] = "Wouldn't your husband help you with the children?";
perguntas[3][2] = "Couldn't your husband help you with the children?";
perguntas[3][3] = "Shouldn't your husband help you with the child?";

perguntas[4][0] = "5. Eu não teria pensado duas vezes  antes de beijá-la<br>";
perguntas[4][1] = "I wouldn't think twice to kiss you";
perguntas[4][2] = "I should have thought twice to kiss you";
perguntas[4][3] = "I wouldn't have thought twice to kiss you";

perguntas[5][0] = "6. Ele deveria ter estudado mais<br>";
perguntas[5][1] = "He would have studied more";
perguntas[5][2] = "He could have studied more";
perguntas[5][3] = "He should have studied more";

perguntas[6][0] = "7. O que você faria em meu lugar?<br>";
perguntas[6][1] = "What would you do in my place?";
perguntas[6][2] = "What should you do in my place?";
perguntas[6][3] = "What would you have done in my place?";

perguntas[7][0] = "8. Ela jamais teria dito uma coisa dessa a você<br>";
perguntas[7][1] = "She would never have said such a thing to you";
perguntas[7][2] = "She would never say such a thing to you";
perguntas[7][3] = "She could never said such a thing to you";

perguntas[8][0] = "9. O que ele gostaria de ter para o jantar?<br>";
perguntas[8][1] = "What would he like to have for dinner?";
perguntas[8][2] = "What he would like to have for dinner?";
perguntas[8][3] = "What would he liked for dinner?";

perguntas[9][0] = "10. Você gostaria de um copo de uísque?<br>";
perguntas[9][1] = "Would you like the glass of whisky?";
perguntas[9][2] = "Would you like a glass of whisky?";
perguntas[9][3] = "Wouldn't you like a glass of whisky?";



function criaAlt(pergunta) {
 alternativa = new Array(pergunta);
 for (var i = 0; i < 10; i++) 
 { n = i;
   alternativa[n] = "0"; }
}

function escrevecookie(){
var texto = "";
for (var a = 0; a < 10; a++) {
 texto += alternativa[a];
}
texto += "x"
document.cookie = "quizfi=" + escape(texto);
}


function confere() {
 var ok = 0;
 for (var a = 0; a < 10; a++) {
   if (alternativa[a] == 0) {
   ok += 1;
  }
 }
 if (ok == 0) { escrevecookie();}
 else {
   if (ok == 1) alert('Você não respondeu uma pergunta')
   else alert('Você não respondeu ' + ok + ' perguntas')
   }
}

function lecookie() {
 if (document.cookie.length > 0) {
 pos = document.cookie.indexOf("quizfi=");
 if (pos != -1) {
  pos += 7;
  fim = document.cookie.indexOf("x",pos);
  if (fim == -1) fim = document.cookie.lenght;
  return unescape(document.cookie.substring(pos,fim))
  }
 }
}

 criaAlt(10);
