// if IE5.5+ on Win32, then display PNGs with AlphaImageLoader
if ((browser.isIE55 || browser.isIE6up) && browser.isWin32) {
var pngAlpha  = true;
var pngNormal = false;
// else, 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;
var pngAlpha  = false;
}
function f_displayImage(strId,strPath,intMainDivLeft,intMainDivTop,intLeft,intRight,intWidth,intHeight,strTitle,strAlt,strHrefPNG,str_onClickPNG,uniqueId) {
if((intMainDivLeft == null)&&(intMainDivTop == null)){
var position = '';
}
else if((intMainDivLeft != null)&&(intMainDivTop != null)){
var position = 'z-index:2;position:absolute;right: '+intMainDivLeft+'px; top: '+intMainDivTop+'px;';
}
if((intLeft != null)&&(intRight == null)){
var positionRel = 'z-index:3;position:relative;left: '+intLeft+'px;';
}
else if((intLeft == null)&&(intRight != null)){
var positionRel = 'z-index:3;position:relative;right: '+intRight+'px;';
}else{
var positionRel = '';
}
if((strHrefPNG != null)||(str_onClickPNG != null)){
var linkStart = '<a style="cursor:pointer;" href="' + strHrefPNG + '" onClick="' + str_onClickPNG + '">';
var linkEnd   = '</a>';
var usemap = 'usemap="#imgPNG'+uniqueId+'"';
var link = '<map id="imgPNG'+uniqueId+'" name="imgPNG'+uniqueId+'">'+
'     <area shape="rect" coords="0,0,' + intWidth + ',' + intHeight + '" href="' + strHrefPNG + '" onClick="' + str_onClickPNG + '">'+
'</map>';
}else{
var linkStart = '';
var linkEnd   = '';
var usemap = '';
var link = '';
}
if(pngAlpha) {
document.writeln('<div align="center" style="width:'+intWidth+'px;height:'+intHeight+'px;'+position+'">'+
linkStart +
'     <div align="center" style="width:'+intWidth+'px;height:'+intHeight+'px;'+positionRel+
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', '+
'sizingMethod=\'image\');" alt="'+strAlt+'" title="'+strTitle+'">'+
'     </div>' +
linkEnd +
'</div>');
}
else if (pngNormal) {
document.writeln('<div align="center" style="' + position + 'width:'+intWidth+'px;height:'+intHeight+'px;" title="'+strTitle+'">');
document.writeln(link + '<img style="' + positionRel + 'width:'+intWidth+'px;height:'+intHeight+'px;" ' + usemap + ' src="'+strPath+'.png" name="'+strId+'" border="0" title="'+strTitle+'" alt="'+strAlt+'"></div>');
}
else {
document.writeln('<div align="center" style="' + position + 'width:'+intWidth+'px;height:'+intHeight+'px;" title="'+strTitle+'">');
document.writeln(link + '<img style="' + positionRel + 'width:'+intWidth+'px;height:'+intHeight+'px;" ' + usemap + ' src="'+strPath+'.png" name="'+strId+'" border="0" title="'+strTitle+'" alt="'+strAlt+'"></div>');
}
}
function f_displayImage2(strId,strPath,intWidth,intHeight,strTitle,strAlt,strLinkHrefPNG,strLinkAttributesPNG,uniqueId, sizingMethod) {
if((strLinkHrefPNG != null)||(strLinkAttributesPNG != null)){
var linkStart = '<a href="' + strLinkHrefPNG + '" ' + strLinkAttributesPNG + ' style="cursor:pointer;">';
var linkEnd   = '</a>';
var usemap = 'usemap="#imgPNG'+uniqueId+'"';
var link = '<map id="imgPNG'+uniqueId+'" name="imgPNG'+uniqueId+'">'+
'     <area shape="rect" coords="0,0,' + intWidth + ',' + intHeight + '" href="' + strLinkHrefPNG + '" ' + strLinkAttributesPNG + '>'+
'</map>';
}else{
var linkStart = '';
var linkEnd   = '';
var usemap = '';
var link = '';
}
if(pngAlpha) {
if(sizingMethod == null) {
sizingMethod = 'image';
}
_return = linkStart +
'<div style="width:'+intWidth+'px;height:'+intHeight+'px;'+
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', '+
'sizingMethod=\''+sizingMethod+'\');" alt="'+strAlt+'" title="'+strTitle+'">'+
'</div>' +
linkEnd;				
}
else if (pngNormal) {
var _return = '';
_return = '<div style="width:'+intWidth+'px;height:'+intHeight+'px;" title="'+strTitle+'">';
_return+= link + '<img style="width:'+intWidth+'px;height:'+intHeight+'px;" ' + usemap + ' src="'+strPath+'.png" name="'+strId+'" border="0" title="'+strTitle+'" alt="'+strAlt+'" /></div>';		
}
else {
var _return = '';
_return = '<div style="width:'+intWidth+'px;height:'+intHeight+'px;" title="'+strTitle+'">';
_return+= link + '<img style="width:'+intWidth+'px;height:'+intHeight+'px;" ' + usemap + ' src="'+strPath+'.png" name="'+strId+'" border="0" title="'+strTitle+'" alt="'+strAlt+'" /></div>';		
}
return _return;
}

