
	// 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 menu1 = new Array()
	menu1[0]='<a href="ttc.html">Get Pregnant</a>'
	menu1[1]='<a href="postponing.html">Postpone Pregnancy</a>'
	menu1[2]='<a href="infertility.html">Overcome Infertility</a>'
	var menu2 = new Array()
	menu2[0]='<a href="effectiveness.html">Effectiveness</a>'
	menu2[1]='<a href="hormones.html">Hormonal Triggers</a>'
	menu2[2]='<a href="cycle.html">Menstrual Cycle</a>'
	menu2[3]='<a href="ovulation.html">Ovulation</a>'
	menu2[4]='<a href="terms.html">Terminology</a>'
	var menu3 = new Array()
	menu3[0]='<a href="symptoms.html">Symptom Overview</a>'
	menu3[1]='<a href="bbt.html">Basal Body Temps</a>'
	menu3[2]='<a href="cm.html">Cervical Mucus</a>'
	menu3[3]='<a href="cervix.html">Cervix Observations</a>'
	menu3[4]='<a href="gap.html">Gap Method</a>'
	menu3[5]='<a href="ovtests.html">Ovulation Tests</a>'
	menu3[6]='<a href="cmm.html">Cervical Mucus Method</a>'
	menu3[7]='<a href="monitor.html">Fertility Monitor</a>'
	menu3[8]='<a href="saliva.html">Saliva Ferning</a>'
	menu3[9]='<a href="rhythm.html">Rhythm Method</a>'
	var menu4 = new Array()
	menu4[0]='<a href="chartlegend.html">Charting Legend</a>'
	menu4[1]='<a href="software.html">Charting Software</a>'	
	menu4[2]='<a href="paper.html">Paper Charting</a>'
	menu4[3]='<a href="recording.html">Recording Tips</a>'
	menu4[4]='<a href="analysis.html">Analyzing Fertility</a>'
	menu4[5]='<a href="shading.html">Chart Shading</a>'	
			
	// Browser specific checks
	var ie4=document.all
	var ns6=document.getElementById&&!document.all

	if (ie4||ns6)
	{
		document.write('<div id="pulldown_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 make_pulldown(linkObj, objEvent, desired_width, menu_item)
	{
		if (window.event) 
		{
			event.cancelBubble=true
		}
		else if (objEvent.stopPropagation) 
		{
			objEvent.stopPropagation()
		}
		clearhidemenu()
		dropmenuobj=document.getElementById? document.getElementById("pulldown_menu") : pulldown_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

