var titulos = new Array();
var imagenes = new Array();
var dia = new Array();
var fecha = new Array();
var ambito = new Array();
diahoy=1;
meshoy=5;
anohoy=1997;
var flg = 0;
var fs = 1;
var bg = "white";
M = new Array("January","February",
"March","April","May","June",
"July","August","September",
"October","November","December");
D = new Array("L","M","X","J","V","S","D");
M2 = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
M2b = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Sep.","Octubre","Nov.","Dic.");
qURL = "https://www.tarambana.net/programacion/completa/";
messiguiente = M2b[5];
mesanterior = M2b[3];
anosiguiente = 1997;
anoanterior = 1997;
function getBgn(soloactual) {
//pdy = new Date(); // today
//pmo = pdy.getMonth(); // present month
//pyr = pdy.getYear(); // present year
// indicar el mes desde php
pdy = 1; // today
pmo = 4; // present month
pyr = 1997; // present year
if (pyr < 2000) // Y2K Fix, Isaac Powell
pyr = pyr + 1900; // http://onyx.idbsu.edu/~ipowell
document.write('
');
document.write(' |
');
if(!soloactual){
yr = yr1 = (pmo==0?pyr-1:pyr); // last month's year
mo = (pmo==0?11:pmo-1); // last month
bgn = new Date(M[mo]+" 1,"+yr1); // assign to date
Calendar(); // Send last month to screen
document.write(' | ');
}
yr = pyr; // present year
mo = pmo; // present month
bgn = new Date(M[mo]+" 1,"+yr); // assign to date
Calendar(); // Send this month to screen
document.write(' | ');
if(!soloactual){
// mes tres
nmes = pmo+1;
yr = (nmes>=12?pyr+1:pyr); // next month's year
mo = (nmes>=12?(nmes-12):pmo+1); // next month
bgn = new Date(M[mo]+" 1,"+yr); // assign to date
Calendar(); // Send next month to screen
document.write(' |
');
// mes cuatro
nmes = pmo+2;
yr = (nmes>=12?pyr+1:pyr); // next month's year
mo = (nmes>=12?(nmes-12):pmo+2); // next month
bgn = new Date(M[mo]+" 1,"+yr); // assign to date
Calendar(); // Send next month to screen
document.write(' | ');
// mes cinco
nmes = pmo+3;
yr = (nmes>=12?pyr+1:pyr); // next month's year
mo = (nmes>=12?(nmes-12):pmo+3); // next month
bgn = new Date(M[mo]+" 1,"+yr); // assign to date
Calendar(); // Send next month to screen
document.write(' | ');
// mes seis
nmes = pmo+4;
yr = (nmes>=12?pyr+1:pyr); // next month's year
mo = (nmes>=12?(nmes-12):pmo+4); // next month
bgn = new Date(M[mo]+" 1,"+yr); // assign to date
Calendar(); // Send next month to screen
document.write(' | ');
}
document.write('
'); // Finish up
}
/*window.onload = function (){
}*/
function Calendar(){
dy = bgn.getDay();
if(dy==0)dy=7;
yr = eval(yr);
d = "312831303130313130313031";
if (yr / 4 == Math.floor(yr / 4)) {
d = d.substring(0, 2) + "29" + d.substring(4, d.length);
}
pos = (mo * 2);
ld = eval(d.substring(pos, pos + 2));
document.write(""
+ "" + M2[mo] + " " + yr+ "<\/td><\/tr>|
");
for (var i = 0;i < 7;i ++) {
document.write(""+"" + D[i] + "<\/td>");
}
document.write("<\/tr>");
ctr = 0;
emul = 0;
for (var i = 1;i < 8; i++){
if (i < dy) {
document.write(""+"<\/td>");
}
else {
ctr++;
queclass = 'lnknormal';
qlink = '';
queover = '';
fcomparar = ctr+'-'+(mo+1)+'-'+yr;
if(fecha[fcomparar]==fcomparar){
qlink = qURL+dia[fcomparar];
queclass = 'lnkdestacado';
//queover = ' onmouseover="cambiatextofoto(\''+fcomparar+'\')"';
document.write(' | '+ '' + ctr + ''+ '<\/td>');
}else{
document.write(' | '+ ctr + '<\/td>');
}
}
}
document.write("<\/tr> | ");
while (ctr < ld) {
for (var i = 1;i < 8; i++){
ctr++;
emul++;
if (ctr > ld){
document.write(""+ " <\/td>");
}
else {
queclass = 'lnknormal';
qlink = '';
queover = '';
fcomparar = ctr+'-'+(mo+1)+'-'+yr;
if(fecha[fcomparar]==fcomparar){
qlink = qURL+dia[fcomparar];
queclass = 'lnkdestacado';
//queover = ' onmouseover="cambiatextofoto(\''+fcomparar+'\')"';
document.write(' | '+ '' + ctr + ''+ '<\/td>');
}else{
document.write(' | '+ ctr + '<\/td>');
}
}
}
document.write("<\/tr> | ");
}
document.write("<\/tr><\/table>");
}
//solo el mes actual
getBgn(true);
| |