

//<![CDATA[

<!--

// BrowserCheck Object

function BrowserCheck() {
	var b = navigator.appName
//HBS extension
	this.mac = (navigator.appVersion.indexOf('Mac') != -1)
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
	this.CRAPBrowser = (this.ie4 && this.mac); //Cannot Resolve Addresses Properly
}

is = new BrowserCheck();

var LocFolder = GetFolder(window.location.href);
function GetFolder(LocPath){
	LocPath = ReplaceStuff('\'','%27',LocPath);
	var i = LocPath.lastIndexOf('/');
	if (i<0){i=LocPath.lastIndexOf('\\')};
	return LocPath.substring(0,i);
}

function CombineURLs(InURL){
	var i = InURL.indexOf('../');
	var s = LocFolder;
	while (i >- 1){
		s = GetFolder(s);
		InURL = InURL.substring(3,InURL.length);
		i = InURL.indexOf('../');
	}
	return s + '/' + InURL;
}

x = new Array();
function ResolveURLs(InText,Attribute){
	x.length=0;
	var Temp = InText.toLowerCase();
	var z;
	var AttLen = Attribute.length + 2;
	var y=Temp.lastIndexOf(Attribute + '="');
	while (y>-1){
		var sLoc = y+AttLen;
		if (Temp.substring(sLoc,sLoc+5) != 'http:'){
			x[x.length]=new Array();
			x[x.length-1][0] = sLoc;
			z = Temp.indexOf('"',sLoc);
			x[x.length-1][1] = z;
			x[x.length-1][2] = InText.substring(sLoc,z);

		}
		Temp = Temp.substring(0,y);
		y=Temp.lastIndexOf(Attribute + '="');
	}
	for (var j=0; j<x.length; j++){
		InText = InText.substring(0,x[j][0]) + CombineURLs(x[j][2]) + InText.substring(x[j][1], InText.length);
	}
	return InText;
}



function ResolveAllURLs(Stuff){
	Stuff = ResolveURLs(Stuff,'href');
	Stuff = ResolveURLs(Stuff,'src');
	Stuff = ResolveURLs(Stuff,'parent.location');
	return Stuff;
}


var ExBGColor = '#ffcc99';



var PageBGColor = '#ffffff';



var NavBarColor = '#000066';


var TextColor = '#000000';
var CurrQNum = 0;
var ALetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var CorrectIndicator = ':-)';
var IncorrectIndicator = 'X';
var YourScoreIs = 'Dein Ergebnis ist ';
var Tries = 0;
var CorrectChoices = 0;
var ContinuousScoring = true;
var CorrectFirstTime = 'Beim ersten Versuch richtig beantwortete Fragen: ';var ExerciseTitle = 'Das gro&#223;e Westk&#252;ste USA-Quiz';
var ExerciseSubtitle = 'Mit diesem kleinen Multiple-Choice Test kannst Du Dein Wissen &#252;ber die von mir besuchten Orte im S&#252;dwesten der USA unter Beweis stellen. Die L&#246;sungen zu allen Fragen stehen irgendwo auf www.westkueste-usa.de.';
var Instructions = 'W&#228;hle die richtige(n) Antwort(en) f&#252;r jede Frage.'; //'';
var ShuffleQs = true;
var ShuffleAs = true;
var DefaultRight = 'Korrekt!';
var DefaultWrong = 'Sorry! Versuch\'s nochmal.';
var QsToShow = 10;
var ShowOneByOne = true;
var ReadingURL = '';
var EraseFeedback = true;
var Score = 0;

var PreviousPage = history.length;







var NavBar='';



var TitleCode = '<tr><td align="center" valign="middle" bgcolor="#ffffff">';
TitleCode += '<font size="+1" face="Geneva,Arial" color="#000033">' + ExerciseTitle + '</font><br />';
TitleCode += '<font size="-1" face="Geneva,Arial" color="#000033">' + ExerciseSubtitle + '<br />';
TitleCode += '</font></td></tr>';

var QButtonsOpener = '<table border="0" width="85%" cellpadding="10">';
QButtonsOpener += '<tr><td align="center" valign="middle"><form>';
QButtonsOpener += '<font size="+1"><input type="button" value="&lt;=" onclick="parent.ChangeQ(-1)"></input>';
var QButtonsCloser = '<input type="button" value="=&gt;" onclick="parent.ChangeQ(1)"></input>';
QButtonsCloser += '</font></form></td></tr></table>';

var TableOpener = '<form name="QForm">';
TableOpener += '<table border="0" width="85%">';
var QRow = '<tr><td valign="top" bgcolor="#ffcc99" align="right">';
QRow += '<font size="+1" face="Geneva,Arial" color="#000000">[QNumber]</font></td>';
QRow += '<td colspan="3" valign="top" bgcolor="#ffcc99"><font size="-1" face="Geneva,Arial" color="#000000">[Question]<br />&nbsp;';
QRow += '</font></td></tr>';

var ARow = '<tr><td></td><td valign="top" bgcolor="#ffcc99"><input type="text" value=" " size="3" name="FB_[QNum]_[ANum]"></input></td>';
ARow += '<td valign="top" bgcolor="#ffcc99"><input type="button" value="[ALetter]" OnClick="parent.CheckAnswer([QNum],[ANum])"></input></td>';
ARow += '<td width="100%" bgcolor="#ffcc99"><font size="-1" face="Geneva,Arial" color="#000000">[Ans]</font></td></tr>';

var MARow = '<tr><td></td><td valign="top" bgcolor="#ffcc99" colspan="3"><input type="checkbox" name="A_[QNum]_[ANum]" value="[Correct]"></input>';
MARow += '<font size="-1" face="Geneva,Arial" color="#000000">[Ans]</font></td></tr>';

var CheckButton = '<tr><td></td><td valign="top" bgcolor="#ffcc99" ><input type="button" value="&#220;berpr&#252;fe Eingabe"';
CheckButton += ' onclick="parent.CheckMulti([QNum])"></input></td></tr>';

TableCloser = '</table></form>';

function GoBack(){
	var BackSkip = history.length - PreviousPage;
	if (BackSkip > 0){
		history.go((BackSkip+1)*-1);
	}
	else{
		parent.history.back();
	}
}

function ReduceItems(){
	var ItemToDump=0;
	var j=0;
	while (I.length > QsToShow){
		ItemToDump = Math.floor(I.length*Math.random());
		for (j=ItemToDump; j<(I.length-1); j++){
			I[j] = I[j+1];
		}
		I.length = I.length-1;
	}
}

function Shuffle(InArray){
	Temp = new Array();
	var Len = InArray.length;

	var j = Len;

	for (var i=0; i<Len; i++){
		Temp[i] = InArray[i];
	}

	for (i=0; i<Len; i++){
		Num = Math.floor(j  *  Math.random());
		InArray[i] = Temp[Num];

		for (var k=Num; k < j; k++) {
			Temp[k] = Temp[k+1];
		}
		j--;
	}
	return InArray;
}

function WriteFeedback(Feedback) {
//Build the output string
	var OutString = '';
	OutString += '<html>';
	OutString += '<body  background="http://www.westkueste-usa.de/images/Wood.jpg" bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000cc">';
	OutString += '<center><table border="0" cellpadding="5" cellspacing="1" width="85%">';
	OutString += NavBar;
	if (Feedback.length>0){
		OutString += '<tr><td bgcolor="#ffcc99" align="center">'; 
		OutString += '<font face="Geneva,Arial" size="-1" color="#000000">';
		OutString += Feedback;
		OutString += '</font></td></tr>'
	}
	OutString += '</table></center></body></html>';

	if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);}

//Write it to the frame
	TopFrame.document.clear();
	TopFrame.document.open();
	TopFrame.document.write(OutString);
	TopFrame.document.close();
}

function StartUp(){




//Reduce array if required
	if (QsToShow < I.length){
		ReduceItems();
	}

//Shuffle stuff if required

	if (ShuffleQs == true){
		I = Shuffle(I);
	}

	if (ShuffleAs == true){
		for (var i=0; i<I.length; i++){
			I[i][1] = Shuffle(I[i][1]);
		}
	}

//Create arrays
	CreateStatusArrays();



//Show the first question or all of them
	if (ShowOneByOne == false){
		ShowAllQs();
	}
	else{
		ShowQuestion(CurrQNum);
	}

//Write the top frame
	WriteFeedback(Instructions);
}


I = new Array();

I[0] = new Array();
I[0][0]='Welche historische Person symbolisiert die Statue vor dem Coit-Tower in San Francisco?';
I[0][1] = new Array();
I[0][1][0] = new Array();
I[0][1][0][0]='John Muir';
I[0][1][0][1]='';
I[0][1][0][2] = 0;
I[0][1][1] = new Array();
I[0][1][1][0]='Walt Disney';
I[0][1][1][1]='';
I[0][1][1][2] = 0;
I[0][1][2] = new Array();
I[0][1][2][0]='Christopher Kolumbus';
I[0][1][2][1]='';
I[0][1][2][2] = 1;
I[0][1][3] = new Array();
I[0][1][3][0]='Lillie Hitchcock Coit';
I[0][1][3][1]='';
I[0][1][3][2] = 0;
I[0][2] = 0;

I[1] = new Array();
I[1][0]='Was bedeutet der Begriff "Alcatraz"?';
I[1][1] = new Array();
I[1][1][0] = new Array();
I[1][1][0][0]='Gef&#228;ngnisinsel';
I[1][1][0][1]='';
I[1][1][0][2] = 0;
I[1][1][1] = new Array();
I[1][1][1][0]='Insel der Pelikane';
I[1][1][1][1]='';
I[1][1][1][2] = 1;
I[1][1][2] = new Array();
I[1][1][2][0]='Fels in der Brandung';
I[1][1][2][1]='';
I[1][1][2][2] = 0;
I[1][1][3] = new Array();
I[1][1][3][0]='Insel der Seel&#246;wen';
I[1][1][3][1]='';
I[1][1][3][2] = 0;
I[1][1][4] = new Array();
I[1][1][4][0]='Festung';
I[1][1][4][1]='';
I[1][1][4][2] = 0;
I[1][2] = 0;

I[2] = new Array();
I[2][0]='Wie hei&#223;t das Fort unterhalb der Golden Gate Bridge?';
I[2][1] = new Array();
I[2][1][0] = new Array();
I[2][1][0][0]='Fort Point';
I[2][1][0][1]='';
I[2][1][0][2] = 1;
I[2][1][1] = new Array();
I[2][1][1][0]='Fort Bragg';
I[2][1][1][1]='';
I[2][1][1][2] = 0;
I[2][1][2] = new Array();
I[2][1][2][0]='Fort Mason';
I[2][1][2][1]='';
I[2][1][2][2] = 0;
I[2][1][3] = new Array();
I[2][1][3][0]='Fort Ross';
I[2][1][3][1]='';
I[2][1][3][2] = 0;
I[2][1][4] = new Array();
I[2][1][4][0]='Fort Baker';
I[2][1][4][1]='';
I[2][1][4][2] = 0;
I[2][2] = 0;

I[3] = new Array();
I[3][0]='Die k&#252;nstliche Insel "Forbes Island" bei Pier 39 in San Francisco beherbergt...';
I[3][1] = new Array();
I[3][1][0] = new Array();
I[3][1][0][0]='... ein Restaurant';
I[3][1][0][1]='';
I[3][1][0][2] = 1;
I[3][1][1] = new Array();
I[3][1][1][0]='... ein Museum';
I[3][1][1][1]='';
I[3][1][1][2] = 0;
I[3][1][2] = new Array();
I[3][1][2][0]='... einen Souvenirladen';
I[3][1][2][1]='';
I[3][1][2][2] = 0;
I[3][2] = 0;

I[4] = new Array();
I[4][0]='Wie hie&#223; der Chefingenieur, der den Bau der Golden Gate Bridge leitete?';
I[4][1] = new Array();
I[4][1][0] = new Array();
I[4][1][0][0]='Josef B. Strauss';
I[4][1][0][1]='';
I[4][1][0][2] = 1;
I[4][1][1] = new Array();
I[4][1][1][0]='Levi Strauss';
I[4][1][1][1]='';
I[4][1][1][2] = 0;
I[4][1][2] = new Array();
I[4][1][2][0]='Johann Strauss';
I[4][1][2][1]='';
I[4][1][2][2] = 0;
I[4][1][3] = new Array();
I[4][1][3][0]='Franz Josef Strauss';
I[4][1][3][1]='';
I[4][1][3][2] = 0;
I[4][2] = 0;

I[5] = new Array();
I[5][0]='Welche der folgenden Sehensw&#252;rdigkeiten befinden sich im Golden Gate Park in San Francisco?';
I[5][1] = new Array();
I[5][1][0] = new Array();
I[5][1][0][0]='Strybing Arboretum';
I[5][1][0][1]='';
I[5][1][0][2] = 1;
I[5][1][1] = new Array();
I[5][1][1][0]='Japanese Tea Garden';
I[5][1][1][1]='';
I[5][1][1][2] = 1;
I[5][1][2] = new Array();
I[5][1][2][0]='Conservatory of Flowers';
I[5][1][2][1]='';
I[5][1][2][2] = 1;
I[5][1][3] = new Array();
I[5][1][3][0]='California Academy of Sciences';
I[5][1][3][1]='';
I[5][1][3][2] = 1;
I[5][1][4] = new Array();
I[5][1][4][0]='Yerba Buena Gardens';
I[5][1][4][1]='';
I[5][1][4][2] = 0;
I[5][1][5] = new Array();
I[5][1][5][0]='De Young Museum';
I[5][1][5][1]='';
I[5][1][5][2] = 1;
I[5][1][6] = new Array();
I[5][1][6][0]='City Hall';
I[5][1][6][1]='';
I[5][1][6][2] = 0;
I[5][2] = 1;

I[6] = new Array();
I[6][0]='Welche ist die steilste Strasse in San Francisco?';
I[6][1] = new Array();
I[6][1][0] = new Array();
I[6][1][0][0]='Lombard Street';
I[6][1][0][1]='Auch wenn die Lombard Street 21,3 % Gef&#228;lle hat ist sie nicht die steilste Strasse.';
I[6][1][0][2] = 0;
I[6][1][1] = new Array();
I[6][1][1][0]='Filbert Street';
I[6][1][1][1]='Mit 31,5 % ist die Filbert Street sogar &#252;ber 10 % steiler als die Lombard Street!';
I[6][1][1][2] = 1;
I[6][1][2] = new Array();
I[6][1][2][0]='California Street';
I[6][1][2][1]='';
I[6][1][2][2] = 0;
I[6][1][3] = new Array();
I[6][1][3][0]='Union Street';
I[6][1][3][1]='';
I[6][1][3][2] = 0;
I[6][1][4] = new Array();
I[6][1][4][0]='Van Ness Avenue';
I[6][1][4][1]='';
I[6][1][4][2] = 0;
I[6][2] = 0;

I[7] = new Array();
I[7][0]='Wie lange dauerte der l&#228;ngste ununterbrochene Nebel an Point Reyes?';
I[7][1] = new Array();
I[7][1][0] = new Array();
I[7][1][0][0]='7 Tage und 8 Stunden';
I[7][1][0][1]='W&#228;hrend dieser 176 Stunden wurden 11,1 Tonnen Kohle f&#252;r das Nebelhorn verbraucht!';
I[7][1][0][2] = 1;
I[7][1][1] = new Array();
I[7][1][1][0]='3 Tage und 5 Stunden';
I[7][1][1][1]='Solche Nebelphasen sind durchaus &#252;blich.';
I[7][1][1][2] = 0;
I[7][1][2] = new Array();
I[7][1][2][0]='13 Tage und 9 Stunden';
I[7][1][2][1]='Zugegeben, das ist reichlich &#252;bertrieben.';
I[7][1][2][2] = 0;
I[7][2] = 0;

I[8] = new Array();
I[8][0]='Welche Wasserf&#228;lle befinden sich im Yosemite Nationalpark?';
I[8][1] = new Array();
I[8][1][0] = new Array();
I[8][1][0][0]='Vernal Falls';
I[8][1][0][1]='';
I[8][1][0][2] = 1;
I[8][1][1] = new Array();
I[8][1][1][0]='Bridalveil Falls';
I[8][1][1][1]='';
I[8][1][1][2] = 1;
I[8][1][2] = new Array();
I[8][1][2][0]='Nevada Falls';
I[8][1][2][1]='';
I[8][1][2][2] = 1;
I[8][1][3] = new Array();
I[8][1][3][0]='Niagara Falls';
I[8][1][3][1]='';
I[8][1][3][2] = 0;
I[8][1][4] = new Array();
I[8][1][4][0]='Victoria Falls';
I[8][1][4][1]='';
I[8][1][4][2] = 0;
I[8][2] = 1;

I[9] = new Array();
I[9][0]='Der &#228;lteste lebende Sequoia Mammutbaum der Welt hei&#223;t:';
I[9][1] = new Array();
I[9][1][0] = new Array();
I[9][1][0][0]='Grizzly Giant';
I[9][1][0][1]='';
I[9][1][0][2] = 1;
I[9][1][1] = new Array();
I[9][1][1][0]='General Sherman';
I[9][1][1][1]='';
I[9][1][1][2] = 0;
I[9][1][2] = new Array();
I[9][1][2][0]='Columbia Tree';
I[9][1][2][1]='';
I[9][1][2][2] = 0;
I[9][1][3] = new Array();
I[9][1][3][0]='Giant Patriarch';
I[9][1][3][1]='';
I[9][1][3][2] = 0;
I[9][1][4] = new Array();
I[9][1][4][0]='Old Faithfull';
I[9][1][4][1]='';
I[9][1][4][2] = 0;
I[9][2] = 0;

I[10] = new Array();
I[10][0]='Wie hei&#223;t der Fluss, der durch das Yosemite Tal flie&#223;t?';
I[10][1] = new Array();
I[10][1][0] = new Array();
I[10][1][0][0]='Merced River';
I[10][1][0][1]='';
I[10][1][0][2] = 1;
I[10][1][1] = new Array();
I[10][1][1][0]='Yosemite River';
I[10][1][1][1]='';
I[10][1][1][2] = 0;
I[10][1][2] = new Array();
I[10][1][2][0]='Tenaya Creek';
I[10][1][2][1]='';
I[10][1][2][2] = 0;
I[10][1][3] = new Array();
I[10][1][3][0]='Muir Creek';
I[10][1][3][1]='';
I[10][1][3][2] = 0;
I[10][2] = 0;

I[11] = new Array();
I[11][0]='Welchen Namen tr&#228;gt der tiefste Punkt der westlichen Hemisph&#228;re?';
I[11][1] = new Array();
I[11][1][0] = new Array();
I[11][1][0][0]='Badwater';
I[11][1][0][1]='';
I[11][1][0][2] = 1;
I[11][1][1] = new Array();
I[11][1][1][0]='Zabriskie Point';
I[11][1][1][1]='';
I[11][1][1][2] = 0;
I[11][1][2] = new Array();
I[11][1][2][0]='Father Crowley Point';
I[11][1][2][1]='';
I[11][1][2][2] = 0;
I[11][1][3] = new Array();
I[11][1][3][0]='Dantes View';
I[11][1][3][1]='';
I[11][1][3][2] = 0;
I[11][1][4] = new Array();
I[11][1][4][0]='Furnace Creek';
I[11][1][4][1]='';
I[11][1][4][2] = 0;
I[11][1][5] = new Array();
I[11][1][5][0]='Devils Golfcourse';
I[11][1][5][1]='';
I[11][1][5][2] = 0;
I[11][2] = 0;

I[12] = new Array();
I[12][0]='Welches Hotel in Las Vegas bietet am "Strip" eine Wasserfont&#228;nenshow?';
I[12][1] = new Array();
I[12][1][0] = new Array();
I[12][1][0][0]='Bellagio';
I[12][1][0][1]='';
I[12][1][0][2] = 1;
I[12][1][1] = new Array();
I[12][1][1][0]='Treasure Island';
I[12][1][1][1]='';
I[12][1][1][2] = 0;
I[12][1][2] = new Array();
I[12][1][2][0]='Venetian';
I[12][1][2][1]='';
I[12][1][2][2] = 0;
I[12][1][3] = new Array();
I[12][1][3][0]='MGM Grand';
I[12][1][3][1]='';
I[12][1][3][2] = 0;
I[12][1][4] = new Array();
I[12][1][4][0]='The Mirage';
I[12][1][4][1]='';
I[12][1][4][2] = 0;
I[12][2] = 0;

I[13] = new Array();
I[13][0]='Wie nennt man die Steins&#228;ulen im Bryce Canyon?';
I[13][1] = new Array();
I[13][1][0] = new Array();
I[13][1][0][0]='hoodoos';
I[13][1][0][1]='';
I[13][1][0][2] = 1;
I[13][1][1] = new Array();
I[13][1][1][0]='pillars';
I[13][1][1][1]='';
I[13][1][1][2] = 0;
I[13][1][2] = new Array();
I[13][1][2][0]='caterpillars';
I[13][1][2][1]='';
I[13][1][2][2] = 0;
I[13][1][3] = new Array();
I[13][1][3][0]='stalagmites';
I[13][1][3][1]='';
I[13][1][3][2] = 0;
I[13][1][4] = new Array();
I[13][1][4][0]='bubbas';
I[13][1][4][1]='';
I[13][1][4][2] = 0;
I[13][2] = 0;

I[14] = new Array();
I[14][0]='Welchen Ort meinte Pr&#228;sident Teddy Roosevelt mit dem "einzigen Ort, den jeder Amerikaner sehen sollte"?';
I[14][1] = new Array();
I[14][1][0] = new Array();
I[14][1][0][0]='Grand Canyon';
I[14][1][0][1]='';
I[14][1][0][2] = 1;
I[14][1][1] = new Array();
I[14][1][1][0]='Yosemite Nationalpark';
I[14][1][1][1]='';
I[14][1][1][2] = 0;
I[14][1][2] = new Array();
I[14][1][2][0]='Bryce Canyon';
I[14][1][2][1]='';
I[14][1][2][2] = 0;
I[14][1][3] = new Array();
I[14][1][3][0]='Yellowstone Nationalpark';
I[14][1][3][1]='';
I[14][1][3][2] = 0;
I[14][1][4] = new Array();
I[14][1][4][0]='Las Vegas';
I[14][1][4][1]='';
I[14][1][4][2] = 0;
I[14][2] = 0;

I[15] = new Array();
I[15][0]='Wie hei&#223;en die indianischen Ureinwohner, die sich vor rund 2000 Jahren im Grand Canyon niederlie&#223;en?';
I[15][1] = new Array();
I[15][1][0] = new Array();
I[15][1][0][0]='Anasazi';
I[15][1][0][1]='';
I[15][1][0][2] = 1;
I[15][1][1] = new Array();
I[15][1][1][0]='Tusayan';
I[15][1][1][1]='';
I[15][1][1][2] = 0;
I[15][1][2] = new Array();
I[15][1][2][0]='Navajo';
I[15][1][2][1]='';
I[15][1][2][2] = 0;
I[15][1][3] = new Array();
I[15][1][3][0]='Hopi';
I[15][1][3][1]='';
I[15][1][3][2] = 0;
I[15][1][4] = new Array();
I[15][1][4][0]='Kiva';
I[15][1][4][1]='';
I[15][1][4][2] = 0;
I[15][2] = 0;

I[16] = new Array();
I[16][0]='An welchem Aussichtspunkt des Grand Canyon befindet sich der Aussichtsturm?';
I[16][1] = new Array();
I[16][1][0] = new Array();
I[16][1][0][0]='Desert View Point';
I[16][1][0][1]='';
I[16][1][0][2] = 1;
I[16][1][1] = new Array();
I[16][1][1][0]='Grandview Point';
I[16][1][1][1]='';
I[16][1][1][2] = 0;
I[16][1][2] = new Array();
I[16][1][2][0]='Lipan Point';
I[16][1][2][1]='';
I[16][1][2][2] = 0;
I[16][1][3] = new Array();
I[16][1][3][0]='Mather Point';
I[16][1][3][1]='';
I[16][1][3][2] = 0;
I[16][1][4] = new Array();
I[16][1][4][0]='Moran Point';
I[16][1][4][1]='';
I[16][1][4][2] = 0;
I[16][1][5] = new Array();
I[16][1][5][0]='Yavapai Point';
I[16][1][5][1]='';
I[16][1][5][2] = 0;
I[16][2] = 0;

I[17] = new Array();
I[17][0]='Wie hei&#223;t der ber&#252;hmte Golfkurs am 17-Mile Drive in Monterey?';
I[17][1] = new Array();
I[17][1][0] = new Array();
I[17][1][0][0]='Pebble Beach';
I[17][1][0][1]='';
I[17][1][0][2] = 1;
I[17][1][1] = new Array();
I[17][1][1][0]='Muirfield';
I[17][1][1][1]='';
I[17][1][1][2] = 0;
I[17][1][2] = new Array();
I[17][1][2][0]='Sand Hills';
I[17][1][2][1]='';
I[17][1][2][2] = 0;
I[17][1][3] = new Array();
I[17][1][3][0]='Pacific Dunes';
I[17][1][3][1]='';
I[17][1][3][2] = 0;
I[17][1][4] = new Array();
I[17][1][4][0]='Shinnecock Hills';
I[17][1][4][1]='';
I[17][1][4][2] = 0;
I[17][1][5] = new Array();
I[17][1][5][0]='Ballybunion';
I[17][1][5][1]='';
I[17][1][5][2] = 0;
I[17][1][6] = new Array();
I[17][1][6][0]='Shoreacres';
I[17][1][6][1]='';
I[17][1][6][2] = 0;
I[17][2] = 0;

I[18] = new Array();
I[18][0]='Wo befindet sich das mit 16,45 x 4,57 Metern gr&#246;&#223;te Fenster der Welt?';
I[18][1] = new Array();
I[18][1][0] = new Array();
I[18][1][0][0]='Bay Aquarium Monterey';
I[18][1][0][1]='';
I[18][1][0][2] = 1;
I[18][1][1] = new Array();
I[18][1][1][0]='Underwater World';
I[18][1][1][1]='';
I[18][1][1][2] = 0;
I[18][1][2] = new Array();
I[18][1][2][0]='The Tech Museum of Innovation';
I[18][1][2][1]='';
I[18][1][2][2] = 0;
I[18][1][3] = new Array();
I[18][1][3][0]='California Academy of Science';
I[18][1][3][1]='';
I[18][1][3][2] = 0;
I[18][2] = 0;

I[19] = new Array();
I[19][0]='Wie hei&#223;t die Insel, die die Oakland Bay Bridge unterbricht?';
I[19][1] = new Array();
I[19][1][0] = new Array();
I[19][1][0][0]='Treasure Island';
I[19][1][0][1]='';
I[19][1][0][2] = 1;
I[19][1][1] = new Array();
I[19][1][1][0]='Angel Island';
I[19][1][1][1]='';
I[19][1][1][2] = 0;
I[19][1][2] = new Array();
I[19][1][2][0]='Alcatraz';
I[19][1][2][1]='';
I[19][1][2][2] = 0;
I[19][1][3] = new Array();
I[19][1][3][0]='Farallon Island';
I[19][1][3][1]='';
I[19][1][3][2] = 0;
I[19][2] = 0;

I[20] = new Array();
I[20][0]='In welchem Jahr fand das gro&#223;e und verheerende Erdbeben in San Francisco statt?';
I[20][1] = new Array();
I[20][1][0] = new Array();
I[20][1][0][0]='1906';
I[20][1][0][1]='';
I[20][1][0][2] = 1;
I[20][1][1] = new Array();
I[20][1][1][0]='1908';
I[20][1][1][1]='';
I[20][1][1][2] = 0;
I[20][1][2] = new Array();
I[20][1][2][0]='1902';
I[20][1][2][1]='';
I[20][1][2][2] = 0;
I[20][1][3] = new Array();
I[20][1][3][0]='1903';
I[20][1][3][1]='';
I[20][1][3][2] = 0;
I[20][2] = 0;

I[21] = new Array();
I[21][0]='Welcher Garten befindet sich nicht im Botanischen Garten des Golden Gate Parks?';
I[21][1] = new Array();
I[21][1][0] = new Array();
I[21][1][0][0]='Biblischer Garten';
I[21][1][0][1]='';
I[21][1][0][2] = 0;
I[21][1][1] = new Array();
I[21][1][1][0]='Duftgarten f&#252;r Blinde';
I[21][1][1][1]='';
I[21][1][1][2] = 0;
I[21][1][2] = new Array();
I[21][1][2][0]='Garten aus Neuseeland';
I[21][1][2][1]='';
I[21][1][2][2] = 0;
I[21][1][3] = new Array();
I[21][1][3][0]='Garten aus Chile';
I[21][1][3][1]='';
I[21][1][3][2] = 0;
I[21][1][4] = new Array();
I[21][1][4][0]='Japanischer Garten';
I[21][1][4][1]='';
I[21][1][4][2] = 1;
I[21][2] = 0;

I[22] = new Array();
I[22][0]='Auf welchem H&#252;gel befindet sich der Sendemast auf Twin Peaks in San Francisco?';
I[22][1] = new Array();
I[22][1][0] = new Array();
I[22][1][0][0]='Mount Sutro';
I[22][1][0][1]='';
I[22][1][0][2] = 1;
I[22][1][1] = new Array();
I[22][1][1][0]='San Bruno Mountain';
I[22][1][1][1]='';
I[22][1][1][2] = 0;
I[22][1][2] = new Array();
I[22][1][2][0]='Mount Tamalpais';
I[22][1][2][1]='';
I[22][1][2][2] = 0;
I[22][1][3] = new Array();
I[22][1][3][0]='Mount Davidson';
I[22][1][3][1]='';
I[22][1][3][2] = 0;
I[22][2] = 0;

I[23] = new Array();
I[23][0]='Welche B&#228;ume kann man im Muir Woods National Monument bewundern?';
I[23][1] = new Array();
I[23][1][0] = new Array();
I[23][1][0][0]='Redwoods';
I[23][1][0][1]='';
I[23][1][0][2] = 1;
I[23][1][1] = new Array();
I[23][1][1][0]='Sequoias';
I[23][1][1][1]='';
I[23][1][1][2] = 0;
I[23][1][2] = new Array();
I[23][1][2][0]='Muir Woods';
I[23][1][2][1]='';
I[23][1][2][2] = 0;
I[23][2] = 0;

I[24] = new Array();
I[24][0]='Welcher Naturpark wurde 1864 von Pr&#228;sident Abraham Lincoln zum ersten Nationalpark der Welt erkl&#228;rt?';
I[24][1] = new Array();
I[24][1][0] = new Array();
I[24][1][0][0]='Yosemite Valley und Mariposa Grove';
I[24][1][0][1]='';
I[24][1][0][2] = 1;
I[24][1][1] = new Array();
I[24][1][1][0]='Grand Canyon';
I[24][1][1][1]='';
I[24][1][1][2] = 0;
I[24][1][2] = new Array();
I[24][1][2][0]='Yellowstone';
I[24][1][2][1]='';
I[24][1][2][2] = 0;
I[24][1][3] = new Array();
I[24][1][3][0]='Bryce Canyon';
I[24][1][3][1]='';
I[24][1][3][2] = 0;
I[24][1][4] = new Array();
I[24][1][4][0]='Death Valley';
I[24][1][4][1]='';
I[24][1][4][2] = 0;
I[24][2] = 0;

I[25] = new Array();
I[25][0]='Was ist "Scotty\'s Castle"?';
I[25][1] = new Array();
I[25][1][0] = new Array();
I[25][1][0][0]='Geb&#228;ude im Death Valley';
I[25][1][0][1]='';
I[25][1][0][2] = 1;
I[25][1][1] = new Array();
I[25][1][1][0]='Casino in Las Vegas';
I[25][1][1][1]='';
I[25][1][1][2] = 0;
I[25][1][2] = new Array();
I[25][1][2][0]='Luxusschloss bei San Simeon';
I[25][1][2][1]='';
I[25][1][2][2] = 0;
I[25][1][3] = new Array();
I[25][1][3][0]='Attraktion am Pier 39 in San Francisco';
I[25][1][3][1]='';
I[25][1][3][2] = 0;
I[25][1][4] = new Array();
I[25][1][4][0]='Golfplatz am 17-Mile Drive';
I[25][1][4][1]='';
I[25][1][4][2] = 0;
I[25][2] = 0;

I[26] = new Array();
I[26][0]='Wie heisst der alte "Strip" in Las Vegas?';
I[26][1] = new Array();
I[26][1][0] = new Array();
I[26][1][0][0]='Fremont Street';
I[26][1][0][1]='';
I[26][1][0][2] = 1;
I[26][1][1] = new Array();
I[26][1][1][0]='Tropicana Avenue';
I[26][1][1][1]='';
I[26][1][1][2] = 0;
I[26][1][2] = new Array();
I[26][1][2][0]='Las Vegas Boulevard';
I[26][1][2][1]='';
I[26][1][2][2] = 0;
I[26][1][3] = new Array();
I[26][1][3][0]='Paradise Road';
I[26][1][3][1]='';
I[26][1][3][2] = 0;
I[26][2] = 0;

I[27] = new Array();
I[27][0]='Wieviel Sand und Ger&#246;ll transportiert der Colorado t&#228;glich durch den Grand Canyon?';
I[27][1] = new Array();
I[27][1][0] = new Array();
I[27][1][0][0]='80.000 Tonnen';
I[27][1][0][1]='';
I[27][1][0][2] = 1;
I[27][1][1] = new Array();
I[27][1][1][0]='4.000 Tonnen';
I[27][1][1][1]='';
I[27][1][1][2] = 0;
I[27][1][2] = new Array();
I[27][1][2][0]='800 Tonnen';
I[27][1][2][1]='';
I[27][1][2][2] = 0;
I[27][1][3] = new Array();
I[27][1][3][0]='24.000 Tonnen';
I[27][1][3][1]='';
I[27][1][3][2] = 0;
I[27][2] = 0;


Status = new Array();


function CreateStatusArrays(){
	for (var x=0; x<I.length; x++){
		Status[x] = new Array();
		Status[x][0] = 0; // Question not done yet
		Status[x][1] = new Array(); //for tracking whether answers chosen
		for (var y=0; y<I[x][1].length; y++){
			Status[x][1][y] = '0'; //Answers not chosen yet
		}
		Status[x][2] = 0; //Wrong tries at this question so far
		Status[x][3] = 0; //For storing score out of one on this question
	}
}

function UpdateQuestionStatus(QNum){
	if (Status[QNum][2] >= Status[QNum][1].length-1){
		Status[QNum][0] = 1;
		for (var i=0; i<Status[QNum][1].length; i++){
			if (Status[QNum][1][i] == '0'){
				Status[QNum][1][i] = 'R';
			}
		}
	}
}

function ReplaceStuff(Token, Replacement, InString){
	var i = InString.indexOf(Token);
	var FirstBit = '';
	var LastBit = '';
	while (i>-1){
		FirstBit = InString.substring(0, i);
		LastBit = InString.substring(i + Token.length, InString.length);	
		InString = FirstBit + Replacement + LastBit;
		i = InString.indexOf(Token);
	}
	return InString;
}

function ChangeQ(ChangeBy){
	var NewNum = CurrQNum + ChangeBy;
	if ((NewNum >= 0)&&(NewNum<I.length)){
		CurrQNum = NewNum;
		ShowQuestion(CurrQNum);
	}
	var CurrScore = '';
	if ((ContinuousScoring == true)&&(EraseFeedback == true)){
		CalculateScore();
		var CurrScore = YourScoreIs + ' ' + Score + '%.';
		WriteFeedback(CurrScore);
	}
}

function BuildQuestion(QNum){
	if (I[QNum][2] == 0){
		var Temp = ReplaceStuff('[Question]', I[QNum][0], QRow);

		var AnsRows = '';
		for (var i=0; i<I[QNum][1].length; i++){
			TempAns = ARow;
			TempAns = ReplaceStuff('[ANum]', i, TempAns);
			TempAns = ReplaceStuff('[ALetter]', ' ' + ALetters.charAt(i) + ' ', TempAns);
			TempAns = ReplaceStuff('[Ans]', I[QNum][1][i][0], TempAns);
			AnsRows += TempAns;
		}
		Temp += AnsRows;
		Temp = ReplaceStuff('[QNumber]', QNum+1, Temp);
		Temp = ReplaceStuff('[QNum]', QNum, Temp);
	}
	else{
		var Temp = ReplaceStuff('[Question]', I[QNum][0], QRow);
		var AnsRows = '';
		for (var i=0; i<I[QNum][1].length; i++){
			TempAns = MARow;
			TempAns = ReplaceStuff('[ANum]', i, TempAns);
			TempAns = ReplaceStuff('[Correct]', I[QNum][1][i][2], TempAns);
			TempAns = ReplaceStuff('[Ans]', I[QNum][1][i][0], TempAns);
			AnsRows += TempAns;
		}
		Temp += AnsRows;
		Temp += CheckButton;
		Temp = ReplaceStuff('[QNumber]', QNum+1, Temp);
		Temp = ReplaceStuff('[QNum]', QNum, Temp);
	}
	return Temp;
}

function DisplayExercise(StuffToDisplay){
//Build the output string
	var OutString = '';
	OutString += '<html>';
	OutString += '<body  background="http://www.westkueste-usa.de/images/Wood.jpg" bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000cc">';
	OutString += '<center><table border="0" cellpadding="5" cellspacing="1" width="85%">';
	OutString += TitleCode; 
	OutString += '<tr><td bgcolor="#ffcc99" align="center">'; 
	OutString += '<font face="Geneva,Arial" size="-1">';
	OutString += StuffToDisplay;
	OutString += '</font></td></tr>';
	OutString += NavBar;
	OutString += '</table></center></body></html>';

	if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);}

//Write it to the frame
	BottomFrame.document.clear();
	BottomFrame.document.open();
	BottomFrame.document.write(OutString);
	BottomFrame.document.close();
}


function ShowAllQs(){
	var Output = '';
	for (var i=0; i<I.length-1; i++){
		Output = Output + BuildQuestion(i);
		Output = Output + '<tr><td colspan="4"><hr></hr></td></tr>';
	}
	Output = Output + BuildQuestion(I.length-1);
	Output = TableOpener + Output + TableCloser;
	DisplayExercise(Output);
}

function ShowQuestion(QNum){
//First, create the Q number readout at the top
	var Readout = (QNum+1) + '/' + I.length;
	while (Readout.length < 7){
		Readout = ' ' + Readout + ' ';
	}
	Readout = QButtonsOpener + Readout + QButtonsCloser;

	var Output = BuildQuestion(QNum);

	Output = TableOpener + Output + TableCloser;

	DisplayExercise(Readout + Output);

//Mark the answers already done
	for (i=0; i<Status[QNum][1].length; i++){
		if (Status[QNum][1][i] == 'R'){
			MarkAnswer(QNum,i,true)
		}
		if (Status[QNum][1][i] == 'W'){
			MarkAnswer(QNum,i,false)
		}
		if (Status[QNum][1][i] == 'C'){
			CheckCheckbox(QNum,i);
		}
	}
//Eliminate feedback from previous question
	if (EraseFeedback == true){
		WriteFeedback('');
	}
}

function CheckMulti(QNum){
	var TotWrong = 0;
	var Output = '';
	var TotAns = I[QNum][1].length;
	for (var i=TotAns-1; i>=0; i--){
//Find any incorrect choices

		var b = eval('BottomFrame.document.QForm.A_' + QNum + '_' + i);

		if (b != null){
//if it's wrong, count it
			if (b.checked == true){
				Status[QNum][1][i] = 'C';
			}
			else{
				Status[QNum][1][i] = 'U';
			}
			if (((b.checked == true) && (b.value == "0"))||((b.checked == false)&&(b.value == "1"))){
				TotWrong++;
			}
		}				
	}

	if (TotWrong == 0){
		Output = DefaultRight;
	}
	else{
		Output = DefaultWrong + '<br />' + (TotAns-TotWrong) + '/' + TotAns;
	}

//If you haven't tried the question before
	if (Status[QNum][0] == 0){
		if (TotWrong > 0){
			Status[QNum][2]++;
		}
		if (TotWrong == 0){
			Status[QNum][0] = 1;
//Calculate the score for this question as a floating-point fraction of 1
			Status[QNum][3] =  ((Status[QNum][1].length - Status[QNum][2]) - 1) / (Status[QNum][1].length - 1);
//If less than zero, set to zero
			if (Status[QNum][3] < 0){Status[QNum][3] = 0;}
		}
	}

//Check whether the quiz is finished
	var Finished = true;
	for (var i=0; i<Status.length; i++){
		if (Status[i][0] == 0){Finished = false;}
	}

//Calculate the score if needed
		
	if (Status[QNum][0] == 1){
		if ((Finished==true)||(ContinuousScoring==true)){
			CalculateScore();
			Output = Output + '<br />' + YourScoreIs + ' ' + Score + '%.';
		}

		if (Finished == true){
			EraseFeedback = false;
			var CFT = 0;
			for (i=0; i<I.length; i++){
				if (Status[i][2] == 0){
					CFT++;
				}
			}
		Output += '<br />' + CorrectFirstTime + CFT + '/' + I.length;

		}
	}

//Show the feedback
	if (Output.length > 0){
		WriteFeedback(Output);
	}

}

function CheckAnswer(QNum, ANum){
	var Output = I[QNum][1][ANum][1];

	if (Output==''){
		if (I[QNum][1][ANum][2] == 1){
			Output = DefaultRight;
		}
		else{
			Output = DefaultWrong;
		}
	}

//If it's not been previously answered correctly
	if (Status[QNum][0] == 0){
//If it's a correct answer
		if (I[QNum][1][ANum][2] == 1){
			Status[QNum][0] = 1;//Mark the Q as done
			Status[QNum][1][ANum] = 'R';
			MarkAnswer(QNum, ANum, true);
//Calculate the score for this question as a floating-point fraction of 1
			var PossibleWrongs = 0;
			for (var i=0; i<I[QNum][1].length; i++){
				if (I[QNum][1][i][2] == 0){
					PossibleWrongs++;
				}
			}

			if (PossibleWrongs == 0){PossibleWrongs = 1;}

			Status[QNum][3] = 1 - (Status[QNum][2]/PossibleWrongs);

//If less than zero, set to zero
			if (Status[QNum][3] < 0){Status[QNum][3] = 0;}
		}
		else{
			if (Status[QNum][1][ANum] != 'W'){
				Status[QNum][1][ANum] = 'W';
				MarkAnswer(QNum, ANum, false);
				Status[QNum][2]++; //increment wrong tries for this Q
			}
		}
	}

	UpdateQuestionStatus(QNum);

//Check whether the quiz is finished
	var Finished = true;
	for (var i=0; i<Status.length; i++){
		if (Status[i][0] == 0){Finished = false;}

	}

//Calculate the score if needed
		
	if (Status[QNum][0] == 1){
		if ((Finished==true)||(ContinuousScoring==true)){
			CalculateScore();
			Output = Output + '<br />' + YourScoreIs + ' ' + Score + '%.';
		}

		if (Finished == true){
			EraseFeedback = false;
			var CFT = 0;
			for (i=0; i<I.length; i++){
				if (Status[i][2] == 0){
					CFT++;
				}
			}
		Output += '<br />' + CorrectFirstTime + CFT + '/' + I.length;

		}
	}

//Show the feedback
	if (Output.length > 0){
		WriteFeedback(Output);
	}
}

function CalculateScore(){
	var TriedQs = 0;
	var TotalScore = 0;
	for (var i=0; i<Status.length; i++){
		if ((Status[i][2] > 0)||(Status[i][3] == 1)){
			TriedQs++;
			TotalScore += Status[i][3];
		}
	}
	if (TriedQs == 0){
		Score = 0;
	}
	else{
		Score = (Math.floor(100 * (TotalScore/TriedQs)));
	}
}

function MarkAnswer(QNum, ANum, Right){
	var Mark = CorrectIndicator;
	if (Right == false){Mark = IncorrectIndicator;}

	if (eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum) != null){
		eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum).value = Mark;
	}
}

function CheckCheckbox(QNum, ANum){
	if (eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum) != null){
		eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum).checked = true;
	}
}







function Blank(){
	return '<html><body>&copy;Half-Baked Software. Loading...</body></html>';
}

//-->

//]]>


