// AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)

// Modified By Medalink (http://www.tge-studio.com)

var GLC = new Array()
GLC[0] = '<a href="/content/about">About GLC</a>'
GLC[1] = '<a href="/content/contact">Contact GLC</a>'
GLC[2] = '<a href="/content/donations">Donation Center</a>'
GLC[3] = '<a href="/content/prayer">GLC Prayer Center</a>'
GLC[4] = '<a href="/content/eeo">EEO Information</a>'
GLC[5] = '<a href="/content/dtv">DTV Information</a>'

var Articles = new Array()
Articles[0] = '<a href="/content/newsletter">Newsletter Archives</a>'
Articles[1] = '<a href="/templates/GLC/data/GLC_satlink_FINAL.pdf">Satlink Press Release</a>'
Articles[2] = '<a href="http://www.c-spanarchives.org/flash/player-time.html?start=2009-06-16%2010:17:50&stop=2009-06-16%2010:32:05&net=2" target="_blank">Sen. Menendez Pro-Isreal</a>'
Articles[3] = '<a href="http://patriotpost.us/pdf/09-26a.pdf" target="_blank">Alexander: Independence Day</a>'

var Watch = new Array()
Watch[0] = '<a href="/content/satellite">Satellite Information</a>'

var Programmers = new Array()
Programmers[0] = '<a href="/tools/programmers">GLC Programmers</a>'
Programmers[1] = '<a href="/content/guest_contact">GLC Guest Information</a>'

var Bookstore = new Array()
Bookstore[0] = '<a href="/store">Online Bookstore</a>'

var Admin = new Array()
Admin[0] = '<a href="index.php?P=NewsMgr">News Manager</a>'
Admin[1] = '<a href="index.php?P=Tools&T=Stats">View Statistics</a>'
Admin[2] = '<a href="index.php?P=Tools&T=AddCannedMusic">Add Canned Music</a>'
Admin[3] = '<a href="index.php?P=Tools&T=ListCannedSongs">View All Canned Music</a>'
Admin[4] = '<a href="index.php?P=Tools&T=AddNewMedia">Add Media</a>'
Admin[5] = '<a href="index.php?P=Tools&T=ListAllMedia">View All Media</a>'
Admin[6] = '<a href="index.php?P=Tools&T=TapingMgr">Add New Tape</a>'
Admin[7] = '<a href="index.php?P=Tools&T=ListAllTapes">View All Tapes</a>'
Admin[8] = '<a href="index.php?P=Tools&T=MasterPassword">Master Password List</a>'

var menuwidth = '165px' // Default menu width
var menubgcolor = '#232323' // Menu background color
var disappeardelay = '550' // Menu disappear speed onMouseout (in milliseconds)
var hidemenu_onclick = "yes" // Hide the menu when user clicks within menu?

// No further editing needed

var ie4 = document.all
var ns6 = document.getElementById && !document.all

if (ie4 || ns6)
	document
	        .write('<div id="TopMenu" style="visibility:hidden;width:'
	                + menuwidth
	                + ';background-color:'
	                + menubgcolor
	                + '" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype)
{
	var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop;
	var parentEl = what.offsetParent;
	while (parentEl != null)
	{
		totaloffset = (offsettype == "left") ? totaloffset
		        + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
		parentEl = parentEl.offsetParent;
	}
	return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth)
{
	if (ie4 || ns6)
		dropmenuobj.style.left = dropmenuobj.style.top = "-500px"
	if (menuwidth != "")
	{
		dropmenuobj.widthobj = dropmenuobj.style
		dropmenuobj.widthobj.width = menuwidth
	}
	if (e.type == "click" && obj.visibility == hidden || e.type == "mouseover")
		obj.visibility = visible
	else if (e.type == "click")
		obj.visibility = hidden
}

function iecompattest()
{
	return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement
	        : document.body
}

function clearbrowseredge(obj, whichedge)
{
	var edgeoffset = 0
	if (whichedge == "rightedge")
	{
		var windowedge = ie4 && !window.opera ? iecompattest().scrollLeft
		        + iecompattest().clientWidth - 15 : window.pageXOffset
		        + window.innerWidth - 15
		dropmenuobj.contentmeasure = dropmenuobj.offsetWidth
		if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth
	} else
	{
		var topedge = ie4 && !window.opera ? iecompattest().scrollTop
		        : window.pageYOffset
		var windowedge = ie4 && !window.opera ? iecompattest().scrollTop
		        + iecompattest().clientHeight - 15 : window.pageYOffset
		        + window.innerHeight - 18
		dropmenuobj.contentmeasure = dropmenuobj.offsetHeight
		if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure)
		{
			edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight
			if ((dropmenuobj.y - topedge) < dropmenuobj.contentmeasure)
				edgeoffset = dropmenuobj.y + obj.offsetHeight - topedge
		}
	}
	return edgeoffset
}

function populatemenu(what)
{
	if (ie4 || ns6)
		dropmenuobj.innerHTML = what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth)
{
	if (window.event)
		event.cancelBubble = true
	else if (e.stopPropagation)
		e.stopPropagation()
	clearhidemenu()
	dropmenuobj = document.getElementById ? document.getElementById("TopMenu")
	        : dropmenudiv
	populatemenu(menucontents)

	if (ie4 || ns6)
	{
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
		dropmenuobj.x = getposOffset(obj, "left")
		dropmenuobj.y = getposOffset(obj, "top")
		dropmenuobj.style.left = dropmenuobj.x
		        - clearbrowseredge(obj, "rightedge") + "px"
		dropmenuobj.style.top = dropmenuobj.y
		        - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px"
	}

	return clickreturnvalue()
}

function clickreturnvalue()
{
	if (ie4 || ns6)
		return false
	else
		return true
}

function contains_ns6(a, b)
{
	while (b.parentNode)
		if ((b = b.parentNode) == a)
			return true;
	return false;
}

function dynamichide(e)
{
	if (ie4 && !dropmenuobj.contains(e.toElement))
		delayhidemenu()
	else if (ns6 && e.currentTarget != e.relatedTarget
	        && !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu()
}

function hidemenu(e)
{
	if (typeof dropmenuobj != "undefined")
	{
		if (ie4 || ns6)
			dropmenuobj.style.visibility = "hidden"
	}
}

function delayhidemenu()
{
	if (ie4 || ns6)
		delayhide = setTimeout("hidemenu()", disappeardelay)
}

function clearhidemenu()
{
	if (typeof delayhide != "undefined")
		clearTimeout(delayhide)
}

if (hidemenu_onclick == "yes")
	document.onclick = hidemenu