﻿var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page onlyif (document.getElementById){ document.write('<style type="text/css">\n')document.write('.menusubTitle{display: none;}\n')document.write('</style>\n')}function SwitchMenu(obj,menu){	if(document.getElementById){	var oMenuBar = document.getElementById(menu);	var arMenBar = document.getElementById("masterdiv").getElementsByTagName("div")		var el = document.getElementById(obj);	var ar = document.getElementById("masterdiv").getElementsByTagName("div");		//for (var i=0; i<arMenBar.length; i++){		//    if (arMenBar[i].className=="menutitleOpen")		    //arMenBar[i].className = "menutitle";		//}		if(el.style.display != "block"){ 			for (var i=0; i<ar.length; i++){				if (ar[i].className=="menusubTitle") 				ar[i].style.display = "none";							    //oMenuBar.className = "menutitle"			}			el.style.display = "block";			//oMenuBar.className = "menutitleOpen"		}else{			el.style.display = "none";			//oMenuBar.className = "menutitle"		}	}}function get_cookie(Name) { var search = Name + "="var returnvalue = "";if (document.cookie.length > 0) {offset = document.cookie.indexOf(search)if (offset != -1) { offset += search.lengthend = document.cookie.indexOf(";", offset);if (end == -1) end = document.cookie.length;returnvalue=unescape(document.cookie.substring(offset, end))}}return returnvalue;}function onloadfunction(){if (persistmenu=="yes"){var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathnamevar cookievalue=get_cookie(cookiename)if (cookievalue!="")document.getElementById(cookievalue).style.display="block"}}function savemenustate(){var inc=1, blockid=""while (document.getElementById("sub"+inc)){if (document.getElementById("sub"+inc).style.display=="block"){blockid="sub"+incbreak}inc++}var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathnamevar cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockiddocument.cookie=cookiename+"="+cookievalue}if (window.addEventListener)window.addEventListener("load", onloadfunction, false)else if (window.attachEvent)window.attachEvent("onload", onloadfunction)else if (document.getElementById)window.onload=onloadfunctionif (persistmenu=="yes" && document.getElementById)window.onunload=savemenustate//------------------------------------//Contents for menu var menu1=new Array()menu1[0]='<a href="../chapter10/chapter10cPeroxisomes.html#xald">Adrenoleukodystrophy</a>'menu1[1]='<a href="../chapter9/chapter9fALS.html">ALS</a>'menu1[2]='<a href="../chapter9/chapter9bAD.html">Alzheimer\'s disease</a>'menu1[3]='<a href="../chapter9/chapter9cFTD.html">Frontotemporal dementia</a>'menu1[4]='<a href="../chapter11/chapter11eHydrocephalus.html#chiari">Chiari malformations</a>'menu1[5]='<a href="../chapter5/chapter5ePrions.html">CJD</a>'menu1[6]='<a href="../chapter13/chapter13eInflammatory.html#dm">Dermatomyositis</a>'menu1[7]='<a href="../chapter7/chapter7bGliomas.html#gbm">Glioblastoma multiforme</a>'menu1[8]='<a href="../chapter12/chapter12Neuropathy.html#gbs">Guillain-Barre syndrome</a>'menu1[9]='<a href="../chapter2/chapter2cCerebralhemorrhage.html">Hemorrhage, cerebral</a>'menu1[10]='<a href="../chapter5/chapter5dViruses.html#hsv">Herpes simplex encephalitis</a>'menu1[11]='<a href="../chapter11/chapter11eHydrocephalus.html">Hydrocephalus</a>'menu1[12]='<a href="../chapter13/chapter13eInflammatory.html#ibm">Inclusion body myositis</a>'menu1[13]='<a href="../chapter2/chapter2bCerebralinfarcts.html">Infarct, cerebral</a>'menu1[14]='<a href="../chapter10/chapter10aLSDgeneral.html">Lysosomal storage diseases</a>'menu1[15]='<a href="../chapter7/chapter7cMedulloblastoma.html">Medulloblastoma</a>'menu1[16]='<a href="../chapter5/chapter5aSuppurative.html#meningitis">Meningitis</a>'menu1[17]='<a href="../chapter10/chapter10dMitochondria.html">Mitochondrial diseases</a>'menu1[18]='<a href="../chapter6/chapter6aMS.html">MS</a>'menu1[19]='<a href="../chapter13/chapter13cDystrophy.html">Muscular dystrophy</a>'menu1[20]='<a href="../chapter3/chapter3bAsphyxia.html">Neonatal asphyxia</a>'menu1[21]='<a href="../chapter11/chapter11bNTD.html">Neural tube defects</a>'menu1[22]='<a href="../chapter11/chapter11dNMD.html">Neuronal migration defects</a>'menu1[23]='<a href="../chapter9/chapter9dPD.html">Parkinson\'s disease</a>'menu1[24]='<a href="../chapter3/chapter3cPvl.html">Periventricular leukomalacia</a>'menu1[25]='<a href="../chapter13/chapter13eInflammatory.html">Polymyositis</a>'menu1[26]='<a href="../chapter4/chapter4bContusions_dai_sbs.html#shake">Shaken baby syndrome</a>'	var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)var horizontaloffset=113 //horizontal offset of menu from default location. (0-5 is a good value)var verticaloffset=-82/////No further editting neededvar ie4=document.allvar ns6=document.getElementById&&!document.allif (ie4||ns6)document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" 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=-500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-obj.offsetWidth < 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){ //move menu up?edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeightif ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)edgeoffset=dropmenuobj.y}}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("dropmenudiv") : 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")+obj.offsetWidth+horizontaloffset+"px"dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "topedge")+obj.offsetWidth+verticaloffset+"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)}function mailpage(){mail_str = "mailto:?subject=Check out the " + document.title;mail_str += "&body=I thought you might be interested in the " + document.title;mail_str += ". You can view it at, " + location.href; location.href = mail_str;}function favit(heading,address){        if(window.external)window.external.AddFavorite(address,heading);        else if(window.sidebar)window.sidebar.addPanel(heading,address,"");       }