/////////// Menu Declarations /////////////
	var bMouseDown;
	var bCursorSet;
	var MenuType = "Main";
/////////// END Menu Declarations /////////

/////////// Window Status Scroll Declarations ////////////
	// This is how fast the letters appear
	var LetterSpeed = 25;

	// This is the amount of time from one comment to another
	var DivinationDeepBreath = 1500;
	var TimerID;
	var Bauble = new Array();
	var TheDivination;
	var MisconstruedDivination;

	var BaubleCounter = 0;
	var BaubleIndex = 0;
/////////// END Window Status Scroll Declarations /////////


/////////// VERSIONING Constants used by me////////////////
	var GlobalWin2000Version = "Windows NT 5.0";
/////////// END VERSIONING Constants used /////////////////


/////////// Load the stylesheet ///////////////
	document.write('<link REL="stylesheet" TYPE="text/css" HREF="./birdiestyle.css" TITLE="birdiestyle">');
/////////// END Load the stylesheet ///////////


/////////// Get cursor name ////////////////
	var aCursor;
	if (navigator.appName == "Netscape")
	{
		aCursor = "pointer";
	}
	else
	{
		aCursor = "hand";
	}
/////////// END Get cursor name ////////////////


function MainMenuMouseOut(aButton)
{
	if (bMouseDown)
	{
		aButton.style.borderStyle="outset";
	}
	aButton.style.color="#000000";
	aButton.bgColor="";
}

function MainMenuMouseOver(aButton)
{
	if (!bCursorSet)
	{
		// Normally i would do this on load but they are
		// not recognized as objects at that point.
		bCursorSet = true;

		document.all("index").style.cursor=aCursor;
		document.all("room").style.cursor=aCursor;
		document.all("info").style.cursor=aCursor;
		document.all("rates").style.cursor=aCursor;
		document.all("contact").style.cursor=aCursor;
	}
	if (bMouseDown)
	{
		aButton.style.borderStyle="inset";
	}

	// Only change the font color if the button
	// does not correspond to the current page.
	if(SamePage(aButton) == (-1) )
	{
		aButton.style.color="#003399";
	}
	aButton.bgColor="#FFFFFF";
}

function MainMenuMouseDown(aButton)
{
	bMouseDown = true;
	aButton.style.borderStyle="inset";
}

function MainMenuMouseUp(aButton)
{
	bMouseDown = false;
	aButton.style.borderStyle="outset";

	
	// Don't move on if the same page was clicked
	if(SamePage(aButton) == (-1) )
	{
		document.location= "./" + aButton.id + ".html";
	}
}

function SamePage(aButton)
{
	var bFound;
	var RequestedPage;
	var CurrentLocation;

	RequestedPage = aButton.id;
	CurrentLocation = document.location;
	
	// Make CurrentLocation a string so we can use the search method.
	CurrentLocation = CurrentLocation.toString();

	// the search method returns a -1 if no match was found.
	bFound = CurrentLocation.search(RequestedPage);
	//alert("document = " + CurrentLocation + ", page = " + RequestedPage);

	return bFound;
}	

function StartWindowMarquee()
{
	// Get all of the text of one of the messages.
	TheDivination = Bauble[BaubleCounter];
    
	if ( BaubleIndex < TheDivination.length)
	{
		// It is ok to continue to work with the current message.	
        MisconstruedDivination = TheDivination.substring(0, BaubleIndex + 1);
        window.status = MisconstruedDivination;
        BaubleIndex++;
        
		// Indicate the next time we wish to put out a letter
		// (LetterSpeed is measured in milliseconds)
		TimerID = setTimeout("StartWindowMarquee()", LetterSpeed);
	}
	else
	{
		BaubleCounter++;
		BaubleIndex = 0;
	
		if (BaubleCounter == Bauble.length)
				BaubleCounter = 0;
	
		// Here we can put a longer pause between comments
		TimerID = setTimeout("StartWindowMarquee()", DivinationDeepBreath);	
	}
}


// This is a specialized function created due to Win2K not allowing for
// the comparison to undefined. it will take a value and compare it to
// undefined, and if nBit = 1 it will also compare it to an empty string.
function Defined(value, nBit)
{
	var bDefined = false;
	
	var nVersion = SearchAppVersion(GlobalWin2000Version);
	if (nVersion != -1)
	{
		if (value != "")
			bDefined = true;
	}
	else
	{
		if(nBit = 1)
		{
			if (value != undefined && value == "")
				bDefined = true;
    	}
    	else
    	{
			if (value != undefined)
				bDefined = true;
    	}
	}
	return bDefined;
}


// This function will search for a string in the appVersion.
// It returns a -1 if no match was found, otherwise
// it returns the index where the text was found.
function SearchAppVersion(SearchString)
{
	/*	examples of navigator.appVersion
	4.0 (compatible; MSIE 5.5; Window95)
	4.0 (compatible; MSIE 5.01; Windows NT 5.0)
	*/
	var CurrentVersion;
	CurrentVersion = navigator.appVersion;

	// Make sure this variable is a string so we can use the search method.
	CurrentVersion = CurrentVersion.toString();

	var bFoundSpot = CurrentVersion.search(SearchString);

	return bFoundSpot;
}


/////// drop-down menu functions //////////////
function dropper(menu, bDrop)
{
	if(bDrop)
		menu.style.clip='rect(auto auto auto auto)';
	else
		menu.style.clip='rect(auto auto 24 auto)';
}

var MenuItemColor;
var bGetMenuItemColor = true;
function highlight(menuitem, bHighlight)
{
	if(bHighlight)
	{
		if(bGetMenuItemColor)
		{
			MenuItemColor=menuitem.bgColor;
			bGetMenuItemColor = false;
		}

		menuitem.bgColor="#6495ED"; //CORNFLOWER BLUE
	}
	else
		menuitem.bgColor=MenuItemColor;
}


// Capture Hot Keys
function HotKey(aMenu)
{
	// don't use a,d,e,f,h,t,v
	// ctrl = 17
	// alt = 18
	// left-arrow = 37
	// a=65, b=66, c=67, d=68, e=69, f=70, g=71, h=72, i=73
	// m = 77, n=78, o=79, p=80, q=81, r=82, s=83, t=84, u=85, w=87
	// This if-statement basically asks: is the alt button down
	// and is there another button down other than the alt key.
	if(window.event.altKey && window.event.keyCode != 18)
	{
		switch(window.event.keyCode)
		{
			//case 66: //b
			//	document.location="./bike.html";
			//	break;			
			case 67: //c
				document.location="./contact.html";
				break;			
			//case 69: //e
			//	document.location="./feedback.html";
			//	break;			
			//case 73: //i
			//	switch(aMenu)
			//	{
			//		case 0:
			//			break;
			//		case 1:
			//			document.location="./../index.html";
			//	};
			//	break;			
			//case 75: //k
			//	document.location="./books.html";
			//	break;			
			//case 76: //l
			//	document.location="./links.html";
			//	break;			
			case 77: //m
				document.location="./info.html";
				break;
			case 79: //o
				document.location="./index.html";
				break;
			//case 80: //p
			//	switch(aMenu)
			//	{
			//		case 0:
			//			document.location="./PicsFrame.html";
			//			break;
			//		case 1:
			//			document.location="./Mayne.html";
			//	};
			//	break;
			case 82: //r
				document.location="./room.html";
				break;
			case 83: //s
				document.location="./rates.html";
				break;
			//case 85: //u
			//	switch(aMenu)
			//	{
			//		case 0:
			//			document.location="./unreal.html";
			//			break;
			//		case 1:
			//			document.location="./DeepThunk.html";
			//	};
			//	break;
			//case 87: //w
			//	document.location="./downloads.html";
			//	break;
			//case 89: //y
			//	document.location="./host.html";
			//	break;
			default:
				var nDummy = 0;
				//if(window.event.keyCode != 37)
				//	alert(window.event.keyCode);
		};
	}
}


var msgwindow;
function openwindow()
{
	//msgwindow = window.open("http://birdieman.com/1000.html","displaywindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=450,height=350,left=25,top=50");
	msgwindow = window.open("http://birdieman.com/1000.html","displaywindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=245,height=200,left=25,top=50");
	//msgwindow = window.open("./1000.html","displaywindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=245,height=200,left=25,top=50");
}

function startTest()
{
	setTimeout("openwindow()", 500);
}

