function findImg()
        {
        var imgs, i;
        // loop through images
        imgs = document.getElementsByTagName('img');
        for ( i = 0; i < imgs.length; i++ )
                {
                // test for roll class
                if ( /roll/.test(imgs[i].className))
                        {
                        // add function roll to mouseover
                        imgs[i].onmouseover = function(){roll(this);};
                        imgs[i].onmouseout = function(){roll(this);};
                        }
                }
        }
       
function roll(o)
        {
        var src, newsrc;
        // get source of image
        src = o.src;
        // check for off state, or _off in file name, replace with on
        if ( /_off/.test(src))
                {
                newsrc = src.replace('_off','_on');
                
                } else {
                // else (if file name already has _s2, back to off
                newsrc = src.replace( '_on', '_off');
                }
        // replace original source with new source
        o.src = newsrc;
        }
        
        
window.onload=function()
{
        findImg();
}
