/* Copyright (c) by Andrew DiFiore Jr. All rights reserved. */
var requiredVersion = 5; 			// min version we want to allow
var useFlash = false;				// true = load Flash, false = load HTML
var noFlashPage = "nav_noflash.html";	// page to redirect user to if can't detect or not min version

var pageArray = new Array("story01.html","story02.html","story03.html","story04.html","story05.html","story06.html","story07.html","story08.html","story09.html","story10.html","story11.html","story12.html","story13.html","story14.html","story15.html","story16.html","story17.html","story18.html","story19.html","story20.html","story21.html");

if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (verIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != -1) {
	    var flashVersion = parseInt(navigator.plugins["Shockwave Flash"].description.substring(verIndex-1, verIndex));
	    if (flashVersion >= requiredVersion) useFlash = true;
	}
} else {
	document.write('<script language="VBScript" type="text/vbscript">\n');
	document.write('on error resume next\n');
	document.write('useFlash = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & requiredVersion))\n');
	document.write('<\/script>\n');
} 

function goPage(num) {
	window.location = pageArray[num-1];	
}

function openWindow(url, name, rs, sc, mn, tb, w, h, cent) { 
	popupWin = null;
	if (rs) resize = "resizable,"; else resize = "";
	if (sc) scrolls = "scrollbars,"; else scrolls = "";
	if (mn) menu = "menubar,"; else menu = "";
	if (tb) tool = "toolbar,"; else tool = "";
	if (cent) { // center popup
		chasm = screen.availWidth;
		mount = screen.availHeight;	  
		popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=' + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5));
	} 
	else popupWin = window.open(url, name, resize + scrolls + menu + tool + 'width=' + w + ',height=' + h + ',left=20, top=20');
}
