
// "calendar.js" by MAK v1.01 1/23/2004

/* ********************************************************* */
/*           Edit the following lines as required.           */
/* ********************************************************* */

// set c_Override_Date to "yes" if you want to specify the month and year
// set c_Override_Date to "no" to use the current month and year
var c_Override_Date	= "no";
var c_Override_Month	= "12";
var c_Override_Year	= "2004"

// set c_Highlight_Today to "yes" if you want today's day highlighted
// note: this will always highlight the current day, regardless of month or year
// use c_Highlight_Color to specify the highlighted day's color (mandatory!)
var c_Highlight_Today	= "yes";
var c_Highlight_Color	= "#D67984";

// set c_Font_Face or c_Font_Color to "" to use the page defaults
// or else specify the font / font color you wish to use
// you must specify c_Font_Size... in px (ie: "10px")
var c_Font_Face 	= "Comic Sans MS";
var c_Font_Color	= "#000000";
var c_Font_Size 	= "10px";

// set c_Table_Image to "" to not use an image
var c_Table_Image 	= "mll-val-cal.gif";

// set c_Table_BGColor as desired, or "" to use page defaults
var c_Table_BGColor	= "";

// set c_Table_Border to "yes" if you want a border, "no" if you don't
// you can also set the color and width of the border here
var c_Table_Border 	= "no";
var c_Table_BorderColor = "#000000";
var c_Table_BorderWidth = "1";

// The height and width values should match your image (if you used one)
var c_Table_Height 	= "130";
var c_Table_Width	= "130";

/* ********************************************************* */
/* Beware: changing the following lines can break the table! */
/* ********************************************************* */

// these values control the top and bottom gutter
var c_Padding_Top	= "10%";	// 10%
var c_Padding_Bottom	= "15%";	// 10%

// these values control the left and right gutter
var c_Padding_Left	= "15%";	// 15%
var c_Padding_Right	= "15%";	// 15%

// standard <TABLE> tag options -- included here for convenience
var c_cellpadding	= "0";		// 0
var c_cellspacing	= "0";		// 1

/* ********************************************************* */
/* ************** DO NOT EDIT BELOW THIS LINE ************** */
/* ********************************************************* */

d_today = new Date();
if( c_Override_Date == "yes" )
{
	d_today.setMonth( c_Override_Month - 1);
	d_today.setYear( c_Override_Year );
}

d_Month_Name = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

if (((d_today.getYear() - 2000) % 4 ) == 0 )
{
	d_Month_Days = new Array(31,29,31,30,31,30,31,31,30,31,30,31);
} else {
	d_Month_Days = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
}

d_Year_Days = new Array(6,1,2,3,4,6,0,1,2,4);

if( c_Font_Face != "" )
{
	document.write( '<FONT face="' + c_Font_Face + '">' );
}

document.write( '<TABLE ' );
if( c_Table_Image != "" )
{
	document.write( 'background="' + c_Table_Image + '" ' );
}
if( c_Table_BGColor != "" )
{
	document.write( 'bgcolor="' + c_Table_BGColor + '" ' );
}
if( c_Font_Color != "" )
{
	document.write( 'style="font-size : ' + c_Font_Size + '; color : ' + c_Font_Color + ';" ' );
} else {
	document.write( 'style="font-size : ' + c_Font_Size + ';" ' );
}
if( c_Table_Border == "yes" )
{
	document.write( 'border="' + c_Table_BorderWidth + '" ' );
} else {
	document.write( 'border="0" ' );
}
document.write( 'bordercolor="' + c_Table_BorderColor + '" ' );
document.write( 'width="' + c_Table_Width + '" ');
document.write( 'height="' + c_Table_Height + '" ');
document.write( 'cellpadding="' + c_cellpadding + '" cellspacing="' + c_cellspacing + '">' );

document.write( '<TR height="' + c_Padding_Top + '"><TD></TR>' );
document.write( '<TR><TD><TD align="center" colspan="7">' );
document.write( d_Month_Name[ d_today.getMonth() ] + ' ' + d_today.getYear() );
document.write( '<TD></TR>' );

document.write( '<TR>' );
document.write( '<TD align="center" width="' + c_Padding_Left + '">' );
document.write( '<TD align="center">S' );
document.write( '<TD align="center">M' );
document.write( '<TD align="center">T' );
document.write( '<TD align="center">W' );
document.write( '<TD align="center">T' );
document.write( '<TD align="center">F' );
document.write( '<TD align="center">S' );
document.write( '<TD align="center" width="' + c_Padding_Right + '">' );
document.write( '</TR>' );

var j = d_Year_Days[ d_today.getYear() - 2000 ];
for( i=0; i<d_today.getMonth(); i++ )
{
	j = j + d_Month_Days[i];
}
j = j % 7;

var k = j;

for( i=1; i<=d_Month_Days[ d_today.getMonth() ]; )
{
	document.write( '<TR>' );
	document.write( '<TD>' );

	
	for(;k>=1;k--)
	{
		document.write( '<TD>' );
	}
	
	for(; j<7; j++)
	{ 
		if( i <= d_Month_Days[ d_today.getMonth() ] )
		{
			if ((d_today.getDate() == i) & (c_Highlight_Today == "yes"))
			{
				document.write( '<TD align="center" style="color : ' 
				+ c_Highlight_Color + ' ;">' + i++ + ' </TD>' );
			
			} else {
				document.write( '<TD align="center">' + i++ + '</TD>' );
			}
		}
	}
	j=0;
	document.write( '<TD> </TD>' );

	document.write( '</TR>' );
}
document.write( '<TR height="' + c_Padding_Bottom + '"><TD></TR>' );
document.write( '</TABLE>' );
