// animinated gif stuffs
delay = 3000;            // delay time of the animations (.1 sec.)
imgNumber = 0;          // number of the image in the animation 
totalimgNumber = 0;     // total number of images
anim = new Array();     // images array

for (i = 0; i < totalimgNumber; i++) 
{
    anim[i] = new Image (144, 144);
    anim[i].src = 'images/rd_ad' + (i + 1) + '.gif';
} 

function Switch() 
{                
    document.rd_ad_anim.src = anim[imgNumber].src;
    imgNumber++;
           if(imgNumber >= totalimgNumber) imgNumber = 0;
}

function animate_rd_ad() 
{
    Switch();
    setTimeout( "animate_rd_ad()", delay);
}

// To change the speed of the animation, just create a button to activate this function, which speeds it up: 
function fast() 
{
    delay-=10; // decrease delay by .1 seconds
    if(delay < 0) delay = 0;
}

// To create another button to activate this one, which slows it down:
function slow() 
{
    delay+=10; // increase delay by .1 seconds
    if(delay >4000) delay = 4000;
}

//window.onload = initMenus;