// Quiz Engine script by Jordan Hiller <lhiller@compupartner-edm.com>

questionnum = -1;
questions = new Array();
possibleanswers = new Array();
answers = new Array();

/* BELOW IS WHERE YOU MODIFY THE QUESTIONS AND ANSWERS */

/* Here is where you modify the questions and answers.
 * Use Question("put question here") to add a new question.
 * Immediately following that, add the choices that the user will have
 * for his or her guess. Use WrongChoice("put choice here") to add a choice
 * that will be marked incorrect if selected, and
 * CorrectChoice("put choice here") to add a choice that is correct.
 *
 * If you know the JavaScript language, you can use JavaScript programming
 * commands within the brackets, such as:
 * CorrectChoice(100*100)
 * I used commands like these in some of my example answers, but don't let yourself
 * get confused by them.
 */

Question("How do you say, 'Bedroom' ?");
    CorrectChoice("Habitación");
    WrongChoice("Comedor");
    WrongChoice("Baño");

Question("You give a taxi driver twenty pesos for a seven pesos trip, how much change does he need to give you back ?");
    WrongChoice("un peso");
    WrongChoice("dieciocho pesos");
    CorrectChoice("trece pesos");
    WrongChoice("tres pesos");

Question("The best way to learn Spanish is to...");
    WrongChoice("Marry a Latina or Latino");
    CorrectChoice("Constant practice and study");
    WrongChoice("Trial and error until I learn");

Question("You have an urgent need to use the 'bathroom' which is the correct word to use before you have an accident ?");
    WrongChoice("Bandido");
    WrongChoice("Bandera");
    CorrectChoice("Baño");
    WrongChoice("Habitación");

Question("In the question, 'Dónde está la parada del autobús ?' the word 'parada' means... ");
    WrongChoice("Terminal");
    WrongChoice("Seat");
    CorrectChoice("Stop");
    WrongChoice("Moving");
    WrongChoice("Bus");

Question("The form of Castellano used in this site comes from...");
    WrongChoice("Spain");
    WrongChoice("Mexico");
    CorrectChoice("Argentina");
   

Question("The articles are placed...");
    CorrectChoice("Before the noun");
    WrongChoice("After the noun");
    WrongChoice("In the middle of an adjective and a noun");


Question("Spanish is known as a romantic language...");
    WrongChoice("False");
    CorrectChoice("True");


Question("What's the plural word for 'Pie' (foot)");
    WrongChoice("Pieses");
    WrongChoice("Piese");
    CorrectChoice("Pies");


Question("In what country does the word 'colectivo' used and what does it mean mean ?");
    WrongChoice("Uruguay, taxi");
    WrongChoice("Chile, restaurant");
    CorrectChoice("Argentina, bus");
    WrongChoice("Perú, bus");


Question("I have to always add an 's' every time I want to transform a word in plural");
    WrongChoice("True");
    CorrectChoice("False");


Question("The vocals and the consonants in Spanish are different in English");
    WrongChoice("True");
    CorrectChoice("False");


Question("The word 'Iglesia' means...");
    WrongChoice("Chapel");
    CorrectChoice("Church");
    WrongChoice("Temple");
    WrongChoice("Basilic");

Question("If 'el' is the singular masculine article and 'los' is his plural, what is the feminine plural and singular form");
    WrongChoice("lo, les");
    WrongChoice("la,los");
    CorrectChoice("la, las");
    WrongChoice("la, les");
    WrongChoice("los,las");

Question("It is possible to continue your studies with Sol one on one online via this site");
    CorrectChoice("True");
    WrongChoice("False");

Question("Not all countries in South America speak Spanish...");
    CorrectChoice("True");
    WrongChoice("False");

Question("What does 'unos dias' mean");
    WrongChoice("a day");
    WrongChoice("several days");
    CorrectChoice("some days");

Question("The meaning of 'Español Hecho Fácil' is...");
    WrongChoice("Spanish Easily Made");
    WrongChoice("Make Spanish Easy");
    CorrectChoice("Spanish Made Easy");
    WrongChoice("I Make Spanish Seem Easy");

Question("If you have doubts about if a word is masculine or feminine, it is better to choose masculine...");
    WrongChoice("False");
    CorrectChoice("True");

Question("If you want to continue with lesson three online what do you have to do ?");
    WrongChoice("I send a regular e-mail indicating my interest in continuing");
    WrongChoice("Contact Borde Global Impact Designs ® through http://www.bordeglobal.com");
    CorrectChoice("Contact the site administrator (Sol) via the form indicating my interest and I will get a reply with further directions.");


/* If you would like, you can have the script give you helpful information if
 * there was an error in your input above. Should be false once you are done,
 * but handy while your are working on it. */
 debug = true;

/* In order, these are the characters that will be used as labels for each possible
 * answer for a question, each separated by a |. These may include HTML tags to
 * apply different formatting for choice labels if desired.
 * The default configuration allows for 26 different possible answers for each question.
 */
labels = "a.|b.|c.|d.|e.|f.|g.|h.|i.|j.|k.|l.|m.|n.|o.|p.|q.|r.|s.|t.|u.|v.|w.|x.|y.|z.";






/* BELOW IS USED FOR THE RESULTS PAGE. KEEP GOING, YOU'RE ALMOST DONE! */

/* Below, put the excellent and failing grades (percent).
 */
excellentGrade = 95;
failingGrade = 60;

/* Put the email address where you want the score to be sent, or the location of
 * a CGI script. Make sure
 * to use mailto: as a prefix if you aren't using a CGI script.
 * (Optional, set to "" if not wanted)
 */
email = "mailto:spanish@bordeglobal.com?subject=Spanish_Quiz_Me";

/* If you are using the mailing or CGI function, the form method may be
 * different depending on what you are using it. This should be either POST
 * or GET.
 */
 method = "GET";

/** Many CGI scripts require additional information in the form of <INPUT TYPE="hidden">
 * form elements. If necessary, insert any additional html to go inside the form here.
 * Remember to replace all quotes you need in the html with \"
 */
 otherFormTags = "";


/* You have a choice to send the score automatically to the above address, or the
user could have a choice to send it. */
autosend = true;

/* Do you want the answers to the questions that were answered wrong to be shown on
 * the results page?
 */
showanswers = true;



/* NO MODIFICATIONS BELOW HERE */

function Question(question){
questionnum++;
questions[questionnum] = question;
possibleanswers[questionnum] = new Array();
}

function CorrectChoice(choice){
WrongChoice(choice);
answers[questionnum] = choice;
}

function WrongChoice(choice){
var choicenumber = possibleanswers[questionnum].length;
possibleanswers[questionnum][choicenumber] = choice;
}

function Asplit(str,seperator){
var arraya = new Array();
var first = 0;

if(str.charAt(str.length) != seperator)
  {
  str += seperator;
  }

for(var i=0;i<str.length;i++)
  {
  if(str.charAt(i) == seperator)
    {
    second = i;
    arraya[arraya.length] = str.substring(first,second);
    first = second;
    }
  }

for(var i=0;i<arraya.length;i++)
  {
  if(arraya[i].charAt(0) == seperator)
    {
    arraya[i] = arraya[i].substring(1,arraya[i].length);
    }
  }

return arraya;
}

/*

if(timelimit != "")
  {
  timenote = "<B>Note: You have a time limit of " + timelimit + " seconds, starting when this page is loaded.</B>";
  }

function starttime(){
if(timelimit != "")
  setTimeout("timeup()",timelimit * 1000);
}

function timeup(){
alert("Sorry, time's up!");
document.theform.button.onclick = void();
location.href = timeuplocation;
}*/
