// Created by Just Adequate Media - http://justadequate.net
// You really shouldn't steal this...but then again, why should you?  Write your own damn code!

if (top.location != location) top.location.href = location.href;

mydate = new Date();
yyear = mydate.getYear();
if(yyear<1000) yyear+=1900;

function newWindow(url){
    open(url, 'FlyingDebris', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=735,height=500')
}


//Preload MouseOver images for navbar
if (document.images){
	var homeon=new Image();
	homeon.src="graphics/buttons/home.gif";
	var homeoff=new Image();
	homeoff.src="graphics/buttons/homex.gif";
	var galleryon=new Image();
	galleryon.src="graphics/buttons/gallery.gif";
	var galleryoff=new Image();
	galleryoff.src="graphics/buttons/galleryx.gif";
	var flyingon=new Image();
	flyingon.src="graphics/buttons/flying.gif";
	var flyingoff=new Image();
	flyingoff.src="graphics/buttons/flyingx.gif";
	var libraryon=new Image();
	libraryon.src="graphics/buttons/library.gif";
	var libraryoff=new Image();
	libraryoff.src="graphics/buttons/libraryx.gif";
	var stiltson=new Image();
	stiltson.src="graphics/buttons/stilts.gif";
	var stiltsoff=new Image();
	stiltsoff.src="graphics/buttons/stiltsx.gif";
	var treemanon=new Image();
	treemanon.src="graphics/buttons/treeman.gif";
	var treemanoff=new Image();
	treemanoff.src="graphics/buttons/treemanx.gif";
	var corporateon=new Image();
	corporateon.src="graphics/buttons/corporate.gif";
	var corporateoff=new Image();
	corporateoff.src="graphics/buttons/corporatex.gif";
	var zukeson=new Image();
	zukeson.src="graphics/buttons/zukes.gif";
	var zukesoff=new Image();
	zukesoff.src="graphics/buttons/zukesx.gif";
	var actoron=new Image();
	actoron.src="graphics/buttons/actor.gif";
	var actoroff=new Image();
	actoroff.src="graphics/buttons/actorx.gif";
}

function hot(imgName){
	if (document.images)
	  document[imgName].src=eval(imgName+'on.src');
}

function cold(imgName){
	if (document.images)
	  document[imgName].src=eval(imgName+'off.src');
}



// code to get the file name modified from a snippet by Stephen Chapman
function curPage(xx) {
	xx.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
	xx.page = location.href.substring(xx.dir.length+1, location.href.length+1);
	pos = xx.page.indexOf('.');
	if (pos > -1) { xx.page = xx.page.substr(0,pos); }
	if (xx.page == '') xx.page = 'index';
}

var xy = new Object();
curPage(xy);

// from here on this is all written by Just Adequate Media
menuFunc = "<tr><td>";
if (xy.page == 'index') { menuFunc = menuFunc + "<img name=\"home\" src='graphics/buttons/home.gif' width=178 height=23 border=0 title='Home Page'></a><br>"; }
	else { menuFunc = menuFunc + "<a href='index.html' onmouseout=\"cold('home')\" onmouseover=\"hot('home')\"><img name=\"home\" src='graphics/buttons/homex.gif' width=178 height=23 border=0 title='Home Page'></a><br>"; }

menuFunc = menuFunc + "<a href='http://justadequate.net/lab/toddkeyJuggles/gallery.php?filename=whitehouse-halloween-event-greenman-treeman-2009' onmouseout=\"cold('gallery')\" onmouseover=\"hot('gallery')\"><img name=\"gallery\" src='graphics/buttons/galleryx.gif' width=178 height=23 border=0 title='Photo Gallery'></a><br>";
	
if (xy.page == 'flying') { menuFunc = menuFunc + "<img name=\"flying\" src='graphics/buttons/flying.gif' border=0 title='The Flying Debris Show'><br>"; }
	else { menuFunc = menuFunc + "<a href='flying.htm' onmouseout=\"cold('flying')\" onmouseover=\"hot('flying')\"><img name=\"flying\" src='graphics/buttons/flyingx.gif' border=0 title='The Flying Debris Show'></a><br>"; }
if (xy.page == 'library') { menuFunc = menuFunc + "<img name=\"library\" src='graphics/buttons/library.gif' border=0 title='Library and School Shows'><br>"; }
	else { menuFunc = menuFunc + "<a href='library.htm' onmouseout=\"cold('library')\" onmouseover=\"hot('library')\"><img name=\"library\" src='graphics/buttons/libraryx.gif' border=0 title='Library and School Shows'></a><br>"; }
if (xy.page == 'stilts') { menuFunc = menuFunc + "<img name=\"stilts\" src='graphics/buttons/stilts.gif' border=0 title='Stilt Walking!'><br>"; }
	else { menuFunc = menuFunc + "<a href='stilts.htm' onmouseout=\"cold('stilts')\" onmouseover=\"hot('stilts')\"><img name=\"stilts\" src='graphics/buttons/stiltsx.gif' border=0 title='Stilt Walking!'></a><br>"; }
if (xy.page == 'treeman') { menuFunc = menuFunc + "<img name=\"treeman\" src='graphics/buttons/treeman.gif' border=0 title='Treeman'><br>"; }
	else { menuFunc = menuFunc + "<a href='treeman.htm' onmouseout=\"cold('treeman')\" onmouseover=\"hot('treeman')\"><img name=\"treeman\" src='graphics/buttons/treemanx.gif' border=0 title='Treeman'></a><br>"; }
if (xy.page == 'corporate') { menuFunc = menuFunc + "<img name=\"corporate\" src='graphics/buttons/corporate.gif' border=0 title='Corporate Events'><br>"; }
	else { menuFunc = menuFunc + "<a href='corporate.htm' onmouseout=\"cold('corporate')\" onmouseover=\"hot('corporate')\"><img name=\"corporate\" src='graphics/buttons/corporatex.gif' border=0 title='Corporate Events'></a><br>"; }
if (xy.page == 'zukes') { menuFunc = menuFunc + "<img name=\"zukes\" src='graphics/buttons/zukes.gif' border=0 title='The Zucchini Brothers'><br>"; }
	else { menuFunc = menuFunc + "<a href='zukes.htm' onmouseout=\"cold('zukes')\" onmouseover=\"hot('zukes')\"><img name=\"zukes\" src='graphics/buttons/zukesx.gif' border=0 title='The Zucchini Brothers'></a><br>"; }
if (xy.page == 'actor') { menuFunc = menuFunc + "<img name=\"actor\" src='graphics/buttons/actor.gif' border=0 title='Todd Key, Actor'><br>"; }
	else { menuFunc = menuFunc + "<a href='actor.htm' onmouseout=\"cold('actor')\" onmouseover=\"hot('actor')\"><img name=\"actor\" src='graphics/buttons/actorx.gif' border=0 title='Todd Key, Actor'></a><br>"; }
menuFunc = menuFunc + "</td></tr></table>";













