var vn="Microsoft Internet Explorer";
var some;
if(navigator.appName!=vn)
some=1900;
else
some=0;
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
{
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
}

function calendar()
{
var monthNames = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
year = today.getYear();
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monthDays[1] = 29;
nDays = monthDays[today.getMonth()];
firstDay = today;
firstDay.setDate(1); // works fine for most systems
testMe = firstDay.getDate();
if (testMe == 2) firstDay.setDate(0);
startDay = firstDay.getDay();
document.write('<table border="1" cellspacing="0" cellpadding="2" bordercolor="#663333" bgcolor="#C34A2C"> <TR><TD align="center"><img src="images/calName.gif" ><table width="50%" border="0" cellspacing="1" cellpadding="2" bgcolor="#FFFFFF">');
document.write('<TR><TH colspan="7" bgcolor="#FFC850">');
var dayNames = new Array("(Sun)","(Mon)","(Tue)","(Wed)","(Thu)","(Fri)","(Sat)");
var monthNames = new Array("1る","2る","3る","4る","5る","6る","7る","8る","9る","10る","11る","12る");
var now = new Date();
var month = today.getMonth()+1;

document.write("<font style=font-size:10pt;Color:#AE3F3F>" , "    " , thisDay + some , "/" , " " ,month, "/",  now.getYear()," ", dayNames[4],"</FONT>");
document.writeln('</TH></TR><TR><TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Sun</FONT></TH>');
document.writeln('<th bgcolor="#FEBA60"><font style="font-size:9pt;Color:White">Mon</FONT></TH>');
document.writeln('<TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Tue</FONT></TH>');
document.writeln('<TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Wed</FONT></TH>');
document.writeln('<TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Thu</FONT></TH>');
document.writeln('<TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Fri</FONT></TH>');
document.writeln('<TH BGCOLOR="#FEBA60"><font style="font-size:9pt;Color:White">Sat</FONT></TH>');
document.writeln("</TR><TR >");
column = 0;
for (i=0; i < startDay; i++)
{
document.writeln("\n<TD></TD>");
column++;
}
for (i=1; i<=nDays; i++)
{
if (i == thisDay)
{
document.writeln('<td  width="10" align="CENTER" valign="middle" bgcolor="#FFE1BA">')
document.writeln('<img src="images/number/',i,'.gif"',' style="border:double  2px  #663333"  name= "',i,'" onMouseOver="dayMsg(this.name,1)" onMouseOut="dayMsg(this.name,2)">');
}
else
{
document.writeln('<TD   width="10" BGCOLOR="#FFE1BA" ALIGN="CENTER" valign="middle">');
document.writeln('<img src="images/number/',i,'.gif"',' name= "',i,'" onMouseOver="dayMsg(this.name,1)" onMouseOut="dayMsg(this.name,2)">');
}

if (i == thisDay) document.writeln("</TD>")
column++;
if (column == 7)
{
document.writeln("<TR>"); 
column = 0;
}
}
document.writeln('<TR><td ></TD></TR></TABLE></TD></TR></TABLE>');
}




function preMonth()
{


}

function getCurrMonth()
{

var today = new Date();
var currMonth =today.getMonth();

}
