/***********************************************
* 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 menu 1 - Home
var menu1=new Array()
menu1[0]='<a href="http://www.ichs.net/index.html" target="_top">I.C.H.S. Home Page</a>'

//Contents for menu 2 - About Us
var menu2=new Array()
menu2[0]='<a href="http://www.ichs.net/ichs_in_the_news.html" target="_top">ICHS in the News</a>'
menu2[1]='<a href="http://www.ichs.net/mission_statement.html" target="_top">Mission Statement</a>'
menu2[2]='<a href="http://www.ichs.net/meeting_reports_and_financial_info.html" target="_top">Board Meeting Reports & Financial Info</a>'
menu2[3]='<a href="http://www.ichs.net/history_about_ichs.html" target="_top">I.C.H.S. History</a>'
menu2[4]='<a href="http://www.ichs.net/board_staff.html" target="_top">Board of Directors & Staff</a>'
menu2[5]='<a href="http://www.ichs.net/hours_location.html" target="_top">Hours & Location</a>'
menu2[6]='<a href="http://www.ichs.net/contact_ichs.html" target="_top">Contact ICHS</a>'
//menu2[7]='<a href="contact_ichs.html" target="_top">TEST Contact</a>'
//menu2[8]='<a href="index.html" target="_top">TEST Index</a>'

//Contents for menu 3 - Adoptions
var menu3=new Array()
menu3[0]='<a href="http://search.petfinder.com/shelterSearch/shelterSearch.cgi?shelterid=WI71&status=A&animal=Dog&preview=1" target="_new/"><B>Adoptable Dogs</B></a>'
menu3[1]='<a href="http://search.petfinder.com/shelterSearch/shelterSearch.cgi?shelterid=WI71&status=A&animal=Cat&preview=1" target="_new/"><B>Adoptable Cats</B></a>'
menu3[2]='<a href="http://www.ichs.net/adoption_application.html" target="_top">Adoption Application and Fees</a>'
menu3[3]='<a href="http://www.ichs.net/petsOfMonth/index.html" target="_top">Pets of the Month</a>'
menu3[4]='<a href="http://www.ichs.net/adoption_success_stories.html" target="_top">Success Stories</a>'

//Contents for menu 4 - Services
var menu4=new Array()
menu4[0]='<a href="http://www.ichs.net/clinic_schedule.html" target="_top">Low Cost Vaccination and Dog Licensing Clinics</a>'
//menu4[0]='<a href="http://www.ichs.net/education.html">Education</a>'
//menu4[1]='<a href="http://www.ichs.net/dog_training.html">Dog Training & Behavior Modification</a>'
menu4[1]='<a href="http://www.ichs.net/ichs_newsletter.html" target="_top">I.C.H.S. Newsletter</a>'
//menu4[1]='<a href="http://www.ichs.net/junior.html" target="_top">Junior Humane Society</a>'
menu4[2]='<a href="http://www.ichs.net/humane_officer.html" target="_top">Humane Officer</a>'
menu4[3]='<a href="http://www.ichs.net/licensing_your_dog.html" target="_top">Licensing Your Dog</a>'
menu4[4]='<a href="http://www.ichs.net/4h_training_partnership.html" target="_top">4-H Shelter Dog Training Partnership</a>'
//menu4[6]='<a href="http://www.ichs.net/s-n_assistance.html">Spay/Neuter Assistance Program</a>'

//Contents for menu 5 - How to Help
var menu5=new Array()
menu5[0]='<a href="http://www.ichs.net/membership.html" target="_top">Membership</a>'
menu5[1]='<a href="http://www.ichs.net/volunteer_application.html" target="_top">Volunteer & Application</a>'
menu5[2]='<a href="http://www.ichs.net/foster_home_application.html" target="_top">Foster Home & Application</a>'
menu5[3]='<a href="http://www.ichs.net/donations.html" target="_top">Donations</a>'
menu5[4]='<a href="http://www.ichs.net/business_sponsorship.html" target="_top">Business Sponsorship</a>'
menu5[5]='<a href="http://www.ichs.net/pet_calendar.html" target="_top"><B>2010 I.C.H.S. Pet Calendars</b></a>'
menu5[6]='<a href="http://www.ichs.net/wish_list.html" target="_top">Wish List</a>'
menu5[7]='<a href="http://www.ichs.net/circle_of_caring.html" target="_top">Circle of Caring</a>'
menu5[8]='<a href="http://www.ichs.net/licensing_your_dog.html" target="_top">Licensing Your Dog</a>'
menu5[9]='<div align="center"><a href="http://www.ichs.net/thank_you.html" target="_top">Thank you to Helpful<br> Businesses and Organizations</a></div>'

//Contents for menu 6 - Events
var menu6=new Array()
menu6[0]='<a href="http://www.ichs.net/calendar.html" target="_top"><strong>I.C.H.S. Calendar</strong></a>'
menu6[1]='<div align="center"><a href="http://www.ichs.net/thank_you.html" target="_top">Thank you to Helpful<br> Businesses and Organizations</a></div>'
//menu6[1]='<a href="http://www.ichs.net/events/2009/cram_the_van_spring.html" target="_top">"Cram the Van" Supplies Drive</a>'
//menu6[2]='<a href="http://www.ichs.net/events/2009/Glen_Gerard_Magic_Show.html" target="_top">The Glen Gerard Magic Show</a>'
//menu6[1]='<a href="http://www.ichs.net/bake_sale.html" target="_top">Annual Spring Bake Sale</a>'
menu6[2]='<a href="http://www.ichs.net/clinic_schedule.html" target="_top">Low Cost Vaccination and Dog Licensing Clinics</a>'
menu6[3]='<a href="http://www.ichs.net/art_auction.html" target="_top">10th Annual "Artists to the Rescue" Live Art Auction</a>'
menu6[4]='<a href="http://www.ichs.net/5k_run.html" target="_top">Join us for Paws Fur A Cause 2010!</a>'
menu6[5]='<a href="http://www.ichs.net/quadrupedal.html" target="_top">Quadrupedal Century 2010</a>'
menu6[6]='<a href="http://www.ichs.net/silent_auction.html" target="_top">10th Annual Silent Auction “Fun”-Raiser - 2009</a>'
menu6[7]='<a href="http://www.ichs.net/ichs_newsletter.html" target="_top">I.C.H.S. Newsletter</a>'

//Contents for menu 7 - Unused at this time
var menu7=new Array()
menu7[0]='<a href="http://www.ichs.net" target="_top">PAGE 01</a>'
menu7[1]='<a href="http://www.ichs.net" target="_top">PAGE 02</a>'
menu7[2]='<a href="http://www.ichs.net" target="_top">PAGE 03</a>'
menu7[3]='<a href="http://www.ichs.net" target="_top">Page 04</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='#E0E0E0'  //menu bgcolor
var disappeardelay=999  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //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
