function showPageHead() {
	var hBlock 	= '' +
		'<link type="text/css" rel="stylesheet"	href="css/main.css">' +
		'<link href="js/jsnavbar/ddlevelsmenu-bar.css" type="text/css" rel="stylesheet">' +
		'<script type="text/javascript" src="js/jsnavbar/ddlevelsmenu.js">' +
		'	/***********************************************' +
		'	* All Levels Navigational Menu- (c) Dynamic Drive DHTML code library (http://www.dynamicdrive.com)' +
		'	* This notice MUST stay intact for legal use' +
		'	* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code' +
		'	***********************************************/' +
		'</script>' +
		'';
	document.write(hBlock);
}
function showPageTop(pageName) {
	if (pageName.length < 1) {
		pageName = document.getElementsByName('description')[0].getAttribute('content');
	}
	var hBlock 	= '' +
		'<div class="PageTop">' +
		'	<span class="PageTopLeftLogo"><img src="img/AmLegLogoSmall.gif" width="100" height="100"></span>' +
		'	<span class="PageTopRightLogo"><img src="img/AmLegLogoSmall.gif" width="100" height="100"></span>' +
		'	<span class="PageTopTitle" style="font-size:24pt; padding:16px 0px 0px 0px;">American Legion Post 383</span>' +
		'	<span class="PageTopTitle" style="font-size:14pt;">Fair Oaks, California</span>' +
		'	<span class="PageTopName">' + pageName + '</span>' +
		'</div>' +
		'<div class="PageNav">' +
		'	<span class="PageNavBar"><script type="text/javascript">showNavigationBar("0");</script></span>' +
		'</div>' +
		'';
	document.write(hBlock);
}
function showNavigationBar(navLevel) {
	var hBlock 	= '' +
		'<!--Top Menu Bar HTML-->' +

		'<div id="ddtopmenubar" class="topnavbar">' +
		'<ul>' +
		'<li><a href="index.html">Welcome</a></li>' +
		'<li><a href="newsflash.html">News Flash</a></li>' +
		'<li rel="ddsubmenu1"><a href="#">Documents</a></li>' +
		'<li rel="ddsubmenu2"><a href="#">Members</a></li>' +
		'<li rel="ddsubmenu3"><a href="#">Links</a></li>' +
		'<li rel="ddsubmenu4"><a href="#">Events</a></li>' +
		'<li><a href="join.html">Join Us</a></li>' +
		'<li><a href="contact.html">Contact Us</a></li>' +
		'</ul>' +
		'</div>' +

		'<script type="text/javascript">ddlevelsmenu.setup("ddtopmenubar")</script>' +

		'<!-- Drop-down menus are below. Put them OUTSIDE any elements within the BODY (ie: right above </BODY>)-->' +

		'<!--Drop Down Menu 1 HTML-->' +
		'<div class="ddsubmenudiv">' +
		'<ul id="ddsubmenu1">' +
		'<li><a href="documents_calendar.html">Calendar of Events</a></li>' +
		'<li><a href="documents_newsletter.html">Newsletter</a></li>' +
		'<li><a href="documents_misc.html">Miscellaneous</a></li>' +
		'</ul>' +
		'</div>' +

		'<!--Drop Down Menu 2 HTML-->' +
		'<div class="ddsubmenudiv">' +
		'<ul id="ddsubmenu2">' +
		'<li><a href="members_officers.php">Officers</a></li>' +
		'<li><a href="members_online.php">On-line Members</a></li>' +
		'</ul>' +
		'</div>' +

		'<!--Drop Down Menu 3 HTML-->' +
		'<div class="ddsubmenudiv">' +
		'<ul id="ddsubmenu3">' +
		'<li><a href="links_legion.html">American Legion</a></li>' +
		'<li><a href="links_business.html">Local Businesses</a></li>' +
		'<li><a href="links_other.html">Other Links of Interest</a></li>' +
		'</ul>' +
		'</div>' +

		'<!--Drop Down Menu 4 HTML-->' +
		'<div class="ddsubmenudiv">' +
		'<ul id="ddsubmenu4">' +
		'<li><a href="events_officers2010.html">New Officers 2010</a></li>' +
		'<li><a href="events_ed2010.html">Visiting Ed 2010</a></li>' +
		'<li><a href="events_picnic2010.html">Picnic / BBQ 2010</a></li>' +
		'<li><a href="events_hawaiiannight2009.html">Hawaiian Night 2009</a></li>' +
		'</ul>' +
		'</div>';

	document.write(hBlock);
}
function showPageBottom() {
	var hBlock 	= '' +
		'<div class="PageBottom">' +
		'	<span class="PageBottomContent">' +
		'		Copyright © AL383.org 2010. All Rights Reserved.' +
		'	</span>' +
		'</div>' +
		'';
	document.write(hBlock);
}
function showTable(aRow, colWidth, colType) {
	var aWidth	= colWidth.split("|");
	var aType	= colType.split("|");
	var tdClass	= '';
	var aCol	= '';
	var hBlock 	= '<table class="StdTable" border="0" cellspacing="0" cellpadding="0">';
	for (var i1 = 0; i1 < aRow.length; i1++) {
		hBlock 		= hBlock + '<tr class="StdRow">';
		aCol		= aRow[i1].split("|");
		if (i1 < 1) {
			tdClass	= 'StdTitleCell';
		}
		else {
			tdClass	= 'StdDataCell';
			for (var i2 = 0; i2 < aCol.length; i2++) {
				switch (aType[i2].toUpperCase()){
					case 'EMAIL': 
						aCol[i2]	= '<a href="mailto:' + aCol[i2] + '?subject=AL Post 383">' + aCol[i2] + '</a>';
						break;
					case 'URL': 
						aCol[i2]	= '<a href="' + aCol[i2] + '" target="_blank">' + aCol[i2 + 1] + '</a>';
						break;
				}
			}
		}
		for (var i2 = 0; i2 < aCol.length; i2++) {
			if (aWidth[i2] != '0px') {
				hBlock	= hBlock + '<td class="' + tdClass + '" style="width:' + aWidth[i2] + ';">' + aCol[i2] + '</td>';
			}
		}
		hBlock 	= hBlock + '</tr>';
	}
	hBlock 	= hBlock + '</table>';
	document.write(hBlock);
}
function showImage(imgSource, imgWidth, imgHeight, bigSource, bigWidth, bigHeight, bigCaption) {
	if (bigSource	== "") {bigSource	= imgSource;}
	if (bigWidth	== "0") {bigWidth	= 1000;}
	if (bigHeight	== "0") {bigHeight	= 750;}
	if (bigCaption	== "") {bigCaption	= "Enlarged Image";}
	var hBlock 	= '' +
		'<img src="' + imgSource + '" width="' + imgWidth + '" Height="' + imgHeight + '"' +
		' onclick="showBigImage(' + "'" + bigSource + "'"  + ', ' + "'" + bigWidth + "'" + ', ' + "'" + bigHeight + "'" + ', ' + "'" + bigCaption + "'" + ');"' +
		' title="Click to enlarge">' +
		'';
	document.write(hBlock);
}
function showBigImage(bigSource, bigWidth, bigHeight, bigCaption) {
	var newImg = window.open('', 'new', 'width=' + bigWidth + ',height=' + bigHeight + ',directories=0,location=0,menubar=0,scrollbars=1,status=0,toolbar=0,resizable=1,left=50,top=30,screenX=50,screenY=30');
	newImg.document.write('<title>' + bigCaption + '</title><body style="background-color:#bebebe;"><img src=' + bigSource + '><div style="font-family:arial; font-size:12pt;">' + bigCaption + '</div>');
	newImg.document.close();
}


