function headerWriter(headerImageFileName)
{
	
	document.write('<TABLE cellSpacing=0 cellPadding=0 width=582 border=0>');
	document.write('<TR>');
	document.write('<TD><IMG height=17 alt=# src="../images/grid-tl.gif" width=22></TD>');
	document.write('<TD><IMG height=17 alt=# src="../images/spacer.gif" width=560></TD>');
	document.write('</TR>');
	document.write('<TR>');
	document.write('<TD><IMG height=35 alt=# src="../images/grid-uml.gif" width=22></TD>');
	document.write('<TD><IMG height=35 src=../images/' + headerImageFileName + ' width=560></TD>');
	document.write('</TR>');
	document.write('</TABLE>');
}

function bodyWriterTop()
{
	document.write('<TABLE cellSpacing=0 cellPadding=0 width=582 border=0>');
	document.write('<TR height=2>');
	document.write('<TD><IMG height=9 src="../images/grid-llml.gif" width=22 border=0></TD>');
	document.write('<TD><IMG height=5 alt=# src="../images/spacer.gif" width=560 border=0></TD>');
	document.write('</TR>');
	document.write('<TR valign=top>');
	document.write('<TD><IMG height=409 alt=# src="../images/grid-bl.gif" width=22 border=0></TD>');
	document.write('<TD vAlign=top class=small>');
}

function bodyWriterBottom()
{
	document.write('</TD>');
	document.write('</TR>');
	document.write('</TABLE> ');
}

function footer()
{
	var temp_string = "";
	
	if (top.Troop754.current_login_user !="")
	{
		temp_string = "<br/><font>Current login User is <b>" + top.Troop754.current_login_english_name + "</b> if not, please <a href='javascript:top.frames.Troop754.LoginOut()'>log out</a></font>"; 
	}
	
	document.write("<br/>");
	document.write("<table width='100%'>");
	document.write("<tr>");
	document.write("<td><font> 2008 <a href='http://mazinc.com' target='_blank'>Maz Inc.</a> All rights reserved.</font><br>");
	document.write("<font> 15 April 2007 | For information regarding this page, please contact </font><font color='blue'>");
	document.write("<a href='mailto:shengyeanc@gmail.com'>Scout Master</a></font>" + temp_string + "</td>");
	document.write("</tr>");
	document.write("</table>");
}
function bodyWriterLink(linkName,linkPath,linkType)
{
	var linkIcon = '';
	if (linkType=='word')
		linkIcon = 'icon_word';
	else if (linkType=='excel')
		linkIcon = 'icon_excel';
	else if (linkType=='pdf')
		linkIcon = 'icon_pdf';
	else if (linkType=='powerpoint')
		linkIcon = 'icon_powerpoint';
	else if (linkType=='visio')
		linkIcon = 'icon_visio';
	else if (linkType=='jpg')
		linkIcon = 'icon_jpg';
	else if (linkType=='zip')
		linkIcon = 'icon_zip';
	else if (linkType=='folder')
		linkIcon = 'icon_folder';
	else
		linkIcon = 'icon_word';
	
	if (linkType!='folder')
	{
		document.write("<nobr><a href='" + linkPath + "' target='_blank'>" + linkName + "</a> ");
		document.write("<IMG src='../images/spacer.gif' width=5px height=16px border=0><IMG src='../images/" + linkIcon + ".gif'  border=0 ></nobr>");
	}
	else
	{
		linkPath = "../asp/DirectoryBrowser.asp?TragetDirectory=" + linkPath;
		document.write("<nobr><a href='" + linkPath + "' target='_blank'>" + linkName + "</a> ");
		document.write("<IMG src='../images/spacer.gif' width=5px height=16px border=0><IMG src='../images/" + linkIcon + ".gif'  border=0 ></nobr>");
	}
	
}

// used by directory browser
function bodyWriterDisplayIcon(linkType)
{
	var linkIcon = '';
	if (linkType=='doc')
		linkIcon = 'icon_word';
	else if (linkType=='xls')
		linkIcon = 'icon_excel';
	else if (linkType=='pdf')
		linkIcon = 'icon_pdf';
	else if (linkType=='ppt')
		linkIcon = 'icon_powerpoint';
	else if (linkType=='vis')
		linkIcon = 'icon_visio';
	else if (linkType=='jpg')
		linkIcon = 'icon_jpg';
	else if (linkType=='zip')
		linkIcon = 'icon_zip';
	else
		linkType = '';
	
	if (linkType != '')	
	{	
		document.write("<IMG src='../images/spacer.gif' width=5px height=16px border=0><IMG src='../images/" + linkIcon + ".gif'  border=0 ></a></nobr>");
	}
	
}	
	

	
	

	
		
		
	
	
		


