// png_display.js
// Correctly display PNGs on any browsers

// If IE5.5+ on Win32, then display PNGs with AlphaImageLoader
if ( ( browser.isIE55 || browser.isIE6up ) && browser.isWin32 ) {
	var pngAlpha = true;

// Otherwise, if the browser can display PNGs normally, then do that
} else if ( ( browser.isGecko ) || 
            ( browser.isIE5up && browser.isMac ) || 
            ( browser.isOpera && browser.isWin && browser.versionMajor >= 6 ) || 
            ( browser.isOpera && browser.isUnix && browser.versionMajor >= 6 ) || 
            ( browser.isOpera && browser.isMac && browser.versionMajor >= 5 ) || 
            ( browser.isOmniweb && browser.versionMinor >= 3.1 ) || 
            ( browser.isIcab && browser.versionMinor >= 1.9 ) || 
            ( browser.isWebtv ) || 
            ( browser.isDreamcast ) ) 
{
	var pngNormal = true;
}

// Display the image using the appropriate method
function od_displayImage( strPath, strClass, intWidth, intHeight, strAlt ) 
{	
   if ( pngAlpha ) {
      document.write( '<div style="height:' + intHeight + 'px;width:' + 
         intWidth + 
         'px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' 
         + strPath + '.png\', sizingMethod=\'scale\'") class="' + strClass + 
         '"></div>' );
   } else if ( pngNormal ) {
      document.write( '<img src="' + strPath + '.png" width="' + intWidth + 
         '" height="' + intHeight + '" border="0" class="' + strClass + 
         '" alt="' + strAlt + '" />' );
	} else {
      document.write( '<img src="'+strPath+'.gif" width="' + intWidth + 
         '" height="' + intHeight + '" border="0" class="' + strClass + 
         '" alt="' + strAlt + '" />' );
	}
}
