function resize(curImage, image_resize_width){ 
   if(!curImage){ var curImage = window.event.srcElement; }    
   width = curImage.width; height = curImage.height; 
   if( width > image_resize_width ){ 
      curImage.width  = image_resize_width; 
      curImage.height = Math.ceil( image_resize_width * ( height / width ) ); 
   } 
} 

function check_images(image_resize_width){ count = document.images.length; i = 0; 
    while(count>i){ 
        url = document.images[i].src; 
        if(!url.match(/(web-log)/) && !url.match(/(erolog)/)){ 
            if(document.images[i].complete) 
            { resize(document.images[i], image_resize_width); 
            } else { document.images[i].onload = resize; } 
        } 
        i++; 
    } 
} 