/***********************************************
* 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 Our Philosophy
var menu1=new Array()
menu1[0]='<a href="our_philosophy.asp">Our Philosophy</a>'
menu1[1]='<a href="compassionate_doctors.asp">Compassionate Doctors</a>'

//Contents for Patient Information
var menu2=new Array()
menu2[0]='<a href="appointments.asp">Appointments</a>'
menu2[1]='<a href="hours_location.asp">Hours and Location</a>'
menu2[2]='<a href="patient_forms.asp">Patient Forms</a>'
menu2[3]='<a href="insurance.asp">Insurance</a>'
menu2[4]='<a href="financial_policy.asp">Financial Policy</a>'
menu2[5]='<a href="childs_first_visit.asp">Your Child&rsquo;s First Visit</a>'
menu2[6]='<a href="how_parents_can_help.asp">How Parents Can Help</a>'

//Contents for Your Baby
var menu3=new Array()
menu3[0]='<a href="pregnancy.asp">Pregnancy</a>'
menu3[1]='<a href="xylitol.asp">Xylitol</a>'
menu3[2]='<a href="infant_care.asp">Infant Care</a>'
menu3[3]='<a href="your_babys_first_visit.asp">Your Baby&rsquo;s First Visit</a>'
menu3[4]='<a href="tooth_eruption.asp">Tooth Eruption & Charts</a>'
menu3[5]='<a href="teething.asp">Teething</a>'
menu3[6]='<a href="pacifiers.asp">Pacifiers & Thumb Sucking</a>'

//Contents for Pediatric Care
var menu4=new Array()
menu4[0]='<a href="why_pediatric_dentist.asp">Why a Pediatric Dentist?</a>'
menu4[1]='<a href="brushing_flossing.asp">Tooth Brushing & Flossing</a>'
menu4[2]='<a href="early_childhood_tooth_decay.asp">Early Childhood Tooth Decay</a>'
menu4[3]='<a href="adolescents_oral_care.asp">Adolescents & Oral Care</a>'
menu4[4]='<a href="nutrition.asp">Nutrition & Healthy Foods Guide</a>'

//Contents for Orthodontics
var menu5=new Array()
menu5[0]='<a href="orthodontics.asp">About Orthodontics</a>'
menu5[1]='<a href="retainers.asp">Appliances and Retainers</a>'
menu5[2]='<a href="types_of_bites.asp">Types of Bites</a>'
menu5[3]='<a href="gummy_smile.asp">Gummy Smile</a>'
menu5[4]='<a href="impacted_teeth.asp">Impacted Teeth</a>'
menu5[5]='<a href="missing_teeth.asp">Missing Teeth</a>'
menu5[6]='<a href="crowding_teeth.asp">Crowding Teeth</a>'
menu5[7]='<a href="spacing_teeth.asp">Spacing of Teeth</a>'
menu5[8]='<a href="classification_teeth.asp">Classification of Teeth</a>'
menu5[9]='<a href="faq_orthodontics.asp">Frequently Asked Questions</a>'

//Contents for Advanced Technology
var menu6=new Array()
menu6[0]='<a href="air_abrasion.asp">Air Abrasion</a>'
menu6[1]='<a href="arestin.asp">Arestin</a>'
menu6[2]='<a href="digital_xrays.asp">Digital X-Rays</a>'
menu6[3]='<a href="implants.asp">Implants</a>'
menu6[4]='<a href="intraoral_photography.asp">Intraoral Photography</a>'
menu6[5]='<a href="invisalign.asp">Invisalign&reg;</a>'
menu6[7]='<a href="oraverse.asp">OraVerse</a>'
menu6[8]='<a href="the_wand.asp">The Wand</a>'
menu6[9]='<a href="velscope.asp">VELscope</a>'

//Contents for Meet the Staff
var menu7=new Array()
menu7[0]='<a href="meet_the_staff.asp">About Our Staff</a>'
menu7[1]='<a href="dr_leslee_slaughter.asp">Dr. Leslee Slaughter</a>'
menu7[2]='<a href="dr_nikoo_daftary.asp">Dr. Nikoo Daftary</a>'

//Contents for Contact Us
var menu8=new Array()
menu8[0]='<a href="contact_us.asp">Contact Form</a>'
menu8[1]='<a href="contact_us.asp">Make an Appointment</a>'
menu8[2]='<a href="hours_location.asp">Hours and Location</a>'
menu8[3]='<a href="careers.asp">Careers</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='52b948'  //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 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
