function findMouseOvers(){
   var links = document.links;
   var link, input;
   for(var i=0; i<links.length; i++){
      link = links[i];
      if(   link.childNodes   	&&
      		link.childNodes[0]	&& 
            link.childNodes[0].tagName=='IMG'
         ){
         (function(){
            var img = link.childNodes[0];
            var mouseOutSrc = img.src;

            link.onmouseover = function (){
               img.src = mouseOutSrc.replace(/mouseout_/,'mouseover_');

               //The above line will do for now, but at the first sign of trouble, release this bad boy:
               //(In the meantime, study this one. the problem it fixes is that it should still work correctly
               //if the string 'mouseout_' appears somewhere else in the url)
               //img.src = mouseOutSrc.replace(/(.*\/?)mouseout_([^\/]*\.(?:jpg)|(?:gif))/, '$1mouseover_$2');
            }

            link.onmouseout  = function(){
               img.src = mouseOutSrc;
            }
         })();
      }
   }

   var inputs = document.getElementsByTagName("input");
   for(var i=0; i<inputs.length; i++){
      if(   inputs[i].type == 'image'
         ){
         (function(){
            var input = inputs[i];
            var mouseOutSrc = input.src;

            input.onmouseover = function (){
               //see comment above if this causes trouble
               input.src = mouseOutSrc.replace(/mouseout_/,'mouseover_');
            }

            input.onmouseout  = function(){
               input.src = mouseOutSrc;
            }
         })();
      }
   }
}
