function Question (qname,
type,
qstring,
response,
comment,
corrects,
explan,
score,
ifcorrect,ifwrong,ifnull,
img)
{this.qname=qname;
this.type=type;
this.qstring=qstring;
this.response=response;
this.comment=comment;
this.corrects=corrects;
this.explan=explan;
this.score=score;
this.ifcorrect=ifcorrect;
this.ifwrong=ifwrong;
this.ifnull=ifnull;
this.img=img;
}

var zin=1,top=0, mycount=0, waitTime=0, qright=0, mycomment;
var global=new Array(3);
var recent, recent2, recdone=false, opera7, opera=CheckOpera56();
function cachewrite(s,idx){global[idx]+=s;}
function CheckOpera56()
{
var version;
if (navigator.userAgent.toLowerCase().indexOf('opera') == -1) return false;
version=parseInt(navigator.appVersion.toLowerCase());
if (version>6) {opera7=true; return false;}
if (version<5) return false;
return true;
}
resp=new Array("2050","2025","2010","Next Year")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"When is the production of World Oil going to &quot;Peak&quot; (when demand exceeds maximum possible output)?",
resp,
comm,
corr,
"<small>Estimates vary, however there is increasing agreement with geologist Dr Colin Campbell who says world production will peak in 2010</small>",
valu,
1,
0,
0,
"oilpump.jpg");

resp=new Array("1990s in West Africa","1980 in Russian fields","1970s in North Sea","1960s in Middle East")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"When and where were the biggest discoveries of oil?",
resp,
comm,
corr,
"<small>The Middle East by a long way. Nothing has been discovered since, or lkely to be discovered in future, anywhere near the same amounts</small>",
valu,
1,
0,
0,
"burn2.jpg");

resp=new Array("Nigeria","Iran","Iraq","Venuzuela")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest003 = new Question(
"Question 3",
0,
"Which country has the most oil reserves after Saudi Arabia?",
resp,
comm,
corr,
"<small>Iraq has the 2nd biggest reserves in the world, Iran 4th. However, Iraq is moving only about 2 mil barrels a day compared to about 3mbd under Hussain and the 5mbd the US predicted could be extracted.<br>Of course this will all change if barrel prices stay at over $50b, when Venuzuela can afford to suck up heavy oil for another 200 years.</small>",
valu,
1,
0,
0,
"tank.jpg");

resp=new Array("Double","Same","Half","Tenth")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
0,
"How much oil will the North Sea produce in 10 years time?",
resp,
comm,
corr,
"<small>The Norwegian government predicts that North Sea production will be half</small>",
valu,
1,
0,
0,
"rig.jpg");

resp=new Array("True","False")
corr=new Array("1","0")
comm=""
valu=""
quest005 = new Question(
"Question 5",
0,
"Is it true that George W Bush wants to reduce oil imports from Middle East?",
resp,
comm,
corr,
"<small>According to George W Bush in his <a target=\"_blank\" href=\"http://news.bbc.co.uk/1/hi/business/4669980.stm\"><u>State of the Union speech Feb 2006</u></a>, the US wants to cut the amount of oil it imports from the Middle East by 75% by 2025.</small>",
valu,
1,
0,
0,
"Oil-and-Freedom.jpg");

resp=new Array("Condoleezza Rice, Secretary of State USA","Dick Cheney, Vice President of USA","Hamid Kazai, Prime Minister of Afghanistan/Mayor of Kabul","George W Bush, President of USA")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"Who doesnt understand the interests of the Oil Giant &quot;Chevron&quot;?",
resp,
comm,
corr,
"<small>Condoleezza Rice was a Chevron Director 1991 -&#160; 2001, where she was&#160; their main expert on Kazakhstan<br>Vice President Cheney was Chief Executive of Halliburton Corporation, the world&rsquo;s largest oil field services company with multi-billion dollar contracts with oil corporations including Chevron.<br>Hamid Kazai was top adviser to UNOCAL Corporation (which <font color=\"#0000ff\"><u>merged with Chevron in 2005</u></font>) when negotiating with the Taliban to construct a Central Asia Gas pipeline from Turkmenistan through western Afghanistan to Pakistan.<br>Chevron vice-chairman Peter Robertson said US President George Bush's State of Union remarks on cutting dependence on the Middle East represented&quot;<a target=\"_blank\" href=\"http://www.ameinfo.com/77702.html\"><u>some misunderstanding about global energy supply</u></a>&quot;.<br></small>",
valu,
1,
0,
0,
"condo.jpg");

resp=new Array("Buncefield, Hertfordshire","Baghdad, Iraq","Baku - Ceyhan Pipeline","Dalls, Texas")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest007 = new Question(
"Question 7",
0,
"Where are 10 million barrels of oil stored underground?",
resp,
comm,
corr,
"<small>The Pipeline from Baku to Ceyhan, 1000 miles long and <a target=\"_blank\" href=\"http://news.bbc.co.uk/1/hi/business/4577497.stm\"><u>opened 2005</u></a>, contains 10 million barrels at any one time.</small>",
valu,
1,
0,
0,
"bell512.jpg");

resp=new Array("20%","40%","60%","80%")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"How much of its oil does USA have to import?",
resp,
comm,
corr,
"<small>THe USA imports 60% of its oil.</small>",
valu,
1,
0,
0,
"oilpolicy.gif");

resp=new Array("10%","25%","50%","75%")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"How much oil will UK be importing in 10 years time?",
resp,
comm,
corr,
"<small>According to geologist Dr Campbell, the UK could be dependent for 50% its oil by 2015.</small>",
valu,
1,
0,
0,
"pipe.jpg");

resp=new Array("Tony Blair","Donald Rumsfeld","George Bush Snr","George W Bush")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
0,
"Who said, on the day after 9/11,&quot;Attack Iraq now&quot;?",
resp,
comm,
corr,
"<small>According to the minutes of the US National Security Council meeting 9/12...Donald Rumsfeld said the words. More from <a target=\"_blank\" href=\"http://www.newamericancentury.org/iraqclintonletter.htm\"><u>New American Century</u></a></small>",
valu,
1,
0,
0,
"oilcover.jpg");

resp=new Array("Tony Blair","George Bush","Alan Greenspan","George Galloway")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"Who said in 2007 that we should have been more honest that the war in Iraq was about Oil.",
resp,
comm,
corr,
"<small>America's elder statesman on finance <a target=\"_blank\" href=\"http://www.timesonline.co.uk/tol/news/world/article2461214.ece\"><u>Alan Greenspan</u></a>&#160; said in his memoirs: &quot;I am saddened that it is politically inconvenient to acknowledge what everyone knows; the Iraq war is largely about oil&quot;.</small>",
valu,
2,
0,
0,
"greenspan.jpg");

resp=new Array("Helping get rid of Saddam Hussain","Introducing Iraqi people to democracy","Keeping guard on the Queen's corgis","Leading forces in the campaign to secure Iraqi oil assets")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest012 = new Question(
"Question 12",
0,
"Why did Captain John Peterson receive a CBE from the Queen in 2006? <br />",
resp,
comm,
corr,
"<small>According to the <a target=\"_blank\" href=\"http://politics.guardian.co.uk/foreignaffairs/story/0,,1759894,00.html\"><u>Guardian April 24 2006</u></a><font color=\"#0000ff\"><u> Guardian,</u></font> the Pentagon says his CBE was for&#160; leading British and American Focres in the &quot;campaign to secure Iraqi Oil Assets&quot;</small>",
valu,
2,
0,
0,
"chief.gif");

resp=new Array("To seek to separate the combatants (Israel &amp; Egypt)","To remove the risk to free passage through the canal (eg. for tankers)","To stop and prevent a resumption of hostilities","To deal with the outstanding problems in the Middle East")
corr=new Array("1","1","1","1")
comm=""
valu=""
quest013 = new Question(
"Question 13",
1,
"During the 'Suez Crisis' what reasons did the Conservative government give for making war on Egypt?",
resp,
comm,
corr,
"<small>Each of these reasons was proferred by the government during the months leading to war. <a target=\"_blank\" href=\"http://www.guardian.co.uk/greatspeeches/bevan/0,,2060115,00.html\"><u>Aneurin Bevan - in one of the 20 greatest speeches on the 2oth century</u></a> pulled each of the reasons apart ending with: &quot;I commend to honourable members, a very fine cartoon in Punch by Illingworth and called '<a target=\"_blank\" href=\"http://www.punchcartoons.com/product_info.php?cPath=14_45_63&products_id=1423\"><u>Desert Victory</u></a><font face=\"Times New Roman\" size=\"4\">'</font>. There we see a black, ominous, sinister background and a pipeline broken, pouring oil into the desert sands. How on earth do honourable members opposite image that hundreds of miles of pipeline can be kept open if the Arabs do not want it kept open?&quot;</small>",
valu,
1,
0,
0,
"desert.jpg");

resp=new Array("Assassination of Arch Duke Ferdinand","Ensure Democracy to Europe","Stop Germany building Railway from Berlin to Bagdad.","Protect neutrality of Belgium (while they were protecting their rubber interests in Congo)")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest014 = new Question(
"Question 14",
0,
"What was the cause of the First World War?",
resp,
comm,
corr,
"<small>The <a target=\"_blank\" href=\"http://findarticles.com/p/articles/mi_m0KNN/is_2000_Winter/ai_80305799\"><font face=\"Times New Roman\" size=\"4\"><u>Royal Navy switched from coal to oil</u></font></a> in the early years of 20th century. Churchill noted, &quot;the advantages conferred by liquid fuel were inestimable.&quot; Germany wanted to do the same but had no oil producing colonies. So they started to&#160; build a railway line from Berlin to Baghdad. They had already rail to Constantinople (now Istanbul), so wanted to build further 900 miles - to Baghdad. UK, France and Russia were opposed.&#160; The 1st&#160; British regiment - Dorset Regiment, to be deployed in the 1st World War, did not go to France, but went to Basra - along with another 51 other British Divisions! <br>For list of <a target=\"_blank\" href=\"http://www.firstworldwar.com/battles/mf.htm\"><font face=\"Times New Roman\" size=\"4\"><u>Actions in First World War in Iraq</u></font></a><br>For much more See online video of <a target=\"_blank\" href=\"http://www.indybay.org/newsitems/2006/04/12/18149991.php\"><font face=\"Times New Roman\" size=\"4\"><u>Robert Newman's History of Oil</u></font></a></small>",
valu,
2,
0,
0,
"transportmules.jpg");

resp=new Array("Iran","Iraq","N.Korea","Syria")
corr=new Array("1","1","1","1")
comm=""
valu=""
quest015 = new Question(
"Question 15",
1,
"Which countries have changed their currency for trading in oil, from US dollars to Euros? (Tick as many as you like).",
resp,
comm,
corr,
"<small>First Iraq, then Iran and then N.Korea changed its currency for oil trading from US dollars to Euros between 200 and 2002. Syria decided to peg its reserves to Euros in 2006. <a target=\"_blank\" href=\"http://www.globalresearch.ca/articles/CLA410A.html\"><font face=\"Times New Roman\" size=\"4\"><u>Will Iran open up a bourse to trade Oil in Euros?</u></font></a></small>",
valu,
1,
0,
0,
"eurodollar.jpg");

resp=new Array("BP (UK)","Chevron (US)","Statoil (Norway)","Total (US)")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest016 = new Question(
"Question 16",
0,
"<font face=\"Arial\" size=\"4\">The day before the Israeli air (July 13) strikes in 2006, the BTC (Baku Tibilis Ceyhan)&#160; pipeline was inaugurated in Turkey, when the Turkish Prime Minister called it the &ldquo;Silk Road of the 21<sup>st</sup> century&rdquo;). Who were main oil companies involved? </font>",
resp,
comm,
corr,
"<small>BP are main shareholders with 30%, others each have 5-9%</small>",
valu,
2,
1,
0,
"BTC.jpg");

resp=new Array("Turkey","Russia","Israel","Iran")
corr=new Array("1","0","1","0")
comm=""
valu=""
quest017 = new Question(
"Question 17",
1,
"<font face=\"Arial\" size=\"4\">Who<b> </b>are the main beneficiaries of the BTC pipeline (tick as many as you want)</font>",
resp,
comm,
corr,
"<small><font face=\"Arial\" size=\"4\">Russia has objected from the outset to the pipeline and Iran misses out. Neither Turkey nor Israel have much oil of their own. Turkey hopes its' control over the pipeline will improve its' negotiating position in west &hellip;and Israel, with whom -<i>The new Turkish-Israeli proposal would see the transfer of water, electricity, natural gas and oil to Israel via four underwater pipelines (bypassing Syria and Lebanon). </i></font><font face=\"Arial\" color=\"#0000ff\" size=\"4\"><i><u>M</u></i></font><a http://www.jpost.com/servlet/Satellite?cid=1145961328841&pagename=JPost%2FJPArticle%2FShowFull><font face=\"Arial\" size=\"4\"><i><u>ore</u></i></font></a> <br><br /><br><font face=\"Arial\" size=\"4\">Then Israel will use </font><a target=\"_blank\" href=\"http://www.pinr.com/report.php?ac=view_report&report_id=537&language_id=1\"><font face=\"Arial\" size=\"4\"><u>TIpline</u></font></a><font face=\"Arial\" size=\"4\">&#160;to move oil from Ceyhan through to Red Sea&hellip;and hence Far East. It would mean Israel could become a global energy player...</font><br></small>",
valu,
2,
0,
0,
"pipe1.jpg");

resp=new Array("Poverty Eradication law","Reconstruction according to international sustainable Standards","Hydrocarbon Law","Official Civilian Death Count Regulation")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest018 = new Question(
"Question 18",
0,
"Which law does the present Iraqi governmentwant to introduce?",
resp,
comm,
corr,
"<small>The Iraqi government proposes a <a target=\"_blank\" href=\"http://www.iraqdevelopmentprogram.org/idp/news/business/newolilaw.htm\"><font face=\"Times New Roman\" size=\"4\"><u>Hydrocarbon Law</u></font></a><font size=\"4\">.</font> &quot;<font face=\"TimesNewRoman\">The proposed Iraq hydrocarbon law would take the majority of Iraq.s oil out of the exclusive</font><br><font face=\"TimesNewRoman\">hands of the Iraqi government and open it to international oil companies for a generation or more. Latest details ( including threatened strikes by International Federation of Oil Unions) from </font><a target=\"_blank\" href=\"http://www.handsoffiraqioil.org/\"><font face=\"TimesNewRoman\"><u>Hands Off Iraqi Oil</u></font></a><font face=\"TimesNewRoman\">&#160;</font><br><br /><br>According to the Iraq Development Program (sic) says about this law:<br />&quot;the implications for international oil companies looking to work in Iraq are huge...<br>All international oil companies will now be looking at Iraq as a viable investment destination, though the Iraqi Government has stressed the need to be selective in choosing its partners, not always looking for the best financial options but also the best strategic partners, with companies from the US, Europe, Russia, China and India all having the opportunity to invest in Iraq.&quot;</small>",
valu,
2,
0,
0,
"pump.jpg");

resp=new Array("Sunni v Kurds","Multinational Oil Corporations","Two Shiite political factions","Al Queda fighting Communists")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest019 = new Question(
"Question 19",
0,
"A new Instability! <br />In early April 2007, a bomb broke a pipeline connecting the Rumaila oil field, which produces nearly half or Iraq's 2 million barrels per day, to the southern network around Basra. This is Iraq's second-largest city, the centre of its oil industry and the port through which all Iraq's income flows. Who is liekly to be responsible for this attack?",
resp,
comm,
corr,
"<small>Two Shiite political factions - cleric Moqtada al-Sadr's party and the Fadila Party, led by Grand Ayatollah Muhammad al-Yaacoubi, escalated tensions in the past few weeks, locked in violent street battles in Basra in a struggle for control of the city and inside the ruling central government in Baghdad. More in '<a target=\"_blank\" href=\"http://www.globalpolicy.org/security/issues/iraq/election/2007/0413violencethreatens.htm\"><font face=\"Times New Roman\" size=\"4\"><u>Violence threatens Oil</u></font></a><font face=\"Times New Roman\" size=\"4\">'</font><br></small>",
valu,
2,
0,
0,
"basra.jpg");

resp=new Array("Smash the Taliban","Shut down Poppy production","Build an Oil Pipeline","Democratise the Warlords")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest020 = new Question(
"Question 20",
0,
"Why did the US - and afterwards the NATO forces, invade Afghanistan?",
resp,
comm,
corr,
"<small><a target=\"_blank\" href=\"http://commdocs.house.gov/committees/intlrel/hfa48119.000/hfa48119_0.htm\" \\l \"33\"><u>The House of Representatives in Feb 1998</u></a> said: &quot;The only other possible route (for the proposed pipeline) is across Afghanistan, which has its own unique challenges.... CentGas can not begin construction until an internationally recognized Afghanistan Government is in place.&quot; In 2002, leaders of Afghanistan, Pakistan and Turkmenistan agreed to construct a $2bn pipeline to bring gas from Central Asia to the sub-continent.</small>",
valu,
2,
0,
0,
"map_afghanistan.gif");

resp=new Array("Oil &amp; Gas reserves","Keep Islanders happy and kick out &quot;Argies&quot;","Weapons of Mass Destruction","Bring Democracy")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest021 = new Question(
"Question 21",
0,
"What did the UK go to war for over the Falklands in 1980s?",
resp,
comm,
corr,
"<small>We know most people will say &quot;No 2&quot;, but you know the proper answer is No1. And in 2007, Britain is preparing territorial claims on tens of thousands of square miles of the Atlantic Ocean floor around the Falklands. The UK is claiming rights under the sea under the <a target=\"_blank\" href=\"http://www.un.org/Depts/los/clcs_new/clcs_home.htm\"><u>UN Commission on the Limits of the Continental Shelf</u></a> to an immense oil field (60mb). <a target=\"_blank\" href=\"http://politics.guardian.co.uk/foreignaffairs/story/0,,2174660,00.html\"><u>More</u></a> <br><br /><br></small>",
valu,
1,
0,
0,
"falklands.jpg");

resp=new Array("Negotiate with local Women","Increase US forces in Region","Establish UN agreed Protocols","Reduce Extraction rates")
corr=new Array("1","1","0","0")
comm=""
valu=""
quest022 = new Question(
"Question 22",
1,
"How will US Oil companies sort out forthcoming problems in Nigeria -&#160; which in the future could account for as much as 25 percent of all U.S oil imports? (Tick as many as you like)",
resp,
comm,
corr,
"<small><a target=\"_blank\" href=\"http://news.bbc.co.uk/1/hi/world/africa/2132494.stm\"><u>Chevron did a deal</u></a> with local Nigerian women protesting peacefully in 2002, although the resulsts not entirely clear. Meanwhile, according to Pentagon sources: &quot;A key mission for U.S. forces in Africa would be to ensure that Nigeria's oil fields are secure.&quot; More in <a target=\"_blank\" href=\"http://www.motherjones.com/news/dailymojo/2004/10/10_504.html\"><u>Oil Wars</u></a>.<br><br /><br></small>",
valu,
2,
0,
0,
"protest2.jpg");

resp=new Array("Iran","Indonesian Sea","West Africa","Russia")
corr=""
comm=""
valu=""
quest023 = new Question(
"Question 23",
0,
"Where will be the next war about oil?",
resp,
comm,
corr,
"<small><i>We are working on this crucial question...</i><br>Iran must be the immediate favourite, with all the noises from US about axis of evil, nuclear energy, not to mention that two of its neighbours - Iraq and Afghanisatn have US troops already. <br />However in the the longer term, it is the sea around Indonesia that both US and China have their eye on.<br />&#160;But we cant rule out West Africa, where resistance is growing although taking a different form - mainly kidnapping. <br />And the cold war seems to be warming up too..</small>",
valu,
1,
0,
0,
"");

questions = new Array (
quest001,quest002,quest003,quest004,quest005,quest006,quest007,quest008,quest009,quest010,quest011,quest012,quest013,quest014,quest015,quest016,quest017,quest018,quest019,quest020,quest021,quest022,quest023)

function doQuestion(quest)
{
var numdo;
var numord=eval(quest+1);
var i=-1, ii, type, myname, gadget;
type=questions[quest].type;
numdo=type>=3?1:questions[quest].response.length;


document.writeln ("<a name=\""+questions[quest].qname+"\"></a>")
document.write("\n")
document.write("      <table width=\"89\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"27\">\n")
document.write("        <tr> \n")
document.write("          <td background=\"s_tab.gif\" align=\"center\" class=\"questionnumber\">")
document.write(numord)
document.write("</td>\n")
document.write("        </tr>\n")
document.write("      </table>\n")
document.write("      <table width=\"470\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n")
document.write("        <tr> \n")
document.write("          <td align=\"left\" valign=\"bottom\"> \n")
document.write("            <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n")
document.write("              <tr> \n")
document.write("                <td><img src=\"s_table_up_sx.gif\" width=\"11\" height=\"10\"></td>\n")
document.write("                <td background=\"s_table_up_bord.gif\" width=\"100%\"><img src=\"s_table_up_bord.gif\" width=\"191\" height=\"10\"></td>\n")
document.write("                <td><img src=\"s_table_up_dx.gif\" width=\"10\" height=\"10\"></td>\n")
document.write("              </tr>\n")
document.write("            </table>\n")
document.write("          </td>\n")
document.write("        </tr>\n")
document.write("        <tr> \n")
document.write("          <td> \n")
document.write("            <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\">\n")
document.write("              <tr> \n")
document.write("                <td background=\"s_table_sx_bord.gif\" align=\"right\" valign=\"top\"> \n")
document.write("                  <img src=\"s_table_sx_bord.gif\" width=\"11\" height=\"10\">\n")
document.write("                </td>\n")
document.write("                <td width=\"100%\" bgcolor=\"D4D0C8\" align=\"left\" valign=\"top\">\n")
document.write("                  <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n")
document.write("                    <tr>\n")
document.write("                      <td colspan=\"2\">\n")
document.write("                        <table >\n")
document.write("                          ")
if (questions[quest].img!="") {
document.write("\n")
document.write("                          <td width=1>\n")
document.write("                            <img border=\"0\" src=\"")
document.write(questions[quest].img)
document.write("\">\n")
document.write("                          </td>\n")
document.write("                          ")
}
document.write("\n")
document.write("                          <td class=question valign=\"top\">\n")
document.write("                            ")
document.writeln(questions[quest].qstring)
document.write("\n")
document.write("                          </td>\n")
document.write("                        </table>\n")
document.write("                      </td>\n")
document.write("                    </tr>\n")
document.write("                    <tr height=10></tr>\n")
document.write("                    ")
for (i=0; i<numdo; i++) {
myname=questions[quest].qname;
gadget="radio";
if (type>=3) gadget="text";
else if (type==1) {
myname+="_"+(i<9?"0":"")+(i+1);
gadget="checkbox";}
document.write("\n")
document.write("                    <tr>\n")
document.write("                      <td width=\"1%\" valign=\"top\">")
document.write(type==7?"<textarea name=\""+myname+"\" rows=5 cols=30 class=\"input\">":" <input type="+gadget+" name=\""+myname);
if (type<3) document.write("\" value=\""+i+"\">\n")
else document.write(type==7?"</textarea>":"\" class=\"input\" value=\"\">\n")
document.write("</td>\n")
document.write("                      <td width=\"99%\" class=answer align=\"left\">")
if (type<3) document.write(questions[quest].response[i]);
document.write("</td>\n")
document.write("                    </tr>\n")
document.write("                    ")
}
document.write("\n")
document.write("                    <tr height=5>\n")
document.write("                      <td colspan=\"2\"></td>\n")
document.write("                    </tr>\n")
document.write("                  </table>\n")
document.write("                 </td>\n")
document.write("                <td background=\"s_table_dx_bord.gif\"><img src=\"s_table_dx_bord.gif\" width=\"10\" height=\"10\"></td>\n")
document.write("              </tr>\n")
document.write("            </table>\n")
document.write("          </td>\n")
document.write("        </tr>\n")
document.write("        <tr> \n")
document.write("          <td> \n")
document.write("            <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n")
document.write("              <tr> \n")
document.write("                <td><img src=\"s_table_dn_sx.gif\" width=\"11\" height=\"9\"></td>\n")
document.write("                <td background=\"s_table_dn_bord.gif\" width=\"100%\"><img src=\"s_table_dn_bord.gif\" width=\"191\" height=\"9\"></td>\n")
document.write("                <td><img src=\"s_table_dn_dx.gif\" width=\"10\" height=\"9\"></td>\n")
document.write("              </tr>\n")
document.write("            </table>\n")
document.write("          </td>\n")
document.write("        </tr>\n")
document.write("      </table>\n")
document.write("	  <br>\n")
document.write("      ")
}
function doTest() {
var count, i;

count=questions.length;
for (i=0; i<count; i++) doQuestion(i);
}
function fill(s,l){
s=s+""
for (y=1;y<=l;y++)
if (s.length>=l) break; else s="0"+s;
return s
}
function CheckQName(wapf,ii,i,multi,selection){
var len;
if (!multi) return(wapf.elements[ii].name==questions[i].qname);
len=questions[i].qname.length;
if (wapf.elements[ii].name.substring(0,len)!=questions[i].qname) return false;
if (wapf.elements[ii].name.substring(len,len+1)!="_") return false;
if (eval(wapf.elements[ii].name.substring(len+1,len+3))==(selection+1)) return true;
return false;
}
function errore(uno,due,tre)
{
if (!errori) global[1]="<H3>You have made the following errors</H3>";
++errori;
cachewrite("<p><b>"+uno+"</b><br>"+due+"<br>"+mycomment+tre+"</p>",2);
mycomment="";
}
function testIE5plus(){
var pos=navigator.appVersion.lastIndexOf('MSIE ');
if (pos != -1) {
pos+=5;
if (eval(navigator.appVersion.charAt(pos))>4)
return true;}
return false;}
function correct(wapf)
{
var i, ii, t, re, tmp, selection, multi, multipage=0, type, isnull, iswrong, iscorrect, evaluation=0, total=0, udat;
errori=waitTime=0;
udat=new Array();
for (i=0, ii=0; i<wapf.elements.length; i++)
{tmp=wapf.elements[i];
if (tmp.name.substring(0,13)=="Quiz.UserData"){
t=tmp.name.substring(14,tmp.name.length);
re=new RegExp("_", "g");
t=t.replace(re," ");
udat[ii++]=t+": <i>"+tmp.value+"</i><br>";
if (opera) tmp.value="";}}
global[0]=global[2]="";
global[1]="<h3>Congratulations, you haven't made any errors</h3>";
cachewrite("<html><head><title>Results</title><BASE target='_blank'></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
now= new Date()
cachewrite("<small><p>"+fill((now.getMonth()+1),2)+"/"+fill(now.getDate(),2)+"/"+now.getYear()+"&nbsp;&nbsp;"+fill(now.getHours(),2)+":"+fill(now.getMinutes(),2)+"</p>",0)
cachewrite("<b>Oil and War</b><br><br>\n",0);
if (udat.length>0) {
cachewrite("<b>Information</b><br>\n",0);
for (i=0; i<udat.length; i++) cachewrite(udat[i],0);}
if (opera7 && multipage) {
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.display=id2.style.display="block";}
document.getElementById('wq_final').style.display='block';
}

for (i=0; i<questions.length; i++) {
if (opera && multipage) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.visibility=id2.style.visibility="visible";}
type=questions[i].type;
if (type==1) multi=1;
else multi=0;
isnull=true;
iscorrect=false;iswrong=false;
selection=0;
evaluation=0;
mycomment="";
for (ii=0; ii<wapf.elements.length; ii++) {
if (CheckQName(wapf,ii,i,multi,selection)) {
if (type>=3 && wapf.elements[ii].value!="") {
isnull=false;
if (wapf.elements[ii].value.toLowerCase()==questions[i].corrects.toLowerCase()) iscorrect=true;
else iswrong=true;
++selection;}
else if (wapf.elements[ii].checked) {
if (questions[i].score!="") evaluation+=questions[i].score[selection];
if (isnull) isnull=false;
if (questions[i].corrects[selection]=="1") iscorrect=(iswrong==false)?true:false;
else {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  shouldn't have been selected.",questions[i].explan)
}
if (questions[i].comment!="" && questions[i].comment[selection]!="")
mycomment+=((iscorrect || questions[i].corrects=='')?"<b>"+questions[i].qname+"</b><br>":"")+"<small>"+questions[i].comment[selection]+"</small><br>";
} else {
if (questions[i].corrects[selection]=="1") {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  should have been selected.",questions[i].explan);
}}
++selection;
}}
if (multi==false && (isnull || iswrong)) {
var okresp="", z;
if (type>=3) okresp=questions[i].corrects;
else {
for (z=0; z<questions[i].corrects.length; z++) {
if (questions[i].corrects[z]==1) {
okresp=questions[i].response[z];
break;
}}}
if (okresp!="") errore(questions[i].qname,"The right answer was <i>"+okresp+".</i>",questions[i].explan);
}
if (mycomment!="") cachewrite(mycomment,2);
if (questions[i].corrects!="") ++qright;
if (isnull) evaluation+=questions[i].ifnull;
else if (iswrong) evaluation+=questions[i].ifwrong;
else if (iscorrect) evaluation+=questions[i].ifcorrect;
total+=evaluation;}
if (qright==0) global[1]="<br>";
if (errori) cachewrite("<br><b>You have made "+errori+" "+(errori==1?"error":"errors")+".</b>",2);
cachewrite("<br><b>Total score: "+total+".</b><br>",2);

cachewrite("</small><hr noshade><center><form>",2)
printest=(((navigator.appName=="Netscape") && (navigator.appVersion.charAt(0)>="4")) || (testIE5plus() == true))? "print()": "alert('This button can be used with Netscape Navigator 4 or Microsoft Internet Explorer 5 only. If you want to print with other browsers, please select the Print command in the File menu.')"
cachewrite("<input type='button' value='Print...' onClick='"+printest+"'>&nbsp;&nbsp;&nbsp;&nbsp;",2)
cachewrite("<input type='button' value='Close' onClick='window.close()'></form></center>",2)
cachewrite(aknw,2)
winr=window.open('','wapres', 'titlebar=1,location=0,directories=0,menubar=1,toolbar=0,scrollbars=1,resizable=1,status=1')
for (i=0; i<3; i++) winr.document.write(global[i]);winr.document.close()
if ((opera || opera7) && multipage) {
document.forms[0].elements[0].value='Print...';
document.forms[0].elements[1].value='Close';
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
opera?id.style.visibility=id2.style.visibility="hidden":id.style.display=id2.style.display="none";}}
}
aknw="<br><p align='center'><small><small>Created and managed with <a title='Click here to visit WebQuiz site' href='http://www.smartlite.it/go.asp?OLDLP' target = '_blank'>SmartLite WebQuiz</a></small></small></p>"

