//Surgery Overview Menu
var menu0=new Array()
menu0[0]='<div id="ie5menu" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none><div class="menuitems" url="surgery_faq.asp">FAQ</div>'
menu0[1]='<div class="menuitems" url="surgery_right.asp">Is Surgery Right for You?</div>'
menu0[2]='<div class="menuitems" url="surgery_choosing.asp">Choosing Surgery</div>'
menu0[3]='<div class="menuitems" url="surgery_life_after.asp">Life After Surgery</div>'
menu0[4]='<div class="menuitems" url="surgery_support_groups.asp">Support Groups</div>'


//Surgical Options Menu
var menu2=new Array()
menu2[0]='<div id="ie5menu" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none><div class="menuitems" url="options_gastric_banding.asp">Gastric Banding</a></div>'
menu2[1]='<div class="menuitems" url="options_roux_en_y.asp">Roux-en-Y Gastric Bypass</a></div>'
menu2[2]='<div class="menuitems" url="options_duodenal_switch.asp">Duodenal Switch</a></div>'
menu2[3]='<div class="menuitems" url="options_sleeve_gastrectomy.asp">Sleeve Gastrectomy</a></div>'
menu2[4]='<div class="menuitems" url="options_revision.asp">Revision</a></div>'


//About St. Francis Menu
var menu3=new Array()
menu3[0]='<div id="ie5menu" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none><div class="menuitems" url="st_francis_why_choose.asp">Why Choose St. Francis?</div>'
menu3[2]='<div class="menuitems" url="st_francis_healthy_solutions.asp">Healthy Solutions</a></div>'
menu3[3]='<div class="menuitems" url="st_francis_back_on_track.asp">Back on Track</a></div>'
menu3[4]='<div class="menuitems" url="st_francis_weight_loss_surgery.asp">Weight Loss Surgery</a></div>'
menu3[5]='<div class="menuitems" url="st_francis_meet_our_surgeons.asp">Meet Our Surgeons</a></div>'
menu3[6]='<div class="menuitems" url="st_francis_meet_our_patients.asp">Meet Our Patients</a></div>'
menu3[7]='<div class="menuitems" url="st_francis_news.asp">News</a></div>'


//About Obesity Menu
var menu4=new Array()
menu4[0]='<div id="ie5menu" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none><div class="menuitems" url="obesity_causes_of.asp">Causes of Morbid Obesity</div>'
menu4[1]='<div class="menuitems" url="obesity_related_conditions.asp">Obesity Related Conditions</a></div>'


//Paying for Surgery Menu
//var menu5=new Array()
//menu5[0]='<div id="ie5menu" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none><div class="menuitems" url="https://www.stfrancisweightforlife.org/index.asp">Home</div>'

var menufontcolor	
var menuwidth='200px' //default menu width
var menubgcolor='#d8dcac'  //menu bgcolor for firefox
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var ie4=document.all
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="text-align:center;visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

//this function found on the web; sets dropdown to display over top of the flash banner
function dm_ext_ruleObjectHide()
{
     return false;
} 
//this var is used to set the dropdown to display over the top of the flash banner
var dmObjectsCheck = 1; 

function highlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
menufontcolor=firingobj.style.color
firingobj.style.backgroundColor="#FFFFFF"
firingobj.style.color="#5c6100"//text of the dropdown
}
}

function lowlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor=""
firingobj.style.color=menufontcolor
}
}

function jumptoie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode
if (firingobj.getAttribute("target"))
	window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))
else
	window.location=firingobj.getAttribute("url")
}
}

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(mobj, obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
{
	hidemenu();
	//mobj.filters[0].apply();
	//mobj.filters[0].play();
	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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
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, 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 