function alternate_logo(logo, image_id, scale) {
      var image = document.getElementById(image_id);
      if (!image) {
        alert("Can't find specified image id (" +  image_id + ")");
        return;
      }
      //if the image has loaded then there is no reason to use the canvas
      if (image_ok(image)) return;
      //the image has failed to load so replace it with a canvas if we can.
      var canvas = create_canvas(image.width, image.height, image_id, image.title, image.style.display);
      if (canvas == null) return;
      //draw the logo on the canvas
      draw_logo_on_canvas(logo, canvas, undefined, scale);
      //replace the image with the canvas
      image.parentNode.replaceChild(canvas, image);
    }
/*
     * Specifies an alternate source for an image.
     * If the image with the image_id specified has
     * not loaded then a generated logo will be used 
     * to replace it.
     *
     * Note that the image must either have dimensions
     * or a scale must be set.
     */
Specifies an alternate source for an image.
If the image with the image_id specified has
not loaded then a generated logo will be used
to replace it.

Note that the image must either have dimensions
or a scale must be set.
Specifies an alternate source for an image . If the image with the image_id specified has not loaded then a generated logo will be used to replace it . Note that the image must either have dimensions or a scale must be set .
function alternate_logo(logo, image_id, scale) {
      var image = document.getElementById(image_id);
      if (!image) {
        alert("Can't find specified image id (" +  image_id + ")");
        return;
      }
      if (image_ok(image)) return;
      var canvas = create_canvas(image.width, image.height, image_id, image.title, image.style.display);
      if (canvas == null) return;
      draw_logo_on_canvas(logo, canvas, undefined, scale);
      image.parentNode.replaceChild(canvas, image);
    }
function alternate_logo ( logo , image_id , scale ) { var image = document . getElementById ( image_id ) ; if ( ! image ) { alert ( "Can't find specified image id (" + image_id + ")" ) ; return ; } if ( image_ok ( image ) ) return ; var canvas = create_canvas ( image . width , image . height , image_id , image . title , image . style . display ) ; if ( canvas == null ) return ; draw_logo_on_canvas ( logo , canvas , undefined , scale ) ; image . parentNode . replaceChild ( canvas , image ) ; }
Specifies an alternate source for an image.
Specifies an alternate source for an image .
//if the image has loaded then there is no reason to use the canvas //the image has failed to load so replace it with a canvas if we can. //draw the logo on the canvas //replace the image with the canvas