// basic functions and dropdown menu. This code is free.

// get out of any frames
if (self.location != top.location) {
	top.location = self.location
}

// write the stylesheet
document.write ("<LINK REL='Stylesheet' TYPE='Text/CSS' HREF='style.css'>");

// write the object menu
document.write ("<SPAN ID='Menu' STYLE='align: left; position: absolute;  top: 0px; left:0px;'><FORM NAME='frmMain'>");
document.write ("<SELECT NAME='mnuMain' onChange='GoTo (this);'>");
// The options
document.write ("<OPTION VALUE='0' SELECTED>Turn To...");

document.write ("<OPTION VALUE='main.htm'>Home");

document.write ("<OPTION VALUE='amateur.htm'>Amateur Gamebooks");

document.write ("<OPTION VALUE='aff.htm'>Advanced FF");

document.write ("<OPTION VALUE='petition.htm'>Petition");

document.write ("</SELECT></FORM></SPAN>");





// set the event for scrolling for IE or a timer for NS(dropdown menu)
window.onscroll = MoveMenu;
setInterval ('MoveMenu()', 100);

// This keeps the menu in the top left.
function MoveMenu() {
	// for IE
	 if (document.all) {
		document.all.Menu.style.pixelTop = document.body.scrollTop;
		document.all.Menu.style.pixelLeft = document.body.scrollLeft;
	}
	else {
	// for NS
		document.Menu.top = window.pageYOffset;
		document.Menu.left = window.pageXOffset;
	}

}	

// when user clicks on menu (onChange) gives itself (this) to GoTo
// Makes this.location the VALUE in OPTION
function GoTo (object) {
	// IE
	if (document.all) {
		var newLoc = object.value;
	}
	else {
	// NS
		var newLoc = object.form.mnuMain.options[object.form.mnuMain.selectedIndex].value;
	}

	// If the value is "0" then it won't work.
	if (newLoc != "0") {
		this.location = newLoc
	} 
}
// By Karl Hahn. www.geocities.com/spacemankgh


