// some retarded utilities that I can't believe I need.
var pngAlpha = false;

function whichBrowser() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	
	this.mozilla5 = (agent.indexOf('mozilla/5') != -1);
	this.ie  = (agent.indexOf("msie")!= -1);
	this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.")== -1));
	this.ie5 = (this.ie && (this.major >= 4)&& (agent.indexOf("msie 5.")!=-1));
	this.ie6 = (this.ie && (agent.indexOf("msie 6.") != -1));
	if(this.mozilla5) return "MOZILLA5";
	if(this.ie6) return "IE6UP";
	if(this.ie5) return "IE5";
	if(this.ie4) return "IE4";
}


function needsTransparencyHack() {
    var browser = whichBrowser();
	return (navigator.platform &&
            navigator.platform.toLowerCase() == "win32" &&
            (browser == "IE5" || browser == "IE6UP"));
}


if (needsTransparencyHack()) {
    pngAlpha = true;
}



function displayImage(strPath, intWidth, intHeight, strClass, strAlt) {

    if (pngAlpha) {
        document.write('<div style="height:'+intHeight+'px; width:'+intWidth+'px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src=\''+strPath+'\', sizingMethod=\'scale\')" class="'+strClass+'" ></div>');

    } else {
        document.write('<div class=\"'+strClass+'\" ><img src="'+strPath+'" width="'+intWidth+'" height="'+intHeight+'" border="0" alt="'+strAlt+'"></div>');
    }
}



function hideObj(divId) {
    document.getElementById(divId).className='invisible';
}
function showObj(divId) {
    document.getElementById(divId).className='visible';
}
