function create_header(pPageName)

{

	document.write('<TABLE WIDTH=691 BORDER=0 CELLPADDING=0 CELLSPACING=0>')

	document.write("<TR>")

	document.write("<TD BGCOLOR='#000000'><IMG SRC='/Environment/BirdMigration/images/nav/bot_left.gif' WIDTH=116 HEIGHT=24></TD>")



	create_header_help(pPageName, "migration_facts", "Image1", "image1on", "image1off", "mig_on.gif", "mig_off.gif", "101" , "24")

	create_header_help(pPageName, "birds_of_chicago", "Image2", "image2on", "image2off", "bir_on.gif", "bir_off.gif", "106" , "24")


	create_header_help(pPageName, "bird_protection", "Image4", "image4on", "image4off", "pro_on.gif", "pro_off.gif", "98" , "24")

	create_header_help(pPageName, "education_resources", "Image5", "image5on", "image5off", "edu_on.gif", "edu_off.gif", "145" , "24")

	

	document.write("</TR></TABLE>")



	document.write("<TABLE WIDTH=691 BORDER=0 CELLPADDING=0 CELLSPACING=0>")

	document.write("<TR>")

	document.write("<TD BGCOLOR='#000000' VALIGN='top'><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=1 HEIGHT=1></TD>")

	document.write("<TD BGCOLOR='#006600' VALIGN='top'><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=3 HEIGHT=1></TD>")

	document.write("<TD BGCOLOR='#FFFFFF' VALIGN='top'>")



}



function create_header_help(pPageName, pPageCheck, pImage, pImageon, pImageoff, pGifon, pGifoff, pWidth, pHeight) {

		if (pPageName == pPageCheck) {	

			document.write("<TD BGCOLOR='#000000'><A HREF='/Environment/BirdMigration/sub/" + pPageCheck + ".html'><IMG SRC='/Environment/BirdMigration/images/nav/" + pGifon + "' WIDTH=" + pWidth + " HEIGHT=" + pHeight + " BORDER=0></A></TD>")

		} else {

			document.write("<TD BGCOLOR='#000000'><A HREF='/Environment/BirdMigration/sub/" + pPageCheck + ".html' onmouseover=\"changeImages('" + pImage + "', '" + pImageon + "')\" onmouseout=\"changeImages('" + pImage + "', '" + pImageoff + "')\"><IMG SRC='/Environment/BirdMigration/images/nav/" + pGifoff + "' WIDTH=" + pWidth + " HEIGHT=" + pHeight + " BORDER=0 NAME='" + pImage + "'></A></TD>")

		}

}



function create_menu(pPageName, pSubPageName)

{

	document.write("<TABLE WIDTH=140 BORDER=0 CELLPADDING=1 CELLSPACING=0>")

	document.write("<TR><TD VALIGN='top' COLSPAN=3><IMG SRC='/Environment/BirdMigration/images/nav_dots.gif' WIDTH=138 HEIGHT=11></TD></TR>")

	document.write("<TR><TD VALIGN='top'><IMG SRC='/Environment/BirdMigration/images/nav_bullet.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' WIDTH=114 COLSPAN=2><A HREF='/Environment/BirdMigration/sub/main.html' CLASS='leftlink'>Home</A></TD></TR>")

	if (pPageName == "migration_facts") {			

		create_menu_help(pSubPageName, "migration_facts", "Migration Facts")

		if (pSubPageName == "migration_research" || pSubPageName == "radar_studies") {

			create_menu_help(pSubPageName, "migration_research", "Migration Research")

			create_submenu_help(pSubPageName, "radar_studies", "Migration Radar Studies")

		} else {

			create_menu_help(pSubPageName, "migration_research", "Migration Research")		

		}

		create_menu_help(pSubPageName, "why_birds_migrate", "Why Birds Migrate")

		create_menu_help(pSubPageName, "when_birds_migrate", "When Birds Migrate")

		if (pSubPageName == "navigation_routes" || pSubPageName == "na_flyways" || pSubPageName == "miss_flyway") {

			create_menu_help(pSubPageName, "navigation_routes", "Navigation & Routes")

			create_submenu_help(pSubPageName, "na_flyways", "North America<BR>Flyways")

			create_submenu_help(pSubPageName, "miss_flyway", "Mississippi Flyway")

		} else {

			create_menu_help(pSubPageName, "navigation_routes", "Navigation & Routes")		

		}

		if (pSubPageName == "speed_distance_altitude" || pSubPageName == "speed" || pSubPageName == "distance" || pSubPageName == "altitude") {

			create_menu_help(pSubPageName, "speed_distance_altitude", "Speed, Distance &<BR>Altitude")

			create_submenu_help(pSubPageName, "speed", "Speed")

			create_submenu_help(pSubPageName, "distance", "Distance")

			create_submenu_help(pSubPageName, "altitude", "Altitude")

		} else {

			create_menu_help(pSubPageName, "speed_distance_altitude", "Speed, Distance &<BR>Altitude")		

		}

		create_menu_help(pSubPageName, "flocking", "Flocking")

		if (pSubPageName == "laws_treaties" || pSubPageName == "treaty_orgs") {

			create_menu_help(pSubPageName, "laws_treaties", "Laws & Treaties")

			create_submenu_help(pSubPageName, "treaty_orgs", "Treaty Organizations")

		} else {

			create_menu_help(pSubPageName, "laws_treaties", "Laws & Treaties")		

		}

	} else if (pPageName == "birds_of_chicago") {

		create_menu_help(pSubPageName, "birds_of_chicago", "Birds of Chicago")

		create_menu_help(pSubPageName, "bird_gallery", "Bird Gallery")

		if (pSubPageName == "live_nest_cams" || pSubPageName == "cam_npvnc" || pSubPageName == "cam_ch1" || pSubPageName == "cam_ch2") {

			create_menu_help(pSubPageName, "live_nest_cams", "Live Nest Cams")

			create_submenu_help(pSubPageName, "cam_npvnc", "North Park Village Nature Center")

			create_submenu_help(pSubPageName, "cam_ch2", "City Hall Rooftop Garden Cam")

		} else {

			create_menu_help(pSubPageName, "live_nest_cams", "Live Nest Cams")		

		}

		if (pSubPageName == "chicago_migrants" || pSubPageName == "capitalization_rules" || pSubPageName == "scientific_names" || pSubPageName == "chicago_bird_checklist") {

			create_menu_help(pSubPageName, "chicago_migrants", "Chicago Migrants")

			create_submenu_help(pSubPageName, "capitalization_rules", "Capitalization Rules")

			create_submenu_help(pSubPageName, "scientific_names", "Scientific Names")

			create_submenu_help(pSubPageName, "chicago_bird_checklist", "Chicago Bird Checklist")

		} else {

			create_menu_help(pSubPageName, "chicago_migrants", "Chicago Migrants")		

		}

		create_menu_help(pSubPageName, "chicago_bird_habitats", "Chicago Bird Habitats")

		if (pSubPageName == "chicago_birding_sites" || pSubPageName == "chicago_birding_map" || pSubPageName == "chicago_weather") {

			create_menu_help(pSubPageName, "chicago_birding_sites", "Chicago Birding Sites")

			create_submenu_help(pSubPageName, "chicago_birding_map", "Chicago Birding Location Map")

			create_submenu_help(pSubPageName, "chicago_weather", "Chicago Weather Report")

		} else {

			create_menu_help(pSubPageName, "chicago_birding_sites", "Chicago Birding Sites")		

		}

		create_menu_help(pSubPageName, "other_migration_sites", "Other Migration Sites Near Chicago")

	} 
	
	else if (pPageName == "lights_out_chicago") {

		create_menu_help(pSubPageName, "lights_out_chicago", "Lights Out Chicago!")

		
	
	
		create_menu_help(pSubPageName, "bird_protection", "What Else Can I Do To Protect Birds?")

	} else if (pPageName == "bird_protection") {

		create_menu_help(pSubPageName, "bird_protection", "Bird Protection")

		create_menu_help(pSubPageName, "landscaping", "Landscape With Birds In Mind")

		create_menu_help(pSubPageName, "avoid_pesticides", "Avoid Using Pesticides")

		create_menu_help(pSubPageName, "keep_cats_indoors", "Keep Cats Indoors")

		create_menu_help(pSubPageName, "modify_hazardous_windows", "Modify Hazardous Windows")

		create_menu_help(pSubPageName, "finding_injured_dead_bird", "Finding an Injured or Dead Bird")

		create_menu_help(pSubPageName, "lights_out_chicago", "Lights Out Chicago!")

	} else if (pPageName == "education_resources") {

		create_menu_help(pSubPageName, "education_resources", "Education & Resources")

		create_menu_help(pSubPageName, "lesson_plans", "Lesson Plans")

		create_menu_help(pSubPageName, "other_education_programs", "Other Educational Programs")

		create_menu_help(pSubPageName, "cpl_library_resources", "Chicago Public Library")

		create_menu_help(pSubPageName, "publications", "Publications")

		create_menu_help(pSubPageName, "useful_websites", "Useful Websites")

		create_menu_help(pSubPageName, "join_email_list", "Join a Birding E-mail List")

		create_menu_help(pSubPageName, "bird_hotlines", "Bird Hotlines")

		create_menu_help(pSubPageName, "acknowledgements", "Acknowledgements")

		create_menu_help(pSubPageName, "bibliography", "Bibliography")

	} else if (pPageName == "misc") {

		create_menu_help(pSubPageName, "mayors_letter", "Letter From The Mayor")

	}

	document.write("<TR><TD VALIGN='top' COLSPAN=3><IMG SRC='/Environment/BirdMigration/images/nav_dots.gif' WIDTH=138 HEIGHT=11></TD></TR>")

	document.write("<TR><TD><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=10 HEIGHT=1></TD><TD><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=10 HEIGHT=1></TD><TD><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=114 HEIGHT=1></TD></TR>")

	if (pSubPageName != "capitalization_rules") {

	document.write("&nbsp;<BR><TR><TD COLSPAN=3>&nbsp;&nbsp;<A HREF='/Environment/BirdMigration/espanol/sub/" + pSubPageName + ".html'><B>En Espaņol</B></A><BR><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=1 HEIGHT=4></TD></TR>")

	}

	document.write("</TABLE>")

}



function create_menu_help(pPageName, pPageCheck, pTitle) {

		if (pPageName == pPageCheck) {	

			document.write("<TR><TD VALIGN='top' WIDTH=10><IMG SRC='/Environment/BirdMigration/images/nav_bullet.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' CLASS='leftlinkactive' COLSPAN=2>" + pTitle + "</TD></TR>")

		} else {

			document.write("<TR><TD VALIGN='top' WIDTH=10><IMG SRC='/Environment/BirdMigration/images/nav_bullet.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' COLSPAN=2><A HREF='/Environment/BirdMigration/sub/" + pPageCheck + ".html' CLASS='leftlink'>" + pTitle + "</A></TD></TR>")

		}

}



function create_submenu_help(pPageName, pPageCheck, pTitle) {

		if (pPageName == pPageCheck) {	

			document.write("<TR><TD WIDTH=10><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' WIDTH=10><IMG SRC='/Environment/BirdMigration/images/nav_indent.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' CLASS='leftlinkactive'>" + pTitle + "</TD></TR>")

		} else {

			document.write("<TR><TD WIDTH=10><IMG SRC='/Environment/BirdMigration/images/b.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top' WIDTH=10><IMG SRC='/Environment/BirdMigration/images/nav_indent.gif' WIDTH=10 HEIGHT=8></TD><TD VALIGN='top'><A HREF='/Environment/BirdMigration/sub/" + pPageCheck + ".html' CLASS='leftlink'>" + pTitle + "</A></TD></TR>")

		}

}