<HEAD>
<SCRIPT LANGUAGE="JavaScript1.0">
  function mArray(n) {		
    this.length = n;
    for(var i = 1; i <= n; i++) this[i] = 0;
    return this;
  }

  function img_s(name,norm_pic,over_pic,over_txt,clck_pic) {
    this.name=name;
    if (over_txt==null) this.over_txt=''; else this.over_txt=over_txt;
    if (flip_img) {
      this.dat=new mArray(3);
      for (z1=0;z1<3;z1++) this.dat[z1]=new Image();
      this.dat[0].src=norm_pic;
      this.dat[1].src=over_pic;
      if (clck_pic==null) this.dat[2]=this.dat[1];
        else this.dat[2].src=clck_pic;
    }
    this.disp=display_pic;
    this.out=display_pic_out;
    this.ovr=display_pic_ovr;
    this.clk=display_pic_clk;    
  }
  function display_pic(n) {
    if (n==1) window.status=this.over_txt; else window.status='';
    if (flip_img) document[this.name].src=this.dat[n].src;
  }
  function display_pic_out() { this.disp(0); };
  function display_pic_ovr() { this.disp(1); };
  function display_pic_clk() { this.disp(2); };

  flip_img=false;
  play_snds=false;
  if ( ((navigator.appName.indexOf('Netscape') != -1) &&
        (parseInt(navigator.appVersion) >= 3))
    || ((navigator.appName.indexOf('Microsoft') != -1) &&
        (parseInt(navigator.appVersion) >= 4))
    || (navigator.userAgent.indexOf("Mozilla/3.0") != -1)
    || (navigator.userAgent.indexOf("Mozilla/4.0") != -1) ) {
      flip_img=true;
      play_snds=true;
  }

// declaration:
  img1 = new img_s('pic1','logo.gif','logo2.gif','XXX','logo3.gif');
</SCRIPT>
</HEAD>
<BODY>
<A HREF="XXX" onMouseover="img1.ovr(); return true;"
              onMouseout="img1.out(); return true;"
              onClick="img1.clk(); return true;">
 <IMG NAME="pic1" SRC="logo.gif" BORDER=0 width=100 height=100>
</A>

The Click-image and the over-text are optional (the "return true" is only
for changing the statusline).

Example without statustext and click-image:

  img1 = new img_s('pic1','logo.gif','logo2.gif');
</SCRIPT>
</HEAD>
<BODY>
<A HREF="XXX" onMouseover="img1.ovr()" onMouseout="img1.out()"
 <IMG NAME="pic1" SRC="logo.gif" BORDER=0 width=100 height=100>
</A>

