Código HTML:
<% If dia="" then dia = day(now()) If mes="" then mes = month(now()) If ano="" then ano = year(now()) function qmes(mes) Select case mes Case 1 : Mes_text = "Enero" Case 2 : Mes_text = "Febrero" Case 3 : Mes_text = "Marzo" Case 4 : Mes_text = "Abril" Case 5 : Mes_text = "Mayo" Case 6 : Mes_text = "Junio" Case 7 : Mes_text = "Julio" Case 8 : Mes_text = "Agosto" Case 9 : Mes_text = "Septiembre" Case 10 : Mes_text = "Octubre" Case 11 : Mes_text = "Noviembre" Case 12 : Mes_text = "Diciembre" End Select qmes=Mes_text end function function fecha(mes) Fecha = Cdate("01/"&mes&"/"&ano) Dias = day(DateAdd("M",1,Fecha)-1) fecha=Dias end function %> <script> function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function cambicolorin(valor) { MM_findObj(valor).style.backgroundColor="#CCCCCC"; } function cambicolorout(valor) { MM_findObj(valor).style.backgroundColor="#ffffff"; comprobardia(valor); } function comprobardia(valor) { now = new Date(); dia = now.getDate(); if (MM_findObj(valor.replace("td","h")).value == dia) { MM_findObj(valor).style.backgroundColor="#CCCCCC"; } } var ll=0; function mas(){ ll+=10; MM_findObj("Layer2").style.left=ll; } function menos(){ ll-=10; MM_findObj("Layer2").style.left=ll; } </script> <!--div id="Layer1" style="position:absolute; left:147px; top:128px; width:621px; height:34px; z-index:1; overflow: hidden;"> <div id="Layer2" style="position:absolute; left:0px; top:0px; width:82px; height:21px; z-index:3"--> <% for z=ano-10 to ano+10 Response.Write "" & vbcrlf &_ "<Table border='1' cellspacing='2' cellpadding='2' id='table"&z&"'>"& vbcrlf &_ "<tr><td>"&z&"</td>" & vbcrlf &_ "<td>"&z&"</td>" & vbcrlf For j=1 to 12 Response.Write "<td align='center' bgcolor="&bgcolor&" ><font face='verdana' size='" & size & "'>" & qmes(j) & ">></font></td>" & vbcrlf For x=1 to fecha(j) if x=dia and j=mes and z= ano then bgcolor= "#cccccc" else bgcolor="#ffffff" Contador=Contador+1 if x<10 then x="0"&x Response.Write "<td id='td"&Contador&"' width='22' height='22' align='center' bgcolor="&bgcolor&" onmouseover='cambicolorin(this.id)' onmouseout='cambicolorout(this.id)'><font face='verdana' size='" & size & "'>" &_ "<input type='hidden' value="&x&" size='3' name= 'h"&Contador&"'>"&_ "<a href='calendario.asp?sel=1&dia=" & x & "&mes=" & mes & "&ano="& ano & "'>" & tag_ini & x & tag_fin & "</font></td>" & vbcrlf Next Next Response.Write "</tr></table>"& vbcrlf next %> <!--/div></div--> <a href="javascript:menos()">>></a> <a href="javascript:mas()"><<</a>