﻿
/***********************************************
* 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
***********************************************/
//August 08 - Added full paths to site for use on the donations page.  links were going back to the folder with a /secure addition to path.  secure folder is needed for the ssl certificate to work for the donations page. 
//Contents for Health Risk Assesment
var menu1 = new Array()
menu1[0]='<a href="http://www.lbassessments.com/BreastHealth/Site/Welcome.aspx">Breast Health</a>'
menu1[1]='<a href="http://www.lbassessments.com/ColonHealth/Site/Welcome.aspx">Colon Health </a>'
menu1[2]='<a href="http://www.lbassessments.com/Diabetes/Site/Welcome.aspx">Diabetes </a>'
menu1[3]='<a href="http://www.lbassessments.com/Stroke/Site/Welcome.aspx">Stroke</a>'
menu1[4]='<a href="http://www.lbassessments.com/HeartHealth/Site/Welcome.aspx">Heart Health </a>'
menu1[5]='<a href="http://www.lbassessments.com/Sleep/Site/Welcome.aspx">Sleep</a>'
menu1[6]='<a href="http://www.lbassessments.com/ProstateHealth/Site/Welcome.aspx">Prostate Health</a>'

//Contents for Additional Resources, and so on
var menu2 = new Array()
menu2[0] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=22">Community Calendar</a>'
menu2[1] = '<a href="http://www.lifebridgehealth.org/3dbody.cfm?id=5075">3D Medical Animations </a>'
menu2[2] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=3626">Participating Insurance Plans </a>'
menu2[3] = '<a href="http://www.mdmdmagazine.org/">Md MD Magazine</a>'
menu2[4] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=5141">Awards</a>'
menu2[5] = '<a href="http://www.lifebridgehealth.org/lifebridgebody.cfm?id=3600">LifeBridge Health LifePods</a>'
menu2[6] = '<a href="http://lifebridgeblogs.blogspot.com" target="_blank">LifeBridge Health Blogs</a>'
menu2[7] = '<a href="http://www.lifebridgehealth.org/videoplayer/lbhvideoplayer.html" target="_blank">LifeBridge Health Media Player</a>'
menu2[8] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=3578">Press Room</a>'
menu2[9] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=3059">Contact Us</a>'
menu2[10] = '<a href="http://www.lifebridgehealth.org/newsitemap.cfm">SiteMap</a>'

//Contents for About LifeBridge, and so on
var menu3 = new Array()
menu3[0] = '<a href="http://www.lifebridgehealth.org/body.cfm?id=18" target="_blank" >LifeBridge Health </a>'
menu3[1] = '<a href="http://www.lifebridgehealth.org/sinaibody.cfm?id=15" target="_blank">Sinai Hospital </a>'
menu3[2] = '<a href="http://www.lifebridgehealth.org/northwestbody.cfm?id=30" target="_blank">Northwest Hospital</a>'
menu3[3] = '<a href="http://www.lifebridgehealth.org/levindalebody.cfm?id=26" target="_blank">Levindale </a>'
menu3[4] = '<a href="http://www.lifebridgehealth.org/jewishbody.cfm?id=1847" target="_blank">Courtland Gardens   </a>'
menu3[5] = '<a href="http://www.lifebridgehealth.org/jewishbody.cfm?id=1847" target="_blank">LifeBridge Health & Fitness   </a>'

//Contents for Health Facts, and so on
var menu4 = new Array()
menu4[0] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/HealthFacts.aspx">Health Facts</a>'
menu4[1] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/BloodPressure.aspx">High Blood Pressure</a>'
menu4[2] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Stroke2.aspx">Stroke</a>'
menu4[3] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Glaucoma1.aspx">Glaucoma</a>'
menu4[4] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Cataracts1.aspx">Cataracts</a>'
menu4[5] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/ColonCancer.aspx">Colon Cancer</a>'
menu4[6] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/BreastCancer.aspx">Breast Cancer</a>'
menu4[7] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Epilepsy.aspx">Epilepsy</a>'
menu4[8] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/ProstateCancer.aspx">Prostate Cancer</a>'
menu4[9] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Arthritis2.aspx">Arthritis</a>'
menu4[10] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/VascularDisease.aspx">Peripheral Vascular Disease</a>'
menu4[11] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/Diabetes.aspx">Diabetes</a>'
menu4[12] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/CarpalTunnel.aspx">Carpal Tunnel Syndrome </a>'
menu4[13] = '<a href="http://www.knowyourhealthbaltimore.org/KnowYourHealth/JointReplacement.aspx">Joint Replacement </a>'

//Contents for Volunteering, and so on
var menu5 = new Array()
menu5[0] = '<a href="http://www.lifebridgehealth.org/sinaibody.cfm?id=1350">Volunteering at Sinai</a>'
menu5[1] = '<a href="http://www.lifebridgehealth.org/northwestbody.cfm?id=1351">Volunteering at Northwest Hospital</a>'
menu5[2] = '<a href="http://www.lifebridgehealth.org/levindalebody.cfm?id=1816">Volunteering at Levindale</a>'
menu5[3] = '<a href="http://www.lifebridgehealth.org/jewishbody.cfm?id=1846">Volunteering at Courtland Gardens </a>'

//Contents for Our Centers, and so on
var menu6 = new Array()
menu6[0] = '<a href="http://www.lifebridgehealth.org/homepage.cfm">LifeBridge Health</a>'
menu6[1] = '<a href="http://www.lifebridgehealth.org/sinai.cfm">Sinai Hospital</a>'
menu6[2] = '<a href="http://www.lifebridgehealth.org/northwest.cfm">Northwest Hospital</a>'
menu6[3] = '<a href="http://www.lifebridgehealth.org/levindale.cfm">Levindale Hebrew Geriatric Center <br>  &nbsp;&nbsp;and Hospital</a>'
menu6[4] = '<a href="http://www.lifebridgehealth.org/jewish.cfm">Courtland Gardens Nursing <br>  &nbsp;&nbsp;& Rehabilitation Home</a>'
menu6[5] = '<a href="http://www.lifebridgehealthandfitness.com/">LifeBridge Health & Fitness</a>'
menu6[6] = '<a href="http://www.lifebridgehealth.org/lifebridgebody.cfm?id=1922">Practice Dynamics, Inc</a>'
menu6[7] = '<a href="http://www.lifebridgehealth.org/lifebridgebody.cfm?id=1923">VSP</a>'



var menuwidth = '200px' //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 ie4a = document.all
var ns6 = document.getElementById && !document.all

if (ie4a || 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 (ie4a || 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 = ie4a && !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 = ie4a && !window.opera ? iecompattest().scrollTop : window.pageYOffset
        var windowedge = ie4a && !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 (ie4a || 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 (ie4a || 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 (ie4a || 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 (ie4a && !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 (ie4a || ns6)
            dropmenuobj.style.visibility = "hidden"
    }
}

function delayhidemenu() {
    if (ie4a || ns6)
        delayhide = setTimeout("hidemenu()", disappeardelay)
}

function clearhidemenu() {
    if (typeof delayhide != "undefined")
        clearTimeout(delayhide)
}

if (hidemenu_onclick == "yes")
    document.onclick = hidemenu

