var rootURL = "http://www.slrealm.com/";

function displayHeader()
{
	var header = ""
	+"<CENTER>"
	+"<P>"
	+"	<TABLE BORDER=1 WIDTH=100% BGCOLOR=#0033CC>"
	+"		<TR>"
	+"			<TD WIDTH=100%>"
	+"<P ALIGN=CENTER><FONT SIZE=6 COLOR=white>SHADOW LORD'S REALM</FONT>"
	+"</TD>"
	+"</TR>"
	+"<TR BGCOLOR=\"white\">"
	+"<TD>"
	+"<P ALIGN=\"center\">"
	+"<A HREF=\""+rootURL+"\"><FONT SIZE=1>Home</FONT></A>"
	+"<FONT SIZE=1> | </FONT>"
    +"<A HREF=\""+rootURL+"/calculators.html\"><FONT SIZE=1>Online Calculators</FONT></A>"
    +"<FONT SIZE=1> | </FONT>"
    +"<A HREF=\""+rootURL+"/javapage.html\"><FONT SIZE=1>The Java Page</FONT></A>"
	+"<FONT SIZE=1> | </FONT>"
	+"<A HREF=\""+rootURL+"/programming.html\"><FONT SIZE=1>Home Grown Software</FONT></A>"
	+"<FONT SIZE=1> | </FONT>"
	+"<A HREF=\""+rootURL+"/album.html\"><FONT SIZE=1>Photo Album</FONT></A>"
	+"<FONT SIZE=1> | </FONT>"
	+"<A HREF=\""+rootURL+"/emulators.html\"><FONT SIZE=1>Software Emulators</FONT></A>"
	+"<FONT SIZE=1> | </FONT>"
	+"<A HREF=\""+rootURL+"/janet.html\"><FONT SIZE=1>Memorial Page</FONT></A>"
	+"<BR><BR>"
	+"</P>"
	+"</TD>"
    +"</TR>"
    +"</TABLE>"
    +"</CENTER>";

	this.document.write(header);
}

function displaySpecialAnimations()
{
	// look for a special animation to put on the main page
	var output = "";
	
	// get the current date
	var currDate = new Date();
	
	// handle 'days' of the week (Sun == 0)
	var dayInWeek = currDate.getDay();
	
	// Friday
	if (dayInWeek == 5)
	{
		// display the laurel and hardy dancing animation
		output += "<center><h2>T.G.I.F!!!!!</h2></center><br>";
		output += "<center><img src=\"/images/laurelHardy.motion.gif\"></center><br>";
	}

	// Tax day!
	var dayOfMonth = currDate.getDate();
	var monthOfYear = currDate.getMonth();
	
	if (monthOfYear == 3)	// && dayOfMonth == 15)
	{
		output += "<center><h2>It's Tax Time - AGAIN!!!!!</h2></center><br>";
//		output += "<center><img src=\"/images/tax-shake-down.jpg\"></center><br>";
	}
	
	// Handle holidays
	// Christmas
	if (monthOfYear == 11 && dayOfMonth == 25)
	{
		output += "<center><table width=\"100%\"><tr bgcolor=\"green\"><td><h1><font color=\"red\">Merry Christmas!</font></h1></td></tr></table></center><br>";
	}

	// Christmas - Advent Calendar
/*
	if (monthOfYear == 11)
	{
		output += "<center><table width=\"100%\"><tr bgcolor=\"red\"><td align=\"center\"><h1><font color=\"green\">";
		output += "Christmas Time Is Here!</font></ht><br><font color=\"white\">Please view my Christmas Advent Calendar ";
		output += "<a href=\"advent.html\"><font color=\"white\">here</font></a>.";
		output += "</td></tr></table></center>";
	}
*/
	if (monthOfYear == 11)
	{
		output += "<center><table width=\"100%\"><tr bgcolor=\"white\"><td><h1><font color=\"red\">Christmas Time Is Here!  Happy Holidays!</font></h1></td></tr></table></center><br>";
	}

	// New Years
	if (monthOfYear == 0 && dayOfMonth == 1)
	{
		output += "<center><table width=\"100%\"><tr bgcolor=\"white\"><td align=\"center\"><h1><font color=\"red\">Happy New Years!</font></h1></td></tr></table></center><br>";
	}

	// Halloween
	
	if (monthOfYear == 9)	// && dayOfMonth == 31)
	{
		output += "<center>";
		output += "<table width=\"45%\">";
		output += "<tr bgcolor=\"orange\">";
		output += "<td align=\"center\">";
		output += "<h2>";
		output += "<font color=\"red\">Happy Halloween!</font>";
		output += "</h2>";
		output += "</td>";
		output += "</tr>";
		output += "</table>";
		output += "<font color=\"black\">Visit my updated Halloween demo <a href=\"halloween.html\">here</a>.  <strong>NOTE:</strong> Requires Java 2 plugin to run which is around 9mb</font><br>";
		output += "</center>";
		
		//output += "<center><table width=\"100%\"><tr bgcolor=\"orange\"><td><h1><font color=\"black\">Happy Halloween!</font></h1></td></tr></table></center><br>";
	}
			
	// write it!
	this.document.write(output)
}

function displayReturnToMainFooter()
{
	var footer = ""
	+"<CENTER>"
	+"<A HREF=\""+rootURL+"\">Return To Main</A>"
	+"</CENTER>";

	this.document.write(footer);
}
