function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }

//-->

function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
<!--

// this variable will keep the number of the face displayed
// notice that it is global so that different functions can change and seeit
var count = 0;

// descriptions to be displayed in the status bar -- optional
var stat = new Array(2);
stat[0] = "Spectacle Frames";
stat[1] = "Health Funds - Use It or Lose It";
stat[2] = "Eye Health";
stat[3] = "Transitions";

// these are the dynamic targets (changed depending on picture displayed)
var targ = new Array(2);
targ[0] = "useit.htm";
targ[1] = "frames.htm";
targ[2] = "health.htm";
targ[3] = "lenses.htm#trans";

// preload your images
var images = new Array(2);  // image array (again, assuming three pictures)
for (var i = 0; i < 4; i++)
{
        images[i] = new Image();
        images[i].src = "images/ad_side-ani-" + i + ".jpg";
        // this assums you named your images picture0.gif, picture1.gif, and picture2.gif
        // and put them in the "images" directory
}

function do_animation() // this will animate your picture
{
    count++; // increment the counter
    if (count==4) count = 0;  // reset the counter if it gets to the last picture
    document.animation.src = images[count].src;  // changes your picture appropriately
    setTimeout("do_animation()", 4500); // delay before the next switch
    // make the number higher for a longer pause between switching
}

function show_stat()
{
        window.status = stat[count];
}

function goto_URL()
{
        window.location = targ[count];
}
