var menu1=new Array()
menu1[0]='<a href="aboutamigenic.html">About AMIGENICS</a>'
menu1[1]='<a href="staff.html">Our Staff</a>'
//menu1[2]='<a href="ourclinic.html">Our Clinic</a>'
//menu1[2]='<a href="privacyandinsurancecoverageinformation.html">Privacy Policy and Insurance Coverage</a>'

var menu2=new Array()
menu2[0]='<a href="clinicalservices.html">Clinical Services</a>'
menu2[1]='<a href="myhealthprogram.html">My Health Program</a>'
menu2[2]='<a href="education.html">Education</a>'
menu2[3]='<a href="reserch.html">Research</a>'

var menu3=new Array()
menu3[0]='<a href="familyhealthhistory.html">Family Health History</a>'
menu3[1]='<a href="resources_family_medicalfamilytreeresourcesandlinks.html">Tips for talking with your family</a>'
menu3[2]='<a href="resources_family_medicalfamilytreeresourcesandlinks.html">Medical Family Tree </a>'
menu3[3]='<a href="genetics-and-family-history.html">Genetics</a>'
menu3[4]='<a href="resources_genetics_narrativeoflinks.html">Narrative of links</a>'

var menu4=new Array()
menu4[0]='<a href="physician_information.html">Physicians Information</a>'
//menu4[1]='<a href="education-and-training.html">Education and Training</a>'
menu4[1]='<a href="adult-genetics-and-genomics-resources.html">Adult Genetics and Genomics Resources</a>'
//menu4[1]='<a href="importanceoffamilyhistory.html">Importance of Family History</a>'
//menu4[2]='<a href="genetics-and-family-history.html">Genetics</a>'

var menu5=new Array()
menu5[0]='<a href="future-patients.html">Future Patients</a>'
menu5[1]='<a href="existing-patients.html">Existing Patients</a>'
menu5[2]='<a href="mybreasthealthwelcome.html">My Breast Health Program</a>'
menu5[3]='<a href="importance-of-family-health-history.html">Importance of Family Health History</a>'
menu5[4]='<a href="privacyandinsurancecoverageinformation.html">Privacy Policy and Insurance Coverage</a>'
menu5[5]='<a href="resources-and-links.html">Resources and Links</a>'
//menu5[0]='<a href="appointments.html">Appointments</a>'
//menu5[1]='<a href="billing.html">Billing</a>'
		
var lmenu1=new Array()
lmenu1[0]='<a href="mybreasthealthwelcome.html">My Breast Health</a>'
lmenu1[1]='<a href="070723_MyBreastHealth_ChiefComplaintFAQs.html">ChiefComplaintFAQs</a>'
lmenu1[2]='<a href="breasthealthquestionnaire.html">My Breast Health Questionnaire</a>'
lmenu1[3]='<a href="mybreasthealtheduresourcesandlinks.html">Support Group Resources and Links </a>'

var lmenu2=new Array()
lmenu2[0]='<a href="Heart_myhearthealth.html">Chief Complaint (Program Front Page)</a>'


var lmenu3=new Array()
lmenu3[0]='<a href="Body_mybodyhealth.html">Chief Complaint (Program Front Page)</a>'



var menuwidth			= '165px'; //default menu width
var menubgcolor			= '#1F5532';  //menu bgcolor
var disappeardelay		= 250;  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick	= "yes"; //hide menu when user clicks within menu?
var horizontaloffset	= 2;
/////No further editting needed

var ie4					=document.all;
var ns6					=document.getElementById&&!document.all;

var objImage			= null;

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, orientation) {
	var edgeoffset=0
	var multValue	= (orientation == "HORIZONTAL") ? 1 : -1;
	if (whichedge=="rightedge"){
		var windowedge	=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure	= dropmenuobj.offsetWidth
		var widthOffset	= (orientation == "HORIZONTAL") ? 0 : obj.offsetWidth;
		if (windowedge-dropmenuobj.x - widthOffset < dropmenuobj.contentmeasure) {
			edgeoffset	= dropmenuobj.contentmeasure - obj.offsetWidth * multValue;
		}
	} 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
		var heightOffset	= (orientation == "VERTICAL") ? 0 : obj.offsetHeight - topedge;
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) { //move up?
			edgeoffset	= dropmenuobj.contentmeasure + obj.offsetHeight * multValue
			if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
				edgeoffset	= dropmenuobj.y + heightOffset;
		}
	}
	return edgeoffset
}

function populatemenu(what) {
	if (ie4 || ns6)
		dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth, imageId, orientation) {
	objImage	= document.getElementById ? document.getElementById(imageId) : imageId;
	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");
		var leftOffset	= (orientation == "HORIZONTAL") ? 0 : obj.offsetWidth + horizontaloffset;
		var topOffset	= (orientation == "VERTICAL") ? 0 : obj.offsetHeight;
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge", orientation)+ leftOffset + "px";
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge", orientation)+ topOffset + "px";
	}	
	changeImage(objImage, 1);
	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) {
		changeImage(objImage, 0);
		delayhide	= setTimeout("hidemenu()", disappeardelay);		
	}
}

function clearhidemenu() {
	if (typeof delayhide != "undefined") {
		clearTimeout(delayhide)
		changeImage(objImage, 1);
	}
}

if (hidemenu_onclick == "yes")
	document.onclick = hidemenu;

function changeImage(objImage, status)
{
	if(objImage != null) {
		if(status == 1) {
			if(objImage.src.indexOf("md.jpg") < 0) {
				objImage.src	= objImage.src.replace(".jpg", "md.jpg");
			}
		} else {
			objImage.src	= objImage.src.replace("md.jpg", ".jpg");
			objImage	= null;
		}
	}
}

function showTopMenu() {
	var strMenu	= "<table width=\"980\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"25\">" +
				"<tr><td align=\"center\"><a href=\"#\"><img src=\"images/left.jpg\" border=\"0\" onMouseOver=\"changeImage(this, 1);\" onMouseOut=\"changeImage(this, 0);\"/></a></td><td align=\"center\"><a href=\"index.html\"><img src=\"images/home.jpg\" border=\"0\" onMouseOver=\"changeImage(this, 1);\" onMouseOut=\"changeImage(this, 0);\"/></a></td><td align=\"center\">" +
				"<a href=\"#\" onClick=\"return clickreturnvalue()\" onMouseover=\"dropdownmenu(this, event, menu5, '250px', 'img5', 'HORIZONTAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/forpatients.jpg\" border=\"0\" id=\"img5\"></a></td><td align=\"center\">" +
				"<a href=\"#\" onClick=\"return clickreturnvalue()\" onMouseover=\"dropdownmenu(this, event, menu4, '260px', 'img4', 'HORIZONTAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/forphysicians.jpg\" border=\"0\" id=\"img4\"></a></td><td align=\"center\">" +
				"<a href=\"location.html\"><img src=\"images/location.jpg\" border=\"0\" onMouseOver=\"changeImage(this, 1);\"	 onMouseOut=\"changeImage(this, 0);\"/></a></td><td align=\"center\">" +
				"<a href=\"contactus.html\"><img src=\"images/contactus.jpg\" border=\"0\" onMouseOver=\"changeImage(this, 1);\"	 onMouseOut=\"changeImage(this, 0);\"/></a></td><td align=\"center\">" +
				"<a href=\"#\" onClick=\"return clickreturnvalue()\" onMouseover=\"dropdownmenu(this, event, menu1, '120px', 'img6', 'HORIZONTAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/aboutus.jpg\" border=\"0\" id=\"img6\"></a></td><td align=\"center\">" +
				"<a href=\"#\"><img src=\"images/right.jpg\" border=\"0\" onMouseOver=\"changeImage(this, 1);\" onMouseOut=\"changeImage(this, 0);\"/></a></td> " +
				"</tr></table>";
	document.write(strMenu);
	
}

function showLeftMenu() {
	var strMenu	= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"center\">" +
					"<img src=\"images/myhealthprograms1.gif\" name=\"Image8\" width=\"176\" height=\"26\" border=\"0\" id=\"Image7\" /></a></td></tr><tr><td height=\"10\"></td></tr>" +
					"<tr><td align=\"center\"><a href=\"#\" onMouseover=\"dropdownmenu(this, event, lmenu1, '250px', 'limg1', 'VERTICAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/mybreasthealth.jpg\" name=\"limg1\" id=\"limg1\" width=\"148\" height=\"28\" border=\"0\" /></a></td></tr>" +
					"<tr><td height=\"10\"></td></tr>" +
					"<tr><td align=\"center\"><a href=\"#\" onMouseover=\"dropdownmenu(this, event, lmenu2, '250px', 'limg2', 'VERTICAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/myhearthealth.jpg\" name=\"limg2\" width=\"148\" height=\"28\" border=\"0\" id=\"limg2\" /></a></td></tr>" +
					"<tr><td height=\"10\"></td></tr>" +
					"<tr><td align=\"center\"><b><a href=\"#\" onMouseover=\"dropdownmenu(this, event, lmenu3, '250px', 'limg3', 'VERTICAL')\" onMouseout=\"delayhidemenu()\"><img src=\"images/mybodyhealth.jpg\" name=\"limg3\" width=\"148\" height=\"28\" border=\"0\" id=\"limg3\" /></a><a href=\"mybodyhealth.html\"></a></b></td></tr>" +
					"<tr><td>&nbsp;</td></tr></table>";
	document.write(strMenu);
}
