// JavaScript Document
var ans = new Array;
var done = new Array;
var yourAns = new Array;
var explainAnswer = new Array;

var score = 0;

ans[1] = "d";
ans[2] = "d";


explainAnswer[1]="A single-layer disc can hold 25GB, A dual-layer disc can hold 50GB. To ensure that the Blu-ray Disc format is easily extendable (future-proof) it also includes support for multi-layer discs, which should allow the storage capacity to be increased to 100GB-200GB (25GB per layer) in the future simply by adding more layers to the discs";
explainAnswer[2]="Facts first, it is estimated through legal sources, that the Indian entertainment industry loses up to Rs 1,700 crore annually on account of piracy. About 20 per cent of pirated goods infringe the copyrights of foreign film titles. The remaining 80 per cent of pirated product infringe the copyrights of domestic films. Catching the latest Bollywood or Hollywood movie on a pirated CD, is now a widespread phenomenon";


function Engine(question, answer) {
yourAns[question]=answer;
}

function Score(){
var answerText = "How did you do?\n------------------------------------\n";
for(i=1;i<=2;i++){
   answerText=answerText+"\nQuestion :"+i+"\n";
  if(ans[i]!=yourAns[i]){
    answerText=answerText+"\nThe correct answer was "+ans[i]+"\n"+explainAnswer[i]+"\n";
  }
  else{
    answerText=answerText+" \nCorrect! \n" +"\n"+explainAnswer[i]+"\n";
    score++;
  }
}

answerText=answerText+"\n\nYour total score is : "+score+"\n";

//now score the user
answerText=answerText+"\nComment : ";
if(score<=0){
answerText=answerText+"Learn more about current Data Storage Devices and or video piracy";
}
if(score>=1 && score <=1){
answerText=answerText+"Need to be more aware about video piracy and or Data Storage Devices";
}
if(score>=2 && score <=2){
answerText=answerText+"Perfect";
}
if(score>2){
answerText=answerText+"Perfect!";
}

alert(answerText);
score = 0;
}
//  End -->