lo logré!!
Gracias David!
Código Javascript
:
Ver originaltodo = "<table border=1>" +
"<tr><td width='155'><td width='155'><td width='155'><td width='155'><td width='155'><td width='70'><td width='70'></tr>" +
"<tr>"
for (x = 1, n = 1; x <= diasMes; x++, n++) {
if (dia == n){
x=1;
if (n%7==0 || (n+1)%7 == 0){
todo += "<td bgcolor='#b5b5b5' height='70px'></td>"
}
else{
todo += "<td bgcolor='#ededed' height='70px'></td>"
}
var aux = "ok";
}
else{
if (aux == "ok") {
if (n%7==0 || (n+1)%7 == 0)
{
todo += "<td bgcolor='#b5b5b5' height='70px'></td>"
}
else {
todo += "<td bgcolor='#ededed' height='70px'></td>"
}
}
else{
todo += "<td height='70px'></td>"
}
}
if (n%7==0) todo += "</tr><tr>"
}
todo += "</table>"
return todo;