function menuEntry(levelOne, levelTwo, forwardURL, menuText, isLocalLink)
	{
	
		thisDirectory = rootDirectory;
		imageDirectory = rootDirectory;
		
		if (isLocalLink == 'no') {
			thisDirectory = "";
		}
		
		bulletState = "0";

		menuClass = "leftnav";


		menuEntryHTML = "<table width=\"150\" cellspacing=0 cellpadding=0 border=0 SUMMARY=\"This table used for layout purposes only\">\n";
		menuEntryHTML += "<tr>\n\t<td width=20 valign=top>\n";
		
	
		
		if (levelA == levelOne ) {
			
			if (levelB == "0" ) {
				menuEntryHTML += "<img alt=\" \" name=b" + levelOne;
				menuEntryHTML += " src=\"" + imageDirectory + "images/tri_rt.gif\">\n";
			} else {
				menuEntryHTML += "<a href=\"" + thisDirectory + forwardURL + "\" title=\" \">";
				menuEntryHTML += "<img alt=\" \" border=0 name=b" + levelOne;
				menuEntryHTML += " src=\"" + imageDirectory + "images/tri_down.gif\"></a>\n";
				bulletState = "1";
			}
			
		} else {
		
			menuEntryHTML += "<a href=\"" + thisDirectory + forwardURL + "\" title=\" \">";
			menuEntryHTML += "<img alt=\" \" border=0 name=b" + levelOne;
			menuEntryHTML += " src=\"" + imageDirectory + "images/tri_up.gif\"></a>\n";
		
		}

		menuEntryHTML += "</td><td valign=top align=left width=130 class=" + menuClass + ">";
			
		if (levelA != levelOne || levelB > levelTwo) {

			menuEntryHTML += "<A HREF=\"" + thisDirectory + forwardURL + "\" ";
			menuEntryHTML += "ONMOUSEOVER=\"changeImages('b" + levelOne + "\', \'" + imageDirectory;

			if (bulletState == "1") {
				menuEntryHTML += "images/tri_down.gif\'\)\; return true\;\" ";
				} else {
				menuEntryHTML += "images/tri_down.gif\'\)\; return true\;\" ";
				}

			menuEntryHTML += "ONMOUSEOUT=\"changeImages(\'b" + levelOne + "\', \'" + imageDirectory;

			if (bulletState =="1") {
				menuEntryHTML += "images/tri_up.gif\'\)\; ";
				} else {
				menuEntryHTML += "images/tri_up.gif\'\)\; ";
				}
			menuEntryHTML += "return true\;\" class=" + menuClass + ">";
			
		}

		menuEntryHTML += menuText;

		if (levelA != levelOne || levelB > levelTwo) menuEntryHTML += "</A>";
		menuEntryHTML += "</td></tr>\n";
		menuEntryHTML += "</table>\n";
		
		//document.write(menuEntryHTML);
		//alert(menuEntryHTML);		
		fulltextHTML += menuEntryHTML;	
		
	}

//----------------------------------------------


function subMenuEntry(levelTwo, forwardURL, menuText, isLocalLink)
	{
	
		thisDirectory = rootDirectory;
		imageDirectory = rootDirectory;
		
		if (isLocalLink == 'no') {
			thisDirectory = "";
		}
		

		thisClass = 'leftsubnav';

		
		if(is.ns4){
				
			thisClass = 'leftsubnavns4';
				
		}
			
		subMenuHTML = '<tr><td width=30 align=right valign=top class=' + thisClass + '>\&nbsp;\&nbsp;\&nbsp;\&\#0150;\&nbsp;</td><td width=120 class=' + thisClass + '>';
		
		if (levelB != levelTwo || levelC != 0) {
		
			subMenuHTML += '<A HREF="' + thisDirectory + forwardURL;

			subMenuHTML += '" class=' + thisClass + '>';

		}
	
		subMenuHTML += menuText;
		
		if (levelB != levelTwo) subMenuHTML += '\n</A>';
				
		subMenuHTML += '</td></tr>\n';
		
		fulltextHTML += subMenuHTML;
		
	}


//----------------------------------------------


function makeTopMenu() {

        if (levelA != "0") {
        	rootDirectory = "../";
        } else {
        	rootDirectory = "./";
        }


	topMenuTextHTML = "";

	topMenuTextHTML += '<TABLE WIDTH=490 BORDER=0 CELLPADDING=0 CELLSPACING=0 SUMMARY="This table used for layout purposes only">\n'
	topMenuTextHTML += '<TR>'
	topMenuTextHTML += '<TD WIDTH=10><IMG SRC="' + rootDirectory + 'images/spacer.gif" ALT=" " WIDTH=10 HEIGHT=40 BORDER=0></TD>'
	topMenuTextHTML += '<TD WIDTH=480 CLASS=stopnav>'
	topMenuTextHTML += '<A CLASS=stopnav HREF="' + rootDirectory + 'index.htm">Main</A>\n'
	topMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	topMenuTextHTML += '\t<A HREF="http://www.nhlbi.nih.gov/" CLASS=stopnav>NHLBI Site</A>\n'
	topMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	topMenuTextHTML += '\t<A HREF="http://hin.nhlbi.nih.gov/joinhin/" CLASS=stopnav>Join the HIN</A>\n'
	topMenuTextHTML += '</TD>\n'
	topMenuTextHTML += '</TR>\n'
	topMenuTextHTML += '</TABLE>\n'

	//alert(topMenuTextHTML);

	document.write(topMenuTextHTML);
}

//----------------------------------------------


function makeFooterMenu() {

        if (levelA != "0") {
        	rootDirectory = "../";
        } else {
        	rootDirectory = "./";
        }

	if(is.ns4){
	
		style_def = '';
		
	} else {
	
		style_def = '';
	}
		
	bottomMenuTextHTML = "";

	bottomMenuTextHTML += '<TABLE WIDTH="640" BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=\"This table used for layout purposes only\">\n'
	bottomMenuTextHTML += '<TR>'
	bottomMenuTextHTML += '<TD WIDTH="640" ALIGN="CENTER">'
	if(is.ns4) bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'index.htm" CLASS="nhlbifooter"' + style_def + '></A>\n'
	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'index.htm" CLASS="nhlbifooter"' + style_def + '>Main</A>\n'
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'whei/index.htm" CLASS="nhlbifooter"' + style_def + '>About the Initiative</A>\n'
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'cmpgn/index.htm" CLASS="nhlbifooter"' + style_def + '>Campaign Updates</A><BR>\n'

	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'wrkshp/index.htm" CLASS="nhlbifooter"' + style_def + '>Highlights &#151; Strategy Development Workshop</A>\n'	
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'wrkshp/bkgrnd.htm" CLASS="nhlbifooter"' + style_def + '>Data and Background Information</A><BR>\n'	


	bottomMenuTextHTML += '\t<A HREF="' + rootDirectory + 'credits/index.htm" CLASS="nhlbifooter"' + style_def + '>Continuing Education Opportunities</A>\n'	
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="http://www.nhlbi.nih.gov/health/pubs/pub_gen.htm#women" CLASS="nhlbifooter"' + style_def + '>Resources for Patients and the Public</A>\n'
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="http://emall.nhlbihin.net/hp2010/whdefault.asp" CLASS="nhlbifooter"' + style_def + '>Join the HIN</A><BR>\n'
	
	bottomMenuTextHTML += '\t<A HREF="http://www.nhlbi.nih.gov/about/privacy.htm" CLASS="nhlbifooter"' + style_def + '>NHLBI Privacy Statement</A>\n'
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="http://www.nhlbi.nih.gov/" CLASS="nhlbifooter"' + style_def + '>NHLBI Home</A>\n'
	bottomMenuTextHTML += '\t&nbsp;|&nbsp;\n'
	bottomMenuTextHTML += '\t<A HREF="http://www.nhlbi.nih.gov/contact/index.htm" CLASS="nhlbifooter"' + style_def + '>Contact NHLBI</A><BR>\n'	
	
	bottomMenuTextHTML += '</TD>\n'
	bottomMenuTextHTML += '</TR>\n'
	bottomMenuTextHTML += '</TABLE>\n'


	document.write(bottomMenuTextHTML);
}

//----------------------------------------------

function makeNavMenu(){

        if (levelA != "0") {
        	rootDirectory = "../";
        } else {
        	rootDirectory = "./";
        }

	fulltextHTML = "";


	// Womens Initiative Section
	
	menuEntry(1, 0, 'whei/index.htm', 'About the Initiative');


	//Campaign Section
	
	menuEntry(2, 0, 'cmpgn/index.htm', 'Campaign Updates');
	
	
	// Workshop Section
	
	menuEntry(3, 0, 'wrkshp/index.htm', 'Highlights &#151; Strategy Development Workshop');
	if (levelA == "3") {
		fulltextHTML += "<table width=\"150\" border=0 cellpadding=0 cellspacing=0 SUMMARY=\"This table used for layout purposes only\">\n";
		subMenuEntry(1, 'wrkshp/ovrvw.htm', 'Overview');
		subMenuEntry(2, 'http://www.nhlbi.nih.gov/health/prof/heart/other/whhw.htm', 'Workshop Summary Report', 'no');
		subMenuEntry(3, 'wrkshp/webcast.htm', 'Workshop Webcast');
		subMenuEntry(4, 'wrkshp/ontime.htm', 'WJZ-TV 13s <I>On Time</I>');
		fulltextHTML += "</table>\n";
	}	
	

        // Background Section
        
        menuEntry(4, 0, 'wrkshp/bkgrnd.htm', 'Data and Background Information');
        // Credit Section

        
        menuEntry(5, 0, 'credits/index.htm', 'Continuing Education Opportunities');
        


   
 // Resources for Patients
        
        menuEntry(6, 0, 'http://www.nhlbi.nih.gov/health/pubs/pub_gen.htm#women', 'Resources for Public / Patients', 'no');
        



	document.write(fulltextHTML);
	
	return;
}

