//alert('jsTemplateBottomProcessing.js');
//USEAGE: Include this file just before the </HEAD> tag in an HTML file.
//  This file contains the following code:
//      1. PNG fix for IE6. Note: Some templates do not appear to be running this code
//                          in the top processing JS file.
//-------------------------------------------------------------------------------------//
//
//***************************************************************************//
//*** IE PNG FIX: correctly handle PNG transparency in Win IE 5.5 and 6.x ***//
//***************************************************************************//
if(window.attachEvent && (parseFloat(navigator.appVersion.split("MSIE")[1])<7))
{
    window.onload = function()
    {   
        if (document.body.filters)
        { 
            var i=document.images.length; 
            while(i--){    
                var img = document.images[i];
                var imgName = img.src.toUpperCase();      
                if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
                { 
                    var imgID = (img.id) ? "id='" + img.id + "' " : "",        
                        imgClass = (img.className) ? "class='" + img.className + "' " : "",
                        imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ",
                        imgStyle = "display:inline-block;" + img.style.cssText;
                    if (img.align == "left") image.align='left';        
                    if (img.align == "right")image.align='left';        
                    if (img.parentElement.href) imgStyle = "cursor:pointer;" + imgStyle        
                    img.outerHTML= 
                    "<div style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                    + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                    + "(src=\'" + img.src + "\', sizingMethod='scale');\">" 
                } 
            } 
        } 
    } 
}; 
//*** END: IE PNG FIX: correctly handle PNG transparency in Win IE 5.5 and 6.x ***//
