/*  use these functions only for diecast page tabels */



var cellBGCOLOR = "#454555";

var cellCOLOR   = "#FFFFFF";

var hdrBGCOLOR  = "#202035";

var hdrCOLOR    = "#71ADDF";



function setCellBGCOLOR(sColor)

{

	cellBGCOLOR = sColor;

};



function setCellCOLOR(sColor)

{

	cellCOLOR = sColor;

};



function setHeaderBGCOLOR(sColor)

{

	hdrBGCOLOR = sColor;

};



function setHeaderCOLOR(sColor)

{

	hdrCOLOR = sColor;

};



function sayHeader(nWidth, hdrTxt)

{

	var hdrStr = "<td width=" + nWidth + 

	             " style=\"background-color:" + hdrBGCOLOR +

	             "; color: " + hdrCOLOR + 

				 "; font-size: 12px;\">" + 

				 hdrTxt + "</td>";

	document.write(hdrStr);

};



function sayCellEx(nWidth, rowTxt)

{

	var rowStr = "<td width=" + nWidth + 

				 " style=\"background-color:" + cellBGCOLOR +

	             "; color: " + cellCOLOR + 

				 "; font-size: 12px;\">" + 

				 rowTxt + "</td>";

	document.write(rowStr);

};



function sayCell(rowTxt)

{

	var rowStr = "<td style=\"background-color:" + cellBGCOLOR +

	             "; color: " + cellCOLOR + 

				 "; font-size: 12px;\">" + 

				 rowTxt + "</td>";

	document.write(rowStr);

};





/*============================================================================*/

/* The following functions allows me to change common parts of all the web    */

/* pages for this site. without changing the html files themselves.  As a     */

/* side benfit it makes the html fies much smaller than they would otherwise  */

/* be.                                                                        */

/*============================================================================*/



/*------------------------------------------------------------------------------

  This function adds a CSS fix for IE to each web page that calls the function.



  The "#menu{float:none};" line is required for IE to avoid positioning bug 

  when placing content first in source.



  The csshover.htc file (version 1.21.041022) is available for download from 

  http://www.xs4all.nl/~peterned/csshover.html.



  The "font-size:100%;" line enables text resizing in IE.

------------------------------------------------------------------------------*/

function sayIEFix()

{

	document.write

	(

		"<!--[if IE]>" +

			"<style type=\"text/css\"> @import url(\"css/paddedwall_ie.css\");</style>" +

			"<style type=\"text/css\" media=\"screen\">" +

				"#menu{ float:none; } " +

				"body { behavior:url(css/csshover.htc); font-size:100%; }" +

				"#menu ul li{ float:left; width: 100%; }" +

				"#menu h2, #menu a { height:1%;font:bold 0.7em/1.4em arial,helvetica,sans-serif; }" +

			"</style>" +

		"<![endif]-->"

	);

};



function sayHeaderDiv(hdrTitle, hdrSubTitle)
{
	document.write
	(
		"<tr><td>" +
			"<div id=\"header\">" +
				"<div id=\"titleBox\">" +
					"<span class=\"txtTitle\">" + hdrTitle + "</span>" +
				"</div>" +
				"<div id=\"subtitleBox\">" +
					"<span class=\"txtSubtitle\" style=\"font-size: 12px\">" + hdrSubTitle + "</span>" +
				"</div>" +
			"</div>" + 
		"</td></tr>"
	);
};



function sayMenuDiv(menuType)
{
	document.write
	(
		"<tr><td>" +
			"<div id=\"nav\">" +
				"<ul><li>" +
					"<h2>Home</h2>" +
					"<ul>" +
						"<li><a href=\"http://www.paddedwall.org/rTCDD2/index.html\" class=\"firstItem\">&nbsp;&nbsp;rTCDD			</a></li>" +
						"<li><a href=\"http://www.rfactor.net\"											>&nbsp;&nbsp;rFactor		</a></li>" +
						"<li><a href=\"http://www.thepits.us\"											>&nbsp;&nbsp;The Pits		</a></li>" +
						"<li><a href=\"http://www.paddedwall.org/index.html\" class=\"lastItem\"		>&nbsp;&nbsp;Paddedwall.org	</a></li>" +
					"</ul>" +
				"</li></ul>" +

				"<ul><li>" +
					"<h2>View Lists</h2>" +
					"<ul>" +
						"<li><a href=\"track_list.php\" class=\"firstItem\"		>&nbsp;&nbsp;Tracks		</a></li>" +
						"<li><a href=\"racingmod_list.php\"						>&nbsp;&nbsp;Racing Mods</a></li>" +
						"<li><a href=\"car_list.php\"							>&nbsp;&nbsp;Cars		</a></li>" +
						"<li><a href=\"othermod_list.php\" class=\"lastItem\"	>&nbsp;&nbsp;Other Mods	</a></li>" +
					"</ul>" +
				"</li></ul>"
	);

	if (menuType == 1)
	{
		document.write
		(
			"<ul><li>" +
				"<h2>Developers</h2>" +
				"<ul>" +
					"<li><a href=\"dev_tracks.php\" class=\"firstItem\"	>&nbsp;&nbsp;Manage Tracks		</a></li>" +
					"<li><a href=\"dev_mods.php\"						>&nbsp;&nbsp;Manage Racing Mods</a></li>" +
					"<li><a href=\"dev_cars.php\"						>&nbsp;&nbsp;Manage Cars		</a></li>" +
					"<li><a href=\"dev_other.php\" class=\"lastItem\"	>&nbsp;&nbsp;Manage Other Mods	</a></li>" +
				"</ul>" +
			"</li></ul>"
		);
	}

	document.write
	(
				"<ul><li>" +
					"<h2>Contact / Forums</h2>" +
					"<ul>" +
						"<li><a href=\"http://paddedwall.org/phpBB2\" class=\"firstItem\"	>&nbsp;&nbsp;Forums			</a></li>" +
						"<li><a href=\"site_problem.html\" class=\"lastItem\"				>&nbsp;&nbsp;Report Problem	</a></li>" +
					"</ul>" +
				"</li></ul>" +
			"</div>" +
		"</td></tr>"
	);
};



function sayFooterDiv(dateUpdated)

{
	document.write
	(
		"<tr><td>" +
			"<div id=\"footer\">" +
				"<span class=\"footerText\" style=\"float: right;\">" +
					"<a href=\"#\">Top</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
					"<a href=\"http://www.paddedwall.org/rTCDD2/index.html\">Home</a></span>" +
				"<span class=\"footerText\" style=\"float: left;\">Last updated: " + dateUpdated + "</span>" +
			"</div>" +
		"</td></tr>"
	);
};



