/***********************************************

javascript include navigation

***********************************************/





/***************************************

Footer Navigation

***************************************/

function footer_nav(){

var nav='<td><a href="./index.htm" >Home</a></td>';

nav =nav + '<td><a href="./healthy_eating.htm" >Healthy <br/>Eating</a></td>';

nav =nav + '<td><a href="./healthy_kids.htm" >Healthy <br/>Kids</a></td>';

nav =nav + '<td><a href="./healthy_comm.htm" >Healthy <br/>Communities</a></td>';

nav =nav + '<td><a href="./phys_act.htm" >Physical <br/>Activity</a></td>';

nav =nav + '<td><a href="./resources.htm" >Educational <br/> Tools, Resources</a></td>';

nav =nav + '<td><a href="./links.htm" >Links</a></td>';

nav =nav + '<td><a href="./about.htm" >About Us</a></td>';

nav =nav + '</tr><tr><td colspan="8">';

nav =nav + '<a href="http://www.cachampionsforchange.net"  target="_blank"><img src="./images/footer_logo2.gif" alt="" border="0" width="50" height"48"></a>';

nav =nav + '<a href="http://www.acphd.org/nutritionservices/"  target="_blank"><img src="./images/footer_logo3.gif" alt="" border="0" width="120" height"48"></a>';

nav =nav + '<a href="http://www.acphd.org/" target="_blank"><img src="./images/footer_logo1.gif" alt="" border="0" width="40" height"48"></a>';

nav =nav + '</td>';



document.write (nav);

}	



/***************************************

Disclaimer

***************************************/

function disclaimer(){

var disc='<div id="disclaimer">Copyright &copy; 2010 Alameda County Public Health Department. All rights reserved. 1000 Broadway,<br/>';

disc =disc + ' Suite 500, Oakland, CA  94607 (510) 267-8000. Before using material from this site,<br/>';

disc =disc + 'please read our <a href="./docs/Terms.pdf" target="_pdf">Terms of Use.</a> Website update - March 2010</div>';



document.write (disc);
}



/***************************************

USDA Disclaimer

***************************************/



function disclaimerusda(){

var disc='<div id="disclaimerusda">This material was produced by the California Department of Public Health&rsquo;s <a href="http://www.usda.gov/wps/portal/usdahome" target="_blank">Network for a Health California</a> with funding from<br/>';

disc =disc + 'the USDA Supplemental Nutrition Assistance Program (formerly the Food Stamp Program).<br/>';

disc =disc + 'These institutions are equal opportunity providers and employers. In California, food stamps provide assistance<br/>';

disc =disc + 'to low-income households and can help buy nutritious foods for better health. <br/>';

disc =disc + 'For food stamp information, call 877-847-3663. For important nutrition information, visit <a href="http://www.cachampionsforchange.net" target="_blank">www.cachampionsforchange.net</a></div>';

document.write (disc);
}







/******************************

Rollover Images

******************************/

        



if (document.images) {

 hm_on =new Image();  hm_on.src ="./images/nav/home-over.gif"; 

 hm_off=new Image();  hm_off.src="./images/nav/home.gif"; 

 

 he_on =new Image();  he_on.src ="./images/nav/healthy-eating-over.gif"; 

 he_off=new Image();  he_off.src="./images/nav/healthy-eating.gif"; 

 

 hk_on =new Image();  hk_on.src ="./images/nav/healthy-kids-down.gif"; 

 hk_off=new Image();  hk_off.src="./images/nav/healthy-kids.gif";

 hk2_off=new Image();  hk2_off.src="./images/nav/healthy-kids-over.gif";

 

 hc_on =new Image();  hc_on.src ="./images/nav/healthy-communities-down.gif"; 

 hc_off=new Image();  hc_off.src="./images/nav/healthy-communities.gif";

 hc2_off=new Image();  hc2_off.src="./images/nav/healthy-communities-over.gif";

 

 pa_on =new Image();  pa_on.src ="./images/nav/physical-activity-over.gif"; 

 pa_off=new Image();  pa_off.src="./images/nav/physical-activity.gif";

 

 ttr_on =new Image();  ttr_on.src ="./images/nav/tools-down.gif"; 

 ttr_off=new Image();  ttr_off.src="./images/nav/tools.gif";

 ttr2_off=new Image();  ttr2_off.src="./images/nav/tools-over.gif";

 

 lnks_on =new Image();  lnks_on.src ="./images/nav/links_button_over.gif"; 

 lnks_off=new Image();  lnks_off.src="./images/nav/lnk.gif";

  

 au_on =new Image();  au_on.src ="./images/nav/about-us-over.gif"; 

 au_off=new Image();  au_off.src="./images/nav/about-us.gif"; 

}

else {



hm_on = ""

hm_off = ""

he_on = ""

he_off = ""

hk_on = ""

hk_off = ""

hk2_off = ""

hc_on = ""

hc_off = ""

hc2_off = ""

pa_on = ""

pa_off = ""

ttr_on = ""

ttr_off = ""

ttr2_off = ""

lnks_on = ""

lnks_off = ""

au_on = ""

au_off = ""

document.he = ""

document.hk = ""

document.hc = ""

document.pa = ""

document.ttr = ""

document.lnks =""

document.au = ""



}





/***********************************************

* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)

* This notice MUST stay intact for legal use

* Visit http://www.dynamicdrive.com/ for full source code

***********************************************/



//Contents for healthy communities

var menu1=new Array()

menu1[1]='<a href="./healthy_comm.htm"><img src="./images/nav/healthy-communities-over.gif" border="0"></a>'

menu1[2]='<a href="./healthy_snrs.htm">Healthy Seniors</a>'

menu1[3]='<a href="./hl_councils.htm">Healthy Living Councils</a>'

menu1[4]='<a href="./comm_partners.htm">Community Partners</a>'

menu1[5]='<a href="./worksite_wellness.htm">Worksite Wellness</a>'

menu1[6]='<a href="./hl_today.htm" style="padding-bottom:5px;">Healthy Living Today</a>'

menu1[7]='<a href="./soda_free.htm" style="padding-bottom:5px;">Soda Free<br />...for life!</a>'



//Contents for healthy kids

var menu2=new Array()

menu2[1]='<a href="./healthy_kids.htm"><img src="./images/nav/healthy-kids-over.gif" border="0"></a>'

menu2[2]='<a href="./teachers.htm" style="padding-bottom:5px;">Teachers</a>'



//Contents for Training Tools and Resources

var menu3=new Array()

menu3[1]='<a href="./resources.htm"><img src="./images/nav/tools-over.gif"  border="0"></a>'

menu3[2]='<a href="./media.htm" style="padding-bottom:5px;">Media</a>'



//Contents for About Us

var menu4=new Array()

menu4[1]='<a href="./about.htm"><img src="./images/nav/about-us-over.gif"  border="0"></a>'

menu4[2]='<a href="./staff_listing.htm" style="padding-bottom:5px;">Staff Listing</a>'



var menuwidth='105px' //default menu width

var menubgcolor='lightyellow'  //menu bgcolor

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)

var hidemenu_onclick="yes" //hide menu when user clicks within menu?







//********************************************************************************************

/////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:'+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){ //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(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")+"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