var sQuestions = new Array(
'In the first movie what creature was Quirrell holding when McGonagal interrupted to get Oliver Wood?',
'Who was the Invisibility Cloak from?',
'Where did Dumbledore get the cloak?',
'In the second movie ____ noticed the Polyjuice potion was wearing off.',
"What color were Dobby's eyes?",
"What was the name of the Centaur who saved Harry's life?",
'Who was Scabbars?',
"James Potter's nickname was ____.",
'Who appeared on Muggle news?',
'Who were the conductor and driver of the Knight Bus?',
"Who saved Harry and Sirius's lives from the Dementors?",
'What were Durmstrang and Beouxbatons?',
'How many champions were there?',
'Who were the champions?',
'Who won the Tri Wizard Tournament?',
"What was Moody and Winky's secret?",
'What happened to Mr. Crouch?',
'In the beginning of the fifth book, where did the Aurors take Harry?',
'How does Harry feel when he sees Ron & Hermione for the first time in the fifth book?',
'Why does Harry go before a Court?',
'What does Harry do after the charges are dropped?',
'What is the "secret weapon" Voldemort wants to get his hands on?',
'Who died in the fifth book?',
'Who was the noble one that died in the fourth book?',
'Who did Harry run to after Sirius died?'
);

var aAnswerText  = new Array(
'An iguana',
'Dumbledore',
'James Potter',
'Ron',
'Green',
'Ferienze',
'Peter Pettigrew',
'Prongs',
'Sirius Black',
'Stan and Ernie',
'Harry',
'Other Wizarding schools',
'4',
'* Harry P.<br>* Viktor K.<br>* Cedric D.<br>* Fleur D.',
'Harry by Default',
'Moody was really Barty Crouch jr.',
'Killed by his son',
'Headquarters of the Order of the Phoenix',
'Uncomfortable and Harry wants Ron & Hermione to leave him alone',
'Illegal Use of Under Age Wizardry',
"Donates money to St. Mungo's Hospital",
'Prophecy',
'Sirius',
'Cedric Diggory',
'Nearly Headless Nick'
);

var aAnswer = new Array(4,2,3,1,1,3,2,1,3,1,4,3,1,3,4,3,4,1,1,3,3,3,1,1,3);
var aRank   = new Array('Muggle', 'Mud Blood', 'Second Year', 'Third Year', 'Graduate Wizard');

function GetParam(sParams, sName)
{
 var nPos = sParams.indexOf(sName);

 if ( nPos < 0 ) {
  return -1;
 }

 nPos = nPos + sName.length + 1;
 
 var sStripped = sParams.substr(nPos, nLen - nPos);

 var nPos2 = sStripped.indexOf("&");

 if (nPos2 < 0) {
  nPos2 = sStripped.length-1;
 }
 var sValue = sStripped.substr(0, nPos2);
 
 return sValue;
}

