function MM_preloadImages() { //v3.0
    var d=document;
    
    if(d.images){
        
        if(!d.MM_p) 
            d.MM_p=new Array();
        
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
    
        for(i=0; i<a.length; i++)
            if (a[i].indexOf && a[i].indexOf("#")!=0){
                d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
        }
    }
}

function in_array(value, v_array) {
    for(ii = 0; ii < v_array.length; ii++)
        if(value == v_array[ii])
            return true;
    
    return 0;
}

function getCSSRules(pos) {
    if(document.all)
        return document.styleSheets[pos].rules;
    else
        return document.styleSheets[pos].cssRules;
    
    return null;
}

var backgrounds = new Array(); 

for(i = 0; i < document.styleSheets.length; i++) {
    
    var rules = getCSSRules(i);
    
    if(rules != undefined)
        
        for(j = 0; j < rules.length; j++) 
            
            if(rules[j] && rules[j].style && rules[j].style.backgroundImage.length > 0 && rules[j].style.backgroundImage != "none") {
                
                var img_url = rules[j].style.backgroundImage.substr(4, rules[j].style.backgroundImage.length-5);
                
                if(!in_array(img_url, backgrounds))
                    backgrounds.push(img_url);
            }
}

for(b in backgrounds)
    MM_preloadImages(backgrounds[b]);


