// JavaScript Document/** homepage **/familytitle = new Array();familytitle[0] = '&nbsp;';familytitle[1] = 'Epilepsy\'s Impact on Learning: Working with Schools';familytitle[2] = 'Epilepsy and the Family: Impact on Siblings';familytitle[3] = 'Angelman Syndrome and Severe Epilepsy: Treating the Whole Child';familytitle[4] = 'Diagnosing Epilepsy: Understanding the EEG';familytitle[5] = 'Seeking Treatment Options: The Ketogenic Diet';familytitle[6] = 'Building Self-Esteem and Finding Community';familytitle[7] = 'Low Glycemic Index Treatment: A New Dietary Therapy';familytitle[8] = 'When Seizure Surgery is the Best Option';subnavs = new Array();subnavs[0] = '&nbsp;';subnavs[1] = '<p><a href="intro.htm">Introduction to Epilepsy and This Site</a> | <a href="brain.htm">The Brain</a> | <a href="seizure_types.htm">Seizure Types and Syndromes</a></p>';subnavs[2] = '<p style="margin-left: 150px;"><a href="diagnosis.htm">Diagnosis</a> | <a href="causes.htm">Causes</a> | <a href="treatment.htm">Treatment</a></p>';subnavs[3] = '<p><a href=learning.htm">Learning</a> | <a href="behavior.htm">Mental Health and Behavior</a> | <a href="family_life.htm">Family Life</a> | <a href="activities.htm">Activities, Safety, and First Aid</a> | <a href="talking.htm">Talking About Epilepsy</a> | <a href="resources.htm">Resources</a></p>';subnavs[4] = '<p align="right" style="margin-right: 10px;"><a href="michael.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[1]);">Michael</a> |<a href="caroline.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[2]);">Caroline</a> | <a href="henry.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[3]);">Henry</a> | <a href="maya.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[4]);">Maya</a> | <a href="evan.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[5]);">Evan</a> | <a href="cherinee.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[6]);">Cherinee</a> | <a href="rose.htm" onmouseout="titlereturn();" onmouseover="changediv(\'blurbtitle\',familytitle[7]);">Rose</a> | <a href="jeanny.htm" onmouseout="titlereturn();"  onmouseover="changediv(\'blurbtitle\',familytitle[8]);">Jeanny</a></p>';function divswap(id,classn) {	id.className = classn;}function showdiv(div) {	if (document.getElementById) document.getElementById(div).style.visibility = "visible"	else if (document.all) document.all[div].style.visibility = "visible"	else if (document.layers) document.layers[div].visibility = "show"}function hidediv(div) {	if (document.getElementById) document.getElementById(div).style.visibility = "hidden"	else if (document.all) document.all[div].style.visibility = "hidden"	else if (document.layers) document.layers[div].visibility = "hide"}function changediv(id,text) {	if (document.getElementById) {		document.getElementById(id).innerHTML = text;	}	else if (document.all) {		document.all(id).innerHTML = text;	}	else if (document.layers) {		eval("document.layers["+id+"].document.open()");		eval("document.layers["+id+"].document.write('" + text + "')");		eval("document.layers["+id+"].document.close()");	}}function titlereturn() {	changediv('blurbtitle',familytitle[0]);}/** popup **/function glossary_nopic(thislink) {    var glosswin = window.open(thislink.href, 'glossary_pop', 'width=329,height=222,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1'); 	glosswin.focus();	return false;}function glossary_pic(thislink) {    var glosswin = window.open(thislink.href, 'glossary_pop', 'width=329,height=222,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1'); 	glosswin.focus();	return false;}function show_transcript(thislink) {    var showtran = window.open(thislink.href, 'show_transcript', 'width=446,height=482,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1'); 	showtran.focus();	return false;}function enlarge_picture(thislink) {    var bigpicwin = window.open(thislink.href, 'enlarge_picture', 'width=485,height=360,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1');	bigpicwin.focus();	return false;}function sidebar(thislink) {    window.open(thislink.href, 'horiz', 'width=477,height=360,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1'); return false;}/** show/hide **/function show(whichDiv, thishref){	if (document.getElementById)	{	    document.getElementById(thishref).style.textDecoration = "none";/*	    thishref.innerHTML = "Show Video";	    thishref.onclick = function()             {                return hide(whichDiv, this);            }	*/		show_div(whichDiv);	}		return false;}function hide(whichDiv, thishref){	if (document.getElementById)	{	    thishref.innerHTML = "Show Video";	    thishref.onclick = function()             {                return show(whichDiv, this);            }	    hide_div(whichDiv);	}		return false;}function show_div(whichDiv){	if (document.getElementById)	{	    document.getElementById(whichDiv).style.display = 'block';	}		return false;}function hide_div(whichDiv){	if (document.getElementById)	{	    document.getElementById(whichDiv).style.display = 'none';	}		return false;}/** note this puts roll over on image, not href function initRollovers() {    //if we don't support getElementById then exit	if (!document.getElementById) return		//yes it even does preload	var aPreLoad = new Array();	var aImages  = new Array();	var sTempSrc;		//grab all nav images	//if(document.getElementById("dl-c-container")) {	//var aImages = document.getElementById("dl-c-container").getElementsByTagName("img");	//}    //nb if you want all images on page  you do this instead (i only wanted nav)    var aImages = document.getElementsByTagName("img");        //loop over images	for (var i = 0; i < aImages.length; i++) 	{			    //we use class name to find image			if (aImages[i].className.match('family-roll')) 		{		    //grab src			var src = aImages[i].getAttribute('src');						//grab extension (neato works for gif and jpg nd png if you so feel)			var ftype = src.substring(src.lastIndexOf('.'), src.length);						//create a new attribute for rollover (for fyi = '-over')						var hsrc = src.replace("_off"+ftype, '_over'+ftype);			aImages[i].setAttribute('hsrc', hsrc);						//PRELOAD !!			aPreLoad[i] = new Image();			aPreLoad[i].src = hsrc;						//on mouseover grab hsrc			aImages[i].onmouseover = function() 			{				sTempSrc = this.getAttribute('src');				this.setAttribute('src', this.getAttribute('hsrc'));			}							//on mouse out strip out "on"			aImages[i].onmouseout = function() 			{			    //alert(sTempSrc);				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_over'+ftype, ftype);				this.setAttribute('src', sTempSrc);			}		}	}}**/function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function popVideo(url, win_name, x, y){//      alert("popping:" + charname + ";" + type);/* 		var win_name = feature + "_" + type; *//* 		var big = win_name + ".html"; */       	var big_win = eval("window.open\(url,win_name,\'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + x + ",height=" + y + "\'\);");		big_win.focus();}function popTrans(url, win_name, x, y){//      alert("popping:" + charname + ";" + type);/* 		var win_name = feature + "_" + type; *//* 		var big = win_name + ".html"; */       	var big_win = eval("window.open\(url,win_name,\'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + x + ",height=" + y + "\'\);");		big_win.focus();}lobes = new Array('intro','frontal','occipital','parietal','temporal');headers = new Array('<span class=\"headersm\">Click on a lobe to learn more about it.<\/span>', 'Frontal Lobe', 'Occipital Lobe', 'Parietal Lobe', 'Temporal Lobe');function showinterid(id) {	for (foo in lobes) {		if ( lobes[foo] == id ) {			if (document.getElementById) {				document.getElementById(id).style.display = "block";				document.getElementById('header').innerHTML = headers[foo];			} else if (document.all) {				document.all[id].style.display = "block"; 				document.getElementById('header').innerHTML = headers[foo];			} else if (document.layers) {				document.layers[id].display = "block"; 				document.getElementById('header').innerHTML = headers[foo];			}		} else {			if (document.getElementById) document.getElementById(lobes[foo]).style.display = "none"			else if (document.all) document.all[lobes[foo]].style.display = "none"			else if (document.layers) document.layers[lobes[foo]].display = "none"		}	}}
