/*
AnyLink Drop Down Menu - (c) Dynamic Drive (www.dynamicdrive.com)
This notice MUST stay intact for legal use
Visit http://www.dynamicdrive.com/ for full source code
*/

//MCAA
var menu1=new Array()
menu1[0]='<a href="/aboutus/aboutmcaa/" title="About MCAA">About MCAA</a>'
menu1[1]='<a href="/join/" title="Join MCAA">Join MCAA</a>'
menu1[2]='<a href="/subscribe/" title="Online Subscriber">Online Subscriber</a>'
menu1[3]='<a href="/aboutus/mcaaboard/" title="MCAA Board">MCAA Board</a>'
menu1[4]='<a href="/southof40/" title="South of 40">South of 40</a>'
menu1[5]='<a href="/aboutus/executivestaff/" title="Executive Staff">Executive Staff</a>'
menu1[6]='<a href="/aboutus/chapterinformation/" title="Chapter Information">Chapter Information</a>'
menu1[7]='<a href="/aboutus/reportofthepresident/" title="Report of the President">Report of the President</a>'
menu1[8]='<a href="/aboutus/keyaccomplishments/" title="Key Accomplishments">Key Accomplishments</a>'
menu1[9]='<a href="/aboutus/industrydocuments/" title="Industry Documents">Industry Documents</a>'
menu1[10]='<a href="/directoryofmembers/" title="Find a Contractor">Find a Contractor</a>'
menu1[12]='<a href="/aboutus/privacypolicy/" title="Privacy Policy">Privacy Policy</a>'
menu1[13]='<a href="/aboutus/contactus/" title="Contact Us">Contact Us</a>'

//MASONRY
var menu2=new Array()
menu2[0]='<a href="/aboutmasonry/historyofmasonry/" title="History of Masonry">History of Masonry</a>'
menu2[1]='<a href="/aboutmasonry/whymasonry/" title="Why Masonry">Why Masonry</a>'
menu2[2]='<a href="/aboutmasonry/greenbuildingsystem/" title="Green Building System">Green Building System</a>'
menu2[3]='<a href="/aboutmasonry/masonryglossary/" title="Masonry Glossary">Masonry Glossary</a>'
menu2[4]='<a href="/aboutmasonry/masonryfacts/" title="Masonry Facts">Masonry Facts</a>'
menu2[5]='<a href="/project/" title="Project Gallery">Project Gallery</a>'
menu2[6]='<a href="http://www.vision2020masonry.org/" title="Vision 2020">Vision 2020</a>'
menu2[7]='<a href="/hall-of-fame/" title="Hall of Fame">Hall of Fame</a>'

//NEWS & EVENTS
var menu3=new Array()
menu3[0]='<a href="/newsandevents/masonryheadlines/" title="Masonry Headlines">Masonry Headlines</a>'
menu3[1]='<a href="/newsandevents/masonryheadlines/popular.php" title="Masonry Headlines">Most Viewed Headlines</a>'
menu3[2]='<a href="/calendar/" title="Event Calendar">Event Calendar</a>'
menu3[3]='<a href="http://convention.masoncontractors.org/" title="MCAA Convention">MCAA Convention</a>'
menu3[4]='<a href="/newsandevents/midyearmeeting/" title="Midyear Meeting">Midyear Meeting</a>'
menu3[5]='<a href="/newsandevents/competitions/" title="Competitions">Competitions</a>'
menu3[6]='<a href="http://www.fastesttrowel.com/" title="Fastest Trowel">Fastest Trowel</a>'
menu3[7]='<a href="/team/" title="TEAM Awards">TEAM Awards</a>'
menu3[8]='<a href="/auction/" title="Online Auction">Online Auction</a>'
menu3[9]='<a href="http://www.masonrymagazine.com/" title="Masonry Magazine">Masonry Magazine</a>'

//TECHNICAL
var menu4=new Array()
menu4[0]='<a href="http://www.masonrysystems.org/" title="MasonrySystems.org">Masonry Systems</a>'
menu4[1]='<a href="/codesandstandards/technicalresources/" title="Masonry Technical Resources">Masonry Technical Resources</a>'
menu4[1]='<a href="/codesandstandards/tech-notes/" title="Masonry Tech Notes">Masonry Tech Notes</a>'
menu4[2]='<a href="/codesandstandards/masonrymailbag/" title="Masonry Mailbag">Masonry Mailbag</a>'
menu4[3]='<a href="/codesandstandards/wallbracingfaq/" title="Wall Bracing FAQ">Wall Bracing FAQ</a>'
menu4[4]='<a href="/codesandstandards/modelordinances/" title="Model Ordinances">Model Ordinances</a>'
menu4[5]='<a href="http://www.masonrysystems.org/masonry-systems/information/wall-system-profiles/" title="Wall System Profiles">Wall System Profiles</a>'

//LEGISLATIVE
var menu5=new Array()
menu5[0]='<a href="/governmentaffairs/legislativeconference/" title="Masonry Legislative Conference">Masonry Legislative Conference</a>'
menu5[1]='<a href="/governmentaffairs/legislativeissues/" title="Position Papers">Position Papers</a>'
menu5[2]='<a href="/governmentaffairs/regulatoryissues/" title="OSHA Issues">OSHA Issues</a>'
menu5[3]='<a href="/governmentaffairs/letterstocongress/" title="Letters to Congress">Letters to Congress</a>'
menu5[4]='<a href="/governmentaffairs/macpac/" title="MACPAC">MAC PAC</a>'
menu5[5]='<a href="/governmentaffairs/contactcongress/" title="Contact Congress">Contact Congress</a>'
menu5[6]='<a href="/governmentaffairs/votingandregistration/" title="Voting &amp; Registration">Voting &amp; Registration</a>'

//EDUCATION
var menu6=new Array()
menu6[0]='<a href="http://certification.masoncontractors.org/" title="Masonry Certification Program">Masonry Certification Program</a>'
menu6[1]='<a href="http://certification.masoncontractors.org/provider/profile.php?id=10001" title="Educational Programs">Educational Programs</a>'
menu6[2]='<a href="http://certification.masoncontractors.org/education/" title="Upcoming Education">Upcoming Education</a>'
menu6[3]='<a href="http://certification.masoncontractors.org/education/online.php" title="Online Education">Online Education</a>'
menu6[4]='<a href="http://www.masoncontractors.org/live/" title="Live Webinars">Live Webinars</a>'
menu6[5]='<a href="http://www.mtsreport.com/mcaaCertification/" title="Check Credits">Check Credits</a>'
menu6[6]='<a href="http://certification.masoncontractors.org/provider/" title="Approved Providers">Approved Providers</a>'

//SAFETY
var menu7=new Array()
menu7[0]='<a href="/safety/safetylibrary/" title="Safety Library">Safety Library</a>'
menu7[1]='<a href="/beeline/" title="Safety Equipment">Safety Savings</a>'
menu7[2]='<a href="/safety/forum/" title="eSafetyLine">Safety Forum</a>'
menu7[3]='<a href="/safety/oshacorrespondence/" title="OSHA Correspondence">OSHA Correspondence</a>'
menu7[4]='<a href="/safety/onsiteconsultation/" title="Onsite Consultation">Onsite Consultation</a>'

//CAREERS
var menu8=new Array()
menu8[0]='<a href="http://careers.masoncontractors.org/" title="Career Center">Career Center</a>'
menu8[1]='<a href="http://careers.masoncontractors.org/post.cfm" title="Employers">Employers</a>'
menu8[2]='<a href="http://careers.masoncontractors.org/hr/jobs/" title="Post a Job">Post a Job</a>'
menu8[3]='<a href="http://careers.masoncontractors.org/search.cfm" title="Job Seekers">Job Seekers</a>'
menu8[4]='<a href="http://careers.masoncontractors.org/search" title="Search for Jobs">Search for Jobs</a>'
menu8[5]='<a href="http://careers.masoncontractors.org/apply/advertise.cfm" title="Post a Resume">Post a Resume</a>'
menu8[6]='<a href="/masonrycareers/findatrainingprogram/" title="Find a Training Program">Find a Training Program</a>'
menu8[7]='<a href="/masonrycareers/careerinformation/" title="Career Information">Career Information</a>'
menu8[8]='<a href="/masonrycareers/recruitingandtraining/" title="Recruiting &amp; Training">Recruiting &amp; Training</a>'
menu8[9]='<a href="/masonrycareers/workforcedevelopmentinitiatives/" title="Workforce Initiatives">Workforce Initiatives</a>'
menu8[10]='<a href="/masonrycareers/forum/" title="Workforce Development Forum">Workforce Development Forum</a>'

//RESOURCES
var menu9=new Array()
menu9[0]='<a href="/perks/" title="MCAA Perks">MCAA Perks</a>'
menu9[1]='<a href="/product/" title="Buyer&#39;s Guide">Buyer&#39;s Guide</a>'
menu9[2]='<a href="/fedex/" title="FedEx Advantage">FedEx Advantage</a>'
menu9[3]='<a href="/resources/mediacenter/" title="Masonry Media Center">Masonry Media Center</a>'
menu9[4]='<a href="/resources/businessresources/" title="Business Resources">Business Resources</a>'
menu9[5]='<a href="/resources/websitedesignservices/" title="Website Design Services">Website Design Services</a>'
menu9[6]='<a href="/resources/strategicpartners/" title="Strategic Partner Program">Strategic Partner Program</a>'
menu9[7]='<a href="/resources/advertisinginformation/" title="Advertising Information">Advertising Information</a>'
menu9[8]='<a href="/resources/masonrymessageboard/" title="Masonry Message Board">Masonry Message Board</a>'
menu9[9]='<a href="/resources/downloads/" title="Downloads">Downloads</a>'
menu9[10]='<a href="/resources/industrylinks/" title="Industry Links">Industry Links</a>'

//SHOP
var menu10=new Array()
menu10[0]='<a href="https://store.masoncontractors.org/" title="MCAA Bookstore">MCAA Bookstore</a>'
menu10[1]='<a href="https://store.masoncontractors.org/index.php?cPath=21" title="Become a Member">Become a Member</a>'
menu10[2]='<a href="https://store.masoncontractors.org/index.php?cPath=22" title="Design/Codes &amp; Standards">Design/Codes &amp; Standards</a>'
menu10[3]='<a href="https://store.masoncontractors.org/index.php?cPath=23" title="Education">Education</a>'
menu10[4]='<a href="https://store.masoncontractors.org/index.php?cPath=24" title="Estimating">Estimating</a>'
menu10[5]='<a href="https://store.masoncontractors.org/index.php?cPath=26" title="Forklift Training">Forklift Training</a>'
menu10[6]='<a href="https://store.masoncontractors.org/index.php?cPath=30" title="Careers">Careers</a>'
menu10[7]='<a href="https://store.masoncontractors.org/index.php?cPath=31" title="Safety">Safety</a>'
menu10[8]='<a href="https://store.masoncontractors.org/index.php?cPath=33" title="Training">Training</a>'

var menuwidth='200px' //default menu width
var menubgcolor='#444444'  //menu bgcolor
var disappeardelay=250  //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
