<?
	/*
		table.php
		
		Table function library

		Copyright (C) 2000 Contributors of the QuakeForge Project
		Please see the file "AUTHORS" for a list of contributors

		This program is free software; you can redistribute it and/or
		modify it under the terms of the GNU General Public License
		as published by the Free Software Foundation; either version 2
		of the License, or (at your option) any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

		See the GNU General Public License for more details.

		You should have received a copy of the GNU General Public License
		along with this program; if not, write to:

		Free Software Foundation, Inc.
		59 Temple Place - Suite 330
		Boston, MA  02111-1307, USA.
	*/

	/*
		tableBoxHeader
		
		Begin a bordered table
	*/
	function tableBoxHeader( $bgColor, $borderColor )
	{
		echo 	'<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0" bgColor="' . $borderColor . '">' .
				'	<TR>' .
				'		<TD>' .
				'			<TABLE cellspacing="1" cellpadding="2" width="100%" border="0" bgcolor="' . $bgColor . '">';
	}
	
	/*
		tableBoxFooter
		
		Finish an opened bordered table
	*/
	function tableBoxFooter()
	{
		echo	'			</TABLE>' .
				'		</TD>' .
				'	</TR>' .
				'</TABLE>';
	}

	/*
	*/
	function tableHeader( $cols, $bgColor )
	{
		echo 	'<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0" bgColor="' . $bgColor . '">';
	}

	/*
	*/
	function tableFooter()
	{
		echo	'</TABLE>';
	}
	
	/*
	*/
	function tableSpacer( $height, $width, $cols, $bgColor )
	{
		echo	'<TH colSpan="' . $cols . '" width="' . $width . '" bgColor="' . $bgColor . '">' .
				'	<IMG src="/img/blank.gif" height="' . $height . '" width="' . $width . '" border="0" alt="">' .
				'</TH>';
	}
	
	/*
		tableTitle
		
		Display a 
	*/
	function tableTitle($name, $cols, $bgColor)
	{
		echo	'				<TR bgColor="' . $bgColor . '" align="center">' .
				'					<TH colspan="' . $cols . '">' .
				'						<SPAN class="titlebar">' . $name . '</SPAN>' .
				'					</TH>' .
				'				</TR>';
	}

?>