/* 
   For making nice to IE55 and other crap non-compliant browsers.
   With much thanks to the folks at A List Apart for their mighty fine CSS/JS chops.
   For more, see: http://www.alistapart.com/articles/pngopacity/
*/

var isltIE7 = (browser.isIE && browser.versionMajor < 7);
var isIE7up = (browser.isIE && browser.versionMajor >= 7);

// if IE5.5+ on Win32 but less than IE 7 which supports PNG transparency, then display PNGs with AlphaImageLoader
if ((browser.isIE55 || isltIE7) && browser.isWin32) {
   var pngAlpha = true;
// else, if the browser can display PNGs normally, then do that
} else if ((browser.isGecko) || (isIE7up) || (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;
}

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