function clearOthers(exception) {
	if (exception != 'subnav_clinicalteam_team') {document.getElementById('subnav_clinicalteam_team').style.visibility = 'hidden';}
	if (exception != 'subnav_clinicalteam_facilities') {document.getElementById('subnav_clinicalteam_facilities').style.visibility = 'hidden';}
	if (exception != 'subnav_spec_interative') {document.getElementById('subnav_spec_interative').style.visibility = 'hidden';}
	if (exception != 'subnav_spec_diagnostic') {document.getElementById('subnav_spec_diagnostic').style.visibility = 'hidden';}
	if (exception != 'subnav_spec_intervention') {document.getElementById('subnav_spec_intervention').style.visibility = 'hidden';}
	if (exception != 'subnav_spec_rehabil') {document.getElementById('subnav_spec_rehabil').style.visibility = 'hidden';}
	if (exception != 'subnav_patient_diagnostic') {document.getElementById('subnav_patient_diagnostic').style.visibility = 'hidden';}
	if (exception != 'subnav_patient_medications') {document.getElementById('subnav_patient_medications').style.visibility = 'hidden';}
	if (exception != 'subnav_patient_recovery') {document.getElementById('subnav_patient_recovery').style.visibility = 'hidden';}
	if (exception != 'subnav_patient_changes') {document.getElementById('subnav_patient_changes').style.visibility = 'hidden';}
	if (exception != 'subnav_heart_yourheart') {document.getElementById('subnav_heart_yourheart').style.visibility = 'hidden';}
	if (exception != 'subnav_heart_disease') {document.getElementById('subnav_heart_disease').style.visibility = 'hidden';}
}


function getWindowWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
return myWidth;

}


// var mouseIsOver_subnav_stay = 'no';
// var mouseIsOver_subnav_home = 'no';


function hideNav(curMenu) {
	overCheck = eval('mouseIsOver_' + curMenu);
	if (overCheck != true) {
		document.getElementById(curMenu).style.visibility = 'hidden';
	}
}


function displaySubNav(menu) {
	clearOthers(menu);
	currentWidth = getWindowWidth();
	thisMenu = document.getElementById(menu);
//	alert(currentWidth);
	if (currentWidth >= 1120) {
		thisMenu.style.left = "70px";
	} else {
		thisMenu.style.left = "-200px";
	}
	thisMenu.style.visibility = 'visible';
}

function menuDisplays() {
	if (window.location.href.indexOf('about') >= 0) {
		document.getElementById('about_main').style.backgroundPosition = "right top";
		document.getElementById('about_main').style.color = "#ffffff";
		document.getElementById('about_group').style.display = "inline";
	}
	
	if (window.location.href.indexOf('quality') >= 0) {
		document.getElementById('quality_main').style.backgroundPosition = "right top";
		document.getElementById('quality_main').style.color = "#ffffff";
		document.getElementById('quality_group').style.display = "inline";
	}
	
	if (window.location.href.indexOf('clinicalteam') >= 0) {
		document.getElementById('clinicalteam_main').style.backgroundPosition = "right top";
		document.getElementById('clinicalteam_main').style.color = "#ffffff";
		document.getElementById('clinicalteam_group').style.display = "inline";
	}
	if (window.location.href.indexOf('patient') >= 0) {
		document.getElementById('patient_main').style.backgroundPosition = "right top";
		document.getElementById('patient_main').style.color = "#ffffff";
		document.getElementById('patient_group').style.display = "inline";
	}
	if (window.location.href.indexOf('heart') >= 0) {
		document.getElementById('heart_main').style.backgroundPosition = "right top";
		document.getElementById('heart_main').style.color = "#ffffff";
		document.getElementById('heart_group').style.display = "inline";
	}

	if (window.location.href.indexOf('refer') >= 0) {
		document.getElementById('refer_main').style.backgroundPosition = "right top";
		document.getElementById('refer_main').style.color = "#ffffff";
	}
	if (window.location.href.indexOf('employment') >= 0) {
		document.getElementById('employment_main').style.backgroundPosition = "right top";
		document.getElementById('employment_main').style.color = "#ffffff";
		document.getElementById('employment_group').style.display = "inline";
	}
	if (window.location.href.indexOf('give') >= 0) {
		document.getElementById('give_main').style.backgroundPosition = "right top";
		document.getElementById('give_main').style.color = "#ffffff";
	}
	if (window.location.href.indexOf('faq') >= 0) {
		document.getElementById('faq_main').style.backgroundPosition = "right top";
		document.getElementById('faq_main').style.color = "#ffffff";
	}
	if (window.location.href.indexOf('links') >= 0) {
		document.getElementById('links_main').style.backgroundPosition = "right top";
		document.getElementById('links_main').style.color = "#ffffff";
	}
	if (window.location.href.indexOf('calendar') >= 0) {
		document.getElementById('calendar_main').style.backgroundPosition = "right top";
		document.getElementById('calendar_main').style.color = "#ffffff";
		document.getElementById('calendar_group').style.display = "inline";
	}
	if (window.location.href.indexOf('contact') >= 0) {
		document.getElementById('contact_main').style.backgroundPosition = "right top";
		document.getElementById('contact_main').style.color = "#ffffff";
	}
}


window.onload = menuDisplays;

