
	// Drop down menu source derived from AnyLink Drop Down Menu example - © Dynamic Drive (www.dynamicdrive.com)
	// Visit http://www.dynamicdrive.com/ for full and original source code

	// Define menus
	var menu_1 = new Array()
	menu_1[0]='<a href="index.html">Overview</a>'
	menu_1[1]='<a href="history.html">History</a>'
	menu_1[2]='<a href="contacts.html">Contacts</a>'
	var menu_2 = new Array()
	menu_2[0]='<a href="consulting.html">Consulting</a>'
	menu_2[1]='<a href="software.html">Software</a>'
	menu_2[2]='<a href="hardware.html">Hardware</a>'
	var menu_3 = new Array()
	menu_3[0]='<a href="hormonalforecaster.html">Hormonal Forecaster</a>'
	menu_3[1]='<a href="synclights.html">SyncLights Player</a>'
	menu_3[2]='<a href="myfertilitycharts.html">My Fertility Charts</a>'
	var menu_4 = new Array()
	menu_4[0]='<a href="consulting.html">Consulting</a>'
	menu_4[1]='<a href="design.html">Design</a>'
	menu_4[2]='<a href="expertise.html">Expertise</a>'
	var menu_5 = new Array()
	menu_5[0]='<a href="http://www.hormonalforecaster.com/">Hormonal Forecaster.com</a>'
	menu_5[1]='<a href="http://www.clockingedge.com/synclights/">SyncLights Homepage</a>'
	menu_5[2]='<a href="http://www.myfertilitycharts.com/">My Fertility Charts.com</a>'
	var menu_6 = new Array()
	menu_6[0]='<a href="contacts.html">Contact Info</a>'
			
	// Browser specific checks
	var ie4=document.all
	var ns6=document.getElementById&&!document.all

	if (ie4||ns6)
	{
		document.write('<div id="drop_down_menu" style="visibility:hidden;width:200px;background-color:#4086AA" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
	}

	function get_x_location(linkObj)
	{
		var total = linkObj.offsetLeft;
		var parentEl = linkObj.offsetParent;
		while (parentEl != null)
		{
			total = total + parentEl.offsetLeft;
			parentEl = parentEl.offsetParent;
		}
		return total;
	}

	function get_y_location(linkObj)
	{
		var total = linkObj.offsetTop;
		var parentEl = linkObj.offsetParent;
		while (parentEl != null)
		{
			total = total + parentEl.offsetTop;
			parentEl = parentEl.offsetParent;
		}
		return total;
	}

	function showhide(menuObj, objEvent, desired_width)
	{
		if (ie4 || ns6)
		{
			dropmenuobj.style.left = dropmenuobj.style.top="-500px"
		}
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=desired_width
		if (((objEvent.type == "click") && (menuObj.visibility == hidden)) || (objEvent.type == "mouseover"))
		{
			menuObj.visibility='visible'
		}
		else if (objEvent.type == "click")
		{
			menuObj.visibility='hidden'
		}
	}

	function check_ie()
	{
		// Condition checks compatibility of IE
		return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

	function clear_browser_edge(obj, whichedge)
	{
		var edgeoffset=0
		if (whichedge=="rightedge")
		{
			var windowedge = ie4 && !window.opera ? check_ie().scrollLeft+check_ie().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? check_ie().scrollTop : window.pageYOffset
			var windowedge=ie4 && !window.opera? check_ie().scrollTop+check_ie().clientHeight-15 : window.pageYOffset+window.innerHeight-18
			dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
			if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)  //move up?
			{ 
				edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
				if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
				{
					edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
				}
			}
		}
		return edgeoffset
	}

	function populatemenu(linkObj)
	{
		if (ie4||ns6)
		{
			dropmenuobj.innerHTML=linkObj.join("")
		}
	}


	function create_drop_down(linkObj, objEvent, desired_width, menu_item)
	{
		if (window.event) 
		{
			event.cancelBubble=true
		}
		else if (objEvent.stopPropagation) 
		{
			objEvent.stopPropagation()
		}
		clearhidemenu()
		dropmenuobj=document.getElementById? document.getElementById("drop_down_menu") : drop_down_menu
		populatemenu(menu_item)

		if (ie4||ns6)
		{
			showhide(dropmenuobj.style, objEvent, desired_width)
			dropmenuobj.x=get_x_location(linkObj)
			dropmenuobj.y=get_y_location(linkObj)
			dropmenuobj.style.left=dropmenuobj.x-clear_browser_edge(linkObj, "rightedge")-25+"px"
			dropmenuobj.style.top=dropmenuobj.y-clear_browser_edge(linkObj, "bottomedge")+7+linkObj.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(objEvent)
	{
		if (ie4 && !dropmenuobj.contains(objEvent.toElement))
		{
			delayhidemenu()
		}
		else if (ns6&&objEvent.currentTarget != objEvent.relatedTarget && !contains_ns6(objEvent.currentTarget, objEvent.relatedTarget))
		{
			delayhidemenu()
		}
	}

	function hidemenu(objEvent)
	{
		if (typeof dropmenuobj != "undefined")
		{
			if (ie4 || ns6)
			{
				dropmenuobj.style.visibility = "hidden"
			}
		}
	}

	function delayhidemenu()
	{
		if (ie4 || ns6)
		{
			// Hides menu after specified number of milliseconds
			delayhide = setTimeout("hidemenu()", 250)
		}
	}

	function clearhidemenu()
	{
		if (typeof delayhide != "undefined")
		{
			clearTimeout(delayhide)
		}
	}

	// Automatically hide the menu once something has been clicked on
	document.onclick=hidemenu
