// IE3 safe image switching code
var goodBrowser = 0;

if(document.images){
        // enable rollovers
        goodBrowser = 1;
        
        //image preloading stuff
        //put your images that will be used into a comma delimited
        //list on the next line... follow the example =)
        var preLoad = new Array('/images/b_servicesForNonProfits_over.gif','/images/b_supportersMembers_over.gif','/images/b_volunteers_over.gif','/images/b_eventsCalendar_over.gif','/images/b_successStories_over.gif');

        //don't touch this (it does the pre-loading for you)
        for(var i = 0; i < preLoad.length;i++){
                var k = new Image();
                k.src = preLoad[i];
        }
        
}

function flipper(){
        if(goodBrowser == 1){
                for(var i = 0; i < flipper.arguments.length; i += 2){
                document.images[flipper.arguments[i]].src = flipper.arguments[i+1];
                }
        }

}

function popWindow(theURL,theName,theOptions){
        var newWin = window.open(theURL,theName,theOptions);
        newWin.focus();
}


var rand1 = 0;
var useRand = 0;

images = new Array;
images[1] = new Image();
images[1].src = "/images/a_beHeard1.gif";
images[2] = new Image();
images[2].src = "/images/a_beHeard2.gif";
images[3] = new Image();
images[3].src = "/images/a_beHeard3.gif";
images[4] = new Image();
images[4].src = "/images/a_beHeard4.gif";

function swapPic() {
var imgnum = images.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
document.randimg.src = images[useRand].src;
}