I got the javascript working now. In between fighting VS2005 which was inserting =""
all over the place, and RSS Bandit not liking me using a <
in my for loop because it’s not valid XSTL. Argg so I changed my loop to use a !=
.
RSS Bandit got upset even when I went back to normal outlook2003-orange, so not sure what was wrong there. But after restarting a few times, it now magically works.
Here’s the reworked javascript.
<script>
function swapImage(img){
for (var i=0;i!=document.images.length;i++)
{
if( document.images[i].useMap == img.useMap )
{
swapImageSub(document.images[i]);
}
}
}
function swapImageSub(img){
var oldSrc = img.src;
var folderEnd = oldSrc.lastIndexOf('/') + 1;
if(img.useMap.indexOf('#readstate')==0){
if(oldSrc.indexOf('unread.gif')== -1){
img.src = oldSrc.substr(0, folderEnd) + 'unread.gif';
}else{
img.src = oldSrc.substr(0, folderEnd) + 'read.gif';
}
}else if(img.useMap.indexOf('#flagstate')==0){
if(oldSrc.indexOf('flag.clear.gif')== -1){
img.src = oldSrc.substr(0, folderEnd) + 'flag.clear.gif';
}else{
img.src = oldSrc.substr(0, folderEnd) + 'flag.red.gif';
}
}
}
</script>