//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="whitening.html" title="Teeth Whitening"><span>Teeth Whitening</span></a>'
menu1[1]='<a href="invisalign.html" title="Invisalign&reg; Orthodontics"><span>Invisalign&reg;</span></a>'
menu1[2]='<a href="gum-disease.html" title="Gum Disease Treatment"><span>Gum Disease</span></a>'
menu1[3]='<a href="veneers.html" title="Porcelain Veneers"><span>Porcelain Veneers</span></a>'
menu1[4]='<a href="dental_implants.html" title="Dental Implants"><span>Dental Implants</span></a>'
menu1[5]='<a href="crowns.html" title="Porcelain Crowns"><span>Porcelain Crowns</span></a>'
menu1[6]='<a href="dental_bridge.html" title="Dental Bridges"><span>Dental Bridges</span></a>'
menu1[7]='<a href="composite_fillings.html" title="Composite Fillings"><span>Composite Fillings</span></a>'
menu1[8]='<a href="smile.html" title="Smile Makeover"><span>Smile Makeover</span></a>'
  

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="family_dental_implants.html" title="Dental Implants">Dental Implants</a>'
menu2[1]='<a href="family_invisalign.html" title="Invisalign&reg;">Invisalign&reg;</a>'
menu2[2]='<a href="family_gum-disease.html" title="Gum Disease Treatment">Gum Disease Treatment</a>'
menu2[3]='<a href="family_porcelain_crowns.html" title="Porcelain Crowns">Porcelain Crowns</a>'
menu2[4]='<a href="family_dental_bridges.html" title="Dental Bridges">Dental Bridges</a>'
menu2[5]='<a href="family_composite_fillings.html" title="Composite Fillings">Composite Fillings</a>'
menu2[6]='<a href="family_inlays_onlays.html" title="Inlays and Onlays">Inlays and Onlays</a>'
menu2[7]='<a href="family_porcelain_veneers.html" title="Porcelain Veneers">Porcelain Veneers</a>'
menu2[8]='<a href="family_dentures.html" title="Dentures">Dentures</a>'

var menu3=new Array()
menu3[0]='<a href="dental_care_for_infants.html" title="Dental Care for Infants">Dental Care for Infants</a>'
menu3[1]='<a href="dental_care_for_children_ages_two_six.html" title="Dental Care for Children Ages Two to Six" >Dental Care for Children Ages Two to Six</a>'
menu3[2]='<a href="dental_care_for_children_ages_seven_twelve.html" title="Dental Care for Children Ages Seven to Twelve">Dental Care for Children Ages Seven to Twelve</a>'
menu3[3]='<a href="dental_care_for_adolescents.html" title="Dental Care for Adolescents">Dental Care for Adolescents</a>'


var menu4=new Array()
menu4[0]='<a href="laser_therapy.html" title="Laser Therapy">Laser Therapy</a>'
menu4[1]='<a href="quality_labs.html" title="Quality Labs">Quality Labs</a>'
menu4[2]='<a href="digital_X_rays.html" title="Digital X-rays">Digital X-rays</a>'
menu4[3]='<a href="intraoral_camera.html" title="Intraoral Camera">Intraoral Camera</a>'
menu4[4]='<a href="digital_imaging.html" title="Digital Imaging">Digital Imaging</a>'
menu4[5]='<a href="purified_water.html" title="Purified Water">Purified Water</a>'
menu4[6]='<a href="rigorous_safety_health_standards.html" title="Rigorous Safety and Health Standards">Rigorous Safety and Health Standards</a>'	


var menu5=new Array()
menu5[0]='<a href="gallery.html" title="Photo Gallery">Photo Gallery </a>'
menu5[1]='<a href="testimonials.html" title="Testimonials">Testimonials</a>'
menu5[2]='<a href="before_and_after.html" title="Before and After ">Before and After </a>'
menu5[3]='<a href="dental_videos.html" title="Dental Videos">Dental Videos </a>'



var menuwidth='165px' //default menu width
var menubgcolor='#122128'  //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
