//var lNewsBanner = 'Wedding and Honeymoon pictures have arrived, more updates coming mid-January 2005';
var lNewsBanner = null;

function showLastModified(aDoc, aSize) {

	if (aSize == null)
		aSize=-1;
	else if (aSize == undefined)
		aSize=-1;
		
	aDoc.write('<FONT SIZE="'+aSize+'"><I>Last revised: ');
	if (aDoc.lastModified)
		aDoc.write(aDoc.lastModified);
	else
		aDoc.write("12th April 2003");
	aDoc.write('</I></FONT>');

}

function showHeader(aDoc, aTitle, aBackground, aFull, aNewsBanner) {


	if ((aNewsBanner != undefined) && (aNewsBanner != null))
	{
		sNewsBanner = aNewsBanner;
		trowspan = 3;
	}
	else if (lNewsBanner != null)
	{
		sNewsBanner = lNewsBanner;
		trowspan = 3;
	}
	else
	{
		sNewsBanner = null;
		trowspan = 2;
	}

		
	aDoc.write('<TABLE BORDER="0" WIDTH="100%"><TR><TD ID="HDRTBL" BACKGROUND="'+aBackground+'">');
	
	aDoc.write('<TABLE COLS="2" BORDER="0" CELLSPACING="0" CELLPADDING="3" BORDERCOLOR="#ffff00" WIDTH="100%">');
	aDoc.write('<TR>');
	aDoc.write('<TD ROWSPAN="'+trowspan+'" WIDTH="142px"><img name="bannerAnim" src="imgs/placeholder_manim.png" BORDER="0"></TD>');
	aDoc.write('<TD CLASS="TMF2" valign="top" align="right"><h2>'+aTitle+'</h2></TD>');
	aDoc.write('</TR>');


	if (sNewsBanner != null)
	{
		aDoc.write('<TR align="left" valign="top" BGCOLOR="#ffff00">');
		aDoc.write('<TD xCLASS="TMF2"><FONT COLOR="#000000">'+sNewsBanner+'</FONT></TD>');
		aDoc.write('</TR>');
	}

//	aDoc.write('<TR align="left" valign="bottom">');
//	aDoc.write('<TD CLASS="TMF2">Unless otherwise stated, all software and graphics are copyright (c) by Theodore Zacharia.</TD>');
//	aDoc.write('</TR>');
//	if (aFull) {
//		aDoc.write('<TR>');
//		aDoc.write('<TD CLASS="TMF2" COLSPAN="2">');
//		aDoc.write('<FONT SIZE="+1">Welcome to my home pages which contain some home grown utilities, graphics, fine art and bits and pieces of which I hope you appreciate, approve and maybe find of some use.</FONT></TD>');
//		aDoc.write('</TR>');
//	}
	aDoc.write('</TABLE>');
	
	aDoc.write('</TD></TR></TABLE>');

			
}

function showFooter(aDoc, aShowBack, aHRColor) {

	var hrcol = "#0088AA";

	if ((aShowBack != undefined) && (aShowBack == true)) {
		aDoc.write('<p><a href="javascript: history.go(-1)">Back</a>');
	}
	
	if (aHRColor != undefined)
	{
		hrcol = aHRColor;
	}	

	aDoc.write('<HR COLOR="'+hrcol+'" SIZE="2" NOSHADE>');
	
	aDoc.write('<TABLE ALIGN="CENTER">');
	aDoc.write('<TR><TD ALIGN="CENTER">');
	aDoc.write('<FONT SIZE="-1">');
	aDoc.write('Brought to you by <A HREF="http://www.blueyonder.co.uk"><B>Blueyonder</B></A>.');
	aDoc.write('</FONT></TD></TR>');
	aDoc.write('<TR><TD ALIGN="CENTER">');
	showLastModified(aDoc);
	aDoc.write('</TD></TR></TABLE>');
			
}

/* I hate having browser specific stuff, but it's the only way (UNTIL CSS2 is implemented) to 
 get shadow text to work
 For this to work, shadow.css must be included in your HTML page
 These both have serious limitiations so don't use them seriously yet until I make them more elegant
*/
function add_shadowtext(aDoc, aText)
{
	// YUK
	isIE = (navigator.appName=="Microsoft Internet Explorer") ? true:false;

	if (isIE)
	{
		aDoc.write('<div class=shadow>'+aText+'</div>');
	}
	else
	{
		aDoc.write('<div id="shadow01">'+aText+'</div>');
	}

}

function animate() {

	idxanim += 1;
	if (idxanim > maxanimidx)
		idxanim = 0;

	if (document.images) {
		if (manim[idxanim] != null)
			document.images['bannerAnim'].src = manim[idxanim].src;
	}

	setTimeout('animate()', 2500);
}

