// JavaScript Document
var time = 3000;
var numofitems = 9;
var message="If you are interested in the images\n or source code for this site, please\n contact the GA-808 Webmaster!";

//menu constructor
function menu(allitems,thisitem,startstate)
{ 
	callname= "gl"+thisitem;
	divname="subglobal"+thisitem;  
	this.numberofmenuitems = 9;
	this.caller = document.getElementById(callname);
	this.thediv = document.getElementById(divname);
	this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj)
{
	for (var i=1; i<= theobj.numberofmenuitems; i++)
	{
		var shutdiv =eval( "menuitem"+i+".thediv");
		shutdiv.style.visibility="hidden";
	}
	theobj.thediv.style.visibility="visible";
}
			
function closesubnav(event)
{
	if ((event.clientY <= 190)||(event.clientY >= 260))
	{
		for (var i=1; i<= numofitems; i++)
		{
			var shutdiv =eval('menuitem'+i+'.thediv');
	  		shutdiv.style.visibility='hidden';
		}
	}
}

function click(e)
{
	if (document.all)
	{
		if (event.button == 2)
		{
			alert(message);
			return false;
		}
	}
	if (document.layers)
	{
		if (e.which == 3)
		{
			alert(message);
			return false;
		}
	}
}
if (document.layers)
{
	document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

function popup(mylink, windowname, attributes)
{
	if(!window.focus)
		return true;
	
	var href;
	if(typeof(mylink) == 'string')
		href = mylink;
	else
		href = mylink.href;
	
	window.open(href, windowname, attributes);
	
	return false;
}
