<HTML>
<HEAD>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=x-sjis">
	<META NAME="Author" Content="Y.Sakagami">
	<TITLE>Mame Dialy</TITLE>
	<STYLE TYPE="text/css">
	<!--
	TD { text-align: center; }
	IMG { border: 0 0 0; }
	TR.IMG { height: 30; }
	TD.SUN { color: red ; font-weight: bold; }
	TD.SAT { color: blue; font-weight: bold; }
	TH.SUN { color: red }
	TH.SAT { color: blue}
	-->
	</STYLE>

<SCRIPT LANGUAGE="JavaScript">
<!--
// Start~End Date
    var StartDate = new Date( "Jan 01, 2002" );
    var LastDate = new Date( "Mar 29, 2002" );

// Link & gif info
    var Info = new Array();
    Info[0] = new Array( "./", "", "./icon.gif", 2 , "ただの日記" );
    Info[1] = new Array( "horse/", "", "horse/icon.gif", 2 , "愛馬観戦" );
    Info[2] = new Array( "cycling/", "", "cycling/icon.gif", 4 , "サイクリング？" );
    Info[3] = new Array( "game/", "", "game/icon.gif", 1 , "げーむ逃避" );
    Info[4] = new Array( "tubo/index.html", "", "tubo/icon.gif", 0 , "たんつぼ" );
    Info[5] = new Array( "gamble/", "", "gamble/icon.gif", 2 , "ばくち" );
    Info[6] = new Array( "special/", "", "special/icon.gif", 4 , "りんじ" );
    Info[11] = new Array( "./", "", "horse/icon.gif", 2 , "愛馬観戦" );
    Info[12] = new Array( "./", "", "cycling/icon.gif", 2 , "サイクリング？" );
    Info[13] = new Array( "./", "", "game/icon.gif", 2 , "げーむ逃避" );
    Info[14] = new Array( "./", "", "tubo/icon.gif", 2 , "たんつぼ" );
    Info[15] = new Array( "./", "", "gamble/icon.gif", 2 , "ばくち" );

// Ivent Data
	var Ivent = new Array();
	var nCount = 0;
// '02/03
	Ivent[nCount++] = new Array( "2002", "03", "07", 15 );
//	Ivent[nCount++] = new Array( "2002", "03", "10", 2 );
	Ivent[nCount++] = new Array( "2002", "03", "16", 2 );
	Ivent[nCount++] = new Array( "2002", "03", "21", 2 );
	Ivent[nCount++] = new Array( "2002", "03", "23", 15 );
// '02/02
	Ivent[nCount++] = new Array( "2002", "02", "02", 15 );
	Ivent[nCount++] = new Array( "2002", "02", "03", 1 );
	Ivent[nCount++] = new Array( "2002", "02", "07", 4 );
	Ivent[nCount++] = new Array( "2002", "02", "09", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "10", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "15", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "16", 2 );
	Ivent[nCount++] = new Array( "2002", "02", "18", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "20", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "21", 4 );
	Ivent[nCount++] = new Array( "2002", "02", "23", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "25", 0 );
	Ivent[nCount++] = new Array( "2002", "02", "26", 0 );
// '02/01
	Ivent[nCount++] = new Array( "2002", "01", "01", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "02", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "03", 2 );
	Ivent[nCount++] = new Array( "2002", "01", "07", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "11", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "14", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "19", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "20", 11 );
	Ivent[nCount++] = new Array( "2002", "01", "20", 15 );
	Ivent[nCount++] = new Array( "2002", "01", "25", 15 );
	Ivent[nCount++] = new Array( "2002", "01", "25", 4 );
	Ivent[nCount++] = new Array( "2002", "01", "26", 0 );
	Ivent[nCount++] = new Array( "2002", "01", "28", 4 );
	Ivent[nCount++] = new Array( "2002", "01", "29", 4 );
	Ivent[nCount++] = new Array( "2002", "01", "30", 4 );
	Ivent[nCount++] = new Array( "2002", "01", "30", 15 );
	Ivent[nCount++] = new Array( "2002", "01", "31", 4 );
// End
	Ivent[nCount] = new Array( 0,0,0,0 );


function IncDate( srcDate )
{
	srcDate.setDate( srcDate.getDate() + 1 );

	return srcDate;
}

function OutDtl( Ivent, miniflg )
{
	nInfo = Ivent[3];
	document.write("<a href=\"" + Info[nInfo][0] );
	switch ( Info[nInfo][3] ) {
		case 0:document.write( "#" + Ivent[0] + "" + Ivent[1] + "" + Ivent[2] );break;
		case 1:document.write( Ivent[0] + ".html#" + Ivent[1] + "" + Ivent[2] );break;
		case 2:document.write( Ivent[0] + "" + Ivent[1] + ".html#" + Ivent[2] );break;
		case 3:document.write( Ivent[0] + "" + Ivent[1] + "" + Ivent[2] + ".html" );break;
		case 4:document.write( Ivent[0] + "" + Ivent[1] + "" + Ivent[2] + "/" );break;
	}
	document.write( "\"><img alt=\"" + Info[nInfo][1] + "\" src=\"" + Info[nInfo][2] + "\"" ) ;
	if ( miniflg ) {
		document.write( " width=15" );
	}
	document.write( ">" );
}
// -->
</SCRIPT>

</HEAD>
<BODY BGCOLOR=#dfdfff>
<DIV STYLE="width=100%; font-size:24pt; font-weight:bold; filter:Shadow(color=gray) Alpha(opecity=30,style=2)" align=center>Mame Dialy</DIV>
<HR>
<center>
<table noborder>

<SCRIPT Language="JavaScript">
<!--

	var strMonths = new Array("Jan.","Feb.","Mar.","Apl.","May.","Jun.","Jul.","Aug.","Sep.","Nov.","Nov.","Dec.")
	var loopDate;
	var MonthStart = new Date( LastDate );
	nIndex = 0;
	nMonthCnt = 0;

	MonthStart.setDate(1);

// Output Month

// Month Proc.
	while( MonthStart >= StartDate ) {

		nMonth = MonthStart.getMonth();
		loopDate = new Date( MonthStart );

		if ( nMonthCnt % 2 == 0 ) {
			document.write("<tr>");
			document.write( "<th>" + strMonths[ nMonth ] + " " + ( loopDate.getFullYear() ) + "</th>" );
			if ( loopDate > StartDate ) {
				document.write( "<th>" + strMonths[ nMonth - 1 < 0 ? 11 : nMonth - 1 ] + " " + ( loopDate.getFullYear() - ( nMonth - 1 < 0 ? 1 : 0 ) ) + "</th>" );
			}
			document.write("</tr>\n<tr>");
		}

		document.write( "<td valign=top><table border>" );
		document.write("<tr>\n<th CLASS=SUN width=30>Sun.</th>\n");
		document.write("<th width=30>Mon.</th>\n");
		document.write("<th width=30>Tue.</th>\n");
		document.write("<th width=30>Wed.</th>\n");
		document.write("<th width=30>Thu.</th>\n");
		document.write("<th width=30>Fri.</th>\n");
		document.write("<th CLASS=SAT width=30>Sat.</th>\n</tr>\n");

		while( nMonth == loopDate.getMonth() ) {
			// Date output section.
			nWeek = 0;
			document.write("<tr>");
			if ( loopDate.getDate() == 1 ) {
				// Week Skip
				for ( ; nWeek < loopDate.getDay(); nWeek++ ){
					document.write("<td></td>");
				}
			}

			bakDate = new Date(loopDate);

			for ( ; nWeek < 7; nWeek++, bakDate=IncDate(bakDate) ) {
				switch ( nWeek ) {
					case 0: document.write("<td CLASS=SUN>");break;
					case 6: document.write("<td CLASS=SAT>");break;
					default: document.write("<td>");break;
				}

				if ( nMonth == bakDate.getMonth() ) {
					document.write( bakDate.getDate() );
				}

				document.write("</td>");
			}


			// Image Output section.
			nWeek = 0;
			document.write("<tr CLASS=IMG>");
			if ( loopDate.getDate() == 1 ) {
				// Week Skip
				for ( ; nWeek < loopDate.getDay(); nWeek++ ){
					document.write("<td></td>");
				}
			}

			for ( ; nWeek < 7; nWeek++, loopDate=IncDate(loopDate) ) {
				document.write("<td>");
				if ( nMonth != loopDate.getMonth() || loopDate > LastDate ) {
					continue;
				} else {
					if ( nIndex < nCount && nMonth+1 == Ivent[nIndex][1] && loopDate.getDate() == Ivent[nIndex][2] ) {
						miniflg = 0;
						if ( nIndex+1 < nCount && loopDate.getDate() == Ivent[nIndex+1][2] ) {
							miniflg = 1;
						}
						for ( ; nIndex < nCount && loopDate.getDate() == Ivent[nIndex][2]; nIndex++ ) {
							OutDtl( Ivent[nIndex], miniflg );
						}
					} else {
						document.write( "&nbsp;" );
					}
				}
				document.write("</TD>");
			}
			document.write("</TR>");
		}
		document.write( "</table></td>" );

		if ( nMonth != 0 ) {
			MonthStart.setMonth( nMonth - 1 );
		} else {
			MonthStart.setFullYear( MonthStart.getFullYear() - 1 );
			MonthStart.setMonth( 11 );
		}
		MonthStart.setDate(1);

		nMonthCnt++;
		if ( nMonthCnt % 2 == 0 ) {
			document.write( "</tr>" );
		}
	}

	document.write("<tr></tr><tr><td colspan=2>アイコンの説明</td></tr>");

	for ( i = 0; i < 6; i++ ) {
		document.write("<tr><td colspan=2><IMG SRC=\"" + Info[i][2] + "\" align=absmiddle>：<a href=\"" + Info[i][0] + "\">" + Info[i][4] + "</a></td></tr>" );
	}

// -->
</SCRIPT>

</table>
</center>

</BODY>
</HTML>
