montharray=["","January","February","March","April","May","June","July","August","September","October","November","December"]
ty=new Date()
theYear=(ty.getYear())+2000
tm=new Date()
tm2=(tm.getMonth())+1
theMonth=montharray[tm2]

function nextmonth(){
findmonth()
m+=1
if(m>12){
m=1
}
theMonth=montharray[m]
mn=eval(montharray[m])
dothecalendar()
}

function prevmonth(){
findmonth()
m-=1
if(m<1){
m=12
}
theMonth=montharray[m]
mn=eval(montharray[m])
dothecalendar()
}

function findmonth(){
montharray=["","January","February","March","April","May","June","July","August","September","October","November","December"]
for(m=1;m<13;m++){
if((montharray[m].toLowerCase())==(theMonth.toLowerCase())){
break;
}
}
}

findmonth()
dothecalendar()

function dothecalendar(){
l= 32 - new Date(theYear, m-1, 32).getDate();
firstDay = new Date(theYear,m-1,1);
startDay = (firstDay.getDay())+1;
bloat=""
if(startDay==2){;bloat="<td class='ds'>&nbsp;</td>";};
if(startDay==3){;bloat="<td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td>";};
if(startDay==4){;bloat="<td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td>";};
if(startDay==5){;bloat="<td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td>";};
if(startDay==6){;bloat="<td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td>";};
if(startDay==7){;bloat="<td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td><td class='ds'>&nbsp;</td>";};

pata="<td class='daystyle' align='center' valign='middle' width='0' height='20'>"

calup="<br><span class='text10'>WBT - Web Based Training&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T&amp;BP - Techniques &amp; Best Practices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Regional - Regional Training&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**On Site</span><br><table class='borders' width='735' border='0' cellspacing='0' cellpadding='0'><tr height='24'><td class='monthstyle' colspan='7' align='center' valign='middle' width='407' height='24'><table width='657' border='0' cellspacing='0' cellpadding='0' height='32'><tr height='32'><td align='center' valign='middle' width='56' height='32'><a href='javascript:prevmonth()'><img src='../images/back.jpg' alt='' height='32' width='56' border='0'></a></td><td class='monthtitlestyle' align='center' valign='middle' width='541' height='32'>"+theMonth+"</td><td align='center' valign='middle' width='60' height='32'><a href='javascript:nextmonth()'><img src='../images/fwd.jpg' alt='' height='32' width='56' border='0'></a></td></tr></table></td></tr><tr height='20'>"+pata+"Sunday</td>"+pata+"Monday</td>"+pata+"Tuesday</td>"+pata+"Wednesday</td>"+pata+"Thursday</td>"+pata+"Friday</td>"+pata+"Saturday</td></tr><tr>"+bloat
for(fillinthedays=1;fillinthedays<l+1;fillinthedays++){
calup=calup+"<td class='ds'>"+fillinthedays+"<br />"+eval(theMonth)[fillinthedays]+"</td>"
startDay+=1
if(startDay>7){
startDay=1
calup=calup+"</tr><tr>"
}
}
if(startDay>1){
for(happyending=startDay;happyending<8;happyending++){
calup=calup+"<td class='ds'>&nbsp;</td>"
}
}
calup=calup+"</table>"
document.getElementById('cowpad').innerHTML=calup
}
