// External Links ===============>

function externalLinks() {

 if (!document.getElementsByTagName) return;

 var anchors = document.getElementsByTagName("a");

 for (var i=0; i<anchors.length; i++) {

   var anchor = anchors[i];

   if (anchor.getAttribute("href") &&

       anchor.getAttribute("rel") == "external")

     anchor.target = "_blank";

 }

}

window.onload = externalLinks;



// Rollovers ===================>

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



// Pop-up Menus ===================>

function mmLoadMenus() {

  if (window.about_us) return;

  window.about_us = new Menu("root",135,21,"Trebuchet MS, Verdana, Arial",11,"#FFFFFF","#FFFFFF","#608EBA","#57A8ED","left","middle",5,0,300,-5,7,true,true,true,0,true,true);

  about_us.addMenuItem("Mission&nbsp;Statement","location='mission.html'");

  about_us.addMenuItem("Meet&nbsp;Our&nbsp;Doctors","location='meet_doctors.html'");

  about_us.addMenuItem("Meet&nbsp;the&nbsp;Team","location='meet_team.html'");

  about_us.addMenuItem("Our&nbsp;Blog","location='/blog/'");

  about_us.addMenuItem("Office&nbsp;Tour","location='office_tour.html'");

  about_us.addMenuItem("Our&nbsp;Scrapbook","location='scrapbook.html'");

   about_us.fontWeight="bold";

   about_us.hideOnMouseOut=true;

   about_us.bgColor='#608EBA';

   about_us.menuBorder=2;

   about_us.menuLiteBgColor='#608EBA';

   about_us.menuBorderBgColor='#052A51';

   

   if (window.about_ortho) return;

  window.about_ortho = new Menu("root",135,21,"Trebuchet MS, Verdana, Arial",11,"#FFFFFF","#FFFFFF","#608EBA","#57A8ED","left","middle",5,0,300,-5,7,true,true,true,0,true,true);

  about_ortho.addMenuItem("Why&nbsp;Braces","location='why_braces.html'");

  about_ortho.addMenuItem("For&nbsp;Children","location='for_children.html'");

  about_ortho.addMenuItem("Two&nbsp;Phase&nbsp;Treatment","location='two_phase.html'");

  about_ortho.addMenuItem("For&nbsp;Adults","location='for_adults.html'");

  about_ortho.addMenuItem("Surgical&nbsp;Orthodontics","location='surgical_ortho.html'");

  about_ortho.addMenuItem("Common&nbsp;Treatments","location='common_treatments.html'");

  about_ortho.addMenuItem("Ortho&nbsp;Dictionary","location='ortho_dictionary.html'");

  about_ortho.addMenuItem("Resources","location='resources.html'");

   about_ortho.fontWeight="bold";

   about_ortho.hideOnMouseOut=true;

   about_ortho.bgColor='#608EBA';

   about_ortho.menuBorder=2;

   about_ortho.menuLiteBgColor='#608EBA';

   about_ortho.menuBorderBgColor='#052A51';

   

   if (window.braces_101) return;

  window.braces_101 = new Menu("root",135,21,"Trebuchet MS, Verdana, Arial",11,"#FFFFFF","#FFFFFF","#608EBA","#57A8ED","left","middle",5,0,300,-5,7,true,true,true,0,true,true);

  braces_101.addMenuItem("Life&nbsp;with&nbsp;Braces","location='life_with_braces.html'");

  braces_101.addMenuItem("Types&nbsp;of&nbsp;Braces","location='types_braces.html'");

  braces_101.addMenuItem("Invisalign&reg;","location='invisalign.html'");

  braces_101.addMenuItem("The&nbsp;Damon&trade;&nbsp;System","location='damon.html'");

  braces_101.addMenuItem("iBraces&trade;","location='ibraces.html'");

  braces_101.addMenuItem("Types&nbsp;of&nbsp;Appliances","location='types_appliances.html'");

  braces_101.addMenuItem("Braces&nbsp;Diagram","location='braces_diagram.html'");

  braces_101.addMenuItem("Brace&nbsp;Painter","location='brace_painter.html'");

  braces_101.addMenuItem("Oral&nbsp;Care&nbsp;Video","window.open('http://www.orthosesame.com/ptcare-video/video/choice.html','','scrollbars=no,resizable=no,width=500,height=500,left=10,top=10');");

  braces_101.addMenuItem("Retainers","location='retainers.html'");

   braces_101.fontWeight="bold";

   braces_101.hideOnMouseOut=true;

   braces_101.bgColor='#608EBA';

   braces_101.menuBorder=2;

   braces_101.menuLiteBgColor='#608EBA';

   braces_101.menuBorderBgColor='#052A51';



writeMenus();

} // mmLoadMenus()



// Game Room Window Popup ===============>

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



window.onload = function() {MM_preloadImages('images/nav/about_on.gif','images/nav/patients_on.gif','images/nav/faqs_on.gif','images/nav/ortho_on.gif','images/nav/braces_on.gif','images/nav/emergency_on.gif','images/nav/fun_stuff_on.gif','images/nav/contact_on.gif','images/nav/home_on.gif');}
