bDisabled = false;

jQuery(document).ready(function(){
	var oldsrc = jQuery("#imagetest").attr("src");
	jQuery("#imagetest").attr("src",oldsrc+"?"+Math.random());	
});

/* If images are disabled*/
function checkImages(){
		 if (!IsImageOk(document.getElementById("imagetest"))){
			bDisabled = true;
		 }
}

function IsImageOk(img) {
    if (!img.complete) {
        return false;
    }


    //These give the true size of the image. If it failed
    // to load, either of these should be zero.
    if (typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) {
        return false;
    }

    // No other way of checking: assume it's ok.
    return true;
}

jQuery(window).load(function(){
	checkImages();
});

