// Creates array in the toplevel frames document to substitute for history.	Workarpound for FF 3.5 Javascript caching bug - esp on the Mac

var historay=new Array();
var homePage;

var histreport="";

function addMeToHistory(){
return
//alert("historay.length before addition:"+historay.length)


if(historay.length>1){
		var penult = historay[historay.length-2];
		if	( self.frames[2].location.href == penult ){ // User has pressed the browser's back button
				historay.splice(historay.length-2,2)
				//alert("You just pressed the back button on your browser!\nI will now explicitly reload:\n"+penult);
				self.frames[2].location.href=penult
				return
			}
	}


	if(	 self.frames[2].location.href.match(/\?/)){
		historay.push(self.frames[2].location.href)
	}
	else{	 // never happens -- all have a ?
		var d = new Date();
		window.randy=Math.ceil(d.getTime());
		 historay.push(self.frames[2].location.href+"?"+randy)
	// alert(historay[historay.length-1])
	}

	//alert("This  history contains "+historay.length+" items: \n\n"+histreport)
	showHisWin('gold');
	showHisReport();
}


function goBack(){
self.frames[2].history.back()
	//alert("This  history contains "+historay.length+" items: \n\n"+histreport)
var hZiel;
if (historay.length<2 ){hZiel=homePage}
else if(historay.length>1){
	hZiel = historay[historay.length-2];
	historay.pop()	;historay.pop();
}
	//alert(hZiel)
self.frames[2].location=hZiel;
}



function showHisReport(){
return
	histreport="";
	for(h=0;h<historay.length;h++){
		histreport+=historay[h]+"<br>\n";
	}
histreport= "<div style='font-family:arial;font-size:12px;color:#7982BB'>This  history contains "+historay.length+" items: <br><br>"+histreport+"</div>";
doof.document.body.innerHTML=histreport
}


var doof;
function showHisWin(clr){
return
	if (!doof || doof.closed )
	doof=window.open('about:blank', 'nunder', 'width=450,height=450,left=0,top=0,screenX=0,screenY=0,menubar=no,toolbar=no,resizable=no,status=no,location=yes,scrollbars=1');
	if(clr){doof.document.body.style.backgroundColor=clr}
}







