
var rI = {
        init:function(o,t) {rI.obj=o;rI.rT=t;},
        addImg:function() {
                var a=arguments;rI.imgList.push(a[0]);rI.altList.push((a[1]?a[1]:''));
                rI.linkList.push((a[2]?a[2]:''));rI.tgtList.push((a[3]?a[3]:''));},
        showImg:function() {
                if (rI.rT==0){var j=parseInt(Math.random()*rI.imgList.length);
                j=(isNaN(j))?0:j;}else{var oneDay=60*60*24*1000, d=new Date();
                jk=d.getTimezoneOffset()*60*1000;
                j=(parseInt((d.getTime()-jk)/oneDay))%rI.imgList.length;}
                d=document;        newImg=d.createElement("img");
                newImg.src=rI.imgList[j];newImg.alt=rI.altList[j];
                tO=d.getElementById(rI.obj);if (tO) {if (rI.linkList[j]!='') {
                newLink=d.createElement("a");newLink.href=rI.linkList[j];
                newLink.target=rI.tgtList[j];newLink.appendChild(newImg);
                tO.appendChild(newLink);} else {tO.appendChild(newImg);}}},
        addEvent: function(o,evt, fn) {
                if (o.addEventListener) {o.addEventListener(evt, fn, false);
                } else if (o.attachEvent) {o.attachEvent('on'+evt, fn);
                } else {o['on'+evt]=fn;}},
        imgList:[],altList:[],linkList:[],tgtList:[],obj:"",rT:0
}
rI.init("randomImage",0);
rI.addImg("http://www.gcira.org/images/slideshow/top_flag.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/golfball_tee.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/ball_and_iron.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/golf_ball2.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/top_wood.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/near_hole2.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/putter.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/wood_new.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/wood_new2.jpg","Golf Cub iBar","","");
rI.addImg("http://www.gcira.org/images/slideshow/ball_and_club.jpg","Golf Cub iBar","","");
rI.addEvent(window,'load',rI.showImg);