2021-09-12 22:42:46 +02:00

41 lines
1.1 KiB
JavaScript

function cb( name, st )
{
document.images[name].src = "images/box/bt_"+name+st+".gif";
}
var canRefresh=1, numRefresh=1;
function refrescaMiniChat()
{
if ( canRefresh )
{
parent.frames['miniChat'].location.href="miniChat.php?refresh=true";
canRefresh = 0;
setTimeout( "canRefresh=1", 5000*numRefresh );
numRefresh=1;
} else {
numRefresh++;
}
}
// numNews fijada desde PHP contiene el número de noticias
var numNew = 3, curNew = 1;
function noticia( idx )
{
if ( idx <= -3 )
{
if ( idx == -3 ) parent.frames['noticias'].location.href = "noticias.php?sadd=new";
if ( idx == -4 ) parent.frames['noticias'].location.href = "noticias.php?smod="+curNew+"&go="+curNew;
if ( idx == -5 ) parent.frames['noticias'].location.href = "noticias.php?sdel="+curNew;
} else {
if ( idx == -2 ) curNew=1;
if ( idx == -1 ) curNew--;
if ( idx == 1 ) curNew++;
if ( idx == 2 ) curNew=numNew;
if ( curNew < 1 ) { curNew = 1; return; }
if ( curNew > numNew ) { curNew = numNew; return; }
parent.frames['noticias'].location.href = "noticias.php?go="+curNew;
}
}