var menu1=new Array()
menu1[0]='<a href="'+ url +'/About_Obesity/What_Is_Obesity">What is Obesity</a>'
menu1[1]='<a href="'+ url +'/About_Obesity/What_Causes_Morbid_Obesity">What Causes Morbid Obesity</a>'
menu1[2]='<a href="'+ url +'/About_Obesity/Health_Risks_And_Related_Conditions">Health Risks and Related Conditions</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="'+ url +'/Weight_Loss_Surgery/Why_Weight_Loss_Surgery">Why Weight Loss Surgery</a>'
menu2[1]='<a href="'+ url +'/Weight_Loss_Surgery/Types_Of_Procedures">Types of Procedures</a>'
menu2[2]='<a href="'+ url +'/Weight_Loss_Surgery/How_Surgery_Reduces_Weight">How Surgery Reduces Weight</a>'
menu2[3]='<a href="'+ url +'/Weight_Loss_Surgery/Am_I_A_Candidate_For_Surgery">Am I a Candidate for Surgery</a>'
menu2[4]='<a href="'+ url +'/Weight_Loss_Surgery/How_Effective_Is_Surgery">How Effective is Surgery</a>'
menu2[5]='<a href="'+ url +'/Weight_Loss_Surgery/Risks_Of_Surgery">Risks of Surgery</a>'

var menu3=new Array()
menu3[0]='<a href="'+ url +'/About_Our_Program/Meet_Our_Team">Meet Our Team</a>'
menu3[1]='<a href="'+ url +'/About_Our_Program/The_Hospital">The Hospital</a>'
menu3[2]='<a href="'+ url +'/About_Our_Program/meet-our-patients">Meet Our Patients</a>'
menu3[3]='<a href="'+ url +'/About_Our_Program/patient-testimonials">Patient Testimonials</a>'
menu3[4]='<a href="'+ url +'/About_Our_Program/Our_Program_Step_By_Step">Our Program Step-by Step</a>'
menu3[5]='<a href="'+ url +'/About_Our_Program/WLSC_Corporate_Video">WLSC Corporate Video</a>'

var menu4=new Array()
menu4[0]='<a href="'+ url +'/Getting_Started/Questions_For_My_Physician">Questions for My Physician</a>'
menu4[1]='<a href="'+ url +'/Getting_Started/Questions_For_My_Surgeon">Questions for My Surgeon</a>'
menu4[2]='<a href="'+ url +'/Getting_Started/New_Patient_Forms">New Patient Forms</a>'

var menu5=new Array()
menu5[0]='<a href="'+ url +'/Education/Seminars">Seminar Schedule</a>'
menu5[1]='<a href="'+ url +'/Education/SeminarsAttendees">Register to Attend a Free Seminar</a>'
menu5[2]='<a href="'+ url +'/Education/Research">Research</a>'
menu5[3]='<a href="'+ url +'/Education/Articles_And_Information">Articles and Information</a>'
menu5[4]='<a href="'+ url +'/Education/Insurance_And_Financial_Options">Insurance and Financial Options</a>'
menu5[5]='<a href="'+ url +'/Education/Affordability">Affordability</a>'
menu5[6]='<a href="'+ url +'/Education/Newsletter">Newsletter</a>'
menu5[7]='<a href="'+ url +'/Education/HIPAA_Regulations_And_Guidelines">HIPAA Regulations and Guidelines</a>'


var menu7=new Array()
menu7[1]='<a href="'+ url +'/Patient_Support/Nutrition">Nutrition</a>'
menu7[2]='<a href="'+ url +'/Patient_Support/Exercise_And_Training">Exercise and Training</a>'
menu7[3]='<a href="'+ url +'/Patient_Support/Psychological_Support">Psychological Support</a>'
menu7[4]='<a href="'+ url +'/Calendar">Support Group Schedule</a>'
/*menu7[5]='<a href="'+ url +'/Patient_Support/Patient_To_Patient_Support_Chat_Rooms">Support Chat Rooms</a>'*/
menu7[6]='<a href="'+ url +'/forum-login" target="_blank">Message Board</a>'
menu7[7]='<a href="'+ url +'/Patient_Support/Emmi">Emmi</a>'
menu7[8]='<a href="'+ url +'/Patient_Support/Patient_Portal">Patient Portal </a>'

/***********************************************
* AnyLink Vertical 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

var disappeardelay=1500 //was 250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)


/////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: 180px" 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=-500
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-obj.offsetWidth < 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 menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}

}
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")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"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)
}

function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

function shiftOpacity(id, millisec) { 
    //if an element is invisible, make it visible, else make it invisible 
    if(document.getElementById(id).style.opacity == 0) { 
        opacity(id, 0, 100, millisec); 
    } else { 
        opacity(id, 100, 0, millisec); 
    } 
} 


