<script type="text/javascript">

/***********************************************
* 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
***********************************************/

var menuwidth='200px' //default menu width
//var menubgcolor='url(http://www.endurancenutritiononline.com/templates/images/menu-background.png)'  //menu bgcolor
var menubgcolor='#d9d9d9'  //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" align="left" style="padding:10px; border: 1px solid #ffffff;visibility:hidden;width:'+menuwidth+';background:'+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=-500
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 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(menucontents == "")
{
return false;
}

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")+10
dropmenuobj.y=getposOffset(obj, "top")+7
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

var menus = new Array();

var menu1 = new Array();
//menu1[0] = '&raquo; <a href="<?=$root;?>/therapy/index.php" class="navigationb">Physical Therapy</a><br/>';
//menu1[1] = '&raquo; <a href="<?=$root;?>/therapy/industrial-rehabilition.php" class="navigationb">Industrial Rehabilitation</a><br/>';
//menu1[2] = '&raquo; <a href="<?=$root;?>/therapy/techniques-equipment.php" class="navigationb">Techniques & Equipment</a>';

menu1[0] = '&raquo; <a href="<?=$root;?>/therapy/orthopedic-rehabilition.php" class="navigationb">Orthopedic Rehab</a><br/>';
menu1[1] = '&raquo; <a href="<?=$root;?>/therapy/industrial-rehabilition.php" class="navigationb">Industrial Rehab</a><br/>';
menu1[2] = '&raquo; <a href="<?=$root;?>/therapy/athletic-performance-training.php" class="navigationb">Athletic and Performance Training</a>';

var menu2 = new Array();
menu2[0] = '&raquo; <a href="<?=$root;?>/services/performance-testing.php" class="navigationb">Performance Testing</a><br/>';
menu2[1] = '&raquo; <a href="<?=$root;?>/services/orthodics.php" class="navigationb">Orthotics</a><br/>';
menu2[2] = '&raquo; <a href="http://www.endurancenutritiononline.com" class="navigationb" target="_blank">Endurance Nutrition</a><br/>';
menu2[3] = '&raquo; <a href="<?=$root;?>/services/core-strength.php" class="navigationb">Core Strength</a><br/>';
menu2[4] = '&raquo; <a href="<?=$root;?>/services/speed-training.php" class="navigationb">Speed Training</a><br/>';
menu2[5] = '&raquo; <a href="<?=$root;?>/services/g-trainer.php" class="navigationb">G-Trainer</a><br/>';

var menu3 = new Array();
menu3[0] = '&raquo; <a href="<?=$root;?>/about/staff-scottsdale.php" class="navigationb">Scottsdale Staff</a><br/>';
menu3[1] = '&raquo; <a href="<?=$root;?>/about/staff-phoenix.php" class="navigationb">Phoenix Staff</a><br/>';
menu3[2] = '&raquo; <a href="<?=$root;?>/about/athletes.php" class="navigationb">Sponsored Athletes</a><br/>';
menu3[3] = '&raquo; <a href="<?=$root;?>/about/teams.php" class="navigationb">Teams &amp Clubs</a><br/>';
menu3[4] = '&raquo; <a href="<?=$root;?>/about/testimonials.php" class="navigationb">Testimonials</a><br/>';
menu3[5] = '&raquo; <a href="<?=$root;?>/about/charities.php" class="navigationb">Favorite Charities</a><br/>';
menu3[6] = '&raquo; <a href="<?=$root;?>/about/partners.php" class="navigationb">Partners</a><br/>';
menu3[7] = '&raquo; <a href="<?=$root;?>/about/now-hiring.php" class="navigationb">Work at Endurance</a><br/>';

//var menu4 = new Array();
//menu4[0] = '&raquo; <a href="<?=$root;?>/calendar/index.php" class="navigationb">Clinics/Events</a><br/>';
//menu4[1] = '&raquo; <a href="<?=$root;?>/calendar/training.php" class="navigationb">Training</a><br/>';
//menu4[2] = '&raquo; <a href="<?=$root;?>/calendar/racing.php" class="navigationb">Racing</a><br/>';

var menu5 = new Array();
menu5[0] = '&raquo; <a href="<?=$root;?>/resources/articles.php" class="navigationb">Articles</a><br/>';
menu5[1] = '&raquo; <a href="<?=$root;?>/resources/files.php" class="navigationb">Files</a><br/>';
menu5[2] = '&raquo; <a href="<?=$root;?>/resources/links.php" class="navigationb">Links</a><br/>';
//menu5[3] = '&raquo; <a href="<?=$root;?>/resources/publications.php" class="navigationb">Publications</a><br/>';

var menu6 = new Array();
menu6[0] = '&raquo; <a href="<?=$root;?>/contact/photos.php" class="navigationb">Facility Photos</a><br/>';


</script>

<table cellpadding="2" align="center"><tr>
<?if($section=='therapy'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="120" align="center" style="border-right: 1px solid #ffffff;" onMouseover="dropdownmenu(this,event,menu1,'225');" onMouseout="delayhidemenu();">&nbsp;<a href="<?=$root;?>/therapy/index.php" class="<?=$navst;?>">Physical&nbsp;Therapy</a>&nbsp;</td>
<?if($section=='services'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="80" align="center" style="border-right: 1px solid #ffffff;" onMouseover="dropdownmenu(this,event,menu2,'175');" onMouseout="delayhidemenu();">&nbsp;<a href="<?=$root;?>/services/index.php" class="<?=$navst;?>">Services</a>&nbsp;</td>
<?if($section=='about'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="80" align="center" style="border-right: 1px solid #ffffff;" onMouseover="dropdownmenu(this,event,menu3,'150');" onMouseout="delayhidemenu();">&nbsp;<a href="<?=$root;?>/about/index.php" class="<?=$navst;?>">Team</a>&nbsp;</td>
<?if($section=='calendar'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="80" align="center" style="border-right: 1px solid #ffffff;">&nbsp;<a href="<?=$root;?>/calendar/index.php" class="<?=$navst;?>">Calendar</a>&nbsp;</td>
<?if($section=='resources'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="80" align="center" style="border-right: 1px solid #ffffff;" onMouseover="dropdownmenu(this,event,menu5,'125');" onMouseout="delayhidemenu();">&nbsp;<a href="<?=$root;?>/resources/index.php" class="<?=$navst;?>">Resources</a>&nbsp;</td>
<?if($section=='news'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="80" align="center" style="border-right: 1px solid #ffffff;"><a href="<?=$root;?>/news/index.php" class="<?=$navst;?>">News</a></td>
<?if($section=='contact'){$navst="navigationc";}else{$navst="navigationa";}?>
<td width="120" align="center" onMouseover="dropdownmenu(this,event,menu6,'125');" onMouseout="delayhidemenu();"><a href="<?=$root;?>/contact/index.php" class="<?=$navst;?>">Locations&nbsp;&amp;&nbsp;Contact</a></td>
</tr></table>

