function hasClass(ele,cls) {
    return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function image_overlay()
{
    var imgs = window.document.getElementsByTagName('img');
    for (var i=0; i<imgs.length; i++)
    {
        var _img = imgs[i];
        
        width = _img.width;
        height = _img.height;

        if(width>90 || height>90)
        {
            
            if(!hasClass(_img, 'flash-img')) {
                _img.style.background="url("+_img.src+") no-repeat center center";
                _img.src="img/pruhledny.gif";
                //_img.src="img/red.png";
                _img.width = width-2;
                _img.height = height-2;
            }
        }
    }
}

window.onload = function() {image_overlay();onloadDoc();};

