function Calendar(csus,cstinga,cfond,ctext,czi)
{
var DenLuna=new Array('Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie');
var ZileLuna=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var DenZi=new Array('D','L','M','M','J','V','S');
var Azi=new Date();
var An=Azi.getYear();
if (An<2010) An=Azi.getFullYear();
var Luna=Azi.getMonth();
var Zi=Azi.getDate();
var Zik=Azi.getDay();
if (((An % 4 == 0) && (An % 100 != 0)) || (An % 400 == 0)) ZileLuna[1] = 29;
NrCol=1;
k=Zi+6-Zik;
while (k>1)
  {
  k=k-7;
  if (k>=0) NrCol++;
  }
k=Zi-Zik;
while (k<=ZileLuna[Luna])
  {
  k=k+7;
  if (k<=ZileLuna[Luna]) NrCol++;
  }
NrCol1=NrCol+1;
if (cfond==null) {cfond="ffffff";}
if (cfond=="") {cfond="ffffff";}
if (csus==null) {csus="ffaa00";}
if (csus=="") {csus="ffaa00";}
if (cstinga==null) {cstinga="ffcc88";}
if (cstinga=="") {cstinga="ffcc88";}
if (ctext==null) {ctext="8000ff";}
if (ctext=="") {ctext="8000ff";}
if (czi==null) {czi="8000ff";}
if (czi=="") {czi="8000ff";}

//stbc=".tbc {border-top:1px solid 1; border-left:1px solid 1; border-color:"+csus+"; background:"+cfond+"}";
//stdc=".tdc { border-right:1px solid 1; border-bottom:1px solid 1; border-color:"+csus+"; color:"+ctext+"; font-family:Tahoma,Arial; font-size:11px; width:16px; text-align:center; }";
//sthc=".thc { border-right:1px solid 1; border-bottom:1px solid 1; border-color:"+csus+"; color:"+ctext+"; font-family:Tahoma,Arial; font-size:11px; text-align:center; }";

stbc=".tbc {border-top:1px solid #"+csus+"; border-left:1px solid #"+csus+"; background:"+cfond+"}";
stdc=".tdc { border-right:1px solid #"+csus+"; border-bottom:1px solid #"+csus+"; color:"+ctext+"; font-family:Tahoma,Arial; font-size:11px; width:16px; text-align:center; }";
sthc=".thc { border-right:1px solid #"+csus+"; border-bottom:1px solid #"+csus+"; color:"+ctext+"; font-family:Tahoma,Arial; font-size:11px; text-align:center; }";

document.write("<style>"+stbc+stdc+sthc+"</style>");

document.write("<table border=0 cellspacing=0 cellpadding=2 class='tbc'>");
document.write("<tr><th class='thc' colspan="+NrCol1+" bgcolor=#"+csus+">"+DenLuna[Luna]+" "+An+"</th></tr>");
zp=36-Zi+Zik;
zp=zp % 7;
if (zp==0) zp=7;
zp=zp-1;
for (i=0;i<7;i++)
  {
  k=i+1;
  k=k % 7;
  document.write("<tr><td class='tdc' bgcolor=#"+cstinga+">"+DenZi[k]+"</td>");
  for (j=0;j<NrCol;j++)
    {
    z=i-zp+7*j+1;
    if ((z>0) && (z<=ZileLuna[Luna])) s=z; else s="&nbsp;";
    if (z==Zi) s="<font color="+czi+"><b>"+s+"</b></font>";
    document.write("<td class='tdc'>"+s+"</td>");
    z=z+7;
    }
  document.write("</tr>");
  }
document.write("</table>");
}
