for (i = 0; i < nav_array.length; i++) {
		
		document.write('<td class="navigation" onclick="parent.location.href=\'' + nav_array[i][0][1] + '\';" onmouseover="showNavigation(this, \'navDIV' + '\', ' + i + ');"><div name="topDIV' + i + '" id="topDIV' + i + '">' + nav_header_topString + nav_array[i][0][0] + nav_header_bottomString + '</div><div style="display: none;" name="OVERtopDIV' + i + '" id="OVERtopDIV' + i + '">' + nav_header_over_topString + nav_array[i][0][0] + nav_header_over_bottomString + '</div></td>');
										
		divHTMLString = divHTMLString + '<div id="navDIV' + i + '" name="navDIV' + i + '" style="display: none; position: absolute;"><table cellpadding="0" cellspacing="0">'
		
		for (j = 1; j < nav_array[i].length; j++) {
		
				divHTMLString = divHTMLString + '<tr><td style="padding-top:2px;" onmouseover="swapSubDIV(\'subDIV' + i + j + '\');" onclick="parent.location.href=\'' + nav_array[i][j][1] + '\';"><div name="subDIV' + i + j + '" id="subDIV' + i + j + '">' + nav_submenu_topString + nav_array[i][j][0] + nav_submenu_bottomString +'</div><div style="display: none;" name="OVERsubDIV' + i + j + '" id="OVERsubDIV' + i + j + '">' + nav_submenu_over_topString + nav_array[i][j][0] + nav_submenu_over_bottomString +'</div></td></tr>'
		
		}
									
		divHTMLString = divHTMLString + '</table></div>'
										
		}

document.write('<td class="navigation" width="100%">&nbsp;' + divHTMLString + '</td>');

function button_generator(button_title, button_text, button_url, link_type) {
		
		var link_string;
		
		//1 = Link To Page (Replace Current Page)
		//2 = Link To Page (New Window)
		//3 = JavaScript
		
		if (link_type == 1) {
		
      link_string = 'parent.location.href=\'' + button_url + '\';';
		
		}
		else if (link_type == 2) {
		
      link_string = 'window.open(\'' + button_url + '\')';
		}
		else if (link_type == 3) {
		
      link_string = button_url;
		}
		
		var button_first_string = '<table cellpadding="0" cellspacing="0" title="' + button_text + '" border="0" onmouseover="this.style.cursor=\'hand\'; window.status=\'' + button_text + '\'; return true;" onmouseout="this.style.cursor=\'auto\'; window.status=\'\'; return true;" onclick="' + link_string + '">';
		var button_second_string = '<tr><td width="12" height="33"><img src="Images/Nav1_Left.gif"/></td><td valign="middle" align="center" class="navigation_header">';
		
		buttonHTMLString = button_first_string + button_second_string + '<nobr>' + button_title + '</nobr>' + nav_header_over_bottomString;
		
		document.write(buttonHTMLString);

}

function footer_generator() {

		var fotter_string;
		fotter_string = '<img src="Images/hr.gif" height="4px" width="100%"></img>';
		fotter_string = fotter_string + '<table width="100%"><tr>';
    fotter_string = fotter_string + '<td align="left"><p class="footnote">&copy; Wimbledon Park Residents\' Association</p></td>';
		fotter_string = fotter_string + '<td align="right"><p class="footnote">Free charity web hosting by <a href="http://www.contributions.org.uk" style="font-size: 8pt;" target="_blank">contributions.org.uk</a></p></td>';
		fotter_string = fotter_string + '</tr></table><br/>';
		
		document.write(fotter_string);
}
