var img = new Object();

function rollover(id,folder,nameprefix,namepostfix,overroot,outroot,downroot){
if (document.getElementById(id)) {
var out=folder+nameprefix+outroot+namepostfix;
var over=folder+nameprefix+overroot+namepostfix;
var down=folder+nameprefix+downroot+namepostfix;
img[id]=new Object;
img[id].outpict = new Image();
img[id].outpict.src = out;
img[id].overpict = new Image();
img[id].overpict.src = over;
img[id].downpict = new Image();
img[id].downpict.src = down;

img[id].pict = document.getElementById(id);
img[id].pict.style.cursor="hand";

img[id].pict.onmouseover = function(){img[id].pict.src=img[id].overpict.src;}
img[id].pict.onmouseout = function(){img[id].pict.src=img[id].outpict.src;}
img[id].pict.onmousedown = function(){img[id].pict.src=img[id].downpict.src;}
img[id].pict.onmouseup = function(){img[id].pict.src=img[id].overpict.src;}
}
}