<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="ISO-8859-1" media-type="text/html"/>
<xsl:template match="site">

	<html>
	<head>
	<title><xsl:value-of select="title" /></title>
	<xsl:if test="meta_description">
		<meta name="description" content="{meta_description}" />
	</xsl:if>
	<xsl:if test="meta_keywords">
		<meta name="keywords" content="{meta_keywords}" />
	</xsl:if>
	<meta name="generator" content="SiteMason" />

	<style type="text/css">	
		.footertext {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-weight: normal;
			color: #333333;
			text-decoration: none;
		}	
		.headerbg {
			background-color: #6576B3;
		}
		
		.pagebg {
			background-color: #BCC0C1;
		}
		
		.whitebg {
			background-color: #ffffff;
		}
		
		.plaintext {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-style: normal;
			font-weight: normal;
			color: #000000;
			text-decoration: none;
		}
		
		.link {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-style: normal;
			font-weight: normal;
			color: #333333;
			text-decoration: none;
		}

		.link:hover {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-style: normal;
			font-weight: normal;
			color: #333333;
			text-decoration: underline;
		}
				
		.footerbg {
			background-color: #6576B3;
		}
		
		.headline {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 16pt;
			font-style: normal;
			font-weight: bold;
			color: #000000;
			text-decoration: none;
		}

		.companyname {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 20px;
			font-style: normal;
			font-weight: bold;
			color: #FFFFFF;
			text-decoration: none;
		}

		.slogan {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 16px;
			font-style: normal;
			font-weight: bold;
			color: #000000;
			text-decoration: none;
		}
				
		.tableoutline {
			border-top-width: 0.5px;
			border-right-width: 0.5px;
			border-bottom-width: 0.5px;
			border-left-width: 0.5px;
			border-top-style: solid;
			border-right-style: solid;
			border-bottom-style: none;
			border-left-style: solid;
			border-top-color: #000000;
			border-right-color: #000000;
			border-bottom-color: #000000;
			border-left-color: #000000;
		}
		.navlink {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-style: normal;
			font-weight: normal;
			color: #333333;
			text-decoration: none;
			line-height: 16px;
		}

		.navlink:hover {
			font-family: Verdana, Arial, Helvetica, sans-serif;
			font-size: 10pt;
			font-style: normal;
			font-weight: normal;
			color: #333333;
			text-decoration: underline;
			line-height: 16px;
		}
		
	</style>
	<script language="JavaScript" type="text/JavaScript">
	<![CDATA[
		function display_todays_date() {
			var today = new Date();
			var numerical_day=today.getDay();
			var numerical_month=today.getMonth();
			var date=today.getDate();
			var year=today.getFullYear();
			
			var weekday_array = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
			var day_of_the_week = weekday_array[numerical_day];
			
			var month_array = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
			var month_name = month_array[numerical_month];
			
			var date_string='<font size="1" face="Arial, Helvetica, sans-serif" color="#666666">' +day_of_the_week+', '+month_name+' '+date+', '+year+ '</font>';
			document.write(date_string);
		}
	]]>
	</script>

	</head>
	
	<body bgcolor="#BCC0C1" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

	<!-- page background -->
	<xsl:choose>
		<xsl:when test="bg_image1">
			<xsl:attribute name="background">
				<xsl:value-of select="bg_image1" />
			</xsl:attribute>
		</xsl:when>
		<xsl:otherwise>
		</xsl:otherwise>
	</xsl:choose>	
	
	<!-- begin main outline table -->
	<table width="600" align="center" cellpadding="0" cellspacing="0" class="tableoutline">
		<tr>
		<td>
			<!-- begin main outline table -->
			
			<!-- begin company name table -->
			<table width="600" height="56" border="0" align="center" cellpadding="10" cellspacing="0" class="headerbg">
				<tr>				
					<!-- header_image -->
					<xsl:choose>
						<xsl:when test="header_image">
							<xsl:choose>
								<xsl:when test="header_image_link">
									<td>
										<a href="{header_image_link}">
											<img alt="" border="0">
												<xsl:attribute name="src">
													<xsl:value-of select="header_image" />
												</xsl:attribute>
											</img>
										</a><br />
									</td>
								</xsl:when>
								<xsl:otherwise>
									<td>
										<img alt="" border="0">
											<xsl:attribute name="src">
												<xsl:value-of select="header_image" />
											</xsl:attribute>
										</img><br />
									</td>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
		
					<!-- company name and slogan -->
					<td width="100%" align="left" valign="bottom" class="companyname">
						<xsl:value-of select="header" />
						<xsl:choose>
							<xsl:when test="slogan">
								<br />
								<span class="slogan"> 
									<xsl:value-of select="slogan" />
								</span>
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>
					</td>
					
					<!-- image2 -->
					<xsl:choose>
						<xsl:when test="image2">
							<xsl:choose>
								<xsl:when test="image2_link">
									<td>
										<a href="{image2_link}">
											<img alt="" border="0">
												<xsl:attribute name="src">
													<xsl:value-of select="image2" />
												</xsl:attribute>
											</img>
										</a><br />
									</td>
								</xsl:when>
								<xsl:otherwise>
									<td>
										<img alt="" border="0">
											<xsl:attribute name="src">
												<xsl:value-of select="image2" />
											</xsl:attribute>
										</img><br />
									</td>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:when>
						<xsl:otherwise>
							<td>
							</td>
						</xsl:otherwise>
					</xsl:choose>
					
				</tr>
			</table>
			<!-- end company name table -->

			
			<!-- begin date display table -->
			<table width="600" height="25" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="whitebg">
				<tr>
					<td width="600" height="25" valign="bottom" background="/template-images/sbs07b/hdr.table.blue.btm.gif" class="plaintext">
						<div align="right">
						<script language="javascript"> display_todays_date();</script>
						&#160;
						</div>
					</td>
				</tr>
				<tr>
					<td width="600" height="2" colspan="2"></td>
				</tr>
			</table>
			<!-- end date display table -->

			<!-- begin graphic header table -->
			<table width="600" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="whitebg">
				<tr>
					<td>
						<!-- main_image -->
						<xsl:choose>
							<xsl:when test="main_image">
								<xsl:choose>
									<xsl:when test="main_image_link">
										<a href="{main_image_link}">
											<img alt="" border="0">
												<xsl:attribute name="src">
													<xsl:value-of select="main_image" />
												</xsl:attribute>
											</img>
										</a><br />
									</xsl:when>
									<xsl:otherwise>
										<img alt="" border="0">
											<xsl:attribute name="src">
												<xsl:value-of select="main_image" />
											</xsl:attribute>
										</img><br />
									</xsl:otherwise>
								</xsl:choose>
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>			
					</td>
				</tr>
			</table>
			<!-- end graphic header table -->
			
			<!-- begin main table -->
			<table width="600" height="337" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="whitebg">
				<tr>
					<td width="2">&#160;</td>
					<td width="150" valign="top">
						
						<!-- bg_image2: cell background -->
						<xsl:choose>
							<xsl:when test="bg_image2">
									<xsl:attribute name="background">
										<xsl:value-of select="bg_image2" />
									</xsl:attribute>			
							</xsl:when>
							<xsl:otherwise>		
							</xsl:otherwise>
						</xsl:choose>
						
						<!-- image1 -->
						<xsl:choose>
							<xsl:when test="image1">
								<xsl:choose>
									<xsl:when test="image1_link">
										<a href="{image1_link}">
											<img alt="" border="0">
												<xsl:attribute name="src">
													<xsl:value-of select="image1" />
												</xsl:attribute>
											</img>
										</a><br /><br />
									</xsl:when>
									<xsl:otherwise>
										<img alt="" border="0">
											<xsl:attribute name="src">
												<xsl:value-of select="image1" />
											</xsl:attribute>
										</img><br /><br />
									</xsl:otherwise>
								</xsl:choose>
							</xsl:when>
							<xsl:otherwise>
								<img src="/template-images/sbs07b/sidebar.hdr.blue.gif" width="150" height="19" />
								<br /><br />
							</xsl:otherwise>
						</xsl:choose>			
						
						
						<!-- navigation -->
						<xsl:for-each select="nav">
							<img alt="">
								<xsl:attribute name="src">
								<xsl:choose>
									<xsl:when test="currently_displayed ='true'">/template-images/sbs07b/sm.arrow.gif</xsl:when>
									<xsl:otherwise>/template-images/sbs07b/sm.arrow.clear.gif</xsl:otherwise>
								</xsl:choose>
								</xsl:attribute>
							</img>
							<a href="{link}" class="navlink"><xsl:value-of select="title"/></a><br clear="all"/>
						</xsl:for-each>

						<!-- nav tool -->
						<xsl:choose>
							<xsl:when test="nav_tool">
								<br />
								<script type="text/javascript" language="JavaScript" src="{nav_tool}?JS"></script>
								<br />
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>
											
						<!-- tool 1 -->
						<xsl:choose>
							<xsl:when test="tool1">
								<br />
								<script type="text/javascript" language="JavaScript" src="{tool1}?JS"></script>
								<br />
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>			
								
						<!-- tool 2 -->
						<xsl:choose>
							<xsl:when test="tool2">
								<br />
								<script type="text/javascript" language="JavaScript" src="{tool2}?JS"></script>
								<br />
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>	

					</td>
					<td width="1">&#160;</td>
					<td width="3" background="/template-images/sbs07b/dot.gif">&#160;</td>
					<td width="10">&#160;</td>
					<td width="426" valign="top">
							
						<span class="plaintext">
						
						<!-- Main Content Area: this is where the Page Builders and other tools will be displayed -->
		
						<xsl:for-each select="content">
						<xsl:apply-templates/><br/>
						</xsl:for-each>
		
						<!-- end Main Content Area -->
						
						</span>
					</td>
				<td width="10">&#160;</td>
			</tr>
			</table>
			<!-- end main table -->
			
			<!-- begin footer top graphic table -->
			<table width="600" height="14" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="whitebg">
				<tr>
					<td width="600" height="14"><img src="/template-images/sbs07b/ftr.table.blue.top.gif" width="600" height="14" /></td>
				</tr>
			</table>
			<!-- end footer top graphic table -->
			
			<!-- begin footer content table -->
			<table width="600" height="30" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="footerbg">
				<tr> 
					<td align="center" class="footertext" colspan="4">			
						
						<!-- footer -->
						<xsl:choose>
							<xsl:when test="footer">
									<xsl:value-of select="footer" disable-output-escaping="yes"/>
									<br />
									<br />
							</xsl:when>
							<xsl:otherwise>
							</xsl:otherwise>
						</xsl:choose>
					</td>
				</tr>
				
				<tr>
					<td width="10">&#160;</td>
					<td width="290" class="plaintext">

						<xsl:choose>
							<xsl:when test="maintainer">
								<a class="link" href="mailto:{maintainer_email}"><xsl:value-of select="maintainer" /></a>
								<xsl:choose>
									<xsl:when test="maintainer_url">
										| <a class="link" href="{maintainer_url}"><xsl:value-of select="maintainer_url" /></a>
									</xsl:when>
									<xsl:otherwise>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:when>
							<xsl:otherwise>
								&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
					<td width="290" class="plaintext">
						<div align="right">&#169; <xsl:value-of select="copyright" disable-output-escaping="yes" /></div>
					</td>
					<td width="10">&#160;</td>
				</tr>
			</table>
			<!-- end footer content table -->
			
			<!-- begin footer bottom graphic table -->
			<table width="600" height="6" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" class="whitebg">
				<tr>
					<td width="600" height="6"><img src="/template-images/sbs07b/ftr.table.blue.btm.gif" width="600" height="6" /></td>
				</tr>
			</table>
			<!-- end footer bottom graphic table -->
			
			<!-- end main outline table -->
		</td>
		</tr>
	</table>
	<!-- end main outline table -->
	
	<p>
		<br />
	</p>
	</body>
	</html>
	
</xsl:template>
</xsl:stylesheet>
