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 = 1;

// 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";
stat[4] = "Price Match Promise";
stat[5] = "Optometry Giving Sight";

// these are the dynamic targets (changed depending on picture displayed)
var targ = new Array(2);
targ[0] = "http://www.eyecareplus.com.au/tiles.htm#lowgap";
targ[1] = "http://www.eyecareplus.com.au/tiles.htm#frames";
targ[2] = "http://www.eyecareplus.com.au/tiles.htm#";
targ[3] = "http://www.eyecareplus.com.au/tiles.htm#trans";
targ[4] = "http://www.eyecareplus.com.au/tiles.htm#pmp";
targ[5]	= "http://www.eyecareplus.com.au/ogs.htm";

// preload your images
var images = new Array(2);  // image array (again, assuming three pictures)
for (var i = 0; i < 6; 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==6) 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()
{
        top.location.href = targ[count];
}


<!--
// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this 
// notice with the code.
var submitRolls = new Object();

function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit Query";
this.write=submitroll_write;
}

function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;

document.write
	(
	'<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' + 
	' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' + 
	' HREF="javascript:'
	);

if (this.sendfield)
	{
	if (! this.sendvalue)
		this.sendvalue = 1;
	document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
	}

document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');
document.write('>');

document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH='  + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');
if (this.sendfield)
	{
	document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
	document.forms[document.forms.length - 1].elements[this.sendfield].value='';
	}
}

//-->

