/* ThinkQuest International 2006
	The DReaMers - DRM: Two Sides of the Story
	testYourself.js
	--------------------------------------------
	Copyright: You may use this script for non-commercial purposes,
	but must acknowledge the team.
	--------------------------------------------
	Last Revised: 06/05/06
*/

var question = new Array(35);
var ans1 = new Array(35);
var ans2 = new Array(35);
var ans3 = new Array(35);
var ans4 = new Array(35);
var correct = new Array(35);

question[0]="Which of the following is illegal?";
ans1[0]="Logining to offical website to buy it online";
ans2[0]="Purchasing from authorized dealers";
ans3[0]="Download using P2P software for free";
ans4[0]="Buying second hand original CD from friends";
correct[0]=3;

question[1]="Which one is not a form of DRM?";
ans1[1]="Placing warning messages on the packaging or in the software";
ans2[1]="Sellng the product in well packed box";
ans3[1]="Distributing Product ID keys";
ans4[1]="Providing dongles";
correct[1]=2;

question[2]="What is the DRM software used by Apple?";
ans1[2]="Fairplay";
ans2[2]="iSecure";
ans3[2]="MacRight";
ans4[2]="NoCopy";
correct[2]=1;

question[3]="Which company released the most controversial DRM called the Extended Copy Protection?";
ans1[3]="Sony";
ans2[3]="Warner";
ans3[3]="Microsoft";
ans4[3]="Apple";
correct[3]=1;

question[4]="What is DRM used for?";
ans1[4]="Detect ADware and prevent popup windows of some sites";
ans2[4]="Control the data flow in and out of the computer on the net";
ans3[4]="Prevent the computer from being infected with viruses";
ans4[4]=" Prevent the uncontrolled copying of digital media files";
correct[4]=4;

question[5]="Which one is not a component of the cryptography used in DRM";
ans1[5]="Sender";
ans2[5]="Receiver";
ans3[5]="Remover";
ans4[5]="Attacher";
correct[5]=3;

question[6]="Which of the following is not an example of DRM software?";
ans1[6]="Key2Audio";
ans2[6]="NOD32";
ans3[6]="Windows Media DRM";
ans4[6]="Extended Copy Protection ";
correct[6]=2;

question[7]="Which of the following is the DRM for Windows Media Player?";
ans1[7]="Windows Media DRM";
ans2[7]="MS Privacy Protector";
ans3[7]="FairPlay";
ans4[7]="Dgital secure";
correct[7]=1;

question[8]="What does DRM mean?";
ans1[8]="Divine Rapier Master";
ans2[8]="Digital Radio Meter";
ans3[8]="Digital Rights Management";
ans4[8]="Digital Restriction Management";
correct[8]=3;

question[9]="What does SONY do on their MDs to protect data?";
ans1[9]="There are no sourceout point";
ans2[9]="The disks are specially made so they can't be copied";
ans3[9]="You can only copy songs from authorized dealers";
ans4[9]="Series numbers are needed when you rip the songs";
correct[9]=1;

question[10]="Which company released the DRM software Rip-Guard?";
ans1[10]="Macrovision";
ans2[10]="IBM";
ans3[10]="Apple";
ans4[10]="Microsoft";
correct[10]=1;

question[11]="Which of the following is not a main feature of Windows DRM?";
ans1[11]="Secure audio path";
ans2[11]="Strong encryption";
ans3[11]="Strictly no digital files can be copied";
ans4[11]="Output protection";
correct[11]=3;

question[12]="Which of the following is not an advantage of watermarking?";
ans1[12]="Low cost";
ans2[12]="Easy to implement";
ans3[12]="Efficient";
ans4[12]="High tech";
correct[12]=4;

question[13]="Why can't you play music downloaded illegally in iPod?";
ans1[13]="The DRM restricts it";
ans2[13]="iPod does not support the format";
ans3[13]="The file is corrupted";
ans4[13]="You must save the song into a certain directory";
correct[13]=1;

question[14]="Which of the following is not a key player of DRM?";
ans1[14]="Apple";
ans2[14]="Micdownload";
ans3[14]="Microsoft";
ans4[14]="SONY";
correct[14]=2;

question[15]="In Singapore, how many months can people be sentenced for downloading songs illegally?";
ans1[15]="3 months";
ans2[15]="6 months";
ans3[15]="8 months";
ans4[15]="12 months";
correct[15]=2;

question[16]="About what percent of teenagers in Singapore have downloaded songs illegally?";
ans1[16]="67%";
ans2[16]="53%";
ans3[16]="61%";
ans4[16]="23%";
correct[16]=3;

question[17]="Which of the following is a common limitation of DRM?";
ans1[17]="Inconvenient";
ans2[17]="Easy to be hacked";
ans3[17]="Bulky";
ans4[17]="Expensive";
correct[17]=2;

question[18]="People often criticize DRM for";
ans1[18]="over-protecting online resources";
ans2[18]="Creating consumers' displeasure";
ans3[18]="Hindering the process of resale";
ans4[18]="All of the above";
correct[18]=4;

question[19]="Which of the following is a product that can be shared?";
ans1[19]="Adobe ebooks";
ans2[19]="Windows XP";
ans3[19]="Norton Antivirus";
ans4[19]="FairPlay";
correct[19]=1;

question[20]="Which of the following is a product of FOSS";
ans1[20]="Red Hat 10.0";
ans2[20]="Norton Antivirus";
ans3[20]="Mozilla";
ans4[20]="Microsoft Office";
correct[20]=3;

question[21]="One of the most well-known and plausible benchmark in copyleft history is";
ans1[21]="GNU/Linux operating system";
ans2[21]="FairPlay";
ans3[21]="mySQL";
ans4[21]="Opera";
correct[21]=1;

question[22]="What is copyleft?";
ans1[22]="A term describing expired copyright";
ans2[22]="A term opposing copyright";
ans3[22]="A term describing copyright infringement";
ans4[22]="A term describing a special way to copy things";
correct[22]=2;

question[23]="What are the problems of current DRMs?";
ans1[23]="Lack of interoperability";
ans2[23]="Consumers' inconvenience";
ans3[23]="Susceptible to attacks";
ans4[23]="All of the above";
correct[23]=4;

question[24]="The idea of free software is originally introduced and brought to reality by";
ans1[24]="Larry Page, Cofounder of Google";
ans2[24]="Linus Torvalds, Father of Linux";
ans3[24]="Richard Stallman, MIT researcher ";
ans4[24]="Bram Cohen, Inventor of BT";
correct[24]=3;

question[25]="Which of the following is legal?";
ans1[25]="My friend sent me a pirated song in an email named hello and I open it";
ans2[25]="I downloaded the latest album using P2P software";
ans3[25]="My friend asked me to burn a copy of an album for him and i did";
ans4[25]="I put one of my favourite singers' song online for others to download";
correct[25]=1;

question[26]="When was the Digital Millennium Copyright Act (DCMA) signed?";
ans1[26]="March 20, 1987";
ans2[26]="March 10, 2004";
ans3[26]="October 28, 1998";
ans4[26]="November 2, 1993";
correct[26]=3;

question[27]="When was the EU Copyright Directive passed by the EU?";
ans1[27]="July 1, 2000";
ans2[27]="October 28, 1998";
ans3[27]="June 16, 2002";
ans4[27]=" March 10, 2004";
correct[27]=4;

question[28]="What is the counter legislature of DMCA?";
ans1[28]="Digital Media Consumers' Rights Act.";
ans2[28]="Digital Restrict Management";
ans3[28]="EU Copyright Directive";
ans4[28]="None of the above";
correct[28]=1;

question[29]="Which Company develops EXEcryptor?";
ans1[29]="Strongbit";
ans2[29]="Microsoft";
ans3[29]="IBM";
ans4[29]="Symantec";
correct[29]=1;

question[30]="Which antivirus software uses electronic key to protect their latest version?";
ans1[30]="McAfee";
ans2[30]="Panda";
ans3[30]="Norton";
ans4[30]="NOD32";
correct[30]=3;

question[31]="What is 'The Record'?";
ans1[31]="a DRM software";
ans2[31]="a DRM CD";
ans3[31]="a DRM machine";
ans4[31]="a surveillance software";
correct[31]=2;

question[32]="Which is the software that cracks apple's DRM?";
ans1[32]="RipPro";
ans2[32]="XCP";
ans3[32]="FairPlay";
ans4[32]="PyMusique";
correct[32]=4;

question[33]="Which game uses Valve's Steam as its DRM software?";
ans1[33]="Warcraft";
ans2[33]="Counter Strike";
ans3[33]="Tomb Raider";
ans4[33]="Heros";
correct[33]=2;

question[34]="Which of the following is not a free source?";
ans1[34]="Fedora Core 5";
ans2[34]="Windows XP";
ans3[34]="Open Office";
ans4[34]="Thunderbird mail server";
correct[34]=2;

var testIndex, val;

function checkAnswer()
{
	if (val == correct[testIndex])
		alert("Congratulations! You answered the question correctly.");
	else
		alert("Sorry, the correct answer is: " + eval("ans" + correct[testIndex] + "[" + testIndex + "]"));
}

function testYourself()
{
	var returnTheQuestion = "";
	
	testIndex = Math.floor(Math.random() * question.length);
	
	returnTheQuestion += '<br/>';
	returnTheQuestion += '<div class=\"testquestion\">' + question[testIndex] + '';
	returnTheQuestion += '</div><br/>';
	//document.write('<div class=\"testquestion\">' + questions[testIndex] + '');
	//document.write('</div><br/><br/>');
	
	val = 1;  
	
	returnTheQuestion += '<div class="test">';
	returnTheQuestion += '<input type="radio" name="test" onclick="val = 1" checked="checked" />' + ans1[testIndex] + '<br/>';
	returnTheQuestion += '<input type="radio" name="test" onclick="val = 2" />' + ans2[testIndex] + '<br/>';
	returnTheQuestion += '<input type="radio" name="test" onclick="val = 3" />' + ans3[testIndex] + '<br/>';
	returnTheQuestion += '<input type="radio" name="test" onclick="val = 4" />' + ans4[testIndex] + '<br/><br/>';
	returnTheQuestion += '<div align="center"><input type="button" onclick="checkAnswer()" value="Check Answer" class="buttonStyle"></div>';
	returnTheQuestion += '</div>';
	
	//document.write('<div class="test">');
	//document.write('<input type="radio" name="test" onclick="val = 1" checked="checked" />' + ans1[testIndex] + '<br/>');
	//document.write('<input type="radio" name="test" onclick="val = 2" />' + ans2[testIndex] + '<br/>');
	//document.write('<input type="radio" name="test" onclick="val = 3" />' + ans3[testIndex] + '<br/>');
	//document.write('<input type="radio" name="test" onclick="val = 4" />' + ans4[testIndex] + '<br/><br/>');
	//document.write('<div align="center"><input type="button" onclick="checkAnswer()" value="Check Answer" class="buttonStyle"></div>');
	//document.write('</div>');
	
	return returnTheQuestion;
}