function headerhome(callingSection){
    //alert("submitboxhome");
    header(callingSection, "");
}
		
function headerprimary(callingSection){
    header(callingSection, "../");
}

function headersecondary(callingSection){
    header(callingSection, "../../");
}

<!-- Adds a suffix onto the image name so that the program calls the on state of the image -->
function imgOn(iname) {
	if (document.images) {
		document[iname].src = eval(iname + "on.src");
	}
}

<!-- Adds a suffix onto the image name so that the program calls the off state of the image -->
function imgOff(iname) {
	if (document.images) {
		document[iname].src = eval(iname + "off.src");
	}
}


function header(callingSection, relativePath){
    if (document.images) {
        <!-- Purple nav bar on states -->
    
        navhomeon = new Image(); 		navhomeon.src=relativePath + "images/nav_home_on.gif";
        navnewson = new Image(); 		navnewson.src=relativePath + "images/nav_news_on.gif";
        navsummon = new Image(); 		navsummon.src=relativePath + "images/nav_summ_on.gif";
        navhometouron = new Image(); 		navhometouron.src=relativePath + "images/nav_home_tour_on.gif";
        navinsideon = new Image(); 		navinsideon.src=relativePath + "images/nav_inside_on.gif";
        navjoinon = new Image(); 		navjoinon.src=relativePath + "images/nav_join_on.gif";
        navplanningon = new Image(); 		navplanningon.src=relativePath + "images/nav_planning_on.gif";
        
        <!-- Purple nav bar off states -->
        navhomeoff = new Image(); 		navhomeoff.src=relativePath + "images/nav_home_off.gif";
        navnewsoff = new Image(); 		navnewsoff.src=relativePath + "images/nav_news_off.gif";
        navsummoff = new Image(); 		navsummoff.src=relativePath + "images/nav_summ_off.gif";
        navhometouroff = new Image(); 	navhometouroff.src=relativePath + "images/nav_home_tour_off.gif";
        navinsideoff = new Image(); 		navinsideoff.src=relativePath + "images/nav_inside_off.gif";
        navjoinoff = new Image(); 		navjoinoff.src=relativePath + "images/nav_join_off.gif";
        navplanningoff = new Image(); 	navplanningoff.src=relativePath + "images/nav_planning_off.gif";
        
        <!-- Subnav bar on states from news section-->
        minuteson = new Image(); 		minuteson.src=relativePath + "images/sub_nav_meeting_min_on.gif";
        voiceon = new Image(); 			voiceon.src=relativePath + "images/sub_nav_vhca_voice_on.gif";
        financialson = new Image(); 	financialson.src=relativePath + "images/sub_nav_financials_on.gif";
        goalson = new Image(); 		goalson.src=relativePath + "images/sub_nav_goals_on.gif";
        
        <!-- Subnav bar off states from news section-->
        minutesoff = new Image(); 		minutesoff.src=relativePath + "images/sub_nav_meeting_min_off.gif";
        voiceoff = new Image(); 		voiceoff.src=relativePath + "images/sub_nav_vhca_voice_off.gif";
        financialsoff = new Image(); 	financialsoff.src=relativePath + "images/sub_nav_financials_off.gif";
        goalsoff = new Image(); 		goalsoff.src=relativePath + "images/sub_nav_goals_off.gif";
        
        <!-- Subnav bar on states from summerfest section-->
        eventson = new Image(); 		eventson.src=relativePath + "images/sub_nav_events_on.gif";
        artiston = new Image(); 		artiston.src=relativePath + "images/sub_nav_artist_on.gif";
        directon = new Image(); 		directon.src=relativePath + "images/sub_nav_direct_on.gif";
        faqon = new Image(); 			faqon.src=relativePath + "images/sub_nav_faq_on.gif";
        volunon = new Image(); 			volunon.src=relativePath + "images/sub_nav_volun_on.gif";
        
        <!-- Subnav bar off states from summerfest section-->
        eventsoff = new Image(); 		eventsoff.src=relativePath + "images/sub_nav_events_off.gif";
        artistoff = new Image(); 		artistoff.src=relativePath + "images/sub_nav_artist_off.gif";
        directoff = new Image(); 		directoff.src=relativePath + "images/sub_nav_direct_off.gif";
        faqoff = new Image(); 			faqoff.src=relativePath + "images/sub_nav_faq_off.gif";
        volunoff = new Image(); 		volunoff.src=relativePath + "images/sub_nav_volun_off.gif";
        
        <!-- Subnav bar on states from hometour section-->
        thomeson = new Image(); 		thomeson.src=relativePath + "images/sub_nav_homes_on.gif";
        tfaqson = new Image(); 		tfaqson.src=relativePath + "images/sub_nav_tourfaqs_on.gif";
        tdirecton = new Image(); 		tdirecton.src=relativePath + "images/sub_nav_tourdirections_on.gif";
        tcommon = new Image(); 		tcommon.src=relativePath + "images/sub_nav_committee_on.gif";
        thistoryon = new Image(); 		thistoryon.src=relativePath + "images/sub_nav_history_on.gif";
        
        <!-- Subnav bar off states from hometour section-->
        thomesoff = new Image(); 		thomesoff.src=relativePath + "images/sub_nav_homes_off.gif";
        tfaqsoff = new Image(); 		tfaqsoff.src=relativePath + "images/sub_nav_tourfaqs_off.gif";
        tdirectoff = new Image(); 		tdirectoff.src=relativePath + "images/sub_nav_tourdirections_off.gif";
        tcommoff = new Image(); 		tcommoff.src=relativePath + "images/sub_nav_committee_off.gif";
        thistoryoff = new Image(); 		thistoryoff.src=relativePath + "images/sub_nav_history_off.gif";
        
        <!-- Subnav bar on states from inside section-->
        charteron = new Image(); 		charteron.src=relativePath + "images/sub_nav_charter_on.gif";
        historyon = new Image(); 		historyon.src=relativePath + "images/sub_nav_history_on.gif";
        boardon = new Image(); 			boardon.src=relativePath + "images/sub_nav_board_on.gif";
        committeeson = new Image(); 	committeeson.src=relativePath + "images/sub_nav_committees_on.gif";
        contacton = new Image(); 		contacton.src=relativePath + "images/sub_nav_contact_on.gif";
        linkson = new Image(); 			linkson.src=relativePath + "images/sub_nav_links_on.gif";
        
        <!-- Subnav bar off states from inside sections-->
        charteroff = new Image(); 		charteroff.src=relativePath + "images/sub_nav_charter_off.gif";
        historyoff = new Image(); 		historyoff.src=relativePath + "images/sub_nav_history_off.gif";
        boardoff = new Image(); 		boardoff.src=relativePath + "images/sub_nav_board_off.gif";
        committeesoff = new Image(); 	committeesoff.src=relativePath + "images/sub_nav_committees_off.gif";
        contactoff = new Image(); 		contactoff.src=relativePath + "images/sub_nav_contact_off.gif";
        linksoff = new Image(); 		linksoff.src=relativePath + "images/sub_nav_links_off.gif";
    
        <!-- Subnav bar on states from planning section-->
        <!--processon = new Image(); 		processon.src=relativePath + "images/sub_nav_process_on.gif";-->
        <!--inprogresson = new Image(); 	inprogresson.src=relativePath + "images/sub_nav_inprogress_on.gif";-->
        varianceson = new Image();          varianceson.src=relativePath + "images/sub_nav_variances_on.gif";
        ncon = new Image(); 			ncon.src=relativePath + "images/sub_nav_nc_on.gif";
        historicon = new Image(); 		historicon.src=relativePath + "images/sub_nav_historic_on.gif";
        <!--faqson = new Image(); 			faqson.src=relativePath + "images/sub_nav_faqs_on.gif";-->
        treeson = new Image();          treeson.src=relativePath + "images/sub_nav_trees_on.gif";
        docson = new Image();           docson.src=relativePath + "images/sub_nav_docs_on.gif";
        
        <!-- Subnav bar off states from planning section-->
        <!--processoff = new Image(); 		processoff.src=relativePath + "images/sub_nav_process_off.gif";-->
        <!--inprogressoff = new Image(); 	inprogressoff.src=relativePath + "images/sub_nav_inprogress_off.gif";-->
        variancesoff = new Image();     variancesoff.src=relativePath + "images/sub_nav_variances_off.gif";
        ncoff = new Image();            ncoff.src=relativePath + "images/sub_nav_nc_off.gif";
        historicoff = new Image();      historicoff.src=relativePath + "images/sub_nav_historic_off.gif";
        <!--faqsoff = new Image(); 		faqsoff.src=relativePath + "images/sub_nav_faqs_off.gif";-->
        treesoff = new Image();         treesoff.src=relativePath + "images/sub_nav_trees_off.gif";
        docsoff = new Image();          docsoff.src=relativePath + "images/sub_nav_docs_off.gif";
    }

    var headercode="";
    
    headercode += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"754\" bgcolor=\"#ffffff\">\n";
		headercode += "<tr>\n";
			<!-- Shadow on the left of the page-->
			headercode += "<td rowspan=\"6\" background=\"" + relativePath + "images/shadow_left.jpg\" width=\"27\"><img src=\"" + relativePath + "images/space.gif\" width=\"1\" height=\"1\"></td>\n";
			<!-- colspan is three to compensate for the 1 pixle wide line that runs down the page and the 29 pixel wide white space in front of it -->
			headercode += "<td colspan=\"3\">\n";
				<!-- Start of the header -->
				headercode += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"715\" bgcolor=\"#0e5715\">\n";
					headercode += "<tr>\n";
						headercode += "<td><a href=\"" + relativePath + "\"><img src=\"" + relativePath + "images/vhca_top.jpg\" width=\"436\" height=\"128\" alt=\"Virginia-Highland Civic Association\" border=\"0\"></a></td>\n";
						
					if (callingSection == "home"){
						headercode += "<td><a href=\"/\"><img src=\"" + relativePath + "images/pic_home.jpg\" width=\"279\" border=\"0\" height=\"128\" alt=\"Intersection of Virginia and Highland\"></a></td>\n";
					}
					else if(callingSection == "inside"){	
						headercode += "<td><img src=\"" + relativePath + "images/pic_inside.jpg\" width=\"279\" height=\"128\" alt=\"Fall in Virginia-Highland\"></td>\n";
					}
					else if(callingSection == "summerfest"){
						headercode += "<td width=\"279\"><img src=\"" + relativePath + "images/pic_summerfest.jpg\" width=\"278\" height=\"128\" alt=\"Summerfest in Virginia-Highland\"></td>\n";
					}
					else if(callingSection == "hometour"){
						headercode += "<td width=\"279\"><img src=\"" + relativePath + "images/pic_planning.jpg\" width=\"278\" height=\"128\" alt=\"House in Virginia-Highland\"></td>\n";
					}
					else if(callingSection == "join"){
						headercode += "<td><img src=\"" + relativePath + "images/pic_join.jpg\" width=\"279\" height=\"128\" alt=\"Bench in Virginia-Highland\"></td>\n";
					}
					else if(callingSection == "planning"){
						headercode += "<td width=\"279\"><img src=\"" + relativePath + "images/pic_planning.jpg\" width=\"278\" height=\"128\" alt=\"House in Virginia-Highland\"></td>\n";
					}
					else{
						headercode += "<td width=\"279\"><img src=\"" + relativePath + "images/pic_other.jpg\" width=\"279\" height=\"128\" alt=\"Dinner in Virginia-Highland\"></td>\n";
					}
					
					
					headercode += "</tr>\n";
				headercode += "</table>\n";
				<!-- End of the header -->
			headercode += "</td>\n";
			<!-- Shadow on the right of the page -->
			headercode += "<td rowspan=\"6\" background=\"" + relativePath + "images/shadow_right.jpg\" width=\"12\"><img src=\"" + relativePath + "images/space.gif\" width=\"1\" height=\"1\"></td>\n";
		headercode += "</tr>\n";
		headercode += "<tr>\n";
			<!-- colspan is three to compensate for the 1 pixel wide line that runs down the page and the 29 pixel wide white space in front of it -->
			headercode += "<td colspan=\"3\">\n";
				<!-- Start of purple nav bar -->
				headercode += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
					headercode += "<tr>\n";
						headercode += "<td><img src=\"" + relativePath + "images/nav_left.gif\" width=\"30\" height=\"26\"></td>\n";


					if (callingSection == "home"){
						headercode += "<td><a href=\"" + relativePath + "\"><img src=\"" + relativePath + "images/nav_home_on.gif\" width=\"39\" height=\"26\" alt=\"News and Events\" border=\"0\"></a></td>\n";
					}
					else{
						headercode += "<td><a href=\"/\" onmouseover=\"imgOn('navhome')\" onmouseout=\"imgOff('navhome')\"><img src=\"" + relativePath + "images/nav_home_off.gif\" width=\"39\" height=\"26\" alt=\"Home\" name=\"navhome\" border=\"0\"></a></td>\n";
					}

						
					if (callingSection == "news"){
						headercode += "<td><a href=\"" + relativePath + "news.html\"><img src=\"" + relativePath + "images/nav_news_on.gif\" width=\"88\" height=\"26\" alt=\"News and Events\" border=\"0\"></a></td>\n";
					}
					else{
						headercode += "<td><a href=\"" + relativePath + "news.html\" onmouseover=\"imgOn('navnews')\" onmouseout=\"imgOff('navnews')\"><img src=\"" + relativePath + "images/nav_news_off.gif\" width=\"88\" height=\"26\" alt=\"News and Events\" name=\"navnews\" border=\"0\"></a></td>\n";
					}
						
					if (callingSection == "summerfest"){	
						headercode += "<td><a href=\"" + relativePath + "summerfest.html\"><img src=\"" + relativePath + "images/nav_summ_on.gif\" width=\"81\" height=\"26\" alt=\"Summerfest\" name=\"navsumm\" border=\"0\"></a></td>\n";
					}
					else{
						headercode += "<td><a href=\"" + relativePath + "summerfest.html\" onmouseover=\"imgOn('navsumm')\" onmouseout=\"imgOff('navsumm')\"><img src=\"" + relativePath + "images/nav_summ_off.gif\" width=\"81\" height=\"26\" alt=\"Summerfest\" name=\"navsumm\" border=\"0\"></a></td>\n";
					}
					
					if (callingSection == "hometour"){	
						headercode += "<td><a href=\"" + relativePath + "hometour.html\"><img src=\"" + relativePath + "images/nav_home_tour_on.gif\" width=\"75\" height=\"26\" alt=\"Home Tour\" name=\"navhometour\" border=\"0\"></a></td>\n";
					}
					
					else{
						headercode += "<td><a href=\"" + relativePath + "hometour.html\" onmouseover=\"imgOn('navhometour')\" onmouseout=\"imgOff('navhometour')\"><img src=\"" + relativePath + "images/nav_home_tour_off.gif\" width=\"75\" height=\"26\" alt=\"Home Tour\" name=\"navhometour\" border=\"0\"></a></td>\n";
					}
															
					if (callingSection == "inside"){
						headercode += "<td><a href=\"" + relativePath + "inside.html\"><img src=\"" + relativePath + "images/nav_inside_on.gif\" width=\"77\" height=\"26\" alt=\"Inside VHCA\" name=\"navinside\" border=\"0\"></a></td>\n";
					}
					else{	
						headercode += "<td><a href=\"" + relativePath + "inside.html\" onmouseover=\"imgOn('navinside')\" onmouseout=\"imgOff('navinside')\"><img src=\"" + relativePath + "images/nav_inside_off.gif\" width=\"77\" height=\"26\" alt=\"Inside VHCA\" name=\"navinside\" border=\"0\"></a></td>\n";
					}
					
					if (callingSection == "planning"){
						headercode += "<td><a href=\"" + relativePath + "planning.html\"><img src=\"" + relativePath + "images/nav_planning_on.gif\" width=\"62\" height=\"26\" alt=\"Planning\" name=\"navplanning\" border=\"0\"></a></td>\n";
					}
					else{
						headercode += "<td><a href=\"" + relativePath + "planning.html\" onmouseover=\"imgOn('navplanning')\" onmouseout=\"imgOff('navplanning')\"><img src=\"" + relativePath + "images/nav_planning_off.gif\" width=\"62\" height=\"26\" alt=\"Planning\" name=\"navplanning\" border=\"0\"></a></td>\n";
					}

/*ibc					if (callingSection == "join"){
						headercode += "<td><a href=\"" + relativePath + "lists/?p=subscribe\"><img src=\"" + relativePath + "images/nav_join_on.gif\" width=\"36\" height=\"26\" alt=\"Join\" name=\"navjoin\" border=\"0\"></a></td>\n";
					}

					else{
						headercode += "<td><a href=\"" + relativePath + "lists/?p=subscribe\" onmouseover=\"imgOn('navjoin')\" onmouseout=\"imgOff('navjoin')\"><img src=\"" + relativePath + "images/nav_join_off.gif\" width=\"36\" height=\"26\" alt=\"Join\" name=\"navjoin\" border=\"0\"></a></td>\n";
					}
*/

//ibc added to fill space where Join was located
						headercode += "<td><img src=\"" + relativePath + "images/nav_right.gif\" width=\"36\" height=\"26\"  name=\"navjoin\" border=\"0\"></a></td>\n";
					
/*ibc					if (callingSection == "home"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_home.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else if (callingSection == "inside"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_inside.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else if (callingSection == "summerfest"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_summer.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else if (callingSection == "hometour"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_planning.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else if (callingSection == "join"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_join.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else if (callingSection == "planning"){
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_planning.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
					else {
						headercode += "<td><img src=\"" + relativePath + "images/nav_submit_other.gif\" width=\"227\" height=\"26\" alt=\"Submit Email for VHCA Updates\"></td>\n";
					}
*/

                                                headercode += "<td><a href=\"http://www.formstack.com/forms/?1147475-DmJaqFECJ7\" target=\"_blank\"><img src=\"" + relativePath + "images/nav_voice.gif\" width=\"227\" height=\"26\" alt=\"Join VHCA Voice e-Newsletter\" border=\"0\"></a></td>\n";					
					headercode += "</tr>\n";
				headercode += "</table>\n";
				<!-- End of purple nav bar -->
			headercode += "</td>\n";
		headercode += "</tr>\n";
		

		document.write(headercode);

}
