if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	window.attachEvent("onload", alphaBackgrounds);
}

function alphaBackgrounds(){
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	for (i=0; i<document.all.length; i++){
		var bg = document.all[i].currentStyle.backgroundImage;
		if (itsAllGood && bg){
			if (bg.match(/\.png/i) != null){
				var mypng = bg.substring(5,bg.length-2);
				document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
				document.all[i].style.backgroundImage = "url('images/x.gif')";
			}
		}
	}
}

function openWin(url,width,height){
    var browser = navigator.appName;
    swidth = ((screen.width/2)-(width/2));
    sheight = ((screen.height/3)-(height/3));
    macwidth = width-16;
    macheight = height-16;
      
    if ((browser == "Microsoft Internet Explorer") &&
(navigator.appVersion.lastIndexOf('Mac') != -1)){
    window.open(url,'upload','width='+ macwidth +',height='+ macheight
+',top='+ sheight +',left='+ swidth +',resizeable=0' + ',status=0');
    }
    else
    {
    window.open(url, 'upload','width='+ width +',height='+ height
+',screenY='+ sheight +',screenX='+ swidth +',top=' + sheight + ',left=' +
swidth + ',resizeable=0' + ',status=0');
    }
}
