// All HTML, JavaScript & text (c) 2006 Compelling Press. All rights reserved.
// http://www.compellingpress.com/

function topline_start()
{
	document.write(
	'<div align="center">'
+		'<TABLE WIDTH=751 BORDER=0 CELLPADDING=0 CELLSPACING=0>\n'
+		'<TR>\n'
+			'<TD COLSPAN=3>\n'
+				'<table width="751" style="width:751px; height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+					'<tr>\n'
+						'<td valign="top" style="background:url(../images/cp_header.jpg) top repeat-y  ">\n'
+							'<div style="margin:8px 30px 0px 40px; ">\n'
	);
}

function topline_end()
{
	document.write(
							'</div>\n'
+						'</td>\n'
+					'</tr>\n'
+				'</table>\n'
+			'</TD>\n'
+		'</TR>\n'
	);
}

function menuline_start()
{
	document.write(
		'<TR>\n'
+			'<TD width="55">\n'
+		  		'<table width="55" style="width:55px; height:39px" border="0" cellspacing="0" cellpadding="0">\n'
+          			'<tr>\n'
+            			'<td valign="top" style="background:url(../images/cp_midleft.jpg) top repeat-y  ">\n'
+		 				'</td>\n'
+		  			'</tr>\n'
+		  		'</table>\n'
+			'</TD>\n'
+			'<TD width="670" BGCOLOR=#212121 >\n'
+				'<table width="670" style="width:670px; height:39px " border="0" cellspacing="0" cellpadding="0">\n'
+          			'<tr>\n'
+            			'<td valign="center">\n'
	);
}

function menuline_end()
{
	document.write(
						'</td>\n'
+					'</tr>\n'
+				'</table>\n'
+			'</TD>\n'
+			'<TD width="26" style="width:26px; background:url(../images/cp_midright.jpg) top repeat-y ">\n'
+			'</TD>\n'
+		'</TR>\n'
	);
}

function maintext_start()
{
	document.write(
		'<TR>\n'
+			'<TD width="55" style="width:55px; background:url(../images/cp_bottomleft.jpg) top repeat-y ">\n'
+			'</TD>\n'
+			'<TD width="680" BGCOLOR=#E9D6A0 style="width:680px;">\n'
	);
}

function maintext_end()
{
	document.write(
			'</TD>\n'
+			'<TD width="420" style="width:410px; background:url(../images/cp_bottomright.jpg) top repeat-y ">\n'
+			'</TD>\n'
+		'</TR>\n'
	);
}

function endline_start()
{
	document.write(
			'<TR>\n'
+				'<TD COLSPAN=3>\n'
+					'<table width="751" style="width:751px; height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+          				'<tr>\n'
+         					'<td height="85" valign="top" style="background:url(../images/cp_endpage.jpg) top no-repeat  ">\n'
	);
}

function endline_end()
{
	document.write(
							'</td>\n'
+			         	'</tr>\n'
+					'</table>\n'
+				'</TD>\n'
+			'</TR>\n'
+		'</TABLE>\n'
+	'</div>\n'
	);
}

// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------

function threecolumns_column_1()
{
	document.write(
		'<table width="680" style="width:680px; height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+        	'<tr>\n'
+				'<td width="1" style="height:100%" BGCOLOR=#D0C090></td>\n'
+		  		'<td width="222" style="width:210px; height:100%" valign="top">\n'
	);
}

function threecolumns_column_2()
{
	document.write(
				'</td>\n'
+				'<td width="1" style="height:100%" BGCOLOR=#D0C090></td>\n'
+			  	'<td width="222" style="width:210px; height:100%" valign="top">\n'
	);
}

function threecolumns_column_3()
{
	document.write(
				'</td>\n'
+				'<td width="1" style="height:100%" BGCOLOR=#D0C090></td>\n'
+			  	'<td width="222" style="width:210px; height:100%" valign="top">\n'
	);
}

function threecolumns_column_end()
{
	document.write(
				'</td>\n'
+				'<td width="1" style="height:100%" BGCOLOR=#D0C090></td>\n'
+			'</tr>\n'
+		'</table>\n'
	);
}

// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------

function twocolumns_column_1()
{
	document.write(
		'<table width="683" style="width:100%; height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+        	'<tr>\n'
+				'<td width="1" style="width:1px; height:100%" BGCOLOR=#D0C090></td>\n'
+		  		'<td width="340" style="width:300px; height:100%" valign="top">\n'
	);
}

function twocolumns_column_2()
{
	document.write(
				'</td>\n'
+				'<td width="1" style="width:1px; height:100%" BGCOLOR=#D0C090></td>\n'
+			  	'<td width="340" style="width:300px; height:100%" valign="top">\n'
	);
}

function twocolumns_column_end()
{
	document.write(
				'</td>\n'
+				'<td width="1" style="width:1px; height:100%" BGCOLOR=#D0C090></td>\n'
+			'</tr>\n'
+		'</table>\n'
	);
}

// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------

function make_link(url, txt, whichclass)
{
	if (whichclass.length != 0)
		whichclass = ' class="' + whichclass + '"';
	if (url.length != 0)
		return '<a href="' + url + '"' + whichclass +'>' + txt + '</a>';
	return '<span' + whichclass + '>' + txt + '</span>';
}

function main_menu(clr, link1, text1, link2, text2, link3, text3, link4, text4, link5, text5, which)
{
	var class1 = "menu_font";	if (which == 1) class1 = "menu_selected";
	var class2 = "menu_font";	if (which == 2) class2 = "menu_selected";
	var class3 = "menu_font";	if (which == 3) class3 = "menu_selected";
	var class4 = "menu_font";	if (which == 4) class4 = "menu_selected";
	var class5 = "menu_font";	if (which == 5) class5 = "menu_selected";
	document.write(
			'<table width="670" style="height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+				'<tr>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+					'<td width="134" style="width:134px; height:100%; " class="' + class1 + '"><div align="center">' + make_link(link1, text1, clr) + '</div></td>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+					'<td width="134" style="width:134px; height:100%; " class="' + class2 + '"><div align="center">' + make_link(link2, text2, clr) + '</div></td>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+					'<td width="134" style="width:134px; height:100%; " class="' + class3 + '"><div align="center">' + make_link(link3, text3, clr) + '</div></td>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+					'<td width="134" style="width:134px; height:100%; " class="' + class4 + '"><div align="center">' + make_link(link4, text4, clr) + '</div></td>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+					'<td width="134" style="width:134px; height:100%; " class="' + class5 + '"><div align="center">' + make_link(link5, text5, clr) + '</div></td>\n'
+					'<td width="1" bgcolor="#404040"></td>'
+				'</tr>\n'
+			'</table>\n'
	);
}

function cp_logo()
{
	document.write(
		'<a href="../main/index.html">\n'
+			'<img src="../images/yr_compellingpress_70high.gif" alt="Compelling Press" border="0">\n'
+		'</a>\n'
	);
}
	
function end_credits()
{
	document.write(
		'<table width="670" style="height:100% " border="0" cellspacing="0" cellpadding="0">\n'
+			'<tr>\n'
+				'<td width="60"  style="width:60px; height:100%"></td>\n'
+				'<td width="100" style="width:100px; height:100%" valign="top" class="end_links"><div style="margin:1em;" align="center">\n'
+					'<a href="../main/sitemap.html">Sitemap</a></div></td>\n'
+				'<td width="110" style="width:110px; height:100%" valign="top" class="end_links"><div style="margin:1em;" align="center">\n'
+					'<a href="#" onClick="javascript:return popup_compatibility();">Compatibility</a></div></td>\n'
+				'<td width="110"  style="width:110px; height:100%" valign="top" class="end_links"><div style="margin:1em;" align="center">\n'
+					'<a href="#" onClick="javascript:return popup_privacypolicy();">Privacy Policy</a></div></td>\n'
+				'<td width="110"  style="width:110px; height:100%" valign="top" class="end_links"><div style="margin:1em;" align="center">\n'
+					'<a href="#" onClick="javascript:return popup_termsofuse();">Terms of Use</a></div></td>\n'
+				'<td width="180" style="width:180px; height:100%" valign="top" class="end_links"><div style="margin:1em;" align="center">\n'
+					'<a href="#" onClick="javascript:return popup_copyright();">© 2006 Compelling Press</a></div></td>\n'
+			'</tr>\n'
+		'</table>\n'
	);
}