defbtn=-1;
onornot=0;
rolloversloaded=0;
imgpath="img/";
function initRollovers() {
  if (document.images) {
   icount=document.images.length;
    for (i=0; i<icount; i++) {
      isrc=document.images[i].src;
      ilength=isrc.length;
      iendsrc=isrc.substring(ilength-6,ilength-4);
      iname=isrc.substring(isrc.lastIndexOf('/')+1,ilength-6);
      if (iendsrc=="_l")
        eval("img"+i+"=new Image(); img"+i+".src='"+imgpath+iname+"_h.gif'")
      else if (iendsrc=="_h") {
        eval("img"+i+"=new Image(); img"+i+".src='"+imgpath+iname+"_l.gif'");
        if (iname.indexOf("btn")==0)
          defbtn=iname.substring(iname.length,iname.length-1);
      } 
    }
    rolloversloaded=1;
  }
}
function msover(i) {
  if (rolloversloaded) {
    onornot = 1;
    document.images["btn"+i].src=imgpath+"btn"+i+"_h.gif";
    if ((defbtn>=0)&&(i!=defbtn)) document.images["btn"+defbtn].src=imgpath+"btn"+defbtn+"_l.gif";
  }
}
function msout(i) {
  if ((document.images) && (i!=defbtn) && rolloversloaded) {
    onornot=0;
    document.images["btn"+i].src=imgpath+"btn"+i+"_l.gif";
    if (defbtn>=0)
      timerID=setTimeout('if (!onornot) document.images["btn"+defbtn].src = imgpath+"btn"+defbtn+"_h.gif";',1);
  }
}
