// JavaScript Document

/***********************************************
* 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 Volunteer menu
var volunteer=new Array()
volunteer[0]='<a href="/volmission.html" title="Mission &amp; Purpose ">Mission &amp; Purpose </a>'
volunteer[1]='<a href="/career.php#vol" title="Volunteer Openings ">Volunteer Openings </a>'
volunteer[2]='<a href="/events.php?id=3" title="VAC Events">VAC Events </a>'
volunteer[3]='<a href="/volform.html" title="Volunteer Form">Volunteer Form</a>'


//Contents for Who we Fund menu
var fund=new Array()
fund[0]='<a href="/Agency.html#RedCross" title="American Red Cross">American Red Cross </a>'
fund[1]='<a href="/Agency.html#bigbrosis" title="Big Brother/Sister ">Big Brother/Sister </a>'
fund[2]='<a href="/Agency.html#bona" title="Bona Vista ">Bona Vista </a>'
fund[3]='<a href="/Agency.html#boyscouts" title="Boy Scouts ">Boy Scouts </a>'
fund[4]='<a href="/Agency.html#Carver" title="Carver Center ">Carver Center </a>'
fund[5]='<a href="/Agency.html#casa" title="CASA">CASA</a>'
fund[6]='<a href="/Agency.html#fsa" title="Family Services">Family Services</a>'
fund[7]='<a href="/Agency.html#foodfind" title="Food Finders">Food Finders</a>'
fund[8]='<a href="/Agency.html#childcenter" title="Ho. Co. Children&acute;s Center">Ho. Co. Children&acute;s Center</a>'
fund[9]='<a href="/Agency.html#literacy" title="Literacy Coalition">Literacy Coalition</a>'
fund[10]='<a href="/Agency.html#mentalhealth" title="Mental Health Association">Mental Health Association</a>'
fund[11]='<a href="/Agency.html#army" title="Salvation Army">Salvation Army</a>'
fund[12]='<a href="/Agency.html#samaritan" title="Samaritan Caregivers">Samaritan Caregivers </a>'
fund[13]='<a href="/Agency.html#girlscout" title="Girl Scout">Girl Scout </a>'
fund[14]='<a href="/Agency.html#ir" title="Information & Referral">Information & Referral (I&amp;R)</a>'
fund[15]='<a href="/Agency.html#ymca" title="YMCA">YMCA</a>'

//Contents for How to get Help menu
var help=new Array()
help[0]='<a href="/info.html" title="Mission &amp; Purpose">Mission &amp; Purpose </a>'
help[1]='<a href="http://www.in211.org" title="2-1-1" target="_blank">2-1-1</a>'
help[2]='<a href="/resdirectory.php" title="Resource Directory">Resource Directory </a>'

//Contents for Campaign menu
var campaign=new Array()
campaign[0]='<a href="/campaign.html" title="The Campaign ">The Campaign </a>'
campaign[1]='<a href="/camplevels.html" title="Leadership Levels">Leadership Levels </a>'
campaign[2]='<a href="/campnews.html" title="News">News</a>'
campaign[3]='<a href="/camppartners.html" title="Partners that Care">Partners that Care </a>'
campaign[4]='<a href="/campgoals.html" title="Campaign Goals">Campaign Goals </a>'
campaign[5]='<a href="/campassociates.html" title="Associates">Associates</a>'

//Contents for Events menu
var events=new Array()
events[0]='<a href="/Event.html" title="Events">Events</a>'
events[1]='<a href="/EventsCalendar.html" title="Calendar of Events">Calendar of Events </a>'

//Contents for About Us menu
var aboutus=new Array()
aboutus[0]='<a href="/about.html" title="Mission &amp; Purpose ">Mission &amp; Purpose </a>'
aboutus[1]='<a href="/aboutuwstaff.html" title="United Way Staff">United Way Staff</a>'
aboutus[2]='<a href="/aboutboard.html" title="Board of Directors">Board of Directors</a>'
aboutus[3]='<a href="/aboutircouncil.html" title="I&R Council">I&R Council</a>'
aboutus[4]='<a href="/aboutplangive.html" title="Planned Giving Council">Planned Giving Council</a>'
aboutus[5]='<a href="/aboutvolact.html" title="Volunteer Action Council">Volunteer Action Council</a>'
aboutus[6]='<a href="/aboutcomm.html" title="Communications Council">Communications Council</a>'
aboutus[7]='<a href="/aboutfdc.html" title="FDC Council">FDC Council</a>'
aboutus[8]='<a href="/contact.html" title="Contacts">Contacts</a>'
aboutus[9]='<a href="/career.php" title="Careers">Careers</a>'
aboutus[10]='<a href="/aboutpartner.html" title="Partnerships">Partnerships</a>'
aboutus[11]='<a href="/aboutallocate.html" title="Agency Allocation">Agency Allocation</a>'
aboutus[12]='<a href="/aboutfinances.html" title="Financial Statement">Financial Statement</a>'

		
var menuwidth='90px' //default menu width
var menubgcolor='#10167E;'  //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;" 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
