

///////////////////////////////////////////////////////////////////////////////////////////////
/* 	ponder.js
	Code was created by C. Eton. Statement author unknown.  
 
 	Only 1 item need to be edited:

	1.  The Statements array variable.

*///////////////////////////////////////////////////////////////////////////////////////////////



///////////////////////////////////////////////////////////////////////////////////////////////
// List the statements to display.  Add statements as necessary.  


var Statements = new Array(

	'Which was the first 8000 metre peak to be climbed? Ans: Annapurna ', 
	'Who was the first person to climb all 14 8,000 metre peaks in 1986? Ans: Reinhold Messner ', 
	'Statistically, which is the most deadly 8,000 metre peak? Ans: Annapurna ', 
	'He was the first American to climb all 14 8,000 metre peaks, and became the 12th person ever to achieve this feat when he climbed Annapurna in May 2005? Ans: Ed Viesturs ', 
	'After decades of attempts, which very difficult 8,000 metre peak was finally climbed in winter on Feb 2, 2009? Ans: Makalu ',
	'11 women have successfully climbed all 14 8,000 metre peaks. Ans: False ',
	'Which of the following is not a climbing feature on K2? Ans: Cornice Traverse ',
	'There are two broad techniques in high altitude mountaineering. The first is Expedition style, where a large team will incorporate high altitude porters, set up prestocked camps and fix ropes to the mountain. The second general technique involves smaller teams carrying everything they need for their ascnt on their backs, traveling light and quickly, without prestocked camps, porters and fixed ropes. Usually supplementary oxygen isnt used either. What is this self-sufficient style called? Ans: Alpine Style ',
	'Which are the five 8,000 metre peaks located in Pakistan? Ans: K2, Nanga Parbat, Gasherbrum I, Gasherbrum II and Broad Peak ', 
	'There is an 8,000 metre peak with relatively large deposits of gold and platinum on its summit ridge. Ans: False '
);

/*
	GetStatement( ) is the primary function.  It assumes the following:
	
	1.  The HTML file contains a form named "statementform".
	2.  Within the statement form, there is a textarea or textbox named "statement".               */

function GetStatement(outputtype) //modified by javascriptkit.com to either write out result or set innerHTML prop
{
	if(++Number > Statements.length - 1) Number = 0;
	if (outputtype==0)
	document.write(Statements[Number])
	else if (document.getElementById)
	document.getElementById("ponder").innerHTML=Statements[Number];
}


//  The GetRandomNumber( ) function extracts a random number within a given range.


function GetRandomNumber(lbound, ubound) 
{
	return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}


// The Number variable keeps track of which statement to display.  It will start at a random point.                

var Number = GetRandomNumber(0, Statements.length - 1);







