function setImgMaxWidth(imgId, maxWidth, loaderImgId){
  var LgoImg = document.getElementById(imgId);
  var src = LgoImg.src;
  if(document.all) src += "?"+Math.random(1); // IK It fix all but it is unacceptable by performanace reasons!
  //SS - Enabled for fix cashing problems anyway
  if(!loaderImgId){
    loaderImgId = imgId + "_loader";
  }
  var antiCacheImage = document.getElementById('ff_logo_loader');
  antiCacheImage.src = src;

  var LgoImg2 = new Image();
//  var LgoImg2 = document.getElementById(loaderImgId);
//  if(!LgoImg2){
//    // Fallback
//    LgoImg2 = new Image();
//  }

  function resize_me()
  {
    if(LgoImg2.width>maxWidth){
      LgoImg.width=maxWidth;
      LgoImg.height=(maxWidth*LgoImg2.height)/LgoImg2.width;
    }else{
      LgoImg.width=LgoImg2.width;
      LgoImg.height=LgoImg2.height;
    }
    LgoImg.style.display="block";
  }

  LgoImg2.onload=resize_me;
  LgoImg2.src = src;
}


